perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / arb_gl_spirv / execution / xfb / vs_lines.shader_test
blobc2fb01be38634573c5f670c79315859f7f10d2a0
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: 23
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                OpName %main "main"
24                OpName %color "color"
25                OpName %xfb_out "xfb_out"
26                OpName %gl_VertexID "gl_VertexID"
27                OpName %gl_InstanceID "gl_InstanceID"
28                OpDecorate %color Location 0
29                OpDecorate %color XfbBuffer 0
30                OpDecorate %color XfbStride 4
31                OpDecorate %xfb_out Location 1
32                OpDecorate %xfb_out XfbBuffer 0
33                OpDecorate %xfb_out XfbStride 4
34                OpDecorate %xfb_out Offset 0
35                OpDecorate %gl_VertexID BuiltIn VertexId
36                OpDecorate %gl_InstanceID BuiltIn InstanceId
37        %void = OpTypeVoid
38           %3 = OpTypeFunction %void
39       %float = OpTypeFloat 32
40     %v4float = OpTypeVector %float 4
41 %_ptr_Output_v4float = OpTypePointer Output %v4float
42       %color = OpVariable %_ptr_Output_v4float Output
43     %float_0 = OpConstant %float 0
44     %float_1 = OpConstant %float 1
45          %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
46 %_ptr_Output_float = OpTypePointer Output %float
47     %xfb_out = OpVariable %_ptr_Output_float Output
48 %float_1_23099995 = OpConstant %float 1.23099995
49         %int = OpTypeInt 32 1
50 %_ptr_Input_int = OpTypePointer Input %int
51 %gl_VertexID = OpVariable %_ptr_Input_int Input
52 %gl_InstanceID = OpVariable %_ptr_Input_int Input
53        %main = OpFunction %void None %3
54           %5 = OpLabel
55                OpStore %color %12
56          %19 = OpLoad %int %gl_VertexID
57          %20 = OpConvertSToF %float %19
58          %21 = OpFAdd %float %float_1_23099995 %20
59                OpStore %xfb_out %21
60                OpReturn
61                OpFunctionEnd
63 [vertex shader]
64 #version 450
66 layout(location = 0) out vec4 color;
67 layout(location = 1, xfb_buffer=0, xfb_offset = 0) out float xfb_out;
69 void main() {
70   color = vec4(0.0, 1.0, 0.0, 1.0);
71   xfb_out = 1.231 + gl_VertexID;
74 [test]
76 xfb buffer object 0 8
78 xfb draw arrays GL_LINES 0 2
80 verify query_object GL_PRIMITIVES_GENERATED 1
81 verify query_object GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 1
83 probe xfb buffer float 0 0 1.231
84 probe xfb buffer float 0 1 2.231
86 verify program_query GL_TRANSFORM_FEEDBACK_VARYINGS 1