vkd3d-shader/hlsl: Reject programs with group shared variables.

Currently the modifier is ignored and the program is miscompiled.
This commit is contained in:
Giovanni Mascellani
2025-06-04 21:39:31 +02:00
committed by Henri Verbeet
parent 0236308866
commit bda2be3423
Notes: Henri Verbeet 2025-06-05 16:18:20 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1533

View File

@@ -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, hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
"Variable '%s' is declared as both \"uniform\" and \"static\".", var->name); "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 /* Mark it as uniform. We need to do this here since synthetic
* variables also get put in the global scope, but shouldn't be * variables also get put in the global scope, but shouldn't be
* considered uniforms, and we have no way of telling otherwise. */ * considered uniforms, and we have no way of telling otherwise. */