From: Eric Anholt Date: Thu, 11 Apr 2013 17:08:56 +0000 (-0700) Subject: i965: Fix error path for MCS allocation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aceba66795bb0da7f09d0af6d9b766e1e52ca9cc;p=mesa.git 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 --- 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":