diff options
author | Marek Olšák <[email protected]> | 2011-12-09 18:12:55 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-12-15 18:51:48 +0100 |
commit | 8a9a37cebeff19b56afed43ae037d00950fa7594 (patch) | |
tree | 8831c98c9650d89a7bf18f89c90b55f51f164cce /src/gallium/auxiliary/util/u_inlines.h | |
parent | 861a029ddb31e91bb4d8e18ab708d0d172f63aad (diff) |
gallium: utility helper functions for stream output
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_inlines.h | 12 |
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 ddb81b5b957..44283909aec 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) |