mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
freedreno: Move framebuffer state checks under a ctx->dirty flag.
Anything changing this should have flagged FD_DIRTY_FRAMEBUFFER. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8602>
This commit is contained in:
parent
6e29757a57
commit
49b83509fe
1 changed files with 15 additions and 14 deletions
|
|
@ -105,25 +105,26 @@ batch_draw_tracking(struct fd_batch *batch, const struct pipe_draw_info *info,
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx->dirty & FD_DIRTY_FRAMEBUFFER) {
|
||||
for (unsigned i = 0; i < pfb->nr_cbufs; i++) {
|
||||
struct pipe_resource *surf;
|
||||
|
||||
for (unsigned i = 0; i < pfb->nr_cbufs; i++) {
|
||||
struct pipe_resource *surf;
|
||||
if (!pfb->cbufs[i])
|
||||
continue;
|
||||
|
||||
if (!pfb->cbufs[i])
|
||||
continue;
|
||||
surf = pfb->cbufs[i]->texture;
|
||||
|
||||
surf = pfb->cbufs[i]->texture;
|
||||
if (fd_resource(surf)->valid) {
|
||||
restore_buffers |= PIPE_CLEAR_COLOR0 << i;
|
||||
} else {
|
||||
batch->invalidated |= PIPE_CLEAR_COLOR0 << i;
|
||||
}
|
||||
|
||||
if (fd_resource(surf)->valid) {
|
||||
restore_buffers |= PIPE_CLEAR_COLOR0 << i;
|
||||
} else {
|
||||
batch->invalidated |= PIPE_CLEAR_COLOR0 << i;
|
||||
buffers |= PIPE_CLEAR_COLOR0 << i;
|
||||
|
||||
if (ctx->dirty & FD_DIRTY_FRAMEBUFFER)
|
||||
resource_written(batch, pfb->cbufs[i]->texture);
|
||||
}
|
||||
|
||||
buffers |= PIPE_CLEAR_COLOR0 << i;
|
||||
|
||||
if (ctx->dirty & FD_DIRTY_FRAMEBUFFER)
|
||||
resource_written(batch, pfb->cbufs[i]->texture);
|
||||
}
|
||||
|
||||
if (ctx->dirty & FD_DIRTY_BLEND) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue