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 <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user