gallium: move filter assignment out of loop
[mesa.git] / src / gallium / auxiliary / cso_cache / cso_cache.h
index 44ee128a4a24b7517c5cf0fc53af72abf44728ae..e5edbbb5566a3371fdfe51f25baef36b8607e45b 100644 (file)
 extern "C" {
 #endif
 
+typedef void (*cso_state_callback)(void *ctx, void *obj);
+
 struct cso_cache;
 
 struct cso_blend {
    struct pipe_blend_state state;
    void *data;
-   void (*delete_state)(struct pipe_context *, void *);
+   cso_state_callback delete_state;
    struct pipe_context *context;
 };
 
 struct cso_depth_stencil_alpha {
    struct pipe_depth_stencil_alpha_state state;
    void *data;
-   void (*delete_state)(struct pipe_context *, void *);
+   cso_state_callback delete_state;
    struct pipe_context *context;
 };
 
 struct cso_rasterizer {
    struct pipe_rasterizer_state state;
    void *data;
-   void (*delete_state)(struct pipe_context *, void *);
+   cso_state_callback delete_state;
    struct pipe_context *context;
 };
 
 struct cso_fragment_shader {
    struct pipe_shader_state state;
    void *data;
-   void (*delete_state)(struct pipe_context *, void *);
+   cso_state_callback delete_state;
    struct pipe_context *context;
 };
 
 struct cso_vertex_shader {
    struct pipe_shader_state state;
    void *data;
-   void (*delete_state)(struct pipe_context *, void *);
+   cso_state_callback delete_state;
    struct pipe_context *context;
 };
 
 struct cso_sampler {
    struct pipe_sampler_state state;
    void *data;
-   void (*delete_state)(struct pipe_context *, void *);
+   cso_state_callback delete_state;
    struct pipe_context *context;
 };
 
@@ -138,8 +140,6 @@ enum cso_cache_type {
    CSO_VERTEX_SHADER
 };
 
-typedef void (*cso_state_callback)(void *, void *);
-
 unsigned cso_construct_key(void *item, int item_size);
 
 struct cso_cache *cso_cache_create(void);