mesa: simplify handling the return value of update_program
authorMarek Olšák <marek.olsak@amd.com>
Fri, 9 Jun 2017 22:01:21 +0000 (00:01 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Jun 2017 23:51:02 +0000 (01:51 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/state.c

index 960b5381e9beef55faa417f9e3058bce43bdfb24..5d2d9f001a4c988b7a1f1123a363e924d1aea939 100644 (file)
@@ -90,7 +90,6 @@ update_program(struct gl_context *ctx)
    const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current;
    const struct gl_program *prevTEP = ctx->TessEvalProgram._Current;
    const struct gl_program *prevCP = ctx->ComputeProgram._Current;
-   GLbitfield new_state = 0x0;
 
    /*
     * Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
@@ -213,9 +212,9 @@ update_program(struct gl_context *ctx)
        ctx->TessEvalProgram._Current != prevTEP ||
        ctx->TessCtrlProgram._Current != prevTCP ||
        ctx->ComputeProgram._Current != prevCP)
-      new_state |= _NEW_PROGRAM;
+      return _NEW_PROGRAM;
 
-   return new_state;
+   return 0;
 }