summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/specialization-constants.slang
blob: 30f3a5f95ad137e94aeada9746c3346ec172568c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -target spirv

struct T { int x; int y; }

// CHECK: ([[# @LINE+1]]): error 31218
[vk::constant_id(1)]
const T st;

[vk::constant_id(1)]
// CHECK: ([[# @LINE+1]]): error 31219
static const int x = 2;

[push_constant]
[vk::constant_id(1)]
// CHECK: ([[# @LINE+1]]): error 31220
const int y;