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);
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);
+ cso_state_callback func, void *user_data);
void * cso_take_state(struct cso_cache *sc, unsigned hash_key,
enum cso_cache_type type);
cso->data = st->pipe->create_blend_state(st->pipe, &cso->state);
if (!cso->data)
cso->data = &cso->state;
- cso->delete_state = st->pipe->delete_blend_state;
+ cso->delete_state = (cso_state_callback)st->pipe->delete_blend_state;
cso->context = st->pipe;
iter = cso_insert_state(st->cache, hash_key, CSO_BLEND, cso);
}
cso->data = st->pipe->create_sampler_state(st->pipe, &cso->state);
if (!cso->data)
cso->data = &cso->state;
- cso->delete_state = st->pipe->delete_sampler_state;
+ cso->delete_state = (cso_state_callback)st->pipe->delete_sampler_state;
cso->context = st->pipe;
iter = cso_insert_state(st->cache, hash_key, CSO_SAMPLER, cso);
}
cso->data = st->pipe->create_depth_stencil_alpha_state(st->pipe, &cso->state);
if (!cso->data)
cso->data = &cso->state;
- cso->delete_state = st->pipe->delete_depth_stencil_alpha_state;
+ cso->delete_state = (cso_state_callback)st->pipe->delete_depth_stencil_alpha_state;
cso->context = st->pipe;
iter = cso_insert_state(st->cache, hash_key, CSO_DEPTH_STENCIL_ALPHA, cso);
}
cso->data = st->pipe->create_rasterizer_state(st->pipe, &cso->state);
if (!cso->data)
cso->data = &cso->state;
- cso->delete_state = st->pipe->delete_rasterizer_state;
+ cso->delete_state = (cso_state_callback)st->pipe->delete_rasterizer_state;
cso->context = st->pipe;
iter = cso_insert_state(st->cache, hash_key, CSO_RASTERIZER, cso);
}
cso->data = st->pipe->create_fs_state(st->pipe, &cso->state);
if (!cso->data)
cso->data = &cso->state;
- cso->delete_state = st->pipe->delete_fs_state;
+ cso->delete_state = (cso_state_callback)st->pipe->delete_fs_state;
cso->context = st->pipe;
iter = cso_insert_state(st->cache, hash_key, CSO_FRAGMENT_SHADER, cso);
}
cso->data = st->pipe->create_vs_state(st->pipe, &cso->state);
if (!cso->data)
cso->data = &cso->state;
- cso->delete_state = st->pipe->delete_vs_state;
+ cso->delete_state = (cso_state_callback)st->pipe->delete_vs_state;
cso->context = st->pipe;
iter = cso_insert_state(st->cache, hash_key, CSO_VERTEX_SHADER, cso);
}