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
Alyssa Rosenzweig
d21bc62f4d
agx: fix =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:11 +00:00
Alyssa Rosenzweig
4e3a5f0e60
agx: fix spilling in i686 builds
...
../src/asahi/compiler/agx_pack.c: In function ‘agx_pack_instr’:
../src/asahi/compiler/agx_pack.c:1074:38: warning: left shift count >= width of type [-Wshift-count-overflow]
1074 | ((uint64_t)q4 << 42) | (1UL << 47) | // XXX
| ^~
../src/asahi/compiler/agx_pack.c:1110:43: warning: left shift count >= width of type [-Wshift-count-overflow]
1110 | ((uint64_t)i5 << 44) | (L ? (1UL << 47) : 0) |
| ^~
../src/asahi/compiler/agx_pack.c:1131:64: warning: left shift count >= width of type [-Wshift-count-overflow]
1131 | ((uint64_t)((I->stack_size >> 4) & 0xF) << 32) | (1UL << 47) | // XXX
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
8f9cf43828
asahi/virtio: fix allocate-with-alignment
...
fixes crashes when spilling inside the microVM:
../src/asahi/lib/agx_scratch.c:176: void agx_scratch_realloc(struct agx_scratch *): Assertion `!(blocks_gpu & (block_size_bytes - 1))' failed
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
e0cda48a90
asahi/virtio: fix ptr cats
...
../src/asahi/lib/decode.c:933:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
933 | (void *)c->vertex_attachments;
| ^
../src/asahi/lib/decode.c:941:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
941 | (void *)c->fragment_attachments;
etc
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
9bd3a854e6
asahi/decode: fix ptr casts
...
../src/asahi/lib/decode.c:933:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
933 | (void *)c->vertex_attachments;
| ^
../src/asahi/lib/decode.c:941:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
941 | (void *)c->fragment_attachments;
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
88a0da6b7c
asahi: identify factor buffer 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:11 +00:00
Alyssa Rosenzweig
bbad4454bf
asahi: fix UB affecting x86 builds
...
dEQP-VK.robustness.image_robustness.bind.notemplate.r32f.unroll.nonvolatile.sampled_image.no_fmt_qual.img.samples_1.2d_array.comp
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
673f56fcb1
libagx: drop unused arg
...
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
8d95f584da
libagx: simplify tcs out calc
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:10 +00:00