Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhoi Dau <khoidauminh>2022-07-12 17:30:41 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-07-12 17:34:41 +0300
commit93253d5dcc2938903ae4de3a23fcdb724d202d44 (patch)
tree992d92f5a3193f2e8f84bbbe72c9e65f32207052
parentd58072caf4abb254d5e5f0e3b9de9bef775f287a (diff)
Fix T99103: crash when displaying or rendering Grease Pencil object
On some hardware/systems, blender may crash when adding, rendering or displaying Grease Pencil objects. In `/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl`, line 35: ``` gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag); ``` `gpMaterialFlag` is of type `uint`. This is a mismatched-type assignment that can cause crashes on some hardware/systems with GLSL that do not support implicit type casting. So use `floatBitsToUint` for type conversion. Differential Revision: https://developer.blender.org/D15433
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl
index 5f5419bac47..b0ee059cb9d 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl
@@ -32,7 +32,7 @@ void main()
vec3 vert_N;
gpMaterial gp_mat = materials[ma1.x + gpMaterialOffset];
- gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag);
+ gpMaterialFlag gp_flag = floatBitsToUint(gp_mat._flag);
gl_Position = gpencil_vertex(ma,
ma1,