[Mesa-dev] [PATCH] radeonsi: use unsynchronized transfers for shader binary uploads
Marek Olšák
maraeo at gmail.com
Wed Apr 26 17:03:14 UTC 2017
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Apr 26, 2017 at 12:36 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> 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 <samuel.pitoiset at gmail.com>
> ---
> 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 bfccf813a6..2a5f21447c 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -6205,7 +6205,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);
> --
> 2.12.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list