summaryrefslogtreecommitdiffstats
path: root/src/mapi
Commit message (Collapse)AuthorAgeFilesLines
* glapi: Annotate XML with deprecated="3.1" for deprecated functions.Paul Berry2012-11-067-548/+710
| | | | | | | | | Future patches will use this annotation when code generating _mesa_create_exec_table(), to determine which functions should be skipped in core contexts. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glapi: Mark GLX extensions as window_system="glX".Paul Berry2012-11-061-3/+3
| | | | | | | | We were already doing this for some GLX extensions, but not others. This patch makes our use of window_system="glX" consistent. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glapi: Use GL_ or GLX_ prefix for all category names.Paul Berry2012-11-061-2/+2
| | | | | | | | | | This patch standardizes the category names used in the glapi XML files to begin each extension name with the prefix "GL_" or "GLX_". There is no functional change, because these category names are not used in the generated code. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glapi: alias ProgramParameteriARB to ProgramParameteriJordan Justen2012-11-031-1/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: move include for ARB_get_program_binary.xml to gl_API.xmlJordan Justen2012-11-032-1/+3
| | | | | | | | These functions are part in GL 4.3. Moving this will allow ProgramParameteriARB to alias ProgramParameteri. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: alias FramebufferTextureARB to FramebufferTextureJordan Justen2012-11-031-1/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch: Include GLES1-only functions in dispatch table.Paul Berry2012-11-013-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously dispatch table-related code was generated from gl_API.xml, so it did not include slots for GLES1-only functions (such as those taking fixed-point arguments). This patch generates dispatch table-related code from gl_and_es_API.xml, so that GLES1-only functions are included. This paves the way for future patches that will unify the GLES1 dispatch table with the dispatch tables for the other APIs. The following generated files are affected: - glapi_x86.S - glapi_x86-64.S - glapi_sparc.S - glprocs.h - glapitemp.h - glapitable.h - glapi_gentable.c - dispatch.h - remap_helper.h Since this change affects makefiles, a full rebuild is required. Reviewed-by: Kenneth Graunke <[email protected]> v2: Adjust dependencies to ensure that generated files will be rebuilt whenever any ES-related XML source files are changed. Reviewed-by: Chad Versace <[email protected]>
* dispatch: properly handle parameter name mismatches in glapitemp.h.Paul Berry2012-11-012-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when code-generating aliased functions in glapitemp.h, we weren't consistent about which function alias we used to obtain the parameter names, with the risk that we would generate incorrect code like this: KEYWORD1 void KEYWORD2 NAME(Foo)(GLint x) { (void) x; DISPATCH(Foo, (x), (F, "glFoo(%d);\n", x)); } KEYWORD1 void KEYWORD2 NAME(FooEXT)(GLint y) { (void) x; DISPATCH(Foo, (x), (F, "glFooEXT(%d);\n", x)); } At the moment there are no aliased functions with mismatched parameter names, so this isn't the problem. But when we introduce GLES1 functions into the dispatch table, there will be (MapBufferRange/MapBufferRangeEXT). This patch paves the way for that by fixing the code generation script to handle the mismatch correctly. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dispatch: Include glheader.h in dispatch-related files.Paul Berry2012-11-013-3/+3
| | | | | | | | | This ensures that GLES1-only typedefs are available in these files. In a future patch, this will allow us to expand the dispatch table to include GLES1-only functions. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dispatch: Update check_table.cpp to reflect recent aliasing changes.Paul Berry2012-11-011-2/+0
| | | | | | | | | | | | | | | | In commits bad96f6 and e7dd2e5 I added the following aliases: - ClampColor -> ClampColorARB - VertexAttribDivisor -> VertexAttribDivisorARB But I neglected to update check_table.cpp, causing "make check" to fail for non-shared-glapi builds. This patch removes the functions that are now aliased from check_table.cpp, so that "make check" works correctly again. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: implement ARB_map_buffer_alignmentMarek Olšák2012-10-311-1/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* shared-glapi: implement _glapi_get_proc_name().Paul Berry2012-10-253-2/+27
| | | | | | | | | Previously this function was only implemented for non-shared-glapi builds. Since the function is only intended for debugging purposes we use a simple O(n) algorithm. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glapi: Alias VertexAttribDivisor and VertexAttribDivisorARB.Paul Berry2012-10-231-1/+2
| | | | | | | | | | | | | There's no reason to have separate slots in the dispatch table for these two functions, since they are synonymous. Note: previous to this patch, we never populated the dispatch table slot for VertexAttribDivisor, which was ok, since it is not required until 3.3. After this patch, both functions will be usable provided that the ARB_instanced_arrays extension is present. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Alias ClampColor and ClampColorARB.Paul Berry2012-10-231-1/+1
| | | | | | | | | There's no reason to have separate slots in the dispatch table for these two functions, since they are synonymous. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* es2api: Add GL ES 3 headersMatt Turner2012-10-161-0/+5
|
* glapi: Add es2="3.0" attributes to XML.Matt Turner2012-10-1613-103/+103
| | | | | | | Note that we are missing the ARB_internalformat_query extension, which provides the glGetInternalformativ function needed by GL ES 3.0. Reviewed-by: Paul Berry <[email protected]>
* glapi: Delete gles_api.py, since it is no longer used.Paul Berry2012-10-162-472/+0
| | | | | Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi_abi: Use GLES information from XML rather than gles_api.py.Paul Berry2012-10-161-5/+11
| | | | | | | | | | Note: mapi_abi can consume API information from either XML or a .csv file. A side effect of this change is that the ES1 and ES2 API printers can only be used with XML input now. That's ok, since the .csv input format is only used for the OpenVG API. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi_abi: Override 'hidden' and 'handcode' attributes using polymorphism.Paul Berry2012-10-161-15/+23
| | | | | | | | | | | | | | | | | Previously, the ES1, ES2, and shared GLAPI printers passed a list of function names to the base class constructor, which was used by the _override_for_api() function to loop over all the API functions and adjust their 'hidden' and 'handcode' attributes as appropriate for the API flavour being code-generated. This patch lifts the loop from _override_for_api() into its caller, and makes it into a polymorphic function, so that the derived classes can customize its behaviour directly. In a future patch, this will allow us to override the 'hidden' and 'handcode' attributes based on information from the XML rather than a list of functions. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi_abi: Get rid of unnecessary copy.Paul Berry2012-10-161-16/+3
| | | | | | | | | | | | Previously, _get_api_entries() would make a deep copy of each element in the entries table before modifying the 'hidden' and 'handcode' attributes. This was unnecessary, since the entries aren't used again after this function. Removing the copy simplifies the code, because it is no longer necessary to adjust the alias pointers to point to the copied entries. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi_abi: Remove sanity check that all GLES functions are present.Paul Berry2012-10-161-5/+0
| | | | | | | | | | | | | | | | | Currently mapi_abi.py uses hardcoded lists of function names (in gles_api.py) to determine which functions need to be included in the GLES 1 or GLES 2 API. This patch removes a sanity check which verified that all GLES functions listed in the hardcoded lists were actually present in the XML. Later patches in this series will modify mapi_abi.py to determine which functions need to be included in the GLES 1 or GLES 2 API based directly on the XML. Once that is done, the sanity check will be redundant. Removing the sanity check now will simplify the patches to come. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi_abi: Collect all imports at top of file.Paul Berry2012-10-161-8/+5
| | | | | Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Use GLES information from XML rather than gles_api.py.Paul Berry2012-10-162-16/+2
| | | | | Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Read GLES information from XML.Paul Berry2012-10-161-0/+48
| | | | | Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Add es1 and es2 attributes to XML.Paul Berry2012-10-169-334/+502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the set of functions which exist in GLES1 or GLES2 is determined by hardcoded lists of function names in gles_api.py. This patch encodes that information into the XML files using new attributes, es1 and es2. The es1 attribute denotes the first version of GLES 1 in which the function exists (e.g. es1="1.1" means the function exists in GLES 1.1 but not GLES 1.0). "none" (the default) means the function is not available in any version of GLES 1. The es2 attribute denotes the first version of GLES 2/3 in which the function exists (e.g. es2="2.0" means the function exists in both GLES 2.0 and GLES 3.0). "none" (the default) means the function is not available in any version of GLES 2 or GLES 3. Note that since GLES 3 is a strict superset of GLES 2, there is no need for a separate attribute for it; instead, 'es2="3.0"' should be used to denote functions that are present in GLES 3 but not GLES 2. This patch only adds information about GLES versions 1.0, 1.1, and 2.0. Later patches will modify the python code generation scripts to use this information rather than the hardcoded lists in gles_api.py. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: use new-style Python classes.Paul Berry2012-10-164-10/+10
| | | | | | | | | | | | | | | | | An unfortunate quirk of Python 2 is that there are two types of classes: "classic" classes (which are backward compatible with some unfortunate design decisions made early in Python's history), and "new-style" classes. Classic classes have a number of limitations (for example they don't support super()) and are unavailable in Python 3. There's really no reason to use classic classes, except in unmaintained legacy code. For more information see http://www.python.org/download/releases/2.2.3/descrintro/. This patch upgrades the Python code in src/mapi/glapi/gen to use exclusively new-style classes. Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/es: Enable GL_EXT_map_buffer_rangeFredrik Höglund2012-10-162-0/+30
| | | | | | This extension is functionally the same as GL_ARB_map_buffer_range. Reviewed-by: Ian Romanick <[email protected]>
* glapi: Reformat python code generation scripts to use 4-space indentation.Paul Berry2012-10-1021-5698/+5698
| | | | | | | | | | | | This brings us into accordance with the official Python style guide (http://www.python.org/dev/peps/pep-0008/#indentation). To preserve the indentation of the c code that is generated by these scripts, I've avoided re-indenting triple-quoted strings (unless those strings appear to be docstrings). Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: rename/move GL_POLYGON_OFFSET_BIAS to its extension sectionImre Deak2012-10-101-1/+2
| | | | | | | | | This should be named GL_POLYGON_OFFSET_BIAS_EXT and listed under the EXT_polygon_offset section. (Solution by Ian Romanick) Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Oliver McFadden <[email protected]>
* glx: Remove the last user of -DUSE_XCB.Eric Anholt2012-10-091-2/+0
| | | | Reviewed-by: Chad Versace <[email protected]>
* glapi: Do not use backtrace on Cygwin.Vinson Lee2012-10-041-1/+1
| | | | | | | execinfo.h is not available on Cygwin. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: Use AX_PTHREAD's HAVE_PTHREAD preprocessor definitionMatt Turner2012-10-016-15/+15
|
* build: Use PTHREAD_LIBS and PTHREAD_CFLAGSMatt Turner2012-10-012-2/+4
|
* intel: add support for ANGLE_texture_compression_dxt.Oliver McFadden2012-10-011-0/+6
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Disable build of assembly sources on Cygwin.Vinson Lee2012-09-281-1/+1
| | | | | | | The assembly sources currently do not build on Cygwin. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glx: Fix compile warnings since 99fee476a102be898a1a093c037e06382f90a5b9Eric Anholt2012-09-281-1/+1
| | | | | | | | | _glapi_table is a struct full of named function pointers, while the generated code just wants to treat it as an array of function pointers. Cast to avoid the compiler warning. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gles2: Alias glReadBufferNV with desktop glReadBufferIan Romanick2012-09-281-1/+1
| | | | | | | | NOTE: This is a candidate for the 9.0 branch Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: Kristian Høgsberg <[email protected]>
* build: Link libglapi with pthreadsMatt Turner2012-09-271-0/+2
| | | | | | | | NOTE: This is a candidate for the 9.0 branch. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=839060 https://bugs.gentoo.org/show_bug.cgi?id=435152 Reviewed-by: Adam Jackson <[email protected]>
* glapi/glx: rename 'table' variable to 'disp_table'Brian Paul2012-09-061-2/+2
| | | | | | | | | | | | This fixes an issue where the local 'table' variable was hiding the function parameter name in glGetColorTable(..., void *table). This should be OK as long as there's never a GL entrypoint that uses 'disp_table' as a parameter name. Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* glX_proto_send.py: Don't cast the return value of mallocMatt Turner2012-09-051-1/+1
|
* Don't cast the return value of malloc/reallocMatt Turner2012-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
* glX_proto_send.py: Remove deprecated Xmalloc/Xfree callsMatt Turner2012-09-051-3/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* Use the correct macro _WIN32 for Windows.Vinson Lee2012-09-055-6/+6
| | | | | | | | | | | | | | The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mapi: Add shared-glapi-test to .gitignorePaul Berry2012-09-051-0/+1
|
* mesa/es: Enable GL_OES_vertex_array_objectIan Romanick2012-08-292-0/+31
| | | | | | | Functionally the same as GL_ARB_vertex_array_object. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glapi/glx: call __glEmptyImage if USE_XCB, not memcpy directlyJulien Cristau2012-08-271-10/+25
| | | | | | | | | | | We were stomping on the caller's buffer by ignoring their alignment requests and other pixel store modes. This patch makes the USE_XCB path match the older one more closely. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52059 Signed-off-by: Julien Cristau <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* automake: convert vgapiMatt Turner2012-08-244-100/+69
|
* build: Only generate dispatch assembly code that will be builtMatt Turner2012-08-241-4/+12
|
* build: Fix installation of GLES2 headersMatt Turner2012-08-231-6/+5
| | | | | Reported-by: U. Artie Eoff <[email protected]> Tested-by: U. Artie Eoff <[email protected]>
* build: Fix GLES linkage with libglapiMatt Turner2012-08-232-2/+2
| | | | Reported-by: Ian Romanick <[email protected]>