Alyssa Rosenzweig
21c16fe343
asahi,hk: wire up printf, abort
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529 >
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
bfe1fd737b
asahi: allow c23 extensions
...
hk already does. this quiesches warnings with single argument static_assert
which we want for CL parity.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529 >
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
3f5086016b
hk: implement timestamps
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
55cd987de2
asahi: fix agxdecode memory mapping
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:47 +00:00
Asahi Lina
fbb38a30a6
asahi: Add timestamp buffer ops
...
TODO: virt support (needs virglrenderer changes & virt ABI break)
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Asahi Lina
6697fb26ed
asahi: UAPI update to add support for user timestamp buffers
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
751bd986fb
asahi: add =bodump debug help
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f98971e776
asahi,hk: mmap BO on first use
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
e7b3dcb9f7
asahi: label individual pools
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d49f0786c8
asahi: fix page size alignment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
59b0dd7c64
asahi: drop dead
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Asahi Lina
07e836b932
asahi: Fix agx_gpu_time_to_ns & implement DRM_ASAHI_GET_TIME
...
agx_gpu_time_to_ns() was broken since it was overflowing the u64
timestamp after just ~10 minutes. Fix that by automatically computing a
reduced conversion fraction, and add support for DRM_ASAHI_GET_TIME
where supported (replacing the CPU timer hack).
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Asahi Lina
925eca02c4
asahi: UAPI update to add GET_TIME & cleanup
...
Also fix editor config for this file & disable clang-format, to make
syncing with the kernel easier.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
1ac82c8d24
asahi: drop dead pool stuff
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f4a3ba5302
asahi,vtn: precompile kernels
...
switch libagx to the precompilation pipeline. see the big comment in the
previous commit for why we're doing this.
while doing so, we move some dispatch stuff. there was so much churn from
precompile that this avoids doing the churn twice. that new header will be used
for DGC down the road.
there's also a small vtn/bindgen patch in here to skip bindgen'ing entrypoints,
as that conflicts with the new dispatch macros. this is the sane behaviour, we
just need to do the full precomp switch across the tree at once.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32339 >
2024-11-28 17:34:12 +00:00
Alyssa Rosenzweig
0755b6d3d5
asahi: add XML for cdm stream link with return
...
I don't know of any case of Apple's driver using this, but it seems to work. The
stream link bit is identical to VDM so that was easy, the tricky part was the
return but I bruteforced the encoding space and this is the (only) thing that
worked. So add the XML.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
aae0c1d5a8
asahi,hk: reenable rgb32 buffer textures
...
Apparently Direct3D has this. Boo :'(
This reverts commit 049808630e .
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
e99418919c
asahi/clc: drop getopt
...
I don't think it's buying us anything anymore.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
a1fe60fd98
asahi/decode: disasm 3D helper progs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
b001d68c69
asahi: drop desc align alloc
...
might bring it back later idk we'll see.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
ae8e45e19c
asahi,agx: move texture lowering into the compiler
...
this untangles things for precomp.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
2c17df7010
asahi: drop dead ACCESS
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
6aad96f6cd
libagx: move out of lib/
...
make the hierarchy saner.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
41958cfc73
libagx: switch to vtn_bindgen
...
this splits out our headers properly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226 >
2024-11-22 23:04:17 +00:00
Alyssa Rosenzweig
b94d640ba0
agx: make needs_g13x_coherency a tri-state
...
If we know the shader doesn't use global atomics, we don't care if the target
has this quirk or not and we can produce a single binary for all G13/G14
hardware. Model that in the shader key.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32224 >
2024-11-20 16:10:11 +00:00
Asahi Lina
81546c769e
asahi: Use 64bit size fields
...
This allows for BOs >4G.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
63dd4c13d0
asahi: move agx_gather_device_key
...
for precomp
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
b94bcf0318
asahi: fix a2c with sample shading, harder
...
Fixes: 9bbe93d158 ("hk: fix alpha-to-coverage with sample shading")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
beab5d2792
asahi: extract agx_get_num_cores
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
75d3c51e51
libagx: drop silliness in restart kernel
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
4660911cf9
libagx: fix unroll kernel constant qualifier
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2963cd900f
libagx: don't key unroll to index size
...
Probably a premature optimization, it's annoying for precomp and for DGC.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6030b204d5
libagx: simplify index patch expression
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
5e4e8df95a
libagx: drop Clockwise
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
0c0097ab34
libagx: vectorize triangle def'n
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c54fdde1a4
libagx: drop dead code
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d00a504cb0
libagx: drop branch
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
28a2844309
libagx: fix cl warning
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ddc6d9e984
agx: fix atomics in tess count shaders
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d466ccc6bd
libagx: promote math to use AGX address mode
...
we want to fit into the 64 + ext() << #n pattern to let us fuse address
arithmetic into our loads, so rework some libagx addressing to better match that
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964 >
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
4a931ec9eb
asahi/clc: ingest spir-v
...
use mesa_clc for the spir-v part, this improves incremental build granularity.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31923 >
2024-11-01 13:25:37 -07:00
Alyssa Rosenzweig
d6d66bf72d
asahi,agx: rework constant promotion upload
...
stuff promoted constants into the binary, this simplifies state management.
saves a big pile of alloc© in the gl driver. will unblock this for VK.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
b3ef0f5aa8
asahi: don't leak drm version
...
valgrind.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
e86a35dad2
libagx: always tessellate clockwise
...
easy enough to flip later in the pipeline instead and reduce significantly the
tessellator variants.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
87e6324459
libagx: make points mode dynamic
...
it's a cold enough path.
16 to 10 tessellator variants.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
a7843643c6
libagx: drop generated VDM tess path (for now?)
...
this was definitely the coolest thing I did in my career. but it has a lot of
drawbacks:
* complexity across the whole stack.
* perf #s even for synthetic tess workloads are... lackluster. couple % on
terraintess. and games tend not to be tess heavy (and if they are we're
screwed and this won't save us.) ironically, sascha willem's non-terrain tess
is sped up a ton by the prefix sum path, so.. lol?
* more brittle for (M3?) porting.
* makes it harder to make the tessellator common code.
* doesn't play nice with the indirect path.
* pile of extra tessellator variants.
* harder to test, coverage is already not great here.
so... drop it, for now. the code isn't gone, and the idea may come back in a
future iteration, perhaps based on mesh shaders. but in its current form I don't think it's worth keeping right now.
my main resevation is actually about heap usage from doubling the index buffer
size. hopefully this is tolerable in practice.
this gets us from 24 to 16 tessellator variants.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
02e29bdea4
libagx: don't rely on loop unroll in txs
...
silly, should reduce memory footprint.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
4607e0bf31
libagx: fix missing statics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
ddf2f2f5b1
hk: make tess partitioning dynamic
...
no discernible difference in perf in terraintessellation. reduces tessellator
variants from 72 to 24.
before:
SHADER-DB: - MESA_SHADER_COMPUTE shader: 2966 inst, 2310 alu, 2310 fscib, 1216 ic, 23148 bytes, 239 regs, 180 uniforms, 0 scratch, 384 threads, 17 loops, 0:0 spills:fills
after:
SHADER-DB: - MESA_SHADER_COMPUTE shader: 3011 inst, 2343 alu, 2343 fscib, 1264 ic, 23508 bytes, 235 regs, 188 uniforms, 0 scratch, 384 threads, 17 loops, 0:0 spills:fills
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
9bbe93d158
hk: fix alpha-to-coverage with sample shading
...
fixes sascha willem's deferredmultisampling.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908 >
2024-10-30 10:14:07 -04:00