From d53d793db6f4d82358ada700e1bd98b497384cdc Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Thu, 2 May 2024 09:22:44 -0700 Subject: Fix reflection-test issue (#4082) (#4084) The reflection test doesn't print the user attributes decorating for the variables, only types. Therefore, add the print for user attributes of variables. --- tests/reflection/attribute.slang | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests/reflection/attribute.slang') diff --git a/tests/reflection/attribute.slang b/tests/reflection/attribute.slang index 41179fcf5..864aa5896 100644 --- a/tests/reflection/attribute.slang +++ b/tests/reflection/attribute.slang @@ -16,6 +16,12 @@ struct DefaultValueAttribute int iParam; }; +[__AttributeUsage(_AttributeTargets.Param)] +struct DefaultFuncParamAttribute +{ + int iParam; +}; + [MyStruct(0, 1.0)] struct A { @@ -35,8 +41,11 @@ struct B ParameterBlock param; ParameterBlock param2; +[DefaultValue(2)] int globalInt; + [numthreads(1, 1, 1)] void main( - uint3 dispatchThreadID : SV_DispatchThreadID) + uint3 dispatchThreadID : SV_DispatchThreadID, + [DefaultFuncParam(3)] float a) { -} \ No newline at end of file +} -- cgit v1.2.3