init secondary color to (0,0,0,1). remove some redundant initializations.
[mesa.git] / src / mesa / main / nvvertparse.c
index 50316b3692fd3a35ec329d52280426f6dca609ba..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"
@@ -570,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;