From 387deedac3b61dd133fb529dc941483bc021f386 Mon Sep 17 00:00:00 2001 From: Devon Date: Mon, 14 Apr 2025 13:09:04 -0600 Subject: Fix User Attribute string reflection (#6799) * Fix User Attribute string reflection Fixes #6794 * Fix strings not being properly escaped --------- Co-authored-by: Darren Wihandi <65404740+fairywreath@users.noreply.github.com> Co-authored-by: Yong He --- tests/reflection/attribute.slang | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/reflection/attribute.slang') diff --git a/tests/reflection/attribute.slang b/tests/reflection/attribute.slang index 0157f67d0..8d755648a 100644 --- a/tests/reflection/attribute.slang +++ b/tests/reflection/attribute.slang @@ -10,6 +10,7 @@ struct MyStructAttribute { int iParam; float fParam; + string sParam; }; [__AttributeUsage(_AttributeTargets.Var)] @@ -19,7 +20,7 @@ struct DefaultValueAttribute int iParam; }; -[MyStruct(0, 1.0)] +[MyStruct(0, 1.0, "A")] struct A { float x; @@ -27,7 +28,7 @@ struct A float y; }; -[MyStruct(0, 2.0)] +[MyStruct(0, 2.0, "\"")] struct B { float x; @@ -59,7 +60,8 @@ D param3; [StructVarParam(1)] int globalInt2; -[MyStruct(2, 3.0)] +[MyStruct(2, 3.0, "main")] +[MyStruct(-2, -3.0, "")] [numthreads(1, 1, 1)] void main( uint3 dispatchThreadID : SV_DispatchThreadID, -- cgit v1.2.3