radv: Prefetch compute shader too.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 20 Apr 2017 20:03:15 +0000 (22:03 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 20 Apr 2017 22:59:02 +0000 (00:59 +0200)
For consistency, doesn't really impact performance.

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

index 958ae6e361e3ba86410b8e6af70008e4fd8cc5c4..40e6e432ae7a0464d622de29be7e8498631347ed 100644 (file)
@@ -2169,6 +2169,7 @@ radv_emit_compute_pipeline(struct radv_cmd_buffer *cmd_buffer)
        va = ws->buffer_get_va(compute_shader->bo);
 
        ws->cs_add_buffer(cmd_buffer->cs, compute_shader->bo, 8);
+       si_cp_dma_prefetch(cmd_buffer, va, compute_shader->code_size);
 
        MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws,
                                                           cmd_buffer->cs, 16);