update parameter indexing
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 31 Aug 2003 18:55:23 +0000 (18:55 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 31 Aug 2003 18:55:23 +0000 (18:55 +0000)
src/mesa/swrast/s_nvfragprog.c

index 63a30d4e7cece15adbba2ca29b3de49cac949ef7..92fc6ed45281cae7cc08ac9d86ec519459e63b8d 100644 (file)
@@ -28,6 +28,7 @@
 #include "context.h"
 #include "nvfragprog.h"
 #include "macros.h"
+#include "program.h"
 
 #include "s_nvfragprog.h"
 #include "s_span.h"
@@ -123,8 +124,8 @@ fetch_vector4( GLcontext *ctx,
          src = ctx->FragmentProgram.Parameters[source->Index];
          break;
       case PROGRAM_NAMED_PARAM:
-         ASSERT(source->Index < program->NumParameters);
-         src = program->Parameters[source->Index].Values;
+         ASSERT(source->Index < program->Parameters->NumParameters);
+         src = program->Parameters->Parameters[source->Index].Values;
          break;
       case PROGRAM_STATE_VAR:
          abort();
@@ -316,8 +317,8 @@ fetch_vector1( GLcontext *ctx,
          src = ctx->FragmentProgram.Parameters[source->Index];
          break;
       case PROGRAM_NAMED_PARAM:
-         ASSERT(source->Index < program->NumParameters);
-         src = program->Parameters[source->Index].Values;
+         ASSERT(source->Index < program->Parameters->NumParameters);
+         src = program->Parameters->Parameters[source->Index].Values;
          break;
       case PROGRAM_STATE_VAR:
          abort();