freedreno/a6xx: Only output MRT control for used framebuffers
authorKristian H. Kristensen <hoegsberg@chromium.org>
Sat, 23 Feb 2019 19:12:23 +0000 (11:12 -0800)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Thu, 28 Feb 2019 18:43:53 +0000 (10:43 -0800)
Not much of an optimization, but makes for less noise in the command
buffer dumps.

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_emit.c

index 243d44335ac6c8590060023cf3b7fc166fd2b7b9..f0e6e54785db54e16a0c280daf53b12eb0c8f77b 100644 (file)
@@ -881,7 +881,7 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
                struct fd6_blend_stateobj *blend = fd6_blend_stateobj(ctx->blend);
                uint32_t i;
 
-               for (i = 0; i < A6XX_MAX_RENDER_TARGETS; i++) {
+               for (i = 0; i < pfb->nr_cbufs; i++) {
                        enum pipe_format format = pipe_surface_format(pfb->cbufs[i]);
                        bool is_int = util_format_is_pure_integer(format);
                        bool has_alpha = util_format_has_alpha(format);