mesa: fix save_ShadeModel() logic and add new comments
authorBrian Paul <brianp@vmware.com>
Thu, 2 May 2013 01:15:32 +0000 (19:15 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 2 May 2013 15:03:14 +0000 (09:03 -0600)
commitaa782f260d09bbc10db039340358b3518e8a5a38
tree7cf9f44b6eb9375981adac0219ff10140d792324
parent16296cc843ef82dd0a7e345b377fbc4535f9e519
mesa: fix save_ShadeModel() logic and add new comments

This removes the test for _mesa_inside_dlist_begin_end().
If ctx->Driver.CurrentSavePrimitive==PRIM_UNKNOWN (the initial value),
_mesa_inside_dlist_begin_end() will, confusingly, return TRUE.
So we didn't set the ctx->ListState.Current.ShadeModel value and it
remained in its indeterminate state.

This didn't effect correctness, but it defeated the intended optimization
of dropping redundant glShadeModel() state changes in order to
coalesce sequences of drawing commands.

Verified with new piglit gl-1.0-dlist-shademodel test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/main/dlist.c