Mesa (master): radeonsi: drop the negation from fmask_is_not_identity

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 15 10:26:07 UTC 2020


Module: Mesa
Branch: master
Commit: 7b0b085c94347cb9c94d88e11a64a6c341d95477
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b0b085c94347cb9c94d88e11a64a6c341d95477

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Fri Dec 20 13:39:07 2019 +0100

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 at 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         | 4 ++--
 src/gallium/drivers/radeonsi/si_compute_blit.c | 2 +-
 src/gallium/drivers/radeonsi/si_pipe.h         | 2 +-
 src/gallium/drivers/radeonsi/si_state.c        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 854065aba6b..5ac68406f7f 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -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;
 	}
 }
 
diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c
index 967e9ee7d7f..9c79932e1a8 100644
--- a/src/gallium/drivers/radeonsi/si_compute_blit.c
+++ b/src/gallium/drivers/radeonsi/si_compute_blit.c
@@ -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);
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 6caa65b56c2..d42f0ff4616 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -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 */
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 9b913212e4a..9390206f72f 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -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;



More information about the mesa-commit mailing list