From 07a3ccfbed2d7b0723a21a7014704ce07e67041b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 18 Jan 2021 19:14:23 -0500 Subject: [PATCH] pan/bi: Include ATEST datum in the instruction Rather than doing this at pack time like before, or adding extra constraints to the already overcomplicated scheduler, let's just include it like a regular FAU source. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index dec62645875..19830549472 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -381,8 +381,12 @@ bi_emit_fragment_out(bi_builder *b, nir_intrinsic_instr *instr) (T == nir_type_float32) ? bi_word(rgba, 3) : bi_dontcare(); - bi_atest_to(b, bi_register(60), bi_register(60), alpha); + bi_instr *atest = bi_atest_to(b, bi_register(60), + bi_register(60), alpha); b->shader->emitted_atest = true; + + /* Pseudo-source to encode in the tuple */ + atest->src[2] = bi_fau(BIR_FAU_ATEST_PARAM, false); } if (emit_zs) {