xref: /aosp_15_r20/external/skia/resources/sksl/compute/ArrayAdd.compute (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1layout(local_size_x = 256) in;
2
3layout(set=0, binding=0) readonly buffer inputBlock
4{
5    uint offset;
6    int[] src;
7};
8
9layout(set=0, binding=1) writeonly buffer outputBlock
10{
11    int[] dest;
12};
13
14void main() {
15    dest[sk_GlobalInvocationID.x] = src[sk_GlobalInvocationID.x] + src[sk_GlobalInvocationID.x + offset];
16}
17