r600: fix regression in gl_FragColor drawing
authorDave Airlie <airlied@redhat.com>
Wed, 14 Feb 2018 03:59:09 +0000 (13:59 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 14 Feb 2018 04:02:41 +0000 (14:02 +1000)
This fixes a regression in the broadcast color to all color bufs case.

Fixes: 6c691081a (r600: fixup sparse color exports.)
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 7d60bd9..b49c79c 100644 (file)
@@ -4123,6 +4123,8 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
                                                        output[j].op = CF_OP_EXPORT;
                                                        output[j].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL;
                                                        shader->nr_ps_color_exports++;
+                                                       if (k > shader->ps_export_highest)
+                                                               shader->ps_export_highest = k;
                                                        shader->ps_color_export_mask |= (0xf << (j * 4));
                                                }
                                        }