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
Alyssa Rosenzweig
9cfffc5e86
libagx: cleanup loop vars
...
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
Asahi Lina
01ef3152c9
agx: Fix implicit sync for virtgpu
...
The asahi kernel driver is a pure-explicit-sync driver and userspace is
required to handle implicit sync itself, by importing/exporting fences
in shared dma-bufs. Mesa handles this in its own native or guest
context, but dma-buf fences are not shared between the guest and the
host, so this breaks implicit sync across the VM boundary.
To make this work, explicitly pass a resource list to the host so it can
perform the implicit sync dance, like we do in agx_batch.c. This
essentially turns the virtgpu protocol into an implicit sync protocol
(like many other legacy GPU drivers), which makes sense here since we
don't particularly have the primitives to pass through and manage "host"
syncobjs that we'd need to do it at that level.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532 >
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
6f3c1c909b
hk: don't leak GS subparts in an error path
...
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
Alyssa Rosenzweig
568f0a81c6
hk: don't leak GS rast with rast disc
...
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
Alyssa Rosenzweig
2dbd6c440f
hk: don't leak NIR with VS/GS
...
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
Alyssa Rosenzweig
332a97cc34
hk: free large_bos
...
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
Alyssa Rosenzweig
cd66a6813b
agx: plumb COHERENT
...
set the magic caching bits. this fixes memory model fails on g13d.
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
Alyssa Rosenzweig
d4e34bc829
agx: pull out the big hammers for device-barriers
...
g13d.
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
Alyssa Rosenzweig
f67db39aef
hk: lower memory model
...
we don't know how to flush caches on g13d and we don't want to try either.
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
Alyssa Rosenzweig
0ac160e1c4
hk: ban compression with feedback loops
...
affects dEQP-VK.pipeline.monolithic.attachment_feedback_loop_layout.sampler.sampled_image.image_type.2d.format.d16_unorm_depth_read_write_different_areas
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
Alyssa Rosenzweig
2f2effcb7e
hk: fix attachmentless multisampling tile sizes
...
fixes dEQP-VK.pipeline.monolithic.framebuffer_attachment.no_attachments_ms on
g14c. it's unclear to me how this passed on g13g, though.
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
Alyssa Rosenzweig
2f0935459f
asahi: add tib sample setter helper
...
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
Alyssa Rosenzweig
f3a407344d
hk: quiet gcc warning
...
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
Alyssa Rosenzweig
57aabdb159
hk: drop bad comment
...
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
Alyssa Rosenzweig
a830037638
hk: drop some dead code
...
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
Alyssa Rosenzweig
3e8b8fadb0
hk: switch to vk_meta for buffer copies
...
no reason not to.
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
Alyssa Rosenzweig
6604fc8d88
hk: advertise modifiers
...
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
Alyssa Rosenzweig
52fcd0412a
hk: disable mods on funny float formats
...
Honeykrisp version of b78a691ce2 ("nil,nvk: Disable modifiers for
B10G11R11_UFLOAT and E5B9G9R9_UFLOAT").
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
Alyssa Rosenzweig
3a3a0c97f6
hk: handle compression modifiers
...
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
Alyssa Rosenzweig
4ddfc1cfdd
ail: pull in DRM modifier helper
...
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
Alyssa Rosenzweig
b01d53d95a
hk: add missing dep
...
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