From 463164b325d1a9d6b05f4e459af04b2e8df29dbe Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 29 Jul 2019 08:31:03 -0700 Subject: [PATCH] pan/midgard: Fix alpha test w.r.t new indexing Fixes: 9beb3391b55 ("pan/midgard: Tag SSA/reg") Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 646646423c0..dbc5a338017 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -1440,9 +1440,10 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr) float ref_value = ctx->alpha_ref; + /* See emit_load_const */ float *v = ralloc_array(NULL, float, 4); memcpy(v, &ref_value, sizeof(float)); - _mesa_hash_table_u64_insert(ctx->ssa_constants, instr->dest.ssa.index + 1, v); + _mesa_hash_table_u64_insert(ctx->ssa_constants, (instr->dest.ssa.index << 1) + 1, v); break; case nir_intrinsic_load_viewport_scale: -- 2.30.2