Skip to content

Commit

Permalink
Fix issue uploading narrow textures in OpenGL.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hrydgard committed Sep 27, 2023
1 parent 43ae1e3 commit 038bc7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/GLES/TextureCacheGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}

Expand Down

0 comments on commit 038bc7f

Please sign in to comment.