Merge pull request #18255 from hrydgard/opengl-remove-stride-adjustment

Fix issue uploading narrow textures in OpenGL.
This commit is contained in:
Henrik Rydgård 2023-09-27 17:14:06 +02:00 committed by GitHub
commit fdb1d69d11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}