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>
This commit is contained in:
Connor Abbott
2020-05-14 16:11:58 +02:00
committed by Marge Bot
parent 0e0580550e
commit 2a9d12d513

View File

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