#version 150
#extension GL_ARB_compute_shader : enable
#extension GL_ARB_shader_image_load_store : enable
+#extension GL_ARB_shader_image_size : enable
-// FIXME this needs to be auto-output or something
-uniform restrict writeonly image2D outbuf;
+// The texture the compute shader is writing to.
+uniform restrict writeonly image2D tex_outbuf;
// Defined in footer.comp.
vec4 tex2D(sampler2D s, vec2 coord);
void cs_output(uvec2 coord, vec4 val);
void cs_output(ivec2 coord, vec4 val);
+// Used if there are any steps used to postprocess compute shader output.
+// Initialized due to https://bugs.freedesktop.org/show_bug.cgi?id=103895.
+vec4 CS_OUTPUT_VAL = vec4(0.0);
+
#define OUTPUT(tc, val) cs_output(tc, val)