summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp
blob: d36f5426bc00e8e397f7e4cb1d7d4c81625f798c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#version 430

layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout (binding = 0, std430) buffer toGpu
{
    float _float[];
};


layout (binding = 1, std140) buffer fromGpu
{
    int _int[];
};

void main()
{
    int length = min(_float.length(), _int.length());

    for (int i = 0; i < length; ++i)
        _int[i] = int(_float[i]);

}