From c2a35ae70d27daebc6d10b2ab82f24a3f01d1690 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Mon, 17 Feb 2025 14:57:15 +0800 Subject: [PATCH] glsl: allow shared variables in task and mesh shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Ian Romanick Acked-by: Marek Olšák Part-of: --- src/compiler/glsl/ast_to_hir.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index e68a3f607eb..1cede91886d 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -4400,10 +4400,11 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, "`out' or `varying' variables between shader stages"); } - if (qual->flags.q.shared_storage && state->stage != MESA_SHADER_COMPUTE) { + if (qual->flags.q.shared_storage && state->stage != MESA_SHADER_COMPUTE && + state->stage != MESA_SHADER_TASK && state->stage != MESA_SHADER_MESH) { _mesa_glsl_error(loc, state, "the shared storage qualifiers can only be used with " - "compute shaders"); + "compute, task, or mesh shaders"); } if (qual->flags.q.task_payload && state->stage != MESA_SHADER_TASK &&