Commit graph

214263 commits

Author SHA1 Message Date
Caio Oliveira
3334284845 brw: Don't set destination of branch instructions
In Gfx9+ the destination should be set to ARF null in all those cases, the
use of IP was a requirement of old versions only.  The already zeroed
bits will encode ARF null, so no need to set.

Skipping the helper avoids setting unwanted bits (like hstride), which
in Gfx12+ are MBZ.

This patch adjust the expectations of the asm tests to remove the dst
type and dst stride fields -- will expect them all zeroed.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36454>
2025-10-30 17:18:15 +00:00
Caio Oliveira
8c45ff9acb brw: Set relevant immediate bits for Gfx9-11 in JIP and UIP helpers
This is better than using the generic helper since will not set unwanted
bits (e.g. hstride) and it is already handling their case for Gfx12+
anyway.

There's an extra helper now for the case where src1 is not used.  In
Gfx9-11 it needs to be set to ARF but with a matching type of src0.

Assembler was updated to follow the same approach.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36454>
2025-10-30 17:18:15 +00:00
Caio Oliveira
adc353da3c brw: Fix MOV_INDIRECT lowering for various platforms
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Even though some platforms support int64 they don't support indirect
movs with 64-bit values.  Effectively this is only supported for non-LP
Gfx9.

This fixes various tests in dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.*.push_constant.*64*
on BMG.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38125>
2025-10-30 16:06:42 +00:00
Caio Oliveira
538fd7266e brw: Fix EU validation of VxH and Vx1 region
Use same approach as the other code checking for this vstride.  Argument
could be made we want to reuse the same enum value for both the encoded
and decoded version, but for now follow the existing practice.

This will cause
dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.vulkan_memory_model.type_punning.load.push_constant.int64_to_uint64
and similar tests to fail validation on BMG.  Later patch will fix that.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38125>
2025-10-30 16:06:42 +00:00
Rob Clark
15924e941c loader: Ignore empty override strings
If you somehow have MESA_LOADER_DRIVER_OVERRIDE= in your environment,
you certainly weren't trying to force load the driver named "".

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38165>
2025-10-30 15:44:40 +00:00
Serdar Kocdemir
7bc14977a8 gfxstream: Check host allocation mode for external memory
New host feature allows usage of external_memory_host extension
for external memory support, mainly for software renderers which
don't implement platform specific extensions.

Also moves enablement of queue_family_foreign outside of android,
to allow it also on linux guests (ref: github PR#74), and removes
the check for VK_MVK_moltenvk extension in favor of metal mode.

Test: -gpu lavapipe -feature VulkanNativeSwapchain on windows

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
2025-10-30 15:27:26 +00:00
Jason Macnak
deb48556dc gfxstream: codegen changes for new filenames and namespaces
Bug: n/a
Test: build + CI

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
2025-10-30 15:27:26 +00:00
Gurchetan Singh
a85e9b8d8a gfxstream: fix build after VK 1.4.33.0 spec update
The root cause is "Add initial Vulkan Base support", which refactors
Vulkan versions into smaller features (base + graphics + compute).
Not sure if this is the cleanest solution, but someone needs to
refactor gfxstream codegen anyways.

There's also can issue with VkRenderingArea.

Fixes: 61c71733c8 ("vulkan: update spec to 1.4.330")
TEST=libgfxstream_vulkan.so + gfxstream_backend.so (host) commpiles
     with new changes

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38153>
2025-10-30 15:27:26 +00:00
Faith Ekstrand
ba2645bc6d nvk: Enable ASTC on Tegra
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:25 +00:00
Faith Ekstrand
f7412bd229 nvk: Add an NVK_DEBUG=coherent flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:24 +00:00
Faith Ekstrand
5a5862c025 nvk: Document some environment variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:23 +00:00
Faith Ekstrand
2f6b3b6b91 nvk: Don't re-initialize the descriptor writer if the set matches
The logic here before was wrong.  In the case where the set is the same,
it would avoid the flush but then re-initialize anyway, loosing the
dirty information and causing us not to actually flush out all the
descriptors.

Fixes: 1f0fda22f7 ("nvk: Flush descriptor set maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38163>
2025-10-30 15:11:23 +00:00
Mike Blumenkrantz
bae22fec7d zink: return mesh pipeline when creating mesh pipelines
Fixes: b05d93e71e ("zink: set gfx_pipeline_state::mesh_pipeline when updating pipeline")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38161>
2025-10-30 14:38:26 +00:00
Rob Clark
532a896f80 freedreno/a6xx: Additional handle import logging
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add additional error logging which can be enabled with
FD_MESA_DEBUG=layout to make it easier to debug handle
import failures.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37144>
2025-10-30 14:13:24 +00:00
Juan A. Suarez Romero
9d6bac7004 broadcom/ci: unlock more CI-Tron jobs
They will be run in parallel with baremetal ones, and after ensuring it
works fine, baremetal will be disabled.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38159>
2025-10-30 13:29:16 +00:00
Lorenzo Rossi
fa2c8c9d39 nak: Fix delay insertion missing WaR
Current code clears register writes after a register read is
encountered, this handles the first WaR but hides the write from the
reads that will succeed the first one. Ignoring subtle WaRaR hazards.
To fix this, we don't clear writes when a register read is encountered.

Thanks to Karol Herbst for finding and distilling this issue.

Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:12 +00:00
Lorenzo Rossi
7c39f69871 nak: Add cross-block instruction delay scheduling
Currently each block schedules instruction independently from other
blocks. Instructions in the block must then be scheduled conservatively
to remove possible hazards that can occur in previous blocks.

Replace the algorithm with an optimistic data-flow pass that takes into
account all the following blocks. Gains a minor performance improvement
across every shader (1-2%) and should never have any runtime performance
degradation.

Benchmarks:
furmark       34932 -> 35597 (+2%)
pixmark-piano 9027  ->  9113 (+1%)

Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:12 +00:00
Lorenzo Rossi
e6d4eaed2a nak/reg_tracker: Add SparseRegTracker
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:12 +00:00
Lorenzo Rossi
dac8fc93d9 nak: Add latency_upper_bound to ShaderModel
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:11 +00:00
Lorenzo Rossi
f1eb6d7d7b nak/dataflow: Fix typo in comments
Signed-off-by: Lorenzo Rossi <git@rossilorenzo.dev>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37108>
2025-10-30 12:49:11 +00:00
Christian Gmeiner
aa71c8bfed anv: Convert DEBUG_PIPE_CONTROL logging to use mesa_log_stream
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace direct FILE* operations (fputs/fprintf to stdout) with the
mesa_log_stream API for pipe control debug output.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38157>
2025-10-30 10:26:28 +00:00
Eric Engestrom
0fe0acd4c3 util/meson: don't build libmesa_util_clflush unless needed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: efbecd93ba ("util: Build util/cache_ops_x86.c with -msse2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38146>
2025-10-30 09:04:15 +00:00
Eric Engestrom
ccf33664e8 util/meson: don't build libmesa_util_clflushopt unless needed
Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38146>
2025-10-30 09:04:15 +00:00
Samuel Pitoiset
b2badb2b24 radv: ignore dual-source blending when blending isn't enabled for MRT0
The Vulkan spec says:
    "VUID-vkCmdDraw-maxFragmentDualSrcAttachments-09239
     If blending is enabled for any attachment where either the source
     or destination blend factors for that attachment use the secondary
     color input, the maximum value of Location for any output attachment
     statically used in the Fragment Execution Model executed by this
     command must be less than maxFragmentDualSrcAttachments"

Which means it must be disabled.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14190
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38107>
2025-10-30 07:59:50 +00:00
Samuel Pitoiset
14667eef53 radv: fix reserving enough space for emitting the SPM setup
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
4096 is an arbitrary but large enough number to emit everything needed.

Fixes: 22d73fc077 ("amd,radv,radeonsi: add ac_emit_spm_setup()")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38087>
2025-10-30 07:36:27 +00:00
Samuel Pitoiset
0dcb800a07 radv: remove some RADV_DEBUG deprecated options
They have been marked as deprecated in 25.3, so one release cycle
before they are removed completely.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38085>
2025-10-30 07:16:23 +00:00
Daniel Lang
48d6459701 etnaviv: Use FLOAT type for R32G32B32A32_{U,S}INT vertex formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The hardware requires FLOAT type in NFE.GENERIC_ATTRIB.CONFIG0 when
using 4-component 32-bit integer vertex attributes.

Passes dEQP-GLES3.functional.default_vertex_attrib.*

Signed-off-by: Daniel Lang <dalang@gmx.at>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38136>
2025-10-29 20:55:09 +00:00
Eric Engestrom
fdef10916e asahi/virtio: fix memleak
Fixes: c64a2bbff5 ("asahi: port to stable uAPI")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38149>
2025-10-29 20:41:29 +00:00
Pohsiang (John) Hsu
240b9159f4 mediafoundation: setup wpp logging in more of the files and add some error handling on dpb manager and reference frame tracker
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:28 +00:00
Pohsiang (John) Hsu
ab2457591b mediafoundation: periodic clang-format, no code changes
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:28 +00:00
Pohsiang (John) Hsu
d7e2754116 mediafoundation: for low latency, change stats pool size to 2, this is because there is no synchronization btwn returning MF sample and ProcessInput
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:28 +00:00
Silvio Vilerino
4169a7f36a mediafoundation: Add AVEncVideoReconstructedPictureOutputMode and MFSampleExtension_VideoEncodeReconstructedPicture
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:27 +00:00
Silvio Vilerino
0953924dbe mediafoundation: Add m_bHWSupportReadableReconstructedPicture
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
0aba51691b d3d12: d3d12_video_buffer - Expose associated data with subresource idx
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
db5d42d437 d3d12: video_processor: Use d3d12_video_buffer subresource indices
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
4fe1abe3dd d3d12: Support PIPE_BIND_SHARED resource creation
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
80627e3579 d3d12: Optimize d3d12_video_proc heap allocations
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:26 +00:00
Silvio Vilerino
484eeb762e d3d12: Support d3d12_video_buffer_creation_mode::place_on_resource in d3d12_video_buffer_from_handle
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:25 +00:00
Silvio Vilerino
e55b2b5064 d3d12: Add get_video_enc_last_slice_completion_fence interop
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:25 +00:00
Silvio Vilerino
a22334e632 d3d12: d3d12_video_proc - Use async residency functions
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:24 +00:00
Silvio Vilerino
5009fe8fd0 d3d12: Implement PIPE_VIDEO_CAP_ENC_READABLE_RECONSTRUCTED_PICTURE
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
2025-10-29 20:27:24 +00:00
Aitor Camacho
8e47589da8 kk: Add env variables to enable Xcode GPU capture
To enable GPU capture set MESA_KK_GPU_CAPTURE to 1
To dump GPU capture to a directory set MESA_KK_GPU_CAPTURE_DIRECTORY

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38068>
2025-10-29 20:13:53 +00:00
Aitor Camacho
6aff9d0ae8 kk: Fix Xcode GPU capture crash
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38068>
2025-10-29 20:13:53 +00:00
Mel Henning
bf58cfdc48 docs/envvars: Remove references to nine
nine is gone, so no need to document its env vars.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:39 +00:00
Mel Henning
93d51a423a docs/nvk: Document NVK_DEBUG=trash_memory
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:39 +00:00
Mel Henning
edd0cb6d56 docs/nvk: Update hardware support
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:39 +00:00
Mel Henning
b92521a019 docs/nvk: Add some developer hardware docs
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:38 +00:00
Mel Henning
0afd4bc831 docs/nvk: Add a list of external hardware docs
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37828>
2025-10-29 20:08:38 +00:00
Aitor Camacho
6da54821da kk: Reorder physical device extensions and features
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38137>
2025-10-29 19:33:35 +00:00
Aitor Camacho
6577d6c9f6 docs: Reorder VK_EXT_image_robustness
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38137>
2025-10-29 19:33:35 +00:00