radv: Don't flush at the start of a command buffer.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 20 Feb 2017 08:27:17 +0000 (09:27 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 21 Feb 2017 08:20:03 +0000 (09:20 +0100)
The preamble flushes now and the rest is the responsibility of the app.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c

index 916906f7766fc966d08790b8c4c81a1255be63a4..248e1afa87b7d8aad341f8716dbc67fd1a8837ad 100644 (file)
@@ -1693,26 +1693,11 @@ VkResult radv_BeginCommandBuffer(
        if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) {
                switch (cmd_buffer->queue_family_index) {
                case RADV_QUEUE_GENERAL:
-                       /* Flush read caches at the beginning of CS not flushed by the kernel. */
-                       cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_INV_ICACHE |
-                               RADV_CMD_FLAG_PS_PARTIAL_FLUSH |
-                               RADV_CMD_FLAG_CS_PARTIAL_FLUSH |
-                               RADV_CMD_FLAG_INV_VMEM_L1 |
-                               RADV_CMD_FLAG_INV_SMEM_L1 |
-                               RADV_CMD_FLUSH_AND_INV_FRAMEBUFFER |
-                               RADV_CMD_FLAG_INV_GLOBAL_L2;
                        emit_gfx_buffer_state(cmd_buffer);
                        radv_set_db_count_control(cmd_buffer);
-                       si_emit_cache_flush(cmd_buffer);
                        break;
                case RADV_QUEUE_COMPUTE:
-                       cmd_buffer->state.flush_bits = RADV_CMD_FLAG_INV_ICACHE |
-                               RADV_CMD_FLAG_CS_PARTIAL_FLUSH |
-                               RADV_CMD_FLAG_INV_VMEM_L1 |
-                               RADV_CMD_FLAG_INV_SMEM_L1 |
-                               RADV_CMD_FLAG_INV_GLOBAL_L2;
                        si_init_compute(cmd_buffer);
-                       si_emit_cache_flush(cmd_buffer);
                        break;
                case RADV_QUEUE_TRANSFER:
                default: