blob: 0b8e4896f57063a1ee9b51db9f89c2f7ea9e24cd (
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
27
28
29
30
31
32
|
//TEST:SIMPLE(filecheck=CHECK_GLSL): -target glsl -stage fragment -entry main -allow-glsl
//TEST:SIMPLE(filecheck=CHECK_SPV): -target spirv -emit-spirv-directly -stage fragment -entry main -allow-glsl
//TEST:SIMPLE(filecheck=CHECK_HLSL): -target hlsl -stage fragment -entry main -allow-glsl
// CHECK_SPV-DAG: OpEntryPoint
// CHECK_SPV-DAG: InputAttachmentIndex 3
// CHECK_SPV-DAG: InputAttachmentIndex
// CHECK_GLSL-DAG: void main()
// CHECK_GLSL-DAG: input_attachment_index = 3
// CHECK_GLSL-DAG: input_attachment_index
// CHECK_HLSL-DAG: main()
// CHECK_HLSL-DAG: [vk::input_attachment_index(3)]
// CHECK_HLSL-DAG: vk::input_attachment_index
[[vk::input_attachment_index(3)]] SubpassInput subpassHLSL1;
SubpassInput subpassHLSL2;
RWTexture2D<float4> t;
layout (location = 0) out vec4 outColor;
void main() {
// CHECK_SPV-COUNT-2: OpImageRead
// CHECK_GLSL-COUNT-2: subpassLoad
// CHECK_HLSL-COUNT-2: SubpassLoad
outColor = vec4(true
&& subpassHLSL1.SubpassLoad() == vec4(1)
&& subpassHLSL2.SubpassLoad() == vec4(1)
&& t.Load(int2(0,0)) != float4(0,0,0,0)
);
}
|