mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-28 18:22:00 +00:00
rsx: Check for stencil writes when determining zeta_write flag
This commit is contained in:
parent
c4d99f93db
commit
e0a7912d7c
@ -1067,6 +1067,24 @@ namespace rsx
|
||||
|
||||
// Check write masks
|
||||
layout.zeta_write_enabled = rsx::method_registers.depth_write_enabled();
|
||||
if (!layout.zeta_write_enabled && stencil_test_enabled)
|
||||
{
|
||||
// Check if stencil data is modified
|
||||
auto mask = rsx::method_registers.stencil_mask();
|
||||
bool active_write_op = (rsx::method_registers.stencil_op_zpass() != rsx::stencil_op::keep ||
|
||||
rsx::method_registers.stencil_op_fail() != rsx::stencil_op::keep ||
|
||||
rsx::method_registers.stencil_op_zfail() != rsx::stencil_op::keep);
|
||||
|
||||
if ((!mask || !active_write_op) && rsx::method_registers.two_sided_stencil_test_enabled())
|
||||
{
|
||||
mask |= rsx::method_registers.back_stencil_mask();
|
||||
active_write_op |= (rsx::method_registers.stencil_op_zpass() != rsx::stencil_op::keep ||
|
||||
rsx::method_registers.stencil_op_fail() != rsx::stencil_op::keep ||
|
||||
rsx::method_registers.stencil_op_zfail() != rsx::stencil_op::keep);
|
||||
}
|
||||
|
||||
layout.zeta_write_enabled = (mask && active_write_op);
|
||||
}
|
||||
|
||||
// NOTE: surface_target_a is index 1 but is not MRT since only one surface is active
|
||||
bool color_write_enabled = false;
|
||||
|
Loading…
Reference in New Issue
Block a user