Commit 4597ef66 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Avoid barrier() in tessellation control shader if possible.

Synchronization is only needed when output variables are read. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 114f9791
......@@ -7610,7 +7610,7 @@ static GLuint shader_glsl_generate_hull_shader(const struct wined3d_context *con
shader_addline(buffer, "void main()\n{\n");
shader_addline(buffer, "hs_control_point_phase();\n");
if (hs->phases.fork_count || hs->phases.join_count)
if (reg_maps->vocp)
shader_addline(buffer, "barrier();\n");
for (i = 0; i < hs->phases.fork_count; ++i)
shader_glsl_generate_shader_phase_invocation(buffer, &hs->phases.fork[i], "fork", i);
......
......@@ -801,6 +801,10 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w
reg_maps->rt_mask |= (1u << reg->idx[0].offset);
break;
case WINED3DSPR_OUTCONTROLPOINT:
reg_maps->vocp = 1;
break;
default:
TRACE("Not recording register of type %#x and [%#x][%#x].\n",
reg->type, reg->idx[0].offset, reg->idx[1].offset);
......
......@@ -1012,7 +1012,8 @@ struct wined3d_shader_reg_maps
WORD usescall : 1;
WORD usespow : 1;
WORD point_size : 1;
WORD padding : 2;
WORD vocp : 1;
WORD padding : 1;
DWORD rt_mask; /* Used render targets, 32 max. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment