Added state debugging option (SAVAGE_DEBUG=state).
[mesa.git] / src / mesa / shader / arbvertparse.c
index cfad87b5b1b95243622e20944c130ec320ae8a25..33086c2f723e3aa9191c745cff3eeb49addaf077 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.1
+ * Version:  6.2
  *
  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  *
 #include "arbprogparse.h"
 
 
+/**
+ * XXX this is probably redundant.  We've already got code like this
+ * in the nvvertparse.c file.  Combine/clean-up someday.
+ */
 static GLvoid
 debug_vp_inst(GLint num, struct vp_instruction *vp)
 {
@@ -135,6 +139,9 @@ debug_vp_inst(GLint num, struct vp_instruction *vp)
          case VP_OPCODE_SWZ:
             fprintf(stderr, "VP_OPCODE_SWZ"); break;
                                
+         case VP_OPCODE_PRINT:
+            fprintf(stderr, "VP_OPCODE_PRINT"); break;
+
          case VP_OPCODE_END:
             fprintf(stderr, "VP_OPCODE_END"); break;
       }
@@ -175,6 +182,7 @@ _mesa_parse_arb_vertex_program(GLcontext * ctx, GLenum target,
 {
    GLuint retval;
    struct arb_program ap;
+   (void) target;
 
    /* set the program target before parsing */
    ap.Base.Target = GL_VERTEX_PROGRAM_ARB;
@@ -205,20 +213,6 @@ _mesa_parse_arb_vertex_program(GLcontext * ctx, GLenum target,
    program->OutputsWritten = ap.OutputsWritten;
    program->Parameters     = ap.Parameters; 
 
-   /* Eh.. we parsed something that wasn't a vertex program. doh! */
-   /* this wont happen any more */
-/*
-   if (ap.Base.Target != GL_VERTEX_PROGRAM_ARB)
-   {
-      program->Instructions = (struct vp_instruction *) _mesa_malloc (
-                                     sizeof(struct vp_instruction) );
-      program->Instructions[0].Opcode = VP_OPCODE_END;
-
-      _mesa_error (ctx, GL_INVALID_OPERATION, "Parsed a non-vertex program as a vertex program");
-      return;
-   }
-*/
-
    program->Instructions   = ap.VPInstructions;
 
 #if DEBUG_VP