From 16876b8328059446b6fa0951f7848e5d500244ab Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 11 Dec 2009 12:29:02 +0000 Subject: svga: Keep tight control of texture handle ownership. The texture owns the surface handle. All derivatives need to keep a reference to texture. This fixes several assertions failures starting up Jedi Knight 2. Should cause no change for DRM surface sharing -- reference count still done as before there. --- src/gallium/drivers/svga/svga_screen_texture.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/svga/svga_screen_texture.h') diff --git a/src/gallium/drivers/svga/svga_screen_texture.h b/src/gallium/drivers/svga/svga_screen_texture.h index 1cc4063e65..8cfdfea693 100644 --- a/src/gallium/drivers/svga/svga_screen_texture.h +++ b/src/gallium/drivers/svga/svga_screen_texture.h @@ -61,7 +61,7 @@ struct svga_sampler_view { struct pipe_reference reference; - struct svga_texture *texture; + struct pipe_texture *texture; int min_lod; int max_lod; @@ -94,6 +94,13 @@ struct svga_texture * operation. */ struct svga_host_surface_cache_key key; + + /** + * Handle for the host side surface. + * + * This handle is owned by this texture. Views should hold on to a reference + * to this texture and never destroy this handle directly. + */ struct svga_winsys_surface *handle; }; -- cgit v1.2.3