Commit Graph

189588 Commits

Author SHA1 Message Date
Rhys Perry 4ae8a558b2 aco: remove nir_to_aco
This isn't used anymore

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29121>
2024-05-21 21:28:13 +00:00
Rhys Perry b1964f03e7 aco: use scalar phi lowering for lcssa workaround
This lets us use non-undef for the last operand, if necessary
(demonstrated in the test).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29121>
2024-05-21 21:28:13 +00:00
Rhys Perry bbe4652430 aco: create lcssa phis for continue_or_break loops when necessary
These might not exist because adding would decrease the quality of
divergence analysis. They are necessary for continue_or_break though, so
add them later, where they won't affect divergence analysis.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10623
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29121>
2024-05-21 21:28:13 +00:00
Rhys Perry 3fc7207f50 aco/lower_phis: create loop header phis for non-boolean loop exit phis
These might be necessary if continue_or_break and divergent breaks are both used:
   loop {
      if (divergent) {
         a = loop_invariant_sgpr
         break
      }
      discard_if
   }
   b = phi a
If we break because discard_if makes exec empty but only did so in
previous iterations, then the phi should use "a" from those previous
iterations.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29121>
2024-05-21 21:28:13 +00:00
Derek Foreman 175d2d680a wsi/wayland: Fix use after free from improperly stored VkAllocationCallbacks
These callbacks are no longer valid when cleaning up, and a use after free
occurs.

There's no need to store this at all anyway, so just stop doing that.

Fixes: 57c03fe4
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11184

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29310>
2024-05-21 21:01:25 +00:00
Timur Kristóf 0e0c2574d1 radv: Add shader stats for inputs and outputs.
These new stats report the combined inputs and outputs of
graphics stages stages where applicable.
Task -> Mesh payload is not included.

This is useful for reporting the effects of any shader
optimizations which affect linking.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29209>
2024-05-21 20:37:05 +00:00
Timur Kristóf 590fff6906 radv: Add TES num_linked_patch_inputs.
Not needed by actual driver functionality, but will be
used for reporting I/O stats.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29209>
2024-05-21 20:37:05 +00:00
David Heidelberg 4a6d7e79ad subprojects: uprev perfetto to v45.0
Cc: mesa-stable

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29311>
2024-05-21 20:02:00 +00:00
Constantine Shablia 0d59fe21ce panvk: remove descriptor pool counters
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29250>
2024-05-21 19:41:11 +00:00
Samuel Pitoiset bb09fac659 ac,radv,radeonsi: add a function for getting border color swizzle
The swizzle for 8-bit stencil shuld be also fine on RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29307>
2024-05-21 19:12:52 +00:00
Rob Clark 25a206b9ac tu: Don't advertise AHB handle time on non-android
Fixes
dEQP-VK.api.external.memory.android_hardware_buffer.dedicated.image.info
among others.

Fixes: 99753001f3 ("turnip: Support AHardwareBuffer")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29309>
2024-05-21 18:45:31 +00:00
Rob Clark b71f3f1314 docs/features: Add missing AHB for tu
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29309>
2024-05-21 18:45:31 +00:00
Marek Olšák eef5e4221f radeonsi: vectorize load/stores and shrink stores
based on RADV

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29282>
2024-05-21 18:20:30 +00:00
Marek Olšák 8cb254e0b8 radeonsi: call nir_lower_int64 later to fix ACO failure with Tomb Raider
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29282>
2024-05-21 18:20:30 +00:00
Marek Olšák 5a115b1055 ac/llvm: global stores should have no holes in the writemask
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29282>
2024-05-21 18:20:30 +00:00
Marek Olšák 7952e4fc7a ac: move radv_mem_vectorize_callback to common code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29282>
2024-05-21 18:20:30 +00:00
Samuel Pitoiset 26cd3a1718 ac,radv,radeonsi: add a helper to set mutable tex desc fields
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset 7523c1ec57 radv: stop clearing unnecessary bitfields in radv_set_mutable_tex_desc_fields()
They should already be zero because nothing else sets them before.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset d09afbdebc radv: set ITERATE_256 for GFX10+ in radv_set_mutable_tex_desc_fields()
To be closer to the RadeonSI helper. This doesn't change anything for
RADV because images are required to be bound at image view creation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset fb37ea092d radv: tidy up meta_va in radv_set_mutable_tex_desc_fields()
To be closer to the RadeonSI helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset 8adb326f59 radv: tidy up custom pitch for gfx10.3 in radv_set_mutable_tex_desc_fields()
To be closer to the RadeonSI helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset d1fa5ffab0 radv: tidy up swizzle in radv_set_mutable_tex_desc_fields()
To be closer to the RadeonSI helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset 81e927ea05 ac,radv,radeonsi: add a helper to get the tile mode index
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Samuel Pitoiset 72485fe592 radv: set image view descriptors as buffer for non-graphics GPU
Ported from RadeonSI, for CDNA.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
2024-05-21 16:41:40 +00:00
Timur Kristóf c1d38b0b37 nir: Add nir_opt_load_store_update_alignments.
New pass that shares code with nir_opt_load_store_vectorize but
it only updates the alignment of load/store instructions.

It is useful before running other passes which may
potentially destroy that information (eg. by removing some
instructions from which the alignment may be deduced).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29210>
2024-05-21 16:06:23 +00:00
Alyssa Rosenzweig 0b582449f0 nir/lower_point_size: support lowered i/o
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29248>
2024-05-21 15:30:10 +00:00
Valentine Burley 471ac97a4a drm-shim: Stub syncobj reset ioctl
Fixes DRM_SHIM: unhandled core DRM ioctl 0xC4 (0xc01064c4).

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28504>
2024-05-21 14:14:25 +00:00
Georg Lehmann cc404d45ff aco: remove perfwarn
This didn't do anything useful.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29270>
2024-05-21 13:31:23 +00:00
Georg Lehmann ea3e5bcc99 aco/optimizer: remove ineffective undef opt
No stats changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29270>
2024-05-21 13:31:23 +00:00
Georg Lehmann bd699b5d88 aco/optimizer: remove ineffective vcc opt
No stats changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29270>
2024-05-21 13:31:23 +00:00
Eric R. Smith eefe34127f panfrost: add a barrier when launching xfb jobs in CSF
When we start writing to an XFB buffer we need to synchronize with
any batches reading from it (because the data they need is about
to be overwritten). Do this by introducing a barrier in csf_launch_xfb.

This patch fixes a valhall failure in
KHR-GLES31.core.vertex_attrib_binding.advanced-iterations

Cc: mesa-stable
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29092>
2024-05-21 13:03:40 +00:00
Juan A. Suarez Romero 69ceb5dab9 v3d: remove handled cases for devices <= 42
The driver nowadays requires hardware version >= 4.2, but in the old
days it managed older versions.

Remove some leftovers remaining in the code.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29299>
2024-05-21 12:39:41 +00:00
Juan A. Suarez Romero cbcfb34cf7 v3d: use BITSET for the masks
So far we were using raw uint32_t for handling masks. But this has the
issue that it only allows to handle up to 32 elements; if we need to
handle more elements, the we need to upgrade to uint64_t.

And this happened inadvertently with commit 370f02bf02 ("gallium: Bump
PIPE_MAX_SHADER_IMAGES to 64"), where the number of elements to handled
were increased from 32 to 64, but we didn't upgrade the mask type.

To fix this, and avoid this happening again in the future, let's use
BITSET, which is designed to handle bitmasks, and can able to handle as
many elements as desired.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29299>
2024-05-21 12:39:41 +00:00
Rob Clark 924c5ad2ac egl/android: Fix sRGB visuals
The switch to filtering visuals by pipe_format overlooked the
corresponding _SRGB formats.

Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11182
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29292>
2024-05-21 11:57:55 +00:00
Samuel Pitoiset 97962f2a34 radv: mark some formats as unsupported on GFX8/CARRIZO
Ported from RadeonSI, untested.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29288>
2024-05-21 06:34:06 +00:00
Samuel Pitoiset e384b28805 radeonsi: reject some texture formats but only on GFX8/CARRIZO
Not sure why this check was missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29288>
2024-05-21 06:34:06 +00:00
Samuel Pitoiset 95122a1cf7 ac,radv,radeonsi: introduce a helper to build a FMASK descriptor
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29259>
2024-05-21 06:10:32 +00:00
Juston Li e1b4b399ce zink: disable cpu_storage for PIPE_USAGE_STREAM
See 8af8dc97bc ("tc: do a GPU->CPU copy to initialize cpu_storage")

On zink, initializing cpu_storage that requires a GPU->CPU copy is
particularly expensive; in addition to a sync, the buffer_map call to
copy the GPU data submits a batch and has to wait for that batch.

Take the PIPE_USAGE_STREAM hint and disable using cpu_storage on
resources that "will be modified once and used at most a few times"
where the benefit of cpu_storage is outweighed by the heavy init time.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29294>
2024-05-20 22:59:42 +00:00
Rob Clark 01bac643f6 freedreno/ir3: Fix ldg/stg offset
Basically a revert (but not a clean one) of commit 60686d4146
("ir3/a6xx: fix ldg/stg of ulong2 and ulong4 data").  The offset
is a byte offset, not a dword offset.

Backport note: Prior to commit 513fa1873c ("ir3/a7xx: Fix
load_global_ir3 with immediate offset") you could instead just revert
the original commit.

Fixes: 60686d4146 ir3/a6xx: ("fix ldg/stg of ulong2 and ulong4 data")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11169
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29228>
2024-05-20 21:24:53 +00:00
Mike Blumenkrantz 23488790c1 zink: remove dgc debug mode
there is alternative testing available now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29289>
2024-05-20 19:47:39 +00:00
Mike Blumenkrantz e093107115 lavapipe: lvp_indirect_command_layout -> lvp_indirect_command_layout_nv
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29293>
2024-05-20 19:27:33 +00:00
Mike Blumenkrantz aaa3f37ae5 lavapipe: plumb print_cmds through NV DGC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29293>
2024-05-20 19:27:33 +00:00
Mike Blumenkrantz 42e3d580cc lavapipe: split out DGC into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29293>
2024-05-20 19:27:33 +00:00
Mike Lothian 3be436830e ac/llvm: Remove global access ops handling
They have been lowered in nir

v2: Keep the _amd versions
v3: Fix if's with removed ops

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29280>
2024-05-20 18:41:20 +00:00
Mike Lothian d2e80e57a3 radeonsi,aco: Run ac_nir_lower_global_access pass
This allows rusticl to run under radeonsi when using ACO

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11179
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29280>
2024-05-20 18:41:20 +00:00
Dylan Baker 46644ba371 meson: use glslang --depfile argument when possible
This reduces the amount of manual dependency tracking developers need to
do. This is turned on if glslang >= 11.3.0 is used, or 11.9.0 on
Windows, but otherwise the status quo is maintained. This means I have
not removed any use of `depend_files`. We could make make these hard
requirements and remove the use of `depend_files` too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28329>
2024-05-20 17:34:17 +00:00
Samuel Pitoiset 32e43fe77c ac,radv,radeonsi: add helper to know if a format is supported by DB
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset d2234adf59 ac,radv,radeonsi: add helper to know if a format is supported by CB
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset c62f86587f amd/common: move some format related helpers to ac_formats.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset 473559001f radv: add radv_is_colorbuffer_format_blendable()
This will allow us to add a common helper to know if a format is
supported by CB.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00