summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c3
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];