[Mesa-dev] [PATCH 13/18] gallium/u_blitter: add a query for checking whether copying is supported

Brian Paul brianp at vmware.com
Thu Aug 2 06:59:32 PDT 2012


On 08/02/2012 07:14 AM, Marek Olšák wrote:
> Cc: Stephane Marchesin<stephane.marchesin at gmail.com>
> ---
>   src/gallium/auxiliary/util/u_blitter.c           |   86 ++++++++++++++--------
>   src/gallium/auxiliary/util/u_blitter.h           |    4 +
>   src/gallium/drivers/i915/i915_resource_texture.c |    7 +-
>   src/gallium/drivers/i915/i915_surface.c          |    7 ++
>   4 files changed, 68 insertions(+), 36 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
> index a64bafc..920836a 100644
> --- a/src/gallium/auxiliary/util/u_blitter.c
> +++ b/src/gallium/auxiliary/util/u_blitter.c
> @@ -932,6 +932,61 @@ void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ,
>       src_templ->swizzle_a = PIPE_SWIZZLE_ALPHA;
>   }
>
> +boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
> +                                       struct pipe_resource *dst,
> +                                       struct pipe_resource *src,
> +                                       unsigned mask)

It would be good to have a comment on this function explaining exactly 
what it's doing, what is 'mask', etc.

Also, I think all the pointer parameters could be const-qualified.

-Brian


More information about the mesa-dev mailing list