[Mesa-dev] [PATCH 4/6] cso: Store hash key in struct cso_sampler
Michel Dänzer
michel at daenzer.net
Fri Dec 16 09:52:05 UTC 2016
From: Michel Dänzer <michel.daenzer at amd.com>
Preparation for following changes, no functional change intended.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/gallium/auxiliary/cso_cache/cso_cache.h | 1 +
src/gallium/auxiliary/cso_cache/cso_context.c | 1 +
2 files changed, 2 insertions(+)
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 03f78eea53..87b4b0444d 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)) {
--
2.11.0
More information about the mesa-dev
mailing list