summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-12-16 11:41:54 +0900
committerMichel Dänzer <michel@daenzer.net>2016-12-19 17:51:31 +0900
commit745e2eaaec1f938184f3e9a2acfacf7e02ce0da8 (patch)
treeb74df44efc418464869d68727786be47759553a7 /src/gallium
parent9e142386472e599e70856634e4cbd247114af74a (diff)
cso: Store hash key in struct cso_sampler
Preparation for following changes, no functional change intended. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_cache.h1
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.h b/src/gallium/auxiliary/cso_cache/cso_cache.h
index 052245f96f..ab1e4af0ad 100644
--- a/src/gallium/auxiliary/cso_cache/cso_cache.h
+++ b/src/gallium/auxiliary/cso_cache/cso_cache.h
@@ -129,6 +129,7 @@ struct cso_sampler {
void *data;
cso_state_callback delete_state;
struct pipe_context *context;
+ unsigned hash_key;
};
struct cso_velems_state {
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 0f4a333ab0..6031cfc0d2 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1182,6 +1182,7 @@ cso_single_sampler(struct cso_context *ctx, unsigned shader_stage,
cso->delete_state =
(cso_state_callback) ctx->pipe->delete_sampler_state;
cso->context = ctx->pipe;
+ cso->hash_key = hash_key;
iter = cso_insert_state(ctx->cache, hash_key, CSO_SAMPLER, cso);
if (cso_hash_iter_is_null(iter)) {