From b8da71ffb17d3d16706db04115e9ba1dd8bc49b9 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 3 Dec 2012 09:09:06 +0100 Subject: fontconfig mesa xserver pixman xkeyboard-config git update 3 dec 2012 fontconfig: 2442d611579bccb84f0c29e3f9ceb0a7436df812 mesa: 54ff536823bf5a431efe1f2becdb21174c146948 xserver: b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 pixman: 978bab253d1d061b00b5e80aa45ab6986aac466f xkeyboard-config: 05dcc6db64cd7425aea6d22efd6a3ecf34dbddd2 --- mesalib/src/gallium/auxiliary/util/u_inlines.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mesalib/src/gallium/auxiliary/util/u_inlines.h') diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h index 6ef5fecc6..cb06ee2e0 100644 --- a/mesalib/src/gallium/auxiliary/util/u_inlines.h +++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h @@ -114,6 +114,22 @@ pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf) *ptr = surf; } +/** + * Similar to pipe_surface_reference() but always set the pointer to NULL + * and pass in an explicit context. The explicit context avoids the problem + * of using a deleted context's surface_destroy() method when freeing a surface + * that's shared by multiple contexts. + */ +static INLINE void +pipe_surface_release(struct pipe_context *pipe, struct pipe_surface **ptr) +{ + if (pipe_reference_described(&(*ptr)->reference, NULL, + (debug_reference_descriptor)debug_describe_surface)) + pipe->surface_destroy(pipe, *ptr); + *ptr = NULL; +} + + static INLINE void pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex) { -- cgit v1.2.3