Alyssa Rosenzweig
1f7598c202
hk: implement EXT_depth_bias_control
...
fixes Z24 depth bias with Proton
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
94160615ef
hk: handle mismatching colour vs z/s dimensions
...
hw doesn't really care. fixes test_mismatching_rtv_dsv_size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
628a119d82
hk: expose missing eds3 feature
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
0caf6e0440
hk: generalize internal launch
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
aae0c1d5a8
asahi,hk: reenable rgb32 buffer textures
...
Apparently Direct3D has this. Boo :'(
This reverts commit 049808630e .
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
02d4f49bcd
agx: gather workgroup size
...
deduplicate this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
f4bd5466ee
agx: vectorize scratch access
...
can help a lot for scratchy shaders. affected shader is a compute shader in
graphics bench.
total instructions in shared programs: 2751334 -> 2750950 (-0.01%)
instructions in affected programs: 4308 -> 3924 (-8.91%)
helped: 2
HURT: 0
total bytes in shared programs: 21482512 -> 21480592 (<.01%)
bytes in affected programs: 27448 -> 25528 (-7.00%)
helped: 2
HURT: 0
total fills in shared programs: 732 -> 540 (-26.23%)
fills in affected programs: 396 -> 204 (-48.48%)
helped: 2
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
e99418919c
asahi/clc: drop getopt
...
I don't think it's buying us anything anymore.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
a1fe60fd98
asahi/decode: disasm 3D helper progs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
b001d68c69
asahi: drop desc align alloc
...
might bring it back later idk we'll see.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
ae8e45e19c
asahi,agx: move texture lowering into the compiler
...
this untangles things for precomp.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
2c17df7010
asahi: drop dead ACCESS
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
c602832471
libagx: DCE
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
6aad96f6cd
libagx: move out of lib/
...
make the hierarchy saner.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
41958cfc73
libagx: switch to vtn_bindgen
...
this splits out our headers properly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226 >
2024-11-22 23:04:17 +00:00
Alyssa Rosenzweig
b94d640ba0
agx: make needs_g13x_coherency a tri-state
...
If we know the shader doesn't use global atomics, we don't care if the target
has this quirk or not and we can produce a single binary for all G13/G14
hardware. Model that in the shader key.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32224 >
2024-11-20 16:10:11 +00:00
Marek Olšák
25d4943481
nir: make use_interpolated_input_intrinsics a nir_lower_io parameter
...
This will need to be set to true when the GLSL linker lowers IO, which
can later be unlowered by st/mesa, and then drivers can lower it again
without load_interpolated_input. Therefore, it can't be a global
immutable option.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32229 >
2024-11-20 02:45:37 +00:00
Marek Olšák
8518e1cfd7
nir/opt_varyings: add nir_io_always_interpolate_convergent_fs_inputs
...
for Asahi
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174 >
2024-11-18 13:39:08 +00:00
Rhys Perry
45c1280d2c
nir_lower_mem_access_bit_sizes: pass access to callback
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904 >
2024-11-13 12:59:26 +00:00
Rhys Perry
61752152f7
nir_lower_mem_access_bit_sizes: add nir_mem_access_shift_method
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904 >
2024-11-13 12:59:26 +00:00
Asahi Lina
252e9a4cdf
hk: Bump up max buffer size
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Asahi Lina
81546c769e
asahi: Use 64bit size fields
...
This allows for BOs >4G.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
63dd4c13d0
asahi: move agx_gather_device_key
...
for precomp
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
b94bcf0318
asahi: fix a2c with sample shading, harder
...
Fixes: 9bbe93d158 ("hk: fix alpha-to-coverage with sample shading")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
beab5d2792
asahi: extract agx_get_num_cores
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
e145425746
agx: fuse also 8-bit address math
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
75d3c51e51
libagx: drop silliness in restart kernel
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
4660911cf9
libagx: fix unroll kernel constant qualifier
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2963cd900f
libagx: don't key unroll to index size
...
Probably a premature optimization, it's annoying for precomp and for DGC.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6030b204d5
libagx: simplify index patch expression
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
5e4e8df95a
libagx: drop Clockwise
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
0c0097ab34
libagx: vectorize triangle def'n
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c54fdde1a4
libagx: drop dead code
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d00a504cb0
libagx: drop branch
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
28a2844309
libagx: fix cl warning
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
663b367a76
hk: fix meta shader name
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f8b69ebdc2
hk: drop assert
...
works fine without.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ece3bd74db
agx: make imad+ishl rules actually work
...
total instructions in shared programs: 2750211 -> 2750184 (<.01%)
instructions in affected programs: 50499 -> 50472 (-0.05%)
helped: 27
HURT: 0
Instructions are helped.
total alu in shared programs: 2273669 -> 2273642 (<.01%)
alu in affected programs: 29874 -> 29847 (-0.09%)
helped: 27
HURT: 0
Alu are helped.
total fscib in shared programs: 2271986 -> 2271959 (<.01%)
fscib in affected programs: 29874 -> 29847 (-0.09%)
helped: 27
HURT: 0
Fscib are helped.
total bytes in shared programs: 21475184 -> 21474968 (<.01%)
bytes in affected programs: 371574 -> 371358 (-0.06%)
helped: 27
HURT: 0
Bytes are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f737470736
agx: fuse iadd+large shift into imad
...
total instructions in shared programs: 2750352 -> 2750211 (<.01%)
instructions in affected programs: 86944 -> 86803 (-0.16%)
helped: 32
HURT: 18
Instructions are helped.
total alu in shared programs: 2273810 -> 2273669 (<.01%)
alu in affected programs: 76720 -> 76579 (-0.18%)
helped: 32
HURT: 18
Alu are helped.
total fscib in shared programs: 2272127 -> 2271986 (<.01%)
fscib in affected programs: 76720 -> 76579 (-0.18%)
helped: 32
HURT: 18
Fscib are helped.
total bytes in shared programs: 21476424 -> 21475184 (<.01%)
bytes in affected programs: 649884 -> 648644 (-0.19%)
helped: 33
HURT: 18
Bytes are helped.
total regs in shared programs: 865114 -> 865090 (<.01%)
regs in affected programs: 525 -> 501 (-4.57%)
helped: 3
HURT: 0
total uniforms in shared programs: 2120792 -> 2120848 (<.01%)
uniforms in affected programs: 414 -> 470 (13.53%)
helped: 0
HURT: 8
Uniforms are HURT.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c9e42073a1
agx: optimize signext imad
...
improves clpeak short.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Asahi Lina
cf0261980a
hk: Enable missing swapchainMaintenance1 support
...
This was inconsistent with claiming the extension is supported, and that
trips up GTK4.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d449800e46
hk: don't advertise impossible modifiers
...
fixes dEQP-VK.drm_format_modifiers.bound_to_dma_buf.a2b10g10r10_sint_pack32,Crash
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Asahi Lina
e5d61631fe
hk: Fix DRM modifier selection for compressed surfaces
...
We have to reject DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED for surfaces
which are too small. Since the modifier is for all planes, that means
that for multiplane images we need to test all planes for compression
support.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Asahi Lina
da1601a4ec
hk: Add virtio implicit sync support
...
Since we can't know what BOs are written easily, just sync against all
external BOs.
This should go away once we have proper fence passing support so we can
do implicit sync passing in muvm-x11bridge.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ddc6d9e984
agx: fix atomics in tess count shaders
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2c7635ab63
agx: add tests for sign/zero-extend propagate
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6d56c8bc02
agx: fold zext into int sources
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
200d0794e2
agx: optimize signext+iadd
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
cfe0a9acec
agx: add pseudo for signext
...
easier to optimize
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
8de339c0d8
agx: change int conversion test
...
it's not useful as is but we can salvage
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081 >
2024-11-11 14:33:01 +00:00