Skip to content
Snippets Groups Projects
Commit 1f3ca56b authored by Rob Clark's avatar Rob Clark :speech_balloon:
Browse files

freedreno: use util_copy_framebuffer_state()


Signed-off-by: default avatarRob Clark <robclark@freedesktop.org>
parent c63450e8
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment