radv: add unlikely() around radv_save_descriptors()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 10 Nov 2017 08:18:05 +0000 (09:18 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 13 Nov 2017 10:05:40 +0000 (11:05 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index 45fe51a2b9bccd789c3538e51a9f7d21751f7474..1f34d07476701a0d5650bc3b0f40c9081d27c66e 100644 (file)
@@ -1727,7 +1727,7 @@ radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer,
        cmd_buffer->state.descriptors_dirty = 0;
        cmd_buffer->state.push_descriptors_dirty = false;
 
-       if (cmd_buffer->device->trace_bo)
+       if (unlikely(cmd_buffer->device->trace_bo))
                radv_save_descriptors(cmd_buffer);
 
        assert(cmd_buffer->cs->cdw <= cdw_max);