AMD glitch: missing changes in f41ab375f3
It was committed an earlier version of the patch which missed these changes. Differential Revision: https://developer.blender.org/D4700
This commit is contained in:
parent
4c11e57316
commit
7d78474941
Notes:
blender-bot
2023-02-14 02:58:25 +01:00
Referenced by issue #63698, Selecting Materials after creating a new file throws EXCEPTION_ACCESS_VIOLATION
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue