summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_scene.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-01-13 13:43:58 -0700
committerBrian Paul <[email protected]>2010-01-13 15:10:57 -0700
commit592e40aa7bdbda5a09becb898300393d599c033a (patch)
treeb568509e39b217fd78e220db15c1c6cceb632c15 /src/gallium/drivers/llvmpipe/lp_scene.h
parent4769328fe1ddaa1882dddbaad21239d5fdcddf19 (diff)
llvmpipe: added scene functions for texture reference counting
When a texture is used in the scene we add it to a list of texture references. The lp_scene_is_textured_referenced() function tells us if a texture is referenced by the scene.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h
index 4b6527d67c7..86facf8eac2 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene.h
@@ -97,6 +97,13 @@ struct data_block_list {
};
+/** List of texture references */
+struct texture_ref {
+ struct pipe_texture *texture;
+ struct texture_ref *prev, *next; /**< linked list w/ u_simple_list.h */
+};
+
+
/**
* All bins and bin data are contained here.
* Per-bin data goes into the 'tile' bins.
@@ -112,6 +119,9 @@ struct lp_scene {
/** the framebuffer to render the scene into */
struct pipe_framebuffer_state fb;
+ /** list of textures referenced by the scene commands */
+ struct texture_ref textures;
+
boolean write_depth;
/**
@@ -150,6 +160,12 @@ unsigned lp_scene_data_size( const struct lp_scene *scene );
unsigned lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y );
+void lp_scene_texture_reference( struct lp_scene *scene,
+ struct pipe_texture *texture );
+
+boolean lp_scene_is_textured_referenced( const struct lp_scene *scene,
+ const struct pipe_texture *texture );
+
/**
* Allocate space for a command/data in the bin's data buffer.