diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-02-18 17:30:22 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-02-18 17:35:17 +0300 |
commit | c94b3b19a2c07ce2617bf4998a1634f020660e4d (patch) | |
tree | 1bb557ed0247cc49381486c0f7249f6063f4ad9b /source/blender/gpu | |
parent | abb147e60942ddb556f0c60a5f52b78f94e71a6d (diff) |
Fix T61373: Crash when selecting the edit mode
Some GPUs complain about `error C7011: implicit cast from "int" to "uint"` even if the cast is explicit.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl | 8 | ||||
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl index aa544ea82ee..b2d186efa91 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_selection_id_vert.glsl @@ -14,10 +14,10 @@ void main() { #ifndef UNIFORM_ID id = vec4( - (((color + offset) ) & uint(0xFF)) * (1.0f / 255.0f), - (((color + offset) >> 8) & uint(0xFF)) * (1.0f / 255.0f), - (((color + offset) >> 16) & uint(0xFF)) * (1.0f / 255.0f), - (((color + offset) >> 24) ) * (1.0f / 255.0f)); + (((color + offset) ) & 0xFFu) * (1.0f / 255.0f), + (((color + offset) >> 8u) & 0xFFu) * (1.0f / 255.0f), + (((color + offset) >> 16u) & 0xFFu) * (1.0f / 255.0f), + (((color + offset) >> 24u) ) * (1.0f / 255.0f)); #endif vec4 pos_4d = vec4(pos, 1.0); diff --git a/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl b/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl index 29fe9e9d8c7..a38113fad87 100644 --- a/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_selection_id_frag.glsl @@ -11,10 +11,10 @@ void main() { #ifdef UNIFORM_ID fragColor = vec4( - ((id ) & uint(0xFF)) * (1.0f / 255.0f), - ((id >> 8) & uint(0xFF)) * (1.0f / 255.0f), - ((id >> 16) & uint(0xFF)) * (1.0f / 255.0f), - ((id >> 24) ) * (1.0f / 255.0f)); + ((id ) & 0xFFu) * (1.0f / 255.0f), + ((id >> 8u) & 0xFFu) * (1.0f / 255.0f), + ((id >> 16u) & 0xFFu) * (1.0f / 255.0f), + ((id >> 24u) ) * (1.0f / 255.0f)); #else fragColor = id; #endif |