fix another bug in get_register_pointer()
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Jun 2004 00:21:04 +0000 (00:21 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 29 Jun 2004 00:21:04 +0000 (00:21 +0000)
src/mesa/shader/nvvertexec.c

index 30e925e6e29087ff536b9683e5f2b9f5b7dc4aa4..f92396c955d4351eff5cbbc8d76a3750bc7954ee 100644 (file)
@@ -236,8 +236,10 @@ get_register_pointer( const struct vp_src_register *source,
         (source->File == PROGRAM_STATE_VAR) );
       if (reg < 0 || reg > MAX_NV_VERTEX_PROGRAM_PARAMS)
          return ZeroVec;
-      else
+      else if (source->File == PROGRAM_ENV_PARAM)
          return state->Parameters[reg];
+      else
+         return state->Current->Parameters->Parameters[reg].Values;
    }
    else {
       switch (source->File) {