From ec301497b87e915924240173ac2854d835446cc6 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 26 Apr 2017 00:36:12 +0200 Subject: radeonsi: use unsynchronized transfers for shader binary uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because the buffer is new, it can't be referenced by any CS. This can save few CPU cycles by skipping the whole PIPE_TRANSFER_UNSYNCHRONIZED if in amdgpu_bo_map(). Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 3c2c7f5c75b..69634b12c33 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -6185,7 +6185,8 @@ int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader) /* Upload. */ ptr = sscreen->b.ws->buffer_map(shader->bo->buf, NULL, - PIPE_TRANSFER_READ_WRITE); + PIPE_TRANSFER_READ_WRITE | + PIPE_TRANSFER_UNSYNCHRONIZED); if (prolog) { util_memcpy_cpu_to_le32(ptr, prolog->code, prolog->code_size); -- cgit v1.2.3