[Mesa-dev] [PATCH] gallium/radeon: use the internal clear_buffer callback to fix r600g

Alex Deucher alexdeucher at gmail.com
Fri Jan 6 21:49:28 UTC 2017


On Fri, Jan 6, 2017 at 4:26 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> r600g doesn't set pipe_context::clear_buffer.

Mention the bug report here:
https://bugs.freedesktop.org/show_bug.cgi?id=99303
With that:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/gallium/drivers/radeon/r600_pipe_common.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index 28bb791..5113765 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -538,21 +538,23 @@ bool r600_check_device_reset(struct r600_common_context *rctx)
>
>         rctx->device_reset_callback.reset(rctx->device_reset_callback.data, status);
>         return true;
>  }
>
>  static void r600_dma_clear_buffer_fallback(struct pipe_context *ctx,
>                                            struct pipe_resource *dst,
>                                            uint64_t offset, uint64_t size,
>                                            unsigned value)
>  {
> -       ctx->clear_buffer(ctx, dst, offset, size, &value, 4);
> +       struct r600_common_context *rctx = (struct r600_common_context *)ctx;
> +
> +       rctx->clear_buffer(ctx, dst, offset, size, value, R600_COHERENCY_NONE);
>  }
>
>  bool r600_common_context_init(struct r600_common_context *rctx,
>                               struct r600_common_screen *rscreen,
>                               unsigned context_flags)
>  {
>         slab_create_child(&rctx->pool_transfers, &rscreen->pool_transfers);
>
>         rctx->screen = rscreen;
>         rctx->ws = rscreen->ws;
> --
> 2.7.4
>
> _______________________________________________
> 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