v3d: Fix precompile of FRAG_RESULT_DATA1 and higher outputs.
authorEric Anholt <eric@anholt.net>
Sat, 2 Feb 2019 00:41:56 +0000 (16:41 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 5 Feb 2019 23:35:49 +0000 (15:35 -0800)
I was just leaving the other MRT targets than DATA0 out, by accident.

src/gallium/drivers/v3d/v3d_program.c

index bebcf196ee8c82cf8c114e12408e087f2a224dbf..61ae1f259815769e9904bc6b3ab60bd5efcc7372 100644 (file)
@@ -200,7 +200,7 @@ v3d_shader_precompile(struct v3d_context *v3d,
                 nir_foreach_variable(var, &s->outputs) {
                         if (var->data.location == FRAG_RESULT_COLOR) {
                                 key.nr_cbufs = 1;
-                        } else if (var->data.location == FRAG_RESULT_DATA0) {
+                        } else if (var->data.location >= FRAG_RESULT_DATA0) {
                                 key.nr_cbufs = MAX2(key.nr_cbufs,
                                                     var->data.location -
                                                     FRAG_RESULT_DATA0 + 1);