Commit graph

221984 commits

Author SHA1 Message Date
Calder Young
4120ae4963 brw: Avoid vectorizing loads in NIR if it could extend into a different page
Took inspiration from RADV to make nir_opt_load_store_vectorize robust against
page faults, by checking the align_offset and align_mul to see if any extra
components could be overlapping into a different page.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
3ac6233655 brw: Avoid rounding every convergent block load up to a full register
To simplify things, our backend rounds convergent block loads up to a full
register. This causes page faults with the scratch page disabled since the
address is not always aligned to a register size. Loading smaller blocks is
slightly more difficult because the SEND instruction can only write back a
multiple of full registers, even if the actual data is smaller.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
8ce98fedc4 anv: Make sure robust UBO access does not fault
We can just conditionally replace the address with an address to a zero
initialized cacheline if the read is going to go out of bounds.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
64b5823d33 blorp: Work around sampler overfetch for buffer copies
First, the surface dimensions are used to determine the range of valid
pages that the data in the buffer overlaps, then rows are removed from
the surface until it does not overfetch into any neighboring pages. If
any rows were removed, an extra BTI is set up with a texel buffer that
views the contents of all the rows that were removed, and the shader is
compiled with a branch to sample the last rows through the texel buffer
instead of the main surface.

Using the texel buffer allows it to access the last rows without dealing
with overfetch or weird alignment hacks, and restricting texel buffer
usage to just the part of the surface that can't be accessed safely
ensures that we don't significantly impact performance for any buffer to
image copy that is unlucky enough to be close to a page boundry.

Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
fd7c094f7b isl: Add and use isl_tiling_get_intratile_range_el/sa
Consolidates the logic for calculating the intratile extent of a slice of a
surface to avoid duplicating code in the next patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
f5c848ef57 isl: Add function to calculate the amount of overfetch for an unpadded surface
Adds a function to calculate the total size of a 2D linear sampling engine
surface, including overfetch, for a buffer to image copy.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
3cd9b14c80 isl: Optimize the sampler cache to overlap as few 64B cachelines as possible
Since we now have a ISL_SURF_USAGE_NO_OVERFETCH_PADDING_BIT flag to turn extra
padding calculations on and off, we can align the row pitch of linear surfaces
that are accessed through the sampler to minimize the number of L3 cachelines
that each sampler cacheline overlaps for added efficiency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
8d13628f7f isl: Add additional alignment/padding requirements to prevent overfetch
Bspec 58779 describes various cases where additional padding is required on the
bottom and right sides of a sampling engine surface to avoid page faults.

Since we don't want to mess up the other drivers that also use ISL, there's now
a requires_padding boolean in isl_dev that can be used to enable/disable the
extra padding calculations per device and driver.

The extra padding can also be disabled per-surface by adding the usage flag
ISL_SURF_USAGE_NO_OVERFETCH_PADDING_BIT, like when a specific row pitch is
needed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
aee9602fea isl: Add usage flag to force SurfaceArray to false
When sampling BUFFER, 1D, or 2D surfaces, with no MSAA, no mipmap levels,
linear tiling, and SurfaceArray set to false, the surface padding
requirements are relaxed and its much easier to use the sampler to do
buffer-to-image copies in BLORP. We can't have it like this by default
though because we need SurfaceArray true for robustness.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
Calder Young
bd88042f57 anv: Add padding to the shader heap to manage EU prefetch
Like the command streamer, the EUs will also blindly prefetch up to 3.5KiB
ahead of a shader. We can manage this in the shader heap by adding the
required padding when we allocate the buffers to back a shader allocation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:40 +00:00
Calder Young
5fb78a26db anv: Store batch buffers in a null-initialized VMA heap
The command streamer will blindly prefetch up to 4KiB ahead of a batch buffer
depending on the engine. To avoid page faults with the scratch page disabled,
we can create a special VMA heap for batch buffers that has pages initialized
with the null tile bit by default.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:40 +00:00
Eric R. Smith
80e6b468f4 panfrost: add helper function for checking for active queries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a convenience helper function, and use this for checking
whether queries are active. This fixes a bug where we were
basically always using a software fallback for indirect
rendering rather than the CSF hardware loop.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41141>
2026-05-01 12:22:53 +00:00
Eric R. Smith
2b10a6c37f panfrost: make sure INDEX_OFFSET is cleared
Ensure the INDEX_OFFSET CSF register is set to 0 before an ordinary
draw. This is normally the case, but indirect draws can change it.

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/41141>
2026-05-01 12:22:52 +00:00
Connor Abbott
9ee6a23b8f tu: Support VK_KHR_maintenance9
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/40552>
2026-05-01 11:47:18 +00:00
Connor Abbott
789e765161 turnip, ir3: Use shader for vertex input count
Maintenance9 will require us to make unbound vertex inputs (that is,
attributes in the VS without a corresponding binding at the same
location) be defined. In order for this to work, VFD_FETCH_INSTR_INSTR
must be defined for all attributes used in the shader. Imagine we do
something like:

CmdSetVertexInputs(only 1 input at location 0)
CmdBindPipeline(VS reads only location 0)
CmdDraw()
CmdBindPipeline(VS reads locations 0 and 1)
CmdDraw()

For the first draw we only need to emit VFD_FETCH_INSTR_INSTR[0], for the
second draw we need to emit VFD_FETCH_INSTR_INSTR[1] as well in the VI
draw state. This unfortunately means we have to do draw-time validation
for vertex input state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40552>
2026-05-01 11:47:18 +00:00
Connor Abbott
b8a5aeee48 tu: Don't zero-initialize query pool
The kernel already does this for us by zeroing new BOs. It's also
unnecessary, unless the newly-introduced
VK_QUERY_POOL_CREATE_RESET_BIT_KHR flags is used. If we ever start
suballocating query pools, we may have to zero based on that flag, but
for now we don't have to do anything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40552>
2026-05-01 11:47:18 +00:00
Connor Abbott
7171c3dd71 tu: Optimize sync2 event handling in the non-asymmetric case
Before we were falling back to always emitting a pipeline barrier, which
effectively kills any point of having the event. But with sync2 and the
guarantee that src/dst dependency infos match, we can instead emit the
flushes before writing the event and actually use the event as intended.
As a bonus, this also allows the BV to run ahead of the BR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40552>
2026-05-01 11:47:18 +00:00
Daniel Schürmann
012d72f2b0 nir/opt_algebraic: add some imul24_relaxed pattern
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41178>
2026-05-01 10:07:26 +00:00
Daniel Schürmann
708093d830 nir/opt_algebraic: use imul24_relaxed for lowered dot4x8_add
Totals from 28 (0.04% of 72819) affected shaders: (Navi10)

MaxWaves: 181 -> 186 (+2.76%)
Instrs: 406735 -> 338360 (-16.81%)
CodeSize: 2913588 -> 2469712 (-15.23%)
VGPRs: 5520 -> 5468 (-0.94%)
SpillVGPRs: 32 -> 0 (-inf%)
LDS: 64512 -> 62464 (-3.17%)
Scratch: 10240 -> 0 (-inf%)
Latency: 11028252 -> 4357120 (-60.49%)
InvThroughput: 11004126 -> 4079018 (-62.93%)
VClause: 1686 -> 2055 (+21.89%); split: -0.89%, +22.78%
SClause: 890 -> 852 (-4.27%)
Copies: 4516 -> 2644 (-41.45%); split: -41.59%, +0.13%
PreSGPRs: 982 -> 974 (-0.81%)
PreVGPRs: 5356 -> 4284 (-20.01%)
VALU: 370529 -> 330201 (-10.88%)
SALU: 28850 -> 1170 (-95.94%)
VMEM: 2616 -> 2560 (-2.14%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41178>
2026-05-01 10:07:25 +00:00
Rhys Perry
fe067b17d9 radv: split radv_compiler_info's family into debug::family and key::family
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We used this for two different purposes with different caching
requirements:
- it's always needed for LLVM, and needs to be part of the cache key
- it's needed for disassembly with ACO, and shouldn't be part of the cache
  key

Eventually, we'll want the family to only be part of the cache key if LLVM
is used, but still accessable for when ACO needs the disassembler.

If we put it in radv_compiler_info::debug, we'll need to treat that
specially to hash it into the key when LLVM is used.

If we put it in radv_compiler_info::key, that will hash it into the key
unnecessarily if ACO is used and disassembly might be needed.

So just put the family in both, and use debug::family for disassembly and
key::family for LLVM.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41261>
2026-05-01 08:45:28 +00:00
Rhys Perry
7244ecd602 radv: replace radv_nir_compiler_options with a LLVM one
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41261>
2026-05-01 08:45:27 +00:00
Rhys Perry
567f7bb213 radv: remove radv_aco_convert_opts
Just create the aco_compiler_options more directly.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41261>
2026-05-01 08:45:27 +00:00
Rhys Perry
a34bbb41c0 radv: inline shader_compile()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41261>
2026-05-01 08:45:27 +00:00
Rhys Perry
24ab54fe3f ac/llvm: fix isub image atomic
Fixes red_dead_redemption_2_VK/340c6c75f15678ff

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41261>
2026-05-01 08:45:26 +00:00
Icenowy Zheng
38cf44a733 pvr: ignore DS attachment's D or S when it's unused in dynamic rendering
Dynamic rendering codepath allows binding an attachment with a
depth+stencil format, but only depth or stencil active. The
corresponding test should be disable in such case.

Ignore the attachment's depth or stencil according to the rendering
attachment info's is_depth and is_stencil variables.

Fixes the following CTS testcases:
dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.static_enable.d24_unorm_s8_uint
dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.static_enable.d32_sfloat_s8_uint
dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.dynamic_enable.d24_unorm_s8_uint
dEQP-VK.pipeline.monolithic.stencil.no_stencil_att.dynamic_rendering.dynamic_enable.d32_sfloat_s8_uint

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41054>
2026-05-01 08:22:05 +00:00
Dave Airlie
645de2b433 gallivm: handle llvm 22 scatter/gather intrinsic changes.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The intrinsics moved alignment to an attribute on the pointer.

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41308>
2026-05-01 03:51:55 +00:00
Dave Airlie
469270b914 gallivm: handle llvm 22 coroutine end change
the coroutine end changed return value.

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41308>
2026-05-01 03:51:55 +00:00
Mike Blumenkrantz
d998456d21 llvmpipe: fix min_samples + A2C
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
running a2c in its usual loop fails to update the mask for the current
sample, which breaks successive operations BUT ONLY WHEN RUNNING PER-SAMPLE

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41272>
2026-05-01 03:32:54 +00:00
Marek Olšák
740b9fa19b radeonsi: set glsl_bindless_handles_are_32bit
to lower bindless handles to 32 bits in the GLSL compiler and eliminate
input loads of high 32 bits of bindless handles before nir_opt_varyings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41170>
2026-05-01 03:00:17 +00:00
Marek Olšák
5db0493a04 glsl,gallium: add pipe_caps::glsl_bindless_handles_are_32bit
to lower bindless handles to 32 bits before nir_opt_varyings, so that
the high 32 bits of (input) loads of bindless handles are eliminated early.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41170>
2026-05-01 03:00:17 +00:00
Marek Olšák
1b409ff681 aco/tests: update ACO tests for ac_nir_lower_tex_coords refactoring
For: ac/nir/lower_tex_coords: move input loads instead of cloning them

Suggested by: Georg Lehmann

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41173>
2026-05-01 02:37:16 +00:00
Marek Olšák
ac33f82d54 ac/nir/lower_tex_coords: move input loads instead of cloning them
This stops leaving dead input loads behind.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41173>
2026-05-01 02:37:16 +00:00
Marek Olšák
ad4eaaae68 ac/nir: factor out ac_nir_lower_tex_coords from ac_nir_lower_image_tex
This just separates tex coord lowering into a new pass.

The gfx_level parameter is now unused in ac_nir_lower_image_tex, but I'm
keeping it because it will be used in the future.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41173>
2026-05-01 02:37:16 +00:00
Calder Young
6aabe5482e anv: Fix support for indirect SBTs on Xe3+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 6deb195 ("anv: Update RT dispatch globals to use 64bit data structure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41004>
2026-05-01 00:18:23 +00:00
Calder Young
8f7309d9a9 anv: Fix address bit masking for indirect SBTs
Fixes: ce68824 ("anv: fix invalid masking of 48bit address")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41004>
2026-05-01 00:18:23 +00:00
Christian Gmeiner
3e51d35d1a egl: Switch to mesa_log(..)
Mesa's common logging framework supports Android already - switch
to it.

Note: on non-Android platforms this changes the message format -
the "libEGL" prefix is gone, replaced by mesa_log's "MESA-EGL" tag.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33975>
2026-04-30 23:51:48 +00:00
Mohamed Ahmed
d04945ed96 nvk: Remove nvk_image_plane_size_align_B()
Now that we stash the offset and alignment, this helper is redundant.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:09 +00:00
Mohamed Ahmed
c6fbd3402e nvk: Use the pre-calculated offsets for sparse binds
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:09 +00:00
Mohamed Ahmed
98185bfb8e nvk: Enable multiplanar YCbCr linear modifiers
Closes: #14975

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:09 +00:00
Mohamed Ahmed
72e4b256c7 nvk: Defer tiled shadow plane memory allocation to draw time
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:08 +00:00
Mohamed Ahmed
1564995b0f nvk: Extend tiled_shadow to be multiplanar
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:08 +00:00
Mohamed Ahmed
29ffb84501 nvk: Calculate and stash the plane offset and alignment at create time
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:08 +00:00
Mohamed Ahmed
7f5767a2f2 nil/modifiers: Clarify drm_format_mods_for_format rejecting modifiers for unsupported color formats
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:07 +00:00
Faith Ekstrand
baa13f6a86 zink: Assert if we try to use a dedicated allocation with offset > 0
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Tested-by: Mary Guillemard <mary@mary.zone>

Backport-to: 26.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40473>
2026-04-30 23:32:07 +00:00
Emma Anholt
d8b525466c ir3: Fix shared IMAD24 lowering.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Caught by
dEQP-VK.spirv_assembly.instruction.compute.opsdotkhr.all_us_v2i16_out32
and friends in !41178

Fixes: b4874aa5cf ("ir3: Use scalar ALU instructions when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41278>
2026-04-30 22:39:29 +00:00
Samuel Pitoiset
608bc0e593 radv/meta: fix expanding HTILE on compute with multisampling
The expand was considering only the first sample, very old bug.

This fixes test_{copy,compute}_queue_depth_stencil_msaa from
vkd3d-proton on GFX11-GFX11.7 GPUs. Older GPUs don't support image
stores with depth/stencil MSAA images.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41267>
2026-04-30 22:17:43 +00:00
Valentine Burley
207aa9eba4 venus/ci: Skip more robustness tests on ANV
dEQP-VK.robustness.buffer_access.* can cause hangs in Cuttlefish:

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/98383598

04-27 18:45:39.578  5675  5675 I dEQP    : Test case 'dEQP-VK.robustness.buffer_access.through_pointers.compute.reads.32B_in_memory_with_vec4_f32'..
04-27 18:45:39.583  5675  5675 I vulkan  : CreateInfoWrapper::FilterExtension: already have 'VK_KHR_external_fence_fd'.
04-27 18:45:43.428  5675  5675 D MESA-VIRTIO: stuck in fence wait with iter at 1024
04-27 18:45:43.486  5675  5675 D MESA-VIRTIO: ERROR: ffb must be signaled now
04-27 18:45:43.488  5675  5675 I dEQP    :   Fail (vk.waitForFences(*m_device, 1, &m_fence.get(), true, ~(0ull) ): VK_ERROR_UNKNOWN at vktRobustBufferAccessWithVariablePointersTests.cpp:1608)

Skip the entire group to improve CI stability.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41296>
2026-04-30 21:58:55 +00:00
Paulo Zanoni
8ced368644 anv: don't silently convert view ranges from u64 to u32 then u64
Both anv_buffer_view->vk.range and VkDescriptorAddressInfoEXT->range
are VkDeviceSize, which is uint64_t. In Anv, we pass this to
align_down_npot_u32(), anv_fill_buffer_surface_state() and
anv_fill_buffer_view_surface_state(), all which convert it down to
uint32_t. Then we call isl_buffer_fill_state(), converting the value
back to uin64_t as size_B.

Remove the intermediate u32 truncation everywhere. If some place does
not accept values bigger than UINT_MAX, it is that place that should
have a check. We shouldn't silently convert a u64 value to u32 and
then back to u64.

I'm not aware or any workloads that are affected by this bug today.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41251>
2026-04-30 21:32:23 +00:00
Paulo Zanoni
4167b7d51f intel/isl: warn about excessive num_elements only once
Commit f3c7e14f09 ("isl: don't assert(num_elements > (1ull << 27))")
replaced an assert(num_elements <= (1 << 27)) with a mesa_logw(). At
that time, the only games I knew that printed this message (Marvel's
Spider-Man Remastered and Assassin's Creed: Valhalla) only printed
it a few times during startup.

It turns out that The Last Of Us Part II Remastered constantly prints
this message during gameplay. Downgrade it to mesa_logw_once() so we
don't spam the terminal, don't fill disks with log messages and don't
make things slower in general.

Fixes: f3c7e14f09 ("isl: don't assert(num_elements > (1ull << 27))")
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41251>
2026-04-30 21:32:23 +00:00
Paulo Zanoni
c4b6df29bf intel/isl: fix assert when surf->size_B is > UINT_MAX
I have some local tests for Sparse Resources that I wrote when I was
working on that for Anv. One of them tries to create a sparse buffer
with size 4294967296 (which doesn't fit in an uint32_t). Without this
patch, the right side of the assertion overflows and we get:

sparse: ../../src/intel/isl/isl.c:3787: isl_surf_from_mem: Assertion `surf->size_B == surf->row_pitch_B * extent.h * extent.a' failed

Fixes: fcdae4d4c0 ("intel: Add and use isl_surf_from_mem()")
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41253>
2026-04-30 21:07:02 +00:00