perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / arb_gl_spirv / execution / xfb / vs_simple.shader_test
blob5b0c661815386bc143c7e52fb3d2677095023ec6
1 # Really simple XFB test
3 [require]
4 SPIRV YES
5 GL >= 3.3
6 GLSL >= 4.50
7 GL_ARB_gl_spirv
9 [vertex shader spirv]
10 ; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
11 ; SPIR-V
12 ; Version: 1.0
13 ; Generator: Khronos Glslang Reference Front End; 7
14 ; Bound: 20
15 ; Schema: 0
16                OpCapability Shader
17                OpCapability TransformFeedback
18           %1 = OpExtInstImport "GLSL.std.450"
19                OpMemoryModel Logical GLSL450
20                OpEntryPoint Vertex %main "main" %color %xfb_out %gl_VertexID %gl_InstanceID
21                OpExecutionMode %main Xfb
22                OpSource GLSL 450
23                OpDecorate %color Location 0
24                OpDecorate %color XfbBuffer 0
25                OpDecorate %color XfbStride 4
26                OpDecorate %xfb_out Location 1
27                OpDecorate %xfb_out XfbBuffer 0
28                OpDecorate %xfb_out XfbStride 4
29                OpDecorate %xfb_out Offset 0
30                OpDecorate %gl_VertexID BuiltIn VertexId
31                OpDecorate %gl_InstanceID BuiltIn InstanceId
32        %void = OpTypeVoid
33           %3 = OpTypeFunction %void
34       %float = OpTypeFloat 32
35     %v4float = OpTypeVector %float 4
36 %_ptr_Output_v4float = OpTypePointer Output %v4float
37       %color = OpVariable %_ptr_Output_v4float Output
38     %float_0 = OpConstant %float 0
39     %float_1 = OpConstant %float 1
40          %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
41 %_ptr_Output_float = OpTypePointer Output %float
42     %xfb_out = OpVariable %_ptr_Output_float Output
43 %float_1_23099995 = OpConstant %float 1.23099995
44         %int = OpTypeInt 32 1
45 %_ptr_Input_int = OpTypePointer Input %int
46 %gl_VertexID = OpVariable %_ptr_Input_int Input
47 %gl_InstanceID = OpVariable %_ptr_Input_int Input
48        %main = OpFunction %void None %3
49           %5 = OpLabel
50                OpStore %color %12
51                OpStore %xfb_out %float_1_23099995
52                OpReturn
53                OpFunctionEnd
55 [vertex shader]
56 #version 450
58 layout(location = 0) out vec4 color;
59 layout(location = 1, xfb_buffer=0, xfb_offset = 0) out float xfb_out;
61 void main() {
62   color = vec4(0.0, 1.0, 0.0, 1.0);
63   xfb_out = 1.231;
66 [test]
68 xfb buffer object 0 4
70 xfb draw arrays GL_POINTS 0 1
72 verify query_object GL_PRIMITIVES_GENERATED 1
73 verify query_object GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 1
75 probe xfb buffer float 0 0 1.231
77 verify program_query GL_TRANSFORM_FEEDBACK_VARYINGS 1