Mike Blumenkrantz
6e8b9e143d
mesa: support NV_timeline_semaphore
...
this is for use with vulkan interop and carries the same mechanics
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35866 >
2025-07-07 21:18:29 +00:00
Yurii Kolesnykov
9822fa3ef3
Get rid of 5 remaining references to glapitable.h
...
Closes : #13003
Fixes: 0cebfb15 ("glapi: remove duplicated generated header glapitable.h")
Co-authored-by: Marek Olšák <maraeo@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34682 >
2025-04-23 20:18:25 +00:00
Jose Maria Casanova Crespo
efc87e0d6a
glapi: import noop_array and public stubs earlier.
...
After 711fc10ea3 "glapi: merge all shared-glapi source files
into one .c file" the V3D simulator started crashing. After
testing the changes of the merge one by one, it was identified
that previously shared_glapi_mapi_tmp.h was being imported twice
instead of only once as it happens after the merge. Although
the change done in the merge seems to be equivalent it seems
it was breaking the the debug builds.
Here can find an explanation why this problem was affecting debug
builds https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34363#note_2850196
Fixes: 711fc10ea3 ("glapi: merge all shared-glapi source files into one .c file")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12908
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34363 >
2025-04-04 00:18:28 +00:00
Lucas Stach
b60d816d6e
include: update GL headers from the registry
...
Taken from OpenGL-Registry commit ca62982097eb
("Remove plural bindings in GL_ARB_shader_texture_image_samples (#637 )")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33356 >
2025-04-01 19:08:38 +00:00
Marek Olšák
b74a6e05bd
glapi: fix x86 32-bit asm dispatch regression
...
shared_glapi_mapi_tmp.h must be included before asm("x86_entry_end:").
Fixes: fae087770a - glapi: simplify codegen macros
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34269 >
2025-03-29 22:36:21 +00:00
Marek Olšák
47d08dbde7
glx: stop exporting EXT_texture_object functions from libGLX_mesa.so
...
These aliases of the non-EXT functions have a non-aliased indirect GLX
implementation. Remove it since it's not needed.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
574c1a70d6
mesa: move dispatch.h and marshal_generated.h generation to glapi/gen
...
This is where most files are generated. It's a prerequisite for
a future change.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
06a720e1ea
glapi: remove the option to set the nop handler
...
Call the only nop handler that's ever set directly.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
a91c541c5b
glapi: remove noop_generic callbacks
...
There are named and generic noop callbacks. The named ones can print
the GL function being called, while the generic ones can't. Remove
the generic ones.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
1f56a1ac37
glapi: rename dispatch stubs to use function names instead of numbers
...
it's now _dispatch_stub_Uniform2d instead of shared_dispatch_stub_216
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
d8b8259593
glapi: simplify mapi_abi.py
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
4d643d06c8
glapi: simplify headers of generated files
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
168cf334e8
glapi: remove the GLAPI_PREFIX macro, just use gl as the function prefix
...
GLAPI_PREFIX always adds the gl prefix.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
e6da775506
glapi: get the list of public GL functions from libgl-symbols.txt
...
It's used by the symbols check test, so let's feed the same file into
python to define public GL functions because the lists are identical.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:35 +00:00
Marek Olšák
1e0ce9db94
glapi: remove unused _mesa_glapi_Dispatch
...
Only _mesa_glapi_tls_Dispatch is used.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:34 +00:00
Marek Olšák
711fc10ea3
glapi: merge all shared-glapi source files into one .c file
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:34 +00:00
Marek Olšák
fae087770a
glapi: simplify codegen macros
...
- include the generated header directly instead of including
MAPI_ABI_HEADER
- remove the MAPI_MODE_BRIDGE macro
- must move code into .c files since we don't have the macros anymore
- clean up #includes
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:34 +00:00
Marek Olšák
16ab7bd5a0
glapi: replace mapi_func type with identical _glapi_proc
...
there's no need to have 2 types for the same thing
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:34 +00:00
Marek Olšák
d134f97e3f
glapi: make a separate copy of entry.c for each lib
...
Using the same .c file in 4 different static/shared libs is difficult to
read. Having them separate will make it possible to simplify the code.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:34 +00:00
Marek Olšák
9e24940bc7
glx: don't generate indirect GLX dispatch for ARB_imaging functions
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002 >
2025-03-27 05:46:34 +00:00
Jose Fonseca
e3741a5731
glapi: Make _GLAPI_EXPORT a no-op on Windows.
...
DLL import/export annotations unneeded, now that glapi is statically
linked into libgallium_wgl.
However _mesa_glapi_get_proc_address and _mesa_glapi_get_dispatch need
to be explicitly exported for libEGL and libGLESv2.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12573
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33822 >
2025-03-25 17:11:07 +00:00
Marek Olšák
171ee1797b
glapi: remove extension definitions that will likely never be implemented
...
If somebody needs these in the future, they can add them back, but a lot
of these extensions are very old (SUN, SGI, ...).
No code is added, though git diff is having trouble detecting that.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:23 +00:00
Marek Olšák
0cebfb15b5
glapi: remove duplicated generated header glapitable.h
...
mesa/main/dispatch.h is exactly the same. We generated the same header
twice.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:23 +00:00
Marek Olšák
db7e49d5ff
glapi: remove static glapi (it's dead code now)
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:22 +00:00
Marek Olšák
fefb1a6fb3
meson: remove with_shared_glapi variable (it's always true)
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794 >
2025-03-06 17:13:22 +00:00
Marek Olšák
1d5d809818
glapi: remove unused python code
...
detected by a program called vulture
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
906dcb56e1
glx: make it more obvious what libglapi_bridge is
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
71bb62e3c9
glx: stop exporting GL functions from libGLX_mesa.so
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
0204609365
glapi: inline entry_current_get()
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
fb16a1121b
glapi: remove is_static_entry_point wrapper
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
20aadf4f64
glapi: use static_data.libgl_public_functions directly
...
also filter_entry_points is unused, so remove that
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
72db4a1e50
glapi: disable python escape sequences in strings that use invalid ones
...
We use invalid escape sequences in a few string.
r'...' disables escape sequences. This fixes validator errors:
/home/marek/dev/mesa/src/mapi/mapi_abi.py:45: SyntaxWarning: invalid escape sequence '\w'
'^(?P<type>[\w\s*]+?)(?P<name>\w+)(\[(?P<array>\d+)\])?$')
/home/marek/dev/mesa/src/mapi/glapi/gen/api_exec_init.py:43: SyntaxWarning: invalid escape sequence '\p'
header = """/**
/home/marek/dev/mesa/src/mapi/glapi/gen/gl_enums.py:64: SyntaxWarning: invalid escape sequence '\c'
print("""
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
1f75715dae
glthread: rename scripts to match the names of generated files
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
9a2974019b
glthread: handle glFlush with HasExternallySharedImages more efficiently
...
Doing finish without flush is more efficient because it executes the unflushed
batch immediately.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
2937d8a961
glapi: just use _gloffset_COUNT_ everywhere, which is always the function count
...
MAPI_TABLE_NUM_STATIC was just duplicated _gloffset_COUNT.
mesa/main no longer needs to specify the table size.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
057c7f0dd2
glapi: verify that aliased functions don't have entries in dispatch tables
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
02d22dd1f3
glapi: move legacy imaging functions to the end of dispatch tables
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
1fde49d50e
glapi: remove unused functions from dispatch tables
...
We also have to remove __indirect_glVertexAttribPointerNV because nothing
uses it after the removal from dispatch tables.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
c0b0ba1b77
glapi: generate static offsets from the list of GL functions automatically
...
Since glapi is part of libgallium.so, the offsets don't have to be immutable
anymore, but they still have to be fixed values within a build because both
gl_XML.py and genCommon.py use them and they should match AFAIK.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
e3f9848a5c
glapi: remove check_table tests
...
glapi is now statically built into libgallium or libGL and both must come
from the same Mesa version, so backward compatibility of dispatch tables
is no longer required.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
a8b18dce82
glapi: clarify the meaning of static_data.functions
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
6c39cc1cc3
glapi: use an assertion in SET_by_offset instead of doing nothing
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
49facd7d54
glapi: remove support for dynamically-registered functions
...
I think this was for when libglapi was older than DRI drivers and didn't
know all functions.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
3fc52ac0e0
glapi: fix build dependencies by putting all xml/py files into a single list
...
This fixes missing script dependencies that didn't trigger rebuilds when
those files were changed. To keep it simple stupid, all xml and python
files used by python scripts indirectly are now in a single global list.
All variables holding file names are also inlined, so that we use file
paths everywhere.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:06 +00:00
Marek Olšák
e4830d6e44
glapi: don't export always-private functions
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Marek Olšák
c13a3de924
glapi: inline functions or use equivalent alternatives
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Marek Olšák
142202cd00
glapi: remove dead code
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634 >
2025-03-03 21:06:05 +00:00
Erik Faye-Lund
fde6aeb886
mesa/main: wire up glapi bits for EXT_multi_draw_indirect
...
Turns out we were missing the glapi bits, making it impossible to use get
the function pointers for this extension. Whoops?!
[daniels: Squashed in a618 SkQP fails, presumably caused by these not
being skipped anymore.]
Fixes: 9f5af68995 ("mesa/main: expose `EXT_multi_draw_indirect`")
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com >
Tested-by: Chris Healy <healych@amazon.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33546 >
2025-02-21 09:22:03 +00:00
Adam Jackson
244c9cc45e
mapi/glx: Remove FASTCALL/PURE
...
This isn't worth the complexity.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623 >
2025-02-20 15:47:23 +00:00
Adam Jackson
32a10ccbdd
glx: Remove (almost) all usage of _X_HIDDEN / _X_INTERNAL
...
It's redundant at this point. The one exception is for GLX_PUBLIC when
building for glvnd, because then we really do want the GLX API to be
hidden.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623 >
2025-02-20 15:47:23 +00:00