From bda2be34233503c81e8069e8a97dd770c2e69741 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 4 Jun 2025 21:39:31 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Reject programs with group shared variables. Currently the modifier is ignored and the program is miscompiled. --- libs/vkd3d-shader/hlsl.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 5aee1e701..bad9d3309 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2559,6 +2559,9 @@ static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v) hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER, "Variable '%s' is declared as both \"uniform\" and \"static\".", var->name); + if (modifiers & HLSL_STORAGE_GROUPSHARED) + hlsl_fixme(ctx, &var->loc, "Group shared variables."); + /* Mark it as uniform. We need to do this here since synthetic * variables also get put in the global scope, but shouldn't be * considered uniforms, and we have no way of telling otherwise. */