gallium/u_inlines: add util_copy_image_view
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sat, 6 Feb 2016 21:49:17 +0000 (16:49 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 14 Mar 2016 22:24:46 +0000 (17:24 -0500)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_inlines.h

index d0812039292545f8fd7d2263a4ce27986815b98b..0e80cef0b08480f097a21c4f615a77b5cfb88b45 100644 (file)
@@ -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)
 {