[Mesa-dev] [PATCH 2/2] Revert "radeonsi: remove new asserts and replace with warnings"

Michel Dänzer michel at daenzer.net
Tue Nov 27 10:11:44 PST 2012


From: Michel Dänzer <michel.daenzer at amd.com>

This reverts commit 7bba4879bb79719e22a18b52759b1d1d839c783c.

radeonsi now supports Z16 and doesn't fail these assertions anymore.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/gallium/drivers/radeonsi/si_state.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index f7c80a2..c1c6b3b 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1606,9 +1606,7 @@ static void si_cb(struct r600_context *rctx, struct si_pm4_state *pm4,
 	}
 
 	format = si_translate_colorformat(surf->base.format);
-	if (format == V_028C70_COLOR_INVALID) {
-		R600_ERR("Invalid CB format: %d, disabling CB.\n", surf->base.format);
-	}
+	assert(format != V_028C70_COLOR_INVALID);
 	swap = si_translate_colorswap(surf->base.format);
 	if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
 		endian = V_028C70_ENDIAN_NONE;
@@ -1690,9 +1688,7 @@ static void si_db(struct r600_context *rctx, struct si_pm4_state *pm4,
 
 	format = si_translate_dbformat(rtex->real_format);
 
-	if (format == V_028040_Z_INVALID) {
-		R600_ERR("Invalid DB format: %d, disabling DB.\n", rtex->real_format);
-	}
+	assert(format != V_028040_Z_INVALID);
 
 	s_offs = z_offs = r600_resource_va(rctx->context.screen, surf->base.texture);
 	z_offs += rtex->surface.level[level].offset;
-- 
1.7.10.4



More information about the mesa-dev mailing list