diff options
author | Rob Clark <[email protected]> | 2014-06-18 13:50:14 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-06-22 07:28:17 -0400 |
commit | 1f3ca56b765f74eeddc52d584b3dea4de582587c (patch) | |
tree | d9c67c4f71848a98059815d6cdced0590cfe6ce0 /src | |
parent | c63450e8298a34aa0f4077a846b5b0467cdeb567 (diff) |
freedreno: use util_copy_framebuffer_state()
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_state.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index 93fbc3525ec..e7d783a6a56 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -117,29 +117,18 @@ fd_set_framebuffer_state(struct pipe_context *pctx, { struct fd_context *ctx = fd_context(pctx); struct pipe_framebuffer_state *cso = &ctx->framebuffer; - unsigned i; DBG("%d: cbufs[0]=%p, zsbuf=%p", ctx->needs_flush, framebuffer->cbufs[0], framebuffer->zsbuf); fd_context_render(pctx); - for (i = 0; i < framebuffer->nr_cbufs; i++) - pipe_surface_reference(&cso->cbufs[i], framebuffer->cbufs[i]); - for (; i < ctx->framebuffer.nr_cbufs; i++) - pipe_surface_reference(&cso->cbufs[i], NULL); - - cso->nr_cbufs = framebuffer->nr_cbufs; + util_copy_framebuffer_state(cso, framebuffer); if ((cso->width != framebuffer->width) || (cso->height != framebuffer->height)) ctx->needs_rb_fbd = true; - cso->width = framebuffer->width; - cso->height = framebuffer->height; - - pipe_surface_reference(&cso->zsbuf, framebuffer->zsbuf); - ctx->dirty |= FD_DIRTY_FRAMEBUFFER; ctx->disabled_scissor.minx = 0; |