summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_inlines.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index ddb81b5..4428390 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -136,6 +136,18 @@ pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_
}
static INLINE void
+pipe_so_target_reference(struct pipe_stream_output_target **ptr,
+ struct pipe_stream_output_target *target)
+{
+ struct pipe_stream_output_target *old = *ptr;
+
+ if (pipe_reference_described(&(*ptr)->reference, &target->reference,
+ (debug_reference_descriptor)debug_describe_so_target))
+ old->context->stream_output_target_destroy(old->context, old);
+ *ptr = target;
+}
+
+static INLINE void
pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps,
struct pipe_resource *pt, unsigned level, unsigned layer,
unsigned flags)