gpu/shaders: ensure dynamically uniform barriers when malloc fails

GPU APIs require that barrier() calls are dynamically uniform, that is
for every barrier in the code, every shader invocation in a workgroup
must all call it, or all not call it.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-04-11 16:34:33 +02:00
parent f930e3f3d7
commit ee519351f7
9 changed files with 564 additions and 580 deletions
-4
View File
@@ -176,10 +176,6 @@ shared uint sh_part_ix;
shared State sh_prefix;
void main() {
if (mem_error != NO_ERROR) {
return;
}
State th_state[N_ROWS];
// Determine partition to process by atomic counter (described in Section
// 4.4 of prefix sum paper).