summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/glapi.h
Commit message (Collapse)AuthorAgeFilesLines
* glx/apple: locate dispatch table functions to wrap by nameJon Turney2018-02-011-0/+3
| | | | | | | | | | | | | Avoid reaching into the dispatch table internals (and thus having to deal with the complexities of remap etc.) by identifying functions to wrap by name. See: https://lists.freedesktop.org/archives/mesa-dev/2015-June/086721.html et seq. https://bugs.freedesktop.org/show_bug.cgi?id=90311 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* direct-to-native-GL for GLX clients on Cygwin ("Windows-DRI")Jon Turney2016-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Structurally, this is very similar to the existing Apple-DRI code, except I have chosen to implement this using the __GLXDRIdisplay, etc. vtables (as suggested originally in [1]), rather than a maze of ifdefs. This also means that LIBGL_ALWAYS_SOFTWARE and LIBGL_ALWAYS_INDIRECT work as expected. [1] https://lists.freedesktop.org/archives/mesa-dev/2010-May/000756.html This adds: * the Windows-DRI extension protocol headers and the windowsdriproto.pc file, for use in building the Windows-DRI extension for the X server * a Windows-DRI extension helper client library * a Windows-specific DRI implementation for GLX clients The server is queried for Windows-DRI extension support on the screen before using it (to detect the case where WGL is disabled or can't be activated). The server is queried for fbconfigID to pixelformatindex mapping, which is used to augment glx_config. The server is queried for a native handle for the drawable (which is of a different type for windows, pixmaps and pbuffers), which is used to augment __GLXDRIdrawable. Various GLX extensions are enabled depending on if the equivalent WGL extension is available.
* glapi: Build glapi_gentable.c only on DarwinAndreas Boll2016-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the public symbol _glapi_create_table_from_handle from libGL.so.1.2.0 on all platforms except Darwin. Since the symbol is not used on other platforms it makes sense to build glapi_gentable.c only on Darwin. As a side effect it accelerates the build a bit and reduces the size of libGL.so.1.2.0 as follows: size lib/libGL.so.1.2.0 on my system shows text data bss dec hex filename 469211 21848 2720 493779 788d3 lib/libGL.so.1.2.0 before 420988 11240 2720 434948 6a304 lib/libGL.so.1.2.0 after A little bit of history: _glapi_create_table_from_handle was introduced in commit 85937f4c0d4a78d3a11e3c1fa6148640f2a9ad7b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jun 9 16:59:49 2011 -0700 glapi: Add API that can create a _glapi_table from a dlfcn handle Example usage: void *handle = dlopen(opengl_library_path, RTLD_LOCAL); struct _glapi_table *disp = _glapi_create_table_from_handle(handle, "gl"); Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> and the only user in mesa was added in commit f35913b96e743c5014e99220b1a1c5532a894d69 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jun 9 17:29:51 2011 -0700 apple: Use _glapi_create_table_from_handle to initialize our dispatch table Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> gl_gentable.py was also used for XQuartz in xserver 1.11 - 1.14. v2: Fix typos in commit message Add missing XORG_GLAPI_OUTPUTS += \ into src/mapi/glapi/gen/Makefile.am Add glapi_gentable.c to EXTRA_DIST for inclusion in the release tarball v3: Fix commit message: s/gl_gentable.c/glapi_gentable.c/ Reported-by: Arlie Davis <arlied@google.com> Cc: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* Remove Sun CC specific code.Jose Fonseca2015-12-021-1/+1
| | | | | Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* mapi: add new _glapi_new_nop_table() and _glapi_set_nop_handler()Brian Paul2015-03-181-0/+11
| | | | | | | | | | | | | | | | _glapi_new_nop_table() creates a new dispatch table populated with pointers to no-op functions. _glapi_set_nop_handler() is used to register a callback function which will be called from each of the no-op functions. Now we always generate a separate no-op function for each GL entrypoint. This allows us to do proper stack clean-up for Windows __stdcall and lets us report the actual function name in error messages. Before this change, for non-Windows release builds we used a single no-op function for all entrypoints. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mapi: remove u_thread.hBrian Paul2015-03-051-1/+0
| | | | | | | Just use c11 threads directly. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* mapi: THREADS was always defined, remove itBrian Paul2015-03-051-11/+2
| | | | | | | | THREADS was defined if HAVE_PTHREADS or _WIN32 was defined. That's always the case. The build would die in c11/threads.h otherwise. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* mapi: remove u_compiler.hBrian Paul2015-03-041-0/+1
| | | | | | Just include c99_compat.h or util/macros.h where needed. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* glapi: restore _glthread_GetID() functionBrian Paul2014-03-141-0/+5
| | | | | | | This partially reverts patch 02cb04c68f. This fixes an unresolved symbol error when using older builds of libGL. Tested-by: Chia-I Wu <olv@lunarg.com>
* mesa: remove remaining uses of _glthread_GetID()Brian Paul2014-03-051-4/+0
| | | | | | | | | | | | | | | It was really only used in the radeon driver for a debug printf. And evidently, libGL.so referenced it just to work around some sort of linker issue. This patch removes the two calls to the function and the function itself. Fixes undefined _glthread_GetID symbol in libGL reported by 'nm'. Though, the missing symbol doesn't cause any issues on my system but it does cause glxinfo to fail on one of our test systems. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: remove empty glthread.h fileBrian Paul2014-03-031-1/+1
| | | | Reviewed-by: José Fonseca <jfonseca@vmware.com>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa,glsl,mapi: Put extern "C" { ... } where appropriate.José Fonseca2011-11-091-2/+5
| | | | | Probably a several places missing, but enough to cover all headers (in)directly included by uniform_query.cpp, and fix the MSVC build.
* glapi: Enclose glapi.h in an extern "C" block when included by C++.Kenneth Graunke2011-10-041-0/+6
| | | | | | | | Fixes a build failure introduced in commit b7fa0d0727a3a9e1f64d3cfc7a0f157b35dec09e. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-and-tested-by: Paul Berry <stereotype441@gmail.com>
* glapi: Add API that can create a _glapi_table from a dlfcn handleJeremy Huddleston2011-06-111-0/+4
| | | | | | | | | Example usage: void *handle = dlopen(opengl_library_path, RTLD_LOCAL); struct _glapi_table *disp = _glapi_create_table_from_handle(handle, "gl"); Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* scons: Add support for GLES.Chia-I Wu2011-01-221-5/+0
| | | | | | | | | | | | | | | | | | GLES can be enabled by running scons with $ scons gles=yes When gles=yes is given, the build is changed in three ways. First, libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2. This makes DRI drivers and libEGL support and advertise GLES support. Second, GLES libraries will be created. They are libGLESv1_CM, libGLESv2, and libglapi. Last, libGL or opengl32 will link to libglapi. This change is required as _glapi_* will be declared as __declspec(dllimport) in libmesa.a on windows. libmesa.a expects those symbols to be defined in another DLL. Due to this change to GL, GLES support is marked experimental. Note that GLES requires libxml2-python to generate some of its sources.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-3/+3
|
* Revert "glapi: Implement optional dispatch logging"Kristian Høgsberg2010-09-091-7/+1
| | | | | | This reverts commit b9abc6139a310677a37754ea7172d976dbf56979 and the follow on fixes (7aae704 and 6fe1b47). It's changing the glapi/driver ABI and causes a number of problems for debug/non-debug builds.
* glapi: Implement optional dispatch loggingKristian Høgsberg2010-09-091-1/+7
| | | | | | | There's a useful feature buried in glapi to log all API calls to stderr. Unfortunately it requires editing the code and then it's enabled unconditionally for that build. This patch builds in API logging for debug builds and makes it run-time switchable by setting MESA_DEBUG=dispatch.
* glapi: Clean up header inclusions.Chia-I Wu2010-08-231-1/+20
| | | | | Do not rely on PUBLIC being defined in glapi.h. Do not include core mesa headers.
* glapi: Move public function/variable declarations to glapi.h.Chia-I Wu2010-08-211-12/+87
| | | | | | | glapi defines an interface that is used by DRI drivers. It must not be changed in an ABI incompatible way. This commit moves all functions/variables belong to the interface to glapi.h. Instead of including u_current.h from glapi.h, u_current.h now includes glapi.h.
* mapi: Add mapi and share the code with glapi.Chia-I Wu2010-05-071-98/+14
| | | | | | | | | | Specifically, move all or most of glapi/glapi.c to mapi/u_current.c, glapi/glapi_execmem.c to mapi/u_execmem.c, glapi/glthread.[ch] to mapi/u_thread.[ch] and remove their dependencies on core Mesa headers.
* glapi: Move to src/mapi/.Chia-I Wu2010-05-071-0/+172
Move glapi to src/mapi/{glapi,es1api,es2api}.