mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
rsx: Ignore stencil clear flag if the stencil write mask is disabled
This commit is contained in:
parent
48cb265c2c
commit
1d5c52f476
@ -1126,6 +1126,11 @@ void GLGSRender::on_exit()
|
||||
void GLGSRender::clear_surface(u32 arg)
|
||||
{
|
||||
if (skip_frame || !framebuffer_status_valid) return;
|
||||
|
||||
// If stencil write mask is disabled, remove clear_stencil bit
|
||||
if (!rsx::method_registers.stencil_mask()) arg &= ~0x2u;
|
||||
|
||||
// Ignore invalid clear flags
|
||||
if ((arg & 0xf3) == 0) return;
|
||||
|
||||
GLbitfield mask = 0;
|
||||
|
@ -2048,6 +2048,9 @@ void VKGSRender::clear_surface(u32 mask)
|
||||
{
|
||||
if (skip_frame || renderer_unavailable) return;
|
||||
|
||||
// If stencil write mask is disabled, remove clear_stencil bit
|
||||
if (!rsx::method_registers.stencil_mask()) mask &= ~0x2u;
|
||||
|
||||
// Ignore invalid clear flags
|
||||
if (!(mask & 0xF3)) return;
|
||||
|
||||
@ -2097,7 +2100,7 @@ void VKGSRender::clear_surface(u32 mask)
|
||||
|
||||
if (surface_depth_format == rsx::surface_depth_format::z24s8)
|
||||
{
|
||||
if (mask & 0x2 && rsx::method_registers.stencil_mask() != 0)
|
||||
if (mask & 0x2)
|
||||
{
|
||||
u8 clear_stencil = rsx::method_registers.stencil_clear_value();
|
||||
depth_stencil_clear_values.depthStencil.stencil = clear_stencil;
|
||||
|
Loading…
Reference in New Issue
Block a user