mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 20:20:38 +02:00
add an explicit callback decleration and use it to silence warnings
This commit is contained in:
parent
bf1c2f3602
commit
e798510569
3 changed files with 10 additions and 8 deletions
|
|
@ -203,7 +203,7 @@ struct cso_cache *cso_cache_create(void)
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
struct cso_hash *hash = 0;
|
||||
struct cso_hash_iter iter;
|
||||
|
|
|
|||
|
|
@ -138,6 +138,8 @@ 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);
|
||||
|
|
@ -152,7 +154,7 @@ 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);
|
||||
cso_state_callback func, void *user_data);
|
||||
void * cso_take_state(struct cso_cache *sc, unsigned hash_key,
|
||||
enum cso_cache_type type);
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const struct cso_blend * st_cached_blend_state(struct st_context *st,
|
|||
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);
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ st_cached_sampler_state(struct st_context *st,
|
|||
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);
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ st_cached_depth_stencil_alpha_state(struct st_context *st,
|
|||
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);
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ const struct cso_rasterizer* st_cached_rasterizer_state(
|
|||
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);
|
||||
}
|
||||
|
|
@ -151,7 +151,7 @@ st_cached_fs_state(struct st_context *st,
|
|||
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);
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ st_cached_vs_state(struct st_context *st,
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue