From: Kenneth Graunke Date: Sat, 29 Jun 2013 02:03:06 +0000 (-0700) Subject: i965: Replace fprintfs with assertions in GLenum comparison translators. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=251cdcf059a3554f7d76c76147b53add2dc8fd63;p=mesa.git i965: Replace fprintfs with assertions in GLenum comparison translators. These functions translate GLenum comparison operations into the hardware enumerations. They should never be passed something other than a GL comparison operator, or something is very broken. Assertions seem more appropriate than fprintf. Signed-off-by: Kenneth Graunke Reviewed-by: Chad Versace --- diff --git a/src/mesa/drivers/dri/i965/intel_state.c b/src/mesa/drivers/dri/i965/intel_state.c index e4a63e5c6ad..3bb0fc196d3 100644 --- a/src/mesa/drivers/dri/i965/intel_state.c +++ b/src/mesa/drivers/dri/i965/intel_state.c @@ -59,7 +59,7 @@ intel_translate_shadow_compare_func(GLenum func) return BRW_COMPAREFUNCTION_NEVER; } - fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func); + assert(!"Invalid shadow comparison function."); return BRW_COMPAREFUNCTION_NEVER; } @@ -85,7 +85,7 @@ intel_translate_compare_func(GLenum func) return BRW_COMPAREFUNCTION_ALWAYS; } - fprintf(stderr, "Unknown value in %s: %x\n", __FUNCTION__, func); + assert(!"Invalid comparison function."); return BRW_COMPAREFUNCTION_ALWAYS; }