diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-09-29 22:56:47 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-09-29 22:56:47 +0300 |
commit | f36efe0e2ad5557fdd3f21ebc80e3e9e42533071 (patch) | |
tree | e6d6f0559cb74df3aec42d97f1fc1e53d0bd6120 /source | |
parent | 7e269914721eb4435c1ef3e3343cec1649da9111 (diff) |
Fix mysterious crash when using textureGather on Intel drivers.
The crash occurs in a shader with uniform block of a certain size and misaligned.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_common.h | 3 | ||||
-rw-r--r-- | source/blender/draw/modes/shaders/common_globals_lib.glsl | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h index a7de7fdeafa..206639341cf 100644 --- a/source/blender/draw/intern/draw_common.h +++ b/source/blender/draw/intern/draw_common.h @@ -113,8 +113,11 @@ typedef struct GlobalsUboStorage { float sizeLampCenter, sizeLampCircle, sizeLampCircleShadow; float sizeVertex, sizeEdge, sizeEdgeFix, sizeFaceDot; float gridDistance, gridResolution, gridSubdivisions, gridScale; + + float pad_globalsBlock; } GlobalsUboStorage; /* Keep in sync with globalsBlock in shaders */ +BLI_STATIC_ASSERT_ALIGN(GlobalsUboStorage, 16) void DRW_globals_update(void); void DRW_globals_free(void); diff --git a/source/blender/draw/modes/shaders/common_globals_lib.glsl b/source/blender/draw/modes/shaders/common_globals_lib.glsl index f1d118e572a..69ba304ca24 100644 --- a/source/blender/draw/modes/shaders/common_globals_lib.glsl +++ b/source/blender/draw/modes/shaders/common_globals_lib.glsl @@ -75,4 +75,6 @@ layout(std140) uniform globalsBlock { float gridResolution; float gridSubdivisions; float gridScale; + + float pad_globalsBlock; }; |