From aceba66795bb0da7f09d0af6d9b766e1e52ca9cc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 11 Apr 2013 10:08:56 -0700 Subject: [PATCH] i965: Fix error path for MCS allocation. Asserts don't stop execution in release builds, so we would continue on to use an uninitialized format value. Just take the failure path, which appears to continue up the call stack for a while. Reviewed-by: Matt Turner --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index d7908c11516..7da020103e2 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -976,7 +976,7 @@ intel_miptree_alloc_mcs(struct intel_context *intel, break; default: assert(!"Unrecognized sample count in intel_miptree_alloc_mcs"); - break; + return false; }; /* From the Ivy Bridge PRM, Vol4 Part1 p76, "MCS Base Address": -- 2.30.2