mesa/include
Julien Isorce c7f3657450 darwin: Suppress type conversion warnings for GLhandleARB
This patch and its description are inspired from Jose Fonseca
explanations and suggestions.

With this patch the following logic applies and only if __APPLE__:

When building mesa, GLhandleARB is defined as unsigned long and
at some point casted to GLuint in gl fuction implementations.
These exact points are where these errors and warnings appear.

When building an application GLhandleARB is defined as void*.
Later when calling a gl function, for example glBindAttribLocationARB,
it will be dispatched to _mesa_BindAttribLocation. So internally
void* will be treated as unsigned long which has the same size.
So the same truncation happens when casting it to GLuint.

Same when GLhandleARB appears as return value.
For mesa it will be GLuint -> unsigned long.
For an application it will be GLuint -> unsigned long -> void*.
Note that the value will be preserved when casting back to GLuint.

When GLhandleARB appears as a pointer there are also separate
entry-points, i.e. _mesa_FuncNameARB. So the same logic can
be applied.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346
Signed-off-by: Julien Isorce <julien.isorce@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-08 13:18:42 +01:00
..
c11 c11/threads: Use PTHREAD_MUTEX_RECURSIVE by default 2015-03-16 20:41:39 +00:00
c99 mesa: remove support for GCC older than 3.3.0 2014-12-17 08:37:05 +11:00
CL clover: Update OpenCL headers to version 1.2 from Khronos. 2014-04-29 13:01:10 +02:00
D3D9 st/nine: D3DRS_FILLMODE set to 0 is D3DFILL_SOLID 2015-02-06 00:07:19 +01:00
d3dadapter nine: Add state tracker nine for Direct3D9 (v3) 2014-11-18 02:02:54 +00:00
EGL egl: import platform headers from registry (v2) 2015-06-05 19:44:33 +02:00
GL darwin: Suppress type conversion warnings for GLhandleARB 2015-07-08 13:18:42 +01:00
GLES gles: Update glext.h to revision 20798. 2013-07-29 10:34:42 -07:00
GLES2 gles2: Update gl2ext.h to revision 28335 2014-10-28 16:40:18 +00:00
GLES3 include/GLES3: add OpenGL ES 3.1 Headers 2014-04-01 09:30:32 -07:00
HaikuGL include/haiku: fix comment typo 2014-08-28 21:41:29 -04:00
KHR egl: import platform headers from registry (v2) 2015-06-05 19:44:33 +02:00
pci_ids i965/bxt: Add basic Broxton infrastructure 2015-06-24 16:37:12 -07:00
c99_alloca.h c99_alloca.h: Also use <alloca.h> for cygwin 2015-03-07 18:18:32 +00:00
c99_compat.h include: Add helper header to help trap includes inside extern C. 2015-03-06 12:38:55 +00:00
c99_math.h gallium: fix gcc compile errors when using _XOPEN_SOURCE=600 but not std=c99 2015-04-03 19:22:09 +02:00
no_extern_c.h include: Add helper header to help trap includes inside extern C. 2015-03-06 12:38:55 +00:00