Remove unneeded _Fragment/VertexShaderPresent fields, update comments.
authorBrian <brian@yutani.localnet.net>
Sat, 24 Feb 2007 22:39:37 +0000 (15:39 -0700)
committerBrian <brian@yutani.localnet.net>
Sat, 24 Feb 2007 22:39:37 +0000 (15:39 -0700)
src/mesa/main/mtypes.h
src/mesa/shader/shader_api.c
src/mesa/swrast/s_context.c

index b83beb8f91f45804d5f887e77b7bf9ee9ef741eb..bd9198ef12fc10cb8f47e7e9366e14ff3a7c7a4a 100644 (file)
@@ -1929,9 +1929,11 @@ struct gl_vertex_program_state
    GLboolean _Enabled;              /**< Enabled and valid program? */
    GLboolean PointSizeEnabled;      /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
    GLboolean TwoSideEnabled;        /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
-   struct gl_vertex_program *Current;  /**< ptr to currently bound program */
+   struct gl_vertex_program *Current;  /**< user-bound vertex program */
 
-   /** Currently enabled and valid program (including internal programs) */
+   /** Currently enabled and valid program (including internal programs
+    * and compiled shader programs).
+    */
    struct gl_vertex_program *_Current;
 
    GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
@@ -1962,9 +1964,11 @@ struct gl_fragment_program_state
 {
    GLboolean Enabled;     /**< User-set fragment program enable flag */
    GLboolean _Enabled;    /**< Fragment program enabled and valid? */
-   struct gl_fragment_program *Current;  /**< User-bound program */
+   struct gl_fragment_program *Current;  /**< User-bound fragment program */
 
-   /** Currently enabled and valid program (including internal programs) */
+   /** Currently enabled and valid program (including internal programs
+    * and compiled shader programs).
+    */
    struct gl_fragment_program *_Current;
 
    GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
@@ -2099,9 +2103,7 @@ struct gl_shader_program
  */
 struct gl_shader_state
 {
-   GLboolean _VertexShaderPresent;
-   GLboolean _FragmentShaderPresent;
-   struct gl_shader_program *CurrentProgram;
+   struct gl_shader_program *CurrentProgram; /**< The user-bound program */
 };
 
 
index c439f71f41206a5dd8333a2dca9343a7d474ff99..70ceb70fe74619e774f9d89756f111948695a672 100644 (file)
@@ -199,8 +199,7 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name)
 void
 _mesa_init_shader_state(GLcontext * ctx)
 {
-   ctx->Shader._FragmentShaderPresent = GL_FALSE;
-   ctx->Shader._VertexShaderPresent = GL_FALSE;
+   /* no-op */
 }
 
 
index 5e174f81d5f55ce3f8d6808300454370730c20a1..031d74f31b0d870e333c2a53f57d4dfb678e9d6c 100644 (file)
@@ -102,10 +102,6 @@ _swrast_update_rasterflags( GLcontext *ctx )
       rasterMask |= FRAGPROG_BIT;
    }
 
-   if (ctx->Shader._FragmentShaderPresent) {
-      rasterMask |= FRAGPROG_BIT;
-   }
-
    if (ctx->ATIFragmentShader._Enabled) {
       rasterMask |= ATIFRAGSHADER_BIT;
    }