xref: /aosp_15_r20/external/skia/tests/sksl/errors/InvalidAtomicDeclarations.glsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1### Compilation failed:
2
3error: 4: atomics are only permitted in workgroup variables and writable storage blocks
4atomic_uint globalAtomic;         // invalid
5^^^^^^^^^^^^^^^^^^^^^^^^
6error: 5: atomics are only permitted in workgroup variables and writable storage blocks
7atomicUint globalAtomicArray[2];  // invalid
8^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9error: 20: atomics are only permitted in workgroup variables and writable storage blocks
10S globalStructWithAtomicMember;              // invalid
11^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12error: 21: atomics are only permitted in workgroup variables and writable storage blocks
13S globalStructWithAtomicMemberArray[2];      // invalid
14^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15error: 22: atomics are only permitted in workgroup variables and writable storage blocks
16NestedS globalStructWithNestedAtomicMember;  // invalid
17^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18error: 31: variables of type 'ubo1' may not be uniform
19layout(metal, binding = 1) uniform ubo1 {
20                                   ^^^^
21error: 32: caused by:
22    atomicUint uboAtomic;                     // invalid
23    ^^^^^^^^^^^^^^^^^^^^^
24error: 31: atomics are only permitted in workgroup variables and writable storage blocks
25layout(metal, binding = 1) uniform ubo1 {
26                                   ^^^^
27error: 34: variables of type 'ubo2' may not be uniform
28layout(metal, binding = 2) uniform ubo2 {
29                                   ^^^^
30error: 35: caused by:
31    atomic_uint uboAtomicArray[2];            // invalid
32    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33error: 34: atomics are only permitted in workgroup variables and writable storage blocks
34layout(metal, binding = 2) uniform ubo2 {
35                                   ^^^^
36error: 37: variables of type 'ubo3' may not be uniform
37layout(metal, binding = 3) uniform ubo3 {
38                                   ^^^^
39error: 8: caused by:
40    atomicUint structMemberAtomic;           // valid
41    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42error: 37: atomics are only permitted in workgroup variables and writable storage blocks
43layout(metal, binding = 3) uniform ubo3 {
44                                   ^^^^
45error: 40: variables of type 'ubo4' may not be uniform
46layout(metal, binding = 4) uniform ubo4 {
47                                   ^^^^
48error: 8: caused by:
49    atomicUint structMemberAtomic;           // valid
50    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51error: 40: atomics are only permitted in workgroup variables and writable storage blocks
52layout(metal, binding = 4) uniform ubo4 {
53                                   ^^^^
54error: 43: variables of type 'ubo5' may not be uniform
55layout(metal, binding = 5) uniform ubo5 {
56                                   ^^^^
57error: 8: caused by:
58    atomicUint structMemberAtomic;           // valid
59    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60error: 43: atomics are only permitted in workgroup variables and writable storage blocks
61layout(metal, binding = 5) uniform ubo5 {
62                                   ^^^^
63error: 47: atomics are only permitted in workgroup variables and writable storage blocks
64layout(metal, binding = 6) readonly buffer roSsbo1 {
65                                           ^^^^^^^
66error: 50: atomics are only permitted in workgroup variables and writable storage blocks
67layout(metal, binding = 7) readonly buffer roSsbo2 {
68                                           ^^^^^^^
69error: 53: atomics are only permitted in workgroup variables and writable storage blocks
70layout(metal, binding = 8) readonly buffer roSsbo3 {
71                                           ^^^^^^^
72error: 56: atomics are only permitted in workgroup variables and writable storage blocks
73layout(metal, binding = 9) readonly buffer roSsbo4 {
74                                           ^^^^^^^
75error: 59: atomics are only permitted in workgroup variables and writable storage blocks
76layout(metal, binding = 10) readonly buffer roSsbo5 {
77                                            ^^^^^^^
78error: 64: atomics are only permitted in workgroup variables and writable storage blocks
79    atomicUint localAtomic;                 // invalid
80    ^^^^^^^^^^^^^^^^^^^^^^
81error: 65: atomics are only permitted in workgroup variables and writable storage blocks
82    atomic_uint localAtomicArray[2];        // invalid
83    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84error: 66: atomics are only permitted in workgroup variables and writable storage blocks
85    S localStructWithAtomicMember;          // invalid
86    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87error: 67: atomics are only permitted in workgroup variables and writable storage blocks
88    S localStructWithAtomicMemberArray[2];  // invalid
89    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9029 errors
91