mesa: fix glPushAttrib(0) / glPopAttrib() error
authorBrian Paul <brianp@vmware.com>
Fri, 15 May 2015 17:22:25 +0000 (11:22 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 3 Jun 2015 17:35:46 +0000 (11:35 -0600)
commit6139195606d97b43a739500627c906baf804fab0
treee5f1c726a4bacb66b4cc31b5d66941b617edf540
parent86a74e9b6b8953a55de234f185a14defd646f489
mesa: fix glPushAttrib(0) / glPopAttrib() error

If the glPushAttrib() mask value was zero we didn't actually push
anything onto the attribute stack.  A subsequent glPopAttrib() call
would generate a GL_STACK_UNDERFLOW error.  Now push a dummy attribute
in that case to prevent the error.

Mesa now matches nvidia's behavior.

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