Fix issue uploading narrow textures in OpenGL.

We had some stride adjustment that is not needed - and we're not passing
the stride along, so it can't do the "right thing".

Fixes #18254
This commit is contained in:
Henrik Rydgård committed 2023-09-27 16:43:06 +02:00
1 parent 43ae1e3b07
commit 038bc7fc49
1 file changed
+2 -2
+2 -2
View File
@@ -304,7 +304,7 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry) {
bc = true;
} else {
int bpp = (int)Draw::DataFormatSizeInBytes(plan.replaced->Format());
stride = std::max(mipWidth * bpp, 16);
stride = mipWidth * bpp;
dataSize = stride * mipHeight;
}
} else {
@@ -314,7 +314,7 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry) {
} else {
bpp = (int)Draw::DataFormatSizeInBytes(dstFmt);
}
stride = std::max(mipWidth * bpp, 16);
stride = mipWidth * bpp;
dataSize = stride * mipHeight;
}