summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-03-29 20:39:48 -0400
committerIlia Mirkin <[email protected]>2015-04-02 00:09:14 -0400
commit602bc6c88dbfa34083aa9d229fb6396b008e23eb (patch)
tree09a11efd6b449d8fa8694d95350ae72afbfaa14e /src/gallium/drivers/freedreno/freedreno_context.c
parentd13803c76fd7429df64c1aa3631dcc451e7f1a29 (diff)
freedreno: add core infrastructure support for MRTs
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 79a27fe0e15..bb1b52797a8 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -95,6 +95,7 @@ fd_context_render(struct pipe_context *pctx)
{
struct fd_context *ctx = fd_context(pctx);
struct pipe_framebuffer_state *pfb = &ctx->framebuffer;
+ int i;
DBG("needs_flush: %d", ctx->needs_flush);
@@ -116,8 +117,9 @@ fd_context_render(struct pipe_context *pctx)
ctx->gmem_reason = 0;
ctx->num_draws = 0;
- if (pfb->cbufs[0])
- fd_resource(pfb->cbufs[0]->texture)->dirty = false;
+ for (i = 0; i < pfb->nr_cbufs; i++)
+ if (pfb->cbufs[i])
+ fd_resource(pfb->cbufs[i]->texture)->dirty = false;
if (pfb->zsbuf)
fd_resource(pfb->zsbuf->texture)->dirty = false;
}