From aa28f26e1d9d42e9d1d99b70463d9c0e0a114a32 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:14:03 -0700 Subject: Support an Upper-case variant of [NumThreads] and [Shader] (#4780) Closes #4746. This commit adds a support for "NumThreads" and "Shader" attribute keyword, which is in CamelCasing starting with an upper case letter. The attribute keywords in HLSL are case-insensitive. As an example, one of D3D documents says, "The attribute name "Shader" is case insensitive." https://microsoft.github.io/DirectX-Specs/d3d/WorkGraphs.html Slang, however, doesn't support the case-insensitivity. They should be all lower-case or CamelCasing starting with an upper case. --- tests/compute/frem.slang | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/compute/frem.slang b/tests/compute/frem.slang index 893f29794..fd4c0ec02 100644 --- a/tests/compute/frem.slang +++ b/tests/compute/frem.slang @@ -19,7 +19,8 @@ int test(int inVal) //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer outputBuffer; -[numthreads(4, 1, 1)] +[Shader("compute")] +[NumThreads(4, 1, 1)] void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) { int tid = dispatchThreadID.x; -- cgit v1.2.3