On 04/22/2017 03:46 PM, Giuseppe Bilotta wrote:
On Sat, Apr 22, 2017 at 11:45 AM, Nicolai Hähnle <[email protected]> wrote:
@@ -495,8 +492,8 @@ static GLboolean args_match( const struct state_key
*key, GLuint unit )
             return GL_FALSE;
          }
          break;
-      default:
-        return GL_FALSE;       /* impossible */
+      default:
+        unreachable("Invalid TexEnv Combine operand");

For this one, I think despite the comment it'd be best to change that to an
assert + return first, and re-visit it after some time.

Makes sense. As Gustaw suggests, it _shouldn't_ happen, but there's
nothing to lose in being cautious about it 8-). I'll respin this patch
with the assert+return here.

I just want to second that. It's really bad when our driver crashes in the hands of a customer. I'd rather have a rendering glitch than a crash. I'm kind of worried about the proliferation of unreachable() in Mesa.

-Brian

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to