Alyssa Rosenzweig
59b0dd7c64
asahi: drop dead
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Asahi Lina
07e836b932
asahi: Fix agx_gpu_time_to_ns & implement DRM_ASAHI_GET_TIME
...
agx_gpu_time_to_ns() was broken since it was overflowing the u64
timestamp after just ~10 minutes. Fix that by automatically computing a
reduced conversion fraction, and add support for DRM_ASAHI_GET_TIME
where supported (replacing the CPU timer hack).
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Asahi Lina
925eca02c4
asahi: UAPI update to add GET_TIME & cleanup
...
Also fix editor config for this file & disable clang-format, to make
syncing with the kernel easier.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d894941895
hk,asahi,libagx: unify a bit of code
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
1ac82c8d24
asahi: drop dead pool stuff
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
fe92abf82b
agx: reduce preamble/main alignment
...
this was overkill.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
91ce434103
agx: disable bounds check optimization
...
fixes Fallout 4. needs more investigation when we have better debug tooling.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
2b3b0cd339
hk: clarify bounds check calculations
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4d4f82b739
hk: implement hack for layered no attachments
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4386150ab3
hk: fix z bias perf regression
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
57447cbb82
hk: fix incorrect index size translate
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
ecd94113ca
libagx: increase wg size for query copy
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Faith Ekstrand
2fae75b278
treewide: Stop putting enum in front of Vulkan enum types
...
The Vulkan headers add typedefs to fix aliasing issues whenever a type
gets renamed. However, C doesn't allow "enum typedef" so this doesn't
work if people stick the "enum" keyword in front.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433 >
2024-12-02 17:22:49 +00:00
Alyssa Rosenzweig
f4a3ba5302
asahi,vtn: precompile kernels
...
switch libagx to the precompilation pipeline. see the big comment in the
previous commit for why we're doing this.
while doing so, we move some dispatch stuff. there was so much churn from
precompile that this avoids doing the churn twice. that new header will be used
for DGC down the road.
there's also a small vtn/bindgen patch in here to skip bindgen'ing entrypoints,
as that conflicts with the new dispatch macros. this is the sane behaviour, we
just need to do the full precomp switch across the tree at once.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32339 >
2024-11-28 17:34:12 +00:00
Alyssa Rosenzweig
83581b3f1f
asahi/clc: switch to nir_lower_calls_to_builtins
...
common code has a generic version, so we don't need to handroll this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382 >
2024-11-27 20:02:04 +00:00
Alyssa Rosenzweig
430fa29953
asahi: refmt
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
0755b6d3d5
asahi: add XML for cdm stream link with return
...
I don't know of any case of Apple's driver using this, but it seems to work. The
stream link bit is identical to VDM so that was easy, the tricky part was the
return but I bruteforced the encoding space and this is the (only) thing that
worked. So add the XML.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
ebdca6344e
asahi/genxml: define missing macros
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
e01dc7a588
asahi/genxml: optimize out masking with shr
...
noticed in the agx asm.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
6a1a3dac21
asahi/genxml: fix 128-bit in CL path
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
a34b3ecb75
asahi/genxml: fix 0 encoding for groups
...
this was breaking launch word merging.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
65cc99a916
libagx: don't export vertex_id_for_top
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
810971532f
libagx: fix return type
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
6dea5f49f2
hk: 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:09 +00:00
Alyssa Rosenzweig
33b41e029a
hk: add cmd buffer to hk_cs
...
convenient.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320 >
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
7609a974a3
hk: use common wg 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:09 +00:00
Alyssa Rosenzweig
7c921fa0d7
hk: do not increment GS queries for passthru GS
...
fixes vkd3d-proton test_query_pipeline_statistics
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
6b8d4cca7e
hk: be robust against invalid MSAA inputs
...
fixes vkd3d-proton test_multisample_rendering
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
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