1 # Really simple XFB test
10 ; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
13 ; Generator: Khronos Glslang Reference Front End; 7
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
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
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
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
51 OpStore %xfb_out %float_1_23099995
58 layout(location = 0) out vec4 color;
59 layout(location = 1, xfb_buffer=0, xfb_offset = 0) out float xfb_out;
62 color = vec4(0.0, 1.0, 0.0, 1.0);
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