summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Add dispatch and extension XML for GL_ARB_internalformat_query2Alejandro Piñeiro2016-03-033-1/+121
| | | | | | | | Equivalent to commit bda540 (that added GL_ARB_internalformat_query) v2: include the new xml to to API_XML list at Makefile.am (Emil Velikov) Reviewed-by: Dave Airlie <[email protected]>
* mesa: add GL_EXT_texture_border_clamp supportIlia Mirkin2016-02-222-4/+34
| | | | | | | | This extension is identical to GL_OES_texture_border_clamp. But dEQP has tests that want the EXT variant. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: add GL_OES_texture_border_clamp supportIlia Mirkin2016-02-221-1/+57
| | | | | | | Only minor differences to the existing ARB_texture_border_clamp support. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* mesa: move GL_ARB_debug_output code into new debug_output.c fileBrian Paul2016-02-081-0/+1
| | | | | | | | The errors.c file had grown quite large so split off this extension code into its own file. This involved making a handful of functions non-static. Acked-by: Timothy Arceri <[email protected]>
* mesa: implement GL_ATI_meminfo (v2)Marek Olšák2016-02-051-0/+6
| | | | | | | v2: rebase Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* mesa: implement GL_NVX_gpu_memory_info (v2)Marek Olšák2016-02-051-0/+8
| | | | | | | | v2: implement eviction queries properly add gl_memory_info structure Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* glapi: Add xml infrastructure for ARB_query_buffer_objectRafal Mielniczuk2016-02-041-1/+8
| | | | | | | Signed-off-by: Rafal Mielniczuk <[email protected]> [imirkin: move definition to gl_API.xml as it is very short] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glapi: add GL_OES_geometry_shader extensionMarta Lofstedt2016-01-222-3/+45
| | | | | | | | | Add xml definitions for the GL_OES_geometry_shader extension and expose the extension for OpenGL ES 3.1. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add GREMEDY_string_markerRob Clark2016-01-213-0/+21
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Build glapi_gentable.c only on DarwinAndreas Boll2016-01-212-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> 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 <[email protected]> and the only user in mesa was added in commit f35913b96e743c5014e99220b1a1c5532a894d69 Author: Jeremy Huddleston <[email protected]> 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 <[email protected]> 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 <[email protected]> Cc: Jeremy Huddleston <[email protected]> Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Reduce libGL.so binary size by about 15%Arlie Davis2016-01-211-16/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch significantly reduces the size of the libGL.so binary. It does not change the (externally visible) behavior of libGL.so at all. gl_gentable.py generates a function, _glapi_create_table_from_handle. This function allocates a large dispatch table, consisting of 1300 or so function pointers, and fills this dispatch table by doing symbol lookups on a given shared library. Previously, gl_gentable.py would generate a single, very large _glapi_create_table_from_handle function, with a short cluster of lines for each entry point (function). The idiom it generates was a NULL check, a call to snprintf, a call to dlsym / GetProcAddress, and then a store into the dispatch table. Since this function processes a large number of entry points, this code is duplicated many times over. We can encode the same information much more compactly, by using a lookup table. The previous total size of _glapi_create_table_from_handle on x64 was 125848 bytes. By using a lookup table, the size of _glapi_create_table_from_handle (and the related lookup tables) is reduced to 10840 bytes. In other words, this enormous function is reduced by 91%. The size of the entire libGL.so binary (measured when stripped) itself drops by 15%. So the purpose of this change is to reduce the binary size, which frees up disk space, memory, etc. size lib/libGL.so.1.2.0 on my system shows (Andreas) text data bss dec hex filename 565947 11256 2720 579923 8d953 lib/libGL.so.1.2.0 before 469211 21848 2720 493779 788d3 lib/libGL.so.1.2.0 after v2: Incorporate Matt's feedback. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> Tested-by: Jeremy Huddleston Sequoia <[email protected]> Signed-off-by: Andreas Boll <[email protected]>
* glapi: add ARB_indirect_parameters definitionsIlia Mirkin2016-01-073-1/+36
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: do not enable KHR_debug for ES 1.0Emil Velikov2015-12-031-10/+10
| | | | | | | | | | | | The extension requires (cough implements) GetPointervKHR (alias of GetPointerv) which in itself is available for ES 1.1 enabled mesa. Anyone willing to fish around and implement it for ES 1.0 is more than welcome to revert this commit. Until then lets restrict things. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glapi: add GetPointervKHR to the ES dispatchEmil Velikov2015-12-031-0/+5
| | | | | | | | | | | | The KHR_debug extension implements this. Strictly speaking it could be used with ES 1.0, although as the original function is available on ES 1.1, I'm inclined to lift the KHR_debug requirement to ES 1.1. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* Remove Sun CC specific code.Jose Fonseca2015-12-022-4/+4
| | | | | Reviewed-by: Matt Turner <[email protected]> Acked-by: Alan Coopersmith <[email protected]>
* glapi: work-around MSVC 65K string length limitation for enums.cBrian Paul2015-12-011-3/+10
| | | | | | | | | | | String literals cannot exceed 65535 characters for MSVC. Instead of emiting a string, emit an array of characters. v2: fix indentation and add comment in the gl_enums.py file about this ugliness. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi: Fix enums.c build with other build systems.Eric Anholt2015-12-011-1/+1
| | | | | Tested with scons (by both myself and Mark Janes), Android is just copy and paste.
* mesa: Drop the blacklisting of new GL enums.Eric Anholt2015-12-011-266/+0
| | | | | | | | | | | | | Now when people need new extensions, they can skip the entire enum-definition process, and we can stop reviewing new extension XML for its enum content. This also brings in a new enum that I wanted to use in enum_strings.cpp for testing the code generator. v2: Drop comment about disabled GL_1PASS_EXT test. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Use a 32-bit offset for the enums.c string offset table.Eric Anholt2015-12-011-3/+1
| | | | | | | With GLES 3.1, GL 4.5, and many new vendor extensions about to get their enums added, we jump up to 85k of table. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Prefer newer names to older ones among names present in core.Eric Anholt2015-12-011-17/+8
| | | | | | | | | | | | Sometimes GL likes to rename an old enum when it grows a more general purpose, and we should prefer the new name. Changes from this: GL_POINT/LINE_SIZE_* (1.1) -> GL_SMOOTH_POINT/LINE_SIZE_* (1.2) GL_FOG_COORDINATE_* (1.4) -> GL_FOG_COORD_* (1.5) GL_SOURCE[012]_RGB/ALPHA (1.3) -> GL_SRC0_RGB (1.5) GL_COPY_READ/WRITE_BUFFER (3.1) -> GL_COPY_READ_BUFFER_BINDING (4.2) Reviewed-by: Ian Romanick <[email protected]>
* mesa: Drop bitfield "enums" from the enum-to-string table.Eric Anholt2015-12-011-8/+11
| | | | | | | | | | | | | | Asking the table for bitfield names doesn't make any sense. For 0x10, do you want GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV or GL_COLOR_BUFFER_BIT4_QCOM or GL_POLYGON_STIPPLE_BIT or GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV? Giving a useful answer would depend on a whole lot of context. This also fixes a bad enum table entry, where we chose GL_HINT_BIT instead of GL_ABGR_EXT for 0x8000, so we can now fix its entry in the enum_strings test. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Switch to using the Khronos registry for generating enums.Eric Anholt2015-12-012-39/+370
| | | | | | | | | | | | | | | | | | | | | | | | I've used a bunch of python code to cut out new enums so that the two generated files can be diffed. I'll remove all that hardcoding in the following commits. All remaining differences between the generated code: - GL_TEXTURE_BUFFER_FORMAT didn't appear in GL3 when TBOs got merged to core, so it now gets an _ARB suffix instead. - Blacklisting can't keep EXT_sso's GL_ACTIVE_PROGRAM_EXT from becoming GL_ACTIVE_PROGRAM -- in our hash table, GL_ACTIVE_PROGRAM_EXT points at the GLES2 enum's value (aka GL_CURRENT_PROGRAM). By not blacklisting the core name, we get both enums translated. - GL_DRAW_FRAMEBUFFER_BINDING and GL_FRAMEBUFFER_BINDING both appeared in GL3 as synonyms, and the new code happens to choose GL_FRAMEBUFFER_BINDING instead. - GL_TEXTURE_COMPONENTS and GL_TEXTURE_INTERNAL_FORMAT both appear in 1.1, and the new code chooses GL_TEXTURE_INTERNAL_FORMAT instead (which seems better, to me) Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove the python mode bits from gl_enums.py.Eric Anholt2015-12-011-1/+0
| | | | | | | emacs whines at me every time I open the file about these unsafe variables, and the file was reformatted from 8 space to 4 space long ago. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Drop apparently typoed GL_ALL_CLIENT_ATTRIB_BITS.Eric Anholt2015-12-011-1/+0
| | | | | | | | GL_ALL_ATTRIB_BITS is a thing, and GL_CLIENT_ALL_ATTRIB_BITS, but I don't see GL_ALL_CLIENT_ATTRIB_BITS in my grepping of khronos XML, GL extension specs, GL 1.1, GL 2.2, and GL 4.4. Reviewed-by: Brian Paul <[email protected]>
* mesa: Drop enums that had been removed in later revs of specs.Eric Anholt2015-12-013-6/+0
| | | | | | | | | Mesa hasn't been using these enums and the finalized specs don't reference them, so losing them from our generated enum-to-string code should be fine. Reduces diffs to generating from Khronos XML, which has these enums noted defined but commented out from any consumers. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix a typo in AMD_performance_monitor enum.Eric Anholt2015-12-011-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix enum definition of CULL_VERTEX_EYE/OBJECT_POSITIONEric Anholt2015-12-011-2/+2
| | | | | | | In converting to using the Khronos XML, I found that our XML had these two swapped, and the text spec agreed. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add a copy of the Khronos gl.xml (SVN #31705).Eric Anholt2015-12-011-0/+45348
| | | | | | | | The intention here is to keep a pristine copy of the upstream gl.xml that can be updated at any time with a new version, and use that to generate Mesa code from instead of our private XML. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove ARB_geometry_shader4Marta Lofstedt2015-11-263-59/+1
| | | | | | | | | | No drivers currently implement ARB_geometry_shader4, nor are there any plans to implement it. We only support the version of geometry shaders that was incorporated into OpenGL 3.2 / GLSL 1.50. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: add EXT_blend_func_extended XML definitionsRyan Houdek2015-11-192-1/+28
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: expose support for GL_EXT_buffer_storageRyan Houdek2015-11-041-0/+9
| | | | | | | | | This extension requires ES 3.1 since it relies on glMemoryBarrier. For testing purposes I temporarily moved glMemoryBarrier to be an ES 3.0 function. This has been tested with the piglit in the ML and the Dolphin emulator. Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: expose support for OES/EXT_draw_elements_base_vertex to OpenGL ESRyan Houdek2015-11-012-3/+91
| | | | | | | This has been tested with the piglits in the mailing list and on the Dolphin emulator. Reviewed-by: Ilia Mirkin <[email protected]>
* glapi: add function pointers for KHR_debug for glesMatthew Waters2015-10-071-0/+73
| | | | | | | | | | v2 [Emil Velikov] - Rebase. - Correct version in gles11 dispatch_sanity. - Move the extension enable to a separate patch. Signed-off-by: Matthew Waters <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* glapi: add ARB_shader_storage_block_buffer_objectSamuel Iglesias Gonsalvez2015-09-254-2/+59
| | | | | | Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: move GL_APPLE_object_purgeable functions to new fileBrian Paul2015-09-161-0/+1
| | | | | | | Move this code out of bufferobj.c since it's not strongly connected to buffer objects. Acked-by: Matt Turner <[email protected]>
* mapi: automake: rework the source generation rulesEmil Velikov2015-09-091-19/+19
| | | | | | | | | Same logic as previous commit applies. Also fix bogus MESA_MAPI_DIR - the sources are located in the source dir (duh). Cc: 11.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>