X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=header.comp;h=3c07007c5f3c8fe2b0524ac3049b379866b3fb06;hb=e683d4e49549b2d4c6906d2ebc4184904f4fe9f8;hp=266e24fc83b4519c3bd3a7247b711a23bb7b87c9;hpb=3b9957afac0555a126d1941d7027fb52e29b309a;p=movit diff --git a/header.comp b/header.comp index 266e24f..3c07007 100644 --- a/header.comp +++ b/header.comp @@ -5,19 +5,13 @@ // FIXME this needs to be auto-output or something uniform restrict writeonly image2D 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)