summaryrefslogtreecommitdiffstats
path: root/tests/reflection/attribute.slang
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-05-02 09:22:44 -0700
committerGitHub <noreply@github.com>2024-05-02 09:22:44 -0700
commitd53d793db6f4d82358ada700e1bd98b497384cdc (patch)
tree0a04dd7288a7eada43cf3c07753048ba9f406e10 /tests/reflection/attribute.slang
parentb490414975d9336d112f681a986d116ab8616303 (diff)
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.
Diffstat (limited to 'tests/reflection/attribute.slang')
-rw-r--r--tests/reflection/attribute.slang13
1 files changed, 11 insertions, 2 deletions
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<A> param;
ParameterBlock<B> 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
+}