diff options
Diffstat (limited to 'source')
3 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_shader_shared.h b/source/blender/draw/engines/overlay/overlay_shader_shared.h index 99700cdcec4..339b6f02e1a 100644 --- a/source/blender/draw/engines/overlay/overlay_shader_shared.h +++ b/source/blender/draw/engines/overlay/overlay_shader_shared.h @@ -24,19 +24,19 @@ typedef struct OVERLAY_GridData OVERLAY_GridData; #define BG_MASK 5 enum OVERLAY_GridBits { - SHOW_AXIS_X = (1 << 0), - SHOW_AXIS_Y = (1 << 1), - SHOW_AXIS_Z = (1 << 2), - SHOW_GRID = (1 << 3), - PLANE_XY = (1 << 4), - PLANE_XZ = (1 << 5), - PLANE_YZ = (1 << 6), - CLIP_ZPOS = (1 << 7), - CLIP_ZNEG = (1 << 8), - GRID_BACK = (1 << 9), - GRID_CAMERA = (1 << 10), - PLANE_IMAGE = (1 << 11), - CUSTOM_GRID = (1 << 12), + SHOW_AXIS_X = (1u << 0u), + SHOW_AXIS_Y = (1u << 1u), + SHOW_AXIS_Z = (1u << 2u), + SHOW_GRID = (1u << 3u), + PLANE_XY = (1u << 4u), + PLANE_XZ = (1u << 5u), + PLANE_YZ = (1u << 6u), + CLIP_ZPOS = (1u << 7u), + CLIP_ZNEG = (1u << 8u), + GRID_BACK = (1u << 9u), + GRID_CAMERA = (1u << 10u), + PLANE_IMAGE = (1u << 11u), + CUSTOM_GRID = (1u << 12u), }; /* Match: #SI_GRID_STEPS_LEN */ diff --git a/source/blender/draw/intern/shaders/common_gpencil_lib.glsl b/source/blender/draw/intern/shaders/common_gpencil_lib.glsl index e58cfaae40d..123c493b572 100644 --- a/source/blender/draw/intern/shaders/common_gpencil_lib.glsl +++ b/source/blender/draw/intern/shaders/common_gpencil_lib.glsl @@ -393,7 +393,7 @@ vec4 gpencil_vertex(ivec4 ma, col2, fcol1, viewport_size, - 0, + 0u, vec2(1.0, 0.0), out_P, out_N, diff --git a/source/blender/draw/intern/shaders/common_math_lib.glsl b/source/blender/draw/intern/shaders/common_math_lib.glsl index 1ac26c91b93..51f3c890df8 100644 --- a/source/blender/draw/intern/shaders/common_math_lib.glsl +++ b/source/blender/draw/intern/shaders/common_math_lib.glsl @@ -110,6 +110,7 @@ float len_squared(vec3 a) { return dot(a, a); } float len_squared(vec2 a) { return dot(a, a); } bool flag_test(uint flag, uint val) { return (flag & val) != 0u; } +bool flag_test(int flag, uint val) { return flag_test(uint(flag), val); } bool flag_test(int flag, int val) { return (flag & val) != 0; } void set_flag_from_test(inout uint value, bool test, uint flag) { if (test) { value |= flag; } else { value &= ~flag; } } |