mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
Not all objects can be unbounded descriptors.
This commit is contained in:
parent
083a58767a
commit
ce50c3a186
Notes:
Alexandre Julliard
2024-04-09 15:45:34 -05:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/757
@ -956,7 +956,7 @@ static bool gen_struct_fields(struct hlsl_ctx *ctx, struct parse_fields *fields,
|
||||
|
||||
field->type = type;
|
||||
|
||||
if (hlsl_version_ge(ctx, 5, 1) && type->class == HLSL_CLASS_OBJECT)
|
||||
if (hlsl_version_ge(ctx, 5, 1) && hlsl_type_is_resource(type))
|
||||
{
|
||||
for (k = 0; k < v->arrays.count; ++k)
|
||||
unbounded_res_array |= (v->arrays.sizes[k] == HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT);
|
||||
@ -2162,7 +2162,7 @@ static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v)
|
||||
|
||||
type = basic_type;
|
||||
|
||||
if (hlsl_version_ge(ctx, 5, 1) && type->class == HLSL_CLASS_OBJECT)
|
||||
if (hlsl_version_ge(ctx, 5, 1) && hlsl_type_is_resource(type))
|
||||
{
|
||||
for (i = 0; i < v->arrays.count; ++i)
|
||||
unbounded_res_array |= (v->arrays.sizes[i] == HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT);
|
||||
|
@ -18,6 +18,6 @@ float4 main() : sv_target {return 0;}
|
||||
float f[];
|
||||
float4 main() : sv_target {return 0;}
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
STRING s[];
|
||||
float4 main() : sv_target {return 0;}
|
||||
|
Loading…
Reference in New Issue
Block a user