Alyssa Rosenzweig
9d78e40735
asahi: cl-ify some xfb logic
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
76e8a68249
asahi: link libagx before lowering mem access widths
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
c688db1fd7
asahi: add missing GS line strip (+adj) handling
...
How did this pass GLES CTS?!
GTF-GL46.gtf31.GL3Tests.primitive_restart.primitive_restart_mode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
ed05cfb674
asahi: disable fp16 cbuf cap
...
GTF-GL46.gtf21.GL2Tests.glGetUniform.glGetUniform
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
dd840eb501
asahi: divide by xfb stride for xfb draws
...
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
8ce71e5b88
asahi: invert program_point_size
...
make 0 the default value.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
5eae46d9ea
asahi: rm agx_vbufs wrapper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
9192d8367b
asahi: rm vbuf.count from key
...
Unused and causing piles of shader variants in STK. Yikes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
13603bedc7
asahi: rm blend->store from shader key
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
3f094e635f
asahi: rm nr_cbufs from key
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
d31d0af5c5
asahi: rm logicop enable bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
1bdf189393
asahi: rm unused blend enable bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
97f9f7ab0a
asahi: implement point sprites w/o shader key
...
we can replace varyings with point sprites, we just need to fix up .zw
appropriately. do that with some bcsels, ALU is cheap.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
ba0f28ad8b
asahi: rm layered bit from shader key
...
Just always use layered, like AGXV. This was a pointless bit of optimization
that only affects render target spilling with neglible impact.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
5931862c29
asahi: rm pointless multisample key bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
78614653a6
asahi: bump vertex shader outputs
...
KHR-Single-GL46.enhanced_layouts.xfb_explicit_location
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
a20c693b7f
agx: fix xfb of invalid var
...
KHR-Single-GL44.enhanced_layouts.xfb_capture_struct
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
e0c1776187
agx: fix xfb of invalid comp
...
KHR-Single-GL44.enhanced_layouts.xfb_capture_inactive_output_component
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
4071baf1b3
agx: const fold after discard lowering
...
to avoid silly xor op with an unconditional discard.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
1006e27627
asahi: implement xfb overflow queries
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
c4fd1abc8b
asahi: stub qbo on the cpu
...
allowed by spec, perf will suck of course.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
6deaaaa46a
asahi: rework compute emptiness tracking
...
from debugging tess.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
33229d4ace
agx: handle imm inlining into phis
...
allows better coalescing
total instructions in shared programs: 1881875 -> 1881745 (<.01%)
instructions in affected programs: 169787 -> 169657 (-0.08%)
helped: 288
HURT: 234
Instructions are helped.
total bytes in shared programs: 12332916 -> 12323788 (-0.07%)
bytes in affected programs: 1958846 -> 1949718 (-0.47%)
helped: 778
HURT: 108
Bytes are helped.
total halfregs in shared programs: 498490 -> 498126 (-0.07%)
halfregs in affected programs: 6960 -> 6596 (-5.23%)
helped: 102
HURT: 28
Halfregs are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
efeed6a6fc
agx: prepare for immediates in phis
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
b7585851d0
agx: allow phis with 16bit imms
...
could do 32-bit too..
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
d8391860d9
agx: use mov imm for pcopies
...
allows bigger imms. no shaderdb changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
6102c866d1
agx: use custom assert when packing
...
so it dumps out the context of what we're packing. much friendly for debug.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
b8c80c5e80
agx: mv agx_read/write_regs to validator
...
since agx_index::channels is now always correct.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
b7da198274
agx: trust in agx_index size
...
validated.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
75d911f0ee
agx: add index size helper
...
to replace the switches.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
8e938d48f5
agx: rm outdated comment
...
no more logical ends
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
a65f17bfea
agx: rm silly todo
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
7f1ec658e9
agx: validate post-RA
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
f0b8d933fc
agx: make vec widths explicit in IR
...
no functional changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Asahi Lina
caee8a3114
agx: Add scoreboarding to stack instructions
...
These are basically device loads/stores and behave similarly.
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/26963 >
2024-01-10 08:44:38 -04:00
Asahi Lina
f5ea767625
agx: Fix packing of stack map/unmap
...
We got the register indices wrong...
Signed-off-by: Asahi Lina <lina@asahilina.nt >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Alyssa Rosenzweig
5009e48748
agx: skip scoreboard bit in builder for !wait
...
it's supposed to be set late, not at build-time.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:38 -04:00
Asahi Lina
7fff5a128b
asahi: Implement BO alignment
...
The stack/scratch blocks need to be aligned to greater than the page
size in some cases. Add support for allocating BOs with a given
alignment in GPU VA space.
To avoid having to touch all callers, this adds a new function
agx_bo_create_aligned() for this purpose.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Asahi Lina
4dcb0d40d2
asahi: Add .editorconfig for CL files
...
These are formatted with 3-space indents like our C code, so tell
editors about it.
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
i509VCB
d30b0adddb
agx: remove internal agx_device queue
...
The internal queue is unusued by agxv. An earlier commit changed the gallium driver to initialize it's own queue.
Signed-off-by: i509VCB <git@i509.me >
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
i509VCB
8f52e72686
asahi: create queue for screen
...
Signed-off-by: i509VCB <git@i509.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
43fc09a0d8
agx: implement query_levels
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
65789854c5
agx: lower votes to ballots
...
not optimal but passes the tests.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
c037fa376d
agx: wire up some ballots
...
lots of possibly optimizations but that's for another day
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
93d15c2bd2
agx: optimize fcmp like fcmpsel
...
total instructions in shared programs: 1810310 -> 1807236 (-0.17%)
instructions in affected programs: 269043 -> 265969 (-1.14%)
helped: 1553
HURT: 17
Instructions are helped.
total bytes in shared programs: 11851492 -> 11834830 (-0.14%)
bytes in affected programs: 1786394 -> 1769732 (-0.93%)
helped: 1540
HURT: 37
Bytes are helped.
total halfregs in shared programs: 474698 -> 474333 (-0.08%)
halfregs in affected programs: 6239 -> 5874 (-5.85%)
helped: 146
HURT: 22
Inconclusive result (%-change mean confidence interval includes 0).
total threads in shared programs: 19012032 -> 19012096 (<.01%)
threads in affected programs: 768 -> 832 (8.33%)
helped: 1
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
61944b23cf
asahi: fix max tex sizes
...
per https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
4690ecd15f
asahi: fix set_sampler_views
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
210c6931ff
agx: fix early-z + discard together
...
don't trigger tests twice.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
eab145e223
agx: use more mem->tex barriers even on g13g
...
fixes KHR-GLES31.core.texture_buffer.texture_buffer_atomic_functions
with bigger subgroups on g13g.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00
Alyssa Rosenzweig
2aa82f7fd3
asahi: disable compute-based blitter for now
...
works great on g13g but hoses g13x. needs investigation.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963 >
2024-01-10 08:44:37 -04:00