Lines Matching defs:NL
52 return NL "";
57 return NL "";
62 return NL "";
67 return NL "";
894 return NL "Atomic Counter Buffer - basic operations";
899 return NL
900 "Verify that basic buffer operations work as expected with new buffer target." NL
901 "Tested commands: BindBuffer, BufferData, BufferSubData, MapBuffer, MapBufferRange, UnmapBuffer and" NL
907 return NL "";
912 return NL "";
1007 return NL "Atomic Counter Buffer - state";
1012 return NL "Verify that setting and getting buffer state works as expected for new buffer target.";
1017 return NL "";
1022 return NL "";
1059 return NL "Atomic Counter Buffer - binding";
1064 return NL "Verify that binding buffer objects to ATOMIC_COUNTER_BUFFER (indexed) target" NL
1065 "works as expected. In particualr make sure that binding with BindBufferBase and BindBufferRange" NL
1066 "also bind to generic binding point and deleting buffer that is currently bound unbinds it. Tested" NL
1072 return NL "";
1077 return NL "";
1186 return NL "Program - max values";
1191 return NL "Verify all max values which deal with atomic counter buffers.";
1196 return NL "";
1201 return NL "";
1242 return NL "Program - atomic counters queries";
1247 return NL "Get all the information from the program object about atomic counters." NL
1248 "Verify that all informations are correct. Tested commands: glGetActiveAtomicCounterBufferiv," NL
1254 return NL "";
1259 return NL "";
1277 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
1278 " gl_Position = i_vertex;" NL "}";
1280 "#version 420 core" NL "layout(location = 0, index = 0) out vec4 o_color;" NL
1281 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter0;" NL
1282 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter1;" NL
1283 "layout(binding = 0) uniform atomic_uint ac_counter2;" NL
1284 "layout(binding = 0) uniform atomic_uint ac_counter67[2];" NL
1285 "layout(binding = 0) uniform atomic_uint ac_counter3;" NL
1286 "layout(binding = 0) uniform atomic_uint ac_counter4;" NL
1287 "layout(binding = 0) uniform atomic_uint ac_counter5;" NL "void main() {" NL " uint c = 0;" NL
1288 " c += atomicCounterIncrement(ac_counter0);" NL " c += atomicCounterIncrement(ac_counter1);" NL
1289 " c += atomicCounterIncrement(ac_counter2);" NL " c += atomicCounterIncrement(ac_counter3);" NL
1290 " c += atomicCounterIncrement(ac_counter4);" NL " c += atomicCounterIncrement(ac_counter5);" NL
1291 " c += atomicCounterIncrement(ac_counter67[0]);" NL " c += atomicCounterIncrement(ac_counter67[1]);" NL
1292 " if (c > 10u) o_color = vec4(0.0, 1.0, 0.0, 1.0);" NL " else o_color = vec4(1.0, 0.0, 0.0, 1.0);" NL "}";
1468 return NL "Simple Use Case";
1473 return NL "Verify that simple usage of atomic counters work as expected." NL
1479 return NL "";
1484 return NL "";
1502 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
1503 " gl_Position = i_vertex;" NL "}";
1504 const char* src_fs = "#version 420 core" NL "layout(location = 0) out vec4 o_color;" NL
1505 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter;" NL "void main() {" NL
1506 " uint c = atomicCounterIncrement(ac_counter);" NL
1507 " float r = float(c / 40u) / 255.0;" NL " o_color = vec4(r, 0.0, 0.0, 1.0);" NL "}";
1553 return NL "Atomic Counters usage in the Fragment Shader stage";
1558 return NL "Verify that atomic counters work as expected in the Fragment Shader stage." NL
1559 "In particular make sure that values returned by GLSL built-in functions" NL
1560 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL
1566 return NL "";
1571 return NL "";
1591 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
1592 " gl_Position = i_vertex;" NL "}";
1594 const char* src_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[2];" NL
1595 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL
1596 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL
1597 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL
1598 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}";
1686 return NL "Atomic Counters usage in the Vertex Shader stage";
1691 return NL "Verify that atomic counters work as expected in the Vertex Shader stage." NL
1692 "In particular make sure that values returned by GLSL built-in functions" NL
1693 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL
1699 return NL "";
1704 return NL "";
1736 "#version 420 core" NL "layout(location = 0) in uint i_zero;" NL "out uint o_atomic_inc;" NL
1737 "out uint o_atomic_dec;" NL "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL
1738 "layout(binding = 1, offset = 0) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL
1739 " o_atomic_inc = i_zero + atomicCounterIncrement(ac_counter_inc);" NL
1740 " o_atomic_dec = i_zero + atomicCounterDecrement(ac_counter_dec);" NL "}";
1840 return NL "Atomic Counters usage in the Geometry Shader stage";
1845 return NL "Verify that atomic counters work as expected in the Geometry Shader stage." NL
1846 "In particular make sure that values returned by GLSL built-in functions" NL
1847 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL
1853 return NL "";
1858 return NL "";
1889 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in uint i_zero;" NL "out uint vs_zero;" NL
1890 "void main() {" NL " vs_zero = i_zero;" NL "}";
1892 "#version 420 core" NL "layout(points) in;" NL "in uint vs_zero[];" NL
1893 "layout(points, max_vertices = 1) out;" NL "out uint o_atomic_inc;" NL "out uint o_atomic_dec;" NL
1894 "layout(binding = 0, offset = 8) uniform atomic_uint ac_counter_inc;" NL
1895 "layout(binding = 0, offset = 16) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL
1896 " o_atomic_inc = vs_zero[0] + atomicCounterIncrement(ac_counter_inc);" NL
1897 " o_atomic_dec = vs_zero[0] + atomicCounterDecrement(ac_counter_dec);" NL " EmitVertex();" NL "}";
1989 return NL "Atomic Counters usage in the Tessellation Evaluation Shader stage";
1994 return NL "Verify that atomic counters work as expected in the Tessellation Evaluation Shader stage." NL
1995 "In particular make sure that values returned by GLSL built-in functions" NL
1996 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL
2002 return NL "";
2007 return NL "";
2037 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in uint i_zero;" NL "out uint vs_zero;" NL
2038 "void main() {" NL " vs_zero = i_zero;" NL "}";
2040 "#version 420 core" NL "layout(triangles, equal_spacing, ccw) in;" NL "in uint vs_zero[];" NL
2041 "out uint o_atomic_inc;" NL "out uint o_atomic_dec;" NL
2042 "layout(binding = 0, offset = 128) uniform atomic_uint ac_counter[2];" NL "void main() {" NL
2043 " o_atomic_inc = vs_zero[0] + vs_zero[31] + atomicCounterIncrement(ac_counter[0]);" NL
2044 " o_atomic_dec = vs_zero[0] + vs_zero[31] + atomicCounterDecrement(ac_counter[1]);" NL "}";
2139 return NL "Same atomic counter accessed from multiple shader stages";
2144 return NL "Same atomic counter is incremented (decremented) from two shader stages (VS and FS)." NL
2146 "unique and" NL "final value in atomic counter buffer objects are as expected.";
2151 return NL "";
2156 return NL "";
2189 "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "out uint o_atomic_inc;" NL
2190 "out uint o_atomic_dec;" NL "layout(binding = 1, offset = 16) uniform atomic_uint ac_counter_inc;" NL
2191 "layout(binding = 7, offset = 128) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL
2192 " gl_Position = i_vertex;" NL " o_atomic_inc = atomicCounterIncrement(ac_counter_inc);" NL
2193 " o_atomic_dec = atomicCounterDecrement(ac_counter_dec);" NL "}";
2194 const char* src_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[2];" NL
2195 "layout(binding = 1, offset = 16) uniform atomic_uint ac_counter_inc;" NL
2196 "layout(binding = 7, offset = 128) uniform atomic_uint ac_counter_dec;" NL
2197 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL
2198 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}";
2300 return NL "Update via Draw Call and update via MapBufferRange";
2305 return NL "1. Create atomic counter buffers and init them with start values." NL
2306 "2. Increment (decrement) buffer values in the shader." NL
2307 "3. Map buffers with MapBufferRange command. Increment (decrement) buffer values manually." NL
2308 "4. Unmap buffers with UnmapBuffer command." NL
2309 "5. Again increment (decrement) buffer values in the shader." NL
2315 return NL "";
2320 return NL "";
2340 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
2341 " gl_Position = i_vertex;" NL "}";
2342 const char* src_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[2];" NL
2343 "layout(binding = 0) uniform atomic_uint ac_counter[2];" NL "void main() {" NL
2344 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter[0]));" NL
2345 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter[1]));" NL "}";
2346 const char* src_fs2 = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[2];" NL
2347 "layout(binding = 0) uniform atomic_uint ac_counter[2];" NL "void main() {" NL
2348 " o_color[0] = uvec4(atomicCounter(ac_counter[0]));" NL
2349 " o_color[1] = uvec4(atomicCounter(ac_counter[1]));" NL "}";
2469 return NL "Large atomic counters array indexed with uniforms";
2474 return NL "Verify that large atomic counters array works as expected when indexed with dynamically uniform "
2475 "expressions." NL
2481 return NL "";
2486 return NL "";
2507 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
2508 " gl_Position = i_vertex;" NL "}";
2510 "#version 420 core" NL "layout(location = 0) out uvec4 o_color[8];" NL
2511 "uniform int u_active_counters[8];" NL "layout(binding = 0) uniform atomic_uint ac_counter[8];" NL
2512 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[0]]));" NL
2513 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter[u_active_counters[1]]));" NL
2514 " o_color[2] = uvec4(atomicCounter(ac_counter[u_active_counters[2]]));" NL
2515 " o_color[3] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[3]]));" NL
2516 " o_color[4] = uvec4(atomicCounterDecrement(ac_counter[u_active_counters[4]]));" NL
2517 " o_color[5] = uvec4(atomicCounter(ac_counter[u_active_counters[5]]));" NL
2518 " o_color[6] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[6]]));" NL
2519 " o_color[7] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[7]]));" NL "}";
2656 return NL "Switching several program objects with different atomic counters with different bindings";
2661 return NL "Verify that each program upadate atomic counter buffer object in appropriate binding point.";
2666 return NL "";
2671 return NL "";
2683 os << "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "out uvec4 o_atomic_value;" NL
2686 << ") uniform atomic_uint ac_counter_vs;" NL "void main() {" NL " gl_Position = i_vertex;" NL
2687 " o_atomic_value = uvec4(atomicCounterIncrement(ac_counter_vs));" NL "}";
2693 os << "#version 420 core" NL "layout(location = 0) out uvec4 o_color;" NL "layout(binding = " << binding
2694 << ", offset = " << offset << ") uniform atomic_uint ac_counter_fs;" NL "void main() {" NL
2695 " o_color = uvec4(atomicCounterIncrement(ac_counter_fs));" NL "}";
2815 return NL "Atomic Counters used to access Uniform Buffer Objects";
2820 return NL "Atomic counters are used to access UBOs. In that way each shader invocation can access UBO at "
2821 "unique offset." NL
2827 return NL "";
2832 return NL "";
2854 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
2855 " gl_Position = i_vertex;" NL "}";
2857 "#version 420 core" NL "layout(location = 0) out uvec4 o_color;" NL
2858 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter;" NL "layout(std140) uniform Data {" NL
2859 " uint index[256];" NL "} ub_data;" NL "void main() {" NL
2860 " o_color = uvec4(ub_data.index[atomicCounterIncrement(ac_counter)]);" NL "}";
2938 return NL "Atomic Counters used to access Texture Buffer Objects";
2943 return NL "Atomic counters are used to access TBOs. In that way each shader invocation can access TBO at "
2944 "unique offset." NL
2950 return NL "";
2955 return NL "";
2979 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
2980 " gl_Position = i_vertex;" NL "}";
2982 "#version 420 core" NL "layout(location = 0) out uvec4 o_color;" NL
2983 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter;" NL "uniform usamplerBuffer s_buffer;" NL
2984 "void main() {" NL " o_color = uvec4(texelFetch(s_buffer, int(atomicCounterIncrement(ac_counter))).r);" NL
3067 return NL "GetActiveAtomicCounterBufferiv";
3072 return NL "Verify errors reported by GetActiveAtomicCounterBufferiv command.";
3077 return NL "";
3082 return NL "";
3097 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3098 " gl_Position = i_vertex;" NL "}";
3099 const char* glsl_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[4];" NL
3100 "layout(binding = 0) uniform atomic_uint ac_counter0;" NL "void main() {" NL
3101 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL "}";
3170 return NL "GLSL errors";
3175 return NL "Verify that two different atomic counter uniforms with same binding "
3181 return NL "";
3186 return NL "";
3200 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3201 " gl_Position = i_vertex;" NL "}";
3202 const char* glsl_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[4];" NL
3203 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter0;" NL
3204 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter2;" NL "void main() {" NL
3205 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL
3206 " o_color[2] = uvec4(atomicCounterIncrement(ac_counter2));" NL "}";
3234 return NL "GLSL errors";
3239 return NL "Verify that atomic counters cannot be declared in uniform block.";
3244 return NL "";
3249 return NL "";
3264 const char* glsl_vs = "#version 430 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3265 " gl_Position = i_vertex;" NL "}";
3268 "#version 430 core" NL "layout(location = 0) out uvec4 o_color[4];" NL "uniform Block {" NL
3269 " layout(binding = 0, offset = 0) uniform atomic_uint ac_counter0;" NL "};" NL "void main() {" NL
3270 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL "}";
3320 return NL "GLSL errors";
3325 return NL "Verify that atomic counters cannot be declared in the buffer block.";
3330 return NL "";
3335 return NL "";
3356 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3357 " gl_Position = i_vertex;" NL "}";
3359 const char* glsl_fs1 = "#version 420 core" NL "#extension GL_ARB_shader_storage_buffer_object: require" NL
3360 "layout(location = 0) out uvec4 o_color[4];" NL "layout(binding = 0) buffer Buffer {" NL
3361 " layout(binding = 0, offset = 16) uniform atomic_uint ac_counter0;" NL "};" NL
3362 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL "}";
3412 return NL "GLSL errors";
3417 return NL "Verify that atomicCounterIncrement/atomicCounterDecrement "
3423 return NL "";
3428 return NL "";
3443 const char* glsl_vs = "#version 430 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3444 " gl_Position = i_vertex;" NL "}";
3447 "#version 430 core" NL "layout(location = 0) out uvec4 o_color[4];" NL "uniform uint ac_counter0;" NL
3448 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL "}";
3498 return NL "GLSL errors";
3503 return NL "Verify that atomicCounterIncrement/atomicCounterDecrement "
3509 return NL "";
3514 return NL "";
3529 const char* glsl_vs = "#version 430 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3530 " gl_Position = i_vertex;" NL "}";
3532 const char* glsl_fs1 = "#version 430 core" NL "layout(location = 0) out uvec4 o_color[4];" NL
3533 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter0[3];" NL
3534 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL
3535 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter0));" NL "}";
3585 return NL "GLSL errors";
3590 return NL "Verify that it is compile-time error to declare an unsized array of atomic_uint..";
3595 return NL "";
3600 return NL "";
3605 const char* glsl_fs1 = "#version 450 core" NL "layout(location = 0) out uvec4 o_color[4];"
3606 " layout(binding = 0, offset = 4) uniform atomic_uint ac_counter[];" NL
3607 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter[0]));" NL "}";
3632 return NL "Atomic Counters usage with no offset";
3637 return NL "Verify that atomic counters work as expected in the Fragment Shader when declared with no offset "
3638 "qualifier in layout." NL "In particular make sure that values returned by GLSL built-in functions" NL
3639 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL
3645 return NL "";
3650 return NL "";
3670 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
3671 " gl_Position = i_vertex;" NL "}";
3672 const char* src_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[2];" NL
3673 "layout(binding = 0) uniform atomic_uint ac_counter_inc;" NL
3674 "layout(binding = 0) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL
3675 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL
3676 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}";
3765 return NL "Atomic Counters usage in the Compute Shader stage";
3770 return NL "Verify that atomic counters work as expected in the Compute Shader stage." NL
3771 "In particular make sure that values returned by GLSL built-in functions" NL
3772 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL
3778 return NL "";
3783 return NL "";
3930 NL "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL
3931 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL
3932 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL
3933 "layout(std430) buffer Output {" NL " uint data_inc[256];" NL " uint data_dec[256];" NL "} g_out;" NL
3934 "void main() {" NL " uint offset = 32 * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL
3935 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter_inc);" NL
3936 " g_out.data_dec[offset] = atomicCounterDecrement(ac_counter_dec);" NL "}";
4004 return NL "Atomic Counters usage in multiple draw calls";
4009 return NL "Verify atomic counters behaviour across multiple draw calls.";
4014 return NL "";
4019 return NL "";
4039 const char* src_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
4040 " gl_Position = i_vertex;" NL "}";
4041 const char* src_fs = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[2];" NL
4042 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL
4043 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL
4044 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL
4045 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}";
4140 return NL "GLSL errors";
4145 return NL "Verify that standard arithmetic operations \n"
4151 return NL "";
4156 return NL "";
4170 const char* glsl_vs = "#version 420 core" NL "layout(location = 0) in vec4 i_vertex;" NL "void main() {" NL
4171 " gl_Position = i_vertex;" NL "}";
4173 const char* glsl_fs1 = "#version 420 core" NL "layout(location = 0) out uvec4 o_color[4];" NL
4174 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter;" NL "void main() {" NL
4175 " o_color[0] = ac_counter++;" NL "}";
4225 return NL "GLSL errors";
4230 return NL "Verify that it is compile-time error to declare an atomic counter whose offset \n"
4240 os << "#version 420 core" NL "layout(location = 0) out uvec4 o_color;" NL
4241 "layout(binding = 0, offset = " << maxSize << ") uniform atomic_uint ac_counter_fs;" NL
4242 "void main() {" NL " o_color = uvec4(atomicCounterIncrement(ac_counter_fs)); " NL " }";
4307 const char* const glsl_vs = "#version 420 core" NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL
4308 "void main() {" NL " gl_Position = vec4(0, 0, 0, 1);" NL "}";
4310 "#version 420 core" NL "#extension GL_ARB_shader_storage_buffer_object : require" NL
4311 "layout(binding = 0) uniform atomic_uint g_counter;" NL "layout(std430, binding = 0) buffer Output {" NL
4312 " uint g_output[];" NL "};" NL "void main() {" NL " uint c = atomicCounterIncrement(g_counter);" NL
4313 " g_output[c] = c;" NL "}";
4422 "#version 420 core" NL "#extension GL_ARB_compute_shader : require" NL
4423 "#extension GL_ARB_shader_storage_buffer_object : require" NL "layout(local_size_x = 1) in;" NL
4424 "layout(binding = 0) uniform atomic_uint g_counter;" NL "layout(std430, binding = 0) buffer Output {" NL
4425 " uint g_output[];" NL "};" NL "void main() {" NL " const uint c = atomicCounterIncrement(g_counter);" NL
4426 " g_output[c] = c;" NL "}";
4494 return NL "gl_Max* Check";
4499 return NL "Verify that gl_Max*Counters and gl_Max*Bindings exist in glsl and their values are no lower" NL
4526 const char* const glsl_cs = NL
4527 "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL "layout(std430) buffer Output {" NL
4528 " uint data;" NL "} g_out;" NL "uniform int m_vac;" NL "uniform int m_fac;" NL "uniform int m_csac;" NL
4529 "uniform int m_cac;" NL "uniform int m_abuf;" NL "uniform int m_tcac;" NL "uniform int m_teac;" NL
4530 "uniform int m_gac;" NL "void main() {" NL " uint res = 1u;" NL
4531 " if (gl_MaxVertexAtomicCounters < 0 || gl_MaxVertexAtomicCounters != m_vac)" NL " res = res * 2u;" NL
4532 " if (gl_MaxFragmentAtomicCounters < 0 || gl_MaxFragmentAtomicCounters != m_fac)" NL
4533 " res = res * 3u;" NL
4534 " if (gl_MaxComputeAtomicCounters < 8 || gl_MaxComputeAtomicCounters != m_csac)" NL
4535 " res = res * 5u;" NL
4536 " if (gl_MaxCombinedAtomicCounters < 8 || gl_MaxCombinedAtomicCounters != m_cac)" NL
4537 " res = res * 7u;" NL
4538 " if (gl_MaxAtomicCounterBindings < 1 || gl_MaxAtomicCounterBindings != m_abuf)" NL
4539 " res = res * 11u;" NL
4540 " if (gl_MaxTessControlAtomicCounters < 0 || gl_MaxTessControlAtomicCounters != m_tcac)" NL
4541 " res = res * 13u;" NL
4542 " if (gl_MaxTessEvaluationAtomicCounters < 0 || gl_MaxTessEvaluationAtomicCounters != m_teac)" NL
4543 " res = res * 17u;" NL
4544 " if (gl_MaxGeometryAtomicCounters < 0 || gl_MaxGeometryAtomicCounters != m_gac)" NL
4545 " res = res * 19u;" NL " g_out.data = res;" NL "}";