[Mesa-dev] [PATCH 17/24] gallium/radeon: don't do (fmask.size && cmask.size)

Marek Olšák maraeo at gmail.com
Mon Oct 24 22:33:17 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

fmask implies that cmask is present too.
---
 src/gallium/drivers/r600/evergreen_state.c | 2 +-
 src/gallium/drivers/r600/r600_state.c      | 2 +-
 src/gallium/drivers/radeonsi/si_state.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index c137964..2167e76 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1295,21 +1295,21 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
 		r600_context_add_resource_size(ctx, state->cbufs[i]->texture);
 
 		if (!surf->color_initialized) {
 			evergreen_init_color_surface(rctx, surf);
 		}
 
 		if (!surf->export_16bpc) {
 			rctx->framebuffer.export_16bpc = false;
 		}
 
-		if (rtex->fmask.size && rtex->cmask.size) {
+		if (rtex->fmask.size) {
 			rctx->framebuffer.compressed_cb_mask |= 1 << i;
 		}
 	}
 
 	/* Update alpha-test state dependencies.
 	 * Alpha-test is done on the first colorbuffer only. */
 	if (state->nr_cbufs) {
 		bool alphatest_bypass = false;
 		bool export_16bpc = true;
 
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 319db63..b00315d 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1129,21 +1129,21 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
 			if (force_cmask_fmask) {
 				/* re-initialize later without compression */
 				surf->color_initialized = false;
 			}
 		}
 
 		if (!surf->export_16bpc) {
 			rctx->framebuffer.export_16bpc = false;
 		}
 
-		if (rtex->fmask.size && rtex->cmask.size) {
+		if (rtex->fmask.size) {
 			rctx->framebuffer.compressed_cb_mask |= 1 << i;
 		}
 	}
 
 	/* Update alpha-test state dependencies.
 	 * Alpha-test is done on the first colorbuffer only. */
 	if (state->nr_cbufs) {
 		bool alphatest_bypass = false;
 
 		surf = (struct r600_surface*)state->cbufs[0];
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 4ae14f7..42689da 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2349,21 +2349,21 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
 		sctx->framebuffer.spi_shader_col_format_alpha |=
 			surf->spi_shader_col_format_alpha << (i * 4);
 		sctx->framebuffer.spi_shader_col_format_blend |=
 			surf->spi_shader_col_format_blend << (i * 4);
 		sctx->framebuffer.spi_shader_col_format_blend_alpha |=
 			surf->spi_shader_col_format_blend_alpha << (i * 4);
 
 		if (surf->color_is_int8)
 			sctx->framebuffer.color_is_int8 |= 1 << i;
 
-		if (rtex->fmask.size && rtex->cmask.size) {
+		if (rtex->fmask.size) {
 			sctx->framebuffer.compressed_cb_mask |= 1 << i;
 		}
 
 		if (surf->level_info->mode == RADEON_SURF_MODE_LINEAR_ALIGNED)
 			sctx->framebuffer.any_dst_linear = true;
 
 		r600_context_add_resource_size(ctx, surf->base.texture);
 
 		p_atomic_inc(&rtex->framebuffers_bound);
 
-- 
2.7.4



More information about the mesa-dev mailing list