summaryrefslogtreecommitdiffstats
path: root/src/mapi
Commit message (Collapse)AuthorAgeFilesLines
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* 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 <[email protected]> Reviewed-by: Mark Janes <[email protected]> Tested-by: Mark Janes <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add scaffolding for OES/EXT_primitive_bounding_boxIlia Mirkin2016-08-302-0/+50
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Acked-by: Dave Airlie <[email protected]>
* 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* 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 <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* 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 <[email protected]>
* glapi: Add XML for GL_EXT_shader_framebuffer_fetch.Francisco Jerez2016-08-241-0/+5
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* 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: [email protected] Co-authored-by: Tomasz Paweł Gajc <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599 Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Cc: "11.2 12.0" <[email protected]> Cc: Mike Gorchak <[email protected]> Reported-by: Mike Gorchak <[email protected]> Acked-by: Chad Versace <[email protected]>
* glapi: add GL_EXT_window_rectangles entrypointsIlia Mirkin2016-06-183-0/+32
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Cc: "11.2 12.0" <[email protected]>
* 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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mapi: expose new functions in GL ES 3.2Ilia Mirkin2016-05-269-38/+38
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* 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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi: Define PURE for Sun Studio as wellAdam Jackson2016-05-171-1/+1
| | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* 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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* 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 <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* 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 <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi: Fix whitespace droppings when printing the license headerAdam Jackson2016-05-171-1/+1
| | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi: Add GL_ARB_cull_distanceTobias Klausmann2016-05-141-1/+6
| | | | | | | Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* 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" <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glapi: Update dispatch XML files for OES_texture_compression_astc.xmlAnuj Phogat2016-05-033-0/+64
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mapi/glapi: Fix dup word typo in glapi_getproc.cEdward O'Callaghan2016-05-011-1/+1
| | | | | Signed-off-by: Edward O'Callaghan <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: expose EXT_polygon_offset_clamp in ES contextsIlia Mirkin2016-04-031-1/+1
| | | | | | | | The extension spec was extended to also support ES. This functionality is provided all the way back to ES 1.0. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: add GL_OES/EXT_draw_buffers_indexed supportIlia Mirkin2016-03-311-0/+106
| | | | | | | | This is the same ext as ARB_draw_buffers_blend (plus some core functionality that already exists). Add the alias entrypoints. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: add GL_EXT_copy_image supportIlia Mirkin2016-03-301-0/+22
| | | | | | | | The extension is identical to GL_OES_copy_image. But dEQP has tests that want the EXT variant. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: add GL_OES_copy_image supportIlia Mirkin2016-03-301-0/+22
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: add GL_OES_sample_shading supportIlia Mirkin2016-03-301-0/+6
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi/glx: Mark the indirect swapped dispatch functions _X_COLDAdam Jackson2016-03-291-3/+3
| | | | | | | | | | | A modest size savings: text data bss dec hex filename 264143 15608 232 279983 445af libglx.so.before 254303 15608 232 270143 41f3f libglx.so.after Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi/glx: Sync some additional error checking from xserverAdam Jackson2016-03-291-0/+4
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* mesa: add OES_texture_buffer and EXT_texture_buffer supportIlia Mirkin2016-03-282-2/+38
| | | | | | | | Allow ES 3.1 contexts to access the texture buffer functionality. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi/glx: Treat xserver generated targets as .PHONYAdam Jackson2016-03-281-0/+2
| | | | | | | | Meaning, always rebuild them when asked instead of bothering to look at timestamps (and then wondering why nothing happened when you said make). Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi/glx: Thunk non-ABI calls through GetProcAddressAdam Jackson2016-03-281-2/+8
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi/glx: Emit direct GL calls instead of dispatch lookupAdam Jackson2016-03-282-34/+10
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glx: Unbreak generating some of the xorg glx headersAdam Jackson2016-03-281-2/+2
| | | | | | | | | | | | | | | | Broken by: commit 9ace0b542241c77ae82a0835ac8a09e2a7510eaf Author: Dylan Baker <[email protected]> Date: Wed May 20 15:49:11 2015 -0700 glapi: glX_proto_size.py: use argparse instead of getopt Which changed most, but not all, callers to use --header-tag instead of -h. Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* glapi: remove the final function offset tagsEmil Velikov2016-03-094-30/+30
| | | | | | | | | | | | A commit earlier this year reworked out python scripts to use a separate file for these. Followed by removing support from the parser, and removing all of the offset tags. Seems like we either missed a few, or people added them by mistake. Either way let's nuke the ones that are still around. Cc: Ian Romanick <[email protected]> Signed-off-by: Emil Velikov <[email protected]>