summaryrefslogtreecommitdiffstats
path: root/tests/reflection
diff options
context:
space:
mode:
authorDavid A Roberts <d@vidr.cc>2025-02-19 18:04:03 +1000
committerGitHub <noreply@github.com>2025-02-19 00:04:03 -0800
commit7315b33cf8dbf7759b05ff47612478b71238fa19 (patch)
tree1bda5df82197c6f49bf2f9f8950fbac498e27d1f /tests/reflection
parente9a63b2b3822bbc533130ead0ab8ee03b4a4250a (diff)
Add userAttribs to entryPoints in reflection JSON (#6366)
Diffstat (limited to 'tests/reflection')
-rw-r--r--tests/reflection/attribute.slang2
-rw-r--r--tests/reflection/attribute.slang.expected10
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/reflection/attribute.slang b/tests/reflection/attribute.slang
index e0739643c..0157f67d0 100644
--- a/tests/reflection/attribute.slang
+++ b/tests/reflection/attribute.slang
@@ -5,6 +5,7 @@
//TEST:REFLECTION:-stage compute -entry main -target hlsl -no-codegen
[__AttributeUsage(_AttributeTargets.Struct)]
+[__AttributeUsage(_AttributeTargets.Function)]
struct MyStructAttribute
{
int iParam;
@@ -58,6 +59,7 @@ D param3;
[StructVarParam(1)] int globalInt2;
+[MyStruct(2, 3.0)]
[numthreads(1, 1, 1)]
void main(
uint3 dispatchThreadID : SV_DispatchThreadID,
diff --git a/tests/reflection/attribute.slang.expected b/tests/reflection/attribute.slang.expected
index ee48b466c..978d43d43 100644
--- a/tests/reflection/attribute.slang.expected
+++ b/tests/reflection/attribute.slang.expected
@@ -310,7 +310,15 @@ standard output = {
}
}
],
- "threadGroupSize": [1, 1, 1]
+ "threadGroupSize": [1, 1, 1],
+ "userAttribs": [{
+ "name": "MyStruct",
+ "arguments": [
+ 2,
+ 3.000000
+ ]
+ }
+ ]
}
]
}