mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
freedreno: use util_copy_framebuffer_state()
Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
c63450e829
commit
1f3ca56b76
1 changed files with 1 additions and 12 deletions
|
|
@ -117,29 +117,18 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
|
||||||
{
|
{
|
||||||
struct fd_context *ctx = fd_context(pctx);
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
struct pipe_framebuffer_state *cso = &ctx->framebuffer;
|
struct pipe_framebuffer_state *cso = &ctx->framebuffer;
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
DBG("%d: cbufs[0]=%p, zsbuf=%p", ctx->needs_flush,
|
DBG("%d: cbufs[0]=%p, zsbuf=%p", ctx->needs_flush,
|
||||||
framebuffer->cbufs[0], framebuffer->zsbuf);
|
framebuffer->cbufs[0], framebuffer->zsbuf);
|
||||||
|
|
||||||
fd_context_render(pctx);
|
fd_context_render(pctx);
|
||||||
|
|
||||||
for (i = 0; i < framebuffer->nr_cbufs; i++)
|
util_copy_framebuffer_state(cso, framebuffer);
|
||||||
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;
|
|
||||||
|
|
||||||
if ((cso->width != framebuffer->width) ||
|
if ((cso->width != framebuffer->width) ||
|
||||||
(cso->height != framebuffer->height))
|
(cso->height != framebuffer->height))
|
||||||
ctx->needs_rb_fbd = true;
|
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->dirty |= FD_DIRTY_FRAMEBUFFER;
|
||||||
|
|
||||||
ctx->disabled_scissor.minx = 0;
|
ctx->disabled_scissor.minx = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue