Lines Matching refs:NL
51 return NL ""; in Title()
55 return NL ""; in Purpose()
59 return NL ""; in Method()
63 return NL ""; in PassCriteria()
790 return NL "Atomic Counters usage in the Compute Shader stage"; in Title()
794 return NL "Verify that atomic counters work as expected in the Compute Shader stage." NL in Purpose()
795 "In particular make sure that values returned by GLSL built-in functions" NL in Purpose()
796 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL in Purpose()
801 return NL ""; in Method()
805 return NL ""; in PassCriteria()
942 const char* const glsl_cs = NL in Run()
943 "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL in Run()
944 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL in Run()
945 …inding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL "layout(std430) buffer Output {" NL in Run()
946 …" mediump uint data_inc[256];" NL " mediump uint data_dec[256];" NL "} g_out;" NL "void main() {… in Run()
947 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
948 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter_inc);" NL in Run()
949 " g_out.data_dec[offset] = atomicCounterDecrement(ac_counter_dec);" NL "}"; in Run()
1021 return NL "Atomic Counter Buffer - basic operations"; in Title()
1025 return NL in Purpose()
1026 "Verify that basic buffer operations work as expected with new buffer target." NL in Purpose()
1027 …ted commands: BindBuffer, BufferData, BufferSubData, MapBuffer, MapBufferRange, UnmapBuffer and" NL in Purpose()
1032 return NL ""; in Method()
1036 return NL ""; in PassCriteria()
1148 return NL "Atomic Counter Buffer - state"; in Title()
1152 return NL "Verify that setting and getting buffer state works as expected for new buffer target."; in Purpose()
1156 return NL ""; in Method()
1160 return NL ""; in PassCriteria()
1190 return NL "Atomic Counter Buffer - binding"; in Title()
1194 return NL "Verify that binding buffer objects to ATOMIC_COUNTER_BUFFER (indexed) target" NL in Purpose()
1195 …works as expected. In particualr make sure that binding with BindBufferBase and BindBufferRange" NL in Purpose()
1196 …so bind to generic binding point and deleting buffer that is currently bound unbinds it. Tested" NL in Purpose()
1201 return NL ""; in Method()
1205 return NL ""; in PassCriteria()
1312 return NL "Program - max values"; in Title()
1316 return NL "Verify all max values which deal with atomic counter buffers."; in Purpose()
1320 return NL ""; in Method()
1324 return NL ""; in PassCriteria()
1357 return NL "Program - atomic counters queries"; in Title()
1361 return NL "Get all the information from the program object about atomic counters." NL in Purpose()
1362 "Verify that all informations are correct. Tested commands:" NL in Purpose()
1367 return NL ""; in Method()
1371 return NL ""; in PassCriteria()
1390 …NL "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL "layout(std430) buffer Ou… in Run()
1391 " mediump vec4 data;" NL "} g_out;" NL in Run()
1392 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter0;" NL in Run()
1393 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter1;" NL in Run()
1394 "layout(binding = 0) uniform atomic_uint ac_counter2;" NL in Run()
1395 "layout(binding = 0) uniform atomic_uint ac_counter67[2];" NL in Run()
1396 "layout(binding = 0) uniform atomic_uint ac_counter3;" NL in Run()
1397 "layout(binding = 0) uniform atomic_uint ac_counter4;" NL in Run()
1398 "layout(binding = 0) uniform atomic_uint ac_counter5;" NL "void main() {" NL in Run()
1399 " mediump uint c = 0u;" NL " c += atomicCounterIncrement(ac_counter0);" NL in Run()
1400 … " c += atomicCounterIncrement(ac_counter1);" NL " c += atomicCounterIncrement(ac_counter2);" NL in Run()
1401 … " c += atomicCounterIncrement(ac_counter3);" NL " c += atomicCounterIncrement(ac_counter4);" NL in Run()
1402 …" c += atomicCounterIncrement(ac_counter5);" NL " c += atomicCounterIncrement(ac_counter67[0]);"… in Run()
1403 " c += atomicCounterIncrement(ac_counter67[1]);" NL in Run()
1404 " if (c > 10u) g_out.data = vec4(0.0, 1.0, 0.0, 1.0);" NL in Run()
1405 " else g_out.data = vec4(1.0, float(c), 0.0, 1.0);" NL "}"; in Run()
1508 return NL "Simple Use Case"; in Title()
1512 return NL "Verify that simple usage of atomic counters work as expected."; in Purpose()
1516 return NL ""; in Method()
1520 return NL ""; in PassCriteria()
1538 …NL "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL "layout(std430) buffer Ou… in Run()
1539 " mediump vec4 color;" NL "} g_out;" NL in Run()
1540 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter;" NL "void main() {" NL in Run()
1541 " mediump uint c = atomicCounterIncrement(ac_counter);" NL in Run()
1542 … " mediump float r = float(c / 40u) / 255.0;" NL " g_out.color = vec4(r, 0.0, 0.0, 1.0);" NL "}"; in Run()
1596 return NL "Atomic Counters usage in the Fragment Shader stage"; in Title()
1600 return NL "Verify that atomic counters work as expected in the Fragment Shader stage." NL in Purpose()
1601 "In particular make sure that values returned by GLSL built-in functions" NL in Purpose()
1602 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL in Purpose()
1607 return NL ""; in Method()
1611 return NL ""; in PassCriteria()
1641 …const char* src_vs = "#version 310 es" NL "layout(location = 0) in vec4 i_vertex;" NL "void main()… in Run()
1642 " gl_Position = i_vertex;" NL "}"; in Run()
1644 const char* src_fs = "#version 310 es" NL "layout(location = 0) out uvec4 o_color[2];" NL in Run()
1645 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL in Run()
1646 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL in Run()
1647 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL in Run()
1648 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}"; in Run()
1735 return NL "Atomic Counters usage in the Vertex Shader stage"; in Title()
1739 return NL "Verify that atomic counters work as expected in the Vertex Shader stage." NL in Purpose()
1740 "In particular make sure that values returned by GLSL built-in functions" NL in Purpose()
1741 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL in Purpose()
1746 return NL ""; in Method()
1750 return NL ""; in PassCriteria()
1783 "#version 310 es" NL "layout(location = 0) in uint i_zero;" NL "flat out uint o_atomic_inc;" NL in Run()
1784 …"flat out uint o_atomic_dec;" NL "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_i… in Run()
1785 "layout(binding = 1, offset = 0) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL in Run()
1786 " o_atomic_inc = i_zero + atomicCounterIncrement(ac_counter_inc);" NL in Run()
1787 " o_atomic_dec = i_zero + atomicCounterDecrement(ac_counter_dec);" NL "}"; in Run()
1900 return NL "Same atomic counter accessed from multiple shader stages"; in Title()
1904 …return NL "Same atomic counter is incremented (decremented) from two shader stages (VS and FS)." NL in Purpose()
1906 "unique and" NL "final value in atomic counter buffer objects are as expected."; in Purpose()
1910 return NL ""; in Method()
1914 return NL ""; in PassCriteria()
1949 "#version 310 es" NL "layout(location = 0) in vec4 i_vertex;" NL "flat out uint o_atomic_inc;" NL in Run()
1950 …"flat out uint o_atomic_dec;" NL "layout(binding = 1, offset = 16) uniform atomic_uint ac_counter_… in Run()
1951 "layout(binding = 7, offset = 128) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL in Run()
1952 " gl_Position = i_vertex;" NL " o_atomic_inc = atomicCounterIncrement(ac_counter_inc);" NL in Run()
1953 " o_atomic_dec = atomicCounterDecrement(ac_counter_dec);" NL "}"; in Run()
1954 const char* src_fs = "#version 310 es" NL "layout(location = 0) out uvec4 o_color[2];" NL in Run()
1955 "layout(binding = 1, offset = 16) uniform atomic_uint ac_counter_inc;" NL in Run()
1956 "layout(binding = 7, offset = 128) uniform atomic_uint ac_counter_dec;" NL in Run()
1957 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL in Run()
1958 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}"; in Run()
2072 return NL "Update via Draw Call and update via MapBufferRange"; in Title()
2076 return NL "1. Create atomic counter buffers and init them with start values." NL in Purpose()
2077 "2. Increment (decrement) buffer values in the shader." NL in Purpose()
2078 "3. Map buffers with MapBufferRange command. Increment (decrement) buffer values manually." NL in Purpose()
2079 "4. Unmap buffers with UnmapBuffer command." NL in Purpose()
2080 "5. Again increment (decrement) buffer values in the shader." NL in Purpose()
2085 return NL ""; in Method()
2089 return NL ""; in PassCriteria()
2120 …const char* src_vs = "#version 310 es" NL "layout(location = 0) in vec4 i_vertex;" NL "void main()… in Run()
2121 " gl_Position = i_vertex;" NL "}"; in Run()
2122 const char* src_fs = "#version 310 es" NL "layout(location = 0) out uvec4 o_color[2];" NL in Run()
2123 "layout(binding = 0) uniform atomic_uint ac_counter[2];" NL "void main() {" NL in Run()
2124 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter[0]));" NL in Run()
2125 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter[1]));" NL "}"; in Run()
2126 const char* src_fs2 = "#version 310 es" NL "layout(location = 0) out uvec4 o_color[2];" NL in Run()
2127 "layout(binding = 0) uniform atomic_uint ac_counter[2];" NL "void main() {" NL in Run()
2128 " o_color[0] = uvec4(atomicCounter(ac_counter[0]));" NL in Run()
2129 " o_color[1] = uvec4(atomicCounter(ac_counter[1]));" NL "}"; in Run()
2248 return NL "Large atomic counters array indexed with uniforms"; in Title()
2252 …return NL "Verify that large atomic counters array works as expected when indexed with dynamically… in Purpose()
2253 "expressions." NL in Purpose()
2258 return NL ""; in Method()
2262 return NL ""; in PassCriteria()
2279 const char* glsl_cs = NL in Run()
2280 …t(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL "layout(std430) buffer Output {" NL in Run()
2281 " mediump uvec4 data1[64];" NL " mediump uvec4 data2[64];" NL " mediump uvec4 data3[64];" NL in Run()
2282 " mediump uvec4 data4[64];" NL " mediump uvec4 data5[64];" NL " mediump uvec4 data6[64];" NL in Run()
2283 " mediump uvec4 data7[64];" NL " mediump uvec4 data8[64];" NL "} g_out;" NL in Run()
2284 …"uniform mediump int u_active_counters[8];" NL "layout(binding = 0) uniform atomic_uint ac_counter… in Run()
2285 …"void main() {" NL " mediump uint offset = 8u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x… in Run()
2286 " g_out.data1[offset] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[0]]));" NL in Run()
2287 " g_out.data2[offset] = uvec4(atomicCounterDecrement(ac_counter[u_active_counters[1]]));" NL in Run()
2288 " g_out.data3[offset] = uvec4(atomicCounter(ac_counter[u_active_counters[2]]));" NL in Run()
2289 " g_out.data4[offset] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[3]]));" NL in Run()
2290 " g_out.data5[offset] = uvec4(atomicCounterDecrement(ac_counter[u_active_counters[4]]));" NL in Run()
2291 " g_out.data6[offset] = uvec4(atomicCounter(ac_counter[u_active_counters[5]]));" NL in Run()
2292 " g_out.data7[offset] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[6]]));" NL in Run()
2293 … " g_out.data8[offset] = uvec4(atomicCounterIncrement(ac_counter[u_active_counters[7]]));" NL "}"; in Run()
2426 return NL "Multidimensional atomic counter array"; in Title()
2430 return NL "Verify that multidimensional atomic counter array works as expected." NL in Purpose()
2435 return NL ""; in Method()
2439 return NL ""; in PassCriteria()
2524 glsl_cs_ = NL in Setup()
2525 "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL in Setup()
2526 "layout(binding = 0) uniform atomic_uint ac_counter[3][5][6];" NL in Setup()
2527 "// Increments all the elements in a one dimensional array using different methods." NL in Setup()
2528 "void incrementCounterArray1D(in atomic_uint arr[6]) {" NL in Setup()
2529 " for (int i = 1; i < 5; i++)" NL in Setup()
2530 " atomicCounterIncrement(arr[i]);" NL in Setup()
2531 " atomicCounterIncrement(arr[0]);" NL in Setup()
2532 " atomicCounterIncrement(arr[5]);" NL in Setup()
2533 "}" NL in Setup()
2534 "// Increments all the elements in a two dimensional counter array using different methods." NL in Setup()
2535 "void incrementCounterArray2D(in atomic_uint arr[5][6]) {" NL in Setup()
2536 " incrementCounterArray1D(arr[1]);" NL in Setup()
2537 " for (int i = 2; i < 5; i++) {" NL in Setup()
2538 " for (int j = 0; j < 5; j++) {" NL in Setup()
2539 " atomicCounterIncrement(arr[i][j]);" NL in Setup()
2540 " }" NL in Setup()
2541 " atomicCounterIncrement(arr[i][5]);" NL in Setup()
2542 " }" NL in Setup()
2543 " for (int i = 0; i < 4; i++)" NL in Setup()
2544 " atomicCounterIncrement(arr[0][i]);" NL in Setup()
2545 " atomicCounterIncrement(arr[0][4]);" NL in Setup()
2546 " atomicCounterIncrement(arr[0][5]);" NL in Setup()
2547 "}" NL in Setup()
2548 "// Increments all the atomic counters once." NL in Setup()
2549 "void main() {" NL in Setup()
2550 " for (int i = 0; i < 2; i++)" NL in Setup()
2551 " incrementCounterArray2D(ac_counter[i]);" NL in Setup()
2552 " for (int i = 0; i < 5; i++)" NL in Setup()
2553 " incrementCounterArray1D(ac_counter[2][i]);" NL in Setup()
2568 glsl_cs_ = NL in Setup()
2569 "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL in Setup()
2570 "layout(binding = 0) uniform atomic_uint ac_counter[3][5][3];" NL in Setup()
2571 "// Increments all the elements in a one dimensional array using different methods." NL in Setup()
2572 "void incrementCounterArray1D(in atomic_uint arr[3]) {" NL in Setup()
2573 " for (int i = 1; i < 3; i++)" NL in Setup()
2574 " atomicCounterIncrement(arr[i]);" NL in Setup()
2575 " atomicCounterIncrement(arr[0]);" NL in Setup()
2576 "}" NL in Setup()
2577 "// Increments all the elements in a two dimensional counter array using different methods." NL in Setup()
2578 "void incrementCounterArray2D(in atomic_uint arr[5][3]) {" NL in Setup()
2579 " incrementCounterArray1D(arr[1]);" NL in Setup()
2580 " for (int i = 2; i < 5; i++) {" NL in Setup()
2581 " for (int j = 0; j < 2; j++) {" NL in Setup()
2582 " atomicCounterIncrement(arr[i][j]);" NL in Setup()
2583 " }" NL in Setup()
2584 " atomicCounterIncrement(arr[i][2]);" NL in Setup()
2585 " }" NL in Setup()
2586 " for (int i = 0; i < 2; i++)" NL in Setup()
2587 " atomicCounterIncrement(arr[0][i]);" NL in Setup()
2588 " atomicCounterIncrement(arr[0][2]);" NL in Setup()
2589 "}" NL in Setup()
2590 "// Increments all the atomic counters once." NL in Setup()
2591 "void main() {" NL in Setup()
2592 " for (int i = 0; i < 2; i++)" NL in Setup()
2593 " incrementCounterArray2D(ac_counter[i]);" NL in Setup()
2594 " for (int i = 0; i < 5; i++)" NL in Setup()
2595 " incrementCounterArray1D(ac_counter[2][i]);" NL in Setup()
2610 glsl_cs_ = NL in Setup()
2611 "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL in Setup()
2612 "layout(binding = 0) uniform atomic_uint ac_counter[2][2][2];" NL in Setup()
2613 "// Increments all the elements in a one dimensional array." NL in Setup()
2614 "void incrementCounterArray1D(in atomic_uint arr[2]) {" NL in Setup()
2615 " atomicCounterIncrement(arr[0]);" NL in Setup()
2616 " atomicCounterIncrement(arr[1]);" NL in Setup()
2617 "}" NL in Setup()
2618 "// Increments all the elements in a two dimensional counter array using different methods." NL in Setup()
2619 "void incrementCounterArray2D(in atomic_uint arr[2][2]) {" NL in Setup()
2620 " incrementCounterArray1D(arr[1]);" NL in Setup()
2621 " for (int i = 0; i < 2; i++) {" NL in Setup()
2622 " atomicCounterIncrement(arr[0][i]);" NL in Setup()
2623 " }" NL in Setup()
2624 "}" NL in Setup()
2625 "// Increments all the atomic counters once." NL in Setup()
2626 "void main() {" NL in Setup()
2627 " incrementCounterArray2D(ac_counter[0]);" NL in Setup()
2628 " for (int i = 0; i < 2; i++)" NL in Setup()
2629 " incrementCounterArray1D(ac_counter[1][i]);" NL in Setup()
2640 …return NL "Switching several program objects with different atomic counters with different binding… in Title()
2644 …return NL "Verify that each program upadate atomic counter buffer object in appropriate binding po… in Purpose()
2648 return NL ""; in Method()
2652 return NL ""; in PassCriteria()
2664 …os << "#version 310 es" NL "layout(location = 0) in vec4 i_vertex;" NL "flat out uvec4 o_atomic_va… in GenVSSrc()
2667 << ") uniform atomic_uint ac_counter_vs;" NL "void main() {" NL " gl_Position = i_vertex;" NL in GenVSSrc()
2668 " o_atomic_value = uvec4(atomicCounterIncrement(ac_counter_vs));" NL "}"; in GenVSSrc()
2674 …os << "#version 310 es" NL "layout(location = 0) out uvec4 o_color;" NL "layout(binding = " << bin… in GenFSSrc()
2675 << ", offset = " << offset << ") uniform atomic_uint ac_counter_fs;" NL "void main() {" NL in GenFSSrc()
2676 " o_color = uvec4(atomicCounterIncrement(ac_counter_fs));" NL "}"; in GenFSSrc()
2795 return NL "Atomic Counters used to access Uniform Buffer Objects"; in Title()
2799 …return NL "Atomic counters are used to access UBOs. In that way each shader invocation can access … in Purpose()
2800 "unique offset." NL in Purpose()
2805 return NL ""; in Method()
2809 return NL ""; in PassCriteria()
2829 …NL "layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL "layout(std430) buffer Ou… in Run()
2830 " mediump uvec4 color[256];" NL "} g_out;" NL in Run()
2831 …out(binding = 0, offset = 0) uniform atomic_uint ac_counter;" NL "layout(std140) uniform Data {" NL in Run()
2832 " mediump uint index[256];" NL "} ub_data;" NL "void main() {" NL in Run()
2833 " mediump uint offset = 16u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
2834 " g_out.color[offset] = uvec4(ub_data.index[atomicCounterIncrement(ac_counter)]);" NL "}"; in Run()
2903 return NL "NegativeAPI"; in Title()
2907 return NL "Verify errors reported by BindBuffer* commands."; in Purpose()
2911 return NL ""; in Method()
2915 return NL ""; in PassCriteria()
2971 return NL "GLSL errors"; in Title()
2975 …return NL "Verify that two different atomic counter uniforms with same binding cannot share same o… in Purpose()
2979 return NL ""; in Method()
2983 return NL ""; in PassCriteria()
2996 const char* const glsl_cs = NL in Run()
2997 "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL in Run()
2998 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter_inc;" NL in Run()
2999 …inding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL "layout(std430) buffer Output {" NL in Run()
3000 …" mediump uint data_inc[256];" NL " mediump uint data_dec[256];" NL "} g_out;" NL "void main() {… in Run()
3001 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
3002 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter_inc);" NL in Run()
3003 " g_out.data_dec[offset] = atomicCounterDecrement(ac_counter_dec);" NL "}"; in Run()
3028 return NL "Atomic Counters usage in multiple draw calls"; in Title()
3032 return NL "Verify atomic counters behaviour across multiple draw calls."; in Purpose()
3036 return NL ""; in Method()
3040 return NL ""; in PassCriteria()
3070 …const char* src_vs = "#version 310 es" NL "layout(location = 0) in vec4 i_vertex;" NL "void main()… in Run()
3071 " gl_Position = i_vertex;" NL "}"; in Run()
3072 const char* src_fs = "#version 310 es" NL "layout(location = 0) out uvec4 o_color[2];" NL in Run()
3073 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_inc;" NL in Run()
3074 "layout(binding = 0, offset = 4) uniform atomic_uint ac_counter_dec;" NL "void main() {" NL in Run()
3075 " o_color[0] = uvec4(atomicCounterIncrement(ac_counter_inc));" NL in Run()
3076 " o_color[1] = uvec4(atomicCounterDecrement(ac_counter_dec));" NL "}"; in Run()
3171 return NL "GLSL errors"; in Title()
3175 return NL "Verify that atomic counters cannot be declared in the buffer block."; in Purpose()
3179 return NL ""; in Method()
3183 return NL ""; in PassCriteria()
3197 NL "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL in Run()
3198 "layout(binding = 0, offset = 0) uniform atomic_uint ac_counter_dec;" NL in Run()
3199 …"layout(std430) buffer Output {" NL " mediump uint data_inc[256];" NL " mediump uint data_dec[25… in Run()
3200 …out(binding = 0, offset = 16) uniform atomic_uint ac_counter0;" NL "} g_out;" NL "void main() {" NL in Run()
3201 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
3202 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter0);" NL in Run()
3203 " g_out.data_dec[offset] = atomicCounterDecrement(ac_counter_dec);" NL "}"; in Run()
3228 return NL "GLSL errors"; in Title()
3232 return NL "Verify that atomic counters cannot be declared in uniform block."; in Purpose()
3236 return NL ""; in Method()
3240 return NL ""; in PassCriteria()
3254 NL "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL "uniform Block {" NL in Run()
3255 " uniform atomic_uint ac_counter;" NL "};" NL "layout(std430) buffer Output {" NL in Run()
3256 " mediump uint data_inc[256];" NL "} g_out;" NL "void main() {" NL in Run()
3257 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
3258 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter);" NL "}"; in Run()
3284 return NL "Atomic Counters usage in the Compute Shader stage"; in Title()
3288 …return NL "Verify that atomic counters work as expected in the Compute Shader stage when decalred … in Purpose()
3289 …"offset qualifier." NL "In particular make sure that values returned by GLSL built-in functions" NL in Purpose()
3290 "atomicCounterIncrement and atomicCounterDecrement are unique in every shader invocation." NL in Purpose()
3295 return NL ""; in Method()
3299 return NL ""; in PassCriteria()
3318 NL "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL in Run()
3319 "layout(binding = 0) uniform atomic_uint ac_counter_inc;" NL in Run()
3320 … "layout(binding = 0) uniform atomic_uint ac_counter_dec;" NL "layout(std430) buffer Output {" NL in Run()
3321 …" mediump uint data_inc[256];" NL " mediump uint data_dec[256];" NL "} g_out;" NL "void main() {… in Run()
3322 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
3323 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter_inc);" NL in Run()
3324 " g_out.data_dec[offset] = atomicCounterDecrement(ac_counter_dec);" NL "}"; in Run()
3396 return NL "GLSL errors"; in Title()
3400 return NL "Verify that atomicCounterIncrement/atomicCounterDecrement " in Purpose()
3405 return NL ""; in Method()
3409 return NL ""; in PassCriteria()
3433 …const char* glsl_vs = "#version 310 es" NL "layout(location = 0) in vec4 i_vertex;" NL "void main(… in Run()
3434 " gl_Position = i_vertex;" NL "}"; in Run()
3437 …"#version 310 es" NL "layout(location = 0) out uvec4 o_color[4];" NL "uniform uint ac_counter0;" NL in Run()
3438 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter0));" NL "}"; in Run()
3487 return NL "GLSL errors"; in Title()
3491 return NL "Verify that atomicCounterIncrement/atomicCounterDecrement " in Purpose()
3496 return NL ""; in Method()
3500 return NL ""; in PassCriteria()
3514 NL "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL in Run()
3515 … "layout(binding = 0) uniform atomic_uint ac_counter[3];" NL "layout(std430) buffer Output {" NL in Run()
3516 " mediump uint data_inc[256];" NL "} g_out;" NL "void main() {" NL in Run()
3517 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
3518 " g_out.data_inc[offset] = atomicCounterIncrement(ac_counter);" NL "}"; in Run()
3543 return NL "GLSL errors"; in Title()
3547 return NL "Verify that standard arithmetic operations \n" in Purpose()
3552 return NL ""; in Method()
3556 return NL ""; in PassCriteria()
3570 NL "layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;" NL in Run()
3571 "layout(binding = 0) uniform atomic_uint ac_counter;" NL "layout(std430) buffer Output {" NL in Run()
3572 " mediump uint data_inc[256];" NL "} g_out;" NL "void main() {" NL in Run()
3573 " mediump uint offset = 32u * gl_GlobalInvocationID.y + gl_GlobalInvocationID.x;" NL in Run()
3574 " g_out.data_inc[offset] = ac_counter + 1;" NL "}"; in Run()
3600 return NL "GLSL errors"; in Title()
3605 return NL "Verify that it is compile-time error to declare an unsized array of atomic_uint.."; in Purpose()
3610 return NL ""; in Method()
3615 return NL ""; in PassCriteria()
3620 const char* glsl_fs1 = "#version 310 es" NL "layout(location = 0) out uvec4 o_color[4];" in Run()
3621 " layout(binding = 0, offset = 4) uniform atomic_uint ac_counter[];" NL in Run()
3622 "void main() {" NL " o_color[0] = uvec4(atomicCounterIncrement(ac_counter[0]));" NL "}"; in Run()
3684 const char* const glsl_vs = "#version 310 es" NL "void main() {" NL "#ifdef GL_ES" NL in Run()
3685 " gl_PointSize = 1.0f;" NL "#endif" NL " gl_Position = vec4(0, 0, 0, 1);" NL "}"; in Run()
3687 "#version 310 es" NL "layout(binding = 0) uniform atomic_uint g_counter;" NL in Run()
3688 …"layout(std430, binding = 0) buffer Output {" NL " uint g_output[];" NL "};" NL "void main() {" NL in Run()
3689 " uint c = atomicCounterIncrement(g_counter);" NL " g_output[c] = c;" NL "}"; in Run()
3788 "#version 310 es" NL "layout(local_size_x = 1) in;" NL in Run()
3789 …ayout(binding = 0) uniform atomic_uint g_counter;" NL "layout(std430, binding = 0) buffer Output {… in Run()
3790 " mediump uint g_output[];" NL "};" NL "void main() {" NL in Run()
3791 " mediump uint c = atomicCounterIncrement(g_counter);" NL " g_output[c] = c;" NL "}"; in Run()
3860 return NL "gl_Max* Check"; in Title()
3864 …return NL "Verify that gl_Max*Counters and gl_Max*Bindings exist in glsl and their values are no l… in Purpose()
3881 const char* const glsl_cs = NL in Run()
3882 …t(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;" NL "layout(std430) buffer Output {" NL in Run()
3883 …" mediump uint data;" NL "} g_out;" NL "uniform mediump int m_vac;" NL "uniform mediump int m_fac… in Run()
3884 "uniform mediump int m_csac;" NL "uniform mediump int m_cac;" NL "uniform mediump int m_abuf;" NL in Run()
3885 "void main() {" NL " mediump uint res = 1u;" NL in Run()
3886 …l_MaxVertexAtomicCounters < 0 || gl_MaxVertexAtomicCounters != m_vac)" NL " res = res * 2u;" NL in Run()
3887 " if (gl_MaxFragmentAtomicCounters < 0 || gl_MaxFragmentAtomicCounters != m_fac)" NL in Run()
3888 " res = res * 3u;" NL in Run()
3889 " if (gl_MaxComputeAtomicCounters < 8 || gl_MaxComputeAtomicCounters != m_csac)" NL in Run()
3890 " res = res * 5u;" NL in Run()
3891 " if (gl_MaxCombinedAtomicCounters < 8 || gl_MaxCombinedAtomicCounters != m_cac)" NL in Run()
3892 " res = res * 7u;" NL in Run()
3893 " if (gl_MaxAtomicCounterBindings < 1 || gl_MaxAtomicCounterBindings != m_abuf)" NL in Run()
3894 " res = res * 11u;" NL " g_out.data = res;" NL "}"; in Run()