llama-cpp-turboquant/test/shaders/glsl/test_workgroup_shader.comp
Fabian Sauter 34f9d58722 Fixed compiling tests with the new test layout
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
2022-07-27 12:48:04 +02:00

15 lines
444 B
Text

#version 450
layout (local_size_x = 1) in;
// The input rebuild bind index is relative to index in parameter passed
layout(set = 0, binding = 0) writeonly buffer bout { float toutx[]; };
layout(set = 0, binding = 1) writeonly buffer bout2 { float touty[]; };
void main() {
uint index = gl_WorkGroupID.x*gl_NumWorkGroups.y + gl_WorkGroupID.y;
toutx[index] = gl_GlobalInvocationID.x;
touty[index] = gl_GlobalInvocationID.y;
}