mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-02 22:30:39 +00:00
d3d12: Mipmap offset is 512byte aligned
Fix retro city rampage crash at startup
This commit is contained in:
parent
6cb00e681b
commit
45b7da6666
1 changed files with 1 additions and 0 deletions
|
@ -170,6 +170,7 @@ writeTexelsGeneric(const char *src, char *dst, size_t widthInBlock, size_t heigh
|
||||||
memcpy((char*)dst + offsetInDst + row * rowPitch, (char*)src + offsetInSrc + row * widthInBlock * blockSize, currentWidth * blockSize);
|
memcpy((char*)dst + offsetInDst + row * rowPitch, (char*)src + offsetInSrc + row * widthInBlock * blockSize, currentWidth * blockSize);
|
||||||
|
|
||||||
offsetInDst += currentHeight * rowPitch;
|
offsetInDst += currentHeight * rowPitch;
|
||||||
|
offsetInDst = align(offsetInDst, 512);
|
||||||
offsetInSrc += currentHeight * widthInBlock * blockSize;
|
offsetInSrc += currentHeight * widthInBlock * blockSize;
|
||||||
currentHeight = MAX2(currentHeight / 2, 1);
|
currentHeight = MAX2(currentHeight / 2, 1);
|
||||||
currentWidth = MAX2(currentWidth / 2, 1);
|
currentWidth = MAX2(currentWidth / 2, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue