GPU/HW: Fix extra column being added with unaligned 24-bit scanout

Fixes pink lines in FMVs of NASCAR Thunder 2004.
This commit is contained in:
Connor McLaughlin 2020-05-11 22:03:32 +10:00
parent 6477e5fb54
commit 2bc1c67236
2 changed files with 5 additions and 5 deletions

View File

@ -622,8 +622,8 @@ void GPU_HW_D3D11::UpdateDisplay()
DrawUtilityShader(display_pixel_shader, uniforms, sizeof(uniforms)); DrawUtilityShader(display_pixel_shader, uniforms, sizeof(uniforms));
m_host_display->SetDisplayTexture(m_display_texture.GetD3DSRV(), m_display_texture.GetWidth(), m_host_display->SetDisplayTexture(m_display_texture.GetD3DSRV(), m_display_texture.GetWidth(),
m_display_texture.GetHeight(), scaled_vram_offset_x - reinterpret_start_x, 0, m_display_texture.GetHeight(), 0, 0, scaled_display_width,
scaled_display_width, scaled_display_height); scaled_display_height);
RestoreGraphicsAPIState(); RestoreGraphicsAPIState();
} }

View File

@ -632,9 +632,9 @@ void GPU_HW_OpenGL::UpdateDisplay()
glDrawArrays(GL_TRIANGLES, 0, 3); glDrawArrays(GL_TRIANGLES, 0, 3);
m_host_display->SetDisplayTexture(reinterpret_cast<void*>(static_cast<uintptr_t>(m_display_texture.GetGLId())), m_host_display->SetDisplayTexture(reinterpret_cast<void*>(static_cast<uintptr_t>(m_display_texture.GetGLId())),
m_display_texture.GetWidth(), m_display_texture.GetHeight(), m_display_texture.GetWidth(), m_display_texture.GetHeight(), 0,
scaled_vram_offset_x - reinterpret_start_x, scaled_display_height, scaled_display_height, scaled_display_width,
scaled_display_width, -static_cast<s32>(scaled_display_height)); -static_cast<s32>(scaled_display_height));
// restore state // restore state
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_vram_fbo_id); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_vram_fbo_id);