Commit graph

213673 commits

Author SHA1 Message Date
Faith Ekstrand
a5e87d06c6 nvk: Flush indirect execution set maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:54 -04:00
Faith Ekstrand
1f0fda22f7 nvk: Flush descriptor set maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:54 -04:00
Faith Ekstrand
14bad31608 nvk: Route more descriptor types through write_desc()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:54 -04:00
Faith Ekstrand
f184dfee10 nvk: Add an nvk_descriptor_writer
This cleans things up a bit and will make it way easier to track memory
ranges in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:54 -04:00
Faith Ekstrand
21d53bfdef nvk: Use a pool offset instead of an address in nvk_descriptor_set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
48f5a8d947 nvk: Use _B suffixes in descriptor sets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
a7e79f7839 nvk: Flush/invalidate around host image copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
2f6a137ede nvk: Flush the zero page
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
cd78989681 nvk: Flush after zeroing memory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
247ebf61cb nvk/mem_stream: Flush maps in nvk_mem_stream_flush()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
01e56f408b nvk: Flush descriptor tables and heap maps on submit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
4d04baba7d nvk: Use a coherent map for the event heap
Events are synchronization objects.  They really need to be coherent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
870d3f1636 nvk/nvkmd: Invalidate maps before dumping pushbufs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
c04dacb42c nvk: Flush pushbufs in EndCommandBuffer()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
fac856112e nvk: Implement Flush/InvalidateMappedMemoryRanges()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
986c2cfed9 nvk/nvkmd: Add map sync to/from GPU helpers
If we have the ability to do cache ops from userspace (true on x86 and
aarch64), that's preferred.  Otherwise, we call into a back-end hook to
trap through to the kernel.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
fcb6c5c7a6 nvk/nvkmd: Add an NVKMD_MEM_COHERENT flag
All discrete GPU maps are coherent but that's not true on Tegra.  We
need a way to request coherent memory and also to ask for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
dd53232667 nouveau/winsys: Add a NOUVEAU_WS_BO_COHERENT flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
2025-10-15 22:05:53 -04:00
Faith Ekstrand
72c9256d8f turnip: Use the util cache helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:45 +00:00
Faith Ekstrand
1fbc73836e intel: Drop intel_mem.c/h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:45 +00:00
Faith Ekstrand
f4a4c95d0c crocus: Use util_flush_inval_range()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:45 +00:00
Faith Ekstrand
77bea994b4 intel/sanitize-gpu: Use util_flush_inval_range()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:45 +00:00
Faith Ekstrand
7b77906a0c anv: Switch to util/cache_ops.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:44 +00:00
Faith Ekstrand
6d67828839 hasvk: Switch to util/cache_ops.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:44 +00:00
Faith Ekstrand
a47184e396 util/cache_ops/x86: Call util_get_cpu_caps() less
This also makes all the paths a bit more clear because we only ever
clflushopt on the clflusopt paths and only ever clflush on the clflush
paths.  It's really not much more code or logic duplication.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:44 +00:00
Faith Ekstrand
555881e574 util/cache_ops: Add some cache flush helpers
The x86 implementation was shamelessly stolen from intel_mem.c and the
aarch64 implementaiton was based on the code in Turnip.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
2025-10-16 01:19:44 +00:00
Ian Romanick
1dea86f773 brw: Don't do non-obvious things with BFN parameter ordering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Somehow dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_1.atan_frag
was able to generate a bitfield_select with a constant first
parameter. That makes the big comment here completely false.

Don't be clever. If the constant is in the wrong place,
commute_immediates during copy propagation will fix it.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37891>
2025-10-16 00:37:30 +00:00
Ian Romanick
85db960e37 brw: Mark src3 of BFN as is_control_source
This prevents lower_regioning from doing bad things when the destination
and all the other sources are UW.

Other solutions considered:

- Have the type of src[3] match the destination type. This also required
  changes in combine_constants to allow the type be UD or UW.
- Make a new subclass brw_bfn_inst, and store the Boolean function
  selector outside the src[] array. This was a lot more code and a lot
  more churn (+47,-27 vs +4).

Fixes: b948e6d503 ("brw: Use BFN to implement nir_opt_bitfield_select")
Suggested-by: Curro
Suggested-by: Ken
Closes: #14095
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37891>
2025-10-16 00:37:30 +00:00
Sergi Blanch Torne
d0af217911 ci: Add missing aiohttp Python dependecy
Found a missing dependency for `pipeline_message.py`.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37868>
2025-10-15 23:48:53 +00:00
Alyssa Rosenzweig
84d8e6824b treewide: don't check before free
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was something that came up in the slop MR. Not sure it's actually a
good idea or not but kind of curious what people think, given we have a
sound tool (Coccinelle) to do the transform. Saves a redundant branch
but means extra noninlined function calls.. likely no actual perf impact
but saves some code.

Via Coccinelle patches:

    @@
    expression ptr;
    @@

    -if (ptr) {
    -free(ptr);
    -}
    +free(ptr);

    @@
    expression ptr;
    @@

    -if (ptr) {
    -FREE(ptr);
    -}
    +FREE(ptr);

    @@
    expression ptr;
    @@

    -if (ptr) {
    -ralloc_free(ptr);
    -}
    +ralloc_free(ptr);

    @@
    expression ptr;
    @@

    -if (ptr != NULL) {
    -free(ptr);
    -}
    -
    +free(ptr);

    @@
    expression ptr;
    @@

    -if (ptr != NULL) {
    -FREE(ptr);
    -}
    -
    +FREE(ptr);

    @@
    expression ptr;
    @@

    -if (ptr != NULL) {
    -ralloc_free(ptr);
    -}
    -
    +ralloc_free(ptr);

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v3d]
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> [venus]
Reviewed-by: Frank Binns <frank.binns@imgtec.com> [powervr]
Reviewed-by: Janne Grunau <j@jannau.net> [asahi]
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> [radv]
Reviewed-by: Job Noorman <jnoorman@igalia.com> [ir3]
Acked-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Job Noorman <jnoorman@igalia.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37892>
2025-10-15 23:01:33 +00:00
Dave Airlie
543c9be87a nir/coopmat: fix non square load/store lowering for flexible dimensions
This shouldn't affect radv, but we should do the calculations correctly for
when non-square matters.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37879>
2025-10-16 07:19:28 +10:00
Tomeu Vizoso
836e1d65f6 teflon: Link to the ethos driver
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Tomeu Vizoso
bb72d78b2c pipe-loader: Load the ethos accel driver
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Tomeu Vizoso
2581c3ab60 ethos: Initial commit of a driver for the Arm Ethos-U65 NPU.
Supports all models in the test suite. No optimizations implemented yet.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Tomeu Vizoso
b3262b37ce teflon: Add support for the ResizeNearestNeighbor operation
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Tomeu Vizoso
0001dab219 teflon: Add support for the StridedSlice operation
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:14 +00:00
Tomeu Vizoso
83b9eb038f teflon: Add support for the MaxPool operation
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:13 +00:00
Tomeu Vizoso
48983c3198 teflon/tests: Replace YOLOX model with that from TI
The one we are testing currently with doesn't have a properly maintained
upstream repository nor demo.

Use the model from TI's zoo so we benefit from their maintenance:

https://github.com/TexasInstruments/edgeai-yolox

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:13 +00:00
Romaric Jodin
d0de915c0c glapi: static_data: do not use __file__ to get gl symbols file
Use an explicit path for libgl-symbols.txt from the build system
instead of reconstructing it from __file__.

The issue is that for Android build system, everything is sandboxed
and that file is not in the same root as the python script. Thus we
need a proper explicit path in meson to be able to translate it to a
legal Android construct that is capable of finding that file.

Update everything using libgl_public_functions to propagate that path.

Ref #14072

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37866>
2025-10-15 19:38:40 +00:00
Ruijing Dong
6e1988e3ed radeonsi/vcn: Correct a typo condition for jpeg decoding
Checking dec->jctx[i] instead of sctx->ctx

Cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37875>
2025-10-15 19:04:19 +00:00
Danylo Piliaiev
9f85c8897a tu: Synchronize access to copy_timestamp_cs_pool
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
tu_u_trace_submission_data_finish happens on the other thread than
tu_create_copy_timestamp_cs.

Fixes: 6e5944ec4b ("tu: Cache copy timestamp cs to avoid allocations on submit")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37848>
2025-10-15 18:43:32 +00:00
Timur Kristóf
4982f435f9 radv: Document SWITCH_ON_EOP and WD_SWITCH_ON_EOP
Just add some code comments for the next person trying to
understand these bits. No functional changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
2025-10-15 18:08:50 +00:00
Timur Kristóf
8ea08747b8 radv: Mitigate GPU hang on Hawaii in Dota 2 and RotTR
Mitigate a GPU hang in Dota 2 and Rise of the Tomb Raider
by reducing the primitive rate for triangle lists.
This workaround is not documented by AMD and may not be correct.

The problem isn't well understood and needs further investigation
to narrow down what the root cause is. Until then, it's better
to give users something that works, even if not optimal.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
2025-10-15 18:08:50 +00:00
Timur Kristóf
6f499141f5 radv: Disable compute queues when the regalloc bug is present
Compute queues may run compute dispatches in parallel with
the graphics queue, even from other processes/apps.
At the moment we can't make sure that all compute shaders
use a workgroup size of 256 to mitigate the regalloc hang,
so disable compute queues on affected chips.

Can be reverted if a better mitigation is found in the future.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
2025-10-15 18:08:49 +00:00
Timur Kristóf
765a748840 radeonsi: Don't use compute queue with regalloc hang bug
It already didn't use compute queues on GFX6, but some GFX7
chips are also affected by the same bug.

Compute queues may run compute dispatches in parallel with
the graphics queue, even from other processes/apps.
At the moment we don't have a way to restrict all workgroups
to 256 invocations, so instead let's make sure not to use the
compute queue.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37885>
2025-10-15 18:08:49 +00:00
Autumn Ashton
15d375dc6e nvk: Implement VK_NVX_image_view_handle
This is used by DLSS to pass in image view
descriptors via parameter buffers for its
kernel launches.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37889>
2025-10-15 17:53:06 +00:00
Caio Oliveira
f861cd47d6 brw: Add variable for opcode in the brw_set_* high-level helpers
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37896>
2025-10-15 17:22:04 +00:00
Eric Engestrom
12a4d68580 docs: add sha sum for 25.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37895>
2025-10-15 17:17:21 +00:00
Eric Engestrom
d13c1d9ec2 docs: add release notes for 25.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37895>
2025-10-15 17:17:21 +00:00
Eric Engestrom
5ae1d09220 docs: update calendar for 25.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37895>
2025-10-15 17:17:21 +00:00