diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-08-06 10:14:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-06 10:14:03 -0700 |
| commit | aa28f26e1d9d42e9d1d99b70463d9c0e0a114a32 (patch) | |
| tree | 15c548570fa986724a1855cbf542a9d4f9aa794f /source | |
| parent | d72f9f6f72a7a74d7466a1e301e1853fea5daa25 (diff) | |
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.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/core.meta.slang | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang index 7d4f303ef..2dae7b3c4 100644 --- a/source/slang/core.meta.slang +++ b/source/slang/core.meta.slang @@ -2590,6 +2590,9 @@ attribute_syntax [call] : CallAttribute; __attributeTarget(FuncDecl) attribute_syntax [shader(stage)] : EntryPointAttribute; +__attributeTarget(FuncDecl) +attribute_syntax [Shader(stage)] : EntryPointAttribute; + // Hull Shader __attributeTarget(FuncDecl) attribute_syntax [maxtessfactor(factor: float)] : MaxTessFactorAttribute; @@ -2626,6 +2629,9 @@ __attributeTarget(FuncDecl) attribute_syntax [numthreads(x: int, y: int = 1, z: int = 1)] : NumThreadsAttribute; __attributeTarget(FuncDecl) +attribute_syntax [NumThreads(x: int, y: int = 1, z: int = 1)] : NumThreadsAttribute; + +__attributeTarget(FuncDecl) attribute_syntax [WaveSize(numLanes: int)] : WaveSizeAttribute; // |
