mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Reject programs with group shared variables.
Currently the modifier is ignored and the program is miscompiled.
This commit is contained in:
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
@@ -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. */
|
||||||
|
Reference in New Issue
Block a user