Commit: 8d9a5d5062498797572a4d4ccdfd079947d8d148
Author: Germano
Date:   Mon Apr 9 14:07:32 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB8d9a5d5062498797572a4d4ccdfd079947d8d148

UI: Fix widget shader on certain compiler.

There was a crash with Intel(R) HD Graphics 4000.

===================================================================

M       source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl 
b/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl
index 441f97e95f0..2f5353a7c86 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl
@@ -1,4 +1,4 @@
-#define BIT_RANGE(x) ((1u << x) - 1u)
+#define BIT_RANGE(x) uint((1 << x) - 1)
 
 /* 2 bits for corner */
 /* Attention! Not the same order as in UI_interface.h!
@@ -7,11 +7,11 @@
 #define BOTTOM_RIGHT 1u
 #define TOP_RIGHT 2u
 #define TOP_LEFT 3u
-#define CNR_FLAG_RANGE BIT_RANGE(2u)
+#define CNR_FLAG_RANGE BIT_RANGE(2)
 
 /* 4bits for corner id */
 #define CORNER_VEC_OFS 2u
-#define CORNER_VEC_RANGE BIT_RANGE(4u)
+#define CORNER_VEC_RANGE BIT_RANGE(4)
 const vec2 cornervec[36] = vec2[36](
        vec2(0.0, 1.0), vec2(0.02, 0.805), vec2(0.067, 0.617), vec2(0.169, 
0.45), vec2(0.293, 0.293), vec2(0.45, 0.169), vec2(0.617, 0.076), vec2(0.805, 
0.02), vec2(1.0, 0.0),
        vec2(-1.0, 0.0), vec2(-0.805, 0.02), vec2(-0.617, 0.067), vec2(-0.45, 
0.169), vec2(-0.293, 0.293), vec2(-0.169, 0.45), vec2(-0.076, 0.617), 
vec2(-0.02, 0.805), vec2(0.0, 1.0),
@@ -19,7 +19,7 @@ const vec2 cornervec[36] = vec2[36](
        vec2(1.0, 0.0), vec2(0.805, -0.02), vec2(0.617, -0.067), vec2(0.45, 
-0.169), vec2(0.293, -0.293), vec2(0.169, -0.45), vec2(0.076, -0.617), 
vec2(0.02, -0.805), vec2(0.0, -1.0)
 );
 
-#define INNER_FLAG     (1u << 10u) /* is inner vert */
+#define INNER_FLAG     uint(1 << 10) /* is inner vert */
 
 uniform mat4 ModelViewProjectionMatrix;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to