mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
glsl: handle explicit location for mesh shader
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36405>
This commit is contained in:
parent
bd365d1d2a
commit
2b76809dfc
1 changed files with 5 additions and 2 deletions
|
|
@ -3402,6 +3402,7 @@ apply_explicit_location(const struct ast_type_qualifier *qual,
|
|||
case MESA_SHADER_TESS_CTRL:
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
case MESA_SHADER_MESH:
|
||||
if (var->data.mode == ir_var_shader_in || var->data.mode == ir_var_shader_out) {
|
||||
if (!state->check_separate_shader_objects_allowed(loc, var))
|
||||
return;
|
||||
|
|
@ -3430,10 +3431,11 @@ apply_explicit_location(const struct ast_type_qualifier *qual,
|
|||
fail = true;
|
||||
break;
|
||||
|
||||
case MESA_SHADER_TASK:
|
||||
case MESA_SHADER_COMPUTE:
|
||||
_mesa_glsl_error(loc, state,
|
||||
"compute shader variables cannot be given "
|
||||
"explicit locations");
|
||||
"%s shader variables cannot be given explicit locations",
|
||||
_mesa_shader_stage_to_string(state->stage));
|
||||
return;
|
||||
default:
|
||||
fail = true;
|
||||
|
|
@ -3458,6 +3460,7 @@ apply_explicit_location(const struct ast_type_qualifier *qual,
|
|||
case MESA_SHADER_TESS_CTRL:
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
case MESA_SHADER_MESH:
|
||||
if (var->data.patch)
|
||||
var->data.location = qual_location + VARYING_SLOT_PATCH0;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue