vk: Fix word index counting for shuffle tasks

This commit is contained in:
kd-11 2020-01-14 16:32:13 +03:00 committed by kd-11
parent 175f78f5b3
commit ac4cadf538
1 changed files with 2 additions and 1 deletions

View File

@ -280,7 +280,8 @@ namespace vk
"void main()\n" "void main()\n"
"{\n" "{\n"
" uint invocations_x = (gl_NumWorkGroups.x * gl_WorkGroupSize.x);" " uint invocations_x = (gl_NumWorkGroups.x * gl_WorkGroupSize.x);"
" uint index = (gl_GlobalInvocationID.y * invocations_x) + gl_GlobalInvocationID.x;\n" " uint invocation_id = (gl_GlobalInvocationID.y * invocations_x) + gl_GlobalInvocationID.x;\n"
" uint index = invocation_id * KERNEL_SIZE;\n"
" uint value;\n" " uint value;\n"
" %vars" " %vars"
"\n"; "\n";