Commit graph

171796 commits

Author SHA1 Message Date
Mark Collins
71918f7cff tu: Fix CP_BLIT sync on A7XX
A7XX needs the CCU blit caches to be flushed before a CP_BLIT to
ensure any writes from a CP_EVENT_WRITE::BLIT have landed, without
this the source buffer may have an incomplete load/clear when the
2D blit starts resulting in what's written out being broken.

The corruption can be seen with GMEM passes using CP_BLIT especially
when forced using `TU_DEBUG=gmem,unaligned_store`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
9a67f00398 tu: Set RB_CCU_CNTL during HW init on A7XX
On A7XX, A6XX_RB_CCU_CNTL was broken into two registers, A7XX_RB_CCU_CNTL which
has static properties that can be set once, this requires a WFI to take effect.
As a result, it's now set during `tu6_hw_init` rather than being set every time.

While the newly introduced register A7XX_RB_CCU_CNTL2 has properties that may
change per-RP and don't require a WFI to take effect, only CCU inval/flush
events are required. This is now the only register set in `emit_rb_ccu_cntl`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
265eb463b5 tu: Disable LRZ properly on A7XX
LRZ wasn't entirely disabled due to the register `A7XX_GRAS_LRZ_DEPTH_BUFFER_INFO`
not being set to `0` in all circumstances, this register affects rendering even
when LRZ is disabled so needs to be set to `0` until LRZ is properly implemented.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
3188c1b5c7 tu: Use Z24_UNORM_S8_UINT_AS_R8G8B8A8 for A7XX GMEM D24S8 blits/clear
A7XX has corruption when 2D blits are performed on D24S8 images
from GMEM when the source format is FMT6_8_8_8_8_UNORM, this is
fixed by using FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8.

Fixes VK-CTS: dEQP-VK.pipeline.monolithic.multisample.misc.*

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
1714e0c240 tu: Fix 2D blit path for GMEM stores on A7XX
These were broken due to the new window offset register not being
set for every tile, even with this the 2D blit path is broken for
MSAA D24S8 resolves but since outside of FDM that should be handled
by the event blit path it's not a major concern but should be fixed.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
9e699afa9b tu: Allow event blit to resolve depth stencil formats
This seemingly works on A7XX with no issues and the comment there
prior suggests that it should work on A6XX so this case is now
allowed to go through the event blit rather than the slow path.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
cc6399de31 tu: Update CCU layout selection logic for seperate stencil stores
The CCU layout logic needed to match the full `use_fast_path` case
in `tu_store_gmem_attachment`, not just unaligned but also for the
stencil storage logic.

The current code works since depth/stencil formats are forced to use the
slow path by `blit_can_resolve`. However, that will be removed since only
seperate stencil stores are unable to use the fast path while combined
stores can use it without any issues. This change prevents a regression
due to no longer choosing the sysmem CCU layout for seperate stencil
stores when fast-path resolves are allowed for DS formats.

Fixes VK-CTS cases (when fast-path stores for DS formats are enabled):
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
b44474407d tu: Use full size color CCU in sysmem mode
Only a fraction of GMEM was being used by the color CCU even in
sysmem mode where it would go unused aside from the portion used by
the depth CCU. This can help with color CCU bottlenecks on both
A6XX and A7XX.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
40b3a38951 freedreno/devices: Update A7XX tile values
The tile align size was incorrect resulting in certain invalid bins
being selected that would cause rendering to entirely break down. In
addition, the maximum tile size has been further increased on A7XX.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
120779f009 tu: Set RB_UNKNOWN_88E4 for A7XX event blits
Event blits on A7XX are entirely broken without setting the first
bit of this register.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Danylo Piliaiev
f0ae416fc1 tu/autotuner: Use CP_EVENT_WRITE7 for submission fence
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
4e6a1f8852 tu/autotune: Use CP_EVENT_WRITE7::ZPASS_DONE on A7XX
The `RB_SAMPLE_COUNT_ADDR` register no longer exists on A7XX and
the address is provided as a part of `CP_EVENT_WRITE7`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
45b415a044 tu: Use CP_SET_PSEUDO_REG for A7XX VSC stream regs
VSC stream registers on A7XX are psuedo-registers rather than actual
registers and need to be set via `CP_SET_PSEUDO_REG`.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
2c78d104b0 tu: Only set PC/VFD PWR_CNTL regs on A6XX
These are no longer used on A7XX and should not be emitted.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
0b2df4ca26 tu: Set CP_THREAD_CONTROL::CONCURRENT_BIN_DISABLE in A7XX HW init
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
1af86d5a6a tu: Set A7XX registers in tu6_tile_render_begin
These are mostly copied from the sysmem registers with the values
based off prop GMEM traces.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Mark Collins
9759222282 tu: Allow GMEM on A7XX when TU_DEBUG=gmem
GMEM is entirely non-functional on A7XX, however, it is useful to be
able to test intermediary commits as support is added. This is still
put behind an explicit `TU_DEBUG` gmem flag to avoid regressions from
bisecting sysmem issues.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26461>
2024-02-28 22:49:58 +00:00
Rohan Garg
3dbc15e74e anv: add a command streamer stall on Xe2+ when switching pipelines
Xe2+ gets rid of PIPELINE_SELECT, so we need to make sure we add a stall
when switching pipelines

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27823>
2024-02-28 22:24:39 +00:00
Simon Ser
af41fad1e9 egl/wayland: explain why implicit modifier downgrade is allowed
We break the rule that an explicit modifier cannot be stripped.
Fixing this would require a bit of effort and wl_drm is reaching
its end of life anyways, so leave a TODO instead.

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26346>
2024-02-28 21:30:55 +00:00
Simon Ser
35143febba egl/wayland: ensure wl_drm is available before use
Avoid crashing if wl_drm is unavailable. Instead, gracefully error
out.

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: c60fea8c22 ("Revert "egl/wayland: deprecate drm_handle_format() and drm_handle_capabilities()"")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26346>
2024-02-28 21:30:55 +00:00
Rohan Garg
1f36cc6ca3 anv: cleanup duplicate robustness flag calculations
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27850>
2024-02-28 21:05:44 +00:00
Mike Blumenkrantz
2b1d12b104 zink: force max buffer alignment on return ptrs for mapped staging buffers
this guarantees the alignment matches what the API expects

fixes KHR-GL4*.map_buffer_alignment.functional on nvk

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
f7d6a75d6b zink: delete unused buffer map conditional
this is now handled in the block above

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
80456abff7 zink: fix unsynchronized read-mapping of device-local buffers
these can use the copy context to enable readback on systems without BAR

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
91f99f82ab zink: null out bo usage when allocating from slab
avoids weird cases with stale usage

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
689a80704a zink: emit SpvCapabilityImageMSArray for ms arrayed storage images
required by spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Mike Blumenkrantz
701ee4be91 zink: apply all storage memory masks to control barriers if no modes are specified
fixes VUID-StandaloneSpirv-OpControlBarrier-04650 errors

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27827>
2024-02-28 20:37:22 +00:00
Faith Ekstrand
e32c36df07 nvk: Don't print the NVK_I_WANT_A_BROKEN_VULKAN_DRIVER warning in release builds
The environment variable is still there and it still works but this
means that release builds will simply silently fail to enumerate rather
than throwing confusing warnings at users.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
b5dab7c965 nvk: Drop the non-conformant warning on Turing-Ada
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
4ce4560a45 nvk: Advertise a CTS version of 1.3.7.3
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Martin Roukala (né Peres)
81230513a8 radv/ci: add a vkd3d-tahiti job
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27844>
2024-02-28 17:54:47 +00:00
Samuel Pitoiset
778ef9b133 radv: move conditional rendering for compute in radv_cmd_state
Like other conditional rendering states.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27818>
2024-02-28 17:33:29 +00:00
Samuel Pitoiset
536c44d946 radv: fix conditional rendering with direct mesh+task draws and multiview
Having to compute the predication size manually is VERY prone to errors.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27818>
2024-02-28 17:33:29 +00:00
Samuel Pitoiset
ba7b7e2d3f radv: add missing RADV_DEBUG_NO_NGG_GS to the physical device cache key
This affects shaders and they need to be recompiled.

Fixes: 69d734a8d5 ("radv: add RADV_DEBUG=nongg_gs for GFX10/GFX10.3")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27820>
2024-02-28 17:07:26 +00:00
Danylo Piliaiev
be46639974 freedreno/a7xx: Fix base_align for non-UBWC depth-stencil
A7XX appears to require alignment of 4096 for DS in both
UBWC and non-UBWC cases.

Fixes rendering with TU_DEBUG=noubwc

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27848>
2024-02-28 16:30:15 +00:00
Zan Dobersek
25a0eadcae tu: tu_device should clean up its global bo
The global buffer object is allocated and mapped during tu_device creation.
Correspondingly it should also be cleaned up during device destruction.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27814>
2024-02-28 15:51:00 +00:00
Chia-I Wu
f623c27eab meson: fix a build ereror
Fixes

  src/vulkan/wsi/meson.build:71:13:
  ERROR: Unknown variable "libloader_wayland_helper".

for headless vulkan-only builds.

Fixes: a00f9c401b ("loader/wayland: Add fallback wl_display_dispatch_queue_timeout")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27837>
2024-02-28 15:03:05 +00:00
Robert Beckett
9c096e23c0 vulkan/wsi: fix force_bgra8_unorm_first
fixes: 7c16a1ae vulkan/wsi: Add a driconf option to force WSI to advertise BGRA8_UNORM first

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23991>
2024-02-28 13:20:56 +00:00
Pierre-Eric Pelloux-Prayer
224ff11617 egl/wayland: use __DRI_IMAGE_PRIME_LINEAR_BUFFER in get_back_bo
Some drivers (radeonsi, iris) relies on this hint to detect DRI_PRIME
blits and implement a special path (eg: SDMA copy for radeonsi).

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27719>
2024-02-28 12:47:54 +00:00
Danylo Piliaiev
55e99728e0 tu: Do not emit zero-sized fs params
The comparison change accidentally slipped in.

Fixes a crash in:
  dEQP-VK.subgroups.size_control.framebuffer.fragment_allow_varying_subgroup_size

Fixes: 76e417ca59
("turnip,ir3/a750: Implement consts loading via preamble")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27829>
2024-02-28 12:00:33 +00:00
Samuel Pitoiset
b3064f9cf4 radv: clean up MAX_ALLOWED_TILES_IN_WAVE programming
To match RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27789>
2024-02-28 11:39:33 +00:00
Derek Foreman
61cfabda5d vulkan/wsi/wayland: Give names to our Wayland event queues
Named queues just add a little bit more debugging information.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Derek Foreman
235144cf51 egl/wayland: Give names to our Wayland event queues
Named queues just add a little bit more debugging information.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Derek Foreman
eb1235f343 loader/wayland: Add named queue fallback
If libwayland isn't new enough to create event queues with names, just
throw away the name. It's just a debug feature anyway.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Collabora's Gfx CI Team
4e219a22e2 Uprev Piglit to 2a1c49a81cd9a6bf5d0c3a9b87225be94771ca96
e9316bcd12...2a1c49a81c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27375>
2024-02-28 10:22:38 +00:00
Caio Oliveira
803a1a5ada intel/brw: Remove automatic_exec_sizes
As Ken describes: "This was only used by legacy SF/Clip/FFGS programs."

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
dae59e7078 intel/brw: Remove runtime_check_aads_emit
It was used for Gfx4 payload.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
35b07ab035 intel/brw: Use a single register set
Different sets were needed for SIMD8/SIMD16 in old Gfx versions, but now
we can use a single one regardless of the SIMD size.

Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
3ef6fa3767 intel/brw: Remove Gfx8- fields from *_prog_data structs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00
Caio Oliveira
aff961f423 intel/brw: Remove Gfx8- fields from *_prog_key structs
Those are not used or relevant anymore.  Also update Iris accordingly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27691>
2024-02-28 05:45:39 +00:00