mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
radeonsi: simplify a loop in si_update_fb_dirtiness_after_rendering
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
bcd3e761a3
commit
bd5509d0a8
1 changed files with 9 additions and 13 deletions
|
|
@ -2647,21 +2647,17 @@ void si_update_fb_dirtiness_after_rendering(struct si_context *sctx)
|
|||
if (rtex->surface.has_stencil)
|
||||
rtex->stencil_dirty_level_mask |= 1 << surf->u.tex.level;
|
||||
}
|
||||
if (sctx->framebuffer.compressed_cb_mask) {
|
||||
struct pipe_surface *surf;
|
||||
struct r600_texture *rtex;
|
||||
unsigned mask = sctx->framebuffer.compressed_cb_mask;
|
||||
|
||||
do {
|
||||
unsigned i = u_bit_scan(&mask);
|
||||
surf = sctx->framebuffer.state.cbufs[i];
|
||||
rtex = (struct r600_texture*)surf->texture;
|
||||
unsigned compressed_cb_mask = sctx->framebuffer.compressed_cb_mask;
|
||||
while (compressed_cb_mask) {
|
||||
unsigned i = u_bit_scan(&compressed_cb_mask);
|
||||
struct pipe_surface *surf = sctx->framebuffer.state.cbufs[i];
|
||||
struct r600_texture *rtex = (struct r600_texture*)surf->texture;
|
||||
|
||||
if (rtex->fmask.size)
|
||||
rtex->dirty_level_mask |= 1 << surf->u.tex.level;
|
||||
if (rtex->dcc_gather_statistics)
|
||||
rtex->separate_dcc_dirty = true;
|
||||
} while (mask);
|
||||
if (rtex->fmask.size)
|
||||
rtex->dirty_level_mask |= 1 << surf->u.tex.level;
|
||||
if (rtex->dcc_gather_statistics)
|
||||
rtex->separate_dcc_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue