mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
GPU: Correctly mask src x/y in VRAM->CPU transfer
This commit is contained in:
parent
9b6a59329e
commit
faa9e59f61
|
@ -314,8 +314,8 @@ bool GPU::HandleCopyRectangleVRAMToCPUCommand(const u32*& command_ptr, u32 comma
|
||||||
const u32 height = ReplaceZero((command_ptr[2] >> 16) & 0x1FF, 0x200);
|
const u32 height = ReplaceZero((command_ptr[2] >> 16) & 0x1FF, 0x200);
|
||||||
const u32 num_pixels = width * height;
|
const u32 num_pixels = width * height;
|
||||||
const u32 num_words = ((num_pixels + 1) / 2);
|
const u32 num_words = ((num_pixels + 1) / 2);
|
||||||
const u32 src_x = command_ptr[1] & 0xFFFF;
|
const u32 src_x = command_ptr[1] & 0x3FF;
|
||||||
const u32 src_y = command_ptr[1] >> 16;
|
const u32 src_y = (command_ptr[1] >> 16) & 0x3FF;
|
||||||
command_ptr += 3;
|
command_ptr += 3;
|
||||||
|
|
||||||
Log_DebugPrintf("Copy rectangle from VRAM to CPU offset=(%u,%u), size=(%u,%u)", src_x, src_y, width, height);
|
Log_DebugPrintf("Copy rectangle from VRAM to CPU offset=(%u,%u), size=(%u,%u)", src_x, src_y, width, height);
|
||||||
|
|
Loading…
Reference in a new issue