GPU/HW: Fix incorrect interlaced VRAM extract offset

Fixes exascerbated combing when upscaling.
This commit is contained in:
Stenzek 2025-03-22 01:10:28 +10:00
parent 6eddc0b982
commit d176109d3b
No known key found for this signature in database
3 changed files with 6 additions and 3 deletions

View File

@ -1955,7 +1955,7 @@ void GPU::UpdateDisplay(bool submit_frame)
cmd->display_origin_left = m_crtc_state.display_origin_left;
cmd->display_origin_top = m_crtc_state.display_origin_top;
cmd->display_vram_left = m_crtc_state.display_vram_left;
cmd->display_vram_top = m_crtc_state.display_vram_top + (interlaced_field & BoolToUInt8(line_skip));
cmd->display_vram_top = m_crtc_state.display_vram_top;
cmd->display_vram_width = m_crtc_state.display_vram_width;
cmd->display_vram_height = m_crtc_state.display_vram_height >> BoolToUInt8(interlaced);
cmd->X = m_crtc_state.regs.X;

View File

@ -3899,7 +3899,9 @@ void GPU_HW::UpdateDisplay(const GPUBackendUpdateDisplayCommand* cmd)
const u32 line_skip = BoolToUInt32(cmd->interlaced_display_interleaved);
const u32 resolution_scale = cmd->display_24bit ? 1 : m_resolution_scale;
const u32 scaled_vram_offset_x = cmd->display_vram_left * resolution_scale;
const u32 scaled_vram_offset_y = cmd->display_vram_top * resolution_scale;
const u32 scaled_vram_offset_y =
cmd->display_vram_top * resolution_scale +
(BoolToUInt8(cmd->interlaced_display_field) & BoolToUInt8(cmd->interlaced_display_interleaved));
const u32 scaled_display_width = cmd->display_vram_width * resolution_scale;
const u32 scaled_display_height = cmd->display_vram_height * resolution_scale;
bool drew_anything = false;

View File

@ -396,7 +396,8 @@ void GPU_SW::UpdateDisplay(const GPUBackendUpdateDisplayCommand* cmd)
const u32 line_skip = BoolToUInt32(cmd->interlaced_display_interleaved);
const u32 src_x = is_24bit ? cmd->X : cmd->display_vram_left;
const u32 skip_x = is_24bit ? (cmd->display_vram_left - cmd->X) : 0;
const u32 src_y = cmd->display_vram_top;
const u32 src_y = cmd->display_vram_top +
(BoolToUInt8(cmd->interlaced_display_field) & BoolToUInt8(cmd->interlaced_display_interleaved));
const u32 width = cmd->display_vram_width;
const u32 height = cmd->display_vram_height;