blob: ee9c68ed87109bcbe5107fa61335177197b79005 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 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:CROSS_COMPILE:-target spirv-assembly -entry main -stage fragment
struct S
{
float4 v;
}
[[vk::push_constant]]
ConstantBuffer<S> x;
ParameterBlock<S> y;
float4 main() : SV_Target
{
return x.v + y.v;
}
|