Debian Codegraph @

clang/test/AST/HLSL/vk.pushconstant.hlsl

raw
1 // RUN: %clang_cc1 -triple spirv-unknown-vulkan1.3-compute -x hlsl -ast-dump -o - %s | FileCheck %s --check-prefix=CHECK-VK
2 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-compute -x hlsl -ast-dump -o - %s | FileCheck %s --check-prefix=CHECK-DX
3
4 struct S {
5 int value;
6 };
7
8 [[vk::push_constant]] S PC;
9 // CHECK-VK: VarDecl 0x[[A:[0-9a-f]+]] <line:8:23, col:25> col:25 PC 'hlsl_push_constant S'
10 // CHECK-VK-NEXT: HLSLVkPushConstantAttr 0x[[A:[0-9a-f]+]] <col:3, col:7>
11
12 // CHECK-DX: VarDecl 0x[[A:[0-9a-f]+]] <line:8:23, col:25> col:25 PC 'hlsl_constant S'
13 // CHECK-DX-NEXT: HLSLVkPushConstantAttr 0x[[A:[0-9a-f]+]] <col:3, col:7>
14
15 [numthreads(1, 1, 1)]
16 void main() { }