radeonsi: drop the negation from fmask_is_not_identity
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 20 Dec 2019 12:39:07 +0000 (13:39 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Jan 2020 10:10:15 +0000 (10:10 +0000)
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>

src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_compute_blit.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state.c

index 854065aba6b450ccf389260890504c71fac537b9..5ac68406f7fb467f717a2d322f5de3e69b523866 100644 (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;
        }
 }
 
index 967e9ee7d7f9e4ad803038b1bde258b9aeba0c3e..9c79932e1a88d025cb523c4a1b1b64844acd9118 100644 (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);
index 6caa65b56c28a682126b661bba8fe69df4e4ef3c..d42f0ff46165a1171fa7cef4f16597f7ca5d1d3f 100644 (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 */
index 9b913212e4ad9b1eaa1c6a83629b61350c804620..9390206f72f46a13a174a6ed4f94473d573d64bf 100644 (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;