aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-03-05 16:53:11 -0500
committerRob Clark <[email protected]>2016-03-13 12:23:41 -0400
commitf68c6951b86ac38ebdb89bc6b5a6285433e684a6 (patch)
tree94e5a8268fc5fe875d88120a3010e14537d79d57 /src/gallium/drivers/freedreno/a4xx/fd4_emit.c
parentb3fe196e21dbbb51e62ed42dce890ada2bfd6db8 (diff)
freedreno/a4xx: hw binning
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx/fd4_emit.c')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 58ddf2aeebe..81ed16ce8ac 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -606,7 +606,11 @@ fd4_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
if (dirty & (FD_DIRTY_PROG | FD_DIRTY_FRAMEBUFFER)) {
struct pipe_framebuffer_state *pfb = &ctx->framebuffer;
- fd4_program_emit(ring, emit, pfb->nr_cbufs, pfb->cbufs);
+ unsigned n = pfb->nr_cbufs;
+ /* if we have depth/stencil, we need at least on MRT: */
+ if (pfb->zsbuf)
+ n = MAX2(1, n);
+ fd4_program_emit(ring, emit, n, pfb->cbufs);
}
if (emit->prog == &ctx->prog) { /* evil hack to deal sanely with clear path */