use VERT_RESULT_HPOS, VERT_BIT_POS tokens
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 4 Nov 2005 16:52:41 +0000 (16:52 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 4 Nov 2005 16:52:41 +0000 (16:52 +0000)
src/mesa/shader/nvvertexec.c

index ad785193e3b9357827794ef17074fbe3430e1ecd..1d7c7c72a148ecc7cf0972649501b3fce88f6b17 100644 (file)
@@ -386,16 +386,16 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct vertex_program *program)
 
    ctx->_CurrentProgram = GL_VERTEX_PROGRAM_ARB; /* or NV, doesn't matter */
 
-   /* If the program is position invariant, multiply the input
-    * position and the MVP matrix and stick it into the output pos slot
+   /* If the program is position invariant, multiply the input position
+    * by the MVP matrix and store in the vertex position result register.
     */
    if (ctx->VertexProgram.Current->IsPositionInvariant) {
-      TRANSFORM_POINT( ctx->VertexProgram.Outputs[0], 
+      TRANSFORM_POINT( ctx->VertexProgram.Outputs[VERT_RESULT_HPOS], 
                        ctx->_ModelProjectMatrix.m, 
-                       ctx->VertexProgram.Inputs[0]);
+                       ctx->VertexProgram.Inputs[VERT_ATTRIB_POS]);
 
       /* XXX: This could go elsewhere */
-      ctx->VertexProgram.Current->OutputsWritten |= 0x1;
+      ctx->VertexProgram.Current->OutputsWritten |= VERT_BIT_POS;
    }
    for (inst = program->Instructions; ; inst++) {