add a bunch of FLUSH_VERTICES to some of the ATI_fs functions, most notably when...
authorRoland Scheidegger <rscheidegger@gmx.ch>
Thu, 8 Sep 2005 00:12:57 +0000 (00:12 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Thu, 8 Sep 2005 00:12:57 +0000 (00:12 +0000)
src/mesa/shader/atifragshader.c

index 3117467..b86396a 100644 (file)
@@ -246,6 +246,7 @@ _mesa_DeleteFragmentShaderATI(GLuint id)
       else if (prog) {
         if (ctx->ATIFragmentShader.Current &&
             ctx->ATIFragmentShader.Current->Base.Id == id) {
+            FLUSH_VERTICES(ctx, _NEW_PROGRAM);
            _mesa_BindFragmentShaderATI(0);
         }
       }
@@ -280,6 +281,8 @@ _mesa_BeginFragmentShaderATI(void)
       return;
    }
 
+   FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
    /* if the shader was already defined free instructions and get new ones
       (or, could use the same mem but would need to reinitialize) */
    /* no idea if it's allowed to redefine a shader */
@@ -715,6 +718,7 @@ _mesa_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value)
       curProg->localConstDef |= 1 << dstindex;
    }
    else {
+      FLUSH_VERTICES(ctx, _NEW_PROGRAM);
       COPY_4V(ctx->ATIFragmentShader.globalConstants[dstindex], value);
    }
 }