From 2bc1c67236dd5ae467f167f69607b3a75bbabd99 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin <stenzek@gmail.com> Date: Mon, 11 May 2020 22:03:32 +1000 Subject: [PATCH] GPU/HW: Fix extra column being added with unaligned 24-bit scanout Fixes pink lines in FMVs of NASCAR Thunder 2004. --- src/core/gpu_hw_d3d11.cpp | 4 ++-- src/core/gpu_hw_opengl.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/gpu_hw_d3d11.cpp b/src/core/gpu_hw_d3d11.cpp index 7df3c2929..ce34250c8 100644 --- a/src/core/gpu_hw_d3d11.cpp +++ b/src/core/gpu_hw_d3d11.cpp @@ -622,8 +622,8 @@ void GPU_HW_D3D11::UpdateDisplay() DrawUtilityShader(display_pixel_shader, uniforms, sizeof(uniforms)); m_host_display->SetDisplayTexture(m_display_texture.GetD3DSRV(), m_display_texture.GetWidth(), - m_display_texture.GetHeight(), scaled_vram_offset_x - reinterpret_start_x, 0, - scaled_display_width, scaled_display_height); + m_display_texture.GetHeight(), 0, 0, scaled_display_width, + scaled_display_height); RestoreGraphicsAPIState(); } diff --git a/src/core/gpu_hw_opengl.cpp b/src/core/gpu_hw_opengl.cpp index 6498e2da8..fa99e34fc 100644 --- a/src/core/gpu_hw_opengl.cpp +++ b/src/core/gpu_hw_opengl.cpp @@ -632,9 +632,9 @@ void GPU_HW_OpenGL::UpdateDisplay() glDrawArrays(GL_TRIANGLES, 0, 3); m_host_display->SetDisplayTexture(reinterpret_cast<void*>(static_cast<uintptr_t>(m_display_texture.GetGLId())), - m_display_texture.GetWidth(), m_display_texture.GetHeight(), - scaled_vram_offset_x - reinterpret_start_x, scaled_display_height, - scaled_display_width, -static_cast<s32>(scaled_display_height)); + m_display_texture.GetWidth(), m_display_texture.GetHeight(), 0, + scaled_display_height, scaled_display_width, + -static_cast<s32>(scaled_display_height)); // restore state glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_vram_fbo_id);