Lines Matching refs:NL
56 const char* const kGLSLSIA = NL "#extension GL_OES_shader_image_atomic : require";
58 NL "precision highp float;" NL "precision highp int;" NL "precision highp sampler2D;" NL
59 …"precision highp sampler3D;" NL "precision highp samplerCube;" NL "precision highp sampler2DArray;…
60 …"precision highp isampler2D;" NL "precision highp isampler3D;" NL "precision highp isamplerCube;" …
61 …"precision highp isampler2DArray;" NL "precision highp usampler2D;" NL "precision highp usampler3D…
62 …"precision highp usamplerCube;" NL "precision highp usampler2DArray;" NL "precision highp image2D;…
63 "precision highp image3D;" NL "precision highp imageCube;" NL "precision highp image2DArray;" NL
64 "precision highp iimage2D;" NL "precision highp iimage3D;" NL "precision highp iimageCube;" NL
65 … "precision highp iimage2DArray;" NL "precision highp uimage2D;" NL "precision highp uimage3D;" NL
66 "precision highp uimageCube;" NL "precision highp uimage2DArray;";
1148 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Write()
1219 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 2) writeonly uniform " in GenFS()
1220 …<< TypePrefix<T>() << "image2D g_image;" NL "void main() {" NL " ivec2 coord = ivec2(gl_FragCoord… in GenFS()
1222 << TypePrefix<T>() << "vec4" << value << ");" NL " discard;" NL "}"; in GenFS()
1230 …os << NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "unifo… in GenC()
1231 << TypePrefix<T>() << "sampler2D g_sampler;" NL "layout(std430) buffer OutputBuffer {" NL " " in GenC()
1233 << "vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL in GenC()
1234 " data[gl_LocalInvocationIndex] = texelFetch(g_sampler, ivec2(gl_LocalInvocationID), 0);" NL in GenC()
1236 << value << ";" NL "}"; in GenC()
1252 …os << NL "#define KSIZE 4" NL "layout(" << FormatEnumToString(internalformat) << ") writeonly unif… in GenCS()
1254 …<< "image2D g_image;" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "void main()… in GenCS()
1255 " ivec2 thread_xy = ivec2(gl_LocalInvocationID);" NL " imageStore(g_image, thread_xy, " in GenCS()
1256 << TypePrefix<T>() << "vec4" << value << ");" NL "}"; in GenCS()
1264 …os << NL "#define KSIZE 4" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "unifor… in GenC()
1265 << TypePrefix<T>() << "sampler2D g_sampler;" NL "layout(std430) buffer OutputBuffer {" NL " " in GenC()
1267 << "vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL in GenC()
1268 " data[gl_LocalInvocationIndex] = texelFetch(g_sampler, ivec2(gl_LocalInvocationID), 0);" NL in GenC()
1270 << TypePrefix<T>() << "vec4" << value << ";" NL "}"; in GenC()
1435 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Read()
1504 os << NL "#define KSIZE 11" NL "layout(" << FormatEnumToString(internalformat) in GenFS()
1506 << "image2D g_image;" NL "layout(std430) buffer OutputBuffer {" NL " " << TypePrefix<T>() in GenFS()
1507 …<< "vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_FragCoord.xy)… in GenFS()
1508 …Prefix<T>() << "vec4 v = imageLoad(g_image, coord);" NL " data[coord.y * KSIZE + coord.x] = v;" NL in GenFS()
1510 << TypePrefix<T>() << "vec4" << expected_value << ";" NL " discard;" NL "}"; in GenFS()
1526 …os << NL "#define KSIZE 4" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "layout… in GenCS()
1528 << "image2D g_image;" NL "layout(std430) buffer OutputBuffer {" NL " " << TypePrefix<T>() in GenCS()
1529 …<< "vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocati… in GenCS()
1531 …pePrefix<T>() << "vec4 v = imageLoad(g_image, coord);" NL " data[gl_LocalInvocationIndex] = v;" NL in GenCS()
1533 << TypePrefix<T>() << "vec4" << expected_value << ";" NL "}"; in GenCS()
1756 …os << NL "#define KSIZE 8" NL "layout(local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "layout(" in GenCS()
1758 << "image2D g_image_read;" NL "layout(" << FormatEnumToString(internalformat) in GenCS()
1760 …<< "image2D g_image_write;" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocationID);" N… in GenCS()
1761 << TypePrefix<T>() << "vec4 v = imageLoad(g_image_read, coord);" NL in GenCS()
1762 " imageStore(g_image_write, coord, v+v);" NL " //imageStore(g_image_write, coord, " in GenCS()
1763 << TypePrefix<T>() << "vec4" << expected_value << ");" NL "}"; in GenCS()
1771 …os << NL "#define KSIZE 8" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "unifor… in GenC()
1772 << TypePrefix<T>() << "sampler2D g_sampler;" NL "layout(std430) buffer OutputBuffer {" NL " " in GenC()
1774 << "vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL in GenC()
1775 " data[gl_LocalInvocationIndex] = texelFetch(g_sampler, ivec2(gl_LocalInvocationID), 0);" NL in GenC()
1777 << TypePrefix<T>() << "vec4" << value << ";" NL "}"; in GenC()
1843 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Write()
1950 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 0) writeonly uniform " in GenFS()
1954 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 1) writeonly uniform " in GenFS()
1958 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 2) writeonly uniform " in GenFS()
1962 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 3) writeonly uniform " in GenFS()
1966 os << NL "void main() {" NL " ivec2 coord = ivec2(gl_FragCoord.xy);"; in GenFS()
1971 os << NL " imageStore(g_image_2d, coord, " << TypePrefix<T>() << "vec4" << write_value << ");"; in GenFS()
1974 os << NL " imageStore(g_image_3d, ivec3(coord, 0), " << TypePrefix<T>() << "vec4" << write_value in GenFS()
1975 …<< ");" NL " imageStore(g_image_3d, ivec3(coord, 1), " << TypePrefix<T>() << "vec4" << write_value in GenFS()
1979 …os << NL " imageStore(g_image_cube, ivec3(coord, 0), " << TypePrefix<T>() << "vec4" << write_value in GenFS()
1980 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 1), " << TypePrefix<T>() << "vec4" << write_va… in GenFS()
1981 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 2), " << TypePrefix<T>() << "vec4" << write_va… in GenFS()
1982 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 3), " << TypePrefix<T>() << "vec4" << write_va… in GenFS()
1983 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 4), " << TypePrefix<T>() << "vec4" << write_va… in GenFS()
1984 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 5), " << TypePrefix<T>() << "vec4" << write_va… in GenFS()
1988 …os << NL " imageStore(g_image_2darray, ivec3(coord, 0), " << TypePrefix<T>() << "vec4" << write_v… in GenFS()
1989 …<< ");" NL " imageStore(g_image_2darray, ivec3(coord, 1), " << TypePrefix<T>() << "vec4" << write… in GenFS()
1993 os << NL " discard;" NL "}"; in GenFS()
2001 …os << NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "unifo… in GenC()
2002 << TypePrefix<T>() << "sampler2D g_sampler_2d;" NL "uniform " << TypePrefix<T>() in GenC()
2003 …<< "sampler3D g_sampler_3d;" NL "uniform " << TypePrefix<T>() << "samplerCube g_sampler_cube;" NL … in GenC()
2005 …<< "sampler2DArray g_sampler_2darray;" NL "layout(std430, binding = 1) buffer OutputBuffer2D {" NL… in GenC()
2006 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE];" NL "} g_buff_2d;" NL in GenC()
2007 "layout(std430, binding = 0) buffer OutputBuffer3D {" NL " " in GenC()
2008 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_3d;" NL in GenC()
2009 "layout(std430, binding = 3) buffer OutputBufferCube {" NL " " in GenC()
2010 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*6];" NL "} g_buff_cube;" NL in GenC()
2011 "layout(std430, binding = 2) buffer OutputBuffer2DArray {" NL " " in GenC()
2013 << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_2darray;" NL "void main() {" NL in GenC()
2014 " int cubemap_i = 2 * int(gl_LocalInvocationID.x) - KSIZE + 1;" NL in GenC()
2015 " int cubemap_j = 2 * int(gl_LocalInvocationID.y) - KSIZE + 1;" NL in GenC()
2016 " uint layer = uint(KSIZE * KSIZE);" NL in GenC()
2017 …ff_2d.data[gl_LocalInvocationIndex] = texelFetch(g_sampler_2d, ivec2(gl_LocalInvocationID), 0);" NL in GenC()
2019 "0);" NL " g_buff_3d.data[gl_LocalInvocationIndex + layer] = texelFetch(g_sampler_3d, " in GenC()
2020 "ivec3(gl_LocalInvocationID.xy, 1), 0);" NL " g_buff_2darray.data[gl_LocalInvocationIndex] = " in GenC()
2022 "ivec3(gl_LocalInvocationID.xy, 0), 0);" NL in GenC()
2024 "ivec3(gl_LocalInvocationID.xy, 1), 0);" NL " g_buff_cube.data[gl_LocalInvocationIndex] = " in GenC()
2025 "texture(g_sampler_cube, vec3(KSIZE,cubemap_i,cubemap_j));" NL in GenC()
2027 …"vec3(KSIZE,cubemap_i,cubemap_j));" NL " g_buff_cube.data[gl_LocalInvocationIndex + 2u * layer] =… in GenC()
2028 "texture(g_sampler_cube, vec3(cubemap_i,KSIZE,cubemap_j));" NL in GenC()
2030 …"vec3(cubemap_i,KSIZE,cubemap_j));" NL " g_buff_cube.data[gl_LocalInvocationIndex + 4u * layer] =… in GenC()
2031 "texture(g_sampler_cube, vec3(cubemap_i,cubemap_j,KSIZE));" NL in GenC()
2033 "vec3(cubemap_i,cubemap_j,KSIZE));" NL " //g_buff_2d.data[gl_LocalInvocationIndex] = " in GenC()
2034 << write_value << ";" NL "}"; in GenC()
2189 os << NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;"; in GenCS()
2193 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 0) writeonly uniform " in GenCS()
2197 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 1) writeonly uniform " in GenCS()
2201 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 2) writeonly uniform " in GenCS()
2205 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 3) writeonly uniform " in GenCS()
2209 os << NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocationID);"; in GenCS()
2213 os << NL " imageStore(g_image_2d, coord, " << TypePrefix<T>() << "vec4" << write_value << ");"; in GenCS()
2216 os << NL " imageStore(g_image_3d, ivec3(coord, 0), " << TypePrefix<T>() << "vec4" << write_value in GenCS()
2217 …<< ");" NL " imageStore(g_image_3d, ivec3(coord, 1), " << TypePrefix<T>() << "vec4" << write_value in GenCS()
2221 …os << NL " imageStore(g_image_cube, ivec3(coord, 0), " << TypePrefix<T>() << "vec4" << write_value in GenCS()
2222 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 1), " << TypePrefix<T>() << "vec4" << write_va… in GenCS()
2223 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 2), " << TypePrefix<T>() << "vec4" << write_va… in GenCS()
2224 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 3), " << TypePrefix<T>() << "vec4" << write_va… in GenCS()
2225 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 4), " << TypePrefix<T>() << "vec4" << write_va… in GenCS()
2226 …<< ");" NL " imageStore(g_image_cube, ivec3(coord, 5), " << TypePrefix<T>() << "vec4" << write_va… in GenCS()
2230 …os << NL " imageStore(g_image_2darray, ivec3(coord, 0), " << TypePrefix<T>() << "vec4" << write_v… in GenCS()
2231 …<< ");" NL " imageStore(g_image_2darray, ivec3(coord, 1), " << TypePrefix<T>() << "vec4" << write… in GenCS()
2235 os << NL "}"; in GenCS()
2243 …os << NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL "unifo… in GenC()
2244 << TypePrefix<T>() << "sampler2D g_sampler_2d;" NL "uniform " << TypePrefix<T>() in GenC()
2245 …<< "sampler3D g_sampler_3d;" NL "uniform " << TypePrefix<T>() << "samplerCube g_sampler_cube;" NL … in GenC()
2247 …<< "sampler2DArray g_sampler_2darray;" NL "layout(std430, binding = 0) buffer OutputBuffer2D {" NL… in GenC()
2248 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE];" NL "} g_buff_2d;" NL in GenC()
2249 "layout(std430, binding = 1) buffer OutputBuffer3D {" NL " " in GenC()
2250 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_3d;" NL in GenC()
2251 "layout(std430, binding = 2) buffer OutputBufferCube {" NL " " in GenC()
2252 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*6];" NL "} g_buff_cube;" NL in GenC()
2253 "layout(std430, binding = 3) buffer OutputBuffer2DArray {" NL " " in GenC()
2255 << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_2darray;" NL "void main() {" NL in GenC()
2256 " int cubemap_i = 2 * int(gl_LocalInvocationID.x) - KSIZE + 1;" NL in GenC()
2257 " int cubemap_j = 2 * int(gl_LocalInvocationID.y) - KSIZE + 1;" NL in GenC()
2258 " uint layer = uint(KSIZE * KSIZE);" NL in GenC()
2259 …ff_2d.data[gl_LocalInvocationIndex] = texelFetch(g_sampler_2d, ivec2(gl_LocalInvocationID), 0);" NL in GenC()
2261 "0);" NL " g_buff_3d.data[gl_LocalInvocationIndex + layer] = texelFetch(g_sampler_3d, " in GenC()
2262 "ivec3(gl_LocalInvocationID.xy, 1), 0);" NL " g_buff_2darray.data[gl_LocalInvocationIndex] = " in GenC()
2264 "ivec3(gl_LocalInvocationID.xy, 0), 0);" NL in GenC()
2266 "ivec3(gl_LocalInvocationID.xy, 1), 0);" NL " g_buff_cube.data[gl_LocalInvocationIndex] = " in GenC()
2267 "texture(g_sampler_cube, vec3(KSIZE,cubemap_i,cubemap_j));" NL in GenC()
2269 …"vec3(KSIZE,cubemap_i,cubemap_j));" NL " g_buff_cube.data[gl_LocalInvocationIndex + 2u * layer] =… in GenC()
2270 "texture(g_sampler_cube, vec3(cubemap_i,KSIZE,cubemap_j));" NL in GenC()
2272 …"vec3(cubemap_i,KSIZE,cubemap_j));" NL " g_buff_cube.data[gl_LocalInvocationIndex + 4u * layer] =… in GenC()
2273 "texture(g_sampler_cube, vec3(cubemap_i,cubemap_j,KSIZE));" NL in GenC()
2275 "vec3(cubemap_i,cubemap_j,KSIZE));" NL " //g_buff_2d.data[gl_LocalInvocationIndex] = " in GenC()
2276 << write_value << ";" NL "}"; in GenC()
2346 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Read()
2441 os << NL "#define KSIZE 11"; in GenFS()
2445 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 2) readonly uniform " in GenFS()
2447 << "image2D g_image_2d;" NL "layout(std430, binding = 1) buffer OutputBuffer2D {" NL " " in GenFS()
2448 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE];" NL "} g_buff_2d;"; in GenFS()
2451 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 0) readonly uniform " in GenFS()
2453 << "image3D g_image_3d;" NL "layout(std430, binding = 0) buffer OutputBuffer3D {" NL " " in GenFS()
2454 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_3d;"; in GenFS()
2457 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 3) readonly uniform " in GenFS()
2459 … << "imageCube g_image_cube;" NL "layout(std430, binding = 3) buffer OutputBufferCube {" NL " " in GenFS()
2460 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*6];" NL "} g_buff_cube;"; in GenFS()
2463 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 1) readonly uniform " in GenFS()
2465 …<< "image2DArray g_image_2darray;" NL "layout(std430, binding = 2) buffer OutputBuffer2DArray {" N… in GenFS()
2466 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_2darray;"; in GenFS()
2469 os << NL "void main() {" NL " ivec2 coord = ivec2(gl_FragCoord.xy);" NL in GenFS()
2470 " int coordIndex = coord.x + KSIZE * coord.y;" NL " int layer = int(KSIZE * KSIZE);" NL " " in GenFS()
2476 os << NL " v = imageLoad(g_image_2d, coord);" NL " g_buff_2d.data[coordIndex] = v;"; in GenFS()
2479 …os << NL " v = imageLoad(g_image_3d, ivec3(coord.xy, 0));" NL " g_buff_3d.data[coordIndex] = v;"… in GenFS()
2480 … " v = imageLoad(g_image_3d, ivec3(coord.xy, 1));" NL " g_buff_3d.data[coordIndex + layer] = v;"; in GenFS()
2483 os << NL in GenFS()
2484 " v = imageLoad(g_image_cube, ivec3(coord, 0));" NL " g_buff_cube.data[coordIndex] = v;" NL in GenFS()
2485 …" v = imageLoad(g_image_cube, ivec3(coord, 1));" NL " g_buff_cube.data[coordIndex + layer] = v;"… in GenFS()
2486 " v = imageLoad(g_image_cube, ivec3(coord, 2));" NL in GenFS()
2487 " g_buff_cube.data[coordIndex + 2 * layer] = v;" NL in GenFS()
2488 " v = imageLoad(g_image_cube, ivec3(coord, 3));" NL in GenFS()
2489 " g_buff_cube.data[coordIndex + 3 * layer] = v;" NL in GenFS()
2490 " v = imageLoad(g_image_cube, ivec3(coord, 4));" NL in GenFS()
2491 " g_buff_cube.data[coordIndex + 4 * layer] = v;" NL in GenFS()
2492 …" v = imageLoad(g_image_cube, ivec3(coord, 5));" NL " g_buff_cube.data[coordIndex + 5 * layer] =… in GenFS()
2495 …os << NL " v = imageLoad(g_image_2darray, ivec3(coord, 0));" NL " g_buff_2darray.data[coordIndex… in GenFS()
2496 " v = imageLoad(g_image_2darray, ivec3(coord, 1));" NL in GenFS()
2500 os << NL " //g_buff_2d.data[coordIndex] = " << expected_value << ";" NL "}"; in GenFS()
2654 os << NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;"; in GenCS()
2658 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 2) readonly uniform " in GenCS()
2660 << "image2D g_image_2d;" NL "layout(std430, binding = 0) buffer OutputBuffer2D {" NL " " in GenCS()
2661 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE];" NL "} g_buff_2d;"; in GenCS()
2664 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 0) readonly uniform " in GenCS()
2666 << "image3D g_image_3d;" NL "layout(std430, binding = 1) buffer OutputBuffer3D {" NL " " in GenCS()
2667 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_3d;"; in GenCS()
2670 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 3) readonly uniform " in GenCS()
2672 … << "imageCube g_image_cube;" NL "layout(std430, binding = 2) buffer OutputBufferCube {" NL " " in GenCS()
2673 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*6];" NL "} g_buff_cube;"; in GenCS()
2676 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 1) readonly uniform " in GenCS()
2678 …<< "image2DArray g_image_2darray;" NL "layout(std430, binding = 3) buffer OutputBuffer2DArray {" N… in GenCS()
2679 << TypePrefix<T>() << "vec4 data[KSIZE*KSIZE*2];" NL "} g_buff_2darray;"; in GenCS()
2682 os << NL "void main() {" NL " ivec3 coord = ivec3(gl_LocalInvocationID.xy, 0);" NL in GenCS()
2683 " uint layer = uint(KSIZE * KSIZE);" NL " " in GenCS()
2688 …os << NL " v = imageLoad(g_image_2d, coord.xy);" NL " g_buff_2d.data[gl_LocalInvocationIndex] = … in GenCS()
2691 …os << NL " v = imageLoad(g_image_3d, coord);" NL " g_buff_3d.data[gl_LocalInvocationIndex] = v;"… in GenCS()
2692 " v = imageLoad(g_image_3d, ivec3(coord.xy, 1));" NL in GenCS()
2696 …os << NL " v = imageLoad(g_image_cube, coord);" NL " g_buff_cube.data[gl_LocalInvocationIndex] =… in GenCS()
2697 " v = imageLoad(g_image_cube, ivec3(coord.xy, 1));" NL in GenCS()
2698 " g_buff_cube.data[gl_LocalInvocationIndex + layer] = v;" NL in GenCS()
2699 " v = imageLoad(g_image_cube, ivec3(coord.xy, 2));" NL in GenCS()
2700 " g_buff_cube.data[gl_LocalInvocationIndex + 2u * layer] = v;" NL in GenCS()
2701 " v = imageLoad(g_image_cube, ivec3(coord.xy, 3));" NL in GenCS()
2702 " g_buff_cube.data[gl_LocalInvocationIndex + 3u * layer] = v;" NL in GenCS()
2703 " v = imageLoad(g_image_cube, ivec3(coord.xy, 4));" NL in GenCS()
2704 " g_buff_cube.data[gl_LocalInvocationIndex + 4u * layer] = v;" NL in GenCS()
2705 " v = imageLoad(g_image_cube, ivec3(coord.xy, 5));" NL in GenCS()
2709 os << NL " v = imageLoad(g_image_2darray, coord);" NL in GenCS()
2710 " g_buff_2darray.data[gl_LocalInvocationIndex] = v;" NL in GenCS()
2711 " v = imageLoad(g_image_2darray, ivec3(coord.xy, 1));" NL in GenCS()
2715 os << NL " //g_buff_2d.data[gl_LocalInvocationIndex] = " << expected_value << ";" NL "}"; in GenCS()
2766 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Atomic()
2855 os << NL "#define KSIZE 11" NL "layout(" << FormatEnumToString(internalformat) in GenFS()
2856 << ", binding = 1) coherent uniform " << TypePrefix<T>() << "image2D g_image_2d;" NL "layout(" in GenFS()
2858 << "image3D g_image_3d;" NL "layout(" << FormatEnumToString(internalformat) in GenFS()
2859 … << ", binding = 0) coherent uniform " << TypePrefix<T>() << "imageCube g_image_cube;" NL "layout(" in GenFS()
2861 << "image2DArray g_image_2darray;" NL "layout(std430) buffer out_data {" NL in GenFS()
2862 " ivec4 o_color[KSIZE*KSIZE];" NL "};" NL in GenFS()
2863 << TypePrefix<T>() << "vec2 t(int i) {" NL " return " << TypePrefix<T>() in GenFS()
2864 << "vec2(i);" NL "}" NL "void main() {" NL " ivec2 coord = ivec2(gl_FragCoord.xy);" NL in GenFS()
2865 … " int coordIndex = coord.x + KSIZE * coord.y;" NL " o_color[coordIndex] = ivec4(coordIndex);" NL in GenFS()
2866 " if (imageAtomicAdd(g_image_2d, coord, t(2).x) != t(0).x) o_color[coordIndex].x = 1;" NL in GenFS()
2867 " else if (imageAtomicMin(g_image_2d, coord, t(3).x) != t(2).x) o_color[coordIndex].x = 2;" NL in GenFS()
2868 " else if (imageAtomicMax(g_image_2d, coord, t(4).x) != t(2).x) o_color[coordIndex].x = 3;" NL in GenFS()
2869 " else if (imageAtomicAnd(g_image_2d, coord, t(0).x) != t(4).x) o_color[coordIndex].x = 4;" NL in GenFS()
2870 " else if (imageAtomicOr(g_image_2d, coord, t(7).x) != t(0).x) o_color[coordIndex].x = 5;" NL in GenFS()
2871 " else if (imageAtomicXor(g_image_2d, coord, t(4).x) != t(7).x) o_color[coordIndex].x = 6;" NL in GenFS()
2872 … else if (imageAtomicExchange(g_image_2d, coord, t(1).x) != t(3).x) o_color[coordIndex].x = 7;" NL in GenFS()
2874 "8;" NL " else o_color[coordIndex].x = 10;" NL in GenFS()
2875 … if (imageAtomicAdd(g_image_3d, ivec3(coord, 2), t(2).x) != t(0).x) o_color[coordIndex].y = 1;" NL in GenFS()
2876 …e if (imageAtomicMin(g_image_3d, ivec3(coord, 2), t(3).x) != t(2).x) o_color[coordIndex].y = 2;" NL in GenFS()
2877 …e if (imageAtomicMax(g_image_3d, ivec3(coord, 2), t(4).x) != t(2).x) o_color[coordIndex].y = 3;" NL in GenFS()
2878 …e if (imageAtomicAnd(g_image_3d, ivec3(coord, 2), t(0).x) != t(4).x) o_color[coordIndex].y = 4;" NL in GenFS()
2879 …se if (imageAtomicOr(g_image_3d, ivec3(coord, 2), t(7).x) != t(0).x) o_color[coordIndex].y = 5;" NL in GenFS()
2880 …e if (imageAtomicXor(g_image_3d, ivec3(coord, 2), t(4).x) != t(7).x) o_color[coordIndex].y = 6;" NL in GenFS()
2882 … "7;" NL " else if (imageAtomicCompSwap(g_image_3d, ivec3(coord, 2), t(1).x, t(6).x) != t(1).x) " in GenFS()
2883 "o_color[coordIndex].y = 8;" NL " else o_color[coordIndex].y = 10;" NL in GenFS()
2884 …if (imageAtomicAdd(g_image_cube, ivec3(coord, 3), t(2).x) != t(0).x) o_color[coordIndex].z = 1;" NL in GenFS()
2886 "2;" NL " else if (imageAtomicMax(g_image_cube, ivec3(coord, 3), t(4).x) != t(2).x) " in GenFS()
2887 "o_color[coordIndex].z = 3;" NL " else if (imageAtomicAnd(g_image_cube, ivec3(coord, 3), " in GenFS()
2888 "t(0).x) != t(4).x) o_color[coordIndex].z = 4;" NL in GenFS()
2889 … if (imageAtomicOr(g_image_cube, ivec3(coord, 3), t(7).x) != t(0).x) o_color[coordIndex].z = 5;" NL in GenFS()
2891 "6;" NL " else if (imageAtomicExchange(g_image_cube, ivec3(coord, 3), t(1).x) != t(3).x) " in GenFS()
2892 … "o_color[coordIndex].z = 7;" NL " else if (imageAtomicCompSwap(g_image_cube, ivec3(coord, 3), " in GenFS()
2893 … "t(1).x, t(6).x) != t(1).x) o_color[coordIndex].z = 8;" NL " else o_color[coordIndex].z = 10;" NL in GenFS()
2894 …(imageAtomicAdd(g_image_2darray, ivec3(coord, 2), t(2).x) != t(0).x) o_color[coordIndex].w = 1;" NL in GenFS()
2896 "2;" NL " else if (imageAtomicMax(g_image_2darray, ivec3(coord, 2), t(4).x) != t(2).x) " in GenFS()
2897 "o_color[coordIndex].w = 3;" NL " else if (imageAtomicAnd(g_image_2darray, ivec3(coord, 2), " in GenFS()
2898 "t(0).x) != t(4).x) o_color[coordIndex].w = 4;" NL in GenFS()
2900 "5;" NL " else if (imageAtomicXor(g_image_2darray, ivec3(coord, 2), t(4).x) != t(7).x) " in GenFS()
2901 "o_color[coordIndex].w = 6;" NL " else if (imageAtomicExchange(g_image_2darray, ivec3(coord, " in GenFS()
2902 "2), t(1).x) != t(3).x) o_color[coordIndex].w = 7;" NL in GenFS()
2904 "o_color[coordIndex].w = 8;" NL " else o_color[coordIndex].w = 10;" NL " discard;" NL "}"; in GenFS()
2943 const char* src_fs = NL "void main() {" NL " discard;" NL "}"; in Write()
3037 os << NL "#define KSIZE 100" NL "layout(local_size_x = KSIZE) in;"; in GenStoreShader()
3039 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 1) writeonly uniform " in GenStoreShader()
3040 << TypePrefix<T>() << "image2D g_image_2d;" NL "layout(" << FormatEnumToString(internalformat) in GenStoreShader()
3041 << ", binding = 2) writeonly uniform " << TypePrefix<T>() << "image3D g_image_3d;" NL "layout(" in GenStoreShader()
3043 << "imageCube g_image_cube;" NL "layout(" << FormatEnumToString(internalformat) in GenStoreShader()
3045 …<< "image2DArray g_image_2darray;" NL "layout(std430) buffer out_data {" NL " ivec4 o_color;" NL … in GenStoreShader()
3046 "void main() {" NL " " in GenStoreShader()
3049 …<< ";" NL " int g_index[6] = int[](o_color.x, o_color.y, o_color.z, o_color.w, o_color.r, o_color… in GenStoreShader()
3052 os << NL " ivec2 coord = ivec2(gl_VertexID, g_index[0]);"; in GenStoreShader()
3056 os << NL " ivec2 coord = ivec2(gl_GlobalInvocationID.x, g_index[0]);"; in GenStoreShader()
3058 os << NL " imageStore(g_image_2d, coord, g_value);" NL in GenStoreShader()
3059 " imageStore(g_image_3d, ivec3(coord.xy, g_index[0]), g_value);" NL in GenStoreShader()
3060 " imageStore(g_image_3d, ivec3(coord.xy, g_index[1]), g_value);" NL in GenStoreShader()
3061 " for (int i = 0; i < 6; ++i) {" NL in GenStoreShader()
3062 " imageStore(g_image_cube, ivec3(coord, g_index[i]), g_value);" NL " }" NL in GenStoreShader()
3063 " imageStore(g_image_2darray, ivec3(coord, g_index[0]), g_value);" NL in GenStoreShader()
3064 " imageStore(g_image_2darray, ivec3(coord, g_index[1]), g_value);" NL "}"; in GenStoreShader()
3072 os << NL "#define KSIZE 100"; in GenLoadShader()
3075 os << NL "layout(local_size_x = KSIZE) in;"; in GenLoadShader()
3077 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 3) readonly uniform " in GenLoadShader()
3078 << TypePrefix<T>() << "image2D g_image_2d;" NL "layout(" << FormatEnumToString(internalformat) in GenLoadShader()
3079 << ", binding = 2) readonly uniform " << TypePrefix<T>() << "image3D g_image_3d;" NL "layout(" in GenLoadShader()
3081 << "imageCube g_image_cube;" NL "layout(" << FormatEnumToString(internalformat) in GenLoadShader()
3083 …<< "image2DArray g_image_2darray;" NL "layout(std430) buffer out_data {" NL " ivec4 o_color[KSIZE… in GenLoadShader()
3084 "};" NL "void main() {"; in GenLoadShader()
3088 …os << NL " " << TypePrefix<T>() << "vec4 g_value = " << TypePrefix<T>() << "vec4(o_color[gl_Verte… in GenLoadShader()
3093 os << NL " " << TypePrefix<T>() << "vec4 g_value = " << TypePrefix<T>() in GenLoadShader()
3097 …os << NL " int g_index[6] = int[](o_color[0].x, o_color[0].y, o_color[0].z, o_color[0].w, o_color… in GenLoadShader()
3101 os << NL " ivec2 coord = ivec2(gl_VertexID, g_index[0]);"; in GenLoadShader()
3105 os << NL " ivec2 coord = ivec2(gl_GlobalInvocationID.x, g_index[0]);"; in GenLoadShader()
3107 os << NL " vec4 r = vec4(0.0, 1.0, 0.0, 1.0);" NL " " << TypePrefix<T>() in GenLoadShader()
3108 << "vec4 v;" NL " v = imageLoad(g_image_2d, coord);" NL in GenLoadShader()
3109 " if (v != g_value) r = vec4(1.0, 0.0, float(coord.x), 2.0);" NL in GenLoadShader()
3110 " v = imageLoad(g_image_3d, ivec3(coord, g_index[0]));" NL in GenLoadShader()
3111 " if (v != g_value) r = vec4(1.0, 0.0, float(coord.x), 3.0);" NL in GenLoadShader()
3112 " v = imageLoad(g_image_cube, ivec3(coord, g_index[0]));" NL in GenLoadShader()
3113 " if (v != g_value) r = vec4(1.0, 0.0, float(coord.x), 6.0);" NL in GenLoadShader()
3114 " v = imageLoad(g_image_2darray, ivec3(coord, g_index[0]));" NL in GenLoadShader()
3115 …if (v != g_value) r = vec4(1.0, 0.0, float(coord.x), 23.0);" NL " o_color[coord.x] = ivec4(r);" NL in GenLoadShader()
3192 const char* src_fs = NL "void main() {" NL " discard;" NL "}"; in Atomic()
3269 os << NL "#define KSIZE 100"; in GenShader()
3272 os << NL "layout(local_size_x = KSIZE) in;"; in GenShader()
3277 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 1) coherent uniform " in GenShader()
3281 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 2) coherent uniform " in GenShader()
3285 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 0) coherent uniform " in GenShader()
3289 os << NL "layout(" << FormatEnumToString(internalformat) << ", binding = 3) coherent uniform " in GenShader()
3293 …os << NL "layout(std430) buffer out_data {" NL " ivec4 o_color[KSIZE];" NL "} r;" NL << TypePrefi… in GenShader()
3294 << "vec2 t(int i) {" NL " return " << TypePrefix<T>() in GenShader()
3295 …<< "vec2(i);" NL "}" NL "void main() {" NL " int g_value[6] = int[](r.o_color[0].x, r.o_color[0].… in GenShader()
3300 os << NL " ivec2 coord = ivec2(gl_VertexID, g_value[0]);"; in GenShader()
3304 os << NL " ivec2 coord = ivec2(gl_GlobalInvocationID.x, g_value[0]);"; in GenShader()
3306 os << NL " ivec4 o_color = ivec4(0, 1, 0, 1);"; in GenShader()
3311 …os << NL " ivec4 i = ivec4(1, 0, 0, 2);" NL " imageAtomicExchange(g_image_2d, coord, t(0).x);" NL in GenShader()
3312 " if (imageAtomicAdd(g_image_2d, coord, t(2).x) != t(0).x) o_color = i;" NL in GenShader()
3313 " if (imageAtomicMin(g_image_2d, coord, t(3).x) != t(2).x) o_color = i;" NL in GenShader()
3314 " if (imageAtomicMax(g_image_2d, coord, t(4).x) != t(2).x) o_color = i;" NL in GenShader()
3315 " if (imageAtomicAnd(g_image_2d, coord, t(0).x) != t(4).x) o_color = i;" NL in GenShader()
3316 " if (imageAtomicOr(g_image_2d, coord, t(7).x) != t(0).x) o_color = i;" NL in GenShader()
3317 " if (imageAtomicXor(g_image_2d, coord, t(4).x) != t(7).x) o_color = i;" NL in GenShader()
3318 " if (imageAtomicExchange(g_image_2d, coord, t(1).x) != t(3).x) o_color = i;" NL in GenShader()
3319 " if (imageAtomicCompSwap(g_image_2d, coord, t(1).x, t(6).x) != t(1).x) o_color = i;" NL in GenShader()
3323 os << NL " ivec4 i = ivec4(1, 0, 0, 3);" NL in GenShader()
3324 " imageAtomicExchange(g_image_3d, ivec3(coord, 0), t(0).x);" NL in GenShader()
3325 " if (imageAtomicAdd(g_image_3d, ivec3(coord, 0), t(2).x) != t(0).x) o_color = i;" NL in GenShader()
3326 " if (imageAtomicMin(g_image_3d, ivec3(coord, 0), t(3).x) != t(2).x) o_color = i;" NL in GenShader()
3327 … " if (imageAtomicMax(g_image_3d, ivec3(coord, g_value[0]), t(4).x) != t(2).x) o_color = i;" NL in GenShader()
3328 " if (imageAtomicAnd(g_image_3d, ivec3(coord, 0), t(0).x) != t(4).x) o_color = i;" NL in GenShader()
3329 " if (imageAtomicOr(g_image_3d, ivec3(coord, 0), t(7).x) != t(0).x) o_color = i;" NL in GenShader()
3330 " if (imageAtomicXor(g_image_3d, ivec3(coord, 0), t(4).x) != t(7).x) o_color = i;" NL in GenShader()
3331 " if (imageAtomicExchange(g_image_3d, ivec3(coord, 0), t(1).x) != t(3).x) o_color = i;" NL in GenShader()
3332 …" if (imageAtomicCompSwap(g_image_3d, ivec3(coord, 0), t(1).x, t(6).x) != t(1).x) o_color = i;" NL in GenShader()
3336 os << NL in GenShader()
3337 …" ivec4 i = ivec4(1, 0, 0, 6);" NL " imageAtomicExchange(g_image_cube, ivec3(coord, 0), t(0).x);… in GenShader()
3338 … " if (imageAtomicAdd(g_image_cube, ivec3(coord, 0), t(g_value[2]).x) != t(0).x) o_color = i;" NL in GenShader()
3339 " if (imageAtomicMin(g_image_cube, ivec3(coord, 0), t(3).x) != t(2).x) o_color = i;" NL in GenShader()
3340 " if (imageAtomicMax(g_image_cube, ivec3(coord, 0), t(4).x) != t(2).x) o_color = i;" NL in GenShader()
3341 " if (imageAtomicAnd(g_image_cube, ivec3(coord, 0), t(0).x) != t(4).x) o_color = i;" NL in GenShader()
3342 " if (imageAtomicOr(g_image_cube, ivec3(coord, 0), t(7).x) != t(0).x) o_color = i;" NL in GenShader()
3343 " if (imageAtomicXor(g_image_cube, ivec3(coord, 0), t(4).x) != t(7).x) o_color = i;" NL in GenShader()
3344 " if (imageAtomicExchange(g_image_cube, ivec3(coord, 0), t(1).x) != t(3).x) o_color = i;" NL in GenShader()
3346 …"= i;" NL " if (imageAtomicExchange(g_image_cube, ivec3(coord, 0), t(0).x) != t(6).x) o_color = i… in GenShader()
3349 os << NL in GenShader()
3350 " ivec4 i = ivec4(1, 0, 0, 23);" NL in GenShader()
3351 " imageAtomicExchange(g_image_2darray, ivec3(coord, 0), t(0).x);" NL in GenShader()
3352 " if (imageAtomicAdd(g_image_2darray, ivec3(coord, 0), t(2).x) != t(0).x) o_color = i;" NL in GenShader()
3353 " if (imageAtomicMin(g_image_2darray, ivec3(coord, 0), t(3).x) != t(2).x) o_color = i;" NL in GenShader()
3354 " if (imageAtomicMax(g_image_2darray, ivec3(coord, 0), t(4).x) != t(2).x) o_color = i;" NL in GenShader()
3355 " if (imageAtomicAnd(g_image_2darray, ivec3(coord, 0), t(0).x) != t(4).x) o_color = i;" NL in GenShader()
3356 " if (imageAtomicOr(g_image_2darray, ivec3(coord, 0), t(7).x) != t(0).x) o_color = i;" NL in GenShader()
3357 … if (imageAtomicXor(g_image_2darray, ivec3(coord, 0), t(g_value[4]).x) != t(7).x) o_color = i;" NL in GenShader()
3358 " if (imageAtomicExchange(g_image_2darray, ivec3(coord, 0), t(1).x) != t(3).x) o_color = i;" NL in GenShader()
3359 … (imageAtomicCompSwap(g_image_2darray, ivec3(coord, 0), t(1).x, t(6).x) != t(1).x) o_color = i;" NL in GenShader()
3363 os << NL " r.o_color[coord.x] = o_color;" NL "}"; in GenShader()
3476 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Run()
3479 …NL "#define KSIZE 32" NL "layout(std430) buffer out_data {" NL " ivec4 o_color[KSIZE*KSIZE];" NL … in Run()
3480 "layout(r32f, binding = 0) coherent restrict uniform image2D g_image_layer0;" NL in Run()
3481 "layout(r32f, binding = 1) volatile uniform image2D g_image_layer1;" NL "void main() {" NL in Run()
3482 … " ivec2 coord = ivec2(gl_FragCoord.xy);" NL " imageStore(g_image_layer0, coord, vec4(1.0));" NL in Run()
3483 …" memoryBarrier();" NL " imageStore(g_image_layer1, coord, vec4(2.0));" NL " memoryBarrier();" … in Run()
3484 " imageStore(g_image_layer0, coord, vec4(3.0));" NL " memoryBarrier();" NL in Run()
3485 " int coordIndex = coord.x + KSIZE * coord.y;" NL in Run()
3486 …color[coordIndex] = ivec4(imageLoad(g_image_layer0, coord) + imageLoad(g_image_layer1, coord));" NL in Run()
3570 NL "#define KSIZE 10" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Run()
3571 "layout(std430) buffer out_data {" NL " ivec4 o_color[KSIZE*KSIZE];" NL "};" NL in Run()
3572 "layout(r32f, binding = 0) coherent restrict uniform image2D g_image_layer0;" NL in Run()
3573 "layout(r32f, binding = 1) volatile uniform image2D g_image_layer1;" NL "void main() {" NL in Run()
3574 … ivec2 coord = ivec2(gl_LocalInvocationID.xy);" NL " imageStore(g_image_layer0, coord, vec4(1.0)… in Run()
3575 …" memoryBarrier();" NL " imageStore(g_image_layer1, coord, vec4(2.0));" NL " memoryBarrier();" … in Run()
3576 " imageStore(g_image_layer0, coord, vec4(3.0));" NL " memoryBarrier();" NL in Run()
3578 "imageLoad(g_image_layer1, coord));" NL "}"; in Run()
3669 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Run()
3671 NL "layout(early_fragment_tests) in;" NL "layout(location = 0) out vec4 o_color;" NL in Run()
3672 … "layout(rgba32f, binding = 0) writeonly coherent uniform image2D g_image;" NL "void main() {" NL in Run()
3673 " ivec2 coord = ivec2(gl_FragCoord.xy);" NL " imageStore(g_image, coord, vec4(17.0));" NL in Run()
3674 " o_color = vec4(1.0, 0.0, 0.0, 1.0);" NL "}"; in Run()
3676 NL "layout(location = 0) out vec4 o_color;" NL in Run()
3677 … "layout(rgba32f, binding = 1) writeonly coherent uniform image2D g_image;" NL "void main() {" NL in Run()
3678 " ivec2 coord = ivec2(gl_FragCoord.xy);" NL " imageStore(g_image, coord, vec4(13.0));" NL in Run()
3679 " o_color = vec4(1.0, 0.0, 0.0, 1.0);" NL "}"; in Run()
3705 NL "#define KSIZE 8" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Run()
3706 "uniform sampler2D g_sampler;" NL "layout(std430) buffer OutputBuffer {" NL in Run()
3707 " vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL in Run()
3708 … " data[gl_LocalInvocationIndex] = texelFetch(g_sampler, ivec2(gl_LocalInvocationID), 0);" NL "}"; in Run()
3787 …NL "layout (local_size_x = 1) in;" NL "layout(std430) buffer out_data {" NL " ivec4 o_color;" NL … in Run()
3788 "uniform int MaxImageUnits;" NL "uniform int MaxCombinedShaderOutputResources;" NL in Run()
3789 "uniform int MaxVertexImageUniforms;" NL "uniform int MaxFragmentImageUniforms;" NL in Run()
3790 …"uniform int MaxComputeImageUniforms;" NL "uniform int MaxCombinedImageUniforms;" NL "void main() … in Run()
3791 " o_color = ivec4(0, 1, 0, 1);" NL in Run()
3792 " if (gl_MaxImageUnits != MaxImageUnits) o_color = ivec4(1, 0, 0, 1);" NL in Run()
3794 …"0, 2);" NL " if (gl_MaxVertexImageUniforms != MaxVertexImageUniforms) o_color = ivec4(1, 0, 0, 4… in Run()
3795 … " if (gl_MaxFragmentImageUniforms != MaxFragmentImageUniforms) o_color = ivec4(1, 0, 0, 5);" NL in Run()
3796 " if (gl_MaxComputeImageUniforms != MaxComputeImageUniforms) o_color = ivec4(1, 0, 0, 6);" NL in Run()
3797 … if (gl_MaxCombinedImageUniforms != MaxCombinedImageUniforms) o_color = ivec4(1, 0, 0, 9);" NL "}"; in Run()
3877 NL "layout(rgba32f) writeonly uniform image2D g_output_data;" NL "void main() {" NL in Run()
3878 " vec2[4] data = vec2[4](vec2(-1, -1), vec2(1, -1), vec2(-1, 1), vec2(1, 1));" NL in Run()
3879 " imageStore(g_output_data, ivec2(gl_VertexID,0), vec4(data[gl_VertexID], 0.0, 1.0));" NL in Run()
3880 " gl_PointSize = 1.0;" NL "}"; in Run()
3881 const char* const glsl_store_fs = NL "void main() {" NL " discard;" NL "}"; in Run()
3883 NL "out vec4 vs_color;" NL "layout(rgba32f) readonly uniform image2D g_image;" NL in Run()
3884 "uniform sampler2D g_sampler;" NL "void main() {" NL in Run()
3885 " vec4 pi = imageLoad(g_image, ivec2(gl_VertexID, 0));" NL in Run()
3886 " vec4 ps = texelFetch(g_sampler, ivec2(gl_VertexID, 0), 0);" NL in Run()
3887 " if (pi != ps) vs_color = vec4(1.0, 0.0, 0.0, 1.0);" NL in Run()
3888 " else vs_color = vec4(0.0, 1.0, 0.0, 1.0);" NL " gl_Position = pi;" NL "}"; in Run()
3890 NL "#define KSIZE 44" NL "in vec4 vs_color;" NL "layout(std430) buffer OutputBuffer {" NL in Run()
3891 …" vec4 o_color[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_FragCoord.x… in Run()
3892 " int coordIndex = coord.x + KSIZE * coord.y;" NL " o_color[coordIndex] = vs_color;" NL "}"; in Run()
3979 NL "layout(rgba32f, binding = 0) writeonly uniform image2D g_position_buffer;" NL in Run()
3980 "layout(rgba32f, binding = 1) writeonly uniform image2D g_color_buffer;" NL in Run()
3981 …out(r32ui, binding = 2) writeonly uniform uimage2D g_element_buffer;" NL "uniform vec4 g_color;" NL in Run()
3982 …"void main() {" NL " vec2[4] data = vec2[4](vec2(-1, -1), vec2(1, -1), vec2(-1, 1), vec2(1, 1));"… in Run()
3983 " imageStore(g_position_buffer, ivec2(gl_VertexID,0), vec4(data[gl_VertexID], 0.0, 1.0));" NL in Run()
3984 " imageStore(g_color_buffer, ivec2(gl_VertexID,0), g_color);" NL in Run()
3985 " imageStore(g_element_buffer, ivec2(gl_VertexID,0), uvec4(gl_VertexID));" NL "}"; in Run()
3986 const char* const glsl_store_fs = NL "void main() {" NL " discard;" NL "}"; in Run()
3988 NL "#define KSIZE 4" NL "layout (local_size_x = KSIZE) in;" NL in Run()
3989 "layout(rgba32f, binding = 0) readonly uniform image2D g_position_img;" NL in Run()
3990 "layout(rgba32f, binding = 1) readonly uniform image2D g_color_img;" NL in Run()
3991 "layout(r32ui, binding = 2) readonly uniform uimage2D g_element_img;" NL in Run()
3992 "layout(std430, binding = 1) buffer g_position_buf {" NL " vec2 g_pos[KSIZE];" NL "};" NL in Run()
3993 "layout(std430, binding = 2) buffer g_color_buf {" NL " vec4 g_col[KSIZE];" NL "};" NL in Run()
3994 "layout(std430, binding = 3) buffer g_element_buf {" NL " uint g_elem[KSIZE];" NL "};" NL in Run()
3995 "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocationID.x, 0);" NL in Run()
3996 " g_pos[coord.x] = (imageLoad(g_position_img, coord)).xy;" NL in Run()
3997 " g_col[coord.x] = imageLoad(g_color_img, coord);" NL in Run()
3998 " g_elem[coord.x] = uint((imageLoad(g_element_img, coord)).x);" NL "}"; in Run()
3999 const char* const glsl_draw_vs = NL in Run()
4000 "layout(location = 0) in vec4 i_position;" NL "layout(location = 1) in vec4 i_color;" NL in Run()
4001 …"out vec4 vs_color;" NL "void main() {" NL " gl_Position = i_position;" NL " vs_color = i_color;… in Run()
4002 …const char* const glsl_draw_fs = NL "in vec4 vs_color;" NL "layout(location = 0) out vec4 o_color;… in Run()
4003 "void main() {" NL " o_color = vs_color;" NL "}"; in Run()
4134 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Run()
4136 …NL "layout(rgba32f) writeonly uniform image2D g_image;" NL "uniform vec4 g_color;" NL "void main()… in Run()
4137 " imageStore(g_image, ivec2(gl_FragCoord.xy), g_color);" NL " discard;" NL "}"; in Run()
4139 NL "layout(location = 0) out vec4 o_color;" NL "uniform sampler2D g_sampler;" NL in Run()
4140 "layout(std430) buffer OutputBuffer {" NL " uvec4 counter;" NL " vec4 data[];" NL "};" NL in Run()
4141 "void main() {" NL " uint idx = atomicAdd(counter[0], 1u);" NL in Run()
4142 " data[idx] = texelFetch(g_sampler, ivec2(gl_FragCoord.xy), 0);" NL "}"; in Run()
4229 NL "layout(location = 0) in vec4 i_position;" NL in Run()
4230 "layout(r32ui, binding = 3) coherent uniform uimage2D g_image;" NL "void main() {" NL in Run()
4231 … " gl_Position = i_position;" NL " imageAtomicAdd(g_image, ivec2(0, gl_VertexID), 100u);" NL "}"; in Run()
4233 NL "#define KSIZE 64" NL "layout(r32ui, binding = 3) coherent uniform uimage2D g_image;" NL in Run()
4234 …"void main() {" NL " imageAtomicAdd(g_image, ivec2(0, int(gl_FragCoord.x) & 0x03), 0x1u);" NL "}"; in Run()
4237 NL "#define KSIZE 4" NL "layout (local_size_x = KSIZE) in;" NL in Run()
4238 … "layout(r32ui, binding = 3) uniform uimage2D g_image;" NL "layout(std430) buffer out_data {" NL in Run()
4239 " uvec4 data[KSIZE];" NL "};" NL "void main() {" NL in Run()
4240 " uvec4 v = imageLoad(g_image, ivec2(0, gl_LocalInvocationID.x));" NL in Run()
4241 " data[gl_LocalInvocationIndex] = v;" NL "}"; in Run()
4317 const char* const glsl_vs = NL in Run()
4318 "layout(location = 0) in vec4 i_position;" NL "out vec4 vs_color;" NL in Run()
4319 "layout(r32f, binding = 0) uniform image2D g_image_vs;" NL "void main() {" NL in Run()
4320 " gl_Position = i_position;" NL " vs_color = vec4(41, 42, 43, 44);" NL in Run()
4321 " imageStore(g_image_vs, ivec2(gl_VertexID), vec4(1.0));" NL in Run()
4322 " imageStore(g_image_vs, ivec2(gl_VertexID), vec4(2.0));" NL in Run()
4323 " imageStore(g_image_vs, ivec2(gl_VertexID), vec4(3.0));" NL in Run()
4324 …ageLoad(g_image_vs, ivec2(gl_VertexID)) != vec4(3,0,0,1)) vs_color = vec4(21, 22, 23, 24);" NL "}"; in Run()
4326 …NL "#define KSIZE 11" NL "in vec4 vs_color;" NL "layout(r32f, binding = 1) uniform image2D g_image… in Run()
4327 … "layout(std430) buffer out_data {" NL " vec4 data[KSIZE*KSIZE*4];" NL "};" NL "void main() {" NL in Run()
4328 " ivec2 coord = ivec2(gl_FragCoord);" NL " int coordIndex = coord.x + KSIZE * coord.y;" NL in Run()
4329 …" for (int i = 0; i < 4; ++i) {" NL " data[coordIndex + i * KSIZE*KSIZE] = vs_color;" NL " }"… in Run()
4330 " for (int i = 0; i < 4; ++i) {" NL " imageStore(g_image, coord, vec4(i+50));" NL in Run()
4331 " vec4 v = imageLoad(g_image, coord);" NL " if (v.x != float(i+50)) {" NL in Run()
4332 … data[coordIndex + i * KSIZE*KSIZE] = vec4(v.xyz, i+10);" NL " break;" NL " }" NL " }" NL in Run()
4407 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Setup()
4409 NL "layout(rgba32f, binding = 2) writeonly uniform image2D g_image[2];" NL "void main() {" NL in Setup()
4410 … " int i = g_image.length();" NL " imageStore(g_image[0], ivec2(gl_FragCoord), vec4(i+98));" NL in Setup()
4411 " imageStore(g_image[1], ivec2(gl_FragCoord), vec4(i+99));" NL " discard;" NL "}"; in Setup()
4413 NL "layout(rgba32f, binding = 0) writeonly uniform image2D g_image[2];" NL "void main() {" NL in Setup()
4414 … " int i = g_image.length();" NL " imageStore(g_image[0], ivec2(gl_FragCoord), vec4(i+8));" NL in Setup()
4415 " imageStore(g_image[1], ivec2(gl_FragCoord), vec4(i+9));" NL " discard;" NL "}"; in Setup()
4468 NL "#define KSIZE 4" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Run()
4469 "layout(rgba32f, binding = 0) readonly uniform image2D g_image[4];" NL in Run()
4470 "layout(std430) buffer OutputBuffer {" NL " uvec4 counter;" NL " vec4 data[];" NL "};" NL in Run()
4471 "void main() {" NL " uint idx = atomicAdd(counter[0], 1u);" NL in Run()
4472 " data[idx][0] = (imageLoad(g_image[0], ivec2(gl_GlobalInvocationID))).z;" NL in Run()
4473 " data[idx][1] = (imageLoad(g_image[1], ivec2(gl_GlobalInvocationID))).z;" NL in Run()
4474 " data[idx][2] = (imageLoad(g_image[2], ivec2(gl_GlobalInvocationID))).z;" NL in Run()
4475 " data[idx][3] = (imageLoad(g_image[3], ivec2(gl_GlobalInvocationID))).z;" NL "}"; in Run()
4544 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Setup()
4546 NL "layout(rgba32f, binding = 3) readonly uniform image2D g_input_image;" NL in Setup()
4547 "layout(rgba32f, binding = 1) writeonly uniform image2D g_output_image;" NL "void main() {" NL in Setup()
4548 " ivec2 coord = ivec2(gl_FragCoord);" NL in Setup()
4549 … " imageStore(g_output_image, coord, imageLoad(g_input_image, coord));" NL " discard;" NL "}"; in Setup()
4551 const char* const glsl_cs = NL in Setup()
4552 "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Setup()
4553 …t(rgba32f, binding = 2) readonly uniform image2D g_image;" NL "layout(std430) buffer out_data {" NL in Setup()
4554 …" vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocatio… in Setup()
4555 " data[gl_LocalInvocationIndex] = imageLoad(g_image, coord);" NL "}"; in Setup()
4633 NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Setup()
4634 "layout(rgba32f, binding = 3) readonly uniform image2D g_input_image;" NL in Setup()
4635 "layout(rgba32f, binding = 1) writeonly uniform image2D g_output_image;" NL "void main() {" NL in Setup()
4636 " ivec2 coord = ivec2(gl_LocalInvocationID);" NL in Setup()
4637 " imageStore(g_output_image, coord, imageLoad(g_input_image, coord));" NL "}"; in Setup()
4639 const char* const glsl_cs_c = NL in Setup()
4640 "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Setup()
4641 …t(rgba32f, binding = 2) readonly uniform image2D g_image;" NL "layout(std430) buffer out_data {" NL in Setup()
4642 …" vec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocatio… in Setup()
4643 " data[gl_LocalInvocationIndex] = imageLoad(g_image, coord);" NL "}"; in Setup()
4717 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Setup()
4719 NL "layout(rgba32f, binding = 0) writeonly uniform image2D g_image[4];" NL "void main() {" NL in Setup()
4720 " imageStore(g_image[0], ivec2(gl_FragCoord), vec4(23));" NL in Setup()
4721 " imageStore(g_image[1], ivec2(gl_FragCoord), vec4(24));" NL in Setup()
4722 " imageStore(g_image[2], ivec2(gl_FragCoord), vec4(25));" NL in Setup()
4723 " imageStore(g_image[3], ivec2(gl_FragCoord), vec4(26));" NL " discard;" NL "}"; in Setup()
4724 const char* const glsl_load_cs = NL in Setup()
4725 "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Setup()
4726 …gba32f, binding = 0) readonly uniform image2D g_image[4];" NL "layout(std430) buffer out_data {" NL in Setup()
4727 …" ivec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocati… in Setup()
4728 …data[gl_LocalInvocationIndex] = ivec4(2, 3, 4, 5);" NL " vec4 c0 = imageLoad(g_image[0], coord);"… in Setup()
4729 " vec4 c1 = imageLoad(g_image[1], coord);" NL " vec4 c2 = imageLoad(g_image[2], coord);" NL in Setup()
4730 " vec4 c3 = imageLoad(g_image[3], coord);" NL in Setup()
4732 "c0.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][0] = int(c0.x);" NL in Setup()
4734 "c1.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][1] = int(c1.x);" NL in Setup()
4736 "c2.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][2] = int(c2.x);" NL in Setup()
4738 "c3.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][3] = int(c3.x);" NL "}"; in Setup()
4810 NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Setup()
4811 "layout(rgba32f, binding = 0) writeonly uniform image2D g_image[4];" NL "void main() {" NL in Setup()
4812 … " ivec2 coord = ivec2(gl_LocalInvocationID);" NL " imageStore(g_image[0], coord, vec4(23));" NL in Setup()
4813 … " imageStore(g_image[1], coord, vec4(24));" NL " imageStore(g_image[2], coord, vec4(25));" NL in Setup()
4814 " imageStore(g_image[3], coord, vec4(26));" NL "}"; in Setup()
4815 const char* const glsl_load_cs = NL in Setup()
4816 "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Setup()
4817 …gba32f, binding = 0) readonly uniform image2D g_image[4];" NL "layout(std430) buffer out_data {" NL in Setup()
4818 …" ivec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocati… in Setup()
4819 …data[gl_LocalInvocationIndex] = ivec4(2, 3, 4, 5);" NL " vec4 c0 = imageLoad(g_image[0], coord);"… in Setup()
4820 " vec4 c1 = imageLoad(g_image[1], coord);" NL " vec4 c2 = imageLoad(g_image[2], coord);" NL in Setup()
4821 " vec4 c3 = imageLoad(g_image[3], coord);" NL in Setup()
4823 "c0.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][0] = int(c0.x);" NL in Setup()
4825 "c1.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][1] = int(c1.x);" NL in Setup()
4827 "c2.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][2] = int(c2.x);" NL in Setup()
4829 "c3.xyz != vec3(0.0)))" NL " data[gl_LocalInvocationIndex][3] = int(c3.x);" NL "}"; in Setup()
4907 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Run()
4909 NL "#define KSIZE 11" NL "layout(r32i, binding = 0) coherent uniform iimage2D g_image0;" NL in Run()
4910 "layout(r32ui, binding = 1) coherent uniform uimage2D g_image1;" NL "void main() {" NL in Run()
4911 " ivec2 coord = ivec2(gl_FragCoord.xy);" NL " imageAtomicAdd(g_image0, coord, 2);" NL in Run()
4912 " imageAtomicAdd(g_image0, coord, -1);" NL " imageAtomicAdd(g_image1, coord, 1u);" NL in Run()
4913 " imageAtomicAdd(g_image1, coord, 2u);" NL "}"; in Run()
4916 const char* const glsl_cs = NL in Run()
4917 "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Run()
4918 "layout(r32i, binding = 0) uniform iimage2D gi_image;" NL in Run()
4919 "layout(r32ui, binding = 1) uniform uimage2D gu_image;" NL "layout(std430) buffer out_data {" NL in Run()
4920 …" ivec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocati… in Run()
4921 " data[gl_LocalInvocationIndex].yx = imageLoad(gi_image, coord).xy;" NL in Run()
4922 " data[gl_LocalInvocationIndex].wz = ivec2(imageLoad(gu_image, coord).xz);" NL "}"; in Run()
5000 NL "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Run()
5001 "layout(r32i, binding = 0) coherent uniform iimage2D g_image0;" NL in Run()
5002 "layout(r32ui, binding = 1) coherent uniform uimage2D g_image1;" NL "void main() {" NL in Run()
5003 " ivec2 coord = ivec2(gl_LocalInvocationID);" NL " imageAtomicAdd(g_image0, coord, 222);" NL in Run()
5004 " imageAtomicAdd(g_image0, coord, -11);" NL " imageAtomicAdd(g_image1, coord, 1u);" NL in Run()
5005 " imageAtomicAdd(g_image1, coord, 2u);" NL "}"; in Run()
5008 const char* const glsl_cs_c = NL in Run()
5009 "#define KSIZE 11" NL "layout (local_size_x = KSIZE, local_size_y = KSIZE) in;" NL in Run()
5010 "layout(r32i, binding = 0) uniform iimage2D gi_image;" NL in Run()
5011 "layout(r32ui, binding = 1) uniform uimage2D gu_image;" NL "layout(std430) buffer out_data {" NL in Run()
5012 …" ivec4 data[KSIZE*KSIZE];" NL "};" NL "void main() {" NL " ivec2 coord = ivec2(gl_LocalInvocati… in Run()
5013 " data[gl_LocalInvocationIndex].yz = imageLoad(gi_image, coord).xw;" NL in Run()
5014 " data[gl_LocalInvocationIndex].wx = ivec2(imageLoad(gu_image, coord).xy);" NL "}"; in Run()
5078 …NL "layout(location = 0) in vec4 i_position;" NL "void main() {" NL " gl_Position = i_position;" … in Run()
5079 …const char* glsl_fs = NL "layout(rgba32f) writeonly uniform image2D g_image;" NL "void main() {" NL in Run()
5080 " ivec2 coord = ivec2(gl_FragCoord.xy);" NL in Run()
5081 " imageStore(g_image, coord, vec4(0.0));" NL " discard;" NL "}"; in Run()
5240 NL "layout(rgba32f) writeonly readonly uniform image2D g_image;" NL "void main() {" NL in Run()
5241 " vec4 o_color;" NL " o_color = imageLoad(g_image, ivec2(0));" NL "}")) in Run()
5245 … NL "layout(rgba32f) writeonly uniform image2D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5246 " o_color = imageLoad(g_image, ivec2(0));" NL "}")) in Run()
5250 …NL "uniform vec4 i_color;" NL "layout(rgba32f) readonly uniform image2D g_image;" NL "void main() … in Run()
5251 …" vec4 o_color;" NL " imageStore(g_image, ivec2(0), i_color);" NL " o_color = i_color;" NL "}")) in Run()
5255 NL "uniform image2D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5256 " o_color = imageLoad(g_image, ivec2(0));" NL "}")) in Run()
5260 NL "readonly uniform image2D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5261 " o_color = imageLoad(g_image, ivec2(0));" NL "}")) in Run()
5265 NL "layout(r32i) uniform image1D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5266 " o_color = vec4(1.0);" NL "}")) in Run()
5270 … NL "layout(rgba16) writeonly uniform iimage2D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5271 " o_color = vec4(1.0);" NL "}")) in Run()
5275 NL "#extension GL_OES_shader_image_atomic : require" NL in Run()
5276 "layout(r32f) coherent uniform image2D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5277 " imageAtomicAdd(g_image, ivec2(1), 10);" NL " o_color = vec4(1.0);" NL "}")) in Run()
5281 NL "#extension GL_OES_shader_image_atomic : require" NL in Run()
5282 … "layout(rgba8i) coherent uniform iimage2D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5283 " imageAtomicAdd(g_image, ivec2(1), 1);" NL " o_color = vec4(1.0);" NL "}")) in Run()
5287 NL "layout(r32ui) uniform iimage3D g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5288 " imageStore(g_image, ivec3(1), ivec4(1));" NL " o_color = vec4(1.0);" NL "}")) in Run()
5292 NL "layout(r32f) uniform uimage2DArray g_image;" NL "void main() {" NL " vec4 o_color;" NL in Run()
5293 " imageStore(g_image, ivec3(0), uvec4(1));" NL " o_color = vec4(1.0);" NL "}")) in Run()
5297 NL "layout(r32f) coherent uniform image2D g_image;" NL "vec4 Load(iimage2D image) {" NL in Run()
5298 " return imageLoad(image, vec2(0));" NL "}" NL "void main() {" NL " vec4 o_color;" NL in Run()
5299 " o_color = Load(g_image);" NL "}")) in Run()
5307 const char* const csVer = "#version 310 es" NL "layout(local_size_x = 1) in;"; in Compile()
5328 const char* const fsVer = "#version 310 es" NL "precision highp float;"; in Compile()
5360 if (!Link(NL "layout(location = 0) in vec4 i_position;" NL in Run()
5361 "layout(rgba32f) writeonly uniform highp image3D g_image;" NL "void main() {" NL in Run()
5362 " imageStore(g_image, ivec3(gl_VertexID), vec4(0));" NL " gl_Position = i_position;" NL "}", in Run()
5364 NL "precision highp float;" NL "layout(location = 0) out vec4 o_color;" NL in Run()
5365 "layout(rgba32f) writeonly uniform highp image2D g_image;" NL "void main() {" NL in Run()
5366 " imageStore(g_image, ivec2(gl_FragCoord), vec4(1.0));" NL " o_color = vec4(1.0);" NL "}")) in Run()
5369 if (!Link(NL "layout(location = 0) in vec4 i_position;" NL in Run()
5370 "layout(rgba32f) writeonly uniform highp image2D g_image;" NL "void main() {" NL in Run()
5371 " imageStore(g_image, ivec2(gl_VertexID), vec4(0));" NL " gl_Position = i_position;" NL "}", in Run()
5373 NL "precision highp float;" NL "layout(location = 0) out vec4 o_color;" NL in Run()
5374 "layout(r32f) writeonly uniform highp image2D g_image;" NL "void main() {" NL in Run()
5375 " imageStore(g_image, ivec2(gl_FragCoord), vec4(1.0));" NL " o_color = vec4(1.0);" NL "}")) in Run()