mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 03:16:05 +00:00

HLSL has a language feature called Semantics which get attached to declarations like attributes and are used in a variety of ways. One example of semantic use is here with the `SV_GroupIndex` semantic which, when applied to an input for a compute shader is pre-populated by the driver with a flattened thread index. Differential Revision: https://reviews.llvm.org/D122699 # Conflicts: # clang/include/clang/Basic/Attr.td # clang/include/clang/Basic/AttrDocs.td
8 lines
280 B
HLSL
8 lines
280 B
HLSL
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s -verify
|
|
|
|
// expected-error@+1 {{expected HLSL Semantic identifier}}
|
|
void Entry(int GI : ) { }
|
|
|
|
// expected-error@+1 {{unknown HLSL semantic 'SV_IWantAPony'}}
|
|
void Pony(int GI : SV_IWantAPony) { }
|