DRW: Fix crash on startup for old Nvidia drivers
This should fix T57296 once and for all.
This commit is contained in:
parent
59054d5eba
commit
a20c590966
Notes:
blender-bot
2023-02-14 05:10:38 +01:00
Referenced by issue #57296, Blender 2.8 crash on startup on Linux
|
@ -63,8 +63,7 @@ void main()
|
|||
|
||||
int v_0 = (gl_VertexID / 3) * 3;
|
||||
int vidx = gl_VertexID % 3;
|
||||
barycentric = vec3(0.0);
|
||||
barycentric[vidx] = 1.0;
|
||||
barycentric = vec3(equal(ivec3(0, 1, 2), ivec3(vidx)));
|
||||
|
||||
/* Edge */
|
||||
ivec4 vData[3], data = ivec4(0);
|
||||
|
|
|
@ -139,9 +139,9 @@ void main()
|
|||
pos[v_n] = get_vertex_pos(v_id[v_n]);
|
||||
gl_Position = p_pos[v_n] = ModelViewProjectionMatrix * vec4(pos[v_n], 1.0);
|
||||
|
||||
barycentric[v_n] = do_edge[v_n] ? 0.0 : 1.0;
|
||||
barycentric[v_n1] = 1.0;
|
||||
barycentric[v_n2] = do_edge[v_n2] ? 0.0 : 1.0;
|
||||
bvec3 bary = equal(ivec3(0, 1, 2), ivec3(v_n1));
|
||||
/* This is equivalent to component wise : (do_edge ? bary : 1.0) */
|
||||
barycentric = vec3(lessThanEqual(ivec3(do_edge), ivec3(bary)));
|
||||
|
||||
# ifndef LIGHT_EDGES
|
||||
vec3 nor = get_vertex_nor(v_id[v_n]);
|
||||
|
|
Loading…
Reference in New Issue