Commit graph

188806 commits

Author SHA1 Message Date
Danylo Piliaiev
9666756f60 tu: Handle non-overlapping WaW hazard with buffer copy/fill/update
Copies/fills/updates for buffers are happening through CCU but need
additional synchronization when write range is not aligned to 64 bytes.
Because dst buffer access uses either R8_UNORM or R32_UINT and they are not
coherent between each other in CCU since format seem to be a part of a
cache key.

See: https://gitlab.khronos.org/vulkan/vulkan/-/issues/3306

The synchronization with writes from UCHE (e.g. with SSBO stores) are
solved by the fact that UCHE has byte level dirtiness tracking and that CCU
flush would happen always before UCHE flush for such case (e.g. both
renderpass and dispatch would flush pending CCU write).

Additionally see:
https://gitlab.khronos.org/vulkan/vulkan/-/issues/3398#note_400111

Fixes geometry corruption and potentially hangs in Resident Evil 3.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28469>
2024-05-07 12:43:27 +00:00
Connor Abbott
4cefb5ece8 docs/android: Fix example meson cross file again
I copied it over wrong, it should be cpu_family that's changed to
aarch64 to avoid "error: undefined symbol: blake3_hash_many_neon".

Fixes: 57abef5af1 ("docs/android: Fix example meson cross file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29081>
2024-05-07 12:34:07 +00:00
Connor Abbott
59192b851f freedreno: Update HLSQ_*_CMD registers for a7xx
These are used when reading CP_MEMPOOL contents in devcoredumps and in
SQE source.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27266>
2024-05-07 12:05:11 +00:00
Connor Abbott
13fdde0c7d freedreno/crashdec: Initial a7xx support
There are more things to do, e.g. BV mempool dumping and estimating the
BV location. However this is a good start.

The expanded register size is because the reglist includes registers
from other cores and these are read the same as any other GPU register.
Note that this is also the actual range of type4 packets, even though
registers higher than 0xffff are all protected. Right now these are
skipped on page faults but still read with the crashdumper for hangs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27266>
2024-05-07 12:05:11 +00:00
Constantine Shablia
81f42d82ed panfrost: report correct MAX_VARYINGS
Fixes packing-varying piglit failures

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29017>
2024-05-07 11:37:18 +00:00
Boris Brezillon
4c74d14730 pan/kmod: Make default allocator thread-safe
Allocations targeting a pan_kmod_dev can happen concurrently, so we
need the pan_kmod_dev allocator to be thread-safe.

ralloc() is not thread-safe, and we don't really need a hierarchical
allocator in this context anyway, so let's just switch to calloc/free
instead.

Fixes: d95ec56f8c ("panfrost: Abstract kernel driver operations")
Reported-by: Eric Smith <eric.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Eric Smith <eric.smith@collabora.com>
Reviewed-by: Eric Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
2024-05-07 11:11:28 +00:00
Boris Brezillon
068d111884 pan/kmod: Fix a syncobj leak in the panthor backend
Make sure we release the syncobj attached to the BO if the object is
sharable.

Fixes: 97f6a62f7e ("pan/kmod: Add a backend for panthor")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Constantine Shablia <constantine.shablya@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
2024-05-07 11:11:28 +00:00
Boris Brezillon
2cc317763c panfrost: Add the BO containing fragment program descriptor to the batch
On pre-Valhall HW, the fragment shader metadata was part of the RSD
(renderer state descriptor), which was emitted at draw time, but
Valhall introduces a shader program descriptor containing only the
shader information, and this one is emitted at shader preparation
time.

If we don't add the FS state BO to batch, we might end up with a batch
being executed after the shader object has been destroyed, leading to
page faults when the GPU tries to access the shader program descriptor.

We make the panfrost_batch_add_bo() unconditional since it gracefully
handles the NULL case (which will happen on v7-).

Fixes: 087b63cb07 ("panfrost: Allow uploading fragment SPDs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
2024-05-07 11:11:28 +00:00
Samuel Pitoiset
31b039d8b7 radv: advertise VK_KHR_dynamic_rendering_local_read
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27263>
2024-05-07 10:35:04 +00:00
Samuel Pitoiset
c533a79878 radv: implement VK_KHR_dynamic_rendering_local_read
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27263>
2024-05-07 10:35:04 +00:00
Samuel Pitoiset
53a142ad23 aco: add support for remapping color attachments
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27263>
2024-05-07 10:35:04 +00:00
Sergi Blanch Torne
39379e30db mr-label-maker: specialize CI labels
Some CI people proposed to split the label for the expectation files in
issue #10965. The proposal also thought to label as `trace` changes on the
configuration files for those tests.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29016>
2024-05-07 10:28:08 +00:00
Eric Engestrom
a30e6b9afc ci: backport fix for gl_PointSize bug in CTS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29076>
2024-05-07 09:43:57 +00:00
Tapani Pälli
cbe2630f19 iris: change stream uploader default size to 2MB
Patch bumps up the size to the 2MB alignment, this fixes rendering
issues with Star Wars KOTOR when VBO's are not used (which is the
default setting).

Fixes: 0b6693a3a1 ("iris: Align fresh BO allocations to 2MB in size")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10863
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28974>
2024-05-07 09:20:06 +00:00
Oskar Viljasaar
2d575034f2 hasvk: switch to use runtime physical device properties infrastructure
Remove the GPDP and GPDP2 entrypoints, and fill the properties
at device initialization time instead.
Move DRM master major/minor gathering before get_properties() and WSI
init, as the latter uses the results gathered by the former.

Reviewed-by: Julia Tatz <tatz.j@northeastern.edu>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27717>
2024-05-07 08:45:18 +00:00
Oskar Viljasaar
55967a411d anv: Move completely over to common runtime GetPhysicalDeviceProperties2
The runtime grew support for VkPhysicalDevicePresentationPropertiesANDROID,
so we can use that now and get rid of anv_GetPhysicalDeviceProperties2.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27717>
2024-05-07 08:45:17 +00:00
Lionel Landwerlin
c0fcc0a2fd docs: update anv features
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29070>
2024-05-07 08:16:22 +03:00
Lionel Landwerlin
8c1cc405d3 anv: VK_EXT_legacy_vertex_attributes
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29070>
2024-05-07 08:16:20 +03:00
Timothy Arceri
3d20245f43 glsl: wrap nir_opt_loop in NIR_PASS()
Otherwise we miss the debugging benefits.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29079>
2024-05-07 04:11:36 +00:00
Faith Ekstrand
d2e5ff0585 nouveau/headers: Clean up the meson a bit
The classes don't need the _push prefix and the depend files is
pointless since we already include the python script as an input file to
the custom_target().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29028>
2024-05-07 03:15:02 +00:00
Yusuf Khan
a6036033f0 nouveau/headers: Make nvk_cl**** turn to nv_push_cl****
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29028>
2024-05-07 03:15:02 +00:00
Faith Ekstrand
8a0afd1276 nvk: Advertise VK_EXT_pipeline_robustness
The common pipeline cache implementaiton gives us this for free.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9643
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28655>
2024-05-06 22:59:54 +00:00
Faith Ekstrand
cda0d6331b nouveau/class_parser.py: Fix the docs for --out-rs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28655>
2024-05-06 22:59:54 +00:00
Sagar Ghuge
e32828f5fc intel/compiler: Fix destination type for CMP/CMPN
For CMP/CMPN, use src0 type if destination is null otherwise get the
src0 type register with destination register size.

This fixes dEQP-VK.glsl.builtin_var.frontfacing.* tests cases on Xe2+.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28679>
2024-05-06 21:46:18 +00:00
Christian Gmeiner
6c5acc6db7 etnaviv: Zero init all srcs passed to etna_emit_alu(..)
During etna_assemble(..) we check if the uniform usage is valid for
the target GPU. As we do not fully init the srcs, it can happen that
we look at random data during the uniform check. This generates
false positive "generating instruction that accesses two different uniforms"
errors.

Fixes: 5aede1a157 ("etnaviv: isa: Do src swizzle with isaspec")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29048>
2024-05-06 21:27:49 +00:00
Mykhailo Skorokhodov
1cc4812398 ci/lima: expect fail of window_8888_colorspace_srgb on wayland
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29052>
2024-05-06 20:55:59 +00:00
Mykhailo Skorokhodov
066fc39f45 egl/wayland: Fix sRGB format look up for config
That check should help with situations when
the dri2_wl_visual_idx_from_pipe_format function
can't recognize pipe_format as before.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10829
Fixes: 6a084e2b("egl/wayland: Use pipe_format to look up configs")
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29052>
2024-05-06 20:55:59 +00:00
Eric Engestrom
c26fc237bb lavapipe/ci: skip two more timing out ray query tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29078>
2024-05-06 20:36:52 +00:00
Zan Dobersek
d17e9994e4 freedreno: add a7xx perfcounter support
Add performance counting support for a7xx in Freedreno, providing the
available performance counter groups along with the lists of countables
that can be counted through related counters.

All the collected countable names and values are provided in enum
definitions, even when the names indicate some countables being reserved.
The perfcounter groups don't include those reserved values.

The countable selection command stream in fdperf is enabled for a7xx,
sharing the same command stream created for 5th- and 6th-gen devices.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27483>
2024-05-06 19:56:43 +00:00
Zan Dobersek
5fb8ab62d2 fdperf: simplify counter value output
Instead of the ratio of counter value change in a certain sampling window,
display the raw integer change of that counter value. Counters counting
countables with names indicating cycle values still have that ratio
computed and printed alongside the raw value.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27483>
2024-05-06 19:56:43 +00:00
Zan Dobersek
bc6cee935e fdperf: improve reads of counter values
The counter values on Adreno are 64-bit values, but only their lower
32 bits have been read until now.

This change switches to reading the complete 64-bit value, storing that
value and the delta against the previous value for each counter. Similar is
done for time values, namely storing the time value and the delta against
the previous value (in microseconds) for each counter. The deltas are then
used to compute the counter change per second, as was done before.

In curses UI, an early sampling is done during setup in order to avoid
artificially-large values popping up in the first update due to the deltas
being calculated to initially-zero values.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27483>
2024-05-06 19:56:43 +00:00
Zan Dobersek
9a45487708 fdperf: prettify logic around the reserved CP counter
fdperf reserves the first CP counter for measuring the GPU frequency.
A new flag is added to the fdperf's counter struct type, the flag being
enabled for the first CP counter during counter setup.

Different tests on group and counter indices are replaced by testing for
this flag's value. Only exception is the restore_counter_groups()
functionality, where now this reserved CP counter is also reselected with
the persistent CP_ALWAYS_COUNT countable value, in case some other program
overrides it.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27483>
2024-05-06 19:56:43 +00:00
Zan Dobersek
547f20773c fdperf: select_counter() should work with a countable value
Right now select_counter() is called with values of specific countables
that should be tracked in the given counter, but it treats those values
as indices into the array of all available countables for a given counter
group. This works right now since all countable values for any counter
group are sequential, but that won't be the case on a7xx.

To address that, select_counter() is adjusted to find the index of the
specified countable value, and use that to store the label pointer that
should be displayed for the desired counter.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27483>
2024-05-06 19:56:42 +00:00
Zan Dobersek
704cceab30 fdperf: use snprintf instead of asprintf
Use on-stack string buffers and snprintf to compose formatted output in
fdperf. This removes a couple of current compiler warnings due to unused
asprintf return values.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27483>
2024-05-06 19:56:42 +00:00
Samuel Pitoiset
17fcb86a26 vulkan: Update XML and headers to 1.3.284
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29056>
2024-05-06 19:14:57 +00:00
Samuel Pitoiset
c9162034bc radv: precompute DB_SHADER_CONTROL for fragment shaders later
To regroup all precomputed register values.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022>
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
c658ed5136 radv: precompute vertex shader register values
To make emission faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022>
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
4b53d36f0d radv: precompute legacy GS register values
To make emission faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022>
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
fa9b0ee86c radv: precompute mesh shader register values
To make emission faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022>
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
7f7ef10bea radv: precompute fragment shader register values
To make emission faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022>
2024-05-06 18:00:02 +00:00
Samuel Pitoiset
e5bc4d85bb radv: precompute existing legacy GS register values later
To precompute all registers at the same place.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29022>
2024-05-06 18:00:02 +00:00
David Rosca
88dfe04b08 Revert "radeonsi/vcn: AV1 skip the redundant bs resize"
Currently ffmpeg has a bug in VAAPI AV1 decode that in some cases
it submits the same slice data buffer as many times as there is tiles.
However, in other cases it behaves correctly and all slice data buffers
contain different parts of bitstream to decode which this change breaks.

Now that the va frontend is passing correct offsets, this fixes decoding
AV1-TEST-VECTORS/av1-1-b8-22-svc-L1T2 with ffmpeg.

This reverts commit e6701f7231.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28960>
2024-05-06 17:23:09 +00:00
David Rosca
6746d4df6e frontends/va: Fix AV1 slice_data_offset with multiple slice data buffers
The slice parameter data offset refers to offset in the submitted data buffer.
When multiple slice data buffers are submitted, the offsets of all slices needs
to be adjusted to be based from the start of the first data buffer.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28960>
2024-05-06 17:23:09 +00:00
Karol Herbst
569c2fcf95 nir: fix nir_shader_get_function_for_name for functions without names.
It's legal in SPIRV for functions to not have names, we have to take this
into account when calling into strcmp here.

Fixes: 2aa9eb497d ("nir: Add a helper for finding a function by name")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29063>
2024-05-06 16:45:51 +00:00
Mike Blumenkrantz
13bd413860 zink: clean up accidental debug print
Fixes: 19e8df39b6 ("zink: slightly better swapinterval failure handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29065>
2024-05-06 16:11:32 +00:00
Patrick Lerda
f848921148 clover: fix pipe_box update regression
Indeed, clover was processing the pipe_box elements with a hardcoded
order. The update of the pipe_box object broke clover.

Fixes: 651191801a ("gallium: increase the size of pipe_box y, height fields to allow bigger textures")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29060>
2024-05-06 14:30:38 +00:00
Georg Lehmann
e7b942393a aco/tests: simplify small constant copy test
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29045>
2024-05-06 13:38:14 +00:00
Georg Lehmann
44cc0d31b8 aco/gfx10: use v_add_u16 with literal for constant copies
This also means the v_perm_b32 path is now unused.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29045>
2024-05-06 13:38:14 +00:00
Georg Lehmann
7823065f64 aco/gfx11+: use v_cvt_pk_u8_f32 for 8bit constant copies
Foz-DB Navi31:
Totals from 201 (0.25% of 79395) affected shaders:
Instrs: 186869 -> 186857 (-0.01%)
CodeSize: 1026760 -> 1026700 (-0.01%); split: -0.01%, +0.00%
Latency: 2302050 -> 2301969 (-0.00%)
InvThroughput: 739466 -> 739431 (-0.00%)
Copies: 26467 -> 26454 (-0.05%)
VALU: 93529 -> 93516 (-0.01%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29045>
2024-05-06 13:38:14 +00:00
Juan A. Suarez Romero
23368f8c0c vc4: set src type on storing sample mask
Otherwise NIR validation will fail.

Fixes: 1632948a76 ("nir: validate src_type of store_output intrinsics, require bit_size >= 16")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29038>
2024-05-06 13:16:45 +00:00