GPU/HW: Fix red bleeding when writing VRAM with mask bit set

Fixes menu screen in Twisted Metal 4.
This commit is contained in:
Connor McLaughlin 2020-05-09 14:38:02 +10:00
parent f679f8d063
commit f17c2c44d0
2 changed files with 2 additions and 2 deletions

View file

@ -731,7 +731,7 @@ void GPU_HW_D3D11::UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void* d
width,
height,
map_result.index_aligned,
m_GPUSTAT.set_mask_while_drawing ? 0xFFu : 0x00,
m_GPUSTAT.set_mask_while_drawing ? 0x8000u : 0x00,
GetCurrentNormalizedBatchVertexDepthID()};
m_context->OMSetDepthStencilState(
m_GPUSTAT.check_mask_before_draw ? m_depth_test_less_state.Get() : m_depth_test_always_state.Get(), 0);

View file

@ -782,7 +782,7 @@ void GPU_HW_OpenGL::UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void*
width,
height,
map_result.index_aligned,
m_GPUSTAT.set_mask_while_drawing ? 0xFFu : 0x00,
m_GPUSTAT.set_mask_while_drawing ? 0x8000u : 0x00,
GetCurrentNormalizedBatchVertexDepthID()};
UploadUniformBuffer(&uniforms, sizeof(uniforms));