[Bf-blender-cvs] [7d784749415] master: AMD glitch: missing changes in f41ab375f38b
mano-wii
noreply at git.blender.org
Thu Apr 18 15:54:11 CEST 2019
Commit: 7d78474941523705fa6cb4305f6ac30bce6bd1ce
Author: mano-wii
Date: Thu Apr 18 10:53:00 2019 -0300
Branches: master
https://developer.blender.org/rB7d78474941523705fa6cb4305f6ac30bce6bd1ce
AMD glitch: missing changes in f41ab375f38b
It was committed an earlier version of the patch which missed these changes.
Differential Revision: https://developer.blender.org/D4700
===================================================================
M source/blender/draw/modes/shaders/edit_mesh_overlay_geom.glsl
===================================================================
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom.glsl
index 7b1001b7449..047bd1dccc6 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom.glsl
@@ -13,9 +13,9 @@ flat out vec4 finalColorOuter_f;
out vec4 finalColor_f;
noperspective out float edgeCoord_f;
-void do_vertex(const int i, vec4 pos, float coord, vec2 offset)
+void do_vertex(vec4 color, vec4 pos, float coord, vec2 offset)
{
- finalColor_f = (selectOveride[0] == 0) ? finalColor[i] : finalColor[0];
+ finalColor_f = color;
edgeCoord_f = coord;
gl_Position = pos;
/* Multiply offset by 2 because gl_Position range is [-1..1]. */
@@ -73,16 +73,19 @@ void main()
edge_ofs = (horizontal) ? edge_ofs.zyz : edge_ofs.xzz;
#ifdef USE_WORLD_CLIP_PLANES
+ /* Due to an AMD glitch, this line was moved out of the `do_vertex`
+ * function (see T62792). */
world_clip_planes_set_clip_distance(gl_in[0].gl_ClipDistance);
#endif
- do_vertex(0, pos0, half_size, edge_ofs.xy);
- do_vertex(0, pos0, -half_size, -edge_ofs.xy);
+ do_vertex(finalColor[0], pos0, half_size, edge_ofs.xy);
+ do_vertex(finalColor[0], pos0, -half_size, -edge_ofs.xy);
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_set_clip_distance(gl_in[1].gl_ClipDistance);
#endif
- do_vertex(1, pos1, half_size, edge_ofs.xy);
- do_vertex(1, pos1, -half_size, -edge_ofs.xy);
+ vec4 final_color = (selectOveride[0] == 0) ? finalColor[1] : finalColor[0];
+ do_vertex(final_color, pos1, half_size, edge_ofs.xy);
+ do_vertex(final_color, pos1, -half_size, -edge_ofs.xy);
EndPrimitive();
}
More information about the Bf-blender-cvs
mailing list