D3D11 mipmap stride fix

This commit is contained in:
Henrik Rydgård committed 2023-03-12 23:31:51 +01:00
1 parent 1860a73d58
commit c32e3f89f1
1 file changed
+1 -1
+1 -1
View File
@@ -301,7 +301,7 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry) {
if (plan.replaceValid) {
int blockSize = 0;
if (Draw::DataFormatIsBlockCompressed(plan.replaced->Format(), &blockSize)) {
stride = mipWidth * 4; // This stride value doesn't quite make sense to me, but it works.
stride = ((mipWidth + 3) & ~3) * 4; // This stride value doesn't quite make sense to me, but it works.
dataSize = plan.replaced->GetLevelDataSize(i);
} else {
int bpp = (int)Draw::DataFormatSizeInBytes(plan.replaced->Format());