3 GL_ARB_uniform_buffer_object
6 #extension GL_ARB_uniform_buffer_object: require
7 #extension GL_ARB_shader_bit_encoding: enable
8 #extension GL_ARB_gpu_shader5: enable
21 layout(std140, row_major)
23 // base base align padded row- array matrix
24 // align off. off. size major stride stride
25 S1 s1; // 16 0 0 128 - - -
26 // S2[1] s2 16 0 0 112 - 112 -
28 // mat2x3 m23 16 0 0 48 yes - 16
29 // mat2x4 m24 16 48 48 64 yes - 16
30 // int i1 4 112 112 4 - - -
33 flat out int vertex_pass;
34 in vec4 piglit_vertex;
36 #if defined(GL_ARB_shader_bit_encoding) || defined(GL_ARB_gpu_shader5) || __VERSION__ >= 430
37 bool float_match(float u, float f, uint bits) { return floatBitsToUint(u) == bits; }
39 bool float_match(float u, float f, uint bits) { return u == f; }
44 /* std140 (or shared) layout prevents any fields or blocks from being
45 * eliminated. Section 2.11.6 of the OpenGL ES 3.0 spec makes this
46 * explicit, but desktop GL specs only imply it.
53 vertex_pass = int(pass);
54 gl_Position = piglit_vertex;
58 precision highp float;
60 out vec4 piglit_fragcolor;
61 flat in int vertex_pass;
65 piglit_fragcolor = bool(vertex_pass) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
71 active uniform s1.i1 GL_UNIFORM_TYPE GL_INT
72 active uniform s1.i1 GL_UNIFORM_SIZE 1
73 active uniform s1.i1 GL_UNIFORM_OFFSET 112
74 active uniform s1.i1 GL_UNIFORM_ARRAY_STRIDE 0
75 active uniform s1.i1 GL_UNIFORM_MATRIX_STRIDE 0
76 active uniform s1.i1 GL_UNIFORM_IS_ROW_MAJOR 0
81 probe all rgba 0.0 1.0 0.0 1.0