From bdc66c9569eb244296bc1fad362f372ff8a939e2 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 30 Sep 2021 17:22:12 -0300 Subject: 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 --- source/blender/gpu/opengl/gl_state.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu') 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); -- cgit v1.2.3