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:
authormano-wii <germano.costa@ig.com.br>2019-04-18 16:53:00 +0300
committermano-wii <germano.costa@ig.com.br>2019-04-18 16:54:03 +0300
commit7d78474941523705fa6cb4305f6ac30bce6bd1ce (patch)
treeab40e134df0ab54b9a1a2c99176dd66f41f7b825 /source/blender/draw/modes
parent4c11e5731664c70c126a89b3fcc147004cc0b825 (diff)
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
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/shaders/edit_mesh_overlay_geom.glsl15
1 files changed, 9 insertions, 6 deletions
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();
}