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 asahi: add missing tib alignment check 2024-01-10 08:44:38 -04:00
agx_bg_eot.c agx: handle discard with force early tests 2024-06-07 16:57:03 +00:00
agx_bg_eot.h asahi: rename meta -> bg/eot 2024-05-16 13:25:56 -04:00
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 asahi: Implement custom border colours 2023-02-04 10:37:02 -05:00
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 asahi: add missing rgba4 format 2024-05-14 04:57:26 +00:00
agx_formats.h asahi: clean up format table renderability 2024-02-14 21:02:32 +00:00
agx_helpers.h asahi: extract agx_calculate_vbo_clamp 2024-06-07 16:57:03 +00:00
agx_iokit.h asahi/lib: use #pragma once 2024-02-14 21:02:32 +00:00
agx_linker.c asahi: don't ralloc in agx_fast_link 2024-05-14 04:57:27 +00:00
agx_linker.h asahi: pack blend key 2024-06-07 16:57:03 +00:00
agx_nir_format_helpers.h asahi/lib: use #pragma once 2024-02-14 21:02:32 +00:00
agx_nir_lower_alpha.c asahi: return progress from passes 2024-01-12 01:13:03 +00:00
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 asahi: mv vertex_id_for_topology_class into GS lowering 2024-05-14 04:57:26 +00:00
agx_nir_lower_ia.c asahi: mv vertex_id_for_topology_class into GS lowering 2024-05-14 04:57:26 +00:00
agx_nir_lower_msaa.c asahi: switch to VS/FS prolog/epilog system 2024-03-30 00:26:20 +00:00
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 asahi: set src_type for store_output 2024-05-14 04:57:26 +00:00
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 asahi: rework VBO lower for divisor=0 2024-05-14 04:57:26 +00:00
agx_nir_lower_vbo.h asahi: rework VBO lower for divisor=0 2024-05-14 04:57:26 +00:00
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 asahi: split frag shader words 2024-05-16 13:25:56 -04:00
agx_scratch.c asahi: precompile helper program 2024-02-14 21:02:32 +00:00
agx_scratch.h asahi/lib: use #pragma once 2024-02-14 21:02:32 +00:00
agx_tilebuffer.c asahi: pack tilebuffer usc word ahead-of-time 2024-05-14 04:57:26 +00:00
agx_tilebuffer.h asahi: add flag controlling sample mask without MSAA 2024-06-07 16:57:03 +00:00
agx_usc.h asahi: don't allocate for USC words 2024-05-16 13:25:56 -04:00
agx_uvs.h asahi: extend varying linking for tri fan weirdness 2024-05-14 04:57:27 +00:00
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 asahi: Clang-format the subtree 2022-12-27 22:46:29 +00:00
meson.build asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
pool.c asahi: Convert to SPDX headers 2023-03-28 05:14:00 +00:00
pool.h asahi: split out genxml/ directory 2024-02-14 21:02:32 +00:00
unstable_asahi_drm.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
wrap.c asahi/decode: Decode multiple macOS commands 2023-12-09 10:56:17 -04:00