Commit graph

70185 commits

Author SHA1 Message Date
Mike Blumenkrantz
1b0c377923 zink: slightly tighten the implicit feedback loop detection logic
parts of this are strict about using per-context flags but then using
res->fb_binds is potentially multi-context

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36029>
2025-07-09 18:42:48 +00:00
Mike Blumenkrantz
8090e24567 zink: assert that batches never use a timeline value of 0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36029>
2025-07-09 18:42:47 +00:00
Mike Blumenkrantz
767ecc27cb zink: enable img copy boxes for blit/copy ops
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this might enable reduced sync for successive copies

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36010>
2025-07-09 18:25:13 +00:00
Mike Blumenkrantz
b022cdc8a1 zink: only copy resource during add_bind if it is valid
this otherwise is a big no-op

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36010>
2025-07-09 18:25:13 +00:00
Daniel Stone
e59305c29f dri: Remove remnants of TexBuffer extension
This is no longer needed as a DRI extension.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:59 +00:00
Daniel Stone
a9298ca55c dri: Remove DRI2 loader extension
Now that all our backends are either swrast or using client image-based
allocation, we don't need the DRI2 loader interface anymore. Remove it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:59 +00:00
Daniel Stone
5be2e7f5c0 dri: Remove getBuffersWithFormat
This was only used for X11's DRI2, which we no longer have.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:58 +00:00
Daniel Stone
a8629e5622 dri: Remove dri2_from_names
This is now unused with the removal of X11 DRI2, and the wl_drm
pre-dmabuf path.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:58 +00:00
Daniel Stone
718ef151f2 egl/wayland: Remove support for non-dmabuf wl_drm
wl_drm is the legacy protocol which is used to support
EGL_WL_bind_wayland_display to exchange buffers between client and
server. It's supported dmabuf for a very long time, and as a private
protocol for Mesa's use, there is no need to carry around support for
old codepaths, as all relevant drivers support dmabuf.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:58 +00:00
Daniel Stone
08c6ba223b x11: Remove DRI2 support
DRI2 was hidden behind a legacy-x11 build option back in the 24.2
release. It's now been a year, so let's get on with removing it so we
can simplify our winsys interactions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
2025-07-09 17:49:58 +00:00
Mike Blumenkrantz
b0624f4034 cso: use unbind_trailing for sampler view unbinds on context unbinds
this is a bit less noisy for drivers

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36025>
2025-07-09 17:18:43 +00:00
David Rosca
a801df753c radeonsi/video: Fix assert in radeon_bs_code_ns
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It is valid for w to be 1, in that case nothing should be encoded
in the bitstream.
value must be lower than max, add that as an assert instead.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35648>
2025-07-09 16:30:38 +00:00
David Rosca
ad56f0122c radeonsi/video: Fix copy paste errors in HEVC header encoder
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35648>
2025-07-09 16:30:38 +00:00
David Rosca
4b472efb51 radeonsi/video: Fix RefRpsIdx calculation in st_ref_pic_set
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35648>
2025-07-09 16:30:38 +00:00
David Rosca
dc02b4358a frontends/va: Fix RefRpsIdx calculation in st_ref_pic_set
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35648>
2025-07-09 16:30:37 +00:00
Mike Blumenkrantz
a36536fb10 zink: zero the unordered access for images upon executing an ordered barrier
avoid keeping stale flags around

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36009>
2025-07-09 16:03:14 +00:00
Mike Blumenkrantz
be28daeef9 zink: use a rebind counter to manage descriptor rebinds
matching the pointers here breaks if pointers get reused, but a monotonically
increasing value will provide reliable comparison

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36009>
2025-07-09 16:03:14 +00:00
Gert Wollny
a94312511f r600: remove the use of separate nir options for fs
with lower_all_io_to_temps removed the shader options are now the
same for all shader types.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36013>
2025-07-09 13:51:24 +00:00
Gert Wollny
a43bfffe1e r600: Correct nir_indirect_supported_mask
The option lower_all_io_to_temps was only set to true for FS,
consequently the correct mask includes all shaders but the FS.

Fixes: a86f32a1ae
    etnaviv,r600,v3d,virgl: report correct nir_options::support_indirect_*

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36013>
2025-07-09 13:51:24 +00:00
Vitaliy Triang3l Kuzmin
1529f38086 r600/sfn: Fix scratch layout calculation for composite types
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35952>
2025-07-09 13:33:17 +00:00
Vitaliy Triang3l Kuzmin
554144ccfe r600/sfn: Remove unused r600_lower_scratch_addresses
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35952>
2025-07-09 13:33:17 +00:00
Boris Brezillon
d14f2df85a pan/kmod: Expose the raw GPU ID through pan_kmod_dev_props
Rather than splitting the GPU ID in two, let the GPU ID users do that
when they need.

We also rework the model detection to use a mask so we can customize
the mask if the version major/minor fields are required to differentiate
two GPUs with the same arch major/minor and product major.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35155>
2025-07-09 08:40:12 +00:00
Yogesh Mohan Marimuthu
e18da57276 radeonsi: replace fprintf stderr using mesa_log helper functions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
radeonsi driver error and warnings fprintf will only use mesa_log
helper functions.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35862>
2025-07-09 07:43:13 +00:00
Mike Blumenkrantz
eed207e597 lavapipe: fix advertised depth resolve modes
only sample0 is actually supported

Fixes: 07956bbcae ("lavapipe: VK_KHR_depth_stencil_resolve support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36004>
2025-07-09 05:48:22 +00:00
Rob Clark
5b619cc4b0 freedreno: Advertise external_only if we can't render
Don't claim we can render to formats unconditionally.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:45 +00:00
Rob Clark
29c342649d freedreno: Avoid unnecessarily aligning to gmem_align_w
If we aren't going to be rendering to this resource, we don't need to
take gmem alignment into account.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:45 +00:00
Rob Clark
70fe77f61b freedreno/a6xx: Allow suboptimal sampling formats when requested
We prefer PoT block sizes for various reasons, but if we are asked to
import 12/24/48b formats for sampling we can do so.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:45 +00:00
Rob Clark
63b33eb4d9 dri: Correct handle-usage flags
If we can only import for sampling from, don't tell the driver that we
want to render to the handle.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:43 +00:00
Rob Clark
ba7454a155 dri2+gallium: Support to import suboptimal formats
In some cases a format may be supported in a more limited way by the
hardware.  For example, formats with NPoT pixel sizes.  A driver might
normally prefer that mesa/st use R8G8B8X8 rather than R8G8B8.  But if
the user wants to (dma-buf/etc) import R8G8B8, it is still possible,
and in this case zero copy is more important.

So add a PIPE_BIND_x flag as a hint to the driver when checking if
a format is supported.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:43 +00:00
Rob Clark
34b61a23d2 freedreno/a6xx: Don't try to tile NPoT formats
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35982>
2025-07-08 19:05:43 +00:00
Konstantin Seurer
02d0b6bfa6 llvmpipe: Allocate some stuff on demand
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The memory footprint of the table has gotten quite out of hand (>3GB in
Control DX12). This patch brings that number down to around 3MB.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35959>
2025-07-08 18:22:12 +00:00
Konstantin Seurer
da1c8f6373 llvmpipe: Move allocation out of compile_sample_functions
Makes it much more clear what is happening.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35959>
2025-07-08 18:22:12 +00:00
Daniel Schürmann
2c51a8870d nir: add nir_vectorize_cb callback parameter to nir_lower_phis_to_scalar()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Similar to nir_lower_alu_width(), the callback can return the
desired number of components for a phi, or 0 for no lowering.

The previous behavior of nir_lower_phis_to_scalar() with lower_all=true
can be elicited via nir_lower_all_phis_to_scalar() while the previous
behavior with lower_all=false now corresponds to nir_lower_phis_to_scalar()
with NULL callback.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35783>
2025-07-08 15:33:59 +00:00
Corentin Noël
8c96b9b9c7 virgl: Add more Gallium formats to the list
Include the recently added formats.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35908>
2025-07-08 15:14:37 +00:00
Pohsiang (John) Hsu
5c1f45a21b mediafoundation: fix cropping flag when using software sample
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35981>
2025-07-08 14:50:29 +00:00
Pohsiang (John) Hsu
42674c0df1 mediafoundation: make file version the same as product version, and increment version to 1.0.6
for 1.0.5 release, File version was showing 1.0.0.0 and Production version was showing 1.0.5.0.
now both show 1.0.6.0.

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35981>
2025-07-08 14:50:28 +00:00
Valentine Burley
fd073bc1c3 zink/ci: Update restricted trace checksums
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These changed with b61e6b9748 ("zink: enable ioopt by default").

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36003>
2025-07-08 14:34:42 +00:00
Marek Olšák
dd06c24577 gallium/noop: fix a crash in sampler_view_release
This fixes running shader-db with GALLIUM_NOOP, which is good for
measuring only GLSL/frontend compile times.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35995>
2025-07-08 13:39:15 +00:00
Calder Young
a39779e695 iris: Fix issue with conditional dispatching
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35946>
2025-07-08 10:00:45 +00:00
Samuel Pitoiset
9ae5078e99 zink/ci: update list of expected failures for RADV
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35996>
2025-07-08 07:12:40 +00:00
Marek Olšák
89285e25b6 nir: remove nir_shader_compiler_options::lower_all_io_to_temps
All drivers should report support_indirect_* correctly, so this
is redundant.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:43 +00:00
Marek Olšák
8def3f865d agx,freedreno,intel,lima,panfrost,svga,virgl,zink: fix supports_indirect_inputs
The GLSL compiler always lowers inputs to temps for VS and GS, so exclude
them from driver support because the GLSL compiler will no longer do that
unconditionally. Thus, indirect VS and GS inputs are completely untested
and broken in a lot of drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:42 +00:00
Marek Olšák
a86f32a1ae etnaviv,r600,v3d,virgl: report correct nir_options::support_indirect_*
These drivers set lower_all_io_to_temps = true, which means all indirect
access is always lowered except TCS, which is skipped by
nir_lower_io_vars_to_temporaries. Based on that, these drivers have never
received indirect IO for non-TCS shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
2025-07-08 06:11:42 +00:00
Konstantin Seurer
a3785ff131 ci/llvmpipe: Update expectations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
12fd20bbb5 lavapipe: Implement VK_KHR_workgroup_memory_explicit_layout
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
d519f917e1 llvmpipe: Use the correct field to decide if coroutines are used
Fixes: 92083fc ("llvmpipe: Do not use coroutines when they are unnecessary")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
19d5d82d6f lavapipe: Implement VK_EXT_depth_bias_control
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
b30bebf38e llvmpipe: Improve depth bias rounding workaround
Multiplying by 2 is too conservative to pass depth bias control CTS.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
84f581c659 llvmpipe: Implement pipe_rasterizer_state::offset_units_unscaled
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00
Konstantin Seurer
803521f416 gallium: Add back pipe_rasterizer_state::offset_units_unscaled
The field was removed with the nine removal but it is needed for depth
bias control on Vulkan.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
2025-07-07 23:05:11 +00:00