From 0a123ce68b5dbc0184dfa2bc8176c2caf0f40d58 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Tue, 18 Feb 2025 13:43:16 +0100 Subject: [PATCH] ir3: add pointer from ir3_shader_variant to ir3_shader Needed in the next commit to get the shader key for a variant. Signed-off-by: Job Noorman Part-of: --- src/freedreno/ir3/ir3_shader.c | 1 + src/freedreno/ir3/ir3_shader.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index 92a4d3339fa..d46e78e7d65 100644 --- a/src/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -510,6 +510,7 @@ alloc_variant(struct ir3_shader *shader, const struct ir3_shader_key *key, return NULL; v->id = ++shader->variant_count; + v->shader = shader; v->shader_id = shader->id; v->binning_pass = !!nonbinning; v->nonbinning = nonbinning; diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index 6be4dfb1c39..3ee2f8d6aaa 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -633,6 +633,7 @@ struct ir3_shader_variant { /* id of the shader the variant came from (for debug) */ uint32_t shader_id; + struct ir3_shader *shader; struct ir3_shader_key key;