From: Brian Paul Date: Tue, 29 Jun 2004 00:21:04 +0000 (+0000) Subject: fix another bug in get_register_pointer() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc84e82b282e97e6f09a05509847df29ce94a2e2;p=mesa.git fix another bug in get_register_pointer() --- diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 30e925e6e29..f92396c955d 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -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) {