summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo/vbo_context.h')
-rw-r--r--src/mesa/vbo/vbo_context.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index bf405eb693..7e366d474d 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -92,16 +92,18 @@ static INLINE struct vbo_context *vbo_context(GLcontext *ctx)
return (struct vbo_context *)(ctx->swtnl_im);
}
-enum {
- VP_NONE = 1,
- VP_NV,
- VP_ARB
-};
-static INLINE GLuint get_program_mode( GLcontext *ctx )
+/**
+ * Return VP_x token to indicate whether we're running fixed-function
+ * vertex transformation, an NV vertex program or ARB vertex program/shader.
+ */
+static INLINE enum vp_mode
+get_program_mode( GLcontext *ctx )
{
if (!ctx->VertexProgram._Current)
return VP_NONE;
+ else if (ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram)
+ return VP_NONE;
else if (ctx->VertexProgram._Current->IsNVProgram)
return VP_NV;
else