blob: 362db59ecd119b4741f4fab820f322f9fdde1ae8 (
plain)
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
|
// vk-push-constant.slang
// Test to confirm that a `[[vk::push_constant]]` buffer
// doesn't end up reserving `space=0` for global scope
// parameters and shifting a parameer block over to
// `space=1`.
//TEST:SIMPLE(filecheck=CHECK):-target spirv-assembly -entry main -stage fragment
struct S
{
float4 v;
}
[[vk::push_constant]]
ConstantBuffer<S> x;
// CHECK: OpDecorate %y Binding 0
// CHECK: OpDecorate %y DescriptorSet 0
ParameterBlock<S> y;
float4 main() : SV_Target
{
return x.v + y.v;
}
|