diff options
author | Keith Whitwell <[email protected]> | 2009-11-24 21:13:18 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-11-24 21:15:35 +0000 |
commit | f1ce37f74aff4854071fe5740b055718b2c0c789 (patch) | |
tree | 126a8e27f9d0f2cf718176387727eac9b69640db /src/gallium/drivers/svga/svga_screen_texture.h | |
parent | 4509f3cbad2972b6fe4a722ed07904666122a759 (diff) |
svga: cache textures as well as buffers
Diffstat (limited to 'src/gallium/drivers/svga/svga_screen_texture.h')
-rw-r--r-- | src/gallium/drivers/svga/svga_screen_texture.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_screen_texture.h b/src/gallium/drivers/svga/svga_screen_texture.h index 1e6fef59a39..1cc4063e653 100644 --- a/src/gallium/drivers/svga/svga_screen_texture.h +++ b/src/gallium/drivers/svga/svga_screen_texture.h @@ -29,7 +29,7 @@ #include "pipe/p_compiler.h" #include "pipe/p_state.h" - +#include "svga_screen_cache.h" struct pipe_context; struct pipe_screen; @@ -68,6 +68,7 @@ struct svga_sampler_view unsigned age; + struct svga_host_surface_cache_key key; struct svga_winsys_surface *handle; }; @@ -76,8 +77,6 @@ struct svga_texture { struct pipe_texture base; - struct svga_winsys_surface *handle; - boolean defined[6][PIPE_MAX_TEXTURE_LEVELS]; struct svga_sampler_view *cached_view; @@ -86,6 +85,16 @@ struct svga_texture unsigned age; boolean views_modified; + + /** + * Creation key for the host surface handle. + * + * This structure describes all the host surface characteristics so that it + * can be looked up in cache, since creating a host surface is often a slow + * operation. + */ + struct svga_host_surface_cache_key key; + struct svga_winsys_surface *handle; }; @@ -93,6 +102,7 @@ struct svga_surface { struct pipe_surface base; + struct svga_host_surface_cache_key key; struct svga_winsys_surface *handle; unsigned real_face; |