dymokomi/luce-gpu
Source of release 0.5.2
0.5.2 / tests / gpu / shaders / double.comp
#version 450
// Double the first `count` items, the count read from the GPU.
layout(local_size_x = 64) in;
layout(set = 0, binding = 0, std430) buffer Items { uint items[]; };
layout(set = 0, binding = 1, std430) readonly buffer Counters { uint count; } counters;
void main() {
uint i = gl_GlobalInvocationID.x;
if (i < counters.count)
items[i] *= 2u;
}