vbo: Move vbo_split into the tnl module.
[mesa.git] / src / mesa / tnl / t_vb_program.c
index 695821a1b4195b4ca8797694e323be7e90c5bb17..19be5eed63a21ff82c00967ade47757d8a7f66c7 100644 (file)
@@ -35,6 +35,7 @@
 #include "main/macros.h"
 #include "main/imports.h"
 #include "main/samplerobj.h"
+#include "main/state.h"
 #include "math/m_xform.h"
 #include "program/prog_instruction.h"
 #include "program/prog_statevars.h"
@@ -162,8 +163,9 @@ do_ndc_cliptest(struct gl_context *ctx, struct vp_stage_data *store)
    /* Test userclip planes.  This contributes to VB->ClipMask.
     */
    /** XXX NEW_SLANG _Enabled ??? */
-   if (ctx->Transform.ClipPlanesEnabled && (!ctx->VertexProgram._Enabled ||
-      ctx->VertexProgram.Current->IsPositionInvariant)) {
+   if (ctx->Transform.ClipPlanesEnabled &&
+       (!_mesa_arb_vertex_program_enabled(ctx) ||
+      ctx->VertexProgram.Current->arb.IsPositionInvariant)) {
       userclip( ctx,
                VB->ClipPtr,
                store->clipmask,
@@ -397,7 +399,7 @@ run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage )
 
    unmap_textures(ctx, program);
 
-   if (program->IsPositionInvariant) {
+   if (program->arb.IsPositionInvariant) {
       /* We need the exact same transform as in the fixed function path here
        * to guarantee invariance, depending on compiler optimization flags
        * results could be different otherwise.