mesa: add new internal state for tracking current vertex attribs

This commit is contained in:
Keith Whitwell
2008-10-03 13:55:40 +01:00
parent 0e008d3797
commit fa1b533012
6 changed files with 55 additions and 25 deletions

View File

@@ -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;