[require] GLSL >= 1.30 GL_ARB_shader_bit_encoding [vertex shader] #version 130 #extension GL_ARB_shader_bit_encoding : enable in vec4 piglit_vertex; out vec4 color; vec4 temps[12]; int addr0; void main() { temps[0] = vec4(0.2, 0 , 0 , 0); temps[1] = vec4(0 , 0.2, 0 , 0); temps[2] = vec4(0 , 0 , 0.2, 0); temps[3] = vec4(0.2, 0.2, 0 , 0); temps[4] = vec4(0 , 0.2, 0.2, 0); temps[5] = vec4(0.2, 0 , 0.2, 0); temps[6] = vec4(0 , 0 , 0 , 0); temps[7] = vec4(0.2, 0.2, 0.2, 0); temps[9] = vec4(0 , 0 , 0 , 0); temps[10] = vec4(0 , 0 , 0 , 0); int n = 0; while (n < 4) { addr0 = int(floatBitsToInt(temps[10].xxxx)); temps[9] += temps[addr0]; temps[10].x = intBitsToFloat(n + 1); n = floatBitsToInt(temps[10].x); }; gl_Position = piglit_vertex; color = clamp(temps[9], 0.0, 1.0); } [fragment shader] #version 130 in vec4 color; void main() { gl_FragColor = color; } [test] clear color 0.0 0.0 0.0 0.0 clear ortho draw rect -1 -1 2 2 probe rgba 2 2 .40 .40 .20 0.0