From c02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sat, 6 Feb 2016 16:49:17 -0500 Subject: gallium/u_inlines: add util_copy_image_view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/gallium/auxiliary/util/u_inlines.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) { -- cgit v1.2.3