gallium: fix some cso_state_callback cast warnings
authorBrian <brian.paul@tungstengraphics.com>
Tue, 11 Mar 2008 21:01:52 +0000 (15:01 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 11 Mar 2008 21:01:52 +0000 (15:01 -0600)
src/gallium/auxiliary/cso_cache/cso_cache.h

index 44ee128..e5edbbb 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);