mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-31 15:40:24 +01:00
mapi/glapi: Never use a generic no-op entry-point on Windows.
When GLAPIENTRY is __stdcall (ie Windows), the stack is popped by the callee making the number/type of arguments significant, therefore using a generic no-op causes stack corruption for many entry-points. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
7f5d3f7ed2
commit
5ac4c8cf53
1 changed files with 6 additions and 2 deletions
|
|
@ -51,7 +51,11 @@ _glapi_set_warning_func(_glapi_proc func)
|
|||
{
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
* When GLAPIENTRY is __stdcall (i.e. Windows), the stack is popped by the
|
||||
* callee making the number/type of arguments significant.
|
||||
*/
|
||||
#if defined(_WIN32) || defined(DEBUG)
|
||||
|
||||
/**
|
||||
* Called by each of the no-op GL entrypoints.
|
||||
|
|
@ -59,7 +63,7 @@ _glapi_set_warning_func(_glapi_proc func)
|
|||
static int
|
||||
Warn(const char *func)
|
||||
{
|
||||
#if !defined(_WIN32_WCE)
|
||||
#if defined(DEBUG) && !defined(_WIN32_WCE)
|
||||
if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
|
||||
fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
|
||||
func);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue