perf/pixel-rate: new pixel throughput microbenchmark
[piglit.git] / tests / spec / arb_gl_spirv / execution / xfb / vs_double.shader_test
blob484f5ba493f3748faeafec9c31fc1320ebe9d8e4
1 #XFB test using 64-bit floating types (double, dvecX).
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: 41
15 ; Schema: 0
16                OpCapability Shader
17                OpCapability Float64
18                OpCapability TransformFeedback
19           %1 = OpExtInstImport "GLSL.std.450"
20                OpMemoryModel Logical GLSL450
21                OpEntryPoint Vertex %main "main" %_ %x1_out %x2_out %x3_out %gl_VertexID %gl_InstanceID
22                OpExecutionMode %main Xfb
23                OpSource GLSL 450
24                OpSourceExtension "GL_ARB_enhanced_layouts"
25                OpName %_ ""
26                OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
27                OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
28                OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
29                OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
30                OpDecorate %gl_PerVertex Block
31                OpDecorate %_ XfbBuffer 0
32                OpDecorate %_ XfbStride 56
33                OpDecorate %x1_out Location 0
34                OpDecorate %x1_out XfbBuffer 0
35                OpDecorate %x1_out XfbStride 56
36                OpDecorate %x1_out Offset 0
37                OpDecorate %x2_out Location 1
38                OpDecorate %x2_out XfbBuffer 0
39                OpDecorate %x2_out XfbStride 56
40                OpDecorate %x2_out Offset 8
41                OpDecorate %x3_out Location 2
42                OpDecorate %x3_out XfbBuffer 0
43                OpDecorate %x3_out XfbStride 56
44                OpDecorate %x3_out Offset 24
45                OpDecorate %gl_VertexID BuiltIn VertexId
46                OpDecorate %gl_InstanceID BuiltIn InstanceId
47        %void = OpTypeVoid
48           %3 = OpTypeFunction %void
49       %float = OpTypeFloat 32
50     %v4float = OpTypeVector %float 4
51        %uint = OpTypeInt 32 0
52      %uint_1 = OpConstant %uint 1
53 %_arr_float_uint_1 = OpTypeArray %float %uint_1
54 %gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
55 %_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
56           %_ = OpVariable %_ptr_Output_gl_PerVertex Output
57         %int = OpTypeInt 32 1
58       %int_0 = OpConstant %int 0
59     %float_0 = OpConstant %float 0
60          %17 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
61 %_ptr_Output_v4float = OpTypePointer Output %v4float
62      %double = OpTypeFloat 64
63 %_ptr_Output_double = OpTypePointer Output %double
64      %x1_out = OpVariable %_ptr_Output_double Output
65    %double_1 = OpConstant %double 1
66    %v2double = OpTypeVector %double 2
67 %_ptr_Output_v2double = OpTypePointer Output %v2double
68      %x2_out = OpVariable %_ptr_Output_v2double Output
69    %double_2 = OpConstant %double 2
70    %double_3 = OpConstant %double 3
71          %29 = OpConstantComposite %v2double %double_2 %double_3
72    %v4double = OpTypeVector %double 4
73 %_ptr_Output_v4double = OpTypePointer Output %v4double
74      %x3_out = OpVariable %_ptr_Output_v4double Output
75    %double_4 = OpConstant %double 4
76    %double_5 = OpConstant %double 5
77    %double_6 = OpConstant %double 6
78    %double_7 = OpConstant %double 7
79          %37 = OpConstantComposite %v4double %double_4 %double_5 %double_6 %double_7
80 %_ptr_Input_int = OpTypePointer Input %int
81 %gl_VertexID = OpVariable %_ptr_Input_int Input
82 %gl_InstanceID = OpVariable %_ptr_Input_int Input
83        %main = OpFunction %void None %3
84           %5 = OpLabel
85          %19 = OpAccessChain %_ptr_Output_v4float %_ %int_0
86                OpStore %19 %17
87                OpStore %x1_out %double_1
88                OpStore %x2_out %29
89                OpStore %x3_out %37
90                OpReturn
91                OpFunctionEnd
93 [vertex shader]
94 #version 450
95 #extension GL_ARB_enhanced_layouts: require
97 layout(location = 0, xfb_offset = 0) out double x1_out;
98 layout(location = 1, xfb_offset = 8) out dvec2 x2_out;
99 layout(location = 2, xfb_offset = 24) out dvec4 x3_out;
101 void main() {
102         gl_Position = vec4(0.0);
103         x1_out = 1.0lf;
104         x2_out = dvec2(2.0lf, 3.0lf);
105         x3_out = dvec4(4.0lf, 5.0lf, 6.0lf, 7.0lf);
108 [test]
109 xfb buffer object 0 128
111 xfb draw arrays GL_POINTS 0 1
113 verify query_object GL_PRIMITIVES_GENERATED 1
114 verify query_object GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 1
116 probe xfb buffer double 0 0 1.0
117 probe xfb buffer double 0 1 2.0
118 probe xfb buffer double 0 2 3.0
119 probe xfb buffer double 0 3 4.0
120 probe xfb buffer double 0 4 5.0
121 probe xfb buffer double 0 5 6.0
123 verify program_query GL_TRANSFORM_FEEDBACK_VARYINGS 3