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>
This commit is contained in:
Michel Dänzer
2016-12-16 11:41:54 +09:00
committed by Michel Dänzer
parent 9e14238647
commit 745e2eaaec
2 changed files with 2 additions and 0 deletions
@@ -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 {
@@ -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)) {