summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/cso_cache/cso_cache.h
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-02-25 22:03:58 -0500
committerZack Rusin <zack@tungstengraphics.com>2008-02-26 01:51:46 -0500
commit6abb82da7e676384e7e2c9732307b23f8ed7157d (patch)
treee59cfdda493f8618d34835836023e1bd25e58226 /src/gallium/auxiliary/cso_cache/cso_cache.h
parent08a5f49644c4bfc62291c49718f2d18e58527d1d (diff)
implement deleting of driver side cached state in cso's
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_cache.h')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_cache.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.h b/src/gallium/auxiliary/cso_cache/cso_cache.h
index 3a005a376e..f3bd4623c9 100644
--- a/src/gallium/auxiliary/cso_cache/cso_cache.h
+++ b/src/gallium/auxiliary/cso_cache/cso_cache.h
@@ -97,31 +97,43 @@ struct cso_cache {
struct cso_blend {
struct pipe_blend_state state;
void *data;
+ void (*delete_state)(void *, void *);
+ void *context;
};
struct cso_depth_stencil_alpha {
struct pipe_depth_stencil_alpha_state state;
void *data;
+ void (*delete_state)(void *, void *);
+ void *context;
};
struct cso_rasterizer {
struct pipe_rasterizer_state state;
void *data;
+ void (*delete_state)(void *, void *);
+ void *context;
};
struct cso_fragment_shader {
struct pipe_shader_state state;
void *data;
+ void (*delete_state)(void *, void *);
+ void *context;
};
struct cso_vertex_shader {
struct pipe_shader_state state;
void *data;
+ void (*delete_state)(void *, void *);
+ void *context;
};
struct cso_sampler {
struct pipe_sampler_state state;
void *data;
+ void (*delete_state)(void *, void *);
+ void *context;
};
@@ -147,6 +159,8 @@ struct cso_hash_iter cso_find_state(struct cso_cache *sc,
struct cso_hash_iter cso_find_state_template(struct cso_cache *sc,
unsigned hash_key, enum cso_cache_type type,
void *templ);
+void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type,
+ void (*func)(void *state, void *user_data), void *user_data);
void * cso_take_state(struct cso_cache *sc, unsigned hash_key,
enum cso_cache_type type);