Merge commit 'mesa_7_6_branch' into mesa_7_7_branch
[mesa.git] / src / mesa / drivers / dri / i915 / i915_context.c
index be47ace65e94aa612494b39c0cb3fe4173a4bd41..7d4c7cfbabbdd1a1d6e346f7f826c3242a5c30b7 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "i915_context.h"
 #include "main/imports.h"
+#include "main/macros.h"
 #include "intel_tex.h"
 #include "intel_tris.h"
 #include "tnl/t_context.h"
@@ -39,6 +40,7 @@
 
 #include "utils.h"
 #include "i915_reg.h"
+#include "i915_program.h"
 
 #include "intel_regions.h"
 #include "intel_batchbuffer.h"
@@ -79,6 +81,8 @@ i915InvalidateState(GLcontext * ctx, GLuint new_state)
       i915_update_stencil(ctx);
    if (new_state & (_NEW_LIGHT))
        i915_update_provoking_vertex(ctx);
+   if (new_state & (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS))
+       i915_update_program(ctx);
 }
 
 
@@ -138,7 +142,7 @@ i915CreateContext(const __GLcontextModes * mesaVis,
    ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
    ctx->Const.MaxTextureImageUnits = I915_TEX_UNITS;
    ctx->Const.MaxTextureCoordUnits = I915_TEX_UNITS;
-
+   ctx->Const.MaxVarying = I915_TEX_UNITS;
 
    /* Advertise the full hardware capabilities.  The new memory
     * manager should cope much better with overload situations: