]> git.sesse.net Git - movit/blobdiff - header.comp
Loosen up a bound in ResampleEffectTest a bit.
[movit] / header.comp
index 5487b20fa3a33557cedf0ab76e6e5aa3105b61d4..47f131560d18c757f9ea7441652831324e295dd1 100644 (file)
@@ -1,23 +1,18 @@
-#version 130
+#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
-layout(rgba16f) uniform restrict writeonly image2D outbuf;
+uniform restrict writeonly image2D tex_outbuf;
 
-vec4 tex2D(sampler2D s, vec2 coord)
-{
-       return texture(s, coord);
-}
+// Defined in footer.comp.
+vec4 tex2D(sampler2D s, vec2 coord);
+void cs_output(uvec2 coord, vec4 val);
+void cs_output(ivec2 coord, vec4 val);
 
-void cs_output(uvec2 coord, vec4 val)
-{
-       imageStore(outbuf, ivec2(coord), val);
-}
-
-void cs_output(ivec2 coord, vec4 val)
-{
-       imageStore(outbuf, coord, 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)