If program is position invariant, set VERT_BIT_POS in InputsRead field.
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 10 Oct 2006 21:23:23 +0000 (21:23 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 10 Oct 2006 21:23:23 +0000 (21:23 +0000)
Fixes broken "OPTION NV_position_invariant".

src/mesa/shader/nvvertparse.c

index 3840dca22202ff6afceabd40185aa69e51f57d9a..17b721a5010cbfd37c8ae382d9af6c72998853e5 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
+ * Version:  6.5.2
  *
- * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2006  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"),
@@ -1395,6 +1395,8 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget,
       }
       program->Base.Instructions = newInst;
       program->Base.InputsRead = parseState.inputsRead;
+      if (parseState.isPositionInvariant)
+         program->Base.InputsRead |= VERT_BIT_POS;
       program->Base.NumInstructions = parseState.numInst;
       program->Base.OutputsWritten = parseState.outputsWritten;
       program->IsPositionInvariant = parseState.isPositionInvariant;