wined3d: Handle compute shader registers in GLSL backend.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5061abe437
commit
dc56f7b17a
|
@ -2840,6 +2840,22 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
|
|||
sprintf(register_name, "X%u[%u]", reg->idx[0].offset, reg->idx[1].offset);
|
||||
break;
|
||||
|
||||
case WINED3DSPR_LOCALTHREADINDEX:
|
||||
sprintf(register_name, "int(gl_LocalInvocationIndex)");
|
||||
break;
|
||||
|
||||
case WINED3DSPR_THREADID:
|
||||
sprintf(register_name, "ivec3(gl_GlobalInvocationID)");
|
||||
break;
|
||||
|
||||
case WINED3DSPR_THREADGROUPID:
|
||||
sprintf(register_name, "ivec3(gl_WorkGroupID)");
|
||||
break;
|
||||
|
||||
case WINED3DSPR_LOCALTHREADID:
|
||||
sprintf(register_name, "ivec3(gl_LocalInvocationID)");
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME("Unhandled register type %#x.\n", reg->type);
|
||||
sprintf(register_name, "unrecognized_register");
|
||||
|
@ -2928,7 +2944,12 @@ static void shader_glsl_add_src_param_ext(const struct wined3d_shader_instructio
|
|||
shader_glsl_get_register_name(&wined3d_src->reg, glsl_src->reg_name, &is_color, ins);
|
||||
shader_glsl_get_swizzle(wined3d_src, is_color, mask, swizzle_str);
|
||||
|
||||
if (wined3d_src->reg.type == WINED3DSPR_IMMCONST || wined3d_src->reg.type == WINED3DSPR_PRIMID)
|
||||
if (wined3d_src->reg.type == WINED3DSPR_IMMCONST
|
||||
|| wined3d_src->reg.type == WINED3DSPR_PRIMID
|
||||
|| wined3d_src->reg.type == WINED3DSPR_LOCALTHREADINDEX
|
||||
|| wined3d_src->reg.type == WINED3DSPR_THREADID
|
||||
|| wined3d_src->reg.type == WINED3DSPR_THREADGROUPID
|
||||
|| wined3d_src->reg.type == WINED3DSPR_LOCALTHREADID)
|
||||
{
|
||||
shader_glsl_gen_modifier(wined3d_src->modifiers, glsl_src->reg_name, swizzle_str, glsl_src->param_str);
|
||||
}
|
||||
|
|
|
@ -3596,6 +3596,7 @@ static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
|
|||
case WINED3DSPR_LOOP: /* aL */
|
||||
case WINED3DSPR_PREDICATE: /* p0 */
|
||||
case WINED3DSPR_PRIMID: /* primID */
|
||||
case WINED3DSPR_LOCALTHREADINDEX: /* vThreadIDInGroupFlattened */
|
||||
return TRUE;
|
||||
|
||||
case WINED3DSPR_MISCTYPE:
|
||||
|
|
Loading…
Reference in New Issue