summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-02-06 16:49:17 -0500
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-03-14 17:24:46 -0500
commitc02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5 (patch)
treecbdc8351ce91e18b0efb726375cc09fb524fc727 /src/gallium
parentf6dc4f5558754b0bf36180cf28a977e2caf319bc (diff)
downloadexternal_mesa3d-c02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5.zip
external_mesa3d-c02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5.tar.gz
external_mesa3d-c02d73af0b1d7ebf6b7bbce140d0b2189cbc42e5.tar.bz2
gallium/u_inlines: add util_copy_image_view
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index d081203..0e80cef 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)
{