diff options
author | Dave Airlie <[email protected]> | 2017-11-10 13:46:19 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-11-14 05:40:47 +1000 |
commit | da31e2c22d72af041a4558b30eb354ff17f000ba (patch) | |
tree | 8a4317d93fc6c228923b2d3abd0bdfa4aee7bbe5 /src/gallium | |
parent | 257edb5b9aedc9fc5d5c13eb2f48a0c11d15456f (diff) |
r600: don't emit atomic save if we have no atomic counters.
Otherwise we end up emitting the fence.
Tested-By: Gert Wollny <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index eb8b139910d..68977bb36de 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -4221,6 +4221,9 @@ void evergreen_emit_atomic_buffer_save(struct r600_context *rctx, unsigned reloc; mask = *atomic_used_mask_p; + if (!mask) + return; + while (mask) { unsigned atomic_index = u_bit_scan(&mask); struct r600_shader_atomic *atomic = &combined_atomics[atomic_index]; |