summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsTools
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-04-02 01:52:01 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-04-02 01:52:01 +0000
commit7854ee68b81ec5c5d5c327a20e47a284b77fc5e8 (patch)
tree1ed181180566e31ae64ecb2378827aecf2be1133 /Graphics/GraphicsTools
parentAdded option to specify the path to MotlenVk library when building Vulkan bac... (diff)
downloadDiligentCore-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.cpp3
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;