mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-30 06:18:03 +03:00
video_core/amdgpu: heuristic for shader binary info
Games can strip the first shader instruction (meant for debugging) which we rely on for obtaining shader information (e.g. LittleBigPlanet 3). For this reason, we start a search through the code start until we arrive at the shader binary info.
This commit is contained in:
parent
2a0629477b
commit
e968b1c23f
3 changed files with 37 additions and 13 deletions
|
@ -32,7 +32,9 @@ IR::Program TranslateProgram(std::span<const u32> code, Pools& pools, Info& info
|
|||
const RuntimeInfo& runtime_info, const Profile& profile) {
|
||||
// Ensure first instruction is expected.
|
||||
constexpr u32 token_mov_vcchi = 0xBEEB03FF;
|
||||
ASSERT_MSG(code[0] == token_mov_vcchi, "First instruction is not s_mov_b32 vcc_hi, #imm");
|
||||
if (code[0] != token_mov_vcchi) {
|
||||
LOG_WARNING(Render_Recompiler, "First instruction is not s_mov_b32 vcc_hi, #imm");
|
||||
}
|
||||
|
||||
Gcn::GcnCodeSlice slice(code.data(), code.data() + code.size());
|
||||
Gcn::GcnDecodeContext decoder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue