[Mesa-dev] [PATCH 2/3] radeonsi: assert the CB format is valid

alexdeucher at gmail.com alexdeucher at gmail.com
Thu Nov 15 08:00:12 PST 2012


From: Alex Deucher <alexander.deucher at amd.com>

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/gallium/drivers/radeonsi/si_state.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index c5ae49a..b4e09ed 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1606,6 +1606,7 @@ static void si_cb(struct r600_context *rctx, struct si_pm4_state *pm4,
 	}
 
 	format = si_translate_colorformat(surf->base.format);
+	assert(format != ~0U);
 	swap = si_translate_colorswap(surf->base.format);
 	if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
 		endian = V_028C70_ENDIAN_NONE;
-- 
1.7.7.5



More information about the mesa-dev mailing list