From: Nicolai Hähnle Date: Sat, 6 Feb 2016 21:49:17 +0000 (-0500) Subject: gallium/u_inlines: add util_copy_image_view X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5;p=mesa.git gallium/u_inlines: add util_copy_image_view Reviewed-by: Ilia Mirkin Reviewed-by: Marek Olšák --- diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index d0812039292..0e80cef0b08 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -622,6 +622,16 @@ util_copy_constant_buffer(struct pipe_constant_buffer *dst, } } +static inline void +util_copy_image_view(struct pipe_image_view *dst, + const struct pipe_image_view *src) +{ + pipe_resource_reference(&dst->resource, src->resource); + dst->format = src->format; + dst->access = src->access; + dst->u = src->u; +} + static inline unsigned util_max_layer(const struct pipe_resource *r, unsigned level) {