From: Zebediah Figura zfigura@codeweavers.com
Not all objects can be unbounded descriptors. --- libs/vkd3d-shader/hlsl.y | 4 ++-- tests/hlsl/unbounded-array-5.1.shader_test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index af00c84d9..e6a4f13d4 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -961,7 +961,7 @@ static bool gen_struct_fields(struct hlsl_ctx *ctx, struct parse_fields *fields,
field->type = type;
- if (shader_is_sm_5_1(ctx) && type->class == HLSL_CLASS_OBJECT) + if (shader_is_sm_5_1(ctx) && 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); @@ -2167,7 +2167,7 @@ static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v)
type = basic_type;
- if (shader_is_sm_5_1(ctx) && type->class == HLSL_CLASS_OBJECT) + if (shader_is_sm_5_1(ctx) && 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); diff --git a/tests/hlsl/unbounded-array-5.1.shader_test b/tests/hlsl/unbounded-array-5.1.shader_test index 766da9649..6aaea80a0 100644 --- a/tests/hlsl/unbounded-array-5.1.shader_test +++ b/tests/hlsl/unbounded-array-5.1.shader_test @@ -33,6 +33,6 @@ float f[]; float4 main() : sv_target {return 0;}
-[pixel shader fail todo] +[pixel shader fail] STRING s[]; float4 main() : sv_target {return 0;}