From 038bc7fc49faa8d6050d34760d385fabec73c538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 27 Sep 2023 16:42:07 +0200 Subject: [PATCH] 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 --- GPU/GLES/TextureCacheGLES.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index 8bbb390bc8..94dcf0db04 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -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; }