mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
rsx: Fix NOP shader passing
- NOP shaders are used to stub rendering when a pass is supposed to be disabled
This commit is contained in:
parent
bd61347b21
commit
79e2a87bc5
@ -340,6 +340,8 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
|
|||||||
// Check for opcode high bit which indicates a branch instructions (opcode 0x40...0x45)
|
// Check for opcode high bit which indicates a branch instructions (opcode 0x40...0x45)
|
||||||
if (inst._u32[2] & (1 << 23))
|
if (inst._u32[2] & (1 << 23))
|
||||||
{
|
{
|
||||||
|
// NOTE: Jump instructions are not yet proved to work outside of loops and if/else blocks
|
||||||
|
// Otherwise we would need to follow the execution chain
|
||||||
result.has_branch_instructions = true;
|
result.has_branch_instructions = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -348,7 +350,9 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
|
|||||||
if (opcode)
|
if (opcode)
|
||||||
{
|
{
|
||||||
if (result.program_start_offset == umax)
|
if (result.program_start_offset == umax)
|
||||||
|
{
|
||||||
result.program_start_offset = index * 16;
|
result.program_start_offset = index * 16;
|
||||||
|
}
|
||||||
|
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
{
|
{
|
||||||
@ -402,7 +406,8 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
|
|||||||
if (result.program_start_offset == umax)
|
if (result.program_start_offset == umax)
|
||||||
{
|
{
|
||||||
result.program_start_offset = index * 16;
|
result.program_start_offset = index * 16;
|
||||||
result.program_constants_buffer_length = 16;
|
result.program_ucode_length = 16;
|
||||||
|
result.is_nop_shader = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -53,6 +53,7 @@ namespace program_hash_util
|
|||||||
|
|
||||||
bool has_pack_instructions;
|
bool has_pack_instructions;
|
||||||
bool has_branch_instructions;
|
bool has_branch_instructions;
|
||||||
|
bool is_nop_shader; // Does this affect Z-pass testing???
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user