[Bf-blender-cvs] [bdc66c9569e] master: GPU: set 'GL_PACK_ALIGNMENT' 1 as default
Germano Cavalcante
noreply at git.blender.org
Fri Oct 1 14:12:10 CEST 2021
Commit: bdc66c9569eb244296bc1fad362f372ff8a939e2
Author: Germano Cavalcante
Date: Thu Sep 30 17:22:12 2021 -0300
Branches: master
https://developer.blender.org/rBbdc66c9569eb244296bc1fad362f372ff8a939e2
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
===================================================================
M source/blender/gpu/opengl/gl_state.cc
===================================================================
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);
More information about the Bf-blender-cvs
mailing list