Lines Matching refs:NL
656 …NL "layout(std430, binding = 1) buffer InputBuffer {" NL " vec4 position[3];" NL "} g_input_buffe… in Run()
657 "void main() {" NL " gl_Position = g_input_buffer.position[gl_VertexID];" NL "}"; in Run()
659 const char* const glsl_fs = NL "layout(location = 0) out vec4 o_color;" NL "void main() {" NL in Run()
660 " o_color = vec4(0.0, 1.0, 0.0, 1.0);" NL "}"; in Run()
710 …const char* const glsl_cs = NL "layout(local_size_x = 1) in;" NL "buffer Buffer {" NL " int resul… in Run()
711 "void main() {" NL " result = 7;" NL "}"; in Run()
1080 …NL "layout(std430) buffer Buffer {" NL " vec4 position[3];" NL "} g_input_buffer;" NL "void main(… in Run()
1081 " gl_Position = g_input_buffer.position[gl_VertexID];" NL "}", in Run()
1082 NL "coherent buffer Buffer {" NL " buffer vec4 position0;" NL " coherent vec4 position1;" NL in Run()
1083 " restrict readonly vec4 position2;" NL "} g_input_buffer;" NL "void main() {" NL in Run()
1084 " if (gl_VertexID == 0) gl_Position = g_input_buffer.position0;" NL in Run()
1085 " if (gl_VertexID == 1) gl_Position = g_input_buffer.position1;" NL in Run()
1086 " if (gl_VertexID == 2) gl_Position = g_input_buffer.position2;" NL "}", in Run()
1087 …NL "layout(std140, binding = 0) readonly buffer Buffer {" NL " readonly vec4 position[];" NL "};"… in Run()
1088 "void main() {" NL " gl_Position = position[gl_VertexID];" NL "}", in Run()
1089 NL "layout(std430, column_major, std140, std430, row_major, packed, shared) buffer;" NL in Run()
1090 "layout(std430) buffer;" NL "coherent restrict volatile buffer Buffer {" NL in Run()
1091 " restrict coherent vec4 position[];" NL "} g_buffer;" NL "void main() {" NL in Run()
1092 " gl_Position = g_buffer.position[gl_VertexID];" NL "}", in Run()
1093 NL "buffer Buffer {" NL " vec4 position[3];" NL "} g_buffer[1];" NL "void main() {" NL in Run()
1094 " gl_Position = g_buffer[0].position[gl_VertexID];" NL "}", in Run()
1095 NL "layout(shared) coherent buffer Buffer {" NL " restrict volatile vec4 position0;" NL in Run()
1096 …" buffer readonly vec4 position1;" NL " vec4 position2;" NL "} g_buffer[1];" NL "void main() {" … in Run()
1097 " if (gl_VertexID == 0) gl_Position = g_buffer[0].position0;" NL in Run()
1098 " else if (gl_VertexID == 1) gl_Position = g_buffer[0].position1;" NL in Run()
1099 " else if (gl_VertexID == 2) gl_Position = g_buffer[0].position2;" NL "}", in Run()
1100 NL "layout(packed) coherent buffer Buffer {" NL " vec4 position01[];" NL " vec4 position2;" NL in Run()
1101 …"} g_buffer;" NL "void main() {" NL " if (gl_VertexID == 0) gl_Position = g_buffer.position01[0];… in Run()
1102 " else if (gl_VertexID == 1) gl_Position = g_buffer.position01[1];" NL in Run()
1103 " else if (gl_VertexID == 2) gl_Position = g_buffer.position2;" NL "}", in Run()
1104 …NL "layout(std430) coherent buffer Buffer {" NL " coherent vec4 position01[];" NL " vec4 positio… in Run()
1105 "} g_buffer;" NL "void main() {" NL " switch (gl_VertexID) {" NL in Run()
1106 " case 0: gl_Position = g_buffer.position01[0]; break;" NL in Run()
1107 " case 1: gl_Position = g_buffer.position01[1]; break;" NL in Run()
1108 " case 2: gl_Position = g_buffer.position2[gl_VertexID - 2]; break;" NL " }" NL "}", in Run()
1110 const char* const glsl_fs = NL "layout(location = 0) out vec4 o_color;" NL "void main() {" NL in Run()
1111 " o_color = vec4(0.0, 1.0, 0.0, 1.0);" NL "}"; in Run()
1181 NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL "layout(std430) buffer Buffer {" NL in Run()
1182 " vec4 position[3];" NL "} g_input_buffer;" NL "void main() {" NL in Run()
1183 " gl_Position = g_input_buffer.position[gl_VertexID];" NL "}", in Run()
1184 NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL "coherent buffer Buffer {" NL in Run()
1185 … " vec4 position0;" NL " coherent vec4 position1;" NL " restrict readonly vec4 position2;" NL in Run()
1186 "} g_input_buffer;" NL "void main() {" NL in Run()
1187 " if (gl_VertexID == 0) gl_Position = g_input_buffer.position0;" NL in Run()
1188 " if (gl_VertexID == 1) gl_Position = g_input_buffer.position1;" NL in Run()
1189 " if (gl_VertexID == 2) gl_Position = g_input_buffer.position2;" NL "}", in Run()
1190 NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL in Run()
1191 … "layout(std140, binding = 0) readonly buffer Buffer {" NL " readonly vec4 position[];" NL "};" NL in Run()
1192 "void main() {" NL " gl_Position = position[gl_VertexID];" NL "}", in Run()
1193 NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL in Run()
1194 "layout(std430, column_major, std140, std430, row_major, packed, shared) buffer;" NL in Run()
1195 "layout(std430) buffer;" NL "coherent restrict volatile buffer Buffer {" NL in Run()
1196 " restrict coherent vec4 position[];" NL "} g_buffer;" NL "void main() {" NL in Run()
1197 " gl_Position = g_buffer.position[gl_VertexID];" NL "}", in Run()
1198 …NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL "buffer Buffer {" NL " vec4 position[… in Run()
1199 …"} g_buffer[1];" NL "void main() {" NL " gl_Position = g_buffer[0].position[gl_VertexID];" NL "}", in Run()
1200 …NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL "layout(shared) coherent buffer Buffer… in Run()
1201 … " restrict volatile vec4 position0;" NL " readonly vec4 position1;" NL " vec4 position2;" NL in Run()
1202 …"} g_buffer[1];" NL "void main() {" NL " if (gl_VertexID == 0) gl_Position = g_buffer[0].position… in Run()
1203 " else if (gl_VertexID == 1) gl_Position = g_buffer[0].position1;" NL in Run()
1204 " else if (gl_VertexID == 2) gl_Position = g_buffer[0].position2;" NL "}", in Run()
1205 …NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL "layout(packed) coherent buffer Buffer… in Run()
1206 " vec4 position01[];" NL " vec4 position2;" NL "} g_buffer;" NL "void main() {" NL in Run()
1207 " if (gl_VertexID == 0) gl_Position = g_buffer.position01[0];" NL in Run()
1208 " else if (gl_VertexID == 1) gl_Position = g_buffer.position01[1];" NL in Run()
1209 " else if (gl_VertexID == 2) gl_Position = g_buffer.position2;" NL "}", in Run()
1210 …NL "out gl_PerVertex {" NL " vec4 gl_Position;" NL "};" NL "layout(std430) coherent buffer Buffer… in Run()
1211 … " coherent vec4 position01[];" NL " vec4 position2[];" NL "} g_buffer;" NL "void main() {" NL in Run()
1212 " switch (gl_VertexID) {" NL " case 0: gl_Position = g_buffer.position01[0]; break;" NL in Run()
1213 " case 1: gl_Position = g_buffer.position01[1]; break;" NL in Run()
1214 " case 2: gl_Position = g_buffer.position2[gl_VertexID - 2]; break;" NL " }" NL "}", in Run()
1216 const char* const glsl_fs = NL "layout(location = 0) out vec4 o_color;" NL "void main() {" NL in Run()
1217 " o_color = vec4(0.0, 1.0, 0.0, 1.0);" NL "}"; in Run()
1419 …return NL "layout(std430, binding = 0) buffer Input {" NL " float data0;" NL " float data1[3];" … in GetInput430c1()
1420 …" ivec2 data2;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output {" NL " float data… in GetInput430c1()
1421 " float data1[3];" NL " ivec2 data2;" NL "} g_output;" NL "void main() {" NL in GetInput430c1()
1422 " g_output.data0 = g_input.data0;" NL in GetInput430c1()
1423 " for (int i = 0; i < g_input.data1.length(); ++i) g_output.data1[i] = g_input.data1[i];" NL in GetInput430c1()
1424 " g_output.data2 = g_input.data2;" NL "}"; in GetInput430c1()
1463 …return NL "layout(std430, binding = 0) buffer Input {" NL " float data0;" NL " float data1[3];" … in GetInput430c2()
1464 " vec2 data2;" NL " readonly vec3 data3[2];" NL " float data4;" NL "} g_input;" NL in GetInput430c2()
1465 "layout(std430, binding = 1) buffer Output {" NL " float data0;" NL " float data1[3];" NL in GetInput430c2()
1466 … " vec2 data2;" NL " vec3 data3[2];" NL " float data4;" NL "} g_output;" NL "void main() {" NL in GetInput430c2()
1467 " g_output.data0 = g_input.data0;" NL in GetInput430c2()
1468 " for (int i = 0; i < g_input.data1.length(); ++i) g_output.data1[i] = g_input.data1[i];" NL in GetInput430c2()
1469 " g_output.data2 = g_input.data2;" NL in GetInput430c2()
1470 " for (int i = 0; i < g_input.data3.length(); ++i) g_output.data3[i] = g_input.data3[i];" NL in GetInput430c2()
1471 " g_output.data4 = g_input.data4;" NL "}"; in GetInput430c2()
1514 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(column_major) mat2x3 data0;" NL in GetInput430c3()
1515 …" layout(row_major) mat4x2 data1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output … in GetInput430c3()
1516 … " layout(column_major) mat2x3 data0;" NL " layout(row_major) mat4x2 data1;" NL "} g_output;" NL in GetInput430c3()
1517 …"void main() {" NL " g_output.data0 = g_input.data0;" NL " g_output.data1 = g_input.data1;" NL "… in GetInput430c3()
1559 return NL "layout(std430, binding = 0) buffer Input {" NL " mat4x2 data0;" NL " mat2x3 data1;" NL in GetInput430c4()
1560 …" float data2;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output {" NL " mat4x2 dat… in GetInput430c4()
1561 " mat2x3 data1;" NL " float data2;" NL "} g_output;" NL "void main() {" NL in GetInput430c4()
1562 " g_output.data0 = g_input.data0;" NL " g_output.data1 = g_input.data1;" NL in GetInput430c4()
1563 " g_output.data2 = g_input.data2;" NL "}"; in GetInput430c4()
1598 …return NL "layout(std430, binding = 0, row_major) buffer Input {" NL " mat4x2 data0;" NL "} g_inp… in GetInput430c5()
1599 … "layout(std430, binding = 1, row_major) buffer Output {" NL " mat4x2 data0;" NL "} g_output;" NL in GetInput430c5()
1600 "void main() {" NL " g_output.data0 = g_input.data0;" NL "}"; in GetInput430c5()
1719 …return NL "layout(std430, binding = 0) buffer Input {" NL " float data0[2];" NL " float data1[3]… in GetInput430c6()
1720 " vec2 data2;" NL " float data3[5];" NL " vec3 data4[2];" NL " float data5[2];" NL in GetInput430c6()
1721 " mat2 data6[2];" NL " mat3 data7[2];" NL " mat4 data8[2];" NL "} g_input;" NL in GetInput430c6()
1722 "layout(std430, binding = 1) buffer Output {" NL " float data0[2];" NL " float data1[3];" NL in GetInput430c6()
1723 " vec2 data2;" NL " float data3[5];" NL " vec3 data4[2];" NL " float data5[2];" NL in GetInput430c6()
1724 …" mat2 data6[2];" NL " mat3 data7[2];" NL " mat4 data8[2];" NL "} g_output;" NL "void main() {"… in GetInput430c6()
1725 " for (int i = 0; i < g_input.data0.length(); ++i) g_output.data0[i] = g_input.data0[i];" NL in GetInput430c6()
1726 " for (int i = 0; i < g_input.data1.length(); ++i) g_output.data1[i] = g_input.data1[i];" NL in GetInput430c6()
1727 " g_output.data2 = g_input.data2;" NL in GetInput430c6()
1728 " for (int i = 0; i < g_input.data3.length(); ++i) g_output.data3[i] = g_input.data3[i];" NL in GetInput430c6()
1729 " for (int i = 0; i < g_input.data4.length(); ++i) g_output.data4[i] = g_input.data4[i];" NL in GetInput430c6()
1730 " for (int i = 0; i < g_input.data5.length(); ++i) g_output.data5[i] = g_input.data5[i];" NL in GetInput430c6()
1731 " for (int i = 0; i < g_input.data6.length(); ++i) g_output.data6[i] = g_input.data6[i];" NL in GetInput430c6()
1732 " for (int i = 0; i < g_input.data7.length(); ++i) g_output.data7[i] = g_input.data7[i];" NL in GetInput430c6()
1733 … " for (int i = 0; i < g_input.data8.length(); ++i) g_output.data8[i] = g_input.data8[i];" NL "}"; in GetInput430c6()
1797 …return NL "struct Struct0 {" NL " ivec2 m0;" NL "};" NL "struct Struct1 {" NL " vec3 m0;" NL "};… in GetInput430c7()
1798 …"struct Struct3 {" NL " int m0;" NL "};" NL "struct Struct2 {" NL " float m0;" NL " Struct1 m1;… in GetInput430c7()
1799 " Struct0 m2;" NL " int m3;" NL " Struct3 m4;" NL "};" NL in GetInput430c7()
1800 "layout(std430, binding = 0) buffer Input {" NL " int data0;" NL " Struct0 data1;" NL in GetInput430c7()
1801 " float data2;" NL " Struct1 data3;" NL " Struct2 data4[2];" NL "} g_input;" NL in GetInput430c7()
1802 "layout(std430, binding = 1) buffer Output {" NL " int data0;" NL " Struct0 data1;" NL in GetInput430c7()
1803 …" float data2;" NL " Struct1 data3;" NL " Struct2 data4[2];" NL "} g_output;" NL "void main() {… in GetInput430c7()
1804 " g_output.data0 = g_input.data0;" NL " g_output.data1 = g_input.data1;" NL in GetInput430c7()
1805 " g_output.data2 = g_input.data2;" NL " g_output.data3 = g_input.data3;" NL in GetInput430c7()
1806 … " for (int i = 0; i < g_input.data4.length(); ++i) g_output.data4[i] = g_input.data4[i];" NL "}"; in GetInput430c7()
1838 return NL "layout(std140, binding = 0) buffer Input {" NL " float data0[2];" NL "} g_input;" NL in GetInput140c1()
1839 "layout(std140, binding = 1) buffer Output {" NL " float data0[2];" NL "} g_output;" NL in GetInput140c1()
1840 "void main() {" NL in GetInput140c1()
1841 … " for (int i = 0; i < g_input.data0.length(); ++i) g_output.data0[i] = g_input.data0[i];" NL "}"; in GetInput140c1()
1886 …return NL "layout(std140, binding = 0) buffer Input {" NL " float data0;" NL " float data1[3];" … in GetInput140c2()
1887 …" ivec2 data2;" NL "} g_input;" NL "layout(std140, binding = 1) buffer Output {" NL " float data… in GetInput140c2()
1888 " float data1[3];" NL " ivec2 data2;" NL "} g_output;" NL "void main() {" NL in GetInput140c2()
1889 " g_output.data0 = g_input.data0;" NL in GetInput140c2()
1890 " for (int i = 0; i < g_input.data1.length(); ++i) g_output.data1[i] = g_input.data1[i];" NL in GetInput140c2()
1891 " g_output.data2 = g_input.data2;" NL "}"; in GetInput140c2()
1946 …return NL "layout(std140, binding = 0) buffer Input {" NL " float data0;" NL " float data1[3];" … in GetInput140c3()
1947 " vec2 data2;" NL " readonly vec3 data3[2];" NL " float data4;" NL "} g_input;" NL in GetInput140c3()
1948 "layout(std140, binding = 1) buffer Output {" NL " float data0;" NL " float data1[3];" NL in GetInput140c3()
1949 … " vec2 data2;" NL " vec3 data3[2];" NL " float data4;" NL "} g_output;" NL "void main() {" NL in GetInput140c3()
1950 " g_output.data0 = g_input.data0;" NL in GetInput140c3()
1951 " for (int i = 0; i < g_input.data1.length(); ++i) g_output.data1[i] = g_input.data1[i];" NL in GetInput140c3()
1952 " g_output.data2 = g_input.data2;" NL in GetInput140c3()
1953 " for (int i = 0; i < g_input.data3.length(); ++i) g_output.data3[i] = g_input.data3[i];" NL in GetInput140c3()
1954 " g_output.data4 = g_input.data4;" NL "}"; in GetInput140c3()
2006 return NL "layout(std140, binding = 0) buffer Input {" NL " mat4x2 data0;" NL " mat2x3 data1;" NL in GetInput140c4()
2007 …" float data2;" NL "} g_input;" NL "layout(std140, binding = 1) buffer Output {" NL " mat4x2 dat… in GetInput140c4()
2008 " mat2x3 data1;" NL " float data2;" NL "} g_output;" NL "void main() {" NL in GetInput140c4()
2009 " g_output.data0 = g_input.data0;" NL " g_output.data1 = g_input.data1;" NL in GetInput140c4()
2010 " g_output.data2 = g_input.data2;" NL "}"; in GetInput140c4()
2044 …return NL "layout(std140, binding = 0, row_major) buffer Input {" NL " mat4x2 data0;" NL "} g_inp… in GetInput140c5()
2045 … "layout(std140, binding = 1, row_major) buffer Output {" NL " mat4x2 data0;" NL "} g_output;" NL in GetInput140c5()
2046 "void main() {" NL " g_output.data0 = g_input.data0;" NL "}"; in GetInput140c5()
2169 …return NL "layout(std140, binding = 0) buffer Input {" NL " float data0[2];" NL " float data1[3]… in GetInput140c6()
2170 …" vec2 data2;" NL " vec2 data3;" NL " mat2 data4[2];" NL " mat3 data5[2];" NL " mat4 data6[2]… in GetInput140c6()
2171 "} g_input;" NL "layout(std140, binding = 1) buffer Output {" NL " float data0[2];" NL in GetInput140c6()
2172 …" float data1[3];" NL " vec2 data2;" NL " vec2 data3;" NL " mat2 data4[2];" NL " mat3 data5[2… in GetInput140c6()
2173 " mat4 data6[2];" NL "} g_output;" NL "void main() {" NL in GetInput140c6()
2174 " for (int i = 0; i < g_input.data0.length(); ++i) g_output.data0[i] = g_input.data0[i];" NL in GetInput140c6()
2175 " for (int i = 0; i < g_input.data1.length(); ++i) g_output.data1[i] = g_input.data1[i];" NL in GetInput140c6()
2176 " g_output.data2 = g_input.data2;" NL " g_output.data3 = g_input.data3;" NL in GetInput140c6()
2177 " for (int i = 0; i < g_input.data4.length(); ++i) g_output.data4[i] = g_input.data4[i];" NL in GetInput140c6()
2178 " for (int i = 0; i < g_input.data5.length(); ++i) g_output.data5[i] = g_input.data5[i];" NL in GetInput140c6()
2179 … " for (int i = 0; i < g_input.data6.length(); ++i) g_output.data6[i] = g_input.data6[i];" NL "}"; in GetInput140c6()
2225 NL "layout(location = 0) in vec4 g_in_position;" NL in Run()
2226 "layout(std430, binding = 0) coherent buffer VSuint {" NL " uint g_uint_out[4];" NL "};" NL in Run()
2227 "layout(std430, binding = 1) coherent buffer VSint {" NL " int data[4];" NL "} g_int_out;" NL in Run()
2228 …rm uint g_uint_value[8] = uint[8](3u, 1u, 2u, 0x1u, 0x3u, 0x1u, 0x2u, 0x7u);" NL "void main() {" NL in Run()
2229 " gl_Position = g_in_position;" NL NL in Run()
2230 " if (atomicExchange(g_uint_out[gl_VertexID], g_uint_value[1]) != 0u) return;" NL in Run()
2231 " if (atomicAdd(g_uint_out[gl_VertexID], g_uint_value[2]) != 1u) return;" NL in Run()
2232 " if (atomicMin(g_uint_out[gl_VertexID], g_uint_value[1]) != 3u) return;" NL in Run()
2233 " if (atomicMax(g_uint_out[gl_VertexID], g_uint_value[2]) != 1u) return;" NL in Run()
2234 " if (atomicAnd(g_uint_out[gl_VertexID], g_uint_value[3]) != 2u) return;" NL in Run()
2235 " if (atomicOr(g_uint_out[gl_VertexID], g_uint_value[4]) != 0u) return;" NL in Run()
2236 " if (g_uint_value[0] > 0u) {" NL in Run()
2237 " if (atomicXor(g_uint_out[gl_VertexID], g_uint_value[5]) != 3u) return;" NL " }" NL in Run()
2238 " if (atomicCompSwap(g_uint_out[gl_VertexID], g_uint_value[6], g_uint_value[7]) != 2u) {" NL in Run()
2239 " g_uint_out[gl_VertexID] = 1u;" NL " return;" NL " }" NL NL in Run()
2240 " if (atomicExchange(g_int_out.data[gl_VertexID], 1) != 0) return;" NL in Run()
2241 " if (atomicAdd(g_int_out.data[gl_VertexID], 2) != 1) return;" NL in Run()
2242 " if (atomicMin(g_int_out.data[gl_VertexID], 1) != 3) return;" NL in Run()
2243 " if (atomicMax(g_int_out.data[gl_VertexID], 2) != 1) return;" NL in Run()
2244 " if (atomicAnd(g_int_out.data[gl_VertexID], 0x1) != 2) return;" NL in Run()
2245 " if (atomicOr(g_int_out.data[gl_VertexID], 0x3) != 0) return;" NL in Run()
2246 " if (atomicXor(g_int_out.data[gl_VertexID], 0x1) != 3) return;" NL in Run()
2247 " if (atomicCompSwap(g_int_out.data[gl_VertexID], 0x2, 0x7) != 2) {" NL in Run()
2248 " g_int_out.data[gl_VertexID] = 1;" NL " return;" NL " }" NL "}"; in Run()
2250 const char* const glsl_gs = NL in Run()
2251 "layout(points) in;" NL "layout(points, max_vertices = 1) out;" NL in Run()
2252 "layout(std430, binding = 2) coherent buffer GSuint {" NL " uint data[4];" NL "} g_uint_gs;" NL in Run()
2253 "layout(std430, binding = 3) coherent buffer GSint {" NL " int data[4];" NL "} g_int_gs;" NL in Run()
2254 …rm uint g_uint_value[8] = uint[8](3u, 1u, 2u, 0x1u, 0x3u, 0x1u, 0x2u, 0x7u);" NL "void main() {" NL in Run()
2255 …" gl_Position = gl_in[0].gl_Position;" NL " gl_PrimitiveID = gl_PrimitiveIDIn;" NL " EmitVertex… in Run()
2256 " if (atomicExchange(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[1]) != 0u) return;" NL in Run()
2257 " if (atomicAdd(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[2]) != 1u) return;" NL in Run()
2258 " if (atomicMin(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[1]) != 3u) return;" NL in Run()
2259 " if (atomicMax(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[2]) != 1u) return;" NL in Run()
2260 " if (atomicAnd(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[3]) != 2u) return;" NL in Run()
2261 " if (atomicOr(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[4]) != 0u) return;" NL in Run()
2262 " if (g_uint_value[0] > 0u) {" NL in Run()
2263 " if (atomicXor(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[5]) != 3u) return;" NL " }" NL in Run()
2264 …if (atomicCompSwap(g_uint_gs.data[gl_PrimitiveIDIn], g_uint_value[6], g_uint_value[7]) != 2u) {" NL in Run()
2265 " g_uint_gs.data[gl_PrimitiveIDIn] = 1u;" NL " return;" NL " }" NL NL in Run()
2266 " if (atomicExchange(g_int_gs.data[gl_PrimitiveIDIn], 1) != 0) return;" NL in Run()
2267 " if (atomicAdd(g_int_gs.data[gl_PrimitiveIDIn], 2) != 1) return;" NL in Run()
2268 " if (atomicMin(g_int_gs.data[gl_PrimitiveIDIn], 1) != 3) return;" NL in Run()
2269 " if (atomicMax(g_int_gs.data[gl_PrimitiveIDIn], 2) != 1) return;" NL in Run()
2270 " if (atomicAnd(g_int_gs.data[gl_PrimitiveIDIn], 0x1) != 2) return;" NL in Run()
2271 " if (atomicOr(g_int_gs.data[gl_PrimitiveIDIn], 0x3) != 0) return;" NL in Run()
2272 " if (atomicXor(g_int_gs.data[gl_PrimitiveIDIn], 0x1) != 3) return;" NL in Run()
2273 " if (atomicCompSwap(g_int_gs.data[gl_PrimitiveIDIn], 0x2, 0x7) != 2) {" NL in Run()
2274 " g_int_gs.data[gl_PrimitiveIDIn] = 1;" NL " return;" NL " }" NL "}"; in Run()
2277 …NL "layout(location = 0) out vec4 g_fs_out;" NL "layout(std430, binding = 4) coherent buffer FSuin… in Run()
2278 … " uint data[4];" NL "} g_uint_fs;" NL "layout(std430, binding = 5) coherent buffer FSint {" NL in Run()
2279 " int data[4];" NL "} g_int_fs;" NL in Run()
2280 …rm uint g_uint_value[8] = uint[8](3u, 1u, 2u, 0x1u, 0x3u, 0x1u, 0x2u, 0x7u);" NL "void main() {" NL in Run()
2281 " g_fs_out = vec4(0, 1, 0, 1);" NL NL in Run()
2282 " if (atomicExchange(g_uint_fs.data[gl_PrimitiveID], g_uint_value[1]) != 0u) return;" NL in Run()
2283 " if (atomicAdd(g_uint_fs.data[gl_PrimitiveID], g_uint_value[2]) != 1u) return;" NL in Run()
2284 " if (atomicMin(g_uint_fs.data[gl_PrimitiveID], g_uint_value[1]) != 3u) return;" NL in Run()
2285 " if (atomicMax(g_uint_fs.data[gl_PrimitiveID], g_uint_value[2]) != 1u) return;" NL in Run()
2286 " if (atomicAnd(g_uint_fs.data[gl_PrimitiveID], g_uint_value[3]) != 2u) return;" NL in Run()
2287 " if (atomicOr(g_uint_fs.data[gl_PrimitiveID], g_uint_value[4]) != 0u) return;" NL in Run()
2288 " if (g_uint_value[0] > 0u) {" NL in Run()
2289 … " if (atomicXor(g_uint_fs.data[gl_PrimitiveID], g_uint_value[5]) != 3u) return;" NL " }" NL in Run()
2290 … if (atomicCompSwap(g_uint_fs.data[gl_PrimitiveID], g_uint_value[6], g_uint_value[7]) != 2u) {" NL in Run()
2291 " g_uint_fs.data[gl_PrimitiveID] = 1u;" NL " return;" NL " }" NL NL in Run()
2292 " if (atomicExchange(g_int_fs.data[gl_PrimitiveID], 1) != 0) return;" NL in Run()
2293 " if (atomicAdd(g_int_fs.data[gl_PrimitiveID], 2) != 1) return;" NL in Run()
2294 " if (atomicMin(g_int_fs.data[gl_PrimitiveID], 1) != 3) return;" NL in Run()
2295 " if (atomicMax(g_int_fs.data[gl_PrimitiveID], 2) != 1) return;" NL in Run()
2296 " if (atomicAnd(g_int_fs.data[gl_PrimitiveID], 0x1) != 2) return;" NL in Run()
2297 " if (atomicOr(g_int_fs.data[gl_PrimitiveID], 0x3) != 0) return;" NL in Run()
2298 " if (atomicXor(g_int_fs.data[gl_PrimitiveID], 0x1) != 3) return;" NL in Run()
2299 " if (atomicCompSwap(g_int_fs.data[gl_PrimitiveID], 0x2, 0x7) != 2) {" NL in Run()
2300 " g_int_fs.data[gl_PrimitiveID] = 1;" NL " return;" NL " }" NL "}"; in Run()
2399 NL "layout(local_size_x = 4) in;" NL "layout(std430, binding = 2) coherent buffer FSuint {" NL in Run()
2400 … " uint data[4];" NL "} g_uint_fs;" NL "layout(std430, binding = 3) coherent buffer FSint {" NL in Run()
2401 " int data[4];" NL "} g_int_fs;" NL "uniform uint g_uint_value[8];" NL "void main() {" NL in Run()
2402 … " if (atomicExchange(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[1]) != 0u) return;" NL in Run()
2403 " if (atomicAdd(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[2]) != 1u) return;" NL in Run()
2404 " if (atomicMin(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[1]) != 3u) return;" NL in Run()
2405 " if (atomicMax(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[2]) != 1u) return;" NL in Run()
2406 " if (atomicAnd(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[3]) != 2u) return;" NL in Run()
2407 " if (atomicOr(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[4]) != 0u) return;" NL in Run()
2408 " if (g_uint_value[0] > 0u) {" NL in Run()
2409 …if (atomicXor(g_uint_fs.data[gl_LocalInvocationIndex], g_uint_value[5]) != 3u) return;" NL " }" NL in Run()
2411 "{" NL " g_uint_fs.data[gl_LocalInvocationIndex] = 1u;" NL " return;" NL " }" NL in Run()
2412 " if (atomicExchange(g_int_fs.data[gl_LocalInvocationIndex], 1) != 0) return;" NL in Run()
2413 " if (atomicAdd(g_int_fs.data[gl_LocalInvocationIndex], 2) != 1) return;" NL in Run()
2414 " if (atomicMin(g_int_fs.data[gl_LocalInvocationIndex], 1) != 3) return;" NL in Run()
2415 " if (atomicMax(g_int_fs.data[gl_LocalInvocationIndex], 2) != 1) return;" NL in Run()
2416 " if (atomicAnd(g_int_fs.data[gl_LocalInvocationIndex], 0x1) != 2) return;" NL in Run()
2417 " if (atomicOr(g_int_fs.data[gl_LocalInvocationIndex], 0x3) != 0) return;" NL in Run()
2418 " if (atomicXor(g_int_fs.data[gl_LocalInvocationIndex], 0x1) != 3) return;" NL in Run()
2419 " if (atomicCompSwap(g_int_fs.data[gl_LocalInvocationIndex], 0x2, 0x7) != 2) {" NL in Run()
2420 " g_int_fs.data[gl_LocalInvocationIndex] = 1;" NL " return;" NL " }" NL "}"; in Run()
2511 const char* const glsl_vs = NL "layout(location = 0) in vec4 g_in_position;" NL "void main() {" NL in Run()
2512 " gl_Position = g_in_position;" NL "}"; in Run()
2514 const char* const glsl_tcs = NL in Run()
2515 …"layout(vertices = 1) out;" NL "layout(std430, binding = 0) buffer TCSuint {" NL " uint g_uint_ou… in Run()
2516 "};" NL "layout(std430, binding = 1) buffer TCSint {" NL " int data[1];" NL "} g_int_out;" NL in Run()
2517 …rm uint g_uint_value[8] = uint[8](3u, 1u, 2u, 0x1u, 0x3u, 0x1u, 0x2u, 0x7u);" NL "void main() {" NL in Run()
2518 " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;" NL in Run()
2519 …" if (gl_InvocationID == 0) {" NL " gl_TessLevelInner[0] = 1.0;" NL " gl_TessLevelInner[1] … in Run()
2520 " gl_TessLevelOuter[0] = 1.0;" NL " gl_TessLevelOuter[1] = 1.0;" NL in Run()
2521 " gl_TessLevelOuter[2] = 1.0;" NL " gl_TessLevelOuter[3] = 1.0;" NL " }" NL in Run()
2522 " if (atomicAdd(g_uint_out[gl_InvocationID], g_uint_value[0]) != 0u) return;" NL in Run()
2523 " if (atomicExchange(g_uint_out[gl_InvocationID], g_uint_value[0]) != 3u) return;" NL in Run()
2524 " if (atomicMin(g_uint_out[gl_InvocationID], g_uint_value[1]) != 3u) return;" NL in Run()
2525 " if (atomicMax(g_uint_out[gl_InvocationID], g_uint_value[2]) != 1u) return;" NL in Run()
2526 " if (atomicAnd(g_uint_out[gl_InvocationID], g_uint_value[3]) != 2u) return;" NL in Run()
2527 " if (atomicOr(g_uint_out[gl_InvocationID], g_uint_value[4]) != 0u) return;" NL in Run()
2528 " if (g_uint_value[0] > 0u) {" NL in Run()
2529 " if (atomicXor(g_uint_out[gl_InvocationID], g_uint_value[5]) != 3u) return;" NL " }" NL in Run()
2530 " if (atomicCompSwap(g_uint_out[gl_InvocationID], g_uint_value[6], g_uint_value[7]) != 2u) {" NL in Run()
2531 " g_uint_out[gl_InvocationID] = 1u;" NL " return;" NL " }" NL NL in Run()
2532 " if (atomicAdd(g_int_out.data[gl_InvocationID], 3) != 0) return;" NL in Run()
2533 " if (atomicExchange(g_int_out.data[gl_InvocationID], 3) != 3) return;" NL in Run()
2534 " if (atomicMin(g_int_out.data[gl_InvocationID], 1) != 3) return;" NL in Run()
2535 " if (atomicMax(g_int_out.data[gl_InvocationID], 2) != 1) return;" NL in Run()
2536 " if (atomicAnd(g_int_out.data[gl_InvocationID], 0x1) != 2) return;" NL in Run()
2537 " if (atomicOr(g_int_out.data[gl_InvocationID], 0x3) != 0) return;" NL in Run()
2538 " if (atomicXor(g_int_out.data[gl_InvocationID], 0x1) != 3) return;" NL in Run()
2539 " if (atomicCompSwap(g_int_out.data[gl_InvocationID], 0x2, 0x7) != 2) {" NL in Run()
2540 " g_int_out.data[gl_InvocationID] = 1;" NL " return;" NL " }" NL "}"; in Run()
2543 …NL "layout(quads, point_mode) in;" NL "layout(std430, binding = 2) buffer TESuint {" NL " uint da… in Run()
2544 …"} g_uint_tes;" NL "layout(std430, binding = 3) buffer TESint {" NL " int data[1];" NL "} g_int_t… in Run()
2545 …rm uint g_uint_value[8] = uint[8](3u, 1u, 2u, 0x1u, 0x3u, 0x1u, 0x2u, 0x7u);" NL "void main() {" NL in Run()
2546 " gl_Position = gl_in[0].gl_Position;" NL NL in Run()
2547 " if (atomicExchange(g_uint_tes.data[gl_PrimitiveID], g_uint_value[1]) != 0u) return;" NL in Run()
2548 " if (atomicAdd(g_uint_tes.data[gl_PrimitiveID], g_uint_value[2]) != 1u) return;" NL in Run()
2549 " if (atomicMin(g_uint_tes.data[gl_PrimitiveID], g_uint_value[1]) != 3u) return;" NL in Run()
2550 " if (atomicMax(g_uint_tes.data[gl_PrimitiveID], g_uint_value[2]) != 1u) return;" NL in Run()
2551 " if (atomicAnd(g_uint_tes.data[gl_PrimitiveID], g_uint_value[3]) != 2u) return;" NL in Run()
2552 " if (atomicOr(g_uint_tes.data[gl_PrimitiveID], g_uint_value[4]) != 0u) return;" NL in Run()
2553 " if (g_uint_value[0] > 0u) {" NL in Run()
2554 … " if (atomicXor(g_uint_tes.data[gl_PrimitiveID], g_uint_value[5]) != 3u) return;" NL " }" NL in Run()
2555 … if (atomicCompSwap(g_uint_tes.data[gl_PrimitiveID], g_uint_value[6], g_uint_value[7]) != 2u) {" NL in Run()
2556 " g_uint_tes.data[gl_PrimitiveID] = 1u;" NL " return;" NL " }" NL NL in Run()
2557 " if (atomicExchange(g_int_tes.data[gl_PrimitiveID], 1) != 0) return;" NL in Run()
2558 " if (atomicAdd(g_int_tes.data[gl_PrimitiveID], 2) != 1) return;" NL in Run()
2559 " if (atomicMin(g_int_tes.data[gl_PrimitiveID], 1) != 3) return;" NL in Run()
2560 " if (atomicMax(g_int_tes.data[gl_PrimitiveID], 2) != 1) return;" NL in Run()
2561 " if (atomicAnd(g_int_tes.data[gl_PrimitiveID], 0x1) != 2) return;" NL in Run()
2562 " if (atomicOr(g_int_tes.data[gl_PrimitiveID], 0x3) != 0) return;" NL in Run()
2563 " if (atomicXor(g_int_tes.data[gl_PrimitiveID], 0x1) != 3) return;" NL in Run()
2564 " if (atomicCompSwap(g_int_tes.data[gl_PrimitiveID], 0x2, 0x7) != 2) {" NL in Run()
2565 " g_int_tes.data[gl_PrimitiveID] = 1;" NL " return;" NL " }" NL "}"; in Run()
2568 …NL "layout(location = 0) out vec4 g_fs_out;" NL "void main() {" NL " g_fs_out = vec4(0, 1, 0, 1);… in Run()
2682 …NL "layout(location = 0) in vec4 g_in_position;" NL "layout(std430, binding = 0) buffer Buffer {" … in Run()
2683 " uvec4 u[4];" NL " ivec3 i[4];" NL "} g_vs_buffer;" NL "void main() {" NL in Run()
2684 …" gl_Position = g_in_position;" NL " atomicAdd(g_vs_buffer.u[0].x, g_vs_buffer.u[gl_VertexID][1]… in Run()
2685 " atomicAdd(g_vs_buffer.u[0][0], g_vs_buffer.u[gl_VertexID].z);" NL in Run()
2686 " atomicAdd(g_vs_buffer.i[0].x, g_vs_buffer.i[gl_VertexID][1]);" NL in Run()
2687 " atomicAdd(g_vs_buffer.i[0][0], g_vs_buffer.i[gl_VertexID].z);" NL "}"; in Run()
2689 const char* const glsl_gs = NL in Run()
2690 "layout(points) in;" NL "layout(points, max_vertices = 1) out;" NL in Run()
2691 …"layout(std430, binding = 0) buffer Buffer {" NL " uvec4 u[4];" NL " ivec3 i[4];" NL "} g_gs_buf… in Run()
2692 …"void main() {" NL " gl_Position = gl_in[0].gl_Position;" NL " gl_PrimitiveID = gl_PrimitiveIDIn… in Run()
2693 " EmitVertex();" NL " atomicAdd(g_gs_buffer.u[0].x, g_gs_buffer.u[gl_PrimitiveIDIn][1]);" NL in Run()
2694 " atomicAdd(g_gs_buffer.i[0].x, g_gs_buffer.i[gl_PrimitiveIDIn][1]);" NL "}"; in Run()
2696 const char* const glsl_fs = NL in Run()
2697 "layout(location = 0) out vec4 g_fs_out;" NL "layout(std430, binding = 0) buffer Buffer {" NL in Run()
2698 " uvec4 u[4];" NL " ivec3 i[4];" NL "} g_fs_buffer;" NL "void main() {" NL in Run()
2699 …" g_fs_out = vec4(0, 1, 0, 1);" NL " atomicAdd(g_fs_buffer.u[0].x, g_fs_buffer.u[gl_PrimitiveID]… in Run()
2700 " atomicAdd(g_fs_buffer.i[0].x, g_fs_buffer.i[gl_PrimitiveID][1]);" NL "}"; in Run()
2792 …NL "layout(local_size_y = 4) in;" NL "layout(std430) coherent buffer Buffer {" NL " uvec4 u[4];" … in Run()
2793 " ivec3 i[4];" NL "} g_fs_buffer;" NL "void main() {" NL in Run()
2794 " atomicAdd(g_fs_buffer.u[0].x, g_fs_buffer.u[gl_LocalInvocationID.y][2]);" NL in Run()
2795 " atomicAdd(g_fs_buffer.i[0].x, 2 * g_fs_buffer.i[gl_LocalInvocationID.y][1]);" NL in Run()
2796 " atomicAdd(g_fs_buffer.u[0].x, g_fs_buffer.u[gl_LocalInvocationID.y].z);" NL in Run()
2797 " atomicAdd(g_fs_buffer.i[0].x, 2 * g_fs_buffer.i[gl_LocalInvocationID.y].y);" NL "}"; in Run()
2882 …NL "layout(location = 0) in vec4 g_in_position;" NL "layout(std430, binding = 0) buffer Counters {… in Run()
2883 " uint g_uint_counter;" NL " int g_int_counter;" NL "};" NL in Run()
2884 "layout(std430, binding = 1) buffer Output {" NL " uint udata[8];" NL " int idata[8];" NL in Run()
2885 "} g_output;" NL "void main() {" NL " gl_Position = g_in_position;" NL in Run()
2886 " const uint uidx = atomicAdd(g_uint_counter, 1u);" NL in Run()
2887 " const int iidx = atomicAdd(g_int_counter, -1);" NL " g_output.udata[uidx] = uidx;" NL in Run()
2888 " g_output.idata[iidx] = iidx;" NL "}"; in Run()
2891 … NL "layout(location = 0) out vec4 g_fs_out;" NL "layout(std430, binding = 0) buffer Counters {" NL in Run()
2892 " uint g_uint_counter;" NL " int g_int_counter;" NL "};" NL in Run()
2893 "layout(std430, binding = 1) buffer Output {" NL " uint udata[8];" NL " int idata[8];" NL in Run()
2894 "} g_output;" NL "void main() {" NL " g_fs_out = vec4(0, 1, 0, 1);" NL in Run()
2895 " const uint uidx = atomicAdd(g_uint_counter, 1u);" NL in Run()
2896 " const int iidx = atomicAdd(g_int_counter, -1);" NL " g_output.udata[uidx] = uidx;" NL in Run()
2897 " g_output.idata[iidx] = iidx;" NL "}"; in Run()
2994 NL "layout(local_size_x = 2, local_size_y = 2, local_size_z = 2) in;" NL in Run()
2995 "layout(std430, binding = 0) coherent buffer Counters {" NL " uint g_uint_counter;" NL in Run()
2996 …" int g_int_counter;" NL "};" NL "layout(std430, binding = 1) buffer Output {" NL " uint udata[8… in Run()
2997 " int idata[8];" NL "} g_output;" NL "void main() {" NL in Run()
2998 … " uint uidx = atomicAdd(g_uint_counter, 1u);" NL " int iidx = atomicAdd(g_int_counter, -1);" NL in Run()
2999 " g_output.udata[uidx] = uidx;" NL " g_output.idata[iidx] = iidx;" NL "}"; in Run()
3243 return NL "layout(std430, binding = 0) buffer Input {" NL " float data0;" NL "} g_input[4];" NL in GetInputC1()
3244 "layout(std430, binding = 4) buffer Output {" NL " float data0;" NL "} g_output[4];" NL in GetInputC1()
3245 …"void main() {" NL " for (int i = 0; i < 4; ++i) {" NL " g_output[i].data0 = g_input[i].data0;… in GetInputC1()
3246 " }" NL "}"; in GetInputC1()
3320 return NL "layout(std140, binding = 0) buffer Input0 {" NL " float data0[3];" NL "} g_input0;" NL in GetInputC2()
3321 "layout(std430, binding = 1) buffer Input1 {" NL " float data0[3];" NL "} g_input1;" NL in GetInputC2()
3322 "layout(std140, binding = 2) buffer Input2 {" NL " float data0[3];" NL "} g_input2;" NL in GetInputC2()
3323 "layout(std430, binding = 3) buffer Input3 {" NL " float data0[3];" NL "} g_input3;" NL in GetInputC2()
3324 "layout(std140, binding = 4) buffer Output0 {" NL " float data0[3];" NL "} g_output0;" NL in GetInputC2()
3325 "layout(std430, binding = 5) buffer Output1 {" NL " float data0[3];" NL "} g_output1;" NL in GetInputC2()
3326 "layout(std140, binding = 6) buffer Output2 {" NL " float data0[3];" NL "} g_output2;" NL in GetInputC2()
3327 "layout(std430, binding = 7) buffer Output3 {" NL " float data0[3];" NL "} g_output3;" NL in GetInputC2()
3328 "void main() {" NL in GetInputC2()
3329 … " for (int i = 0; i < g_input0.data0.length(); ++i) g_output0.data0[i] = g_input0.data0[i];" NL in GetInputC2()
3330 … " for (int i = 0; i < g_input1.data0.length(); ++i) g_output1.data0[i] = g_input1.data0[i];" NL in GetInputC2()
3331 … " for (int i = 0; i < g_input2.data0.length(); ++i) g_output2.data0[i] = g_input2.data0[i];" NL in GetInputC2()
3332 … for (int i = 0; i < g_input3.data0.length(); ++i) g_output3.data0[i] = g_input3.data0[i];" NL "}"; in GetInputC2()
3460 return NL "layout(std140, binding = 0) buffer Input0 {" NL " int data0;" NL " float data1[5];" NL in GetInputC3()
3461 …" mat3x2 data2;" NL " double data3;" NL " double data4[2];" NL " int data5;" NL " dvec3 data6… in GetInputC3()
3462 …"} g_input0;" NL "layout(std430, binding = 1) buffer Input1 {" NL " int data0;" NL " float data1… in GetInputC3()
3463 …" mat3x2 data2;" NL " double data3;" NL " double data4[2];" NL " int data5;" NL " dvec3 data6… in GetInputC3()
3464 "} g_input1;" NL "struct Struct0 {" NL " int data0;" NL "};" NL in GetInputC3()
3465 …"layout(std140, binding = 2) buffer Input2 {" NL " int data0;" NL " Struct0 data1;" NL "} g_inpu… in GetInputC3()
3466 …"layout(std430, binding = 3) buffer Input3 {" NL " int data0;" NL " Struct0 data1;" NL "} g_inpu… in GetInputC3()
3468 NL "layout(std140, binding = 4) buffer Output0 {" NL " int data0;" NL " float data1[5];" NL in GetInputC3()
3469 …" mat3x2 data2;" NL " double data3;" NL " double data4[2];" NL " int data5;" NL " dvec3 data6… in GetInputC3()
3470 "} g_output0;" NL "layout(std430, binding = 5) buffer Output1 {" NL " int data0;" NL in GetInputC3()
3471 …" float data1[5];" NL " mat3x2 data2;" NL " double data3;" NL " double data4[2];" NL " int da… in GetInputC3()
3472 …" dvec3 data6;" NL "} g_output1;" NL "layout(std140, binding = 6) buffer Output2 {" NL " int dat… in GetInputC3()
3473 " Struct0 data1;" NL "} g_output2;" NL "layout(std430, binding = 7) buffer Output3 {" NL in GetInputC3()
3474 " int data0;" NL " Struct0 data1;" NL "} g_output3;" NL "void main() {" NL in GetInputC3()
3475 " g_output0.data0 = g_input0.data0;" NL in GetInputC3()
3476 … " for (int i = 0; i < g_input0.data1.length(); ++i) g_output0.data1[i] = g_input0.data1[i];" NL in GetInputC3()
3477 " g_output0.data2 = g_input0.data2;" NL " g_output0.data3 = g_input0.data3;" NL in GetInputC3()
3478 … " for (int i = 0; i < g_input0.data4.length(); ++i) g_output0.data4[i] = g_input0.data4[i];" NL in GetInputC3()
3479 " g_output0.data5 = g_input0.data5;" NL " g_output0.data6 = g_input0.data6;" in GetInputC3()
3481 NL " g_output1.data0 = g_input1.data0;" NL in GetInputC3()
3482 … " for (int i = 0; i < g_input1.data1.length(); ++i) g_output1.data1[i] = g_input1.data1[i];" NL in GetInputC3()
3483 " g_output1.data2 = g_input1.data2;" NL " g_output1.data3 = g_input1.data3;" NL in GetInputC3()
3484 … " for (int i = 0; i < g_input1.data4.length(); ++i) g_output1.data4[i] = g_input1.data4[i];" NL in GetInputC3()
3485 " g_output1.data5 = g_input1.data5;" NL " g_output1.data6 = g_input1.data6;" in GetInputC3()
3487 NL " g_output2.data0 = g_input2.data0;" NL " g_output2.data1 = g_input2.data1;" in GetInputC3()
3489 NL " g_output3.data0 = g_input3.data0;" NL " g_output3.data1 = g_input3.data1;" NL "}"; in GetInputC3()
3741 return NL in GetInputC4()
3742 …"struct Struct0 {" NL " ivec2 data0;" NL "};" NL "struct Struct1 {" NL " vec2 data0;" NL " ivec… in GetInputC4()
3743 …"};" NL "struct Struct2 {" NL " int data0;" NL " Struct0 data1;" NL " int data2;" NL " Struct1… in GetInputC4()
3744 " float data4;" NL "};" NL "layout(std140, binding = 0) buffer Input01 {" NL " int data0;" NL in GetInputC4()
3745 …" Struct0 data1[2];" NL " float data2;" NL " Struct1 data3[2];" NL " float data4;" NL " Struc… in GetInputC4()
3746 "} g_input01[2];" NL "layout(std430, binding = 2) buffer Input23 {" NL " int data0;" NL in GetInputC4()
3747 …" Struct0 data1[2];" NL " float data2;" NL " Struct1 data3[2];" NL " float data4;" NL " Struc… in GetInputC4()
3750 NL "layout(std140, binding = 4) buffer Output01 {" NL " int data0;" NL " Struct0 data1[2];" NL in GetInputC4()
3751 …" float data2;" NL " Struct1 data3[2];" NL " float data4;" NL " Struct2 data5;" NL "} g_output… in GetInputC4()
3752 "layout(std430, binding = 6) buffer Output23 {" NL " int data0;" NL " Struct0 data1[2];" NL in GetInputC4()
3753 …" float data2;" NL " Struct1 data3[2];" NL " float data4;" NL " Struct2 data5;" NL "} g_output… in GetInputC4()
3754 "void main() {" NL " for (int b = 0; b < g_input01.length(); ++b) {" NL in GetInputC4()
3755 " g_output01[b].data0 = g_input01[b].data0;" NL in GetInputC4()
3756 …nt i = 0; i < g_input01[b].data1.length(); ++i) g_output01[b].data1[i] = g_input01[b].data1[i];" NL in GetInputC4()
3757 … g_output01[b].data2 = g_input01[b].data2;" NL " g_output01[b].data3[0] = g_input01[b].data3… in GetInputC4()
3758 … g_output01[b].data3[1] = g_input01[b].data3[1];" NL " g_output01[b].data4 = g_input01[b].data4… in GetInputC4()
3759 …" }" NL " g_output01[0].data5 = g_input01[0].data5;" NL " g_output01[1].data5 = g_input01[1].da… in GetInputC4()
3760 … for (int b = 0; b < g_input23.length(); ++b) {" NL " g_output23[b].data0 = g_input23[b].data0… in GetInputC4()
3761 …nt i = 0; i < g_input23[b].data1.length(); ++i) g_output23[b].data1[i] = g_input23[b].data1[i];" NL in GetInputC4()
3762 … g_output23[b].data2 = g_input23[b].data2;" NL " g_output23[b].data3[0] = g_input23[b].data3… in GetInputC4()
3763 … g_output23[b].data3[1] = g_input23[b].data3[1];" NL " g_output23[b].data4 = g_input23[b].data4… in GetInputC4()
3764 …" }" NL " g_output23[0].data5 = g_input23[0].data5;" NL " g_output23[1].data5 = g_input23[1].da… in GetInputC4()
4032 …return NL "layout(std430, binding = 0) buffer Input {" NL " ivec4 data0;" NL " vec3 data1;" NL "… in GetInputOp1()
4033 " ivec4 data3;" NL " vec4 data4;" NL " mat4 data5;" NL "} g_input;" NL in GetInputOp1()
4034 "layout(std430, binding = 1) buffer Output {" NL " ivec4 data0;" NL " vec3 data1;" NL in GetInputOp1()
4035 " uvec4 data2;" NL " ivec4 data3;" NL " vec4 data4;" NL " mat4 data5;" NL "} g_output;" NL in GetInputOp1()
4036 … "uniform vec3 g_value0 = vec3(10, 20, 30);" NL "uniform int g_index1 = 1;" NL "void main() {" NL in GetInputOp1()
4037 " int index0 = 0;" NL " g_output.data0.wzyx = g_input.data0;" NL in GetInputOp1()
4038 " g_output.data1 = g_input.data1.zyx;" NL " g_output.data2.xwy = g_input.data2.wzx;" NL in GetInputOp1()
4039 " g_output.data3.xw = ivec2(10, 20);" NL " g_output.data3.zy = g_input.data3.yw;" NL in GetInputOp1()
4040 " g_output.data4.wx = g_value0.xz;" NL " g_output.data4.wx += g_value0.yy;" NL in GetInputOp1()
4041 " g_output.data4.yz = g_input.data4.xx + g_input.data4.wx;" NL in GetInputOp1()
4042 " g_output.data5[g_index1 - 1].wyzx = vec4(1, 2, 3, 4);" NL in GetInputOp1()
4043 " g_output.data5[g_index1 + index0] = g_input.data5[g_index1].wzyx;" NL in GetInputOp1()
4044 " g_output.data5[1 + g_index1] = g_input.data5[g_index1 + 1].yyyy;" NL in GetInputOp1()
4045 " g_output.data5[5 - g_index1 - 1].wx = g_input.data5[4 - g_index1].xw;" NL "}"; in GetInputOp1()
4132 …return NL "layout(std430, binding = 0) buffer Input {" NL " mat4 data0;" NL " mat4 data1;" NL "}… in GetInputOp2()
4133 …"layout(std430, binding = 1) buffer Output {" NL " mat4 data0;" NL " vec4 data1;" NL "} g_output… in GetInputOp2()
4134 "uniform int g_index2 = 2;" NL "void main() {" NL in GetInputOp2()
4135 " g_output.data0 = matrixCompMult(g_input.data0, g_input.data1);" NL in GetInputOp2()
4136 " g_output.data1 = g_input.data0[1] + g_input.data1[g_index2];" NL "}"; in GetInputOp2()
4368 return NL in GetInputUBO1()
4369 "layout(std140, binding = 0) uniform InputUBO {" NL " float data0;" NL " float data1[2];" NL in GetInputUBO1()
4370 "} g_input_ubo;" NL "layout(std430, binding = 0) buffer InputSSBO {" NL " float data0;" NL in GetInputUBO1()
4371 " float data1[2];" NL "} g_input_ssbo;" NL "layout(std140, binding = 1) buffer OutputUBO {" NL in GetInputUBO1()
4372 " float data0;" NL " float data1[2];" NL "} g_output_ubo;" NL in GetInputUBO1()
4373 "layout(std430, binding = 2) buffer OutputSSBO {" NL " float data0;" NL " float data1[2];" NL in GetInputUBO1()
4374 "} g_output_ssbo;" NL "void main() {" NL " g_output_ubo.data0 = g_input_ubo.data0;" NL in GetInputUBO1()
4375 … (int i = 0; i < g_input_ubo.data1.length(); ++i) g_output_ubo.data1[i] = g_input_ubo.data1[i];" NL in GetInputUBO1()
4376 " g_output_ssbo.data0 = g_input_ssbo.data0;" NL in GetInputUBO1()
4377 …nt i = 0; i < g_input_ssbo.data1.length(); ++i) g_output_ssbo.data1[i] = g_input_ssbo.data1[i];" NL in GetInputUBO1()
4518 return NL in GetInputUBO2()
4519 …"struct MM {" NL " float mm_a[5];" NL "};" NL "struct TT {" NL " int tt_a;" NL " MM tt_b[4];" … in GetInputUBO2()
4520 …"layout(std140, binding = 0) uniform InputUBO {" NL " vec4 a;" NL " vec4 b;" NL " float c;" NL in GetInputUBO2()
4521 …" float d[4];" NL " TT e[3];" NL "} g_input_ubo;" NL "layout(std430, binding = 0) buffer Inpu… in GetInputUBO2()
4522 …" vec4 a;" NL " vec4 b;" NL " float c;" NL " float d[4];" NL " TT e[3];" NL "} g_input_s… in GetInputUBO2()
4523 …"layout(std140, binding = 1) buffer OutputUBO {" NL " vec4 a;" NL " vec4 b;" NL " float c;" NL in GetInputUBO2()
4524 …" float d[4];" NL " TT e[3];" NL "} g_output_ubo;" NL "layout(std430, binding = 2) buffer Out… in GetInputUBO2()
4525 …" vec4 a;" NL " vec4 b;" NL " float c;" NL " float d[4];" NL " TT e[3];" NL "} g_output_… in GetInputUBO2()
4526 "uniform int g_index1 = 1;" NL "void main() {" NL " int index0 = 0;" NL NL in GetInputUBO2()
4527 " g_output_ubo.a = g_input_ubo.a;" NL " g_output_ubo.b = g_input_ubo.b;" NL in GetInputUBO2()
4528 " g_output_ubo.c = g_input_ubo.c;" NL in GetInputUBO2()
4529 " for (int i = 0; i < g_input_ubo.d.length(); ++i) g_output_ubo.d[i] = g_input_ubo.d[i];" NL in GetInputUBO2()
4530 " for (int j = 0; j < g_input_ubo.e.length(); ++j) {" NL in GetInputUBO2()
4531 " g_output_ubo.e[j].tt_a = g_input_ubo.e[j].tt_a;" NL in GetInputUBO2()
4532 " for (int i = 0; i < g_input_ubo.e[j].tt_b.length(); ++i) {" NL in GetInputUBO2()
4533 " g_output_ubo.e[j].tt_b[i].mm_a[0] = g_input_ubo.e[j].tt_b[i].mm_a[0];" NL in GetInputUBO2()
4534 " g_output_ubo.e[j].tt_b[index0 + i].mm_a[1] = g_input_ubo.e[j].tt_b[i].mm_a[1];" NL in GetInputUBO2()
4535 " g_output_ubo.e[j].tt_b[i].mm_a[2] = g_input_ubo.e[j].tt_b[i].mm_a[2 + index0];" NL in GetInputUBO2()
4537 …"g_index1];" NL " g_output_ubo.e[j].tt_b[i].mm_a[4] = g_input_ubo.e[j].tt_b[i - index0].mm_a[… in GetInputUBO2()
4538 …" }" NL " }" NL NL " g_output_ssbo.a = g_input_ssbo.a;" NL " g_output_ssbo.b = g_input_ssbo.… in GetInputUBO2()
4539 " g_output_ssbo.c = g_input_ssbo.c;" NL in GetInputUBO2()
4540 " for (int i = 0; i < g_input_ssbo.d.length(); ++i) g_output_ssbo.d[i] = g_input_ssbo.d[i];" NL in GetInputUBO2()
4541 " for (int j = 0; j < g_input_ssbo.e.length(); ++j) {" NL in GetInputUBO2()
4542 " g_output_ssbo.e[j].tt_a = g_input_ssbo.e[j].tt_a;" NL in GetInputUBO2()
4543 " for (int i = 0; i < g_input_ssbo.e[j].tt_b.length(); ++i) {" NL in GetInputUBO2()
4544 " g_output_ssbo.e[j + index0].tt_b[i].mm_a[0] = g_input_ssbo.e[j].tt_b[i].mm_a[index0];" NL in GetInputUBO2()
4545 " g_output_ssbo.e[j].tt_b[i + index0].mm_a[1] = g_input_ssbo.e[j].tt_b[i].mm_a[g_index1];" NL in GetInputUBO2()
4546 " g_output_ssbo.e[j].tt_b[i].mm_a[2] = g_input_ssbo.e[j].tt_b[i].mm_a[1 + g_index1];" NL in GetInputUBO2()
4548 …"g_index1];" NL " g_output_ssbo.e[j].tt_b[i].mm_a[4] = g_input_ssbo.e[j].tt_b[i].mm_a[4];" NL… in GetInputUBO2()
4549 " }" NL "}"; in GetInputUBO2()
4756 …return NL "layout(std430, binding = 0) buffer Input {" NL " mat2 m0;" NL " mat2 m1;" NL "} g_inp… in GetInputM1()
4757 "layout(std430, binding = 1) buffer Output {" NL " mat2 m;" NL "} g_output;" NL in GetInputM1()
4804 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(column_major) mat3x2 m0;" NL in GetInputM2()
4805 …" layout(column_major) mat2x3 m1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output … in GetInputM2()
4806 " layout(column_major) mat2 m;" NL "} g_output;" NL in GetInputM2()
4853 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(row_major) mat3x2 m0;" NL in GetInputM3()
4854 …" layout(row_major) mat2x3 m1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output {" … in GetInputM3()
4855 …" layout(row_major) mat2 m;" NL "} g_output;" NL "void main() { g_output.m = g_input.m0 * g_input… in GetInputM3()
4901 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(column_major) mat3x2 m0;" NL in GetInputM4()
4902 …" layout(row_major) mat2x3 m1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output {" … in GetInputM4()
4903 " layout(column_major) mat2 m;" NL "} g_output;" NL in GetInputM4()
4950 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(column_major) mat3x2 m0;" NL in GetInputM5()
4951 …" layout(row_major) mat2x3 m1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output {" … in GetInputM5()
4952 …" layout(row_major) mat2 m;" NL "} g_output;" NL "void main() { g_output.m = g_input.m0 * g_input… in GetInputM5()
4998 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(row_major) mat3x2 m0;" NL in GetInputM6()
4999 …" layout(column_major) mat2x3 m1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output … in GetInputM6()
5000 " layout(column_major) mat2 m;" NL "} g_output;" NL in GetInputM6()
5046 return NL "layout(std430, binding = 0) buffer Input {" NL " layout(row_major) mat3x2 m0;" NL in GetInputM7()
5047 …" layout(column_major) mat2x3 m1;" NL "} g_input;" NL "layout(std430, binding = 1) buffer Output … in GetInputM7()
5048 …" layout(row_major) mat2 m;" NL "} g_output;" NL "void main() { g_output.m = g_input.m0 * g_input… in GetInputM7()
5098 …st char* const glsl_vs = "#version 430 core" NL "layout(std430) buffer Output0 { int data; } g_out… in Run()
5099 "layout(std430) buffer Output1 { int g_output1; };" NL in Run()
5100 "layout(std430) buffer Output2 { int data; } g_output2;" NL "void main() {" NL in Run()
5101 " g_output0.data = 1;" NL " g_output1 = 2;" NL " g_output2.data = 3;" NL "}"; in Run()
5157 NL "layout(local_size_x = 1) in;" NL "layout(std430, binding = 0) buffer Input {" NL in Run()
5158 " readonly writeonly int g_in[];" NL "};" NL "layout(std430, binding = 1) buffer Output {" NL in Run()
5159 … " int count;" NL "} g_output;" NL "void main() {" NL " g_output.count = g_in.length();" NL "}"; in Run()
5309 NL "struct VertexData {" NL " vec2 position;" NL " vec3 color;" NL "};" NL in Run()
5310 "layout(binding = 0, std430) buffer Input {" NL " VertexData vertex[];" NL "} g_vs_in;" NL in Run()
5311 "out StageData {" NL " vec3 color;" NL "} g_vs_out;" NL "void main() {" NL in Run()
5312 " gl_Position = vec4(g_vs_in.vertex[gl_VertexID].position, 0, 1);" NL in Run()
5313 " g_vs_out.color = g_vs_in.vertex[gl_VertexID].color;" NL "}"; in Run()
5316 …NL "in StageData {" NL " vec3 color;" NL "} g_fs_in;" NL "layout(location = 0) out vec4 g_fs_out;… in Run()
5317 "void main() {" NL " g_fs_out = vec4(g_fs_in.color, 1);" NL "}"; in Run()
5444 …NL "layout(local_size_x = 1) in;" NL "layout(binding = 0, std430) buffer Input {" NL " uint cooki… in Run()
5445 "} g_in;" NL "layout(binding = 1, std430) buffer Output {" NL " uvec4 digest;" NL "} ;" NL in Run()
5446 … "void main() {" NL " switch (g_in.cookie[0]+g_in.cookie[1]+g_in.cookie[2]+g_in.cookie[3]) {" NL in Run()
5447 " case 0x000000ffu: digest.x = 0xff000000u; break;" NL in Run()
5448 " case 0x0000ff00u: digest.y = 0x00ff0000u; break;" NL in Run()
5449 " case 0x00ff0000u: digest.z = 0x0000ff00u; break;" NL in Run()
5450 " case 0xff000000u: digest.w = 0x000000ffu; break;" NL " }" NL "}"; in Run()
5561 …ss << NL "struct VertexData {" NL " vec2 position;" NL " vec3 color;" NL "};" NL "layout(binding… in GenSource()
5562 …<< binding << ", std430) buffer Input {" NL " VertexData vertex[];" NL "} g_vs_in;" NL "out Stage… in GenSource()
5563 " vec3 color;" NL "} g_vs_out;" NL "void main() {" NL in GenSource()
5564 " gl_Position = vec4(g_vs_in.vertex[gl_VertexID].position, 0, 1);" NL in GenSource()
5565 " g_vs_out.color = g_vs_in.vertex[gl_VertexID].color;" NL "}"; in GenSource()
5585 …NL "in StageData {" NL " vec3 color;" NL "} g_fs_in;" NL "layout(location = 0) out vec4 g_fs_out;… in Run()
5586 "void main() {" NL " g_fs_out = vec4(g_fs_in.color, 1);" NL "}"; in Run()
5707 ss << NL "layout(local_size_x = 1) in;" NL "layout(binding = " << binding in GenSource()
5708 << ", std430) buffer Input {" NL " uint cookie[4];" NL "} g_in;" NL in GenSource()
5709 … "layout(binding = 0, std430) buffer Output {" NL " uvec4 digest;" NL "} ;" NL "void main() {" NL in GenSource()
5710 " switch (g_in.cookie[0]+g_in.cookie[1]+g_in.cookie[2]+g_in.cookie[3]) {" NL in GenSource()
5711 " case 0x000000ffu: digest.x = 0xff000000u; break;" NL in GenSource()
5712 " case 0x0000ff00u: digest.y = 0x00ff0000u; break;" NL in GenSource()
5713 " case 0x00ff0000u: digest.z = 0x0000ff00u; break;" NL in GenSource()
5714 " case 0xff000000u: digest.w = 0x000000ffu; break;" NL " }" NL "}"; in GenSource()
5809 const char* const glsl_vs0 = NL in Run()
5810 "out StageData {" NL " vec2 position;" NL " vec3 color;" NL "} g_vs_out;" NL in Run()
5811 …t vec2 g_quad[4] = vec2[4](vec2(-0.4, -0.4), vec2(0.4, -0.4), vec2(-0.4, 0.4), vec2(0.4, 0.4));" NL in Run()
5812 …vec2 g_offset[4] = vec2[4](vec2(-0.5, -0.5), vec2(0.5, -0.5), vec2(-0.5, 0.5), vec2(0.5, 0.5));" NL in Run()
5813 "const vec3 g_color[4] = vec3[4](vec3(1, 0, 0), vec3(0, 1, 0), vec3(0, 0, 1), vec3(1, 1, 0));" NL in Run()
5814 "void main() {" NL " vec2 pos = g_quad[gl_VertexID] + g_offset[gl_InstanceID];" NL in Run()
5815 " gl_Position = vec4(pos, 0, 1);" NL " g_vs_out.position = pos;" NL in Run()
5816 " g_vs_out.color = g_color[gl_InstanceID];" NL "}"; in Run()
5819 NL "in StageData {" NL " vec2 position;" NL " vec3 color;" NL "} g_fs_in;" NL in Run()
5820 "layout(location = 0) out vec4 g_fs_out;" NL "struct FragmentData {" NL " vec2 position;" NL in Run()
5821 " vec3 color;" NL "};" NL "layout(std430, binding = 3) buffer Output {" NL in Run()
5822 " FragmentData g_fragment[];" NL "};" NL "uniform uint g_max_fragment_count = 100 * 100;" NL in Run()
5823 … "layout(binding = 2, offset = 0) uniform atomic_uint g_fragment_counter;" NL "void main() {" NL in Run()
5824 " uint fragment_number = atomicCounterIncrement(g_fragment_counter);" NL in Run()
5825 " if (fragment_number < g_max_fragment_count) {" NL in Run()
5826 " g_fragment[fragment_number].position = g_fs_in.position;" NL in Run()
5827 " g_fragment[fragment_number].color = g_fs_in.color;" NL " }" NL in Run()
5828 " g_fs_out = vec4(g_fs_in.color, 1);" NL "}"; in Run()
5836 NL "layout(location = 0) in vec4 g_in_position;" NL "layout(location = 1) in vec4 g_in_color;" NL in Run()
5837 "out StageData {" NL " vec3 color;" NL "} g_vs_out;" NL "void main() {" NL in Run()
5838 … " gl_Position = vec4(g_in_position.xy, 0, 1);" NL " g_vs_out.color = g_in_color.rgb;" NL "}"; in Run()
5841 …NL "in StageData {" NL " vec3 color;" NL "} g_fs_in;" NL "layout(location = 0) out vec4 g_fs_out;… in Run()
5842 "void main() {" NL " g_fs_out = vec4(g_fs_in.color, 1);" NL "}"; in Run()
5957 const char* const glsl_vs = NL "layout(location = 0) in vec4 g_in_position;" NL "void main() {" NL in Run()
5958 " gl_Position = g_in_position;" NL "}"; in Run()
5961 NL "layout(triangles) in;" NL "layout(triangle_strip, max_vertices = 3) out;" NL in Run()
5962 "layout(std430, binding = 1) buffer OutputBuffer {" NL " vec4 g_output_buffer[];" NL "};" NL in Run()
5963 "void main() {" NL " for (int i = 0; i < 3; ++i) {" NL in Run()
5964 …" const int idx = gl_PrimitiveIDIn * 3 + i;" NL " g_output_buffer[idx] = gl_in[i].gl_Positio… in Run()
5965 " gl_Position = g_output_buffer[idx];" NL " EmitVertex();" NL " }" NL "}"; in Run()
5968 …NL "layout(location = 0) out vec4 g_fs_out;" NL "void main() {" NL " g_fs_out = vec4(0, 1, 0, 1);… in Run()
6069 const char* const glsl_vs = NL "layout(location = 0) in vec4 g_in_position;" NL "void main() {" NL in Run()
6070 " gl_Position = g_in_position;" NL "}"; in Run()
6073 … NL "layout(quads) in;" NL "struct VertexData {" NL " int valid;" NL " vec4 position;" NL "};" NL in Run()
6074 …"layout(std430, binding = 2) buffer VertexBuffer {" NL " VertexData g_vertex_buffer[];" NL "};" NL in Run()
6075 "layout(binding = 2, offset = 0) uniform atomic_uint g_vertex_counter;" NL "void main() {" NL in Run()
6076 " const uint idx = atomicCounterIncrement(g_vertex_counter);" NL in Run()
6077 " vec4 p0 = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);" NL in Run()
6078 " vec4 p1 = mix(gl_in[3].gl_Position, gl_in[2].gl_Position, gl_TessCoord.x);" NL in Run()
6079 " vec4 p = mix(p0, p1, gl_TessCoord.y);" NL " g_vertex_buffer[idx].position = p;" NL in Run()
6080 … " g_vertex_buffer[idx].valid = 1;" NL " gl_Position = g_vertex_buffer[idx].position;" NL "}"; in Run()
6083 …NL "layout(location = 0) out vec4 g_fs_out;" NL "void main() {" NL " g_fs_out = vec4(0, 1, 0, 1);… in Run()
6189 …NL "layout(location = 0) in vec2 g_in_position;" NL "struct Material {" NL " vec3 color;" NL "};"… in Run()
6190 … "layout(binding = 0, std430) buffer MaterialBuffer {" NL " Material g_material[4];" NL "};" NL in Run()
6191 … "layout(binding = 1, std430) buffer MaterialIDBuffer {" NL " uint g_material_id[4];" NL "};" NL in Run()
6192 …out(binding = 2, std430) buffer TransformBuffer {" NL " vec2 translation[4];" NL "} g_transform;"… in Run()
6193 … "layout(binding = 3, std430) buffer TransformIDBuffer {" NL " uint g_transform_id[4];" NL "};" NL in Run()
6194 "out StageData {" NL " vec3 color;" NL "} g_vs_out;" NL "void main() {" NL in Run()
6195 " const uint mid = g_material_id[gl_InstanceID];" NL " Material m = g_material[mid];" NL in Run()
6196 …" const uint tid = g_transform_id[gl_InstanceID];" NL " vec2 t = g_transform.translation[tid];" … in Run()
6197 " gl_Position = vec4(g_in_position + t, 0, 1);" NL " g_vs_out.color = m.color;" NL "}"; in Run()
6200 …NL "in StageData {" NL " vec3 color;" NL "} g_fs_in;" NL "layout(location = 0) out vec4 g_fs_out;… in Run()
6201 "void main() {" NL " g_fs_out = vec4(g_fs_in.color, 1);" NL "}"; in Run()
6329 …NL "layout(local_size_x = 2, local_size_y = 2) in;" NL "struct Material {" NL " vec3 color;" NL "… in Run()
6330 … "layout(binding = 0, std430) buffer MaterialBuffer {" NL " Material g_material[4];" NL "};" NL in Run()
6331 … "layout(binding = 1, std430) buffer MaterialIDBuffer {" NL " uint g_material_id[4];" NL "};" NL in Run()
6332 …out(binding = 2, std430) buffer TransformBuffer {" NL " vec2 translation[4];" NL "} g_transform;"… in Run()
6333 … "layout(binding = 3, std430) buffer TransformIDBuffer {" NL " uint g_transform_id[4];" NL "};" NL in Run()
6334 … "layout(binding = 4, std430) buffer OutputBuffer {" NL " vec3 color[16];" NL " vec2 pos[16];" NL in Run()
6335 …"};" NL "vec2 g_in_position[4] = vec2[4](vec2(-0.4f, -0.4f), vec2(0.4f, -0.4f), vec2(-0.4f, 0.4f),… in Run()
6336 "vec2(0.4f, 0.4f));" NL "void main() {" NL " uint mid = g_material_id[gl_WorkGroupID.x];" NL in Run()
6337 " Material m = g_material[mid];" NL " uint tid = g_transform_id[gl_WorkGroupID.x];" NL in Run()
6338 " vec2 t = g_transform.translation[tid];" NL in Run()
6339 … " pos[gl_LocalInvocationIndex + gl_WorkGroupID.x * gl_WorkGroupSize.x * gl_WorkGroupSize.y] " NL in Run()
6340 " = g_in_position[gl_LocalInvocationIndex] + t;" NL " color[gl_LocalInvocationIndex + " in Run()
6342 "gl_WorkGroupSize.y] = m.color;" NL "}"; in Run()
6520 …NL "layout(location = 1) in vec2 g_in_position;" NL "layout(binding = 0, std430) buffer Transform … in Run()
6521 …" vec2 translation;" NL "} g_transform[4];" NL "uniform uint g_transform_id = 2;" NL "void main()… in Run()
6522 " gl_Position = vec4(g_in_position + g_transform[g_transform_id].translation, 0, 1);" NL "}"; in Run()
6525 … NL "layout(location = 0) out vec4 g_fs_out;" NL "layout(binding = 4, std430) buffer Material {" NL in Run()
6526 … " vec3 color;" NL "} g_material[4];" NL "uniform int g_material_id = 1;" NL "void main() {" NL in Run()
6527 " g_fs_out = vec4(g_material[g_material_id].color, 1);" NL "}"; in Run()
6679 …NL "layout(local_size_x = 4) in;" NL "layout(binding = 0, std430) buffer Material {" NL " vec3 co… in Run()
6680 … "} g_material[4];" NL "layout(binding = 4, std430) buffer OutputBuffer {" NL " vec3 color[4];" NL in Run()
6681 "};" NL "uniform int g_material_id;" NL "void main() {" NL in Run()
6682 " color[gl_LocalInvocationIndex] = vec3(g_material[g_material_id].color);" NL "}"; in Run()
6789 …const char* const glsl_vs = NL "layout(location = 0) in vec4 g_in_position;" NL "coherent buffer B… in Run()
6790 " vec4 in_color;" NL " vec4 out_color;" NL "} g_buffer;" NL "void main() {" NL in Run()
6791 " if (gl_VertexID == 0) {" NL " g_buffer.out_color = g_buffer.in_color;" NL in Run()
6792 " memoryBarrier();" NL " }" NL " gl_Position = g_in_position;" NL "}"; in Run()
6795 …NL "layout(location = 0) out vec4 g_fs_out;" NL "coherent buffer Buffer {" NL " vec4 in_color;" NL in Run()
6796 …" vec4 out_color;" NL "} g_buffer;" NL "void main() {" NL " g_fs_out = g_buffer.out_color;" NL "… in Run()
6892 const char* const glsl_cs = NL in Run()
6893 …"layout(local_size_x = 128) in;" NL "struct s {" NL " int ene;" NL " int due;" NL " int like;" … in Run()
6894 …" int fake;" NL "};" NL "layout(std430) coherent buffer Buffer {" NL " s a[128];" NL "} g_buffer… in Run()
6895 …"void main() {" NL " g_buffer.a[gl_LocalInvocationIndex].due = g_buffer.a[gl_LocalInvocationIndex… in Run()
6896 …" groupMemoryBarrier();" NL " barrier();" NL " g_buffer.a[(gl_LocalInvocationIndex + 1u) % 128u… in Run()
6897 …ffer.a[(gl_LocalInvocationIndex + 1u) % 128u].due;" NL " groupMemoryBarrier();" NL " barrier();"… in Run()
6900 "128u].like;" NL "}"; in Run()
7003 NL "layout(location = 0) in vec4 g_position;" NL "layout(location = 1) in int g_object_id;" NL in Run()
7004 "out StageData {" NL " flat int object_id;" NL "} g_vs_out;" NL in Run()
7005 "layout(binding = 0, std430) buffer TransformBuffer {" NL " mat4 g_transform[];" NL "};" NL in Run()
7006 …"void main() {" NL " mat4 mvp = g_transform[g_object_id];" NL " gl_Position = mvp * g_position;"… in Run()
7007 " g_vs_out.object_id = g_object_id;" NL "}"; in Run()
7009 const char* const glsl_fs = NL in Run()
7010 …"in StageData {" NL " flat int object_id;" NL "} g_fs_in;" NL "layout(location = 0) out vec4 g_fs… in Run()
7011 …"struct Material {" NL " vec3 color;" NL "};" NL "layout(binding = 1, std430) buffer MaterialBuff… in Run()
7012 " Material g_material[4];" NL "};" NL "layout(binding = 2, std430) buffer MaterialIDBuffer {" NL in Run()
7013 …" int g_material_id[4];" NL "};" NL "void main() {" NL " int mid = g_material_id[g_fs_in.object_… in Run()
7014 " Material m = g_material[mid];" NL " g_fs_out = vec4(m.color, 1);" NL "}"; in Run()
7132 NL "layout(std430, binding = 0) coherent buffer Buffer0 {" NL " int g_data0, g_inc0;" NL in Run()
7133 " int g_data1, g_inc1;" NL "};" NL "layout(std430, binding = 1) buffer Buffer12 {" NL in Run()
7134 …" int inc, data;" NL "} g_buffer12[2];" NL NL "void Modify(int path) {" NL " if (path == 0) {" NL in Run()
7135 …" atomicAdd(g_data0, g_inc0);" NL " atomicAdd(g_data1, g_inc0);" NL " } else if (path == 1)… in Run()
7136 " atomicAdd(g_data0, - g_inc0);" NL " atomicAdd(g_data1, - g_inc0);" NL in Run()
7137 …" } else if (path == 2) {" NL " atomicAdd(g_data0, g_inc1);" NL " atomicAdd(g_data1, g_inc1… in Run()
7138 " }" NL NL " if (path == 0) {" NL " g_buffer12[0].data += g_buffer12[1].inc;" NL in Run()
7139 …" } else if (path == 1) {" NL " g_buffer12[1].data += g_buffer12[0].inc;" NL " }" NL "}" NL NL in Run()
7140 "void main() {" NL " Modify(gl_VertexID);" NL " gl_Position = vec4(0, 0, 0, 1);" NL "}"; in Run()
7143 NL "layout(binding = 3, std430) coherent buffer Buffer3 {" NL " int data;" NL "} g_buffer3;" NL in Run()
7144 "layout(std430, binding = 4) coherent buffer Buffer4 {" NL " int data0, inc0;" NL in Run()
7145 " int data1, inc1;" NL "} g_buffer4;" NL "layout(std430, binding = 5) buffer Buffer56 {" NL in Run()
7146 …" int inc, data;" NL "} g_buffer56[2];" NL NL "void ModifyFS(int path) {" NL " if (path == 0) {"… in Run()
7147 … atomicAdd(g_buffer4.data0, g_buffer4.inc0);" NL " atomicAdd(g_buffer4.data1, g_buffer4.inc0… in Run()
7148 " } else if (path == 1) {" NL " atomicAdd(g_buffer4.data0, - g_buffer4.inc0);" NL in Run()
7149 " atomicAdd(g_buffer4.data1, - g_buffer4.inc0);" NL " } else if (path == 2) {" NL in Run()
7150 … atomicAdd(g_buffer4.data0, g_buffer4.inc1);" NL " atomicAdd(g_buffer4.data1, g_buffer4.inc1… in Run()
7151 " }" NL NL " if (path == 0) {" NL " g_buffer56[0].data += g_buffer56[1].inc;" NL in Run()
7152 … " } else if (path == 1) {" NL " g_buffer56[1].data += g_buffer56[0].inc;" NL " }" NL "}" NL in Run()
7153 "void main() {" NL " atomicAdd(g_buffer3.data, 1);" NL " ModifyFS(gl_PrimitiveID);" NL "}"; in Run()
7363 NL "layout(local_size_x = 1) in;" NL "layout(std430, binding = 0) coherent buffer Buffer0 {" NL in Run()
7364 " int g_data0, g_inc0;" NL " int g_data1, g_inc1;" NL "};" NL in Run()
7365 "layout(std430, binding = 1) buffer Buffer12 {" NL " int inc, data;" NL "} g_buffer12[2];" NL in Run()
7366 "layout(binding = 3, std430) coherent buffer Buffer3 {" NL " int data;" NL "} g_buffer3;" NL in Run()
7367 "layout(std430, binding = 4) coherent buffer Buffer4 {" NL " int data0, inc0;" NL in Run()
7368 " int data1, inc1;" NL "} g_buffer4;" NL "layout(std430, binding = 5) buffer Buffer56 {" NL in Run()
7369 …" int inc, data;" NL "} g_buffer56[2];" NL NL "void Modify1(int path) {" NL " if (path == 0) {" … in Run()
7370 …" atomicAdd(g_data0, g_inc0);" NL " atomicAdd(g_data1, g_inc0);" NL " } else if (path == 1)… in Run()
7371 " atomicAdd(g_data0, - g_inc0);" NL " atomicAdd(g_data1, - g_inc0);" NL in Run()
7372 …" } else if (path == 2) {" NL " atomicAdd(g_data0, g_inc1);" NL " atomicAdd(g_data1, g_inc1… in Run()
7373 " }" NL " if (path == 0) {" NL " g_buffer12[0].data += g_buffer12[1].inc;" NL in Run()
7374 …" } else if (path == 1) {" NL " g_buffer12[1].data += g_buffer12[0].inc;" NL " }" NL "}" NL NL in Run()
7375 "void Modify2(int path) {" NL " if (path == 0) {" NL in Run()
7376 … atomicAdd(g_buffer4.data0, g_buffer4.inc0);" NL " atomicAdd(g_buffer4.data1, g_buffer4.inc0… in Run()
7377 " } else if (path == 1) {" NL " atomicAdd(g_buffer4.data0, - g_buffer4.inc0);" NL in Run()
7378 " atomicAdd(g_buffer4.data1, - g_buffer4.inc0);" NL " } else if (path == 2) {" NL in Run()
7379 … atomicAdd(g_buffer4.data0, g_buffer4.inc1);" NL " atomicAdd(g_buffer4.data1, g_buffer4.inc1… in Run()
7380 " }" NL " if (path == 0) {" NL " g_buffer56[0].data += g_buffer56[1].inc;" NL in Run()
7381 …" } else if (path == 1) {" NL " g_buffer56[1].data += g_buffer56[0].inc;" NL " }" NL "}" NL NL in Run()
7382 "void main() {" NL " Modify1(int(gl_WorkGroupID.z));" NL " atomicAdd(g_buffer3.data, 1);" NL in Run()
7383 " Modify2(int(gl_WorkGroupID.z));" NL "}"; in Run()
7612 …NL "layout(std430, binding = 0) buffer Buffer0 {" NL " readonly int g_i0;" NL " int g_o0;" NL "}… in Run()
7613 "layout(std430, binding = 1) buffer Buffer1 {" NL " int i0;" NL "} g_buffer1;" NL in Run()
7614 "uniform int g_values[] = int[](1, 2, 3, 4, 5, 6);" NL "void main() {" NL " g_o0 += g_i0;" NL in Run()
7615 " g_o0 <<= 1;" NL " g_o0 = g_i0 > g_o0 ? g_i0 : g_o0;" NL " g_o0 *= g_i0;" NL in Run()
7616 … " g_o0 = --g_o0 + g_values[g_i0];" NL " g_o0++;" NL " ++g_o0;" NL " g_buffer1.i0 = 0xff2f;" NL in Run()
7617 " g_o0 &= g_buffer1.i0;" NL "}"; in Run()
7710 NL "layout(local_size_x = 1) in;" NL "layout(std430, binding = 0) buffer Buffer0 {" NL in Run()
7711 …" readonly int g_i0;" NL " int g_o0;" NL "};" NL "layout(std430, binding = 1) buffer Buffer1 {" … in Run()
7712 …" int i0;" NL "} g_buffer1;" NL "const int g_values[6] = int[](1, 2, 3, 4, 5, 6);" NL "void main(… in Run()
7713 …" g_o0 += g_i0;" NL " g_o0 <<= 1;" NL " g_o0 = g_i0 > g_o0 ? g_i0 : g_o0;" NL " g_o0 *= g_i0;"… in Run()
7714 … " g_o0 = --g_o0 + g_values[g_i0];" NL " g_o0++;" NL " ++g_o0;" NL " g_buffer1.i0 = 0xff2f;" NL in Run()
7715 " g_o0 &= g_buffer1.i0;" NL "}"; in Run()
7796 NL "layout(std430, binding = 0) readonly buffer Input0 {" NL " int g_input0[];" NL "};" NL in Run()
7797 "layout(std430, binding = 1) readonly buffer Input1 {" NL " int data[];" NL "} g_input1;" NL in Run()
7798 … "layout(std430, binding = 2) readonly buffer Input23 {" NL " int data[];" NL "} g_input23[2];" NL in Run()
7799 …"layout(std430, binding = 4) buffer Output {" NL " int g_length[4];" NL " int g_length2;" NL "};… in Run()
7800 …"void main() {" NL " g_length[0] = g_input0.length();" NL " g_length[1] = g_input1.data.length()… in Run()
7801 … " g_length[2] = g_input23[0].data.length();" NL " g_length[3] = g_input23[1].data.length();" NL in Run()
7802 " g_length2 = g_length.length();" NL "}"; in Run()
7935 os << NL "void main() {" NL " gl_Position = vec4(0,0,0,1);"; in BuildShaderPT()
7939 os << NL "void main() {"; in BuildShaderPT()
7941 os << NL "}"; in BuildShaderPT()
7954 …NL "struct S0 {" NL " float f;" NL " int i;" NL " uint ui;" NL " bool b;" NL "};" NL "struct S… in BuildShader()
7955 " ivec3 iv;" NL " bvec2 bv;" NL " vec4 v;" NL " uvec2 uv;" NL "};" NL "struct S2 {" NL in BuildShader()
7956 …" mat2x2 m22;" NL " mat4x4 m44;" NL " mat2x3 m23;" NL " mat4x2 m42;" NL " mat3x4 m34;" NL "};… in BuildShader()
7957 "struct S4 {" NL " float f[1];" NL " int i[2];" NL " uint ui[3];" NL " bool b[4];" NL in BuildShader()
7958 …" ivec3 iv[5];" NL " bvec2 bv[6];" NL " vec4 v[7];" NL " uvec2 uv[8];" NL "};" NL "struct S5 … in BuildShader()
7959 " S0 s0;" NL " S1 s1;" NL " S2 s2;" NL "};" NL "struct S6 {" NL " S4 s4[3];" NL "};"; in BuildShader()
7968 …std::string decl = sd + NL "layout(" + lo + ") buffer;" NL "layout(binding = 0) readonly buffer In… in BuildShader()
7969 ((other_members) ? ("\n " + e[etype][0] + " pad0;") : "") + NL " " + e[etype][0] + in BuildShader()
7970 " g_input0[];" NL "};" NL "layout(binding = 1) readonly buffer Input1 {" + in BuildShader()
7971 ((other_members) ? ("\n " + e[etype][1] + " pad1;") : "") + NL " " + e[etype][1] + in BuildShader()
7972 " data[];" NL "} g_input1;" NL "layout(binding = 2) readonly buffer Input23 {" + in BuildShader()
7973 ((other_members) ? ("\n " + e[etype][2] + " pad2;") : "") + NL " " + e[etype][2] + in BuildShader()
7974 " data[];" NL "} g_input23[2];" NL "layout(binding = 4) buffer Output0 {" + in BuildShader()
7975 ((other_members) ? ("\n " + e[etype][4] + " pad4;") : "") + NL " " + e[etype][4] + in BuildShader()
7976 " data[];" NL "} g_output0;" NL "layout(binding = 5) readonly buffer Input4 {" + in BuildShader()
7977 ((other_members) ? ("\n " + e[etype][5] + " pad5;") : "") + NL " " + e[etype][5] + in BuildShader()
7978 " data[];" NL "} g_input4;" NL "layout(binding = 6) buffer Output1 {" + in BuildShader()
7979 ((other_members) ? ("\n " + e[etype][6] + " pad6;") : "") + NL " " + e[etype][6] + in BuildShader()
7980 " data[];" NL "} g_output1;" NL "layout(std430, binding = 7) buffer Output {" NL in BuildShader()
7981 " int g_length[];" NL "};"; in BuildShader()
7984 NL " g_length[0] = g_input0.length();" NL " g_length[1] = g_input1.data.length();" NL in BuildShader()
7985 … " g_length[2] = g_input23[0].data.length();" NL " g_length[3] = g_input23[1].data.length();" NL in BuildShader()
7986 " g_length[4] = g_output0.data.length();" NL " g_length[5] = g_input4.data.length();" NL in BuildShader()
7990 NL " g_output0.data[g_output0.data.length()-2] += g_output0.data[g_output0.data.length()-1];" NL in BuildShader()
7997 os << decl << NL "void main() {" NL " gl_Position = vec4(0,0,0,1);" << expr; in BuildShader()
8001 os << NL << decl << NL "void main() {" << expr; in BuildShader()
8005 os << NL "layout(local_size_x = 1) in;" << decl << NL "void main() {" << expr; in BuildShader()
8007 os << NL "}"; in BuildShader()
8514 … NL "layout(location = 0) in vec4 g_position;" NL "out StageData {" NL " flat int instance_id;" NL in Run()
8515 …"} vs_out;" NL "layout(binding = 0, std430) coherent buffer Buffer0 {" NL " mat3x4 g_transform[4]… in Run()
8516 " mat4x3 g_color;" NL " mat3 g_data0;" NL "};" NL in Run()
8517 … "layout(binding = 1, std430) readonly buffer Buffer1 {" NL " mat4 color;" NL "} g_buffer1;" NL in Run()
8518 "uniform int g_index1 = 1;" NL "uniform int g_index2 = 2;" NL "void main() {" NL in Run()
8519 " gl_Position = vec4(transpose(g_transform[gl_InstanceID]) * g_position, 1);" NL in Run()
8520 " g_color[gl_InstanceID] = g_buffer1.color[gl_InstanceID].rgb;" NL in Run()
8521 " if (gl_VertexID == 0 && gl_InstanceID == 0) {" NL " g_data0[1][1] = 1.0;" NL in Run()
8522 " g_data0[g_index1][g_index2] += 3.0;" NL " }" NL " memoryBarrier();" NL in Run()
8523 " vs_out.instance_id = gl_InstanceID;" NL "}"; in Run()
8526 NL "in StageData {" NL " flat int instance_id;" NL "} fs_in;" NL in Run()
8527 …"layout(location = 0) out vec4 g_ocolor;" NL "layout(binding = 0, std430) coherent buffer Buffer0 … in Run()
8528 " mat3x4 g_transform[4];" NL " mat4x3 g_color;" NL " mat3 g_data0;" NL "};" NL in Run()
8529 "uniform int g_index1 = 1;" NL "uniform int g_index2 = 2;" NL "void main() {" NL in Run()
8530 " if (g_data0[g_index1][g_index1] != 1.0) g_ocolor = vec4(0);" NL in Run()
8531 " else if (g_data0[g_index1][g_index2] != 3.0) g_ocolor = vec4(0);" NL in Run()
8532 " else g_ocolor = vec4(g_color[fs_in.instance_id], 1);" NL "}"; in Run()
8627 NL "layout(local_size_x = 1) in;" NL "layout(std430) buffer Buffer {" NL " mat4x3 dst4x3;" NL in Run()
8628 …" mat4 dst4;" NL " mat4 src4;" NL "} b;" NL "uniform int g_index1;" NL "uniform int g_index2;" NL in Run()
8629 … "void main() {" NL " b.dst4x3[gl_LocalInvocationIndex] = b.src4[gl_LocalInvocationIndex].rgb;" NL in Run()
8630 " b.dst4x3[gl_LocalInvocationIndex + 1u] = b.src4[gl_LocalInvocationIndex + 1u].aar;" NL in Run()
8631 " b.dst4[g_index2][g_index1] = 17.0;" NL " b.dst4[g_index2][g_index1] += 6.0;" NL in Run()
8632 … " b.dst4[3][0] = b.src4[3][0] != 44.0 ? 3.0 : 7.0;" NL " b.dst4[3][1] = b.src4[3][1];" NL "}"; in Run()
8750 …"#version 430 core" NL "buffer Buffer {" NL " int x;" NL "};" NL "void main() {" NL " x = 0;" NL… in Run()
8817 ss << NL "layout(binding = " << binding in Shader1()
8818 << ") buffer Buffer {" NL " int x;" NL "};" NL "void main() {" NL " x = 0;" NL "}"; in Shader1()
8825 ss << NL "layout(binding = " << binding in Shader2()
8826 …<< ") buffer Buffer {" NL " int x;" NL "} g_array[4];" NL "void main() {" NL " g_array[0].x = 0;… in Shader2()
8827 " g_array[1].x = 0;" NL " g_array[2].x = 0;" NL " g_array[3].x = 0;" NL "}"; in Shader2()
8837 if (!Compile(NL "buffer Buffer { int x = 10; };" NL "void main() {" NL " x = 0;" NL "}")) in Run()
8852 if (!Compile(NL "buffer int x;" NL "void main() {" NL " x = 0;" NL "}")) in Run()
8856 …if (!Compile(NL "buffer Buffer { int y; };" NL "void main() {" NL " y = 0;" NL " buffer int x = … in Run()
8860 …if (!Compile(NL "buffer Buffer { int y; };" NL "void Modify(buffer int a) {" NL " atomicAdd(a, 1)… in Run()
8861 "void main() {" NL " Modify(y);" NL "}")) in Run()
8865 …if (!Compile(NL "layout(std430) uniform UBO { int x; };" NL "buffer SSBO { int y; };" NL "void mai… in Run()
8866 " y = x;" NL "}")) in Run()
8870 …if (!Compile(NL "buffer SSBO {" NL " layout(std430) int x;" NL "};" NL "void main() {" NL " x = … in Run()
8874 …if (!Compile(NL "buffer SSBO {" NL " layout(binding = 1) int x;" NL "};" NL "void main() {" NL " … in Run()
8879 …if (!Compile(NL "readonly buffer SSBO {" NL " int x;" NL "};" NL "void main() {" NL " x = 0;" NL… in Run()
8883 …if (!Compile(NL "buffer SSBO {" NL " int x;" NL "};" NL "writeonly buffer SSBO2 {" NL " int y;" … in Run()
8884 "void main() {" NL " x = y;" NL "}")) in Run()
8888 …if (!Compile(NL "buffer SSBO {" NL " int x;" NL "};" NL "buffer SSBO2 {" NL " writeonly int y;" … in Run()
8889 " readonly int z;" NL "};" NL "void main() {" NL " x = y;" NL " z = 0;" NL "}")) in Run()
8893 …if (!Compile(NL "buffer SSBO {" NL " int x;" NL "};" NL "readonly buffer SSBO2 {" NL " writeonly… in Run()
8894 "};" NL "void main() {" NL " x = y;" NL "}")) in Run()
8898 …if (!Compile(NL "layout(binding = 1) buffer;" NL "buffer SSBO {" NL " int x;" NL "};" NL "void ma… in Run()
8899 " x = 0;" NL "}")) in Run()
8903 …if (!Compile(NL "buffer Buffer { int x; };" NL "int y;" NL "void main() {" NL " atomicAdd(x, 1);"… in Run()
8905 NL "}")) in Run()
8909 NL "buffer b {" NL " vec4 x[10];" NL "};" NL "void main() {" NL " vec4 y = vec4(x);" NL "}")) in Run()
8952 …if (!Link("#version 430 core" NL "buffer Buffer { int x; };" NL "void Run();" NL "void main() {" NL in Run()
8953 " Run();" NL " x += 2;" NL "}", in Run()
8954 "#version 430 core" NL "buffer Buffer { uint x; };" NL "void Run() {" NL " x += 3;" NL "}")) in Run()
8958 …if (!Link("#version 430 core" NL "buffer Buffer { int x; int y; };" NL "void Run();" NL "void main… in Run()
8959 " Run();" NL " x += 2;" NL "}", in Run()
8960 "#version 430 core" NL "buffer Buffer { int x; };" NL "void Run() {" NL " x += 3;" NL "}")) in Run()
8964 …if (!Link("#version 430 core" NL "buffer Buffer { int y; };" NL "void Run();" NL "void main() {" NL in Run()
8965 " Run();" NL " y += 2;" NL "}", in Run()
8966 "#version 430 core" NL "buffer Buffer { int x; };" NL "void Run() {" NL " x += 3;" NL "}")) in Run()
8971 …if (!Link("#version 430 core" NL "buffer Buffer { int x; } g_buffer[2];" NL "void Run();" NL "void… in Run()
8972 " Run();" NL " g_buffer[0].x += 2;" NL "}", in Run()
8973 "#version 430 core" NL "buffer Buffer { int x; } g_buffer[3];" NL "void Run() {" NL in Run()
8974 " g_buffer[1].x += 3;" NL "}")) in Run()