rsx/shaders: Track active MRT count per shader

- Also use more robust hashing to avoid collisions
This commit is contained in:
kd-11 2025-01-09 03:22:12 +03:00 committed by kd-11
parent a635e24fc2
commit 27c56cde22
15 changed files with 135 additions and 43 deletions

View file

@ -795,7 +795,7 @@ std::string FragmentProgramDecompiler::BuildCode()
output_register_names = { "h0", "h4", "h6", "h8" };
}
for (int n = 0; n < 4; ++n)
for (u32 n = 0; n < 4; ++n)
{
const auto& reg_name = output_register_names[n];
if (!m_parr.HasParam(PF_PARAM_NONE, float4_type, reg_name))
@ -803,6 +803,12 @@ std::string FragmentProgramDecompiler::BuildCode()
m_parr.AddParam(PF_PARAM_NONE, float4_type, reg_name, init_value);
}
if (n >= m_prog.mrt_buffers_count)
{
// Skip gather
continue;
}
const auto block_index = ouput_register_indices[n];
auto& r = temp_registers[block_index];