diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-09-30 23:22:12 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-10-01 15:11:37 +0300 |
commit | bdc66c9569eb244296bc1fad362f372ff8a939e2 (patch) | |
tree | 393b694f4282f3297cb888d5a981a49ba0bba907 /source/blender/gpu | |
parent | eb3a8fb4e8b173edc2282f6462e219ab8b9c95e2 (diff) |
GPU: set 'GL_PACK_ALIGNMENT' 1 as default
This fixes T91828.
The current value of `GL_PACK_ALIGNMENT` may result in crash in the `gpu` module if the buffer is not aligned.
Differential Revision: https://developer.blender.org/D12720
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_state.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc index 1106e3dab50..d737cf88a13 100644 --- a/source/blender/gpu/opengl/gl_state.cc +++ b/source/blender/gpu/opengl/gl_state.cc @@ -52,6 +52,7 @@ GLStateManager::GLStateManager() glDisable(GL_DITHER); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPrimitiveRestartIndex((GLuint)0xFFFFFFFF); |