summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cso_cache/cso_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/cso_cache/cso_cache.c')
-rw-r--r--src/mesa/pipe/cso_cache/cso_cache.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/pipe/cso_cache/cso_cache.c b/src/mesa/pipe/cso_cache/cso_cache.c
index 4aaadf00e6..be653d9494 100644
--- a/src/mesa/pipe/cso_cache/cso_cache.c
+++ b/src/mesa/pipe/cso_cache/cso_cache.c
@@ -80,6 +80,8 @@ static struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_
hash = sc->depth_stencil_hash;
case CSO_RASTERIZER:
hash = sc->rasterizer_hash;
+ case CSO_SHADER:
+ hash = sc->shader_hash;
}
return hash;
@@ -96,6 +98,8 @@ static int _cso_size_for_type(enum cso_cache_type type)
return sizeof(struct pipe_depth_stencil_state);
case CSO_RASTERIZER:
return sizeof(struct pipe_rasterizer_state);
+ case CSO_SHADER:
+ return sizeof(struct pipe_shader_state);
}
return 0;
}
@@ -144,10 +148,11 @@ struct cso_cache *cso_cache_create(void)
{
struct cso_cache *sc = malloc(sizeof(struct cso_cache));
- sc->blend_hash = cso_hash_create();
- sc->sampler_hash = cso_hash_create();
+ sc->blend_hash = cso_hash_create();
+ sc->sampler_hash = cso_hash_create();
sc->depth_stencil_hash = cso_hash_create();
- sc->rasterizer_hash = cso_hash_create();
+ sc->rasterizer_hash = cso_hash_create();
+ sc->shader_hash = cso_hash_create();
return sc;
}
@@ -159,6 +164,6 @@ void cso_cache_delete(struct cso_cache *sc)
cso_hash_delete(sc->sampler_hash);
cso_hash_delete(sc->depth_stencil_hash);
cso_hash_delete(sc->rasterizer_hash);
+ cso_hash_delete(sc->shader_hash);
free(sc);
}
-