File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1274,7 +1274,15 @@ void rsx_debugger::GetFragmentProgram() const
12741274 }
12751275
12761276 const auto [program_offset, program_location] = rsx::method_registers.shader_program_address ();
1277- auto data_ptr = vm::base (rsx::get_address (program_offset, program_location));
1277+ const auto address = rsx::get_address (program_offset, program_location, 4 );
1278+ if (!address)
1279+ {
1280+ m_fragment_disasm->clear ();
1281+ return ;
1282+ }
1283+
1284+ // NOTE: Reading through super ptr while crash-safe means we're probably reading incorrect bytes, but should be fine in 99% of cases
1285+ auto data_ptr = vm::get_super_ptr (address);
12781286 const auto fp_metadata = program_hash_util::fragment_program_utils::analyse_fragment_program (data_ptr);
12791287
12801288 const bool output_h0 = rsx::method_registers.shader_control () & CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS ? false : true ;
@@ -1314,4 +1322,4 @@ void rsx_debugger::GetFragmentProgram() const
13141322
13151323 m_fragment_disasm->clear ();
13161324 m_fragment_disasm->setText (QString::fromStdString (fp_disasm.GetArbShader ()));
1317- }
1325+ }
You can’t perform that action at this time.
0 commit comments