[Mesa-dev] [PATCH] rbug: add missing pipe->blit() entrypoint

Jakob Bornecrantz wallbraker at gmail.com
Wed May 21 05:47:30 PDT 2014


Reviewed-by: Jakob Bornecrantz <jakob at vmware.com>

On Wed, May 21, 2014 at 1:44 PM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
>  src/gallium/drivers/rbug/rbug_context.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
> index 0e7badb..2b99ddd 100644
> --- a/src/gallium/drivers/rbug/rbug_context.c
> +++ b/src/gallium/drivers/rbug/rbug_context.c
> @@ -831,6 +831,26 @@ rbug_resource_copy_region(struct pipe_context *_pipe,
>  }
>
>  static void
> +rbug_blit(struct pipe_context *_pipe, const struct pipe_blit_info *_blit_info)
> +{
> +   struct rbug_context *rb_pipe = rbug_context(_pipe);
> +   struct rbug_resource *rb_resource_dst = rbug_resource(_blit_info->dst.resource);
> +   struct rbug_resource *rb_resource_src = rbug_resource(_blit_info->src.resource);
> +   struct pipe_context *pipe = rb_pipe->pipe;
> +   struct pipe_resource *dst = rb_resource_dst->resource;
> +   struct pipe_resource *src = rb_resource_src->resource;
> +   struct pipe_blit_info blit_info;
> +
> +   blit_info = *_blit_info;
> +   blit_info.dst.resource = dst;
> +   blit_info.src.resource = src;
> +
> +   pipe_mutex_lock(rb_pipe->call_mutex);
> +   pipe->blit(pipe, &blit_info);
> +   pipe_mutex_unlock(rb_pipe->call_mutex);
> +}
> +
> +static void
>  rbug_flush_resource(struct pipe_context *_pipe,
>                      struct pipe_resource *_res)
>  {
> @@ -1151,6 +1171,7 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
>     rb_pipe->base.set_index_buffer = rbug_set_index_buffer;
>     rb_pipe->base.set_sample_mask = rbug_set_sample_mask;
>     rb_pipe->base.resource_copy_region = rbug_resource_copy_region;
> +   rb_pipe->base.blit = rbug_blit;
>     rb_pipe->base.flush_resource = rbug_flush_resource;
>     rb_pipe->base.clear = rbug_clear;
>     rb_pipe->base.clear_render_target = rbug_clear_render_target;
> --
> 1.9.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list