replace color table FloatTable boolean with Type enum
[mesa.git] / src / mesa / main / nvvertparse.c
index fd99a261f0bb244feb98667694d337c29d8e61e3..bacf5a5af3ba90d443fbfbf350adfec5ab2e4e37 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  5.1
+ * Version:  6.0.1
  *
- * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * \author Brian Paul
  */
 
+/*
+ * Regarding GL_NV_vertex_program, GL_NV_vertex_program1_1:
+ *
+ * Portions of this software may use or implement intellectual
+ * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims
+ * any and all warranties with respect to such intellectual property,
+ * including any use thereof or modifications thereto.
+ */
 
 #include "glheader.h"
 #include "context.h"
@@ -38,6 +46,8 @@
 #include "nvprogram.h"
 #include "nvvertparse.h"
 #include "nvvertprog.h"
+#include "program.h"
+
 
 /**
  * Current parsing state.  This structure is passed among the parsing
@@ -568,8 +578,10 @@ Parse_MaskedDstReg(struct parse_state *parseState, struct vp_dst_register *dstRe
       if (!Parse_OutputReg(parseState, &dstReg->Index))
          RETURN_ERROR;
    }
-   else if (parseState->isStateProgram && token[0] == 'c') {
+   else if (parseState->isStateProgram && token[0] == 'c' &&
+            parseState->isStateProgram) {
       /* absolute program parameter register */
+      /* Only valid for vertex state programs */
       dstReg->File = PROGRAM_ENV_PARAM;
       if (!Parse_AbsParamReg(parseState, &dstReg->Index))
          RETURN_ERROR;