summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-11-23 16:05:41 +0100
committerMichel Dänzer <[email protected]>2012-11-28 15:48:50 +0100
commit6e33b55ee16c9885391d3baff33545a5209c0623 (patch)
treef3fec6d8f7e2e13db4037f6c8cbe46b67946c8d1 /src/gallium/drivers/radeonsi/si_state.c
parenta8d46d017389c287db3e7062e8fdffbbef2ae50d (diff)
radeonsi: Reinstate assertions against invalid colour/depth formats.
radeonsi now supports Z16 and doesn't fail these assertions anymore. This partially reverts commit 7bba4879bb79719e22a18b52759b1d1d839c783c, but leaves the error messages in place to allow diagnosing such problems even with non-debugging builds. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index f7c80a26de5..2b574f3cc52 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1609,6 +1609,7 @@ static void si_cb(struct r600_context *rctx, struct si_pm4_state *pm4,
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;
@@ -1693,6 +1694,7 @@ static void si_db(struct r600_context *rctx, struct si_pm4_state *pm4,
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;