r600: don't emit atomic save if we have no atomic counters.
authorDave Airlie <airlied@redhat.com>
Fri, 10 Nov 2017 03:46:19 +0000 (13:46 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 13 Nov 2017 19:40:47 +0000 (05:40 +1000)
Otherwise we end up emitting the fence.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/evergreen_state.c

index eb8b139..68977bb 100644 (file)
@@ -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];