GPU: Fix interlaced rendering in vblank breaking

This commit is contained in:
Connor McLaughlin
2020-05-17 01:02:20 +10:00
parent 93031fc27f
commit b25ed6c151
7 changed files with 29 additions and 21 deletions

View File

@ -610,7 +610,7 @@ void GPU_HW_D3D11::UpdateDisplay()
m_context->OMSetDepthStencilState(m_depth_disabled_state.Get(), 0);
m_context->PSSetShaderResources(0, 1, m_vram_texture.GetD3DSRVArray());
const u32 reinterpret_field_offset = GetInterlacedField();
const u32 reinterpret_field_offset = GetInterlacedDisplayLineOffset();
const u32 reinterpret_start_x = m_crtc_state.regs.X * m_resolution_scale;
const u32 reinterpret_crop_left = (m_crtc_state.display_vram_left - m_crtc_state.regs.X) * m_resolution_scale;
const u32 uniforms[4] = {reinterpret_start_x, scaled_vram_offset_y, reinterpret_crop_left,
@ -694,7 +694,7 @@ void GPU_HW_D3D11::FillVRAM(u32 x, u32 y, u32 width, u32 height, u32 color)
Uniforms uniforms;
std::tie(uniforms.u_fill_color[0], uniforms.u_fill_color[1], uniforms.u_fill_color[2], uniforms.u_fill_color[3]) =
RGBA8ToFloat(color);
uniforms.u_interlaced_displayed_field = GetInterlacedField();
uniforms.u_interlaced_displayed_field = GetInterlacedDisplayLineOffset();
m_context->OMSetDepthStencilState(m_depth_test_always_state.Get(), 0);