From: Samuel Pitoiset Date: Tue, 25 Apr 2017 22:36:12 +0000 (+0200) Subject: radeonsi: use unsynchronized transfers for shader binary uploads X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec301497b87e915924240173ac2854d835446cc6;p=mesa.git radeonsi: use unsynchronized transfers for shader binary uploads 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 --- 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);