mesa: remove comparisons that are always true
authorJan Vesely <jan.vesely@rutgers.edu>
Wed, 14 Jan 2015 20:53:18 +0000 (15:53 -0500)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 21 Jan 2015 14:05:04 +0000 (14:05 +0000)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/program/prog_execute.c
src/mesa/program/prog_statevars.c

index 33c1751e8105d52e67d8c27812df12becd541707..85aba0013d0ef05d7e7d694670dd5b79c3aa43f9 100644 (file)
@@ -1260,7 +1260,6 @@ _mesa_execute_program(struct gl_context * ctx,
                else if (swz == SWIZZLE_ONE)
                   result[i] = 1.0;
                else {
-                  ASSERT(swz >= 0);
                   ASSERT(swz <= 3);
                   result[i] = src[swz];
                }
index be5ddb106b0cde7a90ccb8e3955d5c2e5daa783c..7f5daf8c676e06216e360ca0df30199a2af6c71c 100644 (file)
@@ -295,9 +295,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
          const gl_state_index modifier = state[4];
          const GLfloat *m;
          GLuint row, i;
-         ASSERT(firstRow >= 0);
          ASSERT(firstRow < 4);
-         ASSERT(lastRow >= 0);
          ASSERT(lastRow < 4);
          if (mat == STATE_MODELVIEW_MATRIX) {
             matrix = ctx->ModelviewMatrixStack.Top;