mesa: Don't use _mesa_generic_nop on Windows.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 7 Jan 2015 14:27:12 +0000 (14:27 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 7 Jan 2015 19:35:35 +0000 (19:35 +0000)
commit2b7fd5b11df95869249a1bdc6e1b222747aaa075
tree078c3beac8a4e436dc98a47f51ae874cb9bb93c3
parentfd1f79f7dda3cbe1b677a74ad1b242603646ffd5
mesa: Don't use _mesa_generic_nop on Windows.

It doesn't work on Windows because of STDCALL calling convention -- it's
the callee responsibility to pop the arguments, and the number of
arguments vary with the prototype --, so the stack pointer ends up getting
corrupted.

This is just a non-invasive stop-gap fix.  A proper fix would be more
elaborate, and require either:
- a variation of __glapi_noop_table which sets GL_INVALID_OPERATION
  error
- stop using APIENTRY on all internal _mesa_* functions.

Tested with piglit gl-1.0-beginend-coverage (it now fails instead of
crashing).

VMware PR1350505

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/context.c