diff options
author | Michal Krol <[email protected]> | 2010-02-19 19:00:26 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-02-19 19:00:26 +0100 |
commit | f6106566081978f663cf08e54bb8908cb58a5316 (patch) | |
tree | 7bc2482548f55471d7024f04c75ac7f58402afa9 /src/gallium/auxiliary/util/u_inlines.h | |
parent | 3d0bfc6a4be73d43928493641bf819f77075bbc1 (diff) |
gallium: WIP: Introduce sampler views.
Diffstat (limited to 'src/gallium/auxiliary/util/u_inlines.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_inlines.h | 10 |
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 e95d58ea863..f8dfea4e51a 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -117,6 +117,16 @@ pipe_texture_reference(struct pipe_texture **ptr, struct pipe_texture *tex) *ptr = tex; } +static INLINE void +pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_view *view) +{ + struct pipe_sampler_view *old_view = *ptr; + + if (pipe_reference(&(*ptr)->reference, &view->reference)) + old_view->context->sampler_view_destroy(old_view->context, old_view); + *ptr = view; +} + /* * Convenience wrappers for screen buffer functions. |