Skip to content

Commit

Permalink
Merge pull request #18255 from hrydgard/opengl-remove-stride-adjustment
Browse files Browse the repository at this point in the history
Fix issue uploading narrow textures in OpenGL.
  • Loading branch information
hrydgard committed Sep 27, 2023
2 parents 43ae1e3 + 038bc7f commit fdb1d69
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 fdb1d69

Please sign in to comment.