Mesa (master): mesa: remove unneeded _mesa_reference_fragprog() call

Brian Paul brianp at kemper.freedesktop.org
Thu Dec 18 01:06:11 UTC 2008


Module: Mesa
Branch: master
Commit: 35aebf46679a6450b912b592b83badcfb523b79c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=35aebf46679a6450b912b592b83badcfb523b79c

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Wed Dec 17 18:05:03 2008 -0700

mesa: remove unneeded _mesa_reference_fragprog() call

The subsequent if/else cases always call _mesa_reference_fragprog() anyway.

---

 src/mesa/main/state.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index e87a62f..df1d197 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -190,8 +190,8 @@ update_program(GLcontext *ctx)
 
    /*
     * Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
-    * pointers to the programs that should be enabled/used.  These will only
-    * be NULL if we need to use the fixed-function code.
+    * pointers to the programs that should be used for rendering.  If either
+    * is NULL, use fixed-function code paths.
     *
     * These programs may come from several sources.  The priority is as
     * follows:
@@ -204,8 +204,6 @@ update_program(GLcontext *ctx)
     * come up, or matter.
     */
 
-   _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
-
    if (shProg && shProg->LinkStatus && shProg->FragmentProgram) {
       /* Use shader programs */
       _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,




More information about the mesa-commit mailing list