Janne Grunau
2cceacdb8e
asahi: Fix typo in arch check in agx_get_gpu_timestamp
...
Signed-off-by: Janne Grunau <janne-fdr@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
4ff78407f7
asahi: Sync heap size
...
Hot fix... gpu alloc needs bigger reworks but that's probably not going to
happen until tess is done & we can see the whole picture.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
afb60d7707
asahi: fix index bias with GS/XFB
...
noticed when bringing up mdi.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Asahi Lina
45ef977481
asahi: Add extra barrier for texture atomics on G13X
...
Found experimentally. Fixes
KHR-GLES31.core.texture_buffer.texture_buffer_atomic_functions on G13D.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Asahi Lina
376c2697dc
asahi: Add more memory barrier opcodes
...
These are used by the helper program, and at least one experimentally
fixes texture atomics on G13X.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
c507f4a330
asahi: Identify bicubic filtering mode
...
Officially undocumented but supported by MSL.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
58d6374b4c
asahi: Identify Primitive ID frag input
...
With a name from powervr :)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
0cb6a993a8
asahi: Add XML for hw tessellation
...
AFAICT, there's no way to use this with...
* transform feedback
* geometry shaders
* isolines
* points mode
...so it's not terribly useful to us. But worth knowing it exists.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
2c328f4f8a
asahi: Add half float type to genxml
...
Used with the tessellator.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
033bb91468
asahi/decode: Decode multiple macOS commands
...
We get a CDM+VDM pair for OpenGL tess, decode them all for better r/e.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Asahi Lina
c20210c643
asahi: Fix CDM Launch/Barrier naming
...
"Launch" is actually just a barrier, and it seems likely to use the same
bit assignments as in VDM...
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
412922ed73
agx: Hotfix for stack_adjust in GS
...
Spurious, turn this off for now, it's inert rn anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614 >
2023-12-09 10:56:17 -04:00
Alessandro Astone
4f48a140ac
asahi: Use the compat version of qsort_r
...
Not all platforms define qsort_r, util_qsort_r takes care of that.
CC: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25553 >
2023-11-29 17:01:09 +00:00
Alyssa Rosenzweig
d5e0901fd5
agx: fix 1D texture sampling
...
fixes texwrap 1d bordercolor cases.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26377 >
2023-11-28 20:32:03 +00:00
Daniel Schürmann
1179d83a89
nir: remove info.fs.needs_all_helper_invocations
...
Use info.uses_wide_subgroup_intrinsics instead.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026 >
2023-11-22 11:31:11 +01:00
Alyssa Rosenzweig
ea6502d7cc
asahi: Implement ARB_base_instance
...
Now that load_base_instance is wired up (as part of the indirect GS
implementation), this is really easy. Validated with Piglit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
643428bd7f
agx: Emit stack_adjust in the entrypoint
...
Allocate space to fit scratch space.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
a5cdc86da0
agx: Add stack adjust opcode
...
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
588fd6dfd6
agx: Implement scratch load/store
...
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
c15115de6b
agx: Add stack load and store opcodes
...
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
49225db140
asahi: Implement timer queries
...
Everything but the uapi piece.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
bc8232c4a2
asahi: clc: Handle doorbell and stack mapping intrinsics
...
Also move nir_interleave_agx definition to libagx.h
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
514d432e50
agx: Handle doorbell and stack mapping intrinsics
...
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Mary Guillemard
ee0e7b8347
agx: Add doorbell and stack mapping opcodes
...
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
fdb995c204
asahi: Don't use OpenGL clip bit
...
This lets us implement clip control.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
695aef7f5a
asahi: rm unused deqp debug flag
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
c6a118b654
asahi: Wire up geometry shaders
...
- Compile GS with linked VS and auxiliary programs
- Dispatch GS as compute programs + an indirect draw with the GS copy program
- Use passthrough GS to implement XFB, replacing old XFB impl.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
fe7650bcf7
asahi: Add GS lowering pass
...
The big monster.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
43e134b106
asahi: Add helpers for lowering GS
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
6a67e220b8
asahi: Add data structures for geometry shaders
...
Shared between GPU and CPU.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
df2c145c91
agx: Handle bindless samplers
...
Unified encoding.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
ca42562c7f
agx: Lower LOD bias earlier
...
To make the extra descriptor accesses explicit for drivers.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
111e526f19
agx: Allow drivers to lower texture handles
...
Rather than hardcoding u0_u1, this lets drivers map texture handles in whatever
way is convenient. In particular, this makes textures work properly with merged
shader stages (provided one of the stages is forced to use bindless access), by
giving each stage an independent texture heap.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
a74fbb3840
agx: Translate simple subgroup ops
...
We'll use these for optimizing parallel prefix sums.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
77bb446e90
agx: Add scaffolding for subgroup ops
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
5b754410da
agx: Require 32-bit alignment for EOT offset
...
Fixes piles of brokenness.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
7d7f5013f8
agx: Cleanup 8-bit math before lowering
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
b18181d924
agx: Check for spilling in release builds
...
Don't smash stack -- explain to the user what happened.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Alyssa Rosenzweig
7b92c63105
agx: Fix fragment side effects scheduling
...
We can't move discards across side effects, or the side effect might not happen.
Fixes KHR-GLES31.core.shader_image_load_store.basic-allFormats-load-fs
regression. Sigh.
CI is up next.
Fixes: 119e5b9719 ("agx: Schedule for register pressure")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:55 +00:00
Christian Gmeiner
e928f45735
agx: Re-index nir defs to reduce memory usage
...
nir_index_ssa_defs(..) will re-index the function impl and will
update ssa_alloc. In almost all cases this will result in a lower
ctx->alloc number which reduces memory usage in compiler passes
that are using ctx-alloc to allocate memory.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:54 +00:00
Alyssa Rosenzweig
b6b01aa1f2
agx: Legalize image MS index
...
Fix 2D MSAA Array tests in arb_shader_image_load_store-max-size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:54 +00:00
Alyssa Rosenzweig
019a52fff0
asahi: Clamp 8-bit integer RTs
...
Fixes gl-3.0-render-integer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056 >
2023-11-07 00:05:54 +00:00
Alyssa Rosenzweig
0038f95b66
asahi: Fix tools=all builds
...
don't need clc here.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26017 >
2023-11-02 18:51:57 -04:00
Alyssa Rosenzweig
570ed11303
asahi: Remove placeholder shader
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
2c54372760
agx: Use CL for texture lowerings
...
To demonstrate everything working, and the value of this approach.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
8ef7eec246
asahi: Add software-defined field to texture desc
...
We use this for buffer textures.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
eecd8390d0
asahi,agx: Plumb libagx
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
0be124b77e
asahi: Deserialize libagx when opening device
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
cde7ca1683
asahi: Add asahi_clc infrastructure
...
Based on intel_clc, tuned for libraries. Targets serialized NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00
Alyssa Rosenzweig
a02e463484
asahi: Add folder for internal shaders
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498 >
2023-11-02 11:37:47 +00:00