summaryrefslogtreecommitdiffstats
path: root/src/mapi
Commit message (Collapse)AuthorAgeFilesLines
* main: Added entry points for NamedRenderbufferStorage/MultisampleMartin Peres2015-03-251-0/+15
| | | | | | | | | | | | | | | | | | | | | v2: Review from Laura Ekstrand - get rid of a change that should not have happened in this patch - improve the error messages - fix alignments - fix a capitalization in a function name in an error message v3: Review from Laura Ekstrand - move the test for the validity of the renderbuffer to less generic functions - get rid of some changes that accidentally landed in the wrong commit - revert some alignment fixes v3: Review from Laura Ekstrand - check that the lookup returns a valid renderbuffer - cosmetic changes to some error messages Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetNamedRenderbufferParameterivMartin Peres2015-03-251-0/+6
| | | | | | | | | | | | | | | | v2: - improve an error message v3: - move a test to less generic functions - fix an alignment v4: - take the caller as a parameter instead of bool dsa - check that the lookup returns a valid renderbuffer Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateRenderbuffersMartin Peres2015-03-251-0/+7
| | | | | | | | v2: - refactor bindRenderBuffer and create_render_buffers to fix an assertion Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateSamplersMartin Peres2015-03-251-0/+7
| | | | | | | | Because of the current way the code is architectured, there is no functional difference between the DSA and the non-DSA path. Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateProgramPipelinesMartin Peres2015-03-251-0/+7
| | | | | | | | v2: - add spaces in an error message (Laura) Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry points for glGetQueryBufferObject*Martin Peres2015-03-251-0/+27
| | | | | | | | | These entry points will be fleshed out when the GL_ARB_query_buffer_object extension gets implemented. In the meantime, return GL_INVALID_OPERATION as suggested by Ian. Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glCreateQueriesMartin Peres2015-03-251-0/+8
| | | | | | | | v2: - display the name of the target instead of its id (Laura) Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetTransformFeedbacki64_vMartin Peres2015-03-251-0/+7
| | | | | | | | | | | | | | v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper v3: - use the new name of _mesa_lookup_transform_feedback_object_err v4: Review from Laura Ekstrand - fix some alignement problems Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetTransformFeedbacki_vMartin Peres2015-03-251-0/+7
| | | | | | | | | | | v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper v3: - use the new name of _mesa_lookup_transform_feedback_object_err Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glGetTransformFeedbackivMartin Peres2015-03-251-0/+6
| | | | | | | | v2: Review from Laura Ekstrand - use the transform feedback object lookup wrapper Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* main: Added entry point for glTransformFeedbackBufferRangeMartin Peres2015-03-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | v2: review from Laura Ekstrand - use the refactored code to lookup the objects - improve some error messages - factor out the gl method name computation - better handle the spec differences between the DSA and non-DSA cases - quote the spec a little more v3: review from Laura Ekstrand - use the new name of _mesa_lookup_bufferobj_err - swap the comments around the offset and size checks v4: review from Laura Ekstrand - add more spec quotes - properly fix the comments around the offset and size checks v5: review from Laura Ekstrand - add quotes on the spec citations - revert some changes in the printf format v6: review from Laura Ekstrand - remove a redondant "gl" in a method name Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Laura Ekstrand <[email protected]>
* main: Added entry point for glTransformFeedbackBufferBaseMartin Peres2015-03-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: Review from Laura Ekstrand - give more helpful error messages - factor the lookup code for the xfb and objBuf - replace some already-existing tabs with spaces - add comments to explain the cases where xfb == 0 or buffer == 0 - fix the condition for binding the transform buffer or not v3: Review from Laura Ekstrand - rename _mesa_lookup_bufferobj_err to _mesa_lookup_transform_feedback_bufferobj_err and make it static to avoid a future conflict - make _mesa_lookup_transform_feedback_object_err static v4: Review from Laura Ekstrand - add the pdf page number when quoting the spec - rename some of the symbols to follow the public/private conventions v5: Review from Laura Ekstrand - properly rename some of the symbols to follow the public/private conventions - fix some alignments - add quotes around a spec citation - add back a newline I accidentally deleted - add spaces around the ternary operator usages Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Laura Ekstrand <[email protected]>
* main: Added entry point for glCreateTransformFeedbacksMartin Peres2015-03-251-0/+7
| | | | | | | | | | | | | | | | | v2: Review from Laura Ekstrand - generate the name of the gl method once - shorten some lines to stay in the 78 chars limit v3: Review from Fredrik Höglund <[email protected]> - rename gl_mthd_name to func - set EverBound in _mesa_create_transform_feedbacks in the dsa case v4: - rename _mesa_create_transform_feedbacks to create_transform_feedbacks and make it static Reviewed-by: Laura Ekstrand <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* mapi: Make private copies of name strings provided by client.Mario Kleiner2015-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | glXGetProcAddress("glFoo") ends up in stub_add_dynamic() to create dynamic stubs for dynamic functions. stub_add_dynamic() doesn't store the caller provided name string "Foo" in a mesa private copy, but just stores a pointer to the "glFoo" string passed to glXGetProcAddress - a pointer into arbitrary memory outside mesa's control. If the caller passes some dynamically allocated/changing memory buffer to glXGetProcAddress(), or the caller gets unmapped from memory, e.g., some dynamically loaded application plugin which uses OpenGL, this ends badly - with a dangling pointer. strdup() the name string provided by the client to avoid this problem. Cc: "10.3 10.4 10.5" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mapi: move some #includes from .h file to .c filesBrian Paul2015-03-183-3/+5
| | | | | | Just include things where they're needed. Reviewed-by: Jose Fonseca <[email protected]>
* mapi: add new _glapi_new_nop_table() and _glapi_set_nop_handler()Brian Paul2015-03-185-41/+108
| | | | | | | | | | | | | | | | _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 <[email protected]>
* main: Add entry point for GetNamedBufferSubData.Laura Ekstrand2015-03-171-0/+7
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for GetNamedBufferPointerv.Laura Ekstrand2015-03-171-0/+6
| | | | | | | v3: Review from Fredrik Hoglund -Split cosmetic refactor of GetBufferPointerv out into a separate commit Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for GetNamedBufferParameteri[64]v.Laura Ekstrand2015-03-171-0/+12
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for FlushMappedNamedBufferRange.Laura Ekstrand2015-03-171-0/+6
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for UnmapNamedBuffer.Laura Ekstrand2015-03-171-0/+5
| | | | | | | | v2: review from Ian Romanick - Restore VBO_DEBUG and BOUNDS_CHECK - Remove _mesa from static software fallback unmap_buffer. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for MapNamedBuffer[Range].Laura Ekstrand2015-03-171-0/+14
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for ClearNamedBuffer[Sub]Data.Laura Ekstrand2015-03-171-0/+18
| | | | Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for CopyNamedBufferSubData.Laura Ekstrand2015-03-171-0/+8
| | | | | | v2: remove _mesa in front of static software fallback. Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for NamedBufferSubData.Laura Ekstrand2015-03-171-0/+7
| | | | | | | | | v2: review by Ian Romanick - Remove "_mesa" from name of static software fallback buffer_sub_data. - Remove mappedRange from _mesa_buffer_sub_data. - Removed some cosmetic changes to a separate commit. Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for NamedBufferData.Laura Ekstrand2015-03-171-0/+7
| | | | | | | | | | v2: review from Ian Romanick - Fix space in ARB_direct_state_access.xml. - Remove "_mesa" from the name of buffer_data static fallback. - Restore VBO_DEBUG and BOUNDS_CHECK. - Fix beginning of comment to start on same line as /* Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for NamedBufferStorage.Laura Ekstrand2015-03-171-0/+7
| | | | Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for CreateBuffers.Laura Ekstrand2015-03-171-0/+7
| | | | Reviewed-by: Martin Peres <[email protected]>
* mesa: move LONGSTRING into generated enums.cBrian Paul2015-03-121-0/+6
| | | | | | enums.c is the only place this directive is needed. Reviewed-by: Matt Turner <[email protected]>
* main: Add entry point for TextureBufferRange.Laura Ekstrand2015-03-091-0/+8
| | | | | | | | v2: Review by Martin Peres - Get rid of difficult-to-follow code copied and pasted from the original TexBufferRange Reviewed-by: Anuj Phogat <[email protected]>
* mapi: actually remove unused u_thread.hBrian Paul2015-03-051-126/+0
| | | | | | I thought this was in the previous commit in the series. Reviewed-by: Emil Velikov <[email protected]>
* Fix invalid extern "C" around header inclusion.Mark Janes2015-03-051-2/+0
| | | | | | | | | | | System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <[email protected]>
* mapi: fix *glapi dependency trackingEmil Velikov2015-03-051-2/+2
| | | | | | | | | | | | I.e. add {shared-,}glapi/glapi_mapi_tmp.h to the SOURCES list. Otherwise there will be no knowledge that the file is required by others for the build. Thus autotools won't pick it up for the distribution tarball. v2: Don't forget about the static glapi. Spotted by Matt. Cc: "10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mapi: remove u_thread.hBrian Paul2015-03-056-30/+19
| | | | | | | Just use c11 threads directly. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: use c11 call_once() instead of pthread_once()Brian Paul2015-03-051-2/+3
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: THREADS was always defined, remove itBrian Paul2015-03-057-56/+13
| | | | | | | | 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 <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: rewrite u_current_init() function without u_thread_self()Brian Paul2015-03-052-27/+40
| | | | | | | | | | Remove u_thread_self() since u_thread.h is going away soon. Create a simple thread ID abstraction which wraps WIN32 or c11 threads. This also gets rid of the questionable casting of thrd_t to an unsigned long. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: fix preprocessor check in u_current_destroy()Brian Paul2015-03-051-1/+1
| | | | | | | So it matches the preprocessor check around the u_current_init_tsd() code. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: remove u_macros.hBrian Paul2015-03-056-17/+3
| | | | | | | Only U_STRINGIFY() is used in entry.c Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: remove u_compiler.hBrian Paul2015-03-049-16/+10
| | | | | | Just include c99_compat.h or util/macros.h where needed. Reviewed-by: Jose Fonseca <[email protected]>
* mapi: use util/macros.h instead of locally defined macrosBrian Paul2015-03-042-21/+2
| | | | | | The next step is to get rid of u_compiler.h completely. Reviewed-by: Jose Fonseca <[email protected]>
* mapi: replace INLINE with inlineBrian Paul2015-03-045-17/+11
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mapi: remove unneeded ARRAY_SIZE #defineBrian Paul2015-03-043-1/+3
| | | | | | include util/macros.h instead. Reviewed-by: Jose Fonseca <[email protected]>
* scons: Use -Werror MSVC compatibility flags per-directory.Jose Fonseca2015-03-041-0/+2
| | | | | | Matching what we already do with autotools builds. Reviewed-by: Brian Paul <[email protected]>
* st/vega: Remove.Jose Fonseca2015-03-047-253/+1
| | | | | | | | | | | | | OpenVG API seems to have dwindled away. The code would still be interesting if we wanted to implement NV_path_rendering but given the trend of the next gen graphics APIs, it seems unlikely that this becomes ARB or core. v2: Remove a few "openvg" references left, per Emil Velikov. Reviewed-by: Emil Velikov <[email protected]> v3: Update release notes.
* configure: Leverage gcc warn options to enable safe use of C99 features ↵Jose Fonseca2015-03-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | where possible. The main objective of this change is to enable Linux developers to use more of C99 throughout Mesa, with confidence that the portions that need to be built with MSVC -- and only those portions --, stay portable. This is achieved by using the appropriate -Werror= options only on the places they need to be used. Unfortunately we still need MSVC 2008 on a few portions of the code (namely llvmpipe and its dependencies). I hope to eventually eliminate this so that we can use C99 everywhere, but there are technical/logistic challenges (specifically, newer Windows SDKs no longer bundle MSVC, instead require a full installation of Visual Studio, and that has hindered adoption of newer MSVC versions on our build processes.) Thankfully we have more directy control over our OpenGL driver, which is why we're now able to migrate to MSVC 2013 for most of the tree. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mapi: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-2/+2
| | | | Acked-by: Ilia Mirkin <[email protected]>
* mapi: Don't rely on GNU void pointer arithmetic.Matt Turner2015-02-272-2/+2
| | | | | | | | | Commit 79daa510c added -Werror=pointer-arith to CFLAGS, which makes arithmetic on void pointers an error. See https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html Reviewed-by: Brian Paul <[email protected]>
* Revert "configure: Leverage gcc warn options to enable safe use of C99 ↵Kenneth Graunke2015-02-271-3/+1
| | | | | | | | | features where possible." This reverts commit 79daa510c7a871a33797308a2ccb4b83a067ffbe. I apparently hadn't done a clean build when testing this; it broke the build for Tom, Ben, and myself. We like the idea; let's try a v2.
* configure: Leverage gcc warn options to enable safe use of C99 features ↵Jose Fonseca2015-02-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | where possible. The main objective of this change is to enable Linux developers to use more of C99 throughout Mesa, with confidence that the portions that need to be built with MSVC -- and only those portions --, stay portable. This is achieved by using the appropriate -Werror= options only on the places they need to be used. Unfortunately we still need MSVC 2008 on a few portions of the code (namely llvmpipe and its dependencies). I hope to eventually eliminate this so that we can use C99 everywhere, but there are technical/logistic challenges (specifically, newer Windows SDKs no longer bundle MSVC, instead require a full installation of Visual Studio, and that has hindered adoption of newer MSVC versions on our build processes.) Thankfully we have more directy control over our OpenGL driver, which is why we're now able to migrate to MSVC 2013 for most of the tree. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>