mesa: fix spurious wglGetProcAddress / GL_INVALID_OPERATION error
authorBrian Paul <brianp@vmware.com>
Thu, 2 Oct 2014 15:36:54 +0000 (09:36 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 3 Oct 2014 16:04:48 +0000 (10:04 -0600)
commitc7f0755caa1c39d5433e37c53242ef251aa4fc3a
tree3484bb8eed993aba214c09fefaf4a14d71af1eba
parent33c9ad97bf25271fcb034bc6054b74fff8a552fb
mesa: fix spurious wglGetProcAddress / GL_INVALID_OPERATION error

On Windows, the Piglit primitive-restart test was failing a
glGetError()==0 assertion when it was run w/out any command line
arguments.  Piglit's all.py script only runs primitive-restart
with arguments so this case isn't normally hit during a full
piglit run.

The basic problem is Microsoft's opengl32.dll calls glFlush
from wglGetProcAddress() and Piglit uses wglGetProcAddress() to
resolve glPrimitiveRestartNV() which is called inside glBegin/End.
See comments in the code for more info.

Plus, improve the comments for _mesa_alloc_dispatch_table().

Cc: <mesa-stable@lists.freedesktop.org>
Acked-by: Sinclair Yeh <syeh@vmware.com>
src/mesa/main/context.c