Alyssa Rosenzweig
e0b83ecaa6
hk: drop dead
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
196fcb9d3c
hk: fix tess with notess
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f39d1bc945
agx: add unit test for tricky backwards phi case
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
93f2398685
agx: fix backwards copyprop with phis
...
Fixes issue in Control.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
bef3655d06
agx: expand macro
...
nfc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
372580086e
hk: bump max input/output components
...
apparently webgpu wants this
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Mary Guillemard
b130a129de
hk: Implement global priority extensions
...
This wires other priorities than medium and exposes
VK_EXT_global_priority / VK_EXT_global_priority_query.
Signed-off-by: Mary Guillemard <mary@mary.zone >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
8b3e8106c3
agx: don't propagate constants from trivial phis
...
fixes a pack assert.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
7ab777a959
agx: print pack assertions to stderr
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
eff48b9826
agx: fix shuffling with large reserved region
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f14d5b5fd8
agx: don't reserve regs if we won't use them
...
reduces live range splitting in the remat-only case. this could still be
improved.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
c500242b90
agx: fix corner case scratch allocation
...
if we call into the spiller but it rematerializes enough to eliminate all
spilling, we don't need to allocate any scratch. correct our accounting for this
case to avoid the allocation.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
ea856ccec0
agx: quiesche assert with r1l preload
...
fixes spilling in sample shaded frag shaders. this depends on the ABI
change in the last commit to be valid in the presence of subgroup ops.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
7faca2220c
asahi: move sample mask to r1l
...
r0h is used for subgroup shuffles already.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
702c038b91
asahi: #define the ABI
...
This is a lot more readable, and lets us adjust the ABI in a central place
(except the README..)
No functional change
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
edc8ef7412
agx: use reserved_size
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
3d48658fe3
agx: split up optimizer
...
validate in the middle
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
5abdce5af5
agx: add pass manager
...
validate more often, like NIR does.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
3a25c1241b
agx: validate sizes are consistent in the IR
...
subtle correctness requirement for the spiller.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
981ff77431
agx: validate phi sources are defined
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f9201eb7d3
asahi,hk: fix st_tile mask size
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
ad48cd2759
asahi: fix AGX_MAX_OCCLUSION_QUERIES
...
it's 256kb / 8 = 32k
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
225797601b
asahi/genxml: add nicer error checking
...
avoids digging into backtraces for basic info. lot of bang for buck here.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
3a0e152de2
agx: add helper to visualize reg file
...
I used to do these by hand. Example print:
---- ---- 1... .... 22.1 4444 2222 2222 2222 2222
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
4f5637c873
agx: fix RA shuffling algorithm
...
to guarantee that we find a shuffle, we need to shuffle in descending order of
alignment. this ensures we don't refragment the part of the register file we're
attempting to defragment. rewrite the shuffle code accodingly, using a worklist
that picks a largest variable to shuffle at each iteration.
fixes crashes with =spill.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
fb3e11ac1a
agx: factor out reserved_region
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
0bd23366b1
agx: use padding helper
...
avoids data type splat
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
5bb99b1104
agx: add helper to pad 16-bit to 32-bit
...
this is a bit tricky to get right
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
92d7ecb98c
agx: fix spilling around exports
...
need to hoist the reloads.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
eae4c50be9
agx: add spilling debug helpers
...
I keep typing these
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
8f6ba21627
hk: fix =spill with tess
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
4ca52cde7a
agx: increase lower vars to scratch thresh
...
should reduce silliness.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
fde518e3f3
asahi: add nosoft debug
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
665be681ad
asahi: add tess assert
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
8f3caec5dc
agx: handle hw tess eval shaders
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
b621b8e3dd
asahi: optimize trivial load_invocation_id
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
049808630e
asahi,hk: disable rgb32 buffer textures
...
gl weirdness.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
b586c294fc
asahi: fix speculation of rgb32 loads
...
kinda silly but hey.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
8b8c724b9e
asahi/lower_vbo: optimize robustness2
...
with softfault
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
9b3216f61b
agx: clean up packs from bounds check
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
5b86a55f10
agx: optimize robust access
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
37aeeff9a6
hk: smarten bounds check lowering
...
optimize 1 case and use bounds_agx so the compiler can optimize the other.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
0376c1930b
hk: clean up before lowering bounds checks
...
for next patch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
6287346482
agx: handle bounds_agx
...
fallback when optimization fails.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
802c30beab
hk: use 0 pointer for 0-sized buffers
...
allows eliding bounds checks
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
675b876b8c
asahi: carveout lower VAs
...
for cheaper bounds checks.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
6287c8251d
nir: add bounds_agx opcode
...
used to facilitate bounds checking optimization
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
b1e5e73011
hk: run opt_access
...
saves a barrier in a CTS test.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
ad8f005ecb
hk: parallelize after-graphics available sets
...
reduces cdm overhead.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
a2edffad2f
hk: assert batches are nonempty
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:11 +00:00