Commit graph

193353 commits

Author SHA1 Message Date
Alyssa Rosenzweig
2b1859cd06 agx: tweak jmp_exec_none heuristic
to make sure border colour code is skipped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
339a1a4d73 hk: advertise more eds features
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
d512709eea hk: advertise shaderResourceMinLod
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
907fe00da1 agx: handle min_lod sources
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
03830c9523 agx: optimize popcount(ballot(true))
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
431a176287 hk: fix vkd3d-proton descriptor-performance
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
1d5c2f56d8 hk: implement drawIndirectCount
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
a6d7991475 libagx: add drawIndirectCount clone&patch kernel
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
f04ae930d9 nir,agx: add "active threads in subgroup" intrinsic
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:58 -04:00
Alyssa Rosenzweig
4dbce4a6a3 hk: fix restart index overemit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:58 -04:00
Alyssa Rosenzweig
765e6ad2fc asahi,hk: generalize bo_bind hook
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:58 -04:00
Alyssa Rosenzweig
01ac52f05c hk: fix BDA alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:57 -04:00
Alyssa Rosenzweig
f4cca9d600 asahi: introduce agx_va data structure
prep for sparse.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:57 -04:00
Alyssa Rosenzweig
5c7dd392d3 asahi: always pass align parameter for BOs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
7ff31a4bf8 asahi: drop iThing logic
wontfix.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
8dae4aacb4 asahi: stop fixing up USC addresses
use the real VA space.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
77ea124d7e asahi: drop agx_bo::type
macOS silliness.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
1899ea319f asahi: drop mprotect in decoding
now that genxml does our decoding it's not buying us much.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
91257a9bb8 asahi: drop segment list parsing
we're not targeting macOS so this is dead.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
df725d4f64 asahi: remove agx_bo::dev
track at call sites.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
c834758ba7 hk: optimize bounded loads with soft fault
glmark2 -bbuild frametime reduced 3%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
1fd66d3859 asahi: optimize out vbo clamp with soft fault
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
3d18f14328 hk,asahi: pass through soft fault to VBO lower
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
dc3288dcb1 agx: exploit soft fault info
for preambles and for peephole selection.

total instructions in shared programs: 2159359 -> 2114124 (-2.09%)
instructions in affected programs: 359763 -> 314528 (-12.57%)
helped: 814
HURT: 6
Instructions are helped.

total alu in shared programs: 1685059 -> 1670200 (-0.88%)
alu in affected programs: 217210 -> 202351 (-6.84%)
helped: 589
HURT: 45
Alu are helped.

total fscib in shared programs: 1681202 -> 1666324 (-0.88%)
fscib in affected programs: 217477 -> 202599 (-6.84%)
helped: 590
HURT: 45
Fscib are helped.

total ic in shared programs: 460856 -> 455502 (-1.16%)
ic in affected programs: 41350 -> 35996 (-12.95%)
helped: 174
HURT: 8
Ic are helped.

total bytes in shared programs: 14302484 -> 14053982 (-1.74%)
bytes in affected programs: 2380614 -> 2132112 (-10.44%)
helped: 814
HURT: 7
Bytes are helped.

total regs in shared programs: 662302 -> 656517 (-0.87%)
regs in affected programs: 26979 -> 21194 (-21.44%)
helped: 432
HURT: 9
Regs are helped.

total uniforms in shared programs: 1651909 -> 1687077 (2.13%)
uniforms in affected programs: 95383 -> 130551 (36.87%)
helped: 17
HURT: 783
Uniforms are HURT.

total threads in shared programs: 20324608 -> 20326592 (<.01%)
threads in affected programs: 16192 -> 18176 (12.25%)
helped: 17
HURT: 3
Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
f0cd599913 agx: factor out agx_device_key
we will have other device-dependent key members soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
d654cc55b5 asahi: fix warning
../src/gallium/drivers/asahi/agx_uniforms.c:60:10: warning: taking address of packed member of ‘struct agx_draw_uniforms’ may result in an unaligned pointer value [-Waddress-of-packed-member]
   60 |          &batch->uniforms.attrib_base[i]);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Asahi Lina
54cec6ae30 asahi: Do not sync against our own queue
We previously introduced cross-context sync points to make ordering work
with multiple queues. Unfortunately, that also adds a CPU round trip in
the kernel when a single context flushes and then keeps submitting,
since it introduces a sync against itself. That's pointless.

To fix this without introducing races, on flush, we check the previous sync
point. If it's foreign, we record it, and we also keep track of our last
local sync point. Then, when waiting, if we're about to wait on our last
flush sync point from our own queue, we instead wait for the foreign
one. A foreign sync after that will cause the equality check to fail and
future submits from this queue to sync against the most up to date
point, and the next flush will then record it as the last known foreign
sync point for this queue (and continue flushing against it until
another foreign queue flushes again).

Fixes glmark2 perf regression (particularly with `build` and similar
high-FPS tests).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Asahi Lina
c7994a2955 asahi: Update to UAPI 10011
Incompatible changes:
- Make VM layout more flexible to allow for SVM with rusticl
  (eventually, hopefully)

Compatible changes:
- Expose soft fault state to userspace as a flag

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:35:47 -04:00
Mahmood - Zer0xFF
dd5cce4730 d3d12: Fix Xbox GDK Build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30615>
2024-08-12 22:16:41 +00:00
Sai Teja
9ce9675658 ci: Don't run vulkan jobs for gbm changes
Currently, vulkan doesn't use gbm. So, don't run vulkan
related jobs for gbm changes.

Signed-off-by: Sai Teja <saiteja13427@gmail.com>
Suggested-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30590>
2024-08-12 19:34:58 +00:00
Karol Herbst
4080269845 util/u_printf: do not double print format string with unused arugments
the CL CTS added a new test being printf("\n", "foo"), but we ended up
printing the new line twice. If we can't find a specifier anymore, ignore
the argument as after the loop processing all arguments we'll print the
remaining format string anyway.

Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30574>
2024-08-12 18:49:01 +00:00
Rob Clark
f7830e0c80 freedreno/a6xx: Fix arb_texture_view regression
In particular if src and dst have FD6_UBWC_UNKNOWN_COMPAT we shouldn't
treat them as compatible.

Fixes: beb5577e12 ("freedreno: Extract out common UBWC helper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11676
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30621>
2024-08-12 17:31:27 +00:00
Valentine Burley
367191ff63 tu: Always report that we can present on kgsl
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8637
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9240
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9365
Fixes: 3e7f6c9aeb ("tu: implement wsi hook to decide if we can present directly on device")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29627>
2024-08-12 16:00:37 +00:00
Valentine Burley
47289ebc8d vulkan/wsi: Refactor can_present_on_device
Make wsi_device_matches_drm_fd() a default helper that PCI based GPUs plug in to
wsi_dev->can_present_on_device. This is needed for devices without libdrm, where
wsi_device_matches_drm_fd was still being called causing an "undefined reference"
build error.

Suggested-by: Rob Clark <robdclark@chromium.org>
Fixes: baa38c144f ("vulkan/wsi: Use VK_EXT_pci_bus_info for DRM fd matching")
Reviewed-by: Mark Collins <mark@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29627>
2024-08-12 16:00:37 +00:00
Thomas H.P. Andersen
37d0cdc36f nak: special case PhiDsts as not uniform
Fixes: ab72be6c5e ("nak,compiler: Move AsSlice to common code")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30607>
2024-08-12 15:34:50 +00:00
Mike Blumenkrantz
c8c46bf900 egl: fix fd passing on init with zink
this should be passed with gbm but not for any other display type

Fixes: 5ab29555cf ("egl/x11: pass render fd to screen create for zink")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30588>
2024-08-12 14:58:05 +00:00
Mike Blumenkrantz
d120992e1a egl/wayland: bail on zink init in non-sw mode if extension check fails
cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30479>
2024-08-12 13:02:20 +00:00
Icenowy Zheng
4e777bb19b zink: do not expose quad support when no geometry shader
The emulation of quads implemented in Zink utilizes geometry shaders,
but currently the enablement of it is only guarded by the support of
triangle strips.

Add geometry shaders to the condition to enable it either too.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30608>
2024-08-12 12:37:24 +00:00
Sergi Blanch Torne
e5291e1a22 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 9d0491c12b.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30609>
2024-08-12 11:36:12 +00:00
Georg Lehmann
dedfff9dbf aco: only set latekill in live_var_analysis
Cleaner to have this all in one place, in my opinion.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30368>
2024-08-12 10:31:09 +00:00
Georg Lehmann
510f5e55be aco/gfx10+: set lateKill for sgprs used by wave64 VALU writing a mask
RDNA2 ISA doc, 6.2.4. Wave64 Destination Restrictions:
The first pass of a wave64 VALU instruction may not overwrite a scalar value
used by the second half.

Foz-DB Navi31:
Totals from 5221 (6.58% of 79395) affected shaders:
Instrs: 9751484 -> 9752179 (+0.01%); split: -0.01%, +0.01%
CodeSize: 50624072 -> 50626088 (+0.00%); split: -0.00%, +0.01%
Latency: 85646450 -> 85647419 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 15039160 -> 15039277 (+0.00%); split: -0.00%, +0.00%
VClause: 200275 -> 200204 (-0.04%)
SClause: 248645 -> 248607 (-0.02%); split: -0.03%, +0.01%
Copies: 640802 -> 641413 (+0.10%); split: -0.01%, +0.11%
PreSGPRs: 236297 -> 236735 (+0.19%)
VALU: 5666449 -> 5666440 (-0.00%)
SALU: 967482 -> 968111 (+0.07%); split: -0.01%, +0.07%

Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30368>
2024-08-12 10:31:09 +00:00
Sergi Blanch Torne
9d0491c12b ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-08-12 07:00 UTC
* End: 2024-08-12 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30533>
2024-08-12 06:10:34 +00:00
Timothy Arceri
3da4b5eaa5 glsl: always copy bindless sampler packing constructors to a temp
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11648
Fixes: 3cdcc5f02f ("glsl: implement ARB_bindless_texture conversions")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30586>
2024-08-12 00:39:19 +00:00
Faith Ekstrand
c43d94a853 nvk: Invalidate MME data for descriptor buffers
Our cbuf optimization may pull UBO descriptors straight out of
client-owned descriptor buffers which may have been written from a
compute shader or similar.  We need to stall the command processor if we
ever get a barrier from anything to DESCRIPTOR_BUFFER_READ_BIT.

Fixes: c5b752cea0c9 ("nvk: Advertise VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30601>
2024-08-11 09:49:01 -05:00
Konstantin Seurer
2808419f96 gallivm: Skip inactive branches
Improves performance of shaders with a lot of control flow.

Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30347>
2024-08-11 07:19:07 +00:00
Konstantin Seurer
b35ff07fc1 gallivm: Use variables for loop exec mask handling
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30347>
2024-08-11 07:19:07 +00:00
Rob Clark
5f8016f88a tu: Quiet vla warnings
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
c9fe3e189b freedreno/registers: Deprecate non-variant reg builders
For registers with variants, mark the legacy (non-variant) builders as
deprecated to help avoid using the wrong one.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
75e0290e42 tu: Use CHIP variant reg builders
Avoid using the non-variant builders for regs that differ btwn
generations.  This will become deprecated.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
47468554d9 tu: Add helper to calculate layer address
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00