Commit Graph

24 Commits

Author SHA1 Message Date
Eric Engestrom f1eae2f8bb python: drop python2 support
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3674>
2021-08-14 21:44:32 +00:00
Jesse Natalie 695d3bcb12 mapi: Undefine MemoryBarrier
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8661>
2021-01-28 18:35:13 +00:00
Eric Engestrom a0829cf23b GL: drop symbols mangling support
SCons and Meson have never supported that feature, and Autotools was
deleted over 6 months ago and no-one complained yet, so it's pretty
obvious nobody cares about it.

Fixes: 95aefc94a9 ("Delete autotools")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-10 21:40:48 +01:00
Emil Velikov 3b6aaab7e9 mapi: print function declarations for shared glapi
Earlier commit aimed to remove unneeded function declarations. Namely
OpenGL entrypoints which are not applicable for OpenGLES*

Although it did not consider the shared glapi which needs all,
including hidden ones. Resulting in warning/errors like the following

../build/src/mapi/shared-glapi/glapi_mapi_tmp.h:26014:15:
error: no previous prototype for ‘shared_dispatch_stub_1414’ [-Werror=missing-prototypes]

This patch addressed that.

Cc: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reported-by: Eric Anholt <eric@anholt.net>
Fixes: 6148cce388 ("mapi: drop unneeded gl_dispatch_stub declarations")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
2019-01-25 13:04:04 -08:00
Emil Velikov 281421e1bc mapi: remove machinery handling CSV files
We haven't have one in years, so just drop the code.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-01-24 18:13:25 +00:00
Emil Velikov 8a0012692a mapi: remove old, unused ES* generator code
As of earlier commit, everyone has switched to the new script for the ES
dispatch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-01-24 18:13:25 +00:00
Erik Faye-Lund 6148cce388 mapi: drop unneeded gl_dispatch_stub declarations
These declarations are not used anywhere - be that generated code or
otherwise.

[Emil: format the hunk from Erik into a patch]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2019-01-24 18:13:24 +00:00
Emil Velikov ca152234e1 mesa: correctly use os.path.join in our python scripts
With Windows in mind, using forward slash isn't the right thing to do.
Even if it just works, we might want to fix it.

As here, use __file__ instead of argv[0] and sys.path.insert over
sys.path.append. With the path tweak being reportedly faster.

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-01-24 18:13:24 +00:00
Mathieu Bridon 08fe9b3e3a python: Simplify list sorting
Instead of copying the list, then sorting the copy in-place, we can just
get a new sorted copy directly.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-08-09 16:49:19 -07:00
Mathieu Bridon 8d3ff6244c python: Use key-functions when sorting containers
In Python 2, the traditional way to sort containers was to use a
comparison function (which returned either -1, 0 or 1 when passed two
objects) and pass that as the "cmp" argument to the container's sort()
method.

Python 2.4 introduced key-functions, which instead only operate on a
given item, and return a sorting key for this item.

In general, this runs faster, because the cmp-function has to get run
multiple times for each item of the container.

Python 3 removed the cmp-function, enforcing usage of key-functions
instead.

This change makes the script compatible with Python 2 and Python 3.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-08-09 16:49:19 -07:00
Mathieu Bridon e1b88aee68 python: Fix rich comparisons
Python 3 doesn't call objects __cmp__() methods any more to compare
them. Instead, it requires implementing the rich comparison methods
explicitly: __eq__(), __ne(), __lt__(), __le__(), __gt__() and __ge__().

Fortunately Python 2 also supports those.

This commit only implements the comparison methods which are actually
used by the build scripts.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-08-07 13:10:34 -07:00
Mathieu Bridon 9ebd8372b9 python: Use range() instead of xrange()
Python 2 has a range() function which returns a list, and an xrange()
one which returns an iterator.

Python 3 lost the function returning a list, and renamed the function
returning an iterator as range().

As a result, using range() makes the scripts compatible with both Python
versions 2 and 3.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-07-24 11:07:04 -07:00
Mathieu Bridon 1d209275c2 python: Better check for keys in dicts
Python 3 lost the dict.has_key() method. Instead it requires using the
"in" operator.

This is also compatible with Python 2.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-07-24 11:07:04 -07:00
Mathieu Bridon 0f7b18fa0d python: Use the print function
In Python 2, `print` was a statement, but it became a function in
Python 3.

Using print functions everywhere makes the script compatible with Python
versions >= 2.6, including Python 3.

Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
2018-07-06 10:04:22 -07:00
Emil Velikov d230ef842c mapi_abi.py: remove no longer used --mode option
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-04 18:17:06 +01:00
Emil Velikov 3698fe295a mapy_abi.py: remove dead output_for_app generator
Used by the OpenVG codebase.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-05-04 18:17:06 +01:00
Emil Velikov 4562d88c1d mapi: replace mapi_table abstraction
Replace all instances of mapi_table with the actual struct _glapi_table.
The former may have been needed when the OpenVG was around. But since
that one is long gone, there' no point in having the current confusing
mix of the two.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-05-04 18:17:03 +01:00
Emil Velikov e4c7911150 nir: remove shebang from python scripts
Analogous to earlier commit(s).

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-03-10 14:12:47 +00:00
Jose Fonseca 3acd7a34ab st/vega: Remove.
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 <emil.l.velikov@gmail.com>

v3: Update release notes.
2015-03-04 11:01:45 +00:00
Ian Romanick 1a59f9a131 mapi_abi: Make ES1 and ES2 static_dispatch=false functions hidden
This has been a long standing issue with the ES libraries.  Functions
marked in the XML with 'static_dispatch=false' were still incorrectly
exported.  ABI-check is supposed to detect this case, but we have to
paper over failures every time a new extension is added.

This change will cause a big pile of functions to disappear from
libGLESv2 and libGLESv1_CM.

libGLESv2 loses (20 functions):

    glBindVertexArrayOES
    glCompressedTexImage3DOES
    glCompressedTexSubImage3DOES
    glCopyTexSubImage3DOES
    glDeleteVertexArraysOES
    glDiscardFramebufferEXT
    glDrawBuffersNV
    glFlushMappedBufferRangeEXT
    glFramebufferTexture3DOES
    glGenVertexArraysOES
    glGetBufferPointervOES
    glGetProgramBinaryOES
    glIsVertexArrayOES
    glMapBufferOES
    glMapBufferRangeEXT
    glProgramBinaryOES
    glReadBufferNV
    glTexImage3DOES
    glTexSubImage3DOES
    glUnmapBufferOES

libGLESv1_CM loses (88 functions):

    glAlphaFuncxOES
    glBindFramebufferOES
    glBindRenderbufferOES
    glBlendEquationOES
    glBlendEquationSeparateOES
    glBlendFuncSeparateOES
    glCheckFramebufferStatusOES
    glClearColorxOES
    glClearDepthfOES
    glClearDepthxOES
    glClipPlanefOES
    glClipPlanexOES
    glColor4xOES
    glDeleteFramebuffersOES
    glDeleteRenderbuffersOES
    glDepthRangefOES
    glDepthRangexOES
    glDiscardFramebufferEXT
    glDrawTexfOES
    glDrawTexfvOES
    glDrawTexiOES
    glDrawTexivOES
    glDrawTexsOES
    glDrawTexsvOES
    glDrawTexxOES
    glDrawTexxvOES
    glFlushMappedBufferRangeEXT
    glFogxOES
    glFogxvOES
    glFramebufferRenderbufferOES
    glFramebufferTexture2DOES
    glFrustumfOES
    glFrustumxOES
    glGenerateMipmapOES
    glGenFramebuffersOES
    glGenRenderbuffersOES
    glGetBufferPointervOES
    glGetClipPlanefOES
    glGetClipPlanexOES
    glGetFixedvOES
    glGetFramebufferAttachmentParameterivOES
    glGetLightxvOES
    glGetMaterialxvOES
    glGetRenderbufferParameterivOES
    glGetTexEnvxvOES
    glGetTexGenfvOES
    glGetTexGenivOES
    glGetTexGenxvOES
    glGetTexParameterxvOES
    glIsFramebufferOES
    glIsRenderbufferOES
    glLightModelxOES
    glLightModelxvOES
    glLightxOES
    glLightxvOES
    glLineWidthxOES
    glLoadMatrixxOES
    glMapBufferOES
    glMapBufferRangeEXT
    glMaterialxOES
    glMaterialxvOES
    glMultiTexCoord4xOES
    glMultMatrixxOES
    glNormal3xOES
    glOrthofOES
    glOrthoxOES
    glPointParameterxOES
    glPointParameterxvOES
    glPointSizePointerOES
    glPointSizexOES
    glPolygonOffsetxOES
    glQueryMatrixxOES
    glRenderbufferStorageOES
    glRotatexOES
    glSampleCoveragexOES
    glScalexOES
    glTexEnvxOES
    glTexEnvxvOES
    glTexGenfOES
    glTexGenfvOES
    glTexGeniOES
    glTexGenivOES
    glTexGenxOES
    glTexGenxvOES
    glTexParameterxOES
    glTexParameterxvOES
    glTranslatexOES
    glUnmapBufferOES

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Chia-I Wu <olv@lunarg.com>
Cc: Paul Berry <stereotype441@gmail.com>
2014-03-31 14:47:00 -07:00
Ian Romanick dfccd5ccd7 mapi: Hack around glGetInternalformativ not being hidden in GLES
This is hella ugly.  The same-named function in desktop OpenGL is
hidden, but it needs to be exposed by libGLESv2 for OpenGL ES 3.0.
There's no way to express in the XML that a function should be be hidden
in one API but exposed in another.

This won't affect any change now, but it will prevent a regression in a
later patch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2014-03-31 14:46:48 -07:00
Tom Stellard bee49cb0ec mesa: Fix build with older gcc since update of glext.h
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-06-28 08:49:06 -07:00
Rico Schüller 3998cfa933 mesa: remove outdated version lines in comments
Signed-off-by: Brian Paul <brianp@vmware.com>
2013-06-05 08:54:27 -06:00
Matt Turner d5e9426b96 build: Move src/mapi/mapi/* to src/mapi/
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-15 12:04:25 -07:00
Renamed from src/mapi/mapi/mapi_abi.py (Browse further)