diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-04-02 01:52:01 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-04-02 01:52:01 +0000 |
| commit | 7854ee68b81ec5c5d5c327a20e47a284b77fc5e8 (patch) | |
| tree | 1ed181180566e31ae64ecb2378827aecf2be1133 /Graphics/GraphicsTools | |
| parent | Added option to specify the path to MotlenVk library when building Vulkan bac... (diff) | |
| download | DiligentCore-7854ee68b81ec5c5d5c327a20e47a284b77fc5e8.tar.gz DiligentCore-7854ee68b81ec5c5d5c327a20e47a284b77fc5e8.zip | |
TextureUploaderGL: fixed issue with row stride that must be at least 32-bit aligned
Diffstat (limited to 'Graphics/GraphicsTools')
| -rw-r--r-- | Graphics/GraphicsTools/src/TextureUploaderGL.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Graphics/GraphicsTools/src/TextureUploaderGL.cpp b/Graphics/GraphicsTools/src/TextureUploaderGL.cpp index 57616404..bd8bb95c 100644 --- a/Graphics/GraphicsTools/src/TextureUploaderGL.cpp +++ b/Graphics/GraphicsTools/src/TextureUploaderGL.cpp @@ -67,7 +67,8 @@ public: MipHeight = Align(MipHeight, Uint32{FmtAttribs.BlockHeight}); } - auto RowStride = MipWidth / Uint32{FmtAttribs.BlockWidth} * FmtAttribs.GetElementSize(); + // Stride must be 32-bit aligned in OpenGL + auto RowStride = Align(MipWidth / Uint32{FmtAttribs.BlockWidth} * FmtAttribs.GetElementSize(), Uint32{4}); m_SubresourceStrides[SubRes] = RowStride; auto MipSize = MipHeight / Uint32{FmtAttribs.BlockHeight} * RowStride; |
