mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
rsx/shaders: Track active MRT count per shader
- Also use more robust hashing to avoid collisions
This commit is contained in:
parent
a635e24fc2
commit
27c56cde22
15 changed files with 135 additions and 43 deletions
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue