summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/cso_cache/cso_cache.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-02-17 02:13:32 +0100
committerMarek Olšák <maraeo@gmail.com>2012-02-21 21:09:16 +0100
commit32f833e5a58d886065309da5414a63924e61e9d9 (patch)
tree1314dd0b68bd146b1e6e08f1901529118ec34364 /src/gallium/auxiliary/cso_cache/cso_cache.c
parenta6ef7f7ce4a52c05c55a2d265f1fdebc7de5a1db (diff)
downloadexternal_mesa3d-32f833e5a58d886065309da5414a63924e61e9d9.zip
external_mesa3d-32f833e5a58d886065309da5414a63924e61e9d9.tar.gz
external_mesa3d-32f833e5a58d886065309da5414a63924e61e9d9.tar.bz2
gallium/cso: kill off non-functional shader caching
Suggested by José. We don't provide shader caching in CSO. Most of the time the api provides object semantics for shaders anyway, and the cases where it doesn't (eg mesa's internall-generated texenv programs), it will be up to the state tracker to implement their own specialized caching.
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_cache.c')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_cache.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c
index c606992..e276fd1 100644
--- a/src/gallium/auxiliary/cso_cache/cso_cache.c
+++ b/src/gallium/auxiliary/cso_cache/cso_cache.c
@@ -119,22 +119,6 @@ static void delete_rasterizer_state(void *state, void *data)
FREE(state);
}
-static void delete_fs_state(void *state, void *data)
-{
- struct cso_fragment_shader *cso = (struct cso_fragment_shader *)state;
- if (cso->delete_state)
- cso->delete_state(cso->context, cso->data);
- FREE(state);
-}
-
-static void delete_vs_state(void *state, void *data)
-{
- struct cso_vertex_shader *cso = (struct cso_vertex_shader *)state;
- if (cso->delete_state)
- cso->delete_state(cso->context, cso->data);
- FREE(state);
-}
-
static void delete_velements(void *state, void *data)
{
struct cso_velements *cso = (struct cso_velements *)state;
@@ -158,12 +142,6 @@ static INLINE void delete_cso(void *state, enum cso_cache_type type)
case CSO_RASTERIZER:
delete_rasterizer_state(state, 0);
break;
- case CSO_FRAGMENT_SHADER:
- delete_fs_state(state, 0);
- break;
- case CSO_VERTEX_SHADER:
- delete_vs_state(state, 0);
- break;
case CSO_VELEMENTS:
delete_velements(state, 0);
break;
@@ -309,8 +287,6 @@ void cso_cache_delete(struct cso_cache *sc)
/* delete driver data */
cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0);
cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0);
- cso_for_each_state(sc, CSO_FRAGMENT_SHADER, delete_fs_state, 0);
- cso_for_each_state(sc, CSO_VERTEX_SHADER, delete_vs_state, 0);
cso_for_each_state(sc, CSO_RASTERIZER, delete_rasterizer_state, 0);
cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0);
cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0);