summaryrefslogtreecommitdiffstats
path: root/src/mapi
Commit message (Collapse)AuthorAgeFilesLines
* mesa: disable glthread when DEBUG_OUTPUT_SYNCHRONOUS is enabledTimothy Arceri2017-04-031-1/+1
| | | | | | | | | | | | | We could re-enable it also but I haven't tested that yet, and I'm not sure we care much anyway. V2: don't disable it from with the call itself. We need a custom marshalling function or we get stuck waiting for thread to finish. V3: tidy up redundant code copied from generated version. Reviewed-by: Nicolai Hähnle <[email protected]>
* glapi: Add GL_NV_fill_rectangleLyude2017-03-311-0/+4
| | | | | Signed-off-by: Lyude <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa/glthread: add async support to ARB_gpu_shader_int64 uniform functionsTimothy Arceri2017-03-311-16/+16
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glthread: add async support to ARB_gpu_shader_fp64 uniform functionsTimothy Arceri2017-03-311-13/+13
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glthread: fallback to sync if count validation failsTimothy Arceri2017-03-301-8/+14
| | | | | | | | | | | | | The old code would sync and then throw a cryptic error message. There is no need for a custom error, we can just fallback to the real function and have it do proper validation. Fixes piglit test: glsl-uniform-out-of-bounds Which was returning the wrong error code. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glthread: add async support to glProgramUniform*() functionsTimothy Arceri2017-03-301-34/+34
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glthread: print out syncs when MARSHAL_MAX_CMD_SIZE is exceededTimothy Arceri2017-03-301-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glthread: add custom marshalling for ClearBufferfv()Timothy Arceri2017-03-251-1/+1
| | | | | | This is one of the main causes of syncs in Civ6. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/marshal: add custom BufferData/BufferSubData marshallingTimothy Arceri2017-03-241-2/+2
| | | | | | | | | | GL_AMD_pinned_memory requires memory to be aligned correctly, so we skip marshalling in this case. Also copying the data defeats the purpose of EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD. Fixes GL_AMD_pinned_memory piglit tests when glthread is enabled. Acked-by: Edward O'Callaghan <[email protected]>
* mesa: disable glthread when glNewList() is calledTimothy Arceri2017-03-201-1/+1
| | | | | | | glNewList() swaps dispatch tables, and we don't have anything in place to handle that in glthread. Tested-by: Michel Dänzer <[email protected]>
* mapi: automake: add all python scripts to EXTRA_DISTEmil Velikov2017-03-171-0/+3
| | | | | | | Otherwise it'll be missing in the tarball and make distcheck will fail. Fixes: 05dd4a1104e ("glapi: Generate GL API marshalling code from the XML.") Signed-off-by: Emil Velikov <[email protected]>
* glapi: avoid using $< in non-suffix make rulesJonathan Gray2017-03-171-2/+2
| | | | | | | | Using $< in non-suffix make rules is a GNU extension. Explicitly use the name of the python script to fix the build on OpenBSD. Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mapi: remove Xlib/xcb include in gl_marshal.pyEmil Velikov2017-03-161-3/+1
| | | | | | | | | | | | | | | | The only use of the header is to provide the _X_INLINE macro. We already require (and provide where needed) 'inline', plus it's used in the file already. So replace the macro and drop the include. This fixes the build on platforms which lack the header - from X-less Linuxes to Androids. Fixes: 05dd4a1104e ("glapi: Generate GL API marshalling code from the XML.") Reported-by: Vinson Lee <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100223 Signed-off-by: Emil Velikov <[email protected]>
* mapi: don't include X11/Xlib-xcb.h on non PTHREAD platformsTimothy Arceri2017-03-161-2/+2
| | | | Should fix the last of the glthread build issues on windows.
* mesa: fix glthread marshal build issues on platforms without PTHREADTimothy Arceri2017-03-161-1/+4
|
* mesa/glthread: restore the dispatch table when incompatible gl calls are ↵Gregory Hainaut2017-03-162-4/+5
| | | | | | | | | | | | | | | | | | | detected While a context only has a single glthread, the context itself can be attached to several threads. Therefore the dispatch table must be updated in all threads before the destruction of glthread. In others words, glthread can only be destroyed safely when the context is deleted. Fixes remaining crashes in the glx-multithread-makecurrent* tests. V2: (Timothy Arceri) updated gl_API.dtd marshal_fail description. Signed-off-by: Gregory Hainaut <[email protected]> Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Track the current vertex/element array buffers for glthread.Eric Anholt2017-03-167-34/+59
| | | | | | | | | | | | We want to support glthread on GLES contexts with reasonable apps, and on desktop for apps that use VBOs but haven't completely moved to core GL. To do so, we have to deal with the "the user may or may not pass user pointers to draw calls" problem. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Disable glthread when glBegin() is called.Eric Anholt2017-03-161-1/+1
| | | | | | | | | | | glBegin() swaps dispatch tables, and we don't have any code in place for handling that in glthread (which also messes with dispatch tables), and I don't particularly care to at this point. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Add an attribute for conditions to turn off threading.Eric Anholt2017-03-163-1/+15
| | | | | | | | | | | | | The threading for GL core is in place, but there are so few applications actually using a core GL context that it would be nice to extend support back. However, some of the features of compat GL (particularly user vertex arrays) would be so expensive to track state for that we want to be able to disable threading when we discover that the app is using them. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Add support for asynchronous glDraw* on GL core.Eric Anholt2017-03-162-7/+6
| | | | | | | Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Add support for NULL arguments like in glBufferData() in marshalling.Eric Anholt2017-03-162-9/+34
| | | | | | | | | | This will let us support things like glBufferData() that should be asynchronous. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* glapi: Mark vertex attrib pointer functions as async.Eric Anholt2017-03-162-17/+17
| | | | | | | | | | | | | | These don't actually read data out of the pointers, they set the pointers (or offsets in a VBO) to be used in a later draw call. v2: Don't forget glVertexAttribIPointer, and don't bother with annotations on aliases. v3: Mark CompressedTexSubImage1D as sync also. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Custom thread marshalling for Flush.Paul Berry2017-03-161-2/+1
| | | | | | | Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Custom thread marshalling for ShaderSource.Paul Berry2017-03-161-1/+1
| | | | | | | Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Create pointers for multithread marshalling dispatch table.Paul Berry2017-03-161-4/+4
| | | | | | | | | | | | | | This patch splits the context's CurrentDispatch pointer into two pointers, CurrentClientDispatch, and CurrentServerDispatch, so that when doing multithread marshalling, we can distinguish between the dispatch table that's being used by the client (to serialize GL calls into the marshal buffer) and the dispatch table that's being used by the server (to execute the GL calls). Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Validate count parameters when marshalling.Eric Anholt2017-03-161-0/+15
| | | | | | | | | | Otherwise, for example, glDeleteBuffers(-1, &bo) gets you a segfault instead of GL_INVALID_VALUE. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* glapi: Generate GL API marshalling code from the XML.Paul Berry2017-03-164-0/+488
| | | | | | | | | | | | | | This is not yet used in the build, just generated. v2: Add missing build dependencies. v3: Avoid mixing declarations and code, remove logic for avoiding emitting code that the compiler's optimizer can deal with anyway. v4: (Timothy Arceri) move safe_mul() genereation here from a later patch. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* glapi: Mark compressed teximage functions as sync.Eric Anholt2017-03-161-5/+5
| | | | | | | | | | | | | Without doing some additional tracking, we won't know whether the data will be immediate user data, or will be loaded from a PBO. The normal teximage functions will be sync by default because they don't know up front what the size of their image data is. But for compressed teximage, we have the count information, so they would end up async by default. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* glapi: Annotate functions with "marshal" attribute.Paul Berry2017-03-166-27/+44
| | | | | | | | | | | | | | | | | | | | | Several API functions require special treatment in order to be marshalled to a background thread. Others can't be safely executed in a background thread and need to be executed synchronously (e.g. since they return data through a pointer argument). This annotation will be used when code generating thread marshalling code, to ensure that each function is marshalled in the correct way. Note that PixelMap functions are marked as synchronous for now since their pointer may be relative to buffer on the GPU, so we'll need special logic to marshal them properly. v2: Move description of attribute types to a comment in the dtd file. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* nir: remove shebang from python scriptsEmil Velikov2017-03-101-1/+0
| | | | | | | Analogous to earlier commit(s). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mapi/gen: remove shebang from python scriptsEmil Velikov2017-03-1019-19/+0
| | | | | | | | All of those should be executed $PYTHON2/python2 [or equivalent] hence why they are missing the execute bit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mapi: do not mandate bash for es*api/ABI-checkEmil Velikov2017-03-102-2/+2
| | | | | | | | Seemingly there is nothing bash specific in these. The Debian checkbashisms does not spot neither run in zsh. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa: drop the execute bit from gl.xmlEmil Velikov2017-03-101-0/+0
| | | | | | | | This is a spec file which is parsed by scripts. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andreas Boll <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mapi/glapi: remove unused next_available_offset.shEmil Velikov2017-03-101-39/+0
| | | | | | | | Afaict there was no [documented] users since it was introduced. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glapi: fix typo in count_scaleGregory Hainaut2017-03-071-1/+1
| | | | | | | | 2*4=8 Signed-off-by: Gregory Hainaut <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glapi: Fix a comment typoEric Anholt2017-03-031-1/+1
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mapi: remove unused mapi.[ch]Emil Velikov2017-02-243-254/+0
| | | | | | | | The final user of it was st/vega. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* mesa: Separate INTEL_performance_query frontendRobert Bragg2017-02-221-0/+1
| | | | | | | | | | | | | | | | | To allow the backend interfaces for AMD_performance_monitor and INTEL_performance_query to evolve independently based on the more specific requirements of each extension this starts by separating the frontends of these extensions. Even though there wasn't much tying these frontends together, this separation intentionally copies what few helpers/utilities that were shared between the two extensions, avoiding any re-factoring specific to INTEL_performance_query so that the evolution will be easier to follow later. Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mapi: automake: include builddir prior to srcdirEmil Velikov2017-01-271-2/+2
| | | | | | | Analogous to previous commit. Cc: "12.0 13.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* mapi: Add support for ARB_gpu_shader_int64.Dave Airlie2017-01-204-0/+304
| | | | | | | | | | | | | | Just add the boilerplate xml code. v2 (idr): Update dispatch_sanity. Only add extension functions in core profile. v3 (idr): Remove comment line from gl_API.xml. Suggested by Matt. Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Matt Turner <[email protected]>
* mesa: make use of HAVE_FUNC_ATTRIBUTE_ALIAS macroEmil Velikov2017-01-182-9/+3
| | | | | | | | | | | We must make sure that xserver has an equivalent one-line change to its configure.ac as the glx/glapi headers get copied over. Then again, xserver does _not_ seem to set HAVE_ALIAS to begin with so one might want to look into that first. Cc: Adam Jackson <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* glX_proto_send.py: Unify the style of function pointer calls in structsBoyan Ding2017-01-131-1/+1
| | | | Signed-off-by: Boyan Ding <[email protected]>
* mapi: update the asm code to support x32Grazvydas Ignotas2017-01-131-3/+28
| | | | | | | | | | | Fixes crashes when both glx-tls and asm are enabled on x32. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94512 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575458 Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* glapi: add missing INTEL_conservative_rasterizationLionel Landwerlin2016-12-131-0/+4
| | | | | | | v2: put enum directly in gl_API.xml (Ilia) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: add missing CONTEXT_ROBUST_ACCESS enumTapani Pälli2016-10-271-0/+3
| | | | | | | | commit 85008db1d51f923113832394d7f8d6b1868be882 missed this enum for GL_KHR_robustness implementation Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* 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 <[email protected]> Cc: "11.2 12.0 13.0" <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* Revert "Revert "mapi: export all GLES 3.2 functions in libGLESv2.so""Francisco Jerez2016-10-201-0/+12
| | | | | | | | | This reverts commit 85e9bbc14d93fa7166c9ae075ee7ae29a8313e3f. The previous commit should help with the scons build failure caused by the original commit. Cc: [email protected] Reviewed-by: Dylan Baker <[email protected]>
* glapi: Move PrimitiveBoundingBox and BlendBarrier definitions into ES3.2 ↵Francisco Jerez2016-10-201-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: [email protected] Reviewed-by: Dylan Baker <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>