forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgh-4700.slang
27 lines (24 loc) · 879 Bytes
/
gh-4700.slang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//TEST:SIMPLE(filecheck=PASS): -entry computeMain -stage compute -target spirv -DPASS1
//TEST:SIMPLE(filecheck=WARN): -entry computeMain -stage compute -target spirv -DWARN1
//TEST:SIMPLE(filecheck=WARN): -entry computeMain -stage compute -target spirv -DWARN2
//PASS-NOT: 31104
#ifdef PASS
[[vk_binding(0,0)]] uniform ConstantBuffer<uint> addresses;
layout(location = 1) uniform ConstantBuffer<uint> addresses1;
#endif
//WARN: 31104
#ifdef WARN1
[[vk_binding(0,0)]] uniform uint addresses;
[[vk_binding(1,0)]] uniform uint addresses1;
#endif
#ifdef WARN2
layout(location = 0) uniform uint addresses;
layout(location = 1) uniform uint addresses1;
#endif
[shader("compute")]
[numthreads(1, 1, 1)]
void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID, uint groupIndex: SV_GroupIndex)
{
printf("\nfrom gpu: %u", addresses);
printf("\nfrom gpu: %u", addresses1);
}