summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi/gen
Commit message (Collapse)AuthorAgeFilesLines
* glapi: Remove support for "short string" modeIan Romanick2014-04-021-36/+7
| | | | | | | | | | | | | | | | | C89 has a fairly short minimum-maximum string length. To support compilers limited by the C89 limits, this script had a mode where it would generate a character array instead of a giant string. These were functionally the same, but the code generated for the character array is HUGE and difficult to read. As far as I can tell, nothing in Mesa uses '-m short' any more. The generated files used to be tracked in revision control, but I think we stopped using '-m short' when we stopped tracking the generated files. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Brian Paul <[email protected]> Tested-by: Lu Hua <[email protected]> Cc: Vinson Lee <[email protected]>
* Revert "glapi/es1: Don't mark core functions as static_dispatch=false"Brian Paul2014-04-011-43/+86
| | | | | | | | This reverts commit f6e290f80cc6728647e9cee35546190f081197e2. To fix the broken build. The DRI-enabled build seems OK after reverting. Th non-DRI/gallium build is still suffering from an unrelated issue in the pipe-loader code.
* glapi/es1: Don't mark core functions as static_dispatch=falseIan Romanick2014-03-311-86/+43
| | | | | | | | | | Functions that are part of OpenGL ES 1.0 or 1.1 should have static dispatch functions in libGLESv1_CM. This doesn't affect any change yet, but it will prevent later regressions. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Chad Versace <[email protected]>
* glapi: Mark all GL_ARB_separate_shader_objects functions with ↵Ian Romanick2014-03-311-61/+61
| | | | | | | | | | | static_dispatch=false This prevents the entrypoints from being (incorrectly) advertised by libGL. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Chad Versace <[email protected]>
* glapi: Remove some duplicate ignore="true" linesIan Romanick2014-03-311-32/+0
| | | | | | | | | | It looks like these were added accidentally by Paul in commit 1a1db174. From the commit message and the look of the patch, I think this was just some sed-job left overs. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mapi/glapi: Use ElementTree instead of libxml2.José Fonseca2014-03-263-151/+134
| | | | | | | | | | | | | | | | | | | | | | It is quite hard to meet the dependency of the libxml2 python bindings outside Linux, and in particularly on MacOSX; whereas ElementTree is part of Python's standard library. ElementTree is more limited than libxml2: no DTD verification, defaults from DTD, or XInclude support, but none of these limitations is serious enough to justify using libxml2. In fact, it was easier to refactor the code to use ElementTree than to try to get libxml2 python bindings. In the process, gl_item_factory class was refactored so that there is one method for each kind of object to be created, as it simplifies things substantially. I confirmed that precisely the same output is generated for GL/GLX/GLES. v2: Remove m4/ax_python_module.m4 as suggested by Matt Turner. Reviewed-by: Ian Romanick <[email protected]>
* mapi/glapi: Remove glX_doc.py.José Fonseca2014-03-261-280/+0
| | | | | | As suggested by Ian Romanick, given it's no longer used. Reviewed-by: Ian Romanick <[email protected]>
* automake: use MKDIR_P when possibleEmil Velikov2014-03-111-3/+3
| | | | | | | Use the automake predefined macro over hardcoding mkdir -p everywhere. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jon TURNEY <[email protected]>
* mesa: s/GLhandleARB/GLuint/ for glGetUniform functionsBrian Paul2014-03-101-4/+4
| | | | | | | The GL specs say the parameter is GLuint, not GLhandleARB. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Add KHR_debug.xmlTimothy Arceri2014-03-081-0/+150
|
* mesa: make ARB_debug_output functions an alias ofTimothy Arceri2014-03-081-4/+4
| | | | | | | | | | | | | KHR_debug Also update dispatch sanity removing ARB_debug_output checks and removing KHR_debug placeholders as the checks have already been added V2: Make sure we exit case statements with conditional breaks rather than just dropping through. Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glapi: move KHR_debug into its own fileTimothy Arceri2014-03-081-143/+1
| | | | | Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add core API support for GL_ARB_stencil_texturing (from 4.3).Kenneth Graunke2014-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While the GL_ARB_stencil_texturing extension does not allow the creation of stencil textures, it does allow shaders to sample stencil values stored in packed depth/stencil textures. Specifically, applications can call glTexParameter* with a pname of GL_DEPTH_STENCIL_TEXTURE_MODE and value of either GL_DEPTH_COMPONENT or GL_STENCIL_INDEX to select which component they wish to sample. The default value is GL_DEPTH_COMPONENT (for traditional depth sampling). Shaders should use an unsigned integer sampler (presumably usampler2D) to access stencil data. Otherwise, results are undefined. Using shadow samplers with GL_STENCIL_INDEX selected also is undefined behavior. This patch creates a new gl_texture_object field, StencilSampling, to indicate that stencil should be sampled rather than depth. (I chose to use a boolean since I figured it would be more convenient for drivers.) It also introduces the [Get]TexParameter code to get and set the value, and of course the extension plumbing. v2: Also consider textures incomplete when sampling stencil with non-NEAREST min/mag filters (caught by Eric Anholt). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove empty glthread.h fileBrian Paul2014-03-032-2/+0
| | | | Reviewed-by: José Fonseca <[email protected]>
* NV_vdpau_interop: fix IsSurfaceNV return typeGrigori Goronzy2014-03-031-0/+1
| | | | | | | | The spec incorrectly used void as return type, when it should have been GLboolean. This has now been fixed. According to Nvidia, their implementation always used GLboolean. Reviewed-by: Christian König <[email protected]>
* glapi: add ARB_buffer_storageMarek Olšák2014-02-251-0/+19
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* mesa/sso: Change CreateShaderProgramv return type from uint to GLuint.Vinson Lee2014-02-211-1/+1
| | | | | | | | | | | | This patch fixes this MinGW build error. Compiling src/mapi/glapi/glapi_dispatch.c ... In file included from src/mapi/glapi/glapi_dispatch.c:41:0: build/windows-x86_64-debug/mapi/glapi/glapitable.h:930:4: error: expected specifier-qualifier-list before 'uint' uint (GLAPIENTRYP CreateShaderProgramv)(GLenum type, GLsizei count, const GLchar * const * strings); /* 886 */ ^ Signed-off-by: Vinson Lee <[email protected]>
* mesa/sso: Add extension entry points for GL_ARB_separate_shader_objectsGregory Hainaut2014-02-214-1/+408
| | | | | | | | | | | | | | | | | | | | | | | | | Nothings implemented yet but glProgramUniform* which are mostly a copy/paste of the older function glUniform* I create dedicated pipelineobj.[ch] file that will contains function related to the "new" pipeline container object. V2: formatting improvement V3: * indentation fix * Update copyright * Add a comment on ProgramParameteri already present in another extension * Remove TODO, will be readded on correct patch V4 (idr): * Fix dispatch_sanity unit test * Make extension string available in core profiles (instead of just compatibility). * Trivial reformating Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* glapi: add definitions for ARB_gpu_shader5Jordan Justen2014-02-062-0/+17
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/cs: Add dispatch API stubs for ARB_compute_shader.Paul Berry2014-02-054-1/+45
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: move glGenerateMipmap() code into new genmipmap.c fileBrian Paul2014-02-021-0/+1
| | | | | | | Mipmap generation has nothing to do with FBOs. v2: update gl_genexec.py too (not api_exec.c) Acked-by: Kenneth Graunke <[email protected]>
* mesa: move glBlitFramebuffer code into new blit.c fileBrian Paul2014-02-021-0/+1
| | | | | | | Just for better organization. v2: update gl_genexec.py too (not api_exec.c) Acked-by: Kenneth Graunke <[email protected]>
* mesa: Add ARB_viewport_array plumbingCourtney Goeltzenleuchter2014-01-203-1/+81
| | | | | | | | | | | | | | | | Define API connections to extension entry points added in previous commits. Update entry points to use floating point arguments as required by the extension. Add get tokens for ARB_viewport_array state. v2: Include review feedback. v3 (idr): Fix 'make check'. Add missing Get infrastructure (some was culled from other pathces). Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: Update dispatch XML files for ARB_shader_image_load_store.Francisco Jerez2014-01-153-0/+92
| | | | | | | And uncomment the relevant lines of the dispatch sanity test. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: Implement the GL entry points defined by ARB_shader_image_load_store.Francisco Jerez2014-01-151-0/+1
| | | | | | | | | | v2: Name image format classes consistently, fix array and 3D teximage selection with layered = GL_FALSE, make sure that the user-specified layer is less than the number of texture layers, add some asserts. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glx: Add missing null check in __glXNewIndirectAPI()Juha-Pekka Heikkila2014-01-061-0/+2
| | | | | | | | Add extra null check in auto generated indirect_init.c via src/mapi/glapi/gen/glX_proto_send.py Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add infrastructure for GL_ARB_clear_buffer_objectPi Tabred2013-12-182-1/+55
| | | | | | | | | - add xml file for extension - add reference in gl_API.xml - add pointer to device driver function table (dd.h) - update dispatch_sanity.cpp Reviewed-by: Brian Paul <[email protected]>
* mesa: Add API definitions for ARB_texture_viewCourtney Goeltzenleuchter2013-12-134-1/+28
| | | | | | | | | | Stub in glTextureView API call to go with the glTextureView API xml definition. Includes dispatch test for glTextureView Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glapi: Do not include dlfcn.h on Windows.Vinson Lee2013-12-071-0/+2
| | | | | | | | | | This patch fixes this MinGW build error. CC glapi_gentable.lo glapi_gentable.c:47:19: fatal error: dlfcn.h: No such file or directory Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glapi: add plumbing for GL_ARB_draw_indirect and GL_ARB_multi_draw_indirectChris Forbes2013-11-253-1/+49
| | | | | | | | Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* build: Change HAVE_X86_ASM to mean x86 or x86-64 asm.Matt Turner2013-11-071-3/+3
| | | | | | | I want a conditional that says generally "we have x86 assembly" in the next patch. Reviewed-by: Eric Anholt <[email protected]>
* glapi: Add infrastructure for ARB_vertex_attrib_bindingFredrik Höglund2013-11-073-1/+64
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add new functions and enums required by GL_ARB_sample_shadingAnuj Phogat2013-11-014-2/+47
| | | | | | | | | | | | | | | | | | | | | | New functions added by GL_ARB_sample_shading: glMinSampleShadingARB() New enums: GL_SAMPLE_SHADING_ARB GL_MIN_SAMPLE_SHADING_VALUE_ARB V2: Update comments. Create new GL4x.xml. Remove redundant code in get.c. Update the API_XML list in Makefile.am. Add extra_gl40_ARB_sample_shading predicate to get.c. V3: Fix make check failure. Add checks for desktop GL. Use GLfloat in place of GLclampf in glMinSampleShading(). Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ken Graunke <[email protected]>
* glapi: Add support for ARB_shader_atomic_counters.Francisco Jerez2013-10-293-0/+50
| | | | | | | | Add XML file for the dispatch code generator, update the dispatch_sanity test and add stub definition for the new entry point. Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* implement NV_vdpau_interop v7Christian König2013-10-264-0/+73
| | | | | | | | | | | | | | | | | | | v2: Actually implement interop between the gallium state tracker and the VDPAU backend. v3: Make it also available in non legacy contexts, fix video buffer sharing. v4: deny interop if we don't have the same screen object v5: rebased on upstream changes v6: implemented VDPAUGetSurfaceivNV, improved error handling, unregister all surfaces in VDPAUFiniNV v7: squash merge with Mareks changes Signed-off-by: Christian König <[email protected]>
* mesa: remove remnants of GL_MESA_shader_debugBrian Paul2013-10-221-32/+0
| | | | | | | | This extension never saw any real use so remove it. v2: also update tests/num_strings.cpp for 'make check' Reviewed-by: Ian Romanick <[email protected]>
* glapi: Add missing XML files to Makefile dependencies.Matt Turner2013-10-161-0/+8
| | | | Reviewed-by: Andreas Boll <[email protected]>
* mesa: change glTexImage[23]DMultisample() internalformat to GLenumBrian Paul2013-10-161-2/+2
| | | | | | To match glext.h and the GL_ARB_texture_multisample extension. However, the GL 4.0 spec and man page say it's GLint. An OpenGL spec bug will be filed.
* glapi: Do not use backtrace on NetBSD.Vinson Lee2013-10-111-1/+1
| | | | | | | | | | | execinfo.h is not available on NetBSD. Fixes this bulid error. CC glapi_gentable.lo glapi_gentable.c:44:22: fatal error: execinfo.h: No such file or directory Signed-off-by: Vinson Lee <[email protected]>
* glapi: add output info to GetProgramiv's paramsEmilio Pozuelo Monfort2013-10-071-1/+1
| | | | | Signed-off-by: Emilio Pozuelo Monfort <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix make check for ARB_texture_gatherChris Forbes2013-10-032-2/+5
| | | | | | | | | | | Clean up inconsistency in enum decoration: - Use the undecorated enums where possible. - MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB remains decorated, since it has no undecorated equivalent in GL4. Signed-off-by: Chris Forbes <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70054 Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add texture gather changesMaxence Le Dore2013-10-032-1/+15
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add core support for the GL_AMD_performance_monitor extension.Kenneth Graunke2013-09-264-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides an interface for applications (and OpenGL-based tools) to access GPU performance counters. Since the exact performance counters available vary between vendors and hardware generations, the extension provides an API the application can use to get the names, types, and minimum/maximum values of all available counters. Counters are also organized into groups. Applications create "performance monitor" objects, select the counters they want to track, and Begin/End monitoring, much like OpenGL's query API. Multiple monitors can be in flight simultaneously. v2: Pass ctx to all driver hooks (suggested by Christoph), and attempt to fix overallocation of bitsets (caught by Christoph). Incomplete. v3: Significantly rework core data structures. Store counters in groups rather than in a global list. Use their array index in the group's counter list as the ID rather than trying to store a globally unique counter ID. Use bitsets for active counters within a group, and also track which groups are active so that's easy to query. v4: Remove _mesa_ prefix on static functions; detect out of memory conditions in new_performance_monitor(); make BeginPerfMonitor hook return a boolean rather than setting m->Active or raising an error. Switch to GLuint/unsigned for NumGroups, NumCounters, and MaxActiveCounters (which also means switching a bunch of temporary variable types). All suggested by Brian Paul. Also, remove commented out code at the bottom of the block. Finally, fix the dispatch sanity test (noticed by Ian Romanick). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> [v3] Reviewed-by: Ian Romanick <[email protected]>
* glapi: Move declaration before code.Vinson Lee2013-09-231-4/+6
| | | | | | | | | | | | | | | This patch fixes the MSVC build error introduced by commit 673129e0b936b1c748e988d3f74f3efaab9e5693. enums.c mesa\main\enums.c(3776) : error C2143: syntax error : missing ';' before 'type' mesa\main\enums.c(3781) : error C2065: 'elt' : undeclared identifier mesa\main\enums.c(3781) : warning C4047: '!=' : 'int' differs in levels of indirection from 'void *' mesa\main\enums.c(3782) : error C2065: 'elt' : undeclared identifier mesa\main\enums.c(3782) : error C2223: left of '->offset' must point to struct/union mesa\main\enums.c(3782) : warning C4033: '_mesa_lookup_enum_by_nr' must return a value Signed-off-by: Vinson Lee <[email protected]>
* mesa: Shrink the size of the enum string lookup struct.Eric Anholt2013-09-231-2/+4
| | | | | | | | | | Since it's only used for debug information, we can misalign the struct and save the disk space. Another 19k on a 64-bit build. v2: Make a compiler.h macro to only use the attribute if we know we can. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove the extra enum strings and extra lookup table.Eric Anholt2013-09-231-41/+20
| | | | | | | | | | Now that there's no name -> enum direction, we can drop the extra strings, and merge the offsets table and the reduced_enums table. Between the previous commit and this one, Mesa core drops by 30k. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove _mesa_lookup_enum_by_name().Eric Anholt2013-09-231-29/+0
| | | | | | | | It's been unused for a long time. I stopped digging through git history as of 2009. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Setup autogeneration infrastructure for KHR_debugTimothy Arceri2013-09-042-1/+149
| | | | | | Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glapi/gen: build temporary files in the build directoryMaarten Lankhorst2013-08-211-4/+4
| | | | | | | | | | Writing to the source directory can cause multiple parallel builds from the same source to fail. Create the temporary files in the build directory. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "9.2" <[email protected]>
* mesa: Treat glBindFramebuffer and glBindFramebufferEXT more correctlyIan Romanick2013-08-061-1/+1
| | | | | | | | | | | | | | | | | Allow user-generated names for glBindFramebufferEXT on desktop GL. Disallow its use altogether for core profiles. Names bound with glBindFramebuffer in desktop OpenGL are still (incorrectly) shared across the share group instead of being per-context. This gets us a bit closer to being strictly conformant. v2: Disallow glBindFramebufferEXT in 3.1 by not installing it in the dispatch table. Suggested by Jordan. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> [v1] Reviewed-by: Jordan Justen <[email protected]> [v1] Cc: [email protected]