mesa: avoid generating constant vertex attributes in fixedfunc programs
authorKeith Whitwell <keith@tungstengraphics.com>
Fri, 3 Oct 2008 16:30:59 +0000 (17:30 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Fri, 3 Oct 2008 16:30:59 +0000 (17:30 +0100)
commit1680ef869625dc1fe9cf481b180382a34e0738e7
treed1dff512846aaba0cf337043dd8fd00504fb5de3
parentd63a36ef3a4dd9cef1273fac5949e587c42813b5
mesa: avoid generating constant vertex attributes in fixedfunc programs

Keep track of enabled/active vertex attributes.
Keep track of potential vertex program outputs.

When generating fragment program, replace references to fragment attributes
which are effectively non-varying and non-computed passthrough attributes with
references to the new CURRENT_ATTRIB tracked state value.

Only downside is slight ugliness in VBO code where we need to validate state
twice in succession.
src/mesa/main/mtypes.h
src/mesa/main/state.c
src/mesa/main/state.h
src/mesa/main/texenvprogram.c
src/mesa/vbo/vbo_exec_array.c
src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_save_draw.c