tests/manual/buffercapture-qml/gl45/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 450 core |
| 5 | |
| 6 | layout (local_size_x=32) in; |
| 7 | |
| 8 | layout (std430, binding = 3) buffer InputBuffer |
| 9 | { |
| 10 | uint d[]; |
| 11 | }; |
| 12 | |
| 13 | layout(std140, binding=4) uniform custom_uniforms { |
| 14 | int inputSize; |
| 15 | }; |
| 16 | |
| 17 | void main() |
| 18 | { |
| 19 | if (gl_GlobalInvocationID.x < inputSize) |
| 20 | d[gl_GlobalInvocationID.x] = d[gl_GlobalInvocationID.x] + gl_GlobalInvocationID.x * 2; |
| 21 | } |