vkd3d-shader/hlsl: Allow uninitialized static objects.

validate_static_object_references() validates that uninitialized static
objects are not referenced in the shader.

In case a static variable contains both numeric and object types, the
"Static variables cannot have both numeric and resource components."
error should preempt uninitialized numeric values to reach further
compilation steps.
This commit is contained in:
Francisco Casas
2022-12-05 15:13:57 -03:00
committed by Alexandre Julliard
parent 17d6a4411e
commit aab9886021
Notes: Alexandre Julliard 2023-01-19 22:45:10 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/54
2 changed files with 7 additions and 8 deletions

View File

@@ -2184,7 +2184,6 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
if (type_has_object_components(var->data_type, false))
{
hlsl_fixme(ctx, &var->loc, "Uninitialized static objects.");
vkd3d_free(v);
continue;
}