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
Alyssa Rosenzweig
0d5b76113e
hk: optimize out empty VDM batches
...
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
a01a010255
hk: optimize empty tiles
...
setting ASAHI_RENDER_PROCESS_EMPTY_TILES is very expensive, so do it less.
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
291dd9c3d5
hk: soup up =perf
...
Lots and lots more slow paths annotated, plus statistics.
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
f7d3cd0a3e
hk: add noborder perf 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
f7c1097e7b
hk: add notess perftest
...
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
3d1d1baa07
hk: mutex shader compiles when debugging
...
make the prints readable.
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
d0a3856771
hk: clarify spilling
...
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
a1d0f1dc4b
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:11 +00:00
Alyssa Rosenzweig
0322ccda4c
hk: fix phi ordering
...
undefined argument order means phis are busted. fixes crash starting castle
crashers with an i386 gcc build of hk.
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
c69fd49728
hk: fix oq availability set
...
by inspection.
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
dfafe5267e
hk: fix vertex clustering
...
this fixes fails in
dEQP-VK.memory.pipeline_barrier.host_write_vertex_buffer.1048576_vertex_buffer_stride_2
with clustering. I have no idea why. Not questioning it.
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
cdf7eb21dc
hk: fix loop submit with NONE
...
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
aafd78830b
hk: shush gcc warning
...
it's bogus but whatever.
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
dee089e9c2
hk: fix ptr cast
...
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
9fab9c8979
hk: fix debug cache key
...
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
75639cf4e5
hk: quiesce gcc uninitialized var warning
...
it's bogus, but shrug.
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
fe75c95204
hk: fix weird formatting
...
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
169acb1170
agx: clarify spill lowering math
...
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
e16ad50bfa
agx: allocate scratch in spilling unit test
...
for assertion
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
2600224f77
agx: clarify scratch size units
...
bytes, not words.
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