Commit graph

70201 commits

Author SHA1 Message Date
Sagar Ghuge
9b5149cb74 iris: Set TG size based on number of threads
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35904>
2025-07-10 22:08:36 +00:00
José Roberto de Souza
06997a42a3 iris: Program DispatchWalkOrder and ThreadGroupBatchSize with optimized values for regular computer walkers
It was only added to indirect compute walkers while HSD don't say
anything about this optimization be specific to indirect compute
walkers.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36058>
2025-07-10 20:54:30 +00:00
Alyssa Rosenzweig
b5f56fb47b asahi: use nir_rewrite_image_intrinsic
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35949>
2025-07-10 14:55:18 -04:00
Alyssa Rosenzweig
ee26938faf nir,agx: switch to bindless_image_agx intrinsic
this is more explicit than vec2's and hence has fewer footguns. in particular
it's easier to handle with preambles in a sane way.

modelled on what ir3 does.

there's probably room for more clean up but for now this unblocks what I want to
do.

stats don't seem concerning.

Totals from 692 (1.29% of 53701) affected shaders:
MaxWaves: 441920 -> 442112 (+0.04%)
Instrs: 1588748 -> 1589304 (+0.03%); split: -0.05%, +0.08%
CodeSize: 11487976 -> 11491620 (+0.03%); split: -0.04%, +0.07%
ALU: 1234867 -> 1235407 (+0.04%); split: -0.06%, +0.10%
FSCIB: 1234707 -> 1235249 (+0.04%); split: -0.06%, +0.10%
IC: 380514 -> 380518 (+0.00%)
GPRs: 117292 -> 117332 (+0.03%); split: -0.08%, +0.11%
Preamble instrs: 314064 -> 313948 (-0.04%); split: -0.05%, +0.01%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35949>
2025-07-10 14:55:17 -04:00
Eric Engestrom
a1d7545885 crocus/ci: disable jobs on anholt farm
That farm is not coming back any time soon, so let's just disable the
jobs to avoid having to keep them working while refactoring; they'll
have to be mostly re-written if/when they're brought back anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36024>
2025-07-10 18:15:36 +00:00
Marek Olšák
95f1f334ca zink/ci: add post-merge failures from a previous MR
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36018>
2025-07-10 16:37:45 +00:00
Marek Olšák
3684b93723 radeonsi: use nir_opt_move_to_top for input loads
This must be done before the GLSL compiler stops using
nir_lower_io_vars_to_temporaries for inputs to work around an LLVM bug.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36018>
2025-07-10 16:37:44 +00:00
Faith Ekstrand
69919fd21b zink: Add a resource_get_dma_buf() helper
We had the same code in two paces and one of them had a bug (see
previous commit) so let's make it one place.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36048>
2025-07-10 15:40:20 +00:00
Faith Ekstrand
de4224a57c zink: Clean up file descriptor closing in export_dmabuf_semaphore()
First, we handle the case where GetMemoryFdKHR fails.  This is unlikely
and, if it's a Mesa driver it probably won't stomp the FD but we should
be extra careful.  Then, we can close the dma-buf file immediately after
we call drmIoctl() on it, ensuring we don't leak the dma-buf file
descriptor if drmIoctl() fails.  If ImportSemaphoreFdKHR() fails, then
we need to clean up the sync file.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36048>
2025-07-10 15:40:20 +00:00
Marek Olšák
08b522d21e glsl: check against varying limits using NIR shader_info after nir_opt_varyings
nir_opt_varyings reduces the number of varyings. Check against limits after
that, so that old and limited GPUs don't fail linking when nir_opt_varyings
is able to reduce varyings to or below the limit.

The previous code only checked FS inputs, which is glaringly obvious
from the removed var_counts_against_varying_limit function.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36023>
2025-07-10 08:31:36 +00:00
Vitaliy Triang3l Kuzmin
21136d931d r600: Fix rectangle coordinate limits on R6xx/R7xx
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
R6xx/R7xx use D3D10 15.8 fixed-point coordinates rather than 16.8.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35953>
2025-07-10 04:45:53 +00:00
Yiwei Zhang
ace49d9e52 lavapipe: adopt wsi_common_get_memory
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35875>
2025-07-09 23:45:04 +00:00
Yiwei Zhang
6f7dff3abf lavapipe: adopt wsi_common_create_swapchain_image
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35875>
2025-07-09 23:45:04 +00:00
Emma Anholt
fefa6aa899 dri2: Finish removing the now-unused dep_xcb_dri2.
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/19942>
2025-07-09 14:31:05 -07:00
Mel Henning
0f6a8283ca zink: Assert ici.tiling != DRM_FORMAT_MODIFIER_EXT
if we're not populating VkExternalMemoryImageCreateInfo

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36008>
2025-07-09 20:35:40 +00:00
Mike Blumenkrantz
69afd8678a zink: fix UIL feedback loop usage
I got this confused with the DRLR type of feedback loop

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36029>
2025-07-09 18:42:48 +00:00
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