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;