Mesa (master): ir3: Fixup dual-source blending slot

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 14 18:33:37 UTC 2020


Module: Mesa
Branch: master
Commit: 2a9d12d5133639946b624a1ad367ea3f9543a8fe
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a9d12d5133639946b624a1ad367ea3f9543a8fe

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Thu May 14 16:11:58 2020 +0200

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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>

---

 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",



More information about the mesa-commit mailing list