d3d12: Mipmap offset is 512byte aligned

Fix retro city rampage crash at startup
This commit is contained in:
vlj 2015-06-27 02:09:26 +02:00 committed by Vincent Lejeune
parent 6cb00e681b
commit 45b7da6666
1 changed files with 1 additions and 0 deletions

View File

@ -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);
offsetInDst += currentHeight * rowPitch;
offsetInDst = align(offsetInDst, 512);
offsetInSrc += currentHeight * widthInBlock * blockSize;
currentHeight = MAX2(currentHeight / 2, 1);
currentWidth = MAX2(currentWidth / 2, 1);