diff options
author | Keith Whitwell <[email protected]> | 2008-10-03 13:55:40 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-10-03 16:49:52 +0100 |
commit | fa1b533012030cd67148b5bf1e018fd5e30c96f8 (patch) | |
tree | 4f22a4d0a4a8a57f0a5cccbd47a6386fd362bc71 /src/mesa/shader/prog_statevars.c | |
parent | 0e008d37979e4e5ede25056221583e02c08a5df7 (diff) |
mesa: add new internal state for tracking current vertex attribs
Diffstat (limited to 'src/mesa/shader/prog_statevars.c')
-rw-r--r-- | src/mesa/shader/prog_statevars.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 47c46f63ec9..9cc33fa2c11 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -395,6 +395,12 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], case STATE_INTERNAL: switch (state[1]) { + case STATE_CURRENT_ATTRIB: { + const GLuint idx = (GLuint) state[2]; + COPY_4V(value, ctx->Current.Attrib[idx]); + return; + } + case STATE_NORMAL_SCALE: ASSIGN_4V(value, ctx->_ModelViewInvScale, @@ -565,6 +571,8 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]) case STATE_INTERNAL: switch (state[1]) { + case STATE_CURRENT_ATTRIB: + return _NEW_CURRENT_ATTRIB; case STATE_NORMAL_SCALE: return _NEW_MODELVIEW; |