summaryrefslogtreecommitdiffstats
path: root/src/mapi
Commit message (Collapse)AuthorAgeFilesLines
* android: enable x86 asm and sse4 for x86 and x86_64WuZhen2016-11-011-0/+3
| | | | | | | | | | Support multilib compilation use runtime feature selection. NO_REF_TASK Tested: local run Change-Id: Iee7961effdecde09cfbdaf09455bfb0912699ae3 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* mapi: automake: set VISIBILITY_CFLAGS for shared glapiJonathan Gray2016-10-241-0/+3
| | | | | | | | | | | | | | | | shared glapi was previously built without setting CFLAGS for AM_CFLAGS and VISIBILITY_CFLAGS. This resulted in symbols being exported that shouldn't be. The x86 and sparc assembly versions of the dispatch table partially mitigated this by using .hidden. Otherwise shared_dispatch_stub_* were being exported. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Cc: "11.2 12.0 13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* Revert "Revert "mapi: export all GLES 3.2 functions in libGLESv2.so""Francisco Jerez2016-10-241-0/+12
| | | | | | | | | | This reverts commit 85e9bbc14d93fa7166c9ae075ee7ae29a8313e3f. The previous commit should help with the scons build failure caused by the original commit. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (cherry picked from commit 811eb7f178b8b85ac299121ac09a3180b9b55da2)
* glapi: Move PrimitiveBoundingBox and BlendBarrier definitions into ES3.2 ↵Francisco Jerez2016-10-241-13/+17
| | | | | | | | | | | | | | | | | | category. These two GLES 3.2 entry points were being defined in the category of the ARB_ES3_2_compatibility and KHR_blend_equation_advanced extensions respectively instead of in the ES3.2 category. Defining them in the ES3.2 category makes sure that the gl_procs.py generator emits declarations in the glprocs.h header file for the unsuffixed GLES-only entry points that PrimitiveBoundingBoxARB and BlendBarrierKHR respectively alias. This should avoid a compilation failure during scons builds in combination with "mapi: export all GLES 3.2 functions in libGLESv2.so". Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (cherry picked from commit 15a084a03998c5c86206137fdaf6f43b5f98485a)
* mapi: fix out-of-tree build dependenciesNicolai Hähnle2016-10-121-2/+2
| | | | | | | | | | | | | We shouldn't be using wildcard here in the first place, but changing that is some effort. As it stands, make -p confirms that glapi_gen_mapi_deps only contains mapi_abi.py when building outside the Mesa tree. As a result, only some of the tables were updated when XML files change, but not the tables for shared glapi. This change ensures that we pick up the XML files and scripts from the source tree as dependencies also for shared glapi. Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glapi: add entry points for GL_ARB_compute_variable_group_sizeSamuel Pitoiset2016-10-073-1/+29
| | | | | | | | | v2: - correctly sort that new extension (Ian) - fix up the comment (Ian) Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* mapi/glapi: remove unused _glapi_check_table()Emil Velikov2016-10-062-68/+0
| | | | | | | | | Similar to earlier commit - symbol was never part of the public API so we're safe to remove it. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* mapi/glapi: remove unused _glapi_check_table_not_nullEmil Velikov2016-10-062-24/+0
| | | | | | | | Function was never part of the API/ABI and the final user was removed with commit a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c, back in 2010. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* Revert "mapi: export all GLES 3.2 functions in libGLESv2.so"Dylan Baker2016-09-231-12/+0
| | | | | | | | | | | This reverts commit e66a2b879b73bf48800fec7353dafe8fc693ecdb. Which breaks the scons build in an interesting way, particularly when BlendBarrier and PrimitiveBoundingBox are added to static_data.py's functions list. This seems to be related to the fact that the unsuffixed names are only in GLES3.2, but Desktop GL only has suffixed versions. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
* mesa: add new entrypoints for GL_OES_viewport_arrayIlia Mirkin2016-09-222-6/+56
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mapi: export all GLES 3.2 functions in libGLESv2.soDylan Baker2016-09-221-0/+12
| | | | | | | | | See commit 5921f372c89a68fac6ddefc009442721d9df4db2 for the rational of this commit. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mapi: sort static_data.py functionsDylan Baker2016-09-221-2/+2
| | | | | | | | | | | Sorted by vim's builtin "sort i" (keeping the sorting case insensitive) v2: - uses case insensitive sorting (Ken) Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu> (v1) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mapi: retab static_data.py to be consistentDylan Baker2016-09-221-1285/+1285
| | | | | | | | | | | | | This file currently uses a mixture of 3 and 4 space indent. I have changed it all to 4 space indent, matching the settings in $ROOT/.editorconfig. This was generated with sed: sed -i -e 's@^ "@ "@g' Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* direct-to-native-GL for GLX clients on Cygwin ("Windows-DRI")Jon Turney2016-09-153-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* mesa: introduce glPrimitiveBoundingBoxARB entrypointIlia Mirkin2016-09-132-19/+37
| | | | | | | | | This requires a bit of rejiggering, since normally ES entrypoints alias core ones, not vice-versa. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mapi: add gl32.h to the list of GLES3 headers for installationIlia Mirkin2016-09-061-0/+1
| | | | | | | | This was missed when I added the updated (and new) Khronos headers. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Mark Janes <mark.a.janes@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com>
* mapi: don't forget to expose GetPointerv in GL ES 3.2Ilia Mirkin2016-09-031-1/+1
| | | | | | | | I left this out of my previous commit that went around enabling all of the other ES 3.2 entrypoints. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: add scaffolding for OES/EXT_primitive_bounding_boxIlia Mirkin2016-08-302-0/+50
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* Update Khronos-supplied headers to r33100Ilia Mirkin2016-08-281-185/+1779
| | | | | | | | As retrieved from opengl.org and khronos.org. Maintained the APPLE hack in GL/glext.h manually. Added gl32.h. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Dave Airlie <airlied@redhat.com>
* scons: Take indirect gl_and_es_API.xml dependencies in consideration.Jose Fonseca2016-08-271-1/+2
| | | | | | Same as 26a8f76ba1a0229ee3332eaa6f1aea89d617cf3d. Trivial.
* mesa: Allow GL_EXT_geometry_shader and GL_EXT_geometry_point_sizeIan Romanick2016-08-261-0/+10
| | | | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glapi: add KHR_blend_equation_advanced dispatchIlia Mirkin2016-08-251-0/+24
| | | | | | | | | | v2 (Ken): Fix enum values, drop _mesa_BlendBarrierKHR stub as Curro has already implemented it. v3 (Ken): Rework for _mesa_BlendBarrierKHR -> _mesa_BlendBarrier rename. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* mesa: Rename "texturebarrier" source files to "barrier".Francisco Jerez2016-08-241-1/+1
| | | | | | | In preparation for collecting all pipeline barrier GL entry points into a single source file. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glapi: Add XML for GL_EXT_shader_framebuffer_fetch.Francisco Jerez2016-08-241-0/+5
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Document that _mesa_enum_to_string() returns non-null (v2)Chad Versace2016-08-121-1/+6
| | | | | | | | It always returns non-null, even if the number is an invalid enum. Cc: Haixia Shi <hshi@chromium.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Change-Id: I26e8843c96130be972e66f48a49e362442e1bf97
* mapi: Add PatchParameteriOES and PatchParameteriEXT.Kenneth Graunke2016-08-081-0/+10
| | | | | | | | | The OES_tessellation_shader and EXT_tessellation_shader specifications have suffixed names. These are identical to the core function, so just alias them. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mapi: fix typo in macro nameEric Engestrom2016-07-223-3/+3
| | | | | | | Fixes: 5ec140c17b54c2592009 ("mapi: Massage code to allow clang to compile.") Reported-by: Alexandre Demers <alexandre.f.demers@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
* mapi: Massage code to allow clang to compile.Matt Turner2016-07-213-6/+22
| | | | | | | | | | According to https://llvm.org/bugs/show_bug.cgi?id=19778#c3 this code was violating the spec, resulting in it failing to compile. Cc: mesa-stable@lists.freedesktop.org Co-authored-by: Tomasz Paweł Gajc <tpgxyz@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599 Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* mapi: Export all GLES 3.1 functions in libGLESv2.soIan Romanick2016-06-291-0/+51
| | | | | | | | | | | | | | | | | Khronos recommends that the GLES 3.1 library also be called libGLESv2. It also requires that functions be statically linkable from that library. NOTE: Mesa has supported the EGL_KHR_get_all_proc_addresses extension since at least Mesa 10.5, so applications targeting Linux should use eglGetProcAddress to avoid problems running binaries on systems with older, non-GLES 3.1 libGLESv2 libraries. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org> Cc: Mike Gorchak <mike.gorchak.qnx@gmail.com> Reported-by: Mike Gorchak <mike.gorchak.qnx@gmail.com> Acked-by: Chad Versace <chad.versace@intel.com>
* glapi: add GL_EXT_window_rectangles entrypointsIlia Mirkin2016-06-183-0/+32
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com>
* glapi: remap_helper.py: remove MESA_alt_functionsEmil Velikov2016-06-131-42/+0
| | | | | | | The final user was nuked with last commit. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: add drawbuffer argument to ClearNamedFramebufferfiIlia Mirkin2016-06-101-0/+1
| | | | | | | | | | | This was fixed in revision 47 of the ARB_dsa spec in Oct 22, 2015. Since it's horrible to have differing APIs across library versions, we should attempt to minimize the impact by backporting it as far as possible and hope no one notices. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
* glapi/glx: Add overflow checks to the client-side indirect codeAdam Jackson2016-06-081-0/+9
| | | | | | | | | | | | | Coverity complains that the computed sizes can lead to negative lengths passed to memcpy. If that happens we've been handed invalid arguments anyway, so just bomb out. The funky "0%s" is because the size string for the variable-length part of the request is of the form "+ safe_pad() ...", and a unary + would coerce the result to always be positive, defeating the overflow check. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* mapi: expose new functions in GL ES 3.2Ilia Mirkin2016-05-269-38/+38
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* scons: whitespace cleanupGiuseppe Bilotta2016-05-251-1/+1
| | | | | | | | | | This text transformation was done automatically via the following shell command: $ find -name SCons\* -exec sed -i s/\\s\\+$// '{}' \; Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* i965: Enable GL_KHR_robustnessKristian Høgsberg Kristensen2016-05-255-0/+136
| | | | | | | | | | | | | | | GL_KHR_robustness adds the GL_CONTEXT_LOST error and five new entry points that we already implement. This patch adds a new dispatch table that returns GL_CONTEXT_LOST from all entry points and implements the GL_LOSE_CONTEXT_ON_RESET strategy by setting that table when we learn that we've lost the context. With the GL_CONTEXT_LOST reporting in place and dispatch for the new entry points we can turn on GL_KHR_robustness. Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: Implement glGet*(GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED).Kenneth Graunke2016-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | Technically, this was introduced with GL 4.4. However, I believe it was intended to be retroactive. As far as I know, AMD has never supported primitive restart with patches, while NVidia and Intel do. This necessitated the need for a query which would allow applications to figure out whether this was usable or not. I decided to expose it everywhere ARB_tessellation_shader is exposed. (It's also in both OES and EXT_tessellation_shader.) Enable this for i965 and Gallium drivers which expose the capability. v2: Fix a bug in the state_tracker code (caught by Ilia Mirkin). Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=10364 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glapi/gen: Copy some GL 1.0 enum details into ARB_viewport_arrayAdam Jackson2016-05-171-4/+12
| | | | | | | | Otherwise the instances in the extension XML override the core definitions, and we stop knowing their sizes in indirect_size_get.c Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
* glapi: Define PURE for Sun Studio as wellAdam Jackson2016-05-171-1/+1
| | | | | Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
* glapi/glx: Mark byteswap functions as _X_UNUSED (v2)Adam Jackson2016-05-171-6/+6
| | | | | | | | | | Squashes the one remaining warning in the xserver build. v2: Also clean up some non-standard whitespace (Ian Romanick) Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
* glapi: Harden GLX request size processing (v2)Adam Jackson2016-05-175-19/+13
| | | | | | | v2: Use == not is for equality testing (Dylan Baker) Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
* glapi: Add the safe_{add,mul,pad} functions from xserverAdam Jackson2016-05-171-0/+24
| | | | | | | | We're about to update the generator scripts to use these, easier not to vary between client and server. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
* glapi: Fix whitespace droppings when printing the license headerAdam Jackson2016-05-171-1/+1
| | | | | Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
* glapi: Add GL_ARB_cull_distanceTobias Klausmann2016-05-141-1/+6
| | | | | | | Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* glapi: fix parameter type for GetSamplerParameterIuivEXT() in es_EXT.xmlBrian Paul2016-05-041-2/+2
| | | | | | | | | | The function returns GLuint, not GLfloat values. v2: also fix the OES function Cc: "11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* glapi: Update dispatch XML files for OES_texture_compression_astc.xmlAnuj Phogat2016-05-033-0/+64
| | | | | Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mapi/glapi: Fix dup word typo in glapi_getproc.cEdward O'Callaghan2016-05-011-1/+1
| | | | | Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* scons: Whenever possible decide what to do based on platform and not compiler.Jose Fonseca2016-04-261-2/+1
| | | | | | | | | | Because compilers like GCC and Clang are effectively available everywhere so their presence/absence is seldom conclusive. Furthermore, all compilers we use now have stdint.h. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* glapi: fix _glapi_get_proc_address() for mangled function namesFrederic Devernay2016-04-251-12/+6
| | | | | | | | | | | In the dispatch table, all functions are stored without the "m" prefix. Modify code so that OSMesaGetProcAddress works both with gl and mgl prefixes. Similar to https://lists.freedesktop.org/archives/mesa-dev/2015-September/095251.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94994 Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: expose EXT_base_instance in ES3 contextsIlia Mirkin2016-04-031-0/+34
| | | | | | | | This extension is identical to ARB_base_instance. Reuse the same entrypoints. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com>