Qiang Yu
533c701d85
Update OpenGL headers for GL_EXT_mesh_shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36751 >
2025-08-22 10:01:56 +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
027ccd963b
Remove osmesa
...
It's redundant with EGL surfaceless and it doesn't have much use.
It's also available from the amber branch, so distros should get it from
there if they want to continue packaging it.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836 >
2025-03-04 00:40:39 +00:00
Tapani Pälli
346f4d3c11
dri: remove GLsync typedef
...
This was previously used with interop extension but since then it has
been changed to use mesa_glinterop_flush_out instead. This typedef is
causing some compilation issues, so remove it.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12378
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32807 >
2025-01-02 07:38:38 +00:00
Adam Jackson
91e1ea52c9
mesa_interface: Move out of GL/internal/
...
Move it into src/gallium/include/ to make it absolutely clear this is a Mesa detail.
While we're at it, clean up its include sites, including some places
where we can just include kopper_interface.h instead since it includes
mesa_interface.h as its first act.
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378 >
2024-07-17 23:47:05 +00:00
Adam Jackson
de41fda2f5
mesa_interface: Set ourselves free
...
Paste in a copy of dri_interface.h so we can freely modify our internals
without breaking Xorg compatibility.
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378 >
2024-07-17 23:47:05 +00:00
Louis-Francis Ratté-Boulianne
d1c22c678c
dri_interface: add interface for EGL_EXT_surface_compression
...
This adds two new methods for the image extension (version 22):
- Query the supported compression bitrates for a given format
- Query the modifiers associated with a given format and bitrate
The interface user can then use createImageWithModifiers to
actually allocate the fixed-rate compressed image. When the default
bitrate is requested, one can query the image for the
__DRI_IMAGE_ATTRIB_COMPRESSION_RATE attribute to determine the
compression rate that was actually used.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27109 >
2024-06-12 21:20:05 +00:00
Mike Blumenkrantz
2efa1ae0d5
dri: rename 'implicit' param from earlier series
...
I accidentally merged the wrong version of this, and this was supposed
to be the correct and more informative name
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29066 >
2024-05-07 15:19:23 +00:00
Mike Blumenkrantz
744307289c
frontends/dri: plumb an 'implicit' param through screen init
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139 >
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
14c44aacff
dri: plumb a 'implicit' param through createNewScreen interfaces
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139 >
2024-04-22 23:25:58 +00:00
Mike Blumenkrantz
fd6f7e3f16
drisw: plumb through a swapBuffersWithDamage interface
...
currently the same as regular swap
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703 >
2024-02-29 01:15:23 +00:00
Daniel Stone
7e10601786
dri: Redeclare __DRI_IMAGE_FORMAT_* as PIPE_FORMAT_*
...
These aren't used by any external DRI callers, so unexport them and
redeclare them in terms of PIPE_FORMAT_*, so we can flatten them down
later.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709 >
2024-02-27 10:51:02 +00:00
Antonio Gomes
a7272a6f24
mesa/st: Skip querying PCI values in interop_query_device_info if version >= 4
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071 >
2024-02-23 13:29:00 +00:00
Mike Blumenkrantz
81ecb21d50
drisw: hook up EXT_buffer_age
...
drisw only has a single drawable, which means the buffer age is always 1
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27554 >
2024-02-20 15:12:38 +00:00
Yonggang Luo
5bf68ab701
osmesa: Make osmesa.h compatible with Windows SDK's GL.h
...
For glext.h and glcorearb.h, it's already use 'APIENTRY', so for the osmesa.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26561 >
2023-12-08 09:55:54 +00:00
Sylvain Munaut
0fa85b983f
mesa/st, dri2, wgl, glx: Restore flush_objects interop backward compat
...
In commit 1396dc1c a new output field was added as a parameter, but this
is a problem since the signature of the function are not versionned.
The flush function didn't have a versionned output struct. So what I'm
proposing here is that if the version of the input argument is new enough
(bumped to 2 here), then we re-use the existing argument, which until now
was directly a pointer to GLsync, and instead use it as a pointer to a
versioned struct.
We're just changing one pointer type to another, so in C, this should
be fine AFAIK.
Fixes: 1396dc1c
Signed-off-by: Sylvain Munaut <tnt@246tNt.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26315 >
2023-11-21 23:15:32 +00:00
Antonio Gomes
1396dc1c38
mesa/st, dri2, wgl, glx: Modify flush_objects interop func to export a fence_fd
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305 >
2023-11-04 01:28:42 +00:00
Antonio Gomes
663cef26d0
mesa/st: Add new data to mesa_glinterop
...
* Version 3 of mesa_glinterop_device_info
* Export device uuid
* Version 2 of mesa_glinterop_export_out
* Export texture sizes
* Export whandle.modifier
* Export whandle.stride
* Add PIPE_HANDLE_USAGE_EXPLICIT_FLUSH in interop_export_objects
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305 >
2023-11-04 01:28:42 +00:00
Emma Anholt
e64ab3e4a9
glx: Delete support for GLX_OML_swap_method.
...
This was an ill-advised extension. While we advertised SWAP_COPY support,
we might implement it with a back-copy from the front buffer. And we
never advertised EXCHANGE because we couldn't guarantee it. So, if you
actually used this extension to try to reduce app redraws of the back
buffer, you might actually increase the bandwidth you used. Whoops.
Instead, GLX_EXT_buffer_age and the similar EGL extension give you
feedback on what's left in your back buffer, letting you do minimum
redraws.
This reduces our GLX visual+fbconfig count from 1410 to 940 on an llvmpipe
X server. Reducing visual counts will improve test runtime for
visual-iterating tests like piglit's glx-visuals-*.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25650 >
2023-10-20 10:03:43 +00:00
Leandro Ribeiro
4d953efc28
dri: add queryCompatibleRenderOnlyDeviceFd() to __DRI_MESA extension
...
With this change we are able to query the render node fd of a
render-only device compatible with a given KMS-only device (at the
egl/dri2 level).
It uses pipe_loader_get_compatible_render_capable_device_fd(), which was
added in commit "pipe-loader: add
pipe_loader_get_compatible_render_capable_device_fd()".
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24825 >
2023-10-17 20:31:13 +00:00
Rob Clark
d0c81e12f3
mesa: Introduce MESA_texture_const_bandwidth
...
A simple extension that builds on EXT_memory_object to allow the
application to request that constant bandwidth (non-data-dependent)
tiling layouts be used for a specified texture.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464 >
2023-10-14 17:28:28 +00:00
Eric Engestrom
e41bc40571
include/dri_interface.h: restore define mistakenly removed in !25587
...
This file is a public API used by Xserver; removing something from it
means Xserver can't build anymore, and even if we fix Xserver, old
versions are still around and we want to keep them working to allow for
bisecting issues.
Fixes: 7301914755 ("dri: Remove __driDriverExtensions leftovers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9976
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25692 >
2023-10-13 06:11:02 +00:00
Roman Stratiienko
7301914755
dri: Remove __driDriverExtensions leftovers
...
Android-14/clang-17 throws an error with it:
ld.lld: error: version script assignment of 'global' to symbol
'__driDriverExtensions' failed: symbol not defined
Fixes: d43e6a9a49 ("dri: Remove the megadriver compat stub")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25587 >
2023-10-10 16:39:27 +00:00
Sylvain Munaut
798a7ef698
include: Fix the PFN declarations to be pointers as they should
...
Broken by b5f9820d90 back in 2016.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com >
Acked-by: Antonio Gomes <antoniospg100@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24573 >
2023-08-19 01:08:29 +00:00
Daniel Stone
00aa095d53
dri: Support 1555/4444 formats
...
Add support for 1555 and 4444 formats, both in RGB/BGR ordering, with
and without alpha.
These are already supported by Gallium and drivers, but not yet for
winsys surfaces. Adding these is enough to make them renderable when
using Weston on iris.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24331 >
2023-07-28 12:44:01 +01:00
Yonggang Luo
94d827332f
dri: Replace usage of boolean/TRUE/FALSE with bool/true/false
...
First do the find/replace in src/gallium/frontends/dri/ folder,
then fixes the compiling errors manually:
Because of this, the prototype of functions in include/GL/internal/dri_interface.h
are changed
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23582 >
2023-06-16 16:52:48 +00:00
Simon Ser
5b2d71ab88
Update OpenGL headers
...
Token from commit 91cdaf381d77b6e700654ecd78cb88a95c1fde1a of
OpenGL-Registry.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23144 >
2023-06-07 20:47:03 +00:00
Rob Clark
08ffa8e0d2
dri/android: Fix MSAA resolve
...
Commit f9a074dd55 ("dri2/android: Bypass throttling") dropped
unnecessary throtting in the SwapBuffers() path for android. But
unfortunately MSAA resolve got tangled up in the throttle reason
flag. So add a new flag that indicates "no throttingling, but yes
please do MSAA resolve".
Fixes: f9a074dd55 ("dri2/android: Bypass throttling")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22719 >
2023-04-27 19:05:44 +00:00
Adam Jackson
cc93f08f1e
glx: Remove dead declarations from <GL/glx.h>
...
MESA_swap_control is defined in glxext.h now. MESA_swap_frame_usage was
removed in Mesa 7.9 in 2010. The other two were never specified or
implemented.
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20300 >
2023-01-03 23:36:26 +00:00
Adam Jackson
ac02a860a1
include: Sync <GL/glxext.h> with Khronos
...
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20300 >
2023-01-03 23:36:26 +00:00
Emma Anholt
5ff8edaa2a
egl: Replace sRGB support check with a pscreen query.
...
This drops the remaining use of rendererQuery from EGL.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20171 >
2022-12-09 05:32:18 +00:00
Emma Anholt
a42feab5ae
egl+glx: Always support no_error contexts.
...
Since we know we're loading this Mesa build, we know that no_error is
always supported (the renderer query always returned true).
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069 >
2022-12-05 19:26:41 +00:00
Emma Anholt
895ec843d3
egl: Collapse a bunch of renderer queries into pipe cap queries.
...
Now that we can access the pipe screen through the dri_screen, we can skip
some indirection.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069 >
2022-12-05 19:26:41 +00:00
Emma Anholt
133e2f8ac3
dri: Add createContext hook to __DRI_MESA.
...
Again, reduces switching on driver type in the loader.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069 >
2022-12-05 19:26:41 +00:00
Emma Anholt
cdc7475f72
gallium/dri: Move the backendVtable InitScreen func into __DRI_MESA.
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069 >
2022-12-05 19:26:41 +00:00
Emma Anholt
4dd656e19a
dri: Add createNewScreen into the __DRI_MESA extension.
...
Now the loaders don't have to switch on dri2/dri3/swrast.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069 >
2022-12-05 19:26:41 +00:00
Emma Anholt
1026d29344
dri: Introduce internal Mesa DRI driver loader extension.
...
All DRI loaders in Mesa (EGL, GLX, gbm) now require this ext and that the
driver come from a matching build. This will let us use Mesa-internal
types and enums across the loader-driver bounary inside of Mesa.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Eric Engestrom <eric@igalia.com >
LOL-YESed-by: Kristian Høgsberg <krh@bitplanet.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20069 >
2022-12-05 19:26:41 +00:00
Emma Anholt
b695727cd3
dri: Add notes on what part of the loader interface are used by Xorg.
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20044 >
2022-12-01 09:17:30 +00:00
Marek Olšák
426f1cbea3
dri: move private __DRIDriverVtableExtension out of dri_interface.h
...
It's only used internally.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19741 >
2022-11-27 02:52:41 +00:00
Yonggang Luo
7b7bbe871c
mesa: sync GLAPIENTRY with KHRONOS_APIENTRY in GL/gl.h
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472 >
2022-11-03 16:07:31 +00:00
Yonggang Luo
147a491a74
mesa: BUILD_GL32 is not used anymore
...
Remove usage of BUILD_GL32 in GL/gl.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Brian Paul brianp@vmware.com
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472 >
2022-11-03 16:07:31 +00:00
Jesse Natalie
6ab615f183
include: Add driver data to v2 of mesa_glinterop_device_info
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242 >
2022-11-02 18:11:41 +00:00
Jesse Natalie
04d45eab34
include: Add a flush interop method
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242 >
2022-11-02 18:11:41 +00:00
Jesse Natalie
652d09d6ed
include: Add WGL version of GL interop extensions
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242 >
2022-11-02 18:11:41 +00:00
Lionel Landwerlin
9de1263842
egl: Add EGL_EXT_protected_content support
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8092 >
2022-10-27 10:53:18 +00:00
Lionel Landwerlin
62ac2cec85
dri: rename PROTECTED_CONTENT in PROTECTED_SURFACE
...
Better suiting to the associated extension EXT_protected_surface.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8092 >
2022-10-27 10:53:18 +00:00
Rob Clark
0c6d4cf9a2
gbm: Add USE_FRONT_RENDERING flag
...
Provide a use flag to let the driver know that the allocated buffer will
be used for frontbuffer rendering. For example, bandwidth compressed
formats should usually be avoided for frontbuffer rendering to avoid the
visual corruption that results from this display racing with the GPU
writing header data vs. pixel data.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17799 >
2022-08-05 00:57:38 +00:00
Manuel Stoeckl
7e554e11a1
dri: fix incorrect fourcc for R16G16B16A16_UNORM format
...
The DRM fourcc for this format is DRM_FORMAT_ABGR16161616 = 'AB48', not
__DRI_IMAGE_FOURCC_RGBA16161616 = 'RA48'. This should have no outward
effect for clients, since the format does not get revealed by
dri2_query_dma_buf_formats, and is otherwise only used within the
library.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580 >
2022-07-27 07:27:10 +00:00
Manuel Stoeckl
a5f1ebb9bb
dri_interface: add XBGR16161616 format
...
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580 >
2022-07-27 07:27:10 +00:00
Rob Clark
dfac374220
gallium/dri: Extend image extension to support in-fence
...
Extend dri so that an in-fence-fd can be plumbed through to driver.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15094 >
2022-03-04 22:16:20 +00:00