GPU/HW: Fix oversized VRAM copies writing out of bounds

Fixes jittering in Duke Nukem - Land of the Babes water effect.
This commit is contained in:
Connor McLaughlin
2020-05-03 18:09:34 +10:00
parent 91d7212b36
commit e058beb4b0
4 changed files with 20 additions and 2 deletions

View File

@ -759,6 +759,8 @@ void GPU_HW_D3D11::CopyVRAM(u32 src_x, u32 src_y, u32 dst_x, u32 dst_y, u32 widt
src_y * m_resolution_scale,
dst_x * m_resolution_scale,
dst_y * m_resolution_scale,
((dst_x + width) % VRAM_WIDTH) * m_resolution_scale,
((dst_y + height) % VRAM_HEIGHT) * m_resolution_scale,
width * m_resolution_scale,
height * m_resolution_scale,
m_GPUSTAT.set_mask_while_drawing ? 1u : 0u,