radv: fix cdw check vs tracing emit
authorDave Airlie <airlied@redhat.com>
Fri, 27 Jul 2018 03:20:03 +0000 (04:20 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 27 Jul 2018 20:20:27 +0000 (06:20 +1000)
If we have tracing enabled we could do all the tracing emits
and overflow the precalculated cdw_max.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_cmd_buffer.c

index e0222d0b50b1aa13747b4227ae073590746f00e9..7785ece8ce655d9c9937477cde296609e2e22911 100644 (file)
@@ -1752,10 +1752,10 @@ radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer,
        descriptors_state->dirty = 0;
        descriptors_state->push_dirty = false;
 
+       assert(cmd_buffer->cs->cdw <= cdw_max);
+
        if (unlikely(cmd_buffer->device->trace_bo))
                radv_save_descriptors(cmd_buffer, bind_point);
-
-       assert(cmd_buffer->cs->cdw <= cdw_max);
 }
 
 static void