Antonio Maiorano | 08d9279 | 2024-01-11 20:51:50 +0000 | [diff] [blame] | 1 | #version 310 es |
| 2 | |
| 3 | void deref_const() { |
| 4 | ivec3 a = ivec3(0, 0, 0); |
| 5 | int b = a[0]; |
| 6 | a[0] = 42; |
| 7 | } |
| 8 | |
| 9 | void no_deref_const() { |
| 10 | ivec3 a = ivec3(0, 0, 0); |
| 11 | int b = a[0]; |
| 12 | a[0] = 42; |
| 13 | } |
| 14 | |
| 15 | void deref_let() { |
| 16 | ivec3 a = ivec3(0, 0, 0); |
| 17 | int i = 0; |
| 18 | int b = a[i]; |
| 19 | a[0] = 42; |
| 20 | } |
| 21 | |
| 22 | void no_deref_let() { |
| 23 | ivec3 a = ivec3(0, 0, 0); |
| 24 | int i = 0; |
| 25 | int b = a[i]; |
| 26 | a[0] = 42; |
| 27 | } |
| 28 | |
| 29 | void deref_var() { |
| 30 | ivec3 a = ivec3(0, 0, 0); |
| 31 | int i = 0; |
| 32 | int b = a[i]; |
| 33 | a[0] = 42; |
| 34 | } |
| 35 | |
| 36 | void no_deref_var() { |
| 37 | ivec3 a = ivec3(0, 0, 0); |
| 38 | int i = 0; |
| 39 | int b = a[i]; |
| 40 | a[0] = 42; |
| 41 | } |
| 42 | |
| 43 | void tint_symbol() { |
| 44 | deref_const(); |
| 45 | no_deref_const(); |
| 46 | deref_let(); |
| 47 | no_deref_let(); |
| 48 | deref_var(); |
| 49 | no_deref_var(); |
| 50 | } |
| 51 | |
| 52 | layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; |
| 53 | void main() { |
| 54 | tint_symbol(); |
| 55 | return; |
| 56 | } |