tests/manual/buffercapture-qml/gl43/bufferSetter.comp
raw| 1 | // Copyright (C) 2017 Juan José Casafranca. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #version 430 core |
| 5 | |
| 6 | layout (local_size_x=32) in; |
| 7 | |
| 8 | layout (std430, binding = 1) buffer input |
| 9 | { |
| 10 | uint d[]; |
| 11 | }; |
| 12 | |
| 13 | layout (location=1) uniform int inputSize; |
| 14 | |
| 15 | void main() |
| 16 | { |
| 17 | if (gl_GlobalInvocationID.x < inputSize) |
| 18 | d[gl_GlobalInvocationID.x] = d[gl_GlobalInvocationID.x] + gl_GlobalInvocationID.x * 2; |
| 19 | } |