From 2a9d12d5133639946b624a1ad367ea3f9543a8fe Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 14 May 2020 16:11:58 +0200 Subject: [PATCH] ir3: Fixup dual-source blending slot The hardware expects that where MRT0 and MRT1 would normally go are the dual sources for MRT0, whereas GLSL has an extra "index" parameter that indicates which source it is. Remap it when handling FS outputs. Part-of: --- src/freedreno/ir3/ir3_compiler_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 9e1105bce08..7ba65e1498e 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -3112,6 +3112,7 @@ setup_output(struct ir3_context *ctx, nir_variable *out) so->writes_smask = true; break; default: + slot += out->data.index; /* For dual-src blend */ if (slot >= FRAG_RESULT_DATA0) break; ir3_context_error(ctx, "unknown FS output name: %s\n", -- 2.30.2