vk: Fixup for cs_scatter job

- Access to the stencil output has to be atomic as each 'word' is shared among 4 adjacent texels
- TODO: Can be optimized using mirrored buffer views
This commit is contained in:
kd-11 2020-01-15 16:06:30 +03:00 committed by kd-11
commit 74ad525566

View file

@ -529,7 +529,7 @@ namespace vk
" stencil_offset = (index / 4);\n"
" stencil_shift = (index % 4) * 8;\n"
" stencil = (value & 0xFF) << stencil_shift;\n"
" data[stencil_offset + s_offset] |= stencil;\n";
" atomicOr(data[stencil_offset + s_offset], stencil);\n";
cs_shuffle_base::build("");
}
@ -548,7 +548,7 @@ namespace vk
" stencil_offset = (index / 4);\n"
" stencil_shift = (index % 4) * 8;\n"
" stencil = (value & 0xFF) << stencil_shift;\n"
" data[stencil_offset + s_offset] |= stencil;\n";
" atomicOr(data[stencil_offset + s_offset], stencil);\n";
cs_shuffle_base::build("");
}