#version 450

// Trivial compute dispatch. Its only purpose is to put a compute submit on the
// same queue immediately before the swapchain-present submit, matching the
// "after compute swapchain submit" condition from the bug report. The output
// is never read back — we only need the GPU to execute a compute pipeline so
// the ICD takes the same code path it does in the production renderer.

layout(local_size_x = 64) in;

layout(std430, binding = 0) buffer Out {
    uint data[];
} buf;

layout(push_constant) uniform Push {
    uint count;
    uint frame;
} pc;

void main() {
    uint i = gl_GlobalInvocationID.x;
    if (i >= pc.count) return;
    buf.data[i] = i * 2654435761u + pc.frame;
}
