summaryrefslogtreecommitdiffstats
path: root/tests/manual/buffercapture-qml/gl43/bufferSetter.comp
blob: 1e43ac7ce79ca9eccd9d28f5633f0636729d4835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2017 Juan José Casafranca.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#version 430 core

layout (local_size_x=32) in;

layout (std430, binding = 1) buffer input
{
    uint d[];
};

layout (location=1) uniform int inputSize;

void main()
{
    if (gl_GlobalInvocationID.x < inputSize)
        d[gl_GlobalInvocationID.x] = d[gl_GlobalInvocationID.x] + gl_GlobalInvocationID.x * 2;
}