X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fcso_cache%2Fcso_cache.h;h=cc1f1c0e123aaa098d73f00e3da912a67ac73ba1;hb=e96c55ff495528fc70fb5363d60bf4c645bc2082;hp=6b5c230e8f22a15bdaebb2514f8b8baa4676d95e;hpb=c4c86bbd16688ee4a0afb32efa27ba52abceb1ca;p=mesa.git diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.h b/src/gallium/auxiliary/cso_cache/cso_cache.h index 6b5c230e8f2..cc1f1c0e123 100644 --- a/src/gallium/auxiliary/cso_cache/cso_cache.h +++ b/src/gallium/auxiliary/cso_cache/cso_cache.h @@ -53,6 +53,7 @@ * - rasterizer (old setup) * - sampler * - vertex shader + * - vertex elements * * Things that are not constant state objects include: * - blend_color @@ -85,12 +86,12 @@ extern "C" { #endif enum cso_cache_type { + CSO_RASTERIZER, CSO_BLEND, - CSO_SAMPLER, CSO_DEPTH_STENCIL_ALPHA, - CSO_RASTERIZER, - CSO_FRAGMENT_SHADER, - CSO_VERTEX_SHADER + CSO_SAMPLER, + CSO_VELEMENTS, + CSO_CACHE_MAX, }; typedef void (*cso_state_callback)(void *ctx, void *obj); @@ -123,22 +124,20 @@ struct cso_rasterizer { struct pipe_context *context; }; -struct cso_fragment_shader { - struct pipe_shader_state state; +struct cso_sampler { + struct pipe_sampler_state state; void *data; cso_state_callback delete_state; struct pipe_context *context; }; -struct cso_vertex_shader { - struct pipe_shader_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; +struct cso_velems_state { + unsigned count; + struct pipe_vertex_element velems[PIPE_MAX_ATTRIBS]; }; -struct cso_sampler { - struct pipe_sampler_state state; +struct cso_velements { + struct cso_velems_state state; void *data; cso_state_callback delete_state; struct pipe_context *context; @@ -160,7 +159,7 @@ struct cso_hash_iter cso_find_state(struct cso_cache *sc, unsigned hash_key, enum cso_cache_type type); struct cso_hash_iter cso_find_state_template(struct cso_cache *sc, unsigned hash_key, enum cso_cache_type type, - void *templ); + void *templ, unsigned size); void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type, cso_state_callback func, void *user_data); void * cso_take_state(struct cso_cache *sc, unsigned hash_key,