From: Alyssa Rosenzweig Date: Mon, 29 Jul 2019 15:31:03 +0000 (-0700) Subject: pan/midgard: Fix alpha test w.r.t new indexing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=463164b325d1a9d6b05f4e459af04b2e8df29dbe;p=mesa.git pan/midgard: Fix alpha test w.r.t new indexing Fixes: 9beb3391b55 ("pan/midgard: Tag SSA/reg") Signed-off-by: Alyssa Rosenzweig --- 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: