aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-29 08:31:03 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-29 08:31:03 -0700
commit463164b325d1a9d6b05f4e459af04b2e8df29dbe (patch)
tree6383c51023c98c81c9f58ac518c8a3b9d14d3656 /src/panfrost
parent4ee638cd7826e8a4bed76f51c7b73395a2fcdbbc (diff)
pan/midgard: Fix alpha test w.r.t new indexing
Fixes: 9beb3391b55 ("pan/midgard: Tag SSA/reg") Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/midgard/midgard_compile.c3
1 files changed, 2 insertions, 1 deletions
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: