Commit graph

185517 commits

Author SHA1 Message Date
Mike Blumenkrantz
cda627eb48 drisw/winsys: loop over all the boxes in display()
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
389e83c4fe drisw/xlib: loop over all the boxes in display() hook
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
c83768c76c egl/wayland/sw: clamp putimage geometry to surface size
this otherwise writes oob

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
fa465e34ca egl/wayland/sw: pass damage region through from put_image2 to wl_surface_damage
this propagates damage from drisw to wayland; y inversion matches protocol

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
d90b14c768 egl/wayland/sw: fix no-op updating of current backbuffer
if the frontbuffer is the backbuffer then its contents are up-to-date

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
75cf82005d egl/wayland/sw: move partial->full copy promotion to swapbuffers
this will ensure that the wl_buffer data is always fully updated

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
425d919b0a egl/wayland/sw: trigger damage from put_image2
no functional changes currently

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
e4db8c6e8d egl/wayland/sw: call dri2_wl_swrast_attach_backbuffer() before swap
should be no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
448cd2cd37 egl/wayland/sw: split out surface attach from dri2_wl_swrast_commit_backbuffer()
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
cce12981e4 egl/wayland: unify back/current swapping between zink and swrast
these are functionally the same, they just happened in different places

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
73a3a1c646 egl/wayland/sw: move dri2_wl_swrast_commit_backbuffer() directly into swapbuffers
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
81e5f9c398 egl/wayland/sw: move swrast_update_buffers() directly into swapbuffers
no functional changes

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
fd6f7e3f16 drisw: plumb through a swapBuffersWithDamage interface
currently the same as regular swap

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:23 +00:00
Mike Blumenkrantz
3aea0e31a4 winsys/sw: propagate nboxes to displaytarget_display()
only a single box region is used

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:22 +00:00
Mike Blumenkrantz
3cca761934 gallium: add a nboxes param to flush_frontbuffer
this allows conveying damage regions through the sw presentation interface

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
2024-02-29 01:15:22 +00:00
Boyuan Zhang
74f6392545 meson: bump the minimal required vdpau version to 1.4
VDP_YCBCR_FORMAT_P010 and VDP_YCBCR_FORMAT_P016 require ver 1.4 or above

Fixes: c3ceec6cd8 ("vdpau: Refactor query for video surface formats.")

Cc: mesa-stable

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27857>
2024-02-29 00:32:45 +00:00
Eric Engestrom
cdab305e36 docs: update calendar for 24.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27858>
2024-02-29 00:25:04 +00:00
Eric Engestrom
d4de363278 docs: add sha256sum for 24.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27858>
2024-02-29 00:25:04 +00:00
Eric Engestrom
64eb09cd7c docs: add release notes for 24.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27858>
2024-02-29 00:25:04 +00:00
Yiwei Zhang
83f3b1d76a venus: mandate a few venus capsets long required before 1.0
Just a clean up. Venus driver can no longer work without those.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27842>
2024-02-29 00:05:13 +00:00
José Roberto de Souza
661ddf6084 intel/nullhw: Fix 32bits compilation warnings
../src/intel/nullhw-layer/intel_nullhw.c: In function ‘new_device_data’:
../src/intel/nullhw-layer/intel_nullhw.c:65:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   65 | #define HKEY(obj) ((uint64_t)(obj))
      |                    ^
../src/intel/nullhw-layer/intel_nullhw.c:193:15: note: in expansion of macro ‘HKEY’
  193 |    map_object(HKEY(data->device), data);

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27854>
2024-02-28 23:37:43 +00:00
José Roberto de Souza
209ae6bd41 intel/tools: Fix compilation in 32 bits
u64 is long long in 32 bits.

Fixes: 90e38bbb3b ("intel/tools/error_decode: Parse Xe KMD error dump file")
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27854>
2024-02-28 23:37:43 +00:00
Mark Collins
1ba6ccc51a tu: Unconditionally enable GMEM on A7XX
GMEM is at parity with A7XX sysmem in terms of functionality so it's
safe to enable it without any conditions now.

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
de3dc30a29 tu: Add blit cache flushing for input attachments
Input attachments which read GMEM via the UCHE aperture need to
flush the blit cache on A7XX and wait for the writes to land, this
implements it as access flags and a pending flush with special
semantics.

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
0cf27a7236 tu: Clear VSC_UNKNOWN_0D08 on A7XX
This register is set by the proprietary driver along with other VSC state
for binning, the stale value of this register set by the prop driver was
being used by Turnip resulting in crashes that were exclusive to Android
due to only running the prop driver alongside Turnip there.

The fix is to emit this new register alongside all other VSC state inside
the `update_vsc_pipe` function.

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
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