summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_inlines.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-07-05 14:48:33 +0200
committerMarek Olšák <[email protected]>2015-07-16 16:52:20 +0200
commit05a12c53a308965aba1c00f0caf36d8e0f32e035 (patch)
tree7914bcae5a16fff973d438326b3cc9749de8d22b /src/gallium/auxiliary/util/u_inlines.h
parentb73bec0ecd43861337daf9663e242d2b44f36dbd (diff)
gallium: add interface for writable shader images
PIPE_CAPs will be added some other time. Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-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 95401621ec3..661a949a4b1 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -173,6 +173,16 @@ pipe_sampler_view_release(struct pipe_context *ctx,
*ptr = NULL;
}
+static INLINE void
+pipe_image_view_reference(struct pipe_image_view **ptr, struct pipe_image_view *view)
+{
+ struct pipe_image_view *old_view = *ptr;
+
+ if (pipe_reference_described(&(*ptr)->reference, &view->reference,
+ (debug_reference_descriptor)debug_describe_image_view))
+ old_view->context->image_view_destroy(old_view->context, old_view);
+ *ptr = view;
+}
static INLINE void
pipe_so_target_reference(struct pipe_stream_output_target **ptr,