mesa/src/asahi/lib
Alyssa Rosenzweig ece3896d5b asahi: add broken bits of unstable Linux UAPI
Rebasing around this patch has been a significant burden for development.
Staging patches to asahi/mesa helps somewhat but 1. it's still really
frustrating to have this much divergence with upstream, and 2. ideally we
wouldn't have to do that.

The kernel upstreaming is stalled for various reasons.  This patch adds
compile-only code to speak the unstable Linux UAPI for the SOLE purpose of
reducing my rebase pain... NOT to actually work.

It is NOT for users OR distro maintainers. asahi will refuse to probe on
upstream Mesa to protect against regressions. The uapi is NOT STABLE and
upstream Mesa CANNOT be used with it. Attempting to bypass this WILL give you a
broken system.

This patch employs several layers of deterrents against system-breaking
enablement. With a lot of warning text at the relevant sites.  Hopefully that is
good enough to prevent people from breaking systems. And if people brazenly
ignore all of the above ... they get to pick up the pieces.

You have been warned.

---

There is significant prior art for Mesa including downstream kernel uapi
supports in-tree:

* powervr (downstream android driver)
* turnip (downstream kgsl android driver)
* asahi ... ironically (prop macOS kernel driver)
* maybe vc4?

Linux is only special because of distros shipping tagged Mesa releases. The
several layers of guards here guarantee that no tagged Mesa release would
possibly probe even on an asahi downstream kernel. A distro would need a
significant scary patch to make it probe. If/when it breaks, that's on them
and they pick up the pieces.

I make a stability guarantee ONLY for Fedora Asahi Remix -- where we push
packages for both a downstream kernel and Mesa in tandem, while we patiently
wait for upstreaming -- and that is *it*. It will be a nice future when this all
works upstream, but unfortunately we're not there yet.

Acked by Dave [1] and Sima [2]

[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29620#note_2444189
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29620#note_2445155

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Co-developed-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Asahi Lina <lina@asahilina.net>
Co-developed-by: Sergio Lopez <slp@sinrega.org>
Signed-off-by: Sergio Lopez <slp@sinrega.org>
Co-developed-by: i509VCB <git@i509.me>
Signed-off-by: i509VCB <git@i509.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29620>
2024-06-14 15:44:30 +00:00
..
shaders asahi: split param structs for GS internal kernel 2024-06-07 16:57:03 +00:00
tests
agx_bg_eot.c agx: handle discard with force early tests 2024-06-07 16:57:03 +00:00
agx_bg_eot.h
agx_bo.c asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_bo.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_border.c
agx_device.c asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_device.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_device_virtio.c asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_device_virtio.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_formats.c
agx_formats.h
agx_helpers.h asahi: extract agx_calculate_vbo_clamp 2024-06-07 16:57:03 +00:00
agx_iokit.h
agx_linker.c
agx_linker.h asahi: pack blend key 2024-06-07 16:57:03 +00:00
agx_nir_format_helpers.h
agx_nir_lower_alpha.c
agx_nir_lower_gs.c asahi: use scalar outputs for rast shaders 2024-06-07 16:57:03 +00:00
agx_nir_lower_gs.h
agx_nir_lower_ia.c
agx_nir_lower_msaa.c
agx_nir_lower_sample_intrinsics.c agx: prepare for lower_wpos_center 2024-06-07 16:57:03 +00:00
agx_nir_lower_tess.c
agx_nir_lower_texture.c asahi: use nir_build_texture_query 2024-06-11 13:10:22 +00:00
agx_nir_lower_tilebuffer.c agx: handle discard with force early tests 2024-06-07 16:57:03 +00:00
agx_nir_lower_uvs.c agx: switch to combined clip/cull 2024-06-07 16:57:03 +00:00
agx_nir_lower_vbo.c
agx_nir_lower_vbo.h
agx_nir_passes.h asahi: add AGX_TEXTURE_FLAG_CLAMP_TO_0 flag 2024-06-07 16:57:03 +00:00
agx_nir_prolog_epilog.c asahi: pack blend key 2024-06-07 16:57:03 +00:00
agx_ppp.h
agx_scratch.c
agx_scratch.h
agx_tilebuffer.c
agx_tilebuffer.h asahi: add flag controlling sample mask without MSAA 2024-06-07 16:57:03 +00:00
agx_usc.h
agx_uvs.h
asahi_proto.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
decode.c asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
decode.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
dyld_interpose.h
meson.build asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
pool.c
pool.h
unstable_asahi_drm.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
wrap.c