i965: Make sure the VS URB size is big enough to fit a VF VUE.
[mesa.git] / src / mesa / tnl / t_vb_fog.c
index d8bca3820bc8ee7b5a1281e2e0f99ccc232faf1e..f3a7bd49f40189a4ca81ebc92e0365a9d315138a 100644 (file)
  */
 
 
-#include "glheader.h"
-#include "colormac.h"
-#include "context.h"
-#include "macros.h"
-#include "imports.h"
-#include "mtypes.h"
+#include "main/glheader.h"
+#include "main/colormac.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
 
 #include "math/m_xform.h"
 
@@ -148,11 +148,11 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
    struct fog_stage_data *store = FOG_STAGE_DATA(stage);
    GLvector4f *input;
 
-   if (!ctx->Fog.Enabled || ctx->VertexProgram._Current)
-      return GL_TRUE;
 
+   if (!ctx->Fog.Enabled)
+      return GL_TRUE;
 
-   if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT) {
+   if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT && !ctx->VertexProgram._Current) {
       GLuint i;
       GLfloat *coord;
       /* Fog is computed from vertex or fragment Z values */