Alyssa Rosenzweig
bec61b72b1
agx: clang-fmt
...
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
5948e7ec2e
agx: unit test split uniform opt
...
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
ab7fb3d400
asahi: don't canonicalize nans/flush denorms when copying
...
CL image copies
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
5cd7416542
asahi: fallback some resource copies
...
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
355af1e903
agx: require min alignment for load/store vectorize
...
fixes test_basic vload_constant
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
96cd467559
agx: add unit test for pcopy lowering bug
...
hit by test_basic.local_kernel_scope
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
5b50040c51
agx: fix 64-bit phis with inlined immediates
...
test_basic local_kernel_scope
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
1f0abffdaf
agx: expand agx_index
...
cl kernels can be large.
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
51f8bded0e
agx: optimize split(64-bit uniform)
...
Trying to clean up CL.
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
344ec42587
asahi: add missing tib alignment check
...
+ unit test replicating issue.
Fixes arb_sample_shading-builtin-gl-sample-mask-mrt-alpha-to-coverage
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
dd42bf84a3
asahi: fix passthrough GS with poly modes
...
affects wireframe xfb piglits.
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
10d48979ce
asahi: make txf robust properly
...
KHR-NoContext.gl43.robust_buffer_access_behavior.texel_fetch
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
f6d5832b6c
asahi: plumb get_ubo_size
...
for robustness lowering.
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
21aaba5b83
asahi: inline something silly
...
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
27e3e88f18
asahi: rotate xfb'd tri strips
...
spec req.
GTF-GL46.gtf30.GL3Tests.transform_feedback.transform_feedback_geometry
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
f70da4e920
asahi: factor out libagx_map_vertex_in_tri_strip
...
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
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