radeonsi: drop the negation from fmask_is_not_identity

This change eases code reading ("fmask_is_identity = true" is clearer than
"fmask_is_not_identity = false").
Initialization is not changed so fmask_is_identity is false when a texture is
created.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3174>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3174>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2019-12-20 13:39:07 +01:00 committed by Marge Bot
parent 3a527eda7c
commit 7b0b085c94
4 changed files with 5 additions and 5 deletions

View File

@ -516,9 +516,9 @@ static void si_blit_decompress_color(struct si_context *sctx,
tex->surface.u.gfx9.dcc.pipe_aligned);
expand_fmask:
if (need_fmask_expand && tex->surface.fmask_offset && tex->fmask_is_not_identity) {
if (need_fmask_expand && tex->surface.fmask_offset && !tex->fmask_is_identity) {
si_compute_expand_fmask(&sctx->b, &tex->buffer.b.b);
tex->fmask_is_not_identity = false;
tex->fmask_is_identity = true;
}
}

View File

@ -325,7 +325,7 @@ void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
(!force_cpdma &&
clear_value_size == 4 &&
offset % 4 == 0 &&
(size > 32*1024 || sctx->chip_class <= GFX8))) {
(size > 32*1024 || sctx->chip_class <= GFX9))) {
si_compute_do_clear_or_copy(sctx, dst, offset, NULL, 0,
aligned_size, clear_value,
clear_value_size, coher);

View File

@ -321,7 +321,7 @@ struct si_texture {
uint16_t stencil_dirty_level_mask; /* each bit says if that mipmap is compressed */
enum pipe_format db_render_format:16;
uint8_t stencil_clear_value;
bool fmask_is_not_identity:1;
bool fmask_is_identity:1;
bool tc_compatible_htile:1;
bool htile_stencil_disabled:1;
bool depth_cleared:1; /* if it was cleared at least once */

View File

@ -2838,7 +2838,7 @@ void si_update_fb_dirtiness_after_rendering(struct si_context *sctx)
if (tex->surface.fmask_offset) {
tex->dirty_level_mask |= 1 << surf->u.tex.level;
tex->fmask_is_not_identity = true;
tex->fmask_is_identity = false;
}
if (tex->dcc_gather_statistics)
tex->separate_dcc_dirty = true;