Compare commits

..

524 commits

Author SHA1 Message Date
Eric Engestrom
e4bd78e80a VERSION: bump for 26.0.5
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
2026-04-15 16:20:41 +02:00
Eric Engestrom
9c4e5bbee5 docs: add release notes for 26.0.5 2026-04-15 16:20:41 +02:00
Rhys Perry
fd9ffc0620 ir3/ra: fix copy-paste error
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I don't entirely understand what this is all doing, but this looks like a
copy-paste error.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
(cherry picked from commit a6b86d43d3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Rhys Perry
9b19409ac8 ir3/array_to_ssa: skip remove_trivial_phi for non-array phis
remove_trivial_phi() mostly does nothing for non-array phis, but it
rewrites sources if their definining instruction are trivial phis.

In the case of trivial phis in the loop continue block (for loops with
divergent non-trivial continues), we might need to keep those if they
write a shared register, because the source of the trivial phi will not be
reachable from the loop header phi.

In this example, the predecessors of the continue block should be block2,
but the physical predecessors are block2 and block3, requiring a phi in
the continue block which will then be lowered by ir3_lower_shared_phis.
loop {
   block1:
   a = phi 0, b
   if (divergent) {
      block2:
      b = a + 1
      continue;
   }
   block3:
   break;
}

Fixes RA validation error when compiling blackmythwukong/5645a84e669a6179
from radv_fossils.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
(cherry picked from commit 4f0fb5784f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Samuel Pitoiset
6a2704a520 vulkan: mark RP attachments as invalid when no rendering create info
VkPipelineRenderingCreateInfo is only required in the fragment output
interface lib. For pre-rasterization shaders and fragment shader state
libs, only the view mask is used but it's optional.

If the attachments info isn't marked invalid merging renderpass info
during lib imports wouldn't work because it would assume that the first
lib has attachment info (eg. the pre-rasterization lib).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15241
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 1950b6c1a7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Lionel Landwerlin
0e1922550d elk: don't support frontfacing ternary optimization on != 32bit
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 4dfedcca45)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Lionel Landwerlin
eb2cffbde4 brw: don't support frontfacing ternary optimization on != 32bit
Fix shader compilation on Crimson Desert :

  16    %1995 = b32csel %1992, %1993, %1994

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit a84c12414c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Mary Guillemard
d37fccbc4a hk: Add HK_MAX_RTS to maxFragmentCombinedOutputResources
The spec also mentions "output Location decorated color attachments".

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 564b061981 ("hk: Increase maxFragmentCombinedOutputResources to HK_MAX_DESCRIPTORS")
Reviewed-by: Janne Grunau <j@jannau.net>
(cherry picked from commit 59d9bc7bee)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Mary Guillemard
dc1f5880e7 nvk: Adjust maxFragmentCombinedOutputResources to match max descriptors limit
This was set to the lowest allowed value by spec but it should really be
matching the max descriptors limit.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15249 for NVK
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit 13f98d8658)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Wujian Sun
ecdb0c153c mesa: Fix inconsistent multisampled CopyTexImage checks
According to the GL_EXT_multisampled_render_to_texture specification,
copy operations should be allowed when the extension is supported.

Previously, glCopyTexImage* would unconditionally fail with
GL_INVALID_OPERATION when copying from any multisampled framebuffer
(samples > 0), even when using render-to-texture attachments.

Fixes: d7b9da2673 ("mesa/main: fix artifacts with GL_EXT_multisampled_render_to_texture")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com>
(cherry picked from commit 2e340d63d2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Eric Guo
d6ef5d4882 panfrost: disable round_to_nearest_even for NEAREST samplers
When round_to_nearest_even is enabled with NEAREST filtering, texture
coordinates near texel boundaries (e.g. 0.9999999404) can be incorrectly
rounded up to the next texel instead of being floor()'d.

According to OpenCL spec section 8.2, for CLK_FILTER_NEAREST:
  i = address_mode((int)floor(u))

Backport-to: *
Signed-off-by: Eric Guo <eric.guo@nxp.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit c415134454)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Karol Herbst
1ed1dcb9db rusticl/device: Fix reporting of global memory on mixed memory devices
AMD APUs are hitting this case where they have very small discrete VRAM,
but a lot of staging memory, which can be used additionally.

Fixes: 7487ac2046 ("rusticl/device: support query_memory_info to retrieve available memory")
(cherry picked from commit 58d45725c7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Karol Herbst
b2b54a0194 rusticl/kernel: implement CL_KERNEL_GLOBAL_WORK_SIZE for custom devices
Apparently we are supposed to support this on custom devices.

Cc: mesa-stable
(cherry picked from commit 97a137ac88)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Karol Herbst
6fa9e9b757 radeonsi: properly report unified memory on APUs
This helps rusticl to properly advertise available global memory on APUs.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 97ca375f51)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Konstantin Seurer
573d326bc2 radv/bvh: Prefer selecting quads as the first pair of a HW node
Is a single triangle is selected, it can be the case that the next iteration
can't merge any pair with the triangle. In that case, the HW node with a
single triangle will not have the highest hw_node_index, triggering an
assert.

Fixes: c18a7d0 ("radv: Emit compressed primitive nodes on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
(cherry picked from commit db38d1a98c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Vinson Lee
392b4ab6b2 d3d12: Fix MinGW cross-build error in resource_state_if_promoted
When cross-compiling with MinGW, d3d12_resource_state.cpp fails to
compile with:

  d3d12_resource_state.cpp:161:83: error: call to non-'constexpr'
  function 'D3D12_RESOURCE_STATES operator|(D3D12_RESOURCE_STATES,
  D3D12_RESOURCE_STATES)'
    161 |       D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE |
        |       D3D12_RESOURCE_STATE_COPY_SOURCE | D3D12_RESOURCE_STATE_COPY_DEST;
        |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/share/mingw-w64/include/minwindef.h:163,
                   from /usr/share/mingw-w64/include/windef.h:9,
                   from /usr/share/mingw-w64/include/windows.h:69,
                   from /usr/share/mingw-w64/include/rpc.h:16,
                   from /usr/share/mingw-w64/include/unknwn.h:7,
                   from ../subprojects/DirectX-Headers-1.0/include/wsl/winadapter.h:6,
                   from ../src/gallium/drivers/d3d12/d3d12_common.h:29,
                   from ../src/gallium/drivers/d3d12/d3d12_bufmgr.h:31,
                   from ../src/gallium/drivers/d3d12/d3d12_resource_state.cpp:24:
  ../subprojects/DirectX-Headers-1.0/include/directx/d3d12.h:3540:1:
  note: 'D3D12_RESOURCE_STATES operator|(D3D12_RESOURCE_STATES,
  D3D12_RESOURCE_STATES)' declared here
   3540 | DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_STATES )
        | ^~~~~~~~~~~~~~~~~~~~~~~~~~

The DEFINE_ENUM_FLAG_OPERATORS macro in the MinGW winnt.h header
defines operator| for D3D12_RESOURCE_STATES as inline but not
constexpr.  (The DirectX-Headers WSL stubs do define it as constexpr,
but when building with MinGW, windows.h is pulled in via winadapter.h
and its non-constexpr definition wins.)  Calling a non-constexpr
function to initialize a constexpr variable is ill-formed in C++.

Fix by changing static constexpr to static const, which avoids the
constexpr context while still giving the variable static storage
duration.

Fixes: fe48cd7c5a ("d3d12: Allow state promotion for non-simultaneous access textures")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
(cherry picked from commit 2443f3608a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Yuxuan Shui
035be8e042 wsi/display: initialize Xlib display connector property IDs in all cases
Usually connector property IDs are acquired in
wsi_display_get_connector, which is called by wsi_get_connectors, and in
turn by vkGetPhysicalDeviceDisplayProperties2KHR and
vkGetPhysicalDeviceDisplayPlanePropertiesKHR. Except if the drm fd is
not available when these functions are called. Which will be the case if
vkAcquireXlibDisplayEXT is not called first.

So it goes like this. First, the display is created in
vkGetRandROutputDisplayEXT. Then it's used in
vkGetPhysicalDeviceDisplayPlanePropertiesKHR, but since the drm fd is
not available at this point, connector property IDs are not initialized.
Later, this display is used in vkAcquireXlibDisplayEXT, which also
doesn't touch the property IDs. Finally in drm_atomic_commit, the
atomic commit fails with EINVAL, specifically because of the
uninitialized ID of the "CRTC_ID" property. Since it's one of the
properties drm_atomic_commit tries to set.

This commit makes sure that find_connector_properties is called in
vkAcquireXlibDisplayEXT to initialize the property IDs.

Fixes: 513ffea1d3 ("wsi/display: use atomic mode setting")
Signed-off-by: Yuxuan Shui <yshui@codeweavers.com>
(cherry picked from commit 37a1986691)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:47 +02:00
Pavel Ondračka
18115a5df5 gallium/u_blitter: remove unused CONST declaration when using IMM
The immediate fs_clear_color shader uses IMM[0] but still declares
CONST[0][0]. That can make drivers try to read a fragment constant
buffer even though one is never uploaded on this path. Only declare
CONST[0][0] when the shader actually uses a constant buffer.

Fixes: 2ff9fa8b72 ("gallium/u_blitter: add a new fs_color_clear variant")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 79e3196320)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Daniel Schürmann
b4cfec4973 aco/lower_branches: Don't remove branches which jump over loops
Entering a loop with empty exec mask might lead to
not be able to execute the break condition and
lead to infinite loops.

Totals from 81 (0.04% of 202440) affected shaders: (Navi48)
Instrs: 3040566 -> 3040716 (+0.00%)
CodeSize: 17506768 -> 17507188 (+0.00%)
Latency: 16342966 -> 16345166 (+0.01%)
InvThroughput: 3112932 -> 3113286 (+0.01%)
Branches: 82229 -> 82365 (+0.17%)

Cc: mesa-stable
(cherry picked from commit 60b3e5b3f0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Faith Ekstrand
7809c26b56 pan/bi: Support all the swizzles in the packer
Add asserts this time that we don't miss any and that the buckets
actually match the enum in bifrost/compiler.h.

Fixes: 82328a5245 ("pan/bi: Generate instruction packer for new IR")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit fd5c6d1223)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Faith Ekstrand
1067d2772e pan/bi: Add BI_SWIZZLE_NONE
Fixes: 82328a5245 ("pan/bi: Generate instruction packer for new IR")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit ab285efd1b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Olivia Lee
665974c934 panfrost: don't try to emit varying shader stats on v12+
On v12+, IDVS no longer has separate position and varying variants, so
we only need to emit stats for one binary. Attempting to emit stats for
the nonexistent varying shader breaks shader-db.

Fixes: 7819b103fa ("pan/bi: Add support for IDVS2 on Avalon")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 31ddfe26eb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Janne Grunau
6c5ec9424d hk: Increase maxFragmentCombinedOutputResources to HK_MAX_DESCRIPTORS
Backport-to: 26.0
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15249 for hk
Signed-off-by: Janne Grunau <j@jannau.net>
(cherry picked from commit 564b061981)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Icenowy Zheng
e0eb9bc602 pvr: set has_usc_alu_roundingmode_rne for all B-series Rogue cores
All B-series Rogue cores seem to have USC rounding mode as RTE instead
of RTZ.

Set the has_usc_alu_roundingmode_rne feature flag for them (currently
only BXS-4-64 has it set).

Verified via testing on BXM-4-64 (36.52.104.182) by fixing CTS tests
dEQP-VK.spirv_assembly.instruction.*.float_controls.fp32.input_args.* ,
and via proprietary driver vulkaninfo result on BXE-2-32 (36.29.52.182),
BXE-4-32 (36.50.54.182) and BXM-4-64 (36.56.104.183) (checking
shaderRoundingModeRT?Float32 properties).

Fixes: 1db1038a61 ("pvr: add device info for BXM-4-64 (36.56.104.183)")
Fixes: e60e0c96ba ("pvr: add device info for BXE-2-32 (36.29.52.182)")
Fixes: 2743363a57 ("pvr: add device info for BXM-4-64 (36.52.104.182)")
Fixes: ea28791d40 ("pvr: add device info for BXE-4-32 (36.50.54.182)")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
(cherry picked from commit 9b44def4e9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Samuel Pitoiset
55916383fc radv/meta: fix computing extent for image->image with both compressed formats
If both src and dst are compressed formats, adjusting the extent isn't
necessary because it's required that texel block extent matches. The
previous division was also wrong because it was truncating partial
blocks causing issues in some tests.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 4e00e1c3d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Valentine Burley
2723eec312 ci/freedreno: Move remaining lazor a618 jobs, retire device type
The sc7180-trogdor-lazor-limozeen devices have been dying off over the
past few weeks, so move the last two jobs to sc7180-trogdor-kingoftown
and retire the device type.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit bbed00ac81)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Valentine Burley
a9a9bc41c0 zink/ci: Move zink-tu-a618 to sc7180-trogdor-kingoftown
The sc7180-trogdor-lazor-limozeen devices are having issues, so move the
job to a different device with available capacity.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit 17d38c9668)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Lionel Landwerlin
52b549ab9d anv: don't relocate memory from blob
This could override data allocated by the application when shader code
is loaded from binary in vkCreateShaderObjectEXT().

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d39e443ef8 ("anv: add infrastructure for common vk_pipeline")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 21952ffb07)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Marc Alcala Prieto
6f6be1368a pan/cs: Fix cs_run_fragment() calls with swapped arguments
Fix non-functional issue where calls to cs_run_fragment() had swapped
tile_order and enable_tem arguments. Both arguments evaluate to 0.
Hence, no functional change.

Fixes: 53f780ec91 ("panfrost: Remove progress_increment from all CS builders")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit 0d08b197f2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
David Rosca
5447f81cc5 radeonsi: Set multi plane format also for imported textures
multi_plane_format is used to correctly copy all planes for staging texture
copies, otherwise only the first plane gets copied.
It's now also used in si_video_dec, which doesn't work when decoding into
imported surfaces if multi_plane_format is not set.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15232
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 3dbbd94ffd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Georg Lehmann
599bb79ff4 aco/optimizer: do not try to create 3 byte constant operands
Operand::get_const will assert.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15239
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
(cherry picked from commit d1ed4e1774)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Icenowy Zheng
fa0abe9510 pvr: fix pvr_clear_vdm_state_get_size_in_dw() inverted feature condition
The pvr_clear_vdm_state_get_size_in_dw() wrongly think instance count
inputs are needed when doing RTA clear for cores without the
gs_rta_support feature. However, the instance ID is exploited to output
the target layer ID, which isn't supported at all for cores w/o that
feature, so it looks that the condition is inverted. In addition, the
pvr_pack_clear_vdm_state() function seems to have similar logic deciding
whether to emit instance_count, and the logic is opposite to the logic
in pvr_clear_vdm_state_get_size_in_dw() for the part checking the
gs_rta_support feature.

Invert the condition to take instance ID inputs for cores with the
gs_rta_support feature instead of those without this feature.

Fixes: b59eb30e88 ("pvr: Fix cs corruption in pvr_pack_clear_vdm_state()")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
(cherry picked from commit 3db93bbf34)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Rhys Perry
eb4618b1b5 util: fix UBSan error with _mesa_bfloat16_bits_to_float
runtime error: left shift of 65535 by 16 places cannot be represented in type 'int'

This fixes nir_opt_algebraic_pattern_test.bf2f.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: ecd2d2cf46 ("util: Add functions to convert float to/from bfloat16")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 72f2b8a034)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:46 +02:00
Ian Romanick
92bfcb208f brw: brw_reg::nr for an accumulator is not part of the offset
Without this, reg_offset will return 1024 for acc0. This causes
has_invalid_dst_region to decide that the destination region is invalid
(because 1024 != 0), and the lowering code tries to treat the floating
point accumulators as integers. It's a mess.

v2: Add and use set_gfx_platform. Suggested by Caio.

Fixes: 937373eb25 ("i965/fs: Handle fixed HW GRF subnr in reg_offset().")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
(cherry picked from commit cfdb3ddb93)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Ian Romanick
a46e96fbdb brw/const: Don't allow type changes when accumulators are involved
Integer accumulators and float accumulators do not occupy the same bits,
so the types cannot be arbitrarily changed.

No shader-db or fossil-db changes on any Intel platform.

v2: Use is_accumulator() instead if brw_reg_is_arf(). Add an extra test
to show the desired behavior when an accumulator is not
involved. Suggested by Caio.

Fixes: 64c251bb3a ("intel/fs: Combine constants for SEL instructions too")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
(cherry picked from commit ffdc310bf1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Mixie
c72a0457e1 xlib: clear currentDpy when releasing the current context
After abe6d750e5, glXDestroyContext() can defer destruction by marking
the context with xid == None while it is still current.

However, the release-current path did not clear current->currentDpy,
so a context that had already been marked for deletion could remain
associated with a display after unbinding.

Fixes: abe6d750e5 ("xlib: fix glXDestroyContext in Gallium frontends")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14947
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 447a1d2e8d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Xianzhong Li
871a933cac panfrost: Fix GEM handle refcount leak in panfrost_bo_import
panfrost_bo_import() calls drmPrimeFDToHandle() then pan_kmod_bo_import(),
which also calls drmPrimeFDToHandle() internally. This double import causes
GEM handle refcount leaks because each drmPrimeFDToHandle() increments the
kernel's GEM handle refcount, but only one drmCloseBufferHandle() is called
during cleanup by panfrost_kmod_bo_free(or panthor_kmod_bo_free).

Fix by removing the redundant drmPrimeFDToHandle() and using
pan_kmod_bo_import() directly. On re-import of existing buffers, properly
release the extra pan_kmod_bo reference with pan_kmod_bo_put().

This ensures GEM handle refcount, pan_kmod_bo refcount, and panfrost_bo
refcount are all properly balanced.

Fixes: 5089a758df ("panfrost: Back panfrost_bo with pan_kmod_bo object")

Signed-off-by: Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 248b0b47b7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Faith Ekstrand
e8955066a7 pan/bi: Use bi_half() for texture MS indices
It feeds into a v2i16 so it needs to be 16-bit.

Fixes: ae79f6765a ("pan/bi: Emit Valhall texture instructions")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit e637130794)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Faith Ekstrand
cb93fe85b9 pan/bi/ra: Allow offsets on tied sources
The only real requirement here is that the destination offset is zero
and that the destination is big enough to hold the source.  The source
offset doesn't matter.

Fixes: bc17288697 ("pan/bi: Lower split/collect before RA")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 05c5e52054)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Faith Ekstrand
ddf6c31b8e pan/bi: Delete a few instruction encodings
The non-trivial non-replicate swizzles on IADD.v4x8 and ISUB.v4x8 are
either documented wrong or broken in hardware.  Instead of swizzling
b0101 and b2323, they swizzle b0011 and b2233 on G52.  This is either a
hardware bug or an issue with documentation.  In either case, it's
probably best not to trust it.  Those swizzles aren't all that useful
anyway.  We also weren't using any of them before (or they'd have
broken) so this isn't a performance regression.

Cc: mesa-stable
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 538b5c411e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Faith Ekstrand
7cf57ccd9c pan/bi: Support more swizzle aliases in the bifrost pack code
Fixes: 82328a5245 ("pan/bi: Generate instruction packer for new IR")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 3fffcf4338)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Natalie Vock
190c65ebae radv/rt: Don't enable midpoint sorting
Midpoint sorting is incompatible with how our traversal works.
Specifically, we change tMax when a hit is committed so we can skip over
BVH nodes that are guaranteed not to produce a closer hit. However,
changing tMax also changes the intersection interval of box nodes with
the ray, and thus, the midpoints of that interval. Stackless traversal
relies on getting nodes back in the exact same order as before, and if
that requirement is not met, traversal may incorrectly skip over nodes.

The likely benefit of midpoint sorting does not make up for the loss of
ability to skip over BVH nodes exceeding tMax, so simply disable
midpoint sorting.

This fixes geometry being visible behind other geometry when it
shouldn't be in various applications, including Half-Life 2 RTX.

Cc: mesa-stable
(cherry picked from commit c1a7680d93)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Job Noorman
28a32fe54b nir/opt_uniform_subgroup: fix ballot_bit_count components
ballot_bit_count_reduce expects the ballot to have 4 components causing
validation failures on targets where 1 < ballot_components < 4. Fix this
by padding the ballot to 4 components.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: ae66bd1c00 ("nir/opt_uniform_subgroup: use ballot_bit_count")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit cc6eec79c2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Karol Herbst
fc45812f74 radeonsi: set valid_buffer_range for CL buffers
Seems like we never set the range for CL buffers which caused spurious
test fails in the CL CTS.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 02679a51fd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Georg Lehmann
7757ddb8a9 nir/opt_load_skip_helpers: don't skip helpers for store_scratch data
Scratch stores store data for helper lanes that might be used later by an
instruction that cares about helpers, or even by control flow.

Fixes: a65009e808 ("nir: Add a nir_opt_tex_skip_helpers optimization")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14965
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit fc19ce6c17)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Job Noorman
fa14f8e6d5 ir3: fix handle_partial_const with vectorized src
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 50a91fbf87 ("freedreno/ir3: cleanup "partially const" ubo srcs")
(cherry picked from commit c27f0406b0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Timothy Arceri
7b5ed90bdc radeonsi: add Gun Godz workaround
This is another game based on the old YoYo engine

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15209

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit 27b56314ee)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Job Noorman
7745b46956 nir/gather_info: clear interpolation qualifiers before gathering
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Fixes: 66740d9c91 ("nir: gather interpolation qualifiers")
(cherry picked from commit a72704d0fb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Job Noorman
97213d180e nir/opt_varyings: fix alu def cloning
nir_builder_alu_instr_finish_and_insert initialized the def's bit_size
and num_components so we should set them afterwards.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Fixes: c66967b5cb ("nir: add nir_opt_varyings, new pass optimizing and compacting varyings")
(cherry picked from commit 273fd18b89)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Pavel Ondračka
0347549074 st/bitmap: release the temporary bitmap sampler view
st_cb_bitmap appends a temporary bitmap sampler view to the sampler
view array passed to set_sampler_views().

1a5c660ef5 changed this path to only release the extra YUV views
returned by st_get_sampler_views(), but the temporary bitmap view is
created locally and is not part of extra_sampler_views. It therefore
stopped being released so release the temporary bitmap sampler view
explicitly after drawing the bitmap quad.

Fixes: 1a5c660ef5 ("st/bitmap: only release YUV samplerviews")
(cherry picked from commit 33864e569e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:45 +02:00
Ahmed Hesham
e145579956 rusticl: fix flag validation when creating an image
From the OpenCL specification:
    `CL_MEM_KERNEL_READ_AND_WRITE`: This flag is only used by
    clGetSupportedImageFormats to query image formats that may be both
    read from and written to by the same kernel instance. To create a
    memory object that may be read from and written to use
    CL_MEM_READ_WRITE.

If an application follows the instructions above, i.e. query a list of
supported image formats, using `CL_MEM_KERNEL_READ_AND_WRITE` as
input, and then attempts to create an image using one of the supported
image formats, by calling `clCreateImage` and passing
`CL_MEM_READ_WRITE`, the call to the image creation entry point should
succeed. This instead fails on Mali devices with the error
`CL_IMAGE_FORMAT_NOT_SUPPORTED`.

Rusticl fails when validating the image format against its supported
flags. Formats that support `PIPE_BIND_SHADER_IMAGE` have their
supported flags set as `CL_MEM_WRITE_ONLY` and
`CL_MEM_KERNEL_READ_AND_WRITE`.

This changes the supported CL flags to be `CL_MEM_WRITE_ONLY` for
`PIPE_BIND_SHADER_IMAGE` and `CL_MEM_READ_WRTE |
CL_MEM_KERNEL_READ_AND_WRITE` for `PIPE_BIND_SAMPLER_VIEW |
PIPE_BIND_SHADER_IMAGE`.

Fixes: 3386e142 (rusticl: support read_write images)

Fixes OpenCL-CTS test: `test_image_streams` on Mali. Invocation:
```
test_image_streams write 1D CL_RGB CL_SIGNED_INT8
```

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
(cherry picked from commit e77c984cef)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:44 +02:00
Samuel Pitoiset
46aea87a79 spirv: fix OpUntypedVariableKHR with optional data type parameter
This would read OOB and crash because data type is optional per the
SPIRV spec.

Original patch by Faith Ekstrand <faith.ekstrand@collabora.com>.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 1f8be7bfad)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:44 +02:00
Eric Engestrom
b3b0c9002e .pick_status.json: Mark 4b3bd6b0b5 as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:44 +02:00
Eric Engestrom
eb6df9c83d .pick_status.json: Mark 9ff879441f as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:44 +02:00
Eric Engestrom
41ca0dd7c7 .pick_status.json: Update to 7e163fb793
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
2026-04-14 15:27:44 +02:00
Eric Engestrom
bbc23bed47 docs: add sha sum for 26.0.4
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-04-03 11:31:41 +02:00
Eric Engestrom
d9e5e36b19 VERSION: bump for 26.0.4
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-04-01 19:37:49 +02:00
Eric Engestrom
97c3564810 docs: add release notes for 26.0.4 2026-04-01 19:37:49 +02:00
Juan A. Suarez Romero
ec101645ff vc4: fix unwanted buffer release on uploader
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
When converting the index buffer from 4-bytes to 2-bytes, we use the
uploader for the job. Since commit b3133e250e we do an uploader alloc
ref, which releases the uploader buffer if there is no enough space,
creating a new one.

The problem happens when we also need this buffer because it is the one
containing the index buffer to convert. This happens, for instance, if
we need to convert the primitives because they are not supported (e.g.,
converting quads to triangles), as this is done
also using the uploader.

The solution is to ensure the uploader's buffer has an extra reference
so when released, it is not destroyed. This can easily achieved by
calling first pipe_buffer_map_range(), which is required to access the
buffer, and it increases the references.

This fixes `spec@!opengl 1.1@longprim`.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
(cherry picked from commit 48c086cb42)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Samuel Pitoiset
0a9270779f radv: emit BOP events after every draw to workaround a VRS bug on GFX12
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14812
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit bf7e29617d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Pavel Ondračka
dfd0e55b5a r300: split large HiZ clears into multiple packets
R300_PACKET3_3D_CLEAR_HIZ encodes COUNT in 14 bits (COUNT[13:0]), so a
single packet can clear at most 0x3fff dwords.

Large depth surfaces on R5xx can require more HiZ dwords than that.
When we emitted a single packet, COUNT truncated and part of HiZ RAM
remained uncleared, which could show up as HyperZ corruption.

Emit CLEAR_HIZ in chunks of R300_CLEAR_HIZ_COUNT_MAX and reserve enough
atom space for the worst-case packet count derived.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/360
Fixes: 12dcbd5954 ("r300g: enable Hyper-Z by default on r500")
(cherry picked from commit fddc101070)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Pavel Ondračka
2b87cb01b2 r300: add shared HyperZ pipe-count helper
Introduce r300_hyperz_pipe_count and use it in\nr300_setup_hyperz_properties.\n\nRV530 selects pipe topology from NUM_Z_PIPES, while other families use\nNUM_GB_PIPES. Keeping this in one helper avoids duplicated family checks\nand prepares follow-up HiZ clear sizing changes to reuse the same rule.

(cherry picked from commit e97ac38ff3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Pavel Ondračka
8292cf5563 r300: disable zmask clears for large surfaces
(cherry picked from commit 3fc2627897)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Pavel Ondračka
27fec03660 r300: don't apply odd macroblock rounding to 3D textures
This is intended only for NPOT 2D textures.

Fixes: 0763fb947 ("r300: align macro-tiled stride-addressed textures in X")
(cherry picked from commit 648dfe88f4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Pavel Ondračka
e06648d86a r300: fix bias presubtract algebraic transformation
One fneg too many.

Fixes: 0508db915 ("r300: implement bias presubtract")
(cherry picked from commit e68e519b91)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Mario Kleiner
af53a9bfbc dri: Fix "cosmetic" undefined behaviour warning for RGB[A]16_UNORM formats.
Ian Romanick reported some "undefined behaviour" warnings during some
not specified tests, relating to introduction of RGB[A}16_UNORM formats
in merge request
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38588

This due to overflowing the 32-bits masks[], and then during assignment
the red/green/blue/alphaMask fields in struct gl_config when using a 16
bpc format. Iow. the red/green/blue/alphaMask would not be usable.

Suppress this warning by setting masks[] to zero for unorm16 formats,
just as was previously done for is_float16, ie. fp16 formats.

16 bpc formats are only exposed for display on non-X11 WSI target
platforms like GBM+DRM, Wayland, surfaceless, and these platforms do
not use the info in red/green/blue/alphaMask at all, so the "undefined
behaviour" is meaningless.

Fixes: f2aaa9ce00 ("dri,gallium: Add support for RGB[A]16_UNORM display formats.")
Reported-by: Ian Romanick @idr
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit ab94515b0a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Eric Guo
58ab5760c1 panfrost: Fix NULL pointer dereference in panfrost_emit_images
Fix a crash in image descriptor emission caused by stale image_mask bits.

Root cause:
- set_shader_images used a shift expression with count==64 when clearing
  image_mask, which is undefined behavior in C.
- This could leave image_mask inconsistent with actual image bindings,
  so panfrost_emit_images() might dereferences NULL image resources.

Fixes:
- Use 64-bit-safe bit helpers for mask updates to avoid invalid shifts.

Crash observed when running: OpenCL-CTS api/test_api
Backtrace:
  #0 util_image_to_sampler_view (v->resource is NULL)
  #1 panfrost_emit_images
  #2 panfrost_update_shader_state
  #3 panfrost_launch_grid_on_batch
  #4 panfrost_launch_grid

Backport-to: *
Signed-off-by: Eric Guo <eric.guo@nxp.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit c1770565f3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
utzcoz
88cfa8ff29 gfxstream: Fix vkSetDebugUtilsObjectNameEXT crash for unwrapped objects
Mesa's vk_common_SetDebugUtilsObjectNameEXT assumes every Vulkan object
handle is a pointer to a vk_object_base struct. In gfxstream, only a
subset of objects (instance, device, queue, command buffer, command pool,
buffer, fence, semaphore) carry a Mesa wrapper. All other non-dispatchable
handles (shader modules, pipelines, render passes, etc.) are opaque host
handles that are not valid pointers.

Passing such an unwrapped handle to the common path causes it to be cast
to a vk_object_base pointer and dereferenced, resulting in a SIGSEGV
(null-pointer dereference at offset 0x40).

Override the function in the gfxstream driver to store debug names on
vk_object_base for wrapped objects and return VK_SUCCESS for unwrapped
objects.

Fixes: 7b50e62179 ("gfxstream: mega-change to support guest Linux WSI with gfxstream")
Test: Verified with hellovk (with validation layers) on Android Emulator - no crashes.
(cherry picked from commit bf8862b49f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Yiwei Zhang
4feda37353 vulkan/wsi/win32: respect acquire timeout for sw wsi
When DXGI is not supported, win32 falls back to sw wsi without acquire
timeout ignored.

This change:
1. adds the needed acquire mutex and cond
   - the fail path is intentionally left untouched so that mutex and
     cond are both valid when wsi_win32_swapchain_destroy is called
2. adds wsi_win32_acquire_idle_cpu_image helper to respect timeout
3. adds wsi_win32_set_image_idle helper to properly signal acquire_cond
   for sw wsi case

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15122
Cc: mesa-stable
(cherry picked from commit af42f0c80f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Yiwei Zhang
0287336eea vulkan/wsi/win32: add wsi_win32_find_idle_image helper
Prepare to handle timeout for sw wsi (no DXGI).

Cc: mesa-stable
(cherry picked from commit 8ff24c7db3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Hyunjun Ko
b62216f82d anv: Add dummy workload for AV1 decode on affected platforms (Wa_1508208842)
Implement software workaround for AVP decoder corruption on Gen12
platforms. These platforms require a warmup workload before
the actual AV1 decode to prevent output corruption.

- Gen12: Tiger Lake, DG1, Rocket Lake, Alder Lake

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 260908cecb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Rhys Perry
ad17b864cb radv: fix memory leak in radv_rt_nir_to_asm
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 574f577657)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Adam Simpkins
99129b13ce iris: fix a crash in disable_rb_aux_buffer
I have been running into crashes in this function when using blender.
Some of the entries in ice->state.framebuffer.base.cbufs[0] can
apparently have the texture field be null, which was causing a segfault
in this loop.

In my case, nr_cbufs was 3, and the first two cbufs entries had a null
texture and format set to PIPE_FORMAT_NONE. The last entry had format of
PIPE_FORMAT_R16G16_FLOAT and a non-null texture.

Adding this null check before attempting to dereference the texture
fixes the crash for me and allows blender to work normally.

Fixes: ca96f8517c ("iris: remove uses of pipe_surface as a pointer")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit e16c8cc579)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:35 +02:00
Faith Ekstrand
c74811897f pan/buffer: Add the offset to the size for buffer textures
In the attribute model, the size is for the attribute binding and the
offset is an offset into that range.  If we're going to use that to
offset the buffer itself, we need to increase the size accordingly.

Fixes: a21ee564e2 ("pan/bi: Make texel buffers use Attribute Buffers")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit ce56f49561)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Faith Ekstrand
60df6998b4 pan/bi: v2x16 conversions don't replicate
They swizzle just like anything else.  Technically, we could maybe do a
little better than the generic case for these since they only read 8
bits per 16 bits in the destination but the generic case is correct,
even if it isn't optimal.

Fixes: f7d44a46cd ("pan/bi: Optimize replication")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 8dc458225b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Georg Lehmann
2527900bbc nir/lower_non_uniform_access: fix fusing loops for same index but different array variable
struct nu_handle is hashed and deduplicated using struct nu_handle_key, which ignored
parent_deref. That means all instructions will use the first parent_deref when rewriting
the sources.

Avoid this by not including the parent deref in the struct, and instead querying it
when needed.

Fixes: 4d09cd7fa5 ("nir/lower_non_uniform_access: Group accesses using the same resource")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15173
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
(cherry picked from commit e7077e8f5c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Marek Olšák
b084df3ed6 radeonsi: disable streamout queries for u_blitter
Cc: mesa-stable
Reviewed-by: Pierre-Eric
(cherry picked from commit 918e5764f4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Marek Olšák
a20678b267 radeonsi: fix blits via util_blitter_draw_rectangle
It didn't save states properly. The only correct place to save them is
si_blitter_begin. Unfortunately, we can't skip saving and restoring
those states because we don't know in advance whether the rectangle path
will be used.

Cc: mesa-stable
Reviewed-by: Pierre-Eric
(cherry picked from commit 556ceb1b75)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Natalie Vock
5e538b5efd vulkan: Bump MAX_ENCODE_PASSES
RADV needs one more encode pass for a bugfix in the next commit.

Cc: mesa-stable
(cherry picked from commit e713527aa9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Icenowy Zheng
ee98ce1142 pvr: fix dirty tracking for stencil ops
The dirty state of stencil ops is not checked when deciding whether to
rebuild the ISP state, although the values are part of the ISP state
(the 27:16 bits of ISPB word).

Add MESA_VK_DYNAMIC_DS_STENCIL_OP to the condition for rebuilding ISP
control registers.

Fixes GLCTS tests when running on top of Zink:
dEQP-GLES2.functional.fragment_ops.stencil.zero_stencil_fail

Fixes: 88f1fad3f7 ("pvr: Use common pipeline & dynamic state frameworks")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
(cherry picked from commit ee031d67b4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Lionel Landwerlin
e84168bdac brw: fence SLM writes between workgroups
On LSC platforms the SLM writes are unfenced between workgroups. This
means a workgroup W1 finishing might have uncompleted SLM writes.
Another workgroup W2 dispatched after W1 which gets allocated an
overlapping SLM location might have writes that race with the previous
W1 operations.

The solution to this is fence all write operations (store & atomics)
of a workgroup before ending the threads. We do this by emitting a
single SLM fence either at the end of the shader or if there is only a
single unfenced right, at the end of that block.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13924
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit fa523aedd0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
emre
b5c8c1dcb2 nvk: fix barrier cache invalidation
Fixes: e1c1cdbd5f ("nvk: Implement vkCmdPipelineBarrier2 for real")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit fe558d8328)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Icenowy Zheng
dbdbef673f pvr: consider the size of DMA request when setting msize of DDMADT
The DDMADT instruction of PDS has out-of-bound test capability, which is
used for implementation of robust vertex input fetch.

According to the pseudocode in the comment block before the "LAST DDMAD"
mark in pvr_pipeline_pds.c, the check is between
`calculated_source_address + (burst_size << 2)` and `base_address +
buffer_size`, in which the `burst_size` seems to correspond to the BSIZE
field set in the low 32-bit of DDMAD(T) src3 and the `buffer_size`
corresponds to the MSIZE field set in the DDMADT-specific high 32-bit of
src3. As the calculated source address is just the base address adds the
multiplication result (the offset), the base address could be eliminated
from the check, results in the check between `offset + (BSIZE * 4)` and
`MSIZE` .

Naturally it's expected to just set the MSIZE field to the buffer size.
In addition, as the Vulkan spec says "Reads from a vertex input MAY
instead be bounds checked against a range rounded down to the nearest
multiple of the stride of its binding", the driver rounds down the
accessible buffer size before setting MSIZE to it.

However when running OpenGL ES 2.0 CTS, two problems are exhibited about
the setting of the size to check:

- dEQP-GLES2.functional.buffer.write.basic.array_stream_draw sets up a
  VBO with 3 bytes per vertex (RGB colors and 1B per color) and 340
  vertices (results in a buffer size of 1020 = 0x3fc). However as the
  DMA request size, which is specified by BSIZE, is counted by dwords,
  3 bytes are rounded up to 1 dword (which is 4 bytes). When the bound
  check of the last vertex happens, the vertex's DMA start offset is
  0x3f9, so the DDMADT check happens between 0x3fd (0x3f9 + 1 * 4) and
  0x3fc, and indicates a check failure. This prevents the last vertex,
  which is perfectly in-bound, from being properly fetched; this is
  against the Vulkan specification, and needs to be fixed.
- dEQP-GLES2.functional.vertex_arrays.single_attribute.strides.
  buffer_0_32_float2_vec4_dynamic_draw_quads_1 sets up a VBO with a size
  of 168 bytes, and tries to draw 6 vertices (each vertex consumes 2
  floats (thus 8 bytes) of attribute) with a stride of 32 bytes using
  this VBO. Zink then translates the VBO to a Vulkan vertex buffer bound
  with size = 168B, stride = 32B. Here the optional rule about rounding
  down buffer size happens in the current PowerVR driver, and the
  checked bound is rounded down to 160B, which prevented the last
  vertex's 8B attributes to be fetched. It looks like this kind of
  situation is considered in the codepath without DDMADT, but omitted
  for the codepath utilizing DDMADT for bound check.

So this patch tries to mimic the behavior of DDMADT when setting the
MSIZE field of it to prevent false out-of-bounds. It first calculates
the offset of the last valid vertex DMA, then adds the DMA request size
to it to form the final MSIZE value. With the code calculating the last
valid DMA offset considering the situation of fetching the attribute
from the space after the last whole multiple of stride, both problems
mentioned above are solved by this rework.

There're 99 GLES CTS testcases fixed by this change, and Vulkan CTS
shows no regression on `dEQP-VK.robustness.robustness1_vertex_access.*`
tests.

Fixes: 4873903b56 ("pvr: Enable PDS_DDMADT")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Ella Stanforth <ella@igalia.com>
(cherry picked from commit 252904f3d1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Icenowy Zheng
e62ef26e01 pvr: move PVR_BUFFER_MEMORY_PADDING_SIZE definition to pvr_buffer.h
This memory padding is enforced by GetBufferMemoryRequirements2 and
might be then checked against to decide whether it's enough.

Move it to pvr_buffer.h for further assertions.

Backport-to: 25.3
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Ella Stanforth <ella@igalia.com>
(cherry picked from commit d992474be9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Icenowy Zheng
778c3580e7 pvr: save vertex attribute size for DMA checking
Currently the size of single components inside one attribute is saved
and checked against when checking DMA capability. However, the vertex
attribute DMA happens for a whole attribute instead of individually for
its components, so checking against the component size is useless -- the
size of the whole attribute is what needs to be saved and checked.

Rename all component_size_in_bytes fields to attrib_size_in_bytes, and
save the size of the whole attribute inside them.

Fixes: 8991e64641 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Ella Stanforth <ella@igalia.com>
(cherry picked from commit aa8dad141c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Icenowy Zheng
874cba5743 pvr: fix "obb" typo in oob_buffer_size when building vertex pds data
The ddmadt_oob_buffer_size structure to be filled is named
`obb_buffer_size`, which is obviously a typo.

Change to `oob_buffer_size` to fix the typo.

Fixes: 8991e64641 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Ella Stanforth <ella@igalia.com>
(cherry picked from commit caea72cffc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Lionel Landwerlin
eb382e0cef anv: add drirc option to workaround missing application barriers on typed/untyped data
Enable it for Horizon Forbidden West (only seems to have untyped data
issue).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14889
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit db964068bf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Lionel Landwerlin
014f4ce985 anv: add an analysis pass to detect compute shaders clearing data
Applications often miss emitting barriers between a shader
initializing data & another shader writing data in the same location
afterward. This is very common for UAVs (see vkd3d-proton).

Vkd3d-proton does a pretty good job as inserting missing barriers
between UAV clears & writes. But some applications also have similar
issues with custom shaders. Here we introduce an analysis pass that
recognize shaders doing clear/initialization. We'll use that
information in the following commit to insert barriers after those
shaders.

Since Gfx12.5 our HW has become a lot more sensitive to those issues
due to the introduction of an L1 untyped data cache that is not
coherent across the shader units. On Gfx20+, typed data is also L1
cacheable exposing even more issues.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 13bf1a4008)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:34 +02:00
Alyssa Rosenzweig
ef136c2687 nir: add nir_get_io_data_src
This complements our existing nir_get_io_index_src helper. Most, but annoyingly
not all, stores put their data source in source 0. Having a helper for this lets
us reduce special casing in a bunch of random places.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
(cherry picked from commit 8fb1d65426)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Icenowy Zheng
ca4f356d37 pvr: Align width for PBE write when creating linear image
Even if a linear image isn't created with usages declaring PBE writes,
the image might be exported and then re-imported with a usage that
allows rendering to.

Always align linear images' width for being written by PBE.

This fixes WSI creating surfaces with odd width, exporting them and
re-importing for rendering.

Backport-to: 26.0
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 765a9f4fd9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Eric Engestrom
b5547c33bb [26.0 only] venus/ci: mark a test as fixed
Couldn't easily figure out which commit fixed it, but since it's a fix
I didn't try very hard ^^

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Yiwei Zhang
f54c73b080 venus: fix to relax the KHR_external_memory_fd requirement
This reverts commit 1895de16a6. The proper
way to filter out venus incapable physical devices is to do the platform
specific check during renderer side instance creation time.

Fixes: 1895de16a6 ("venus: filter out venus incapable physical devices")
(cherry picked from commit c2fe95a364)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Alyssa Milburn
7b5e16fb05 nv50,nvc0: Avoid uninitialized cbuf reads in blits
Overwrite the whole framebuffer cbuf rather than copying it from the
stack; fixes util_framebuffer_get_num_samples getting uninitialized
stack contents during validation.

Suggested-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14082
(cherry picked from commit a6992c7bbe)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Icenowy Zheng
b26748a918 pco: fix encoding of fred's s0abs bit
The s0abs bit in the encoing of fred instruction is wrongly set to the
status of .neg modifier instead of .abs modifier.

Fix this copy-n-paste error.

Fixes GLCTS tests when running on top of Zink:
dEQP-GLES2.functional.shaders.random.trigonometric.vertex.4
dEQP-GLES2.functional.shaders.random.trigonometric.vertex.45
dEQP-GLES2.functional.shaders.random.trigonometric.fragment.4
dEQP-GLES2.functional.shaders.random.trigonometric.fragment.45

Fixes: 8ec174b3f9 ("pco: add support for various selection, complex, trig ops")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
(cherry picked from commit 54860bb4c7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Pierre-Eric Pelloux-Prayer
dfa0f6706d gallium/u_blitter: add a new fs_color_clear variant
The referenced commit switched from a passthrough shader
to fs_clear_color[write_all_cbufs=0]. It shouldn't matter since
the shader isn't supposed to be executed - it's only setup to get
the first color output active.

On some chips (gfx8) it seems to cause issues (hangs or page fault)
for some piglit tests, eg:
  framebuffer-blit-levels draw stencil

To fix this, introduce a 3rd variant, where a constant buffer isn't
required and instead the color is hardcoded in the shader.

Fixes: ca09c173f6 ("gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 2ff9fa8b72)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Erik Faye-Lund
e406a5bbd7 panvk: remove unused flag
This flag isn't used any more, so let's remove all references to it.

Fixes: e25064c026 ("panvk: Use indirect path for indexed draw on JM")
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 5b8ebb8553)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
juntak0916
f8d492ccc3 nvk: fix BindImageMemory2 per-bind status result
The per-bind status was always being set to VK_SUCCESS instead of the
actual result from nvk_bind_image_memory.

Fixes: 93792b5ef2 ("nvk: Add static wrappers for image/buffer binding")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit dd3e153a10)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Job Noorman
e2e2dc6bf7 ir3/legalize: don't drop sync flags on removed predt/predf
When a predt/predf branch can be removed, any sync flags set on the
terminator were removed as well. Fix this by copying these flags to the
prede that replaces the terminator.

Fixes frame instability in "Devil May Cry 5" and "Resident Evil 3".

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 39088571f0 ("ir3: add support for predication")
(cherry picked from commit b2a44da9e9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Jose Maria Casanova Crespo
b640985aab broadcom/common: fix V3D 7.1 TFU ICFG IFORMAT values
The V3D 7.1 TFU ICFG register restructured the IFORMAT field to 3 bits
(25:23) vs 4 bits on V3D 4.2. The defines were still using the V3D 4.2
encoding (11-15) which overflows the 3-bit field. Fix values to the
correct 3-7 range.

This was working by accident because the overflow bits land in the
SVTWID field, which is not used for the affected tiling formats.

Also rename SAND_128 to SAND since V3D 7.1 has a single SAND input
format; the tile width is now controlled by SVTWID.

Fixes: 146ceadcf4 ("v3dv: add support for TFU jobs in v71")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 89229f08bb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Valentine Burley
8c2283df41 ci: Drop duplicate Intel shader-db run
Skylake is the default device for the Intel shim, and it's already
included in the four Intel families listed below.

Fixes: 183d57aa9e ("ci: Run intel shader-db on Haswell, Broadwell, and Meteorlake")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit 9dd0f19198)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Ian Romanick
efc9ad3986 brw: Handle scalars and swizzles correctly in is_const_zero
v2: Massive simplification based on feedback from Ken.

Fixes: 96cde9cc01 ("intel/fs: Emit better code for bfi(..., 0)")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit dff1e8ae28)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Ian Romanick
29a5d22049 brw/algebraic: Allow mixed types in saturate constant folding
Prevents assertion failures in func.shader-ballot.basic.q0 and other
tests starting with "nir/algebraic: Optimize some b2f of integer
comparison".

Vector immediates, bfloat, and 8-bit floats are still not supported.

v2: Almost complete re-write based on suggestions from Ken.

v3: Don't retype() on a brw_imm_f value.

Fixes: f8e54d02f7 ("intel/compiler: Relax mixed type restriction for saturating immediates")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 985ace332b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Marek Olšák
6416837667 radeonsi: recompute IO bases after optimizations
to fix an assertion added by the commit, reproduced by viewperf13/catia

Fixes: d06616063c - radeonsi: assert that IO bases don't have holes & the same base isn't used twice

Reviewed-by: Pierre-Eric
(cherry picked from commit 8ea3d794fb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
Radu Costas
9257997e3e pco: Amend errant nir_move_option
Move options were bit or-ing from the wrong enum, causing undefined
behaviour when the number of intrinsics changed.
Replaced it with the values from the right nir_move_options enum that
were previously working. (Further refinement needed on these after
extensive testing.)

Fixes: f1b24267d2 ("pco: rework nir processing and passes")
Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
(cherry picked from commit 721c1b8f65)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:33 +02:00
pal1000
9c45a18af7 util: Fix use of undeclared identifier 'NULL' in src/util/os_misc.h when compiling with clang
Fixes: 2771eb39fd ("util: Add function os_unset_option/os_set_option for latter use")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14805

```
FAILED: [code=1] src/util/libmesa_util.a.p/u_process.c.obj
"cc" "-Isrc/util/libmesa_util.a.p" "-Isrc/util" "-I../../src/util" "-Iinclude" "-I../../include" "-Isrc" "-I../../src" "-Isrc/util/format" "-I../../src/util/format" "-IC:/msys64/clang64/bin/../include" "-fvisibility=hidden" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-std=c11" "-O2" "-g" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DPACKAGE_VERSION=\"26.0.0-rc3\"" "-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" "-DHAVE_OPENGL=1" "-DHAVE_OPENGL_ES_1=1" "-DHAVE_OPENGL_ES_2=1" "-DHAVE_SOFTPIPE" "-DHAVE_LLVMPIPE" "-DHAVE_ZINK" "-DHAVE_D3D12" "-DHAVE_VIRGL" "-DHAVE_SWRAST" "-DMESA_SYSTEM_HAS_KMS_DRM=0" "-DVIDEO_CODEC_VC1DEC=1" "-DVIDEO_CODEC_H264DEC=1" "-DVIDEO_CODEC_H264ENC=1" "-DVIDEO_CODEC_H265DEC=1" "-DVIDEO_CODEC_H265ENC=1" "-DVIDEO_CODEC_AV1DEC=1" "-DVIDEO_CODEC_AV1ENC=1" "-DVIDEO_CODEC_VP9DEC=1" "-DVIDEO_CODEC_MPEG12DEC=1" "-DVIDEO_CODEC_JPEGDEC=1" "-DHAVE_WINDOWS_PLATFORM" "-DHAVE_SURFACELESS_PLATFORM" "-DUSE_LIBGLVND=0" "-DUSE_D3D12_PREVIEW_HEADERS=0" "-DHAVE_GALLIUM_D3D12_VIDEO" "-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS" "-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=1" "-DALLOW_KCMP" "-DMESA_DEBUG=0" "-DHAVE___BUILTIN_BSWAP32" "-DHAVE___BUILTIN_BSWAP64" "-DHAVE___BUILTIN_CLZ" "-DHAVE___BUILTIN_CLZLL" "-DHAVE___BUILTIN_CTZ" "-DHAVE___BUILTIN_EXPECT" "-DHAVE___BUILTIN_FFS" "-DHAVE___BUILTIN_FFSLL" "-DHAVE___BUILTIN_POPCOUNT" "-DHAVE___BUILTIN_POPCOUNTLL" "-DHAVE___BUILTIN_UNREACHABLE" "-DHAVE___BUILTIN_TYPES_COMPATIBLE_P" "-DHAVE___BUILTIN_ADD_OVERFLOW" "-DHAVE_FUNC_ATTRIBUTE_CONST" "-DHAVE_FUNC_ATTRIBUTE_FLATTEN" "-DHAVE_FUNC_ATTRIBUTE_MALLOC" "-DHAVE_FUNC_ATTRIBUTE_PURE" "-DHAVE_FUNC_ATTRIBUTE_UNUSED" "-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" "-DHAVE_FUNC_ATTRIBUTE_WEAK" "-DHAVE_FUNC_ATTRIBUTE_FORMAT" "-DHAVE_FUNC_ATTRIBUTE_PACKED" "-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" "-DHAVE_FUNC_ATTRIBUTE_ALIAS" "-DHAVE_FUNC_ATTRIBUTE_NORETURN" "-DHAVE_FUNC_ATTRIBUTE_COLD" "-DHAVE_FUNC_ATTRIBUTE_VISIBILITY" "-DHAVE_UINT128" "-D_WIN32_WINNT=0x0A00" "-DWINVER=0x0A00" "-D_GNU_SOURCE" "-DUSE_SSE41" "-DHAVE___BUILTIN_IA32_CLFLUSHOPT" "-DUSE_GCC_ATOMIC_BUILTINS" "-DHAS_SCHED_H" "-DHAVE_DLFCN_H" "-DHAVE_CET_H" "-DHAVE_STRTOF" "-DHAVE_STRTOK_R" "-DHAVE_QSORT_S" "-DHAVE_STRUCT_TIMESPEC" "-DHAVE_ZLIB" "-DHAVE_ZSTD" "-DHAVE_COMPRESSION" "-DWIN32_LEAN_AND_MEAN" "-DWINDOWS_NO_FUTEX" "-DMESA_LLVM_VERSION_STRING=\"21.1.8\"" "-DLLVM_IS_SHARED=0" "-DDRAW_LLVM_AVAILABLE=1" "-DAMD_LLVM_AVAILABLE=1" "-DGALLIVM_USE_ORCJIT=0" "-DHAVE_SPIRV_TOOLS" "-DUSE_LIBELF" "-DTHREAD_SANITIZER=0" "-DHAVE_RENDERDOC_INTEGRATION=false" "-Werror=implicit-function-declaration" "-Werror=missing-prototypes" "-Werror=return-type" "-Werror=empty-body" "-Werror=incompatible-pointer-types" "-Werror=int-conversion" "-Wimplicit-fallthrough" "-Wmisleading-indentation" "-Wno-missing-field-initializers" "-Wno-format-truncation" "-fno-math-errno" "-fno-trapping-math" "-Qunused-arguments" "-fno-common" "-Wno-unknown-pragmas" "-Wno-microsoft-enum-value" "-Wno-unused-function" "-Werror=thread-safety" "-ffunction-sections" "-fdata-sections" "-pipe" "-Wp,-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-Wp,-D__USE_MINGW_ANSI_STDIO=1" "-march=core2" "-Werror=pointer-arith" "-Werror=vla" "-Werror=gnu-empty-initializer" "-Wgnu-pointer-arith" -MD -MQ src/util/libmesa_util.a.p/u_process.c.obj -MF "src/util/libmesa_util.a.p/u_process.c.obj.d" -o src/util/libmesa_util.a.p/u_process.c.obj "-c" ../../src/util/u_process.c
In file included from ../../src/util/u_process.c:28:
../../src/util/os_misc.h:151:24: error: use of undeclared identifier 'NULL'
  151 |    os_set_option(name, NULL, true);
      |                        ^~~~
1 error generated.

```
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
(cherry picked from commit 128dc57436)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Faith Ekstrand
97105a1526 nir: Consider if uses in nir_def_all_uses_*
They check for if uses and want to return false but nir_foreach_use()
means the if uses are never seen.

Cc: mesa-stable
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit 3f870d62b0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Georg Lehmann
6462dac37d gallivm: don't optimize fadd(a, 0.0) with signed zero preserve
Fixes: 540e84bedb ("gallivm: Preserve -0 and nan")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
(cherry picked from commit 284b4143f7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Pierre-Eric Pelloux-Prayer
d5f9f12123 radeonsi: account for outputs_written when updating spi_shader_col_format
Variants can modify which outputs get written so we must update
these fields otherwise spi_shader_col_format will be incorrect.

This can happen for instance with uniforms inlining:

   uniform bool depth_only;
   void main() {
      if (depth_only) return;
      ...
   }

When depth_only is true, this shader becomes empty after uniforms
inlining but spi_shader_col_format wasn't updated properly,
causing a hang.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14737
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 88986dcc9c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Pierre-Eric Pelloux-Prayer
a21f8ddf3d radeonsi: move spi_shader_*_format to si_shader_variant_info
Variants can affect theses value so it's best to store them
in this struct.

No functional changes.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit da7c515783)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Ryan Zhang
57ef28bbde panvk: trivial fix to remove repeated assignment
Fixes: c0d9827 ("panvk: Use WB mappings for the global RW and executable memory pools")

Signed-off-by: Ryan Zhang <ryan.zhang@nxp.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit 760ac320be)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
kingstom.chen
5d8b53beea radv/rt: only run move_rt_instructions() for CPS shaders
move_rt_instructions() only makes sense for CPS recursive shaders, where
later rt_trace_ray calls can overwrite the current shader's RT system
values.

Running it on the function-call path can hoist load_hit_attrib_amd
above merged intersection writes, which corrupts any-hit
hitAttributeEXT. Move the pass into the existing CPS-only
non-intersection branch before nir_lower_shader_calls().

Fixes: c5d796c902 ("radv/rt: Use function call structure in NIR lowering")
Closes: #15074

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
(cherry picked from commit 5a7f4c62d8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Valentine Burley
bb0c3b12b9 tu/drm/virtio: Fix GEM handle leak on failed dmabuf res_id lookup
When vdrm_handle_to_res_id fails in virtio_bo_init_dmabuf, the handle
obtained from vdrm_dmabuf_to_handle was leaked.
Closing the handle is safe despite the lack of vdrm refcounting
because dma_bo_lock is held and already-imported BOs return early.
At this point, we are the sole holder of the handle.

While here, use the local vdrm variable consistently.

Fixes: 6ca192f586 ("turnip: virtio: fix iova leak upon found already imported dmabuf")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit f2c89f0188)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Valentine Burley
e984faec26 tu/drm/virtio: Fix GEM handle leak in tu_bo_init error path
In tu_bo_init, if growing the submit BO list fails, the GEM handle
must be closed. However, bo->gem_handle is only populated later
via compound assignment. Use the gem_handle parameter directly
to ensure the correct handle is closed and not leaked.

Fixes: d67d501af4 ("tu/drm/virtio: Switch to vdrm helper")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit 316d9b0209)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Valentine Burley
9ca275f29a tu/drm/virtio: Do not free iova from heap for lazy BOs
When initializing a BO using a lazy VMA, the iova is provided by
the sparse VMA and was not allocated from the device's VMA heap.
Avoid calling util_vma_heap_free in the error path for such BOs
to prevent heap corruption and potential double-frees.

Fixes: 88d001383a ("tu: Add support for a "lazy" sparse VMA")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit eb7897f57b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Valentine Burley
b6640c1609 tu/drm/virtio: Avoid freeing zombified tu_sparse_vma
This is d3cedd2fa5 ("tu/drm: msm's has_set_iova codepath should avoid
freeing zombified tu_sparse_vma") but for virtio.

Fixes: 764b3d9161 ("tu: Implement transient attachments and lazily allocated memory")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit f1366ca144)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Valentine Burley
2aa33f41e6 tu/drm/virtio: Move set_iova into success path of virtio_bo_init_dmabuf
set_iova() was called unconditionally after tu_bo_init(), even on the
failure path where the BO has been zeroed. This would call set_iova()
with res_id 0 and a stale iova, corrupting the iova mapping.

Move set_iova() into the success branch so it is only called when
tu_bo_init() succeeds.

Fixes: db88a490b8 ("tu: Avoid extraneous set_iova")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit 7a96bc3187)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Valentine Burley
28f24b21ee tu/drm/virtio: Add missing lock to virtio_bo_init_dmabuf
Lock vma mutex when freeing iova in virtio_bo_init_dmabuf.

Fixes: f17c5297d7 ("tu: Add virtgpu support")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
(cherry picked from commit 28e3fb7052)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
pal1000
0b54363202 clc: Fix static link with clang>=22
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15090

Backport-to: 26.0

Reviewed-by: Karol Herbst <kherbst@redhat.com>

Tested-by: Rudi Heitbaum <rudi@heitbaum.com>
(cherry picked from commit 718afd787c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Mary Guillemard
79c1ff9077 nak: Do not allow load_helper_invocation reordering
load_helper_invocation can not be reordered past a demote.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 7ece220f96 ("nak/nir: Lower systm values before lowering I/O")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit cba5841d61)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Mary Guillemard
d4c73521c5 nir/dead_cf: Add missing load_global_bounded handling
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: caa0854da8 ("nir: plumb load_global_bounded")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit bb6fc8cc20)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Mary Guillemard
7908d4e89f nir/dead_cf: Add missing load_ssbo_ir3 handling
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 0092edfec0 ("nir/dead_cf: Do not remove loops with loads that can't be reordered")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit 6013667d61)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Mike Blumenkrantz
d769e67c52 llvmpipe: fix color fbfetch
with the unlowering pass, there is no longer a separate gl_LastFragData variable,
so this workaround just breaks color outputs

fixes dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data

cc: mesa-stable

(cherry picked from commit 4b2022a8f5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:32 +02:00
Mike Blumenkrantz
ad2384db21 mesa/renderbuffer: always add PIPE_BIND_SAMPLER_VIEW to rendering textures
this fixes expectations around e.g., using u_blitter to copy textures

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 929eb9a021)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Nick Hamilton
b3197d6821 pvr: Fix for multiple attachments being assigned to the same tile buffer.
When the first attachment is assigned to a tile buffer, the buffer
alloc mask was not been updated. This means when a second attachment
is added to the same tile buffer it will be assigned the same offset
as the first which will lead to incorrect behaviour.

Fixes for depq-vk:
dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.suballocation.attachment.4.568
dEQP-VK.renderpasses.dynamic_rendering.complete_secondary_cmd_buff.dedicated_allocation.attachment.4.568
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.suballocation.attachment.4.568
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.dedicated_allocation.attachment.4.568

Fixes: a7de9dae6b ("pvr: Add routine for filling out usc_mrt_setup from dynamic rendering state")

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 96cfb1cb7f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Luigi Santivetti
5594cb90ac pvr: keep compiler resources in sync with attachments
Do not assume that the application always provides images for backing
attachments. The app can provide a super set of attachments of which
only some are actually backed with images.

We want to filter-out attachments that aren't meaningful for rendering
or sampling, and create compiler resources only for relevant ones.

Fix assert in CTS:
  pvr_arch_mrt.c:215: pvr_rogue_init_usc_mrt_setup: Assertion `att_format != VK_FORMAT_UNDEFINED' failed.

Seen in pipeline monolithic, for instance:
  dEQP-VK.pipeline.monolithic.multisample.misc.dynamic_rendering.multi_renderpass.r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_sint_d32_sfloat_s8_uint.random_127

Fixes: d549c1d045 ("pvr: add pipeline handling to use dynamic rendering info")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 5473ca3be3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Luigi Santivetti
ff902ec44b pvr: expose partial usc mrt init routine
Expose the routine in preperation for a later commit.

Backport-to: 26.0

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 6b0fea938b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Simon Perretta
ee797f7159 pco: use vm/icm for tile buffer store coverage mask
Use the valid/input coverage masks for tile buffer store coverage masks
when running single/multi-sampled fragment shaders respectively.

Fixes: 297a0c269a ("pvr, pco: tile buffer support")

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reported-by: Nick Hamilton <nick.hamilton@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 8eee60fa78)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
David Rosca
f1b6e15252 frontends/va: Fix leaks when create_video_codec fails
Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
(cherry picked from commit 089cd9d88e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
David Rosca
9c88f72f8c frontends/va: Fix leaking H264/5 PPS/SPS objects when decoder wasn't created
When destroying H264/5 decode context we check the profile from decoder to
free the H264/5 PPS/SPS objects, but decoder is only created when decoding
first frame so these objects will never get freed in case decoder is NULL.

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
(cherry picked from commit 5134d37e7d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Rhys Perry
123322b8ae aco/tests: fix assembler/isel tests with LLVM 23
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit e2ebcba11b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Rhys Perry
4f859cf584 aco/tests: fix assembler tests with LLVM 22
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 0826685f1b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Iván Briano
b26c4014c6 brw: do not omit RT writes if dual_src_blend is on
Dual source blending when one of the sources is not written to leaves
those values undefined, but the other should still be valid.
By omitting unwritten outputs, we ended up not writing anything at all
for the case that OUT1 is written to but OUT0 is undefined.

Fixes new CTS tests: dEQP-VK.pipeline.*.blend.dual_source.undefined_output.first*

Cc: mesa-stable
Signed-off-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit fd556e54f6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Iván Briano
3794d34ad4 anv: fix anv_is_dual_src_blend_equation
Fixes new tests: dEQP-VK.pipeline.*.blend.dual_source.undefined_output.second*

Cc: mesa-stable
Signed-off-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 2ce8a9e1be)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Erik Faye-Lund
2953656a39 pan/lib: divide extent by tile-extend, not itself
Dividing this by itself is nonsensical, and just always gives us one.
That's obviously not what we want here.

But in this case we also know that the extent is divisible by the tile
extent, so there's no need for DIV_ROUND_UP, we can just divide.

Fixes: e6f8cab698 ("pan/layout: Split the logic per modifier")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit 5280b80281)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Erik Faye-Lund
ad057adfd4 pan/lib: set srgb-flag for afrc render-targets
Without this, sRGB rendering to AFRC is broken.

Fixes: 7a763bb0a3 ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit b0c32fcc66)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Erik Faye-Lund
0a5c858f28 pan/lib: do not try to use stencil-aspect of color attachment
We can't use the stencil-aspect of a color-attachment. That's going to
fail, so let's use the color-aspect instead. We already have it around
anyway.

Fixes: 7a763bb0a3 ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit 322aaa88c6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Erik Faye-Lund
4539139804 pan/genxml: remove non-existent YUV Enable for AFRC
This is controlled by the writeback-mode when using AFRC, not by an YUV
Enable field. This Filed doesn't exist in these, and should according to
the spec be zero.

Fixes: 7a763bb0a3 ("pan/genxml: Rework the RT/ZS emission logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit 15e0ac0731)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Eric Engestrom
9e5e58aa38 .pick_status.json: Mark 538c3ee6c7 as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Samuel Pitoiset
111c2dacaa radv/amdgpu: free the VA range in case the BO allocation failed
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 02628a5eb7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:31 +02:00
Robert Mader
eccd9df749 llvmpipe: Stop aligning height to raster block size for unbacked handles
This code path is usually used by lavapipe when importing dmabufs, not
for output.
The resulting size_required is then used to calculate the size
requirements for VkMemoryRequirements2 etc. Requiring a multiple of
LP_RASTER_BLOCK_SIZE - 4 - can eventually result in lavapipe rejecting
dmabuf imports.

An example is YUV420 at a resolution of 1680x1050 produced by Gstreamer
1.28 - e.g. from a screencasts. In this case we currently compute a size
of 3235840, while other drivers like radv compute 3225600. The actual
size is 3227648, fitting into the later but not the former.

Removing the alignment brings lavapipe in line with other drivers.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
(cherry picked from commit 0bbc26d2c4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric Engestrom
676c9c7f0e ci: changing .gitlab-ci.yml itself also means the container jobs must exist
Fixes: 4b2a4dce78 ("ci: Skip check-only container jobs for pre-merge")
(cherry picked from commit 4466914680)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric R. Smith
0629cbe042 panfrost: fix typos in architecture detection
The preprocessor symbol we want is `PAN_ARCH`, not `MALI_ARCH`.

Fixes: a21ee564e2 ("pan/bi: Make texel buffers use Attribute Buffers")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 3945421c17)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric R. Smith
675c1885b6 panfrost: fix texel buffer calculations
We were computing some positions using `void*` rather than pointers to
the appropriate structures. This caused bad pointers, the effect of
which depended on the current memory environment -- tests related to
texel buffers could pass or not depending on what other tests had run
previously.

Fixes: a21ee564e2 ("pan/bi: Make texel buffers use Attribute Buffers")
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
(cherry picked from commit 0142e2e5e3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Mary Guillemard
cb9c75e2ca nvk: Broacast viewport0 and scissor0 in case of FSR on Turing
On Turing, the hardware rely on the viewport index for FSR.
If not all viewports are defined, we will end up not rendering
anything when selecting the primitive shading rate.

This patch makes it that we now broadcast the viewport and scissor 0
likes the proprietary driver.

This fixes "dEQP-VK.mesh_shader.ext.builtin.primitive_shading_rate_*" on
Turing.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 2fb4aed9 ("nvk: Advertise VK_KHR_fragment_shading_rate")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit d00965651a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Mary Guillemard
fbebd62932 nvk: Move viewport and scissor emit to their own function
We are going to need to reuse those functions to fix FSR support on
Turing.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Cc: mesa-stable
(cherry picked from commit 56e31d8145)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Timothy Arceri
d55ff99ad1 util/driconf: add workarounds for Lethis - Path Of Progress
The game uses glGetUniformLocation() but specifies the wrong program id
for one of the uniforms. The shader programs both contain shaders with
a uniform of the same name but because they have a different number of
uniforms the returned uniform location does not match the expected uniform.

Here we add a workaround to force the uniform with the wrong get location
params to always have the location 0 so that it doesn't matter which
shader the application checks for the location.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14864
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 09393b33b2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Timothy Arceri
1f9129a359 mesa: add force_explicit_uniform_loc_zero workaround
Allows a uniform name to be passed to force_explicit_uniform_loc_zero
allowing us to set that uniform to an explicit location of zero.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 87ae5cab94)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Dave Airlie
1cfb84c060 st/mesh: handle mesh shader point size
This sets the per-vertex point size state correctly in the presence of mesh shaders.

(fixes line is just a educated pick)

Fixes: 51d6e4404a ("mesa: allow NULL for vertex shader when mesh pipeline")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit 5bfaf7536a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Icenowy Zheng
18606773fe vulkan/wsi/headless: properly use CPU images for CPU devices
Currently the headless WSI unconditionally uses DRM images as WSI
images, which isn't proper behavior for working with lavapipe driver,
and leads to either error or crash (depending on whether udmabuf is
available).

Properly setup CPU images instead of DRM images for software-rendering
WSI devices.

This fixes (at least) `dEQP-VK.wsi.headless.swapchain.render.*` on
lavapipe.

Fixes: 90caf9bdbd ("vulkan/wsi/headless: drop the wsi_create_null_image_mem override")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
(cherry picked from commit 38cf1b3829)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Mike Blumenkrantz
59f2c9502d ntv: always emit const coord components for fbfetch loads
VUID-StandaloneSpirv-SubpassData-04660
  The (u,v) coordinates used for a SubpassData must be the <id> of a constant vector (0,0)

cc: mesa-stable

(cherry picked from commit 95b7a5b82b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Faith Ekstrand
4dc0c3ce94 nak: Report progress from nak_nir_rematerialize_load_const()
Fixes: 8fffcdb18b ("nak/nir: Re-materialize load_const instructions in use blocks")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit 381bc06c4a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric Engestrom
73d8c998fe .pick_status.json: Mark 384d128164 as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric Engestrom
cc617b7b58 .pick_status.json: Mark d38916d673 as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric Engestrom
8e1a3577ed .pick_status.json: Mark 32a818d11d as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric Engestrom
9c86791bde .pick_status.json: Mark 26b19e355f as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:30 +02:00
Eric Engestrom
2c25692309 .pick_status.json: Update to 48c086cb42
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
2026-04-01 11:45:29 +02:00
Eric Engestrom
1897b18965 docs: add sha sum for 26.0.3
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-03-18 17:25:12 +01:00
Eric Engestrom
3f173c02d1 VERSION: bump for 26.0.3 2026-03-18 16:54:10 +01:00
Eric Engestrom
a04cff0266 docs: add release notes for 26.0.3 2026-03-18 16:54:10 +01:00
Mike Blumenkrantz
cbc172ecb2 mesa/st/samplerview: explicitly block releasing in-use samplerviews
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
st_texture_set_sampler_view() currently allows only one samplerview for
a given texobj per context. in a scenario where the same texobj is
bound multiple times with different samplerviews (e.g., SRGB) for the
same draw like

samplerviews[] = {view0, view1}

then st_texture_set_sampler_view() will release view0 while creating view1
before either view is actually set to the driver, and then the driver will explode

this is gross, but the best solution which avoids infinite memory ballooning
from bufferview offsets is to pass through the array of views during creation
to ensure that the cache doesn't try to prune a view it just created

caught by Left 4 Dead 2

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15045

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 3264adf863)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-18 16:04:34 +01:00
Mike Blumenkrantz
d123fcf112 mesa/st/sampler_view: eliminate st_sampler_view::srgb_skip_decode
this prevents matching existing samplerviews when instead the existing
samplerviews can just match formats

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit c186023e51)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-18 16:04:34 +01:00
Mike Blumenkrantz
9aeca4c8b1 mesa/st/sampler_view: use a local variable for texture sv format
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 64dd6bf8aa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-18 16:04:34 +01:00
Mike Blumenkrantz
6026a01827 mesa/st/sampler_view: use a local variable for buffer sv format
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 8fce32191e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-18 16:04:34 +01:00
Mike Blumenkrantz
56b5152152 mesa/st: make st_texture_get_current_sampler_view static
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 22ed7c8230)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-18 16:04:33 +01:00
Connor Abbott
f7d31e8681 vtn: Fix vtn_mediump_upconvert_value() with transposed matrices
We can produce a transposed value sometimes, and we have to make sure
that val->transposed is also updated when that happens.

Noticed by inspection after the previous commit.

Cc: mesa-stable
(cherry picked from commit c13bdaaa40)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:23 +01:00
Connor Abbott
e234dcf62c vtn: Fix vtn_mediump_downconvert_value() for transposed matrices
We forgot to set the actual value. This meant that whenever we actually
needed to use the transposed matrix we would immediately segfault.

Cc: mesa-stable
(cherry picked from commit 048d2a0c68)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:22 +01:00
Mike Blumenkrantz
8af93595b9 lavapipe: fix mesh property exports
this should match how the spec actually functions

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
(cherry picked from commit 73feb138b6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:21 +01:00
Mike Blumenkrantz
62508b76b6 llvmpipe: save mesh shader when calling u_blitter
this otherwise causes the draw module to use mesh shaders when blitting

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
(cherry picked from commit 58dd7afa0e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:19 +01:00
Danylo Piliaiev
e5f61543fe tu/kgsl: Better detection of sparse support
Apparently a device can support KGSL_MEMFLAGS_VBO but not
IOCTL_KGSL_GPUMEM_BIND_RANGES or IOCTL_KGSL_GPU_AUX_COMMAND.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15006
Fixes: 71ef46717c ("tu/kgsl: Add support for sparse binding")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
(cherry picked from commit f23e88108d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:18 +01:00
Natalie Vock
976efbe12a radv/rt: Fix shared ray query stack on top of application LDS
Since the stack pointer may wrap around the stack size in overflow
cases, traversal logic calculates the real stack pointer with
nir_umod_imm(b, stack, args->stack_entries * args->stack_stride).

For ray queries, "stack" was initialized to
"stack_base + local_invocation_idx * 4". This was completely broken, as
the umod would later delete the stack base completely and overwrite the
start of LDS, which belongs to the apps' shared memory.

Instead, add the stack base as a constant offset in the load/store_stack
callback. (This should also save 1 VALU per ray query)
Also, delete radv_ray_traversal_args::stack_base since it's unused now.

Cc: mesa-stable
(cherry picked from commit b046eaf36d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:17 +01:00
David Rosca
842ab24923 radv/video: Fix coding pic_parameter_set_id in H264 slice header
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
(cherry picked from commit 25095cc393)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:03 +01:00
David Rosca
9794a3970a radv/video: Fix AV1 encode min tile size
Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
(cherry picked from commit 0450e4ff65)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:01 +01:00
Pavel Ondračka
0bf2abc5d5 r300: pad short vertex shaders to avoid R3xx hangs
Vertex shaders shorter than four instructions can hard-lock R3xx GPUs.
This seems to happen in combination with a small vertex count. This was
seen before, most notably with dummy shaders, but the earlier fix only
removed those dummy shaders, so some occurrences could still slip
through the cracks. Pad all vertex shaders to four instructions on R3xx.

Reviewed-by: Filip Gawin <filip@gawin.net>
Fixes: c6aa639ba9 ("r300: skip draws instead of using a dummy vertex shader")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/337
(cherry picked from commit 9b12664b72)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:00 +01:00
Natalie Vock
0b4e497c7b radv/rt: Bump ray query stack base limit for GFX12
GFX12 encoding added one bit to the stack offset, doubling the limit on
the stack base offset that is possible to encode. In practice, this
always allows using bvh_stack_push* instructions on GFX12 since LDS is
still 64kB.

Cc: mesa-stable
Fixes: 59a39779 (radv/rt: Only use ds_bvh_stack_rtn if the stack base is possible to encode)
(cherry picked from commit 867d0b33b3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:58:59 +01:00
Mike Blumenkrantz
e7b12e5009 zink: work around drivers with broken mesh shader properties
some properties require setting MAX+1, but there are drivers which mistakenly
set 0

cc: mesa-stable

(cherry picked from commit c09d0018a3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:58:57 +01:00
Mary Guillemard
4a90af4a3b nvk/mme: Add missing nullcheck in nvk_mme_test_state_state
Needed for some FSR macro changes I want to test.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 7d6cc15ab8 ("nvk/mme: Add a unit test framework for driver macros")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit 32895657b4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:58:56 +01:00
Rob Clark
3acc53d7a4 freedreno/drm: Fix bo_flush race
Once we've dropped the lock, we need to be referring to our own
temporary reference.

Fixes: 7b02bc6139 ("freedreno/drm: Drop fd_bo_fence")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit f5d40636cd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:58:41 +01:00
Ryan Zhang
ae58d184b0 panvk/csf: use DEFERRED_FLUSH for fragment job cache flush
The correct dependence is cs_flush_caches.cs_defer.signal to
signal cs_sync32_set.cs_defer.wait in occulusion query path.

Fixes: 443ddac ("panvk/csf: merge v10 and v11 paths in
issue_fragment_jobs")

Fixed: many random fail cases in VK-GL-CTS 1.4.4.2, eg.
dEQP-VK.query_pool.occlusion_query.get_results_conservative
_size_64_wait_query_without_availability_draw_points_clear_color

Signed-off-by: Ryan Zhang <ryan.zhang@nxp.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
(cherry picked from commit 93b58064f7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:58:40 +01:00
Eric Engestrom
5bbdfb0da5 .pick_status.json: Mark f2f792996d as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:58:38 +01:00
Faith Ekstrand
4b9aa545ea pan/compiler: Handle store_per_view_output in collect_varyings()
No idea how this wasn't blowing anything up before.

Fixes: 448b5e0225 ("panvk: implement multiview support")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 425458c598)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 13:11:20 +01:00
Mike Blumenkrantz
c0a931e338 mesa/st: fix unlower_io_to_vars to work with mesh shaders
cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15034
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15040

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 3dbb7e896d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 13:11:18 +01:00
Mike Blumenkrantz
3dea1bd33d nir: fix nir_is_io_compact for mesh shaders
cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit e604a8f617)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 13:11:15 +01:00
Yiwei Zhang
ac750a1e3c venus: force prime blit on Nvidia GPU
Normally Venus on Nvidia GPUs takes the prime blit path. The exception
is when KWin or any wlroots based compositors are used:
1. KWin and wlroots based compositors always add LINEAR to dmabuf
   feedback tranches assuming LINEAR can be handled by GPU drivers.
2. Venus + Virgl only sees the compositor injected LINEAR mod since
   Virgl doesn't support explicit modifiers on the driver side.
3. Nvidia GPUs doesn't support LINEAR color attachment, and it's too
   late to reject LINEAR mod when the native image path has already
   been taken instead of the prime image path.

Gamescope requires VK_EXT_physical_device_drm and its runtime doesn't
use standard WSI extensions, so venus can spoof without impacting it.

Cc: mesa-stable
(cherry picked from commit 1a302155ee)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 12:39:24 +01:00
Ian Douglas Scott
216cb0fca5 wsi/wayland: Use wl_fixes to destroy wl_registry
cc: mesa-stable

(cherry picked from commit 6641c891fd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 12:38:44 +01:00
Rob Clark
04d09c9524 freedreno/fdl: Use 4k alignment for tiled
Tiled-but-not-UBWC images should also have 4k alignment.

Cc: mesa-stable
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit 3d4792d577)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 12:38:41 +01:00
Mike Blumenkrantz
2401bd8e0a zink: run opt_combine_stores when optimizing
this ensures stores to mesh builtins are vectorized, as required by
spec

cc: mesa-stable

(cherry picked from commit 20c65db45d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 12:38:39 +01:00
Mike Blumenkrantz
d4465aad0b zink: allow renderpass termination for clears with ZINK_DEBUG=rp and GENERAL layouts
this doesn't require a layout change

cc: mesa-stable

(cherry picked from commit eed3007588)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 12:38:38 +01:00
Mike Blumenkrantz
58950e2d06 zink: reapply zsbuf state after unordered blits
this otherwise creates desync if a renderpass continues after blit reordering

cc: mesa-stable

(cherry picked from commit 43a6928d62)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 12:38:36 +01:00
Eric Engestrom
641b7710e9 .pick_status.json: Update to 70a487adfb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 11:26:05 +01:00
Eric Engestrom
804e4154a3 docs: add sha sum for 26.0.2
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-03-12 13:12:05 +01:00
Eric Engestrom
efd5b779da VERSION: bump for 26.0.2 2026-03-12 12:56:33 +01:00
Eric Engestrom
3646899ffd docs: add release notes for 26.0.2 2026-03-12 12:56:33 +01:00
Mike Blumenkrantz
5cf88188bd egl/device: fix the fix for explicit sw rejection in non-sw EGL_PLATFORM=device
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
"explicit sw" means llvmpipe, which cannot be a real drm device. this requires also
returning only a single device so as to avoid leaking non-sw drivers

should fix LIBGL_ALWAYS_SOFTWARE=1 eglinfo

Fixes: 8a339cdebc ("egl: fix sw fallback rejection in non-sw EGL_PLATFORM=device")
(cherry picked from commit c9b2986607)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Job Noorman
1f89a0fb96 ir3: don't predicate vote_all/vote_any
These get lowered to control flow which isn't allowed inside predicated
blocks.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 39088571f0 ("ir3: add support for predication")
(cherry picked from commit 5e4a7d01fe)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Job Noorman
d78e309e4d ir3: update context builder after ir3_get_predicate
If we are currently inserting instructions after the src of the
predicate conversion, uses of the predicate will be inserted before its
def (the conversion). Fix this by updating the context builder to point
to after the conversion.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fda91b49d7 ("ir3: refactor builders to use ir3_builder API")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15043
(cherry picked from commit f88e8b778d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Samuel Pitoiset
0e31cb83ce radv: fix missing L2 cache invalidation with streamout on GFX12
COPY_DATA emitted from the CP isn't coherent with L2, in case the
buffer filled size needs to be copied.

This fixes rare and random flickering with Mafia 3 Definitive Edition
on RDNA4.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14697
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit d9420eed9e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Sagar Ghuge
ada713b32f anv: Fix Wa_14021821874, Wa_14018813551, Wa_14026600921
WA states that we need to allocate maximum number of stackIDs per DSS
from RT_DISPATCH_GLOBALS to 2048.

We can still throttle/control the CFE_STATE::StackID to be in range
specified by the field.

This does impact performance having CFE_STATE::stackIDs capped to 2K
by default. More the outstanding ray queries, larger the working set and
have more impact on cache hit rate.

This affect performance on Xe2+ onwards:
* Boundary Benchmark:            36.2%
* Solar Bay extreme:             9.8%
* Hitman world of assassination: 3.9%

Fixes: c1a44e8d43 ("anv: force StackIDControl value for Wa_14021821874")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit cb423ee636)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Tapani Pälli
446fab4a4a anv: add handling for Wa_14026600921
This is the Xe3 version of the earlier workaround.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 840e6e855b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Tapani Pälli
77add2d8f2 intel/dev: update mesa_defs.json from workaround database
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit c75309c8f1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Faith Ekstrand
7054ea6d45 pan/bi: Be more careful about bit sizes in b2f lowering
Fixes: 21bdee7bcc ("pan/bi: Switch to lower_bool_to_bitsize")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 08c437f644)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Faith Ekstrand
9c2b19219a nir/lower_bool_to_bitsize: Make all bN_csel sources match
Previously, we assumed that the selector for bcsel could be whatever,
regardless of the bit sizes of the data and we'd just fix it in the
back-end.  This works okay for scalars but falls over the moment we
vectorize because all our vector handling assumes bit sizes match.
Since matching bit sizes is what the hardware wants anyway, it's better
to do the right thing in NIR and hope copy-propagation can fold in
conversions if needed.

Unfortunately, copy prop isn't that smart yet so this does hurt a bit:

    Instrs: 1193679 -> 1198086 (+0.37%); split: -0.06%, +0.43%
    CodeSize: 11915136 -> 11950592 (+0.30%); split: -0.05%, +0.34%
    Full: 160985 -> 160941 (-0.03%); split: -0.04%, +0.01%
    Estimated normalized CVT cycles: 4456.938557000181 -> 4480.876069000186 (+0.54%); split: -0.13%, +0.67%
    Estimated normalized SFU cycles: 6350.9375 -> 6392.21875 (+0.65%)
    Estimated normalized Load/Store cycles: 205773.0 -> 205795.0 (+0.01%)
    Maximum number of threads: 12864 -> 12863 (-0.01%)
    Number of spill instructions: 22487 -> 22489 (+0.01%)
    Number of fill instructions: 52179 -> 52219 (+0.08%)

Hurt shaders:

    google-meet-clvk/BgBlur
    google-meet-clvk/Relight
    parallel-rdp/small_subgroup
    parallel-rdp/small_uber_subgroup

The proper solution here is to teach copy-prop about this stuff so that
it can propagate swizzles into ALU ops when they're supported:
https://gitlab.freedesktop.org/panfrost/mesa/-/issues/265

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14945
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 3fd471dca5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Faith Ekstrand
740734ac72 etnaviv: Call lower_bool_to_int32 not to_bitsize
It calls both for some reason but never handles any other booleans than
32-bit.  This was probably a mistake.

Fixes: e63a7882a0 ("etnaviv: call nir_lower_bool_to_bitsize")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
(cherry picked from commit 6fb3995659)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:12 +01:00
Mary Guillemard
f550eb1903 vulkan: Do not override the shader_flags in case of no task shader
This should be doing a or and not an assign.
This fixes issues on NVK with mesh stages on DGC.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 8f2eeee7ba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Antonino Maniscalco
7b2af9e15a zink: don't care about generated gs output primitive
Zink uses the output primitive of the last vertex stage when deciding
the raster primitive. When we generate the gs the output primitive
depends on the raster primitive.

Not only does the generated gs output primitive have no value in chosing
the raster primitive, it can also get us stuck with the last raster
primitve which is of course incorrect.

Ignore it for generated shaders.

Cc: mesa-stable
(cherry picked from commit d526bbc29b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Timothy Arceri
b5304ffef7 glx: guard glx_screen frontend_screen member
Guards workaround code with the same conditions as glx_screen`s
frontend_screen member.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: 67eeee43e0 ("driconf: add a way to override GLX_CONTEXT_RESET_ISOLATION_BIT_ARB")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15021
(cherry picked from commit bd42f62b0f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Iván Briano
836a22d1a2 anv: don't try to fast clear D/S with multiview
If multiview is enabled on the render pass, baseLayer and layerCount
will be 0 and 1 respectively and throw us off.
We can still fast clear if view_mask == 1, but anything else hits the
BLORP_BATCH_NO_EMIT_DEPTH_STENCIL restriction.

Fixes: e488773b29 ("anv: Fast clear depth/stencil surface in vkCmdClearAttachments")

Signed-off-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit 5d22f307d5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Ian Romanick
2a2dba1bc7 elk/algebraic: Don't optimize SEL.L.SAT or SEL.G.SAT
shader-db:

Broadwell
total instructions in shared programs: 18607516 -> 18607530 (<.01%)
instructions in affected programs: 2095 -> 2109 (0.67%)
helped: 0 / HURT: 8

total cycles in shared programs: 955704436 -> 955702925 (<.01%)
cycles in affected programs: 34299 -> 32788 (-4.41%)
helped: 2 / HURT: 6

All Haswell and older platforms had similar results. (Haswell shown)
total instructions in shared programs: 16989200 -> 16989201 (<.01%)
instructions in affected programs: 461 -> 462 (0.22%)
helped: 0 / HURT: 1

total cycles in shared programs: 946537070 -> 946537035 (<.01%)
cycles in affected programs: 16378 -> 16343 (-0.21%)
helped: 1 / HURT: 0

Test: piglit!1100
Reported-by: Georg Lehmann
Fixes: ca675b73d3 ("i965/fs: Optimize saturating SEL.L(E) with imm val >= 1.0.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
(cherry picked from commit 64c60582b5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Ian Romanick
829e5ccc84 brw/algebraic: Don't optimize SEL.L.SAT or SEL.G.SAT
This optimization was added in October 2013, and the error was only just
now discovered. Removing the SEL.G.SAT optimization affected zero
shader-db shaders, and it affected 9 fossil-db shaders for instruction
size only.

I haven't checked to see if any of the hurt shaders are helped by
!39987.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17093041 -> 17093055 (<.01%)
instructions in affected programs: 2072 -> 2086 (0.68%)
helped: 0 / HURT: 8

total cycles in shared programs: 876739578 -> 876739154 (<.01%)
cycles in affected programs: 18946 -> 18522 (-2.24%)
helped: 2 / HURT: 6

fossil-db:

Lunar Lake
Totals:
Instrs: 906230557 -> 906240487 (+0.00%); split: -0.00%, +0.00%
CodeSize: 14498856128 -> 14499003168 (+0.00%); split: -0.00%, +0.00%
Send messages: 40667184 -> 40667205 (+0.00%); split: -0.00%, +0.00%
Cycle count: 104068494103 -> 104068561943 (+0.00%); split: -0.00%, +0.00%
Max live registers: 189570192 -> 189570204 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 48157648 -> 48157552 (-0.00%)
Non SSA regs after NIR: 139823587 -> 139823016 (-0.00%); split: -0.00%, +0.00%

Totals from 9172 (0.46% of 1985212) affected shaders:
Instrs: 10774709 -> 10784639 (+0.09%); split: -0.00%, +0.09%
CodeSize: 177868384 -> 178015424 (+0.08%); split: -0.08%, +0.17%
Send messages: 311154 -> 311175 (+0.01%); split: -0.00%, +0.01%
Cycle count: 232471392 -> 232539232 (+0.03%); split: -0.15%, +0.18%
Max live registers: 1243549 -> 1243561 (+0.00%); split: -0.00%, +0.01%
Max dispatch width: 196672 -> 196576 (-0.05%)
Non SSA regs after NIR: 509663 -> 509092 (-0.11%); split: -0.19%, +0.08%

Test: piglit!1100
Reported-by: Georg Lehmann
Fixes: ca675b73d3 ("i965/fs: Optimize saturating SEL.L(E) with imm val >= 1.0.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
(cherry picked from commit 6c6c6ce054)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Eric R. Smith
63a6e0ffc9 pco: fix a typo in the check for optimization looping
The count isn't incremented anywhere else.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Fixes: f1b24267d2 ("pco: rework nir processing and passes")
(cherry picked from commit 8521051cfa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Pavel Ondračka
eea697b179 r300: disable clip-discard watermark for triangles
Commit 0d4aa5f55f introduced the watermark to optimize the guardband
state changes and always computed new_distance as MAX2(distance,
watermark).

That is correct for point/line paths where distance > 0, but it keeps a
non-zero discard distance alive when the next draw sets distance = 0
(triangles). This leaks wide point/line clip-discard state into later
triangle draws and can clip away large parts of geometry (as observed in
Sauerbraten). Only apply the watermark when distance > 0 and reset it to
zero otherwise so triangle draws disable clip-discard as intended.

Fixes: 0d4aa5f55f ("r300: pop-free clipping")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14959
(cherry picked from commit ce33f82f83)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Samuel Pitoiset
ecb7bf7b68 radv: fix local invocation index for mesh/task and quad derivatives on GFX12
It must be lowered.

This fixes
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.{mesh,task}.*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 3c4cb16159)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Samuel Pitoiset
f858d2238e radv: fix a GPU hang with PS epilogs and secondary command buffers
If the secondary changes the fragment output state and if the same
PS epilog used before ExecuteCommands() is re-bind immediately after
that call, the PS epilog state wouldn't be re-emitted.

Apply the same change for VS prologs, although the logic is slightly
different and the bug shouldn't occur. The whole logic of secondaries
should be completely rewritten because it's definitely not robust.

This fixes a GPU hang in Where Winds Meet, see
https://github.com/doitsujin/dxvk/issues/5436.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 1a00587c44)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Yiwei Zhang
2b6e7f0be2 lvp: avoid advertising dmabuf support for kms_swrast
Lavapipe relies on true udmabuf support for dmabuf export allocation.
This changes aligns the behavior with both llvmpipe_allocate_memory_fd
and llvmpipe_import_memory_fd.

Fixes: 7d0a631f20 ("llvmpipe: export dmabuf caps for kms_swrast")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
(cherry picked from commit 5ab8c8a439)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Mel Henning
60e29a07c0 driconf: force_vk_vendor on No Man's Sky + NVK
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary@mary.zone>
(cherry picked from commit bfde63e4d8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Georg Lehmann
8f6c3dcc90 nir/opt_algebraic: fix frsq clamp pattern
This is not NaN correct.
And also make the pattern 32bit only because the constant is hard coded
FLT_MAX.

Fixes: 780b5c1037 ("nir/algebraic: Simplify some Inf and NaN avoidance code")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit ab773fc5d4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Danylo Piliaiev
4a4a86390b tu: Don't read .patch_input_gmem of unused attachment
There was duplicated code to set unscaled_input_fragcoord and a read
from VK_ATTACHMENT_UNUSED attachment, which incorrectly updated
builder->unscaled_input_fragcoord.

ubsan:
 tu_pipeline.cc:4734:44: runtime error: load of value 127, which is not a valid value for type 'bool'

Seen in:
 dEQP-VK.renderpasses.renderpass1.custom_resolve.monolithic.stencil_only_s8

Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
(cherry picked from commit 81a76be861)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Danylo Piliaiev
ace5f6c88d tu: Store gmem attachments after custom resolve in dyn RP
For dynamic renderpass we created a fake second subpass,
which would is used by CmdBeginCustomResolveEXT, however
CmdBeginCustomResolveEXT doesn't trigger tile stores, but
attachments didn't know they should be stored after fake
custom resolve subpass.

Fixes: 520e3f3a47 ("tu: Implement VK_EXT_custom_resolve")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
(cherry picked from commit 67c54c4465)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Caio Oliveira
8355670805 nir: Fix constant folding for iadd_sat
Use INT_MIN instead of INT_MAX for underflow.

Fixes: cc4b50b023 ("nir/opcodes: use u_overflow to fix incorrect checks")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pelloux@gmail.com>
(cherry picked from commit da57fbfb07)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:11 +01:00
Connor Abbott
725626858d tu: Fix setting will_be_resolved with MSRTSS
We were setting it on the user's attachments, which become
resolve/unresolve attachments, but it should be set on the color
and depth/stencil attachments.

Cc: mesa-stable
(cherry picked from commit d0be4ab2ab)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Connor Abbott
9a361c3801 tu: Set polygon mode when blitting
Noticed by inspection.

Cc: mesa-stable
(cherry picked from commit 1d167ffe77)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Yiwei Zhang
b88c8f37e4 pan: fix to not clear out of bitset range
Fixes: 617f0562bb ("pan: Use bitset instead of bool array in bi_find_loop_blocks")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit ec24d1afb6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Lucas Fryzek
d7ee1e68df vulkan/wsi: Check that xshm can be attached
Cc: mesa-stable
Co-authored-by: Carlos Lopez <clopez@igalia.com>
(cherry picked from commit 4933e60bc2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Lucas Fryzek
5f4eccf1fb glx: Check that xshm can be attached
Cc: mesa-stable
Co-authored-by: Carlos Lopez <clopez@igalia.com>
(cherry picked from commit a67af81944)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Lucas Fryzek
2c4c7fbfa9 egl/dri: Check that xshm can be attached
Cc: mesa-stable
Co-authored-by: Carlos Lopez <clopez@igalia.com>
(cherry picked from commit 5f481dd89d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Lucas Fryzek
23b88ba221 x11: Add helper util to check for xshm support
Cc: mesa-stable
(cherry picked from commit 9e1671dea9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Lucas Fryzek
8d313e5d1c drisw: Properly mark shmid as -1 when alloc fails
Cc: mesa-stable
(cherry picked from commit b93bf19d94)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Timothy Arceri
681de5a641 st/glsl_to_nir: update state var locations earlier
We need to update the state var locations before the
st_serialize_base_nir() calls otherwise
_mesa_optimize_state_parameters() can alter params such that
variants wont be able to find the correct match when calling
_mesa_lookup_state_param_idx().

Prior to 891d46f5 this worked because after failing to match
we would end up adding additional params back in that we had
just attempted to optimise.

Fixes: a6fcc2835e ("
st/glsl_to_nir: make sure the variant has the correct locations set")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14837

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit 6c60f423b3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Timothy Arceri
0edb7039cb mesa/st: use same path for setting state ref locations
After the fix in a6fcc2835e we can now take the same path whether
allow_st_finalize_nir_twice is set or not.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit b59c3ac82a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Caio Oliveira
b2a34da82f spirv: Fix spec constant to handle Select for non-native floats
There was an assumption that if the instruction had non-native float
as a source, the first source would have such type.  This doesn't
hold for Select, and the code failed in two ways

- The boolean source of Select was being converted to the non-native
  float type.

- The loop that resolves the bit-size for unsized operands would
  trip at `assert(i == 0)` because Select has more than one source.

Re-organize the code to track the types of the sources independently,
and fix both issues above.

Fixes: 90e1b12890 ("spirv: Add bfloat16 support to SpecConstantOp")
Fixes: 51d3c4c889 ("spirv: support float8 spec constant op")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 6affcb43a7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Caio Oliveira
4588b025c8 spirv: Pull constant source fixup to the existing loop
Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit b0c3b20bff)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Caio Oliveira
0775d0f1b5 spirv: Refactor ALU opcode translation to take bit sizes
Only used by Convert operations, so just pass 0 from callers that
are not Convert and clarify that in the code.

Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 1c3c987d5c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Timothy Arceri
a66a9280fb glsl: add workaround for MDK2 HD
Allows a shader to compile that uses an embedded struct declaration
which are not allowed in glsl 1.20+

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14986
(cherry picked from commit f109bfc3f1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Rhys Perry
1d66a995ce nir/range_analysis: set deleted key
If (uintptr_t)&deleted_key is small enough, inserting entries into the
hash table might not work correctly.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit c0079e09ca)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Ian Romanick
0d52c7941e brw: Also check for ADDRESS file in update_for_reads
Like accumulators and ARF address registers, the virtual address
registers are not tracked in a way the defs analysis can know
about. This could actually be fixed, but that is future work.

Fixes: b110b06447 ("brw: introduce a new register type for the address register")
Suggested-by: Lionel
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 8624da56ee)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:10 +01:00
Ian Romanick
815691378b brw: Use brw_reg_is_arf in update_for_reads
brw_reg::nr encodes both which ARF it is and which instance of that
ARF. In other words, nr for acc0 and acc2 have some bits that say
BRW_ARF_ACCUMULATOR and some bits that say 0 vs 2. The previous test
would only detect acc0.

Fixes: 0d144821f0 ("intel/brw: Add a new def analysis pass")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 366410e913)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Ian Romanick
f21bc439a1 brw: Don't mark_invalid in update_for_reads for non-VGRF destination
This can occur if NULL or an accumulator is an explicit destination.
update_for_reads still needs to process the sources.

v2: Pass a brw_reg to ::mark_invalid, and do the VGRF check in that one
place.

Fixes: 0d144821f0 ("intel/brw: Add a new def analysis pass")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit a548466186)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Jose Maria Casanova Crespo
31ea1923de v3d: reject fast TLB blit when RT formats don't match
v3d_tlb_blit_fast includes the blit onto a pending job that writes
to the source resource. The TLB data is already unpacked according to
the job's RT format, so storing it with a different RT format performs
a channel reinterpretation rather than a raw byte copy, corrupting the
data.

So when copying from RGB10_A2UI to RG16UI with glCopyImageSubData,
the copy_image path remaps both formats to R16G16_UNORM for a raw
32-bit copy. The fast TLB blit found the pending clear job
(RGB10_A2UI, 4 channels: 10-10-10-2) and stored its TLB data as RG16UI
(2 channels: 16-16), writing the unpacked 10-bit R and G channel values
into 16-bit fields instead of preserving the raw packed bits.

Previous internal_type/bpp check was insufficient: both RGB10_A2UI
and RG16UI share internal_type=16UI and the source bpp (64) exceeds
the destination bpp (32), but their channel layouts are different.

Add a check that the job's source surface RT format matches the blit
destination RT format before allowing the fast path.

Fixes: 66de8b4b5c ("v3d: add a faster TLB blit path")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 5454221cfb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Marek Olšák
f7d391f851 ac: set the correct number of Z planes for ALLOW_EXPCLEAR
This is an old driver bug that could cause Z corruption on gfx8-11.5.

v2: handle allow_expclear differently

Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (v2)
(cherry picked from commit 4cfe08e583)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Karol Herbst
d29063d4f2 nir: fix nir_round_int_to_float for fp16
fp16 has quite the limited value range and with bigger integers
nir_round_int_to_float might return Inf where it shouldn't depending on
the rounding mode.

Fixes conversions half_rt[npz]_(u)?(int|long) CL CTS tests.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit e1ed7de274)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Karol Herbst
3d8ff40d58 nir: fix nir_alu_type_range_contains_type_range for fp16 to int
The special value "Inf" doesn't fit into an int and therefore we have to
clamp regardless of whether all the other values would fit. And because
f2u32 and f2u64 define out-of-range conversions as UB in nir, we need to
clamp.

This change should have no effect for non saturating conversions.

Fixes "conversions long_sat_*half" CL CTS tests

Cc: mesa-stable
Suggested-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit 8e8fb2ebaa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Boris Brezillon
7ee55d3a5f pan/kmod: Allow mmap() on foreign buffers
If the BO comes from a different subsystem
(args.extra_flags & DRM_PANTHOR_BO_IS_IMPORTED), we should normally
add extra DMA_BUF_IOCTL_SYNC calls around CPU accesses to ensure the
CPU mapping consistency, but this is something we never worried about
(we've always assumed exporters were exposing uncached mappings with
NOP {begin,end}_cpu_access() implementations), and it worked fine until
now.

The long term plan is to hook up DMA_BUF_IOCTL_SYNC, but this requires
more work, and we need a quick fix that can be backported easily, hence
this revert+FIXME.

Fixes: b5e47ba894 ("pan/kmod: Add new helpers to sync BO CPU mappings")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14963
Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/282
Closes: https://gitlab.freedesktop.org/wayland/weston/-/issues/1101
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 30f1d5bab9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Pierre-Eric Pelloux-Prayer
b299e0323a mesa: don't wraparound st_context::work_counter
st->release_counter is initialized to 0, so if we happen to call
st_add_releasebuf with a non-NULL releasebuf when st->work_counter
is 0 due to wraparound in st_context_add_work, we might end up never
calling st_prune_releasebufs.

Since st_context_add_work and st_add_releasebuf both use work_counter
as a "some work was done" and don't care about the actual value, we
can remove the wraparound which will fix the buffer not being released
issue.

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14955
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14499
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 10d32feae8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Christoph Pillmayer
d6ea90b495 pan/bi: Move FAUs to memory for memory phis
We can have PHIs like this: m10 = PHI u2, 3.
For these, insert_coupling_code will spill the sources but that doesn't
work properly for FAU values before this commit because bi_index_as_mem
asserts that index.type == BI_INDEX_NORMAL and we also can't look up an
FAU index in ctx->S_exit or ctx->remat.

Fixes: 6c64ad93 ("panfrost: spill registers in SSA form")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 8a4d8d490b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Christoph Pillmayer
955a82bb83 pan/bi: Fix coupling spill placement
In the following arrangement the old logic leads to the following:
                       |
                       v
            +----------+------------+
            |block5                 |
            |m815 = PHI m1034, m860 |<-----------+
            |343 = FMA.f32 ...      |            |
            +----------+------------+            |
                       |                         |
        +--------------+                         |
        |              |                         |
        v              v                         |
     +-----+        +-----+                      |
     |b6   |        |b7,8 |                      |
     |     |        |     |                      |
     +-----+        +--+--+                      |
        |    +---+     |    +---+                |
        +----|b9 +-----+----|b10+---+            |
        v    +---+          +---+   v            |
+-------+-------------+     +-------+---------+  |
|block12              |     |block11          |  |
|m882 = PHI m815, m860|     |m860 = MEMMOV 343+--+
+---------+-----------+     +-----------------+
          v

The spill of / into m860 (corresponding to 343) ends up in block11 when
insert_coupling_code(succ=block5, pred=block11) because of the memory
phi in block5. Later, in insert_coupling_code(block12, block9), we
reject inserting the spill after ca9c9957. As a result, m860 is
undefined along block5 -> block7,8 -> block9 -> block12.

When the spill position is chosen first, ctx->block is block5 so
choose_spill_position falsely returns the fallback position. The issue
can be fixed by explicitly passing the "current block".

Fixes: ca9c9957 ("pan: Avoid some redundant SSA spills")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 09e1ba28e5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Timothy Arceri
734e53c96b glsl: relax precision matching on unused uniforms ES
0886be09 ("glsl: Allow precision mismatch on dead data with GLSL ES 1.00")
allowed precision mismatches on uniforms, however if you lower precision on
16-bit consts, then this error triggers instead.

So here we relax the type matching and just make sure we match int vs
float.

Fixes: 0886be09 ("glsl: Allow precision mismatch on dead data with GLSL ES 1.00")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5337
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 73bc604128)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Pavel Ondračka
02f422a145 r300: disable HiZ for PIPE_FUNC_ALWAYS
AMD docs support this:
R5xx Acceleration v1.5 says safest handling for ZFUNC changes is to disable
HiZ except specific LESS/LEQUAL and GREATER/GEQUAL transitions.
ATI OpenGL Programming and Optimization Guide advises avoiding ALWAYS when
trying to benefit from HiZ so that would imply fglrx also disables HiZ
there.

On RV530 this fixes the following dEQPs:
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.43
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.74

Fixes: 12dcbd5954 ("r300g: enable Hyper-Z by default on r500")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8093
(cherry picked from commit b0f019f8cf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
David Rosca
c001485f3b vl: Also disable MPEG2 Main profile when mpeg12 decode is disabled
Fixes: f4959c16c8 ("meson: add mpeg12dec as a video-codec")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
(cherry picked from commit 55bab89951)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Jose Maria Casanova Crespo
7d25d214f5 vc4: flush write jobs before BO replacement in DISCARD_WHOLE path
The DISCARD_WHOLE_RESOURCE path in vc4_map_usage_prep() replaces the
resource's BO with vc4_resource_bo_alloc(). As the RCL resolves
rsc->bo at job submit in vc4_submit_setup_rcl_surface(), any pending
write job would store to the new BO instead of the old one, corrupting
the new written data.

This is the same bug that was fixed in v3d in the previous commit.

Fixes: 18ccda7b86 ("vc4: When asked to discard-map a whole resource, discard it.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit ecb6c5d555)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Jose Maria Casanova Crespo
fb8f81a1d8 v3d: flush write jobs before BO replacement in DISCARD_WHOLE path
The DISCARD_WHOLE_RESOURCE path in v3d_map_usage_prep() replaces the
resource's BO with v3d_resource_bo_alloc(). As the RCL resolves
rsc->bo at job submit in emit_rcl() any pending write job would
store to the new BO instead of the old one, corrupting the new
written data.

This is adressed by flushing all pending write jobs affecting the
resource before replacing its BO.

This fixes multiple tests where data copied to a renderbuffer was
overwritten by a previos GPU clear. Test are from the subgroup:
dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.*

Fixes: 45bb8f2957 ("broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 1eaa46da09)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Jesse Natalie
5bf2bcd81e d3d12: Fix importing external resources
Fixes: 97061dd7 ("d3d12: Add support for Xbox GDK.")
(cherry picked from commit 9e277ed2b6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Samuel Pitoiset
f1f583b3bc radv: fix copying images with different swizzle modes on SDMA7
Swizzle modes must match on SDMA7 (GFX12), and the micro tile mode
doesn't exist.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit cc21e61e43)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
Rhys Perry
223af79274 aco: perform dce for blocks skipped for process_block()
We might need to DCE users of dead instructions removed by
process_block().

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 9e8ba10447 ("aco/vn: remove dead instructions early")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit 17b18496f6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Erik Faye-Lund
6e5d08c8e5 gallium/dri: set LIBVA_DRIVERS_PATH in devenv
We're setting this in the non-DRI codepath, but this was missed when we
started embedding the VA driver into libgallium. This means we no longer
were able to use VA-API from meson devenv, like we could before.

Fixes: 212d57f7e6 ("targets/va: Build va driver into libgallium when building with dri")
(cherry picked from commit 7e4744909b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Patrick Lerda
6f28830365 r600: fix cs atomic operations when the shader is called multiple times
This change is useful when the compute shader is called multiple
times with the atomic operations enabled. It fixes some data
coherency issues. This is done by moving
evergreen_emit_atomic_buffer_setup() after r600_flush_emit().

This change is also a partial fix for compute_shader.pipeline-compute-chain.
In this specific case, it makes the memory barrier working.

This change was tested on cayman and barts; it makes these tests
fully deterministic:
khr-gl4[2-6]/shader_atomic_counters/advanced-usage-many-dispatches: fail pass
khr-gles31/core/shader_atomic_counters/advanced-usage-many-dispatches: fail pass
deqp-gles31/functional/synchronization/inter_call/without_memory_barrier/atomic_counter_dispatch_.*_calls_.*_invocations: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
(cherry picked from commit dad942b468)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Pavel Ondračka
b1775f660a r300: copy target when merging alpha output instruction
The alpha instruction always wrote to the same rendertarget as the rgb and the
original target was ignored (surprisingly the HW docs explicitly allows rgb and
alpha to write to different targets). This makes tesseract rendering a bit
better, but there are still some remaining issues.

Fixes: 1c2c4ddbd1 ("r300g: copy the compiler from r300c")
Reviewed-by: Filip Gawin <filip@gawin.net>
(cherry picked from commit 87a881558f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Pierre-Eric Pelloux-Prayer
f1a3aa4036 frontends/va: fix undefined ref error
When building with "-Dvideo-codecs=h264dec,h265dec,av1dec" va/encode.c
won't be built but it's still required because it's used from
picture.c

Fixes: c4f05bdf60 ("frontends/va: include picture_*.c based on selected codec")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 82a51ba9b3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Mike Blumenkrantz
020b960d03 radv: fix multiview fast clears
this was only clearing layer0 because it was ignoring the viewmask

cc: mesa-stable

(cherry picked from commit b8ee6f3d30)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Lionel Landwerlin
195fbfb2f1 anv: dirty all push constant stages in simple shader
Above we're reprogramming push constants as well at a couple of
workarounds that require dirtying all stages.

cmd_buffer->state.gfx.push_constant_stages was already set in the
above function.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4fa1eddb4c ("anv: optimize binding table flushing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14953
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 38ef732169)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Icenowy Zheng
049caf1696 pvr: only specially handle gfx subcmd for BeginQuery
Among all subcommands, only gfx subcommands are bound to a query pool,
other subcommands seem to need no special handling.

In addition, if a ResetQuery is done before BeginQuery, the last
subcommand will be a event one, which fails the current assert that
assumes it's a gfx one.

Change the assertion of the subcommand being a gfx one to an addition
check of whether the subcommand is a gfx one.

This fixes crash of Vulkan CTS 1.4.5.1 test
dEQP-VK.query_pool.discard.normal.no_depth.none.discard .

Backport-to: 26.0
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
(cherry picked from commit 5a497316d4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Benjamin Cheng
3611d60cea radeonsi/vcn: Use full pitch for pre-encode input
In 1f83e73145, the pre-encode input picture size was also reduced.
However it was recently discovered that VCN FW uses the input picture
pitch as the pitch for this, which means that previous change broke
pre-encode.

Fixes: 1f83e73145 ("radeonsi/vcn: Reduce allocated size for pre-encode recon pics")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
(cherry picked from commit 2b2b1d405a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Connor Abbott
ebfdb11193 ir3: Fix constlen trimming when more than one stage is trimmed
The logic is supposed to find the stage with the maximum constlen to
trim for each time we have to trim a stage. But by not resetting
max_constlen each time, we would "trim" the same stage repeatedly,
leaving us thinking the total is below the limit when it actually isn't.

Cc: mesa-stable
(cherry picked from commit ae8928b638)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Connor Abbott
5840bf0b1b tu: Use HW offset 0 in 3d loads/clears with FDM
The HW uses ViewportIndex to select which GRAS_BIN_FOVEAT offset to use.
For normal 3d draws, either the ViewportIndex equals the view/layer or
we make the offset the same for all viewports/layers, but we aren't
aware of this in the 3d path and we always use viewport 0.

Use the HW offset 0 when subtracting the HW offset. This is a bit of a
hack, but it should work. This fixes LOAD_OP_LOAD with FDM.

Fixes: b34b089ca1 ("tu: Use GRAS bin offset registers")
(cherry picked from commit 68c0031f56)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Lionel Landwerlin
98ec831d58 anv: add missing handling for attachment locations in secondaries
Fixes:
  dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.interaction_with_shader_object
  dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.remap_single_attachment_shader_object

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d2f7b6d5 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 095c470d25)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Luigi Santivetti
ec658ea317 zink: fix format conversion logic for the alpha emulation case
cc: mesa-stable

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Fixes: 252bff0f ("zink: use real A8_UNORM when possible")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit 640bc3bc53)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Georg Lehmann
6c7f739b9d aco/insert_fp_mode: don't skip setting round for fract
fract(-FLT_MIN) is < 1.0 with rtz but 1.0 with rtne.

Fixes: 7212a75c5e ("aco/insert_fp_mode: exclude some instructions that will never round")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit 8f4de30d05)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Mike Blumenkrantz
f1a64582dd st/bitmap: only release YUV samplerviews
this is consistent with other callers of st_get_sampler_views() and
avoids desync in the sv cache

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14934
Fixes: 73da0dcddc ("gallium: eliminate frontend refcounting from samplerviews")

Acked-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 1a5c660ef5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Mike Blumenkrantz
0486f6bf8b zink: add TRANSFER_WRITE -> HOST_READ sync to end of batch
this is technically required by spec, even though at a practical level
it probably has no effect

cc: mesa-stable

(cherry picked from commit 3ba275aa70)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Georg Lehmann
5a61e04572 ci: disable debian-ppc64el and debian-s390x
They failed a lot today, no idea why. But having flakes in pre merge CI sucks.

(cherry picked from commit b05271f16c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:08 +01:00
Eric Engestrom
6788336325 .pick_status.json: Update to 73dba1e151
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:07 +01:00
Eric Engestrom
b602b7f01e fixup! docs: add release notes for 26.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-02-26 19:18:41 +01:00
Eric Engestrom
51fe0abad8 docs: add sha sum for 26.0.1
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-02-25 17:35:18 +01:00
Eric Engestrom
bf5998be6e VERSION: bump for 26.0.1 2026-02-25 16:54:24 +01:00
Eric Engestrom
ed6f967681 docs: add release notes for 26.0.1 2026-02-25 16:54:23 +01:00
Leon Perianu
f1a2f841f2 pvr: fix format table properties duplicate
- RGBA8888_* is a preprocessor alias for R8G8B8A8_* in u_format.yaml.
- Both entries in the format tables collide on the same enum value, and
   RGBA8888 overwrites R8G8B8A8.
- The fix was reverting to the version that was in the commit
39e949434c because there is a different format
was used that did not cause any collisions.

dEQP fixes:
   dEQP-VK.api.info.format_properties.r8g8b8a8_sint
   dEQP-VK.api.info.format_properties.r8g8b8a8_snorm
   dEQP-VK.api.info.format_properties.r8g8b8a8_uint
   dEQP-VK.api.info.format_properties.r8g8b8a8_unorm

Fixes: 9f740b26a6 ("pvr: Fix bugs in the format table")
Signed-off-by: Leon Perianu <leon.perianu@imgtec.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit 7c6dbb099a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:24 +01:00
Mary Guillemard
977f0409b2 hk: Fix crash in hk_handle_passthrough_gs
We should be returning if no GS is needed and no GS shader is bound.
This fix various segfaults introduced by the original fix.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: e10f29399f ("hk: fix passthrough GS key invalidation")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Janne Grunau <j@jannau.net>
(cherry picked from commit 6d040df750)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:24 +01:00
Lionel Landwerlin
03847a6f0b anv: remove snprintf for aux op transition
With perfetto that string is processed later leading to
use-after-free.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 413e169f45)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Lionel Landwerlin
77f3279c37 anv: dirty descriptors after blorp operations
Blorp emits 3DSTATE_BINDING_TABLE_POINTER_* instructions in 3D mode.

At the moment we're saved by the push constants reemitting the btp but
we'll drop that in the next commit.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 533c748b34)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Samuel Pitoiset
87a238d829 radv: fix potential GPU hangs with secondaries on transfer queue
Cache flushes should be skipped on SDMA. In practice,
radv_emit_cache_flush() should only be called on GFX/ACE.

SDMA NOP packets are emitted in barriers directly.

This fixes recent VKCTS coverage
dEQP-VK.api.command_buffers.secondary_on_transfer_queue.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit c4d5090d69)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Samuel Pitoiset
6d7f2e3fbd ac/nir: fix writemask for dual source blending on GFX11+
This should definitely be an OR operation if MRT0 and MRT1 don't write
the same channels. This also requires to set the writemask manually
because when it's 0 (in case a dual-source output is missing), the
intrinsic computes the mask itself with the number of components.

No fossils-db changes on NAVI33.

Fixes: 45d8cd037a ("ac/nir: rewrite ac_nir_lower_ps epilog to fix dual src blending with mono PS")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14878
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 2eb9420061)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Nick Hamilton
6edfd32388 pvr: Add support for fragment pass through shader
On the Rogue architecture add support for using a fragment passthrough
shader when there is no fragment shader present in a graphics
pipeline but the sample mask is required.

fix:
dEQP-VK.pipeline.monolithic.empty_fs.masked_samples

Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 14508b4c9a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Nick Hamilton
23cd27b129 pvr: Update CI fails list after render pass fixes
Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit b87d995d32)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Jarred Davies
5000c31573 pvr: Add missing support for tile buffers to SPM EOT programs
Configure the EOT setup for SPM EOT programs so that the generated
programs load the tile buffer into the output buffer before doing
the emit

Partial fix for:
dEQP-VK.renderpass.*.attachment_allocation.input_output.71

Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit d1f2ad17dd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Nick Hamilton
022e34b5f3 pvr: Add missing support for preserve attachments
In subpasses preserve attachments are not used by the subpass but
their contents must be preserved throughout the subpass.

Add a list for the preserve attachments info specified by a subpass
and when determining a subpass attachments total uses check the
preserve attachments list and add it uses to the total.

Partial fix for:
dEQP-VK.renderpass.*.attachment_allocation.input_output.71

Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 0e01b9ef2d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Nick Hamilton
a965c71ec6 pvr: Rename pvr_render_input_attachment
The struct will also be used for preserve attachments in the next
commit.

Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit e18670347a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Jarred Davies
fb1ba13c57 pvr: Fix allocating the required scratch buffer space for tile buffers
When calculating the dwords per pixel the output registers should
always be taken into account in addition to the number of tile buffers.

Fixes incorrect scratch buffer space calculation when both output
registers and tile buffers are emitted by a render.

Partial fix for:
dEQP-VK.renderpass.*.attachment_allocation.input_output.71

Fixes: 3457f8083a ("pvr: Acquire scratch buffer on framebuffer creation.")
Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit df445dc9b9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Nick Hamilton
9ad2e48819 pvr: Fix incorrect subpass merging optimisation
The subpass merging optimisation check for when subpasses are using
tile buffers was in the incorrect location.

The current check is in a function called from two places but only
the first of these should have been doing the optimisation check.

This was incorrectly affecting the number of renders that subpass
merging could avoid.

Partial fix for:
dEQP-VK.renderpass.*.attachment_allocation.input_output.71

Fixes: 10b6a0d567 ("pvr: Add support for generating render pass hw setup data.")
Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 0640ac7e3b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Danylo Piliaiev
ac49313d06 ir3: Align TCS per-patch output to 64 bytes to prevent stale reads
Empirically, TCS outputs have to be aligned to 64 bytes,
otherwise stale data may be read in rare cases. The exact
reason is not clear, but tests and proprietary driver behavior
strongly point at the need for 64 byte alignment.

Fixes tesselation issues in at least "Conan Exiles" but likely in many
more cases.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
(cherry picked from commit 47251b2e2d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Rhys Perry
ba82a16761 aco: resolve hazards before calls
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit 613b4fe407)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Rhys Perry
697fbaddb5 aco: reset all vgpr_used_by_vmem_ in resolve_all_gfx11
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit dfda890ae8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Benjamin Otte
d7607b6a4e lavapipe: Fix features for nonsubsampled ycbcr formats
The Vulkan spec says about VkFormatFeatureFlagBits:

  If a format does not incorporate chroma downsampling (it is
  not a “422” or “420” format) but the implementation supports
  sampler Y′CBCR conversion for this format, the implementation
  must set VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT.

Fixes: af062126ae
Signed-off-by: Benjamin Otte <otte@redhat.com>
(cherry picked from commit 0b6dd167ac)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Robert Mader
a163dec3ff lavapipe: enable dmabuf import for planar drm formats
Like e.g. NV12. This just requires some minor fixes around offset
handling.

(cherry picked from commit 0b6340fd94)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Mike Blumenkrantz
499a74569f zink: only do pre-sync transfer barrier after a renderpass
this is otherwise pointless and (for swapchain images) broken
(because they may never have acquired an image)

discovered by @valentine

cc: mesa-stable

(cherry picked from commit d47ba92d42)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Samuel Pitoiset
545509553a radv/meta: fix depth/stencil resolves with different regions
This is possible since VK_KHR_maintenance10.

This fixes new VKCTS coverage in
dEQP-VK.pipeline.*.multisample.m10_resolve.*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit ab6147e8ef)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Tapani Pälli
befb9af14b util: bring back fix to avoid strict aliasing bugs in xxhash
This is commit b9e163fa67 that got lost in xxhash upgrade 070bf8986c.

Fixes graphics artifacts seen in multiple workloads with Intel driver
when using clang compiler.

Fixes also CTS tests:

 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_cubemap
 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_3d
 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_array
 dEQP-GLES31.functional.geometry_shading.layered.fragment_layer_2d_multisample_array

v2: pass arguments from meson.build instead of hardcoding
    (Eric Engestrom)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14684
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14107
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13895
Fixes: 070bf8986c ("util: Upgrade xxhash.h to v0.8.3")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit d2351b3d04)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Faith Ekstrand
a457021d67 panvk: Also load output attachments with LOAD_OP_NONE+STORE_OP_NONE
We already had this for LOAD_OP_DONT_CARE but we also need it for
LOAD_OP_NONE.

Cc: mesa-stable
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 44ff0c4707)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Faith Ekstrand
262e7feab9 panvk/jm: Refactor BeginRendering()
The old code was all out of order and made no sense.  There's a reason
it made no sense. It was wrong.  Cleaning this up fixes a solid 1/3 of
the remaining Bifrost CTS fails in CI.

Cc: mesa-stable
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 962d1f33e1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Faith Ekstrand
e29de2865e panvk/preload: Stop assuming 32 registers
cc: mesa-stable

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 3bb7d929f4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Faith Ekstrand
37191db342 panvk: Create both Z/S descriptors, even for separate Z/S
The Vulkan spec says that aspects are ignored for Z/S attachments so we
shouldn't consider that as a factor when deciding whether or not to
create other aspect descriptors.  This will be irrelevant in a couple of
commits but we need it for the backport anyway.

Cc: mesa-stable
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 19ad26a8de)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Faith Ekstrand
3a92074d8c nir/gather_info: Add support for panfrost tile load/store intrinsics
Fixes: 6fc1030e4f ("nir: Add some new panfrost fragment shader intrinsics")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 88ad8bc75d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:23 +01:00
Faith Ekstrand
897f5814ed pan/clear: Stop packing undefined bits in colors
The util code doesn't actually fill things with zeros so the high bits
are undefined.  If we really want things replicated, we need to mask off
just the bits we care about.

Cc: mesa-stable
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
(cherry picked from commit 4d8551552e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Emma Anholt
61f09295f3 ir3/ra: Fix DOUBLE_ONLY limit pressure computation.
As the comment says, we want to limit our pressure based on underlying HW
reg file size, not max it out to HW reg file size.  This caused us to not
spill when we should when the HW reg size was bigger than the ISA reg file
size, leading to OOB writes in RA when it tried to allocate to the limit
pressure we spilled to.

Fixes segfaults in llama.cpp's test-backend-ops.

Fixes: e6e34883a9 ("ir3: Add wavesize control")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14846
(cherry picked from commit 0c6da326f8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
José Roberto de Souza
b7752ddbc3 intel/perf: Add HSW verx10 to intel_perf_query_result_write_mdapi()
HSW is verx10 75 and when we switched from ver to verx10 I forgot to add the case
75.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a097a3d214 ("intel/perf: Change mdapi switch cases from ver to verx")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14902
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 48c685ee39)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Natalie Vock
71145cb846 radv/nir: Correctly handle workgroup sizes not aligned to 32
Since the stride is always 32 dwords, we need to treat the workgroup
size as multiples of that value. Using MAX2() only works for cases where
the workgroup size is less than 32, which was hit by some CTS with 1x1
workgroups.

Cc: mesa-stable
(cherry picked from commit b08f9f192c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Samuel Pitoiset
54293d4fdd radv: fix potential corruption after FMASK decompression on GFX6-8
While reworking image resolves completely in RADV, I found a very weird
bug where the only fix was to emit caches immediately after
decompressing the source resolve image (after FMASK_DECOMPRESS).

I have been struggling this for few hours and figured that it was
something related to context rolls (ie. as long the context was rolled
out, emitting the flushes immediately was required).

It turns out this was a known hardware bug on GFX6 that was implemented
in PAL. Though PAL only applies on GFX6 but GFX7-8 are also affected
based on my testing. Note that RadeonSI flushes CB_META too.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 837078b8d5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Lionel Landwerlin
6f75431e98 anv: disable ccs modifier reporting when ccs modifiers are disabled
Reporting the modifiers when we're going to disable it in the back
hits various asserts in anv_image.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2418c91537 ("anv/drirc: disable Xe2 CCS drm modifiers for GTK engine")
Helps: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14853
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 4f38b5c888)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Lionel Landwerlin
5fa6c15b36 anv: apply the same ccs disabling for Xe3 than Xe2
The new compression scheme introduced in Xe2 also applies to Xe3, so
we're liable for the same bugs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2418c91537 ("anv/drirc: disable Xe2 CCS drm modifiers for GTK engine")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 4ac47f8dde)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Rhys Perry
849cdbcf72 aco: fix gfx6-8 store_scratch() with function calls
Might happen with radv_emulate_rt=true.

Fixes the_great_circle/a6079328b8df7712 with polaris10.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: e006f68b11 ("aco/isel: Don't add scratch offset as gfx8- soffset if no offsets exist")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit 75722da909)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Ian Romanick
bfeb230f9b elk/cmod: Don't propagate from CMP to ADD if there is a write between
If either source of the CMP is modified before an appropriate ADD is
found, the ADD and the CMP will not have the same result.

No shader-db changes on any ELK platform. I suspect the problematic
cases only occur after scheduling has rearranged instructions. This is
likely the reason BRW didn't experience this problem until 09450faf.

Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit da1fd9786b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Ian Romanick
024c5de569 elk/cmod: Don't propagate from CMP to possible Inf + (-Inf)
This is a backport of BRW e26270249b.

shader-db:

All Intel platforms had similar results. (Broadwell shown)
total instructions in shared programs: 18623918 -> 18624594 (<.01%)
instructions in affected programs: 125179 -> 125855 (0.54%)
helped: 0 / HURT: 139

total cycles in shared programs: 957073100 -> 957072484 (<.01%)
cycles in affected programs: 16534168 -> 16533552 (<.01%)
helped: 42 / HURT: 68

Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit bdbfe8de4d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Ian Romanick
d68b3091b2 brw/cmod: Don't propagate from CMP to ADD if there is a write between
If either source of the CMP is modified before an appropriate ADD is
found, the ADD and the CMP will not have the same result.

shader-db:

Lunar Lake
total instructions in shared programs: 17098815 -> 17098818 (<.01%)
instructions in affected programs: 1187 -> 1190 (0.25%)
helped: 0 / HURT: 3

total cycles in shared programs: 876858960 -> 876858968 (<.01%)
cycles in affected programs: 6878 -> 6886 (0.12%)
helped: 0 / HURT: 1

Meteor Lake, DG2, Tiger Lake, Ice Lake, and Skylake had similar results. (Meteor Lake shown)
total instructions in shared programs: 20034973 -> 20034984 (<.01%)
instructions in affected programs: 4599 -> 4610 (0.24%)
helped: 0 / HURT: 11

total cycles in shared programs: 881033088 -> 881033108 (<.01%)
cycles in affected programs: 57872 -> 57892 (0.03%)
helped: 0 / HURT: 5

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 918873064 -> 918873269 (+0.00%)
CodeSize: 14747338416 -> 14747339360 (+0.00%); split: -0.00%, +0.00%
Cycle count: 104141836677 -> 104141840371 (+0.00%); split: -0.00%, +0.00%

Totals from 205 (0.01% of 2011421) affected shaders:
Instrs: 290415 -> 290620 (+0.07%)
CodeSize: 4280704 -> 4281648 (+0.02%); split: -0.01%, +0.03%
Cycle count: 18166526 -> 18170220 (+0.02%); split: -0.00%, +0.02%

Closes: #14874
Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit d1614cd6db)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Frank Binns
e1ae66262f pvr: Fix alloc callbacks usage when freeing frame buffers
When creating frame buffers the alloc callbacks are used in the host
allocations, those same alloc callbacks need to be used when freeing
those allocations but are missing in some places causing the CTS to
report memory leaks in certain test cases.

Fixes: 146364ab9f ("pvr: add support for VK_KHR_dynamic_rendering")

fix:
dEQP-VK.api.object_management.alloc_callback_fail.framebuffer
dEQP-VK.api.object_management.single_alloc_callbacks.framebuffer

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 05ef9f01a7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Frank Binns
dea37352ba pvr/ci: move some timing out tests from fails to skips
Some of these test cases where already in the skip list.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
(cherry picked from commit 74fd985c6c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Yiwei Zhang
22c27bd3ea venus: sync protocol for strict aliasing compliance
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124148 for details.

Backport log: headers are generated from the protocol used by 26.0
              branch with the strict aliasing fix

(cherry picked from commit 6411ee0c2d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Aitor Camacho
40cf87c35a kk: Fix graphics pipeline serialization
Bundles all graphics pipeline creation information required by Metal into
the vertex shader so we can later rebuild the pipeline. This allows us to
correctly create pipelines from caches that were loaded from files.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit cdbf7242f3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Aitor Camacho
358c8f257a kk: Move gfx pipeline data to the info struct within kk_shader
Makes it easier to serialize and add data specific to the gfx pipeline.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 99d8246d1c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:22 +01:00
Aitor Camacho
6152bf1cfb kk: Fix compute pipeline cache
When deserializing the compute shader from a blob, we need to recreate the
pipeline because the blob may have been loaded from file and therefore the
reference to the Metal resource will be invalid.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 75f6f46c0f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Aitor Camacho
024143cca4 kk: Correctly release pipeline handles at shader destroy
The condition to release Metal pipelines incorrectly checks which shader
stage we are destroying leading to leads when graphics pipelines had to
be released.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 622ebba476)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Aitor Camacho
9a63c20469 kk: Fix shader uint32_t value serialization
We need to write with blob_write_uint32 if we are using blob_read_uint32

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 15c0dd39fc)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Aitor Camacho
a3f872630b kk: Fill pipelineUUID
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit b350f059f5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Natalie Vock
6f88b07e5d radv: Initialize nir_lower_io_to_scalar progress variable
The NIR_PASS macro only overwrites this when the pass actually makes
progress. If the pass doesn't make progress, the variable stays
uninitialized.

Clang correctly spots this and warns about it.

Cc: mesa-stable
(cherry picked from commit 47e4a68a83)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Mike Blumenkrantz
641a3ea0d9 zink: fix broken compiler assert
cc: mesa-stable

(cherry picked from commit 44f2c40830)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Natalie Vock
c4bb652871 radv/rt: Only use ds_bvh_stack_rtn if the stack base is possible to encode
The hardware only provides 13 bits for encoding the stack base (in
dwords). That translates to the stack base being required to be below
8192 dwords, or 32kB. It's possible to exceed this - LDS is 64kB after
all. Add an explicit check to make sure we don't end up with offsets
that overflow the hw's address fields. This fixes Metro Exodus Enhanced
Edition, which was using ray queries in a 1024-thread sized workgroup,
resulting in exactly 64kB of LDS being required for the stack.

This check isn't required for RT pipelines as we always use 32 or 64
wide workgroups with no other LDS used, so it's impossible to reach this
stack base limit.

Cc: mesa-stable
(cherry picked from commit 59a397793e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Olivia Lee
47caf527e3 hk: fix passthrough GS key invalidation
Just seeing that a passthrough GS was already bound is not sufficient to
know that it is a *matching* passthrough GS. If the application binds a
new VS that requires a different passthrough GS key than the previous
VS, then we need to bind a different passthrough GS.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
(cherry picked from commit e10f29399f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Janne Grunau
3397d3995f hk: Use aligned vector fill in hk_CmdFillBuffer if possible
30% faster with 16KB buffers, more than twice as fast with 8MB and
larger buffers.

(cherry picked from commit 651a321ee2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Janne Grunau
1ce5b5b361 asahi: Implement clear_buffer using libagx_fill*
Use either libagx_fill_uint4 or libagx_fill based of size and object
alignment for clear_sizes which are a power of two up to 16.
Reported fill rate for 256MB buffers on a M1 Ultra (G13D) in
gpu-ratemeter is 355 GB/s for 16 byte aligned buffers and 155 GB/s for
4 byte aligned buffers.

Signed-off-by: Janne Grunau <janne-fdr@jannau.net>
(cherry picked from commit 5c2d62c030)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Janne Grunau
37a269e303 asahi: Use GPU for buffer copies in resource_copy_region()
Use a compute shader to copy PIPE_BUFFERs. Based on hk's hk_cmd_copy().
For large copy sizes (>= 128MB) it achieves 3/4 of the available memory
bandwidth on a M1 Ultra (G13D). `gpu-ratemeter gl.bufbw` reports
~625 GB/s for 256MB buffer size. Apple specifies the memory bandwidth of
the M1 Ultra with 819.2 GB/s.

Signed-off-by: Janne Grunau <j@jannau.net>
(cherry picked from commit 3f5497ded8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Pavel Ondračka
0f21dc1bd4 mesa: implement FRAMEBUFFER_RENDERABLE internalformat query
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik-faye-lund@collabora.com>
Cc: mesa-stable
(cherry picked from commit 2b76f2e4a7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Jianxun Zhang
372c7545e6 anv: Limit modifier disabling workaround to specific GTK versions
The issue caused us to put a switch to disable (Xe2) drm modifers
in 2418c91537 is fixed in GTK 4.20.3,
so we can enable the modifiers with this and newer GTK releases.

GTK https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/9164:
b2a42d5a6e Revert "vulkan: Wait for device to be idle before
           create/recreating swapchain"
270735a151 vulkan: Rework swapchain present implementation

The hex values represent the GTK version range: [4.0.0, 4.20.2] for
VK_MAKE_VERSION(), refer to:
f493f5c88d

Cc: mesa-stable
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit df7d333656)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Wei Hao
f60b93b454 radeonsi: fix threaded shader compilation finishing after context is destroyed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit ec6d077351)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Ryan Zhang
96ee7156af panvk: guard against NULL pointers to avoid crash
Vkcts simulate_oom caselist try to alloc fail manual
which caused the panvk crash. We should guard driver
cannot access null pointor.

Fixes: 598a8d9d11 ("panvk: Collect allocated push
sets at the command level")

Fixed:
dEQP-VK.wsi.wayland.swapchain.simulate_oom.*

Signed-off-by: Ryan Zhang <ryan.zhang@nxp.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
(cherry picked from commit 418e6c4ed9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Lars-Ivar Hesselberg Simonsen
11db64a7d3 pan/genxml/v13: Fix HSR Prepass typo
Fixes: ece01443e1 ("pan/genxml: Add v13 definition")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit 71500a32fa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Lars-Ivar Hesselberg Simonsen
43b9a2ea5e panvk: Fix dcd_flags1 dirty bit
dcd_flags1 was not counted as dirty in case the color attachment map was
updated. This could lead to an outdated value for render_target_mask.

Fixes: a4670a67e0 ("panvk/csf: Set the correct DCD_FLAGS_1.render_rarget_mask")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit 75242b1862)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Pavel Ondračka
98e2234eb4 r300: align macro-tiled stride-addressed textures in X
Odd macro-tile counts in X trigger flaky rendering/readback in
parallel stress runs with macro-tiled NPOT textures (for example
piglit draw-pixel-with-texture -auto -fbo).

When a texture is macro-tiled and uses stride addressing, align the
width to two macro tiles. This keeps the stride at an even number of
macro tiles in X and avoids the corruption without disabling
macrotiling.

I was not able to find anything about this in the docs.

Cc: mesa-stable
(cherry picked from commit 0763fb947a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Yiwei Zhang
7c0b97be73 venus: workaround a gcc-15 dead store elimination (DSE) bug
No issue with clang or gcc-14.x (or earlier versions). The issue only
shows up since gcc-15.1. The compiler somehow fails to consider those
cs helpers dereferencing the pointer from the pNext chain for reads,
and thus has falsely optimized away the pNext store. This change works
around this with a no-op memory clobber.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13242
Cc: mesa-stable
(cherry picked from commit b0397b967d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Timothy Arceri
6fb7a07c79 st/glsl_to_nir: make sure the variant has the correct locations set
For drivers that set allow_st_finalize_nir_twice locations are set
when the variable is created. But for variants here we update the
locations in case parameter opt pass or something else changed the
location.

Fixes: 891d46f517 ("st/glsl_to_nir: dont add duplicate state tokens")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14837

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit a6fcc2835e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Timothy Arceri
d7fa6a4deb mesa: add _mesa_lookup_state_param_idx() helper
This will be used in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit c3aae0714c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:21 +01:00
Ian Romanick
0710d042db elk: Call nir_opt_algebraic_late in elk_postprocess_nir
Make sure that lowering undone in elk_nir_optimize are reapplied.

No shader-db or fossil-db changes on any Intel platform. This is most
likely to impact either Gfx8 on ANV or Gfx7.5 on HASVK. I don't
fossil-db test either of those platforms.

I tried doing a similar thing here as is done in BRW (previous commit),
but that caused a couple Haswell shaders to fall off a performance
cliff:

total spills in shared programs: 8247 -> 8311 (0.78%)
spills in affected programs: 6 -> 70 (1066.67%)
helped: 0 / HURT: 2

total fills in shared programs: 8558 -> 8910 (4.11%)
fills in affected programs: 6 -> 358 (5866.67%)
helped: 0 / HURT: 2

Fixes: 442daeb54a ("nir/opt_algebraic: use fcanonicalize")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit df704bd38e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Ian Romanick
1f65b768a1 brw: Call nir_opt_algebraic_late later in brw_postprocess_nir_opts
Move the call to nir_opt_algebraic_late after the last time
brw_nir_optimize might be called. nir_opt_algebraic_distribute_src_mods
works together with the late algebraic optimizations, so move it also.

shader-db:

Lunar Lake
total instructions in shared programs: 17081222 -> 17080842 (<.01%)
instructions in affected programs: 419931 -> 419551 (-0.09%)
helped: 545 / HURT: 826

total cycles in shared programs: 878437752 -> 879236226 (0.09%)
cycles in affected programs: 506003142 -> 506801616 (0.16%)
helped: 3091 / HURT: 3189

LOST:   18
GAINED: 16

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19994270 -> 19993231 (<.01%)
instructions in affected programs: 490499 -> 489460 (-0.21%)
helped: 660 / HURT: 800

total cycles in shared programs: 882498776 -> 882834186 (0.04%)
cycles in affected programs: 477858602 -> 478194012 (0.07%)
helped: 3458 / HURT: 3564

total fills in shared programs: 4371 -> 4370 (-0.02%)
fills in affected programs: 7 -> 6 (-14.29%)
helped: 1 / HURT: 0

LOST:   28
GAINED: 10

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
total instructions in shared programs: 19943849 -> 19942782 (<.01%)
instructions in affected programs: 467384 -> 466317 (-0.23%)
helped: 655 / HURT: 796

total cycles in shared programs: 860085674 -> 861410289 (0.15%)
cycles in affected programs: 426900998 -> 428225613 (0.31%)
helped: 3250 / HURT: 3441

LOST:   19
GAINED: 14

fossil-db:

Lunar Lake
Totals:
Instrs: 926472091 -> 926204838 (-0.03%); split: -0.04%, +0.01%
CodeSize: 14845921056 -> 14842776112 (-0.02%); split: -0.10%, +0.08%
Send messages: 41459570 -> 41459574 (+0.00%); split: -0.00%, +0.00%
Cycle count: 104481085069 -> 104583692712 (+0.10%); split: -0.14%, +0.24%
Spill count: 3454651 -> 3457340 (+0.08%); split: -0.15%, +0.23%
Fill count: 4958779 -> 4958487 (-0.01%); split: -0.46%, +0.45%
Max live registers: 193805970 -> 193839002 (+0.02%); split: -0.00%, +0.02%
Max dispatch width: 49114416 -> 49113776 (-0.00%); split: +0.01%, -0.01%
Non SSA regs after NIR: 142953905 -> 142800740 (-0.11%); split: -0.12%, +0.01%

Totals from 420256 (20.80% of 2020128) affected shaders:
Instrs: 448571327 -> 448304074 (-0.06%); split: -0.09%, +0.03%
CodeSize: 7312002800 -> 7308857856 (-0.04%); split: -0.21%, +0.17%
Send messages: 17716494 -> 17716498 (+0.00%); split: -0.00%, +0.00%
Cycle count: 52178854998 -> 52281462641 (+0.20%); split: -0.28%, +0.48%
Spill count: 2945654 -> 2948343 (+0.09%); split: -0.17%, +0.26%
Fill count: 4404768 -> 4404476 (-0.01%); split: -0.51%, +0.51%
Max live registers: 60875448 -> 60908480 (+0.05%); split: -0.01%, +0.06%
Max dispatch width: 9455280 -> 9454640 (-0.01%); split: +0.04%, -0.04%
Non SSA regs after NIR: 60542740 -> 60389575 (-0.25%); split: -0.28%, +0.02%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 1000081384 -> 999726726 (-0.04%); split: -0.05%, +0.01%
CodeSize: 16764458080 -> 16761624256 (-0.02%); split: -0.09%, +0.07%
Subgroup size: 27599528 -> 27599544 (+0.00%)
Send messages: 45538933 -> 45538951 (+0.00%); split: -0.00%, +0.00%
Cycle count: 93303830912 -> 93370118192 (+0.07%); split: -0.19%, +0.26%
Spill count: 3739306 -> 3739719 (+0.01%); split: -0.22%, +0.23%
Fill count: 5089719 -> 5083626 (-0.12%); split: -0.56%, +0.44%
Max live registers: 122041364 -> 122055848 (+0.01%); split: -0.00%, +0.01%
Max dispatch width: 38117296 -> 38127200 (+0.03%); split: +0.06%, -0.03%
Non SSA regs after NIR: 164296197 -> 164299306 (+0.00%); split: -0.01%, +0.01%

Totals from 338754 (14.82% of 2285730) affected shaders:
Instrs: 452723479 -> 452368821 (-0.08%); split: -0.10%, +0.03%
CodeSize: 7861878032 -> 7859044208 (-0.04%); split: -0.19%, +0.16%
Subgroup size: 16 -> 32 (+100.00%)
Send messages: 17050010 -> 17050028 (+0.00%); split: -0.00%, +0.00%
Cycle count: 52881801997 -> 52948089277 (+0.13%); split: -0.33%, +0.46%
Spill count: 3271458 -> 3271871 (+0.01%); split: -0.25%, +0.26%
Fill count: 4628422 -> 4622329 (-0.13%); split: -0.61%, +0.48%
Max live registers: 30738902 -> 30753386 (+0.05%); split: -0.01%, +0.06%
Max dispatch width: 4787264 -> 4797168 (+0.21%); split: +0.47%, -0.26%
Non SSA regs after NIR: 61748026 -> 61751135 (+0.01%); split: -0.03%, +0.03%

Tiger Lake
Totals:
Instrs: 1011068379 -> 1010977290 (-0.01%); split: -0.03%, +0.02%
CodeSize: 14197751744 -> 14197683040 (-0.00%); split: -0.07%, +0.07%
Send messages: 46431228 -> 46431220 (-0.00%); split: -0.00%, +0.00%
Cycle count: 85066526419 -> 85085088071 (+0.02%); split: -0.16%, +0.18%
Spill count: 3853750 -> 3855185 (+0.04%); split: -0.15%, +0.19%
Fill count: 6716746 -> 6719594 (+0.04%); split: -0.25%, +0.29%
Max live registers: 122307387 -> 122326083 (+0.02%); split: -0.00%, +0.02%
Max dispatch width: 38009632 -> 38003280 (-0.02%); split: +0.03%, -0.05%
Non SSA regs after NIR: 158403572 -> 158415390 (+0.01%); split: -0.01%, +0.02%

Totals from 277728 (12.17% of 2281577) affected shaders:
Instrs: 349206856 -> 349115767 (-0.03%); split: -0.07%, +0.05%
CodeSize: 5042621104 -> 5042552400 (-0.00%); split: -0.20%, +0.20%
Send messages: 13132243 -> 13132235 (-0.00%); split: -0.00%, +0.00%
Cycle count: 36183327716 -> 36201889368 (+0.05%); split: -0.38%, +0.43%
Spill count: 2210072 -> 2211507 (+0.06%); split: -0.26%, +0.33%
Fill count: 4188439 -> 4191287 (+0.07%); split: -0.39%, +0.46%
Max live registers: 24956695 -> 24975391 (+0.07%); split: -0.02%, +0.09%
Max dispatch width: 3948832 -> 3942480 (-0.16%); split: +0.32%, -0.48%
Non SSA regs after NIR: 45616425 -> 45628243 (+0.03%); split: -0.04%, +0.06%

Ice Lake
Totals:
Instrs: 1009584306 -> 1009411757 (-0.02%); split: -0.02%, +0.01%
CodeSize: 12593466880 -> 12592958096 (-0.00%); split: -0.01%, +0.01%
Send messages: 47274203 -> 47274171 (-0.00%); split: -0.00%, +0.00%
Cycle count: 84920281455 -> 84914027301 (-0.01%); split: -0.05%, +0.04%
Spill count: 2988523 -> 2986191 (-0.08%); split: -0.14%, +0.07%
Fill count: 5296078 -> 5288737 (-0.14%); split: -0.21%, +0.07%
Max live registers: 125429384 -> 125444786 (+0.01%); split: -0.00%, +0.02%
Max dispatch width: 41269072 -> 41267312 (-0.00%); split: +0.03%, -0.03%
Non SSA regs after NIR: 163223895 -> 163236623 (+0.01%); split: -0.01%, +0.02%

Totals from 243818 (10.45% of 2334244) affected shaders:
Instrs: 296953759 -> 296781210 (-0.06%); split: -0.08%, +0.02%
CodeSize: 3643224480 -> 3642715696 (-0.01%); split: -0.04%, +0.03%
Send messages: 11518671 -> 11518639 (-0.00%); split: -0.00%, +0.00%
Cycle count: 33065548412 -> 33059294258 (-0.02%); split: -0.13%, +0.11%
Spill count: 1346515 -> 1344183 (-0.17%); split: -0.32%, +0.15%
Fill count: 2537906 -> 2530565 (-0.29%); split: -0.43%, +0.14%
Max live registers: 21476776 -> 21492178 (+0.07%); split: -0.02%, +0.09%
Max dispatch width: 3727288 -> 3725528 (-0.05%); split: +0.31%, -0.35%
Non SSA regs after NIR: 41050474 -> 41063202 (+0.03%); split: -0.04%, +0.07%

Skylake
Totals:
Instrs: 513573157 -> 513462971 (-0.02%); split: -0.02%, +0.00%
CodeSize: 5950280672 -> 5950001392 (-0.00%); split: -0.01%, +0.00%
Send messages: 24909757 -> 24909758 (+0.00%); split: -0.00%, +0.00%
Cycle count: 57636102242 -> 57634726342 (-0.00%); split: -0.03%, +0.03%
Spill count: 627286 -> 627241 (-0.01%); split: -0.01%, +0.00%
Fill count: 837888 -> 837804 (-0.01%); split: -0.01%, +0.00%
Max live registers: 87272271 -> 87284192 (+0.01%); split: -0.00%, +0.02%
Max dispatch width: 32278832 -> 32271800 (-0.02%); split: +0.02%, -0.04%
Non SSA regs after NIR: 87387713 -> 87387614 (-0.00%); split: -0.00%, +0.00%

Totals from 177432 (10.30% of 1722906) affected shaders:
Instrs: 127170648 -> 127060462 (-0.09%); split: -0.10%, +0.01%
CodeSize: 1443406368 -> 1443127088 (-0.02%); split: -0.03%, +0.01%
Send messages: 5444220 -> 5444221 (+0.00%); split: -0.00%, +0.00%
Cycle count: 15423028495 -> 15421652595 (-0.01%); split: -0.10%, +0.10%
Spill count: 235844 -> 235799 (-0.02%); split: -0.03%, +0.01%
Fill count: 333783 -> 333699 (-0.03%); split: -0.03%, +0.01%
Max live registers: 13765573 -> 13777494 (+0.09%); split: -0.01%, +0.10%
Max dispatch width: 3086880 -> 3079848 (-0.23%); split: +0.24%, -0.47%
Non SSA regs after NIR: 17623772 -> 17623673 (-0.00%); split: -0.00%, +0.00%

Fixes: 442daeb54a ("nir/opt_algebraic: use fcanonicalize")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 11b96a84b0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Ian Romanick
2874160ce2 brw: Call nir_opt_algebraic_late in brw_nir_create_raygen_trampoline
Make sure that lowering undone in brw_nir_optimize are reapplied.

No shader-db changes on any Intel platform.

Why are there fossil-db changes on platforms that don't support ray tracing?

Lunar Lake
Totals:
Instrs: 926636441 -> 926636313 (-0.00%); split: -0.00%, +0.00%
Send messages: 41510729 -> 41510723 (-0.00%); split: -0.00%, +0.00%
Cycle count: 104509492613 -> 104509490569 (-0.00%); split: -0.00%, +0.00%
Max live registers: 193792922 -> 193792890 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 150091934 -> 150092170 (+0.00%); split: -0.00%, +0.00%

Totals from 10 (0.00% of 2020428) affected shaders:
Instrs: 8142 -> 8014 (-1.57%); split: -3.14%, +1.57%
Send messages: 192 -> 186 (-3.12%); split: -7.29%, +4.17%
Cycle count: 131892 -> 129848 (-1.55%); split: -6.93%, +5.38%
Max live registers: 1442 -> 1410 (-2.22%); split: -3.05%, +0.83%
Non SSA regs after NIR: 950 -> 1186 (+24.84%); split: -26.95%, +51.79%

Meteor Lake
Totals:
Instrs: 1000805547 -> 1000805543 (-0.00%); split: -0.00%, +0.00%
Cycle count: 93131592265 -> 93131619619 (+0.00%); split: -0.00%, +0.00%
Max live registers: 122081268 -> 122081244 (-0.00%); split: -0.00%, +0.00%

Totals from 16 (0.00% of 2286241) affected shaders:
Instrs: 18652 -> 18648 (-0.02%); split: -1.39%, +1.37%
Cycle count: 369520 -> 396874 (+7.40%); split: -2.94%, +10.34%
Max live registers: 1350 -> 1326 (-1.78%); split: -4.15%, +2.37%

DG2
Totals:
Instrs: 999834626 -> 999834651 (+0.00%); split: -0.00%, +0.00%
Send messages: 45719398 -> 45719403 (+0.00%); split: -0.00%, +0.00%
Cycle count: 93118238139 -> 93118269557 (+0.00%); split: -0.00%, +0.00%
Max live registers: 122098944 -> 122098936 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 169413734 -> 169413661 (-0.00%); split: -0.00%, +0.00%

Totals from 13 (0.00% of 2286795) affected shaders:
Instrs: 18799 -> 18824 (+0.13%); split: -1.04%, +1.18%
Send messages: 492 -> 497 (+1.02%); split: -2.44%, +3.46%
Cycle count: 352838 -> 384256 (+8.90%); split: -1.08%, +9.98%
Max live registers: 1237 -> 1229 (-0.65%); split: -2.91%, +2.26%
Non SSA regs after NIR: 2191 -> 2118 (-3.33%); split: -20.86%, +17.53%

Tiger Lake
Totals:
Instrs: 1011816778 -> 1011816714 (-0.00%); split: -0.00%, +0.00%
Send messages: 46515289 -> 46515285 (-0.00%); split: -0.00%, +0.00%
Cycle count: 85148902406 -> 85148894668 (-0.00%); split: -0.00%, +0.00%
Max live registers: 122362180 -> 122362172 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 38036160 -> 38036176 (+0.00%)
Non SSA regs after NIR: 160317521 -> 160317649 (+0.00%); split: -0.00%, +0.00%

Totals from 6 (0.00% of 2282318) affected shaders:
Instrs: 9204 -> 9140 (-0.70%); split: -1.43%, +0.74%
Send messages: 258 -> 254 (-1.55%); split: -3.10%, +1.55%
Cycle count: 287652 -> 279914 (-2.69%); split: -3.29%, +0.60%
Max live registers: 552 -> 544 (-1.45%); split: -2.90%, +1.45%
Max dispatch width: 48 -> 64 (+33.33%)
Non SSA regs after NIR: 914 -> 1042 (+14.00%); split: -14.00%, +28.01%

Ice Lake
Totals:
Instrs: 1012203285 -> 1012203249 (-0.00%); split: -0.00%, +0.00%
Send messages: 47358859 -> 47358858 (-0.00%); split: -0.00%, +0.00%
Cycle count: 85112165276 -> 85112171905 (+0.00%); split: -0.00%, +0.00%
Max live registers: 125545002 -> 125544992 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 41335696 -> 41335656 (-0.00%)
Non SSA regs after NIR: 166448597 -> 166448602 (+0.00%); split: -0.00%, +0.00%

Totals from 13 (0.00% of 2335519) affected shaders:
Instrs: 16486 -> 16450 (-0.22%); split: -1.67%, +1.46%
Send messages: 368 -> 367 (-0.27%); split: -4.89%, +4.62%
Cycle count: 347643 -> 354272 (+1.91%); split: -1.34%, +3.25%
Max live registers: 1104 -> 1094 (-0.91%); split: -3.80%, +2.90%
Max dispatch width: 192 -> 152 (-20.83%)
Non SSA regs after NIR: 2100 -> 2105 (+0.24%); split: -21.76%, +22.00%

Skylake
Totals:
Instrs: 504548665 -> 504548057 (-0.00%); split: -0.00%, +0.00%
Send messages: 24479148 -> 24479118 (-0.00%); split: -0.00%, +0.00%
Cycle count: 57575198140 -> 57575179256 (-0.00%); split: -0.00%, +0.00%
Max live registers: 85570671 -> 85570575 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 85097646 -> 85098486 (+0.00%); split: -0.00%, +0.00%

Totals from 22 (0.00% of 1703671) affected shaders:
Instrs: 19866 -> 19258 (-3.06%); split: -3.72%, +0.66%
Send messages: 464 -> 434 (-6.47%); split: -8.19%, +1.72%
Cycle count: 250854 -> 231970 (-7.53%); split: -9.23%, +1.70%
Max live registers: 2024 -> 1928 (-4.74%); split: -5.53%, +0.79%
Non SSA regs after NIR: 2498 -> 3338 (+33.63%); split: -8.33%, +41.95%

Fixes: 442daeb54a ("nir/opt_algebraic: use fcanonicalize")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 5af0b8bd09)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Konstantin Seurer
3ffe4b257b vulkan/cmd_queue: Fixup stride for multi draws
Copying the draw infos packs them so the stride needs to be set to the
struct size.

cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit be5ab80de1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Ian Romanick
45ce75f3bc nir: Use STACK_ARRAY instead of NIR_VLA
The number of fields comes from the shader, so it could be a value large
enough that using alloca would be problematic.

Fixes: c11833ab24 ("nir,spirv: Rework function calls")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 9017d37e84)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Ian Romanick
978fd42b4b spirv: Use STACK_ARRAY instead of NIR_VLA
The number of fields comes from the shader, so it could be a value large
enough that using alloca would be problematic.

Fixes: 2a023f30a6 ("nir/spirv: Add basic support for types")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 3da828d2dd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Jesse Natalie
5048a2ed1c meson: Include DirectX-Headers dependency for all VK Windows builds
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14839
Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
(cherry picked from commit f0066a3150)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Alyssa Rosenzweig
806f0a35a4 brw: drop buggy SLM optimization
This was incorrect for OpenCL due to the possibility of variable shared memory
existing despite shared_size == 0. Fortunately the optimization it was trying to
do should be done in NIR via nir_opt_barrier_modes so we can just drop the brw
code and move on with our merry lives. Fixes OpenCL tests on Iris:

non_uniform_work_group non_uniform_3d_barriers
basic async_strided_copy_local_to_global

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit bd5ebbb2f8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Anna Maniscalco
6278aa107a freedreno/common: set has_astc_hdr true for a7xx targets
Fixes: dc07473524 ("freedreno/fdl: add astc hdr formats")
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
(cherry picked from commit e959dd0dd7)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Daniel Schürmann
7fda785505 nir/clone: Fix cloning indirect call instructions
Fixes: bb40284f76 ('nir: Add indirect calls')
(cherry picked from commit 88b4221519)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Samuel Pitoiset
a2ad1789fa ac,radv,radeonsi: use correct swizzle/pitch for depth-only images with SDMA
This fixes new VKCTS coverage
dEQP-VK.api.copy_and_blit.core.use_after_copy.*.

is_stencil isn't set for RadeonSI because it doesn't do SDMA copies
with Z/S.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 1be4ffdff9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Eric Engestrom
88e238de07 .pick_status.json: Mark 7dd7731ac7 as denominated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Aitor Camacho
4229b57783 wsi/metal: Expose additional color spaces if instance extension enabled
Caught through VVL test NegativeWsi.SwapchainImageFormatList. The test
would try to create a swapchain with a color space from
VK_EXT_swapchain_colorspace without enabling the extension. This is
because wsi would expose those color spaces even when the extension was
not enabled.

Fixes: fd045ac99c ("wsi/metal: add support for color spaces")

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit e6f118f12b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Lionel Landwerlin
1994d93542 isl: fix 32bit math with 4GB buffer size
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit d956957153)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Lionel Landwerlin
af97f7fe38 anv: add missing constant cache invalidation for descriptor buffers
A descriptor buffer promoted to push constants requires a constant
cache invalidation if it is modified on the device.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 42b70cf05a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Lionel Landwerlin
12da136c07 anv: fix nested command buffer relocations
When executing 3 command buffers :

vkCmdExecuteCommands(CB_B, CB_C);
vkCmdExecuteCommands(CB_A, CB_B);

vkQueueSubmit(CB_A);

We're not transfering correctly the relocations of CB_C from CB_B to
CB_A.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit e64889635c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Konstantin Seurer
f8ce75c40c radv: Fix setting the viewport for depth stencil FS resolves
Fixes: 704fbbb ("radv/meta: rework depth/stencil resolves using graphics")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit f574de2249)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Lionel Landwerlin
2abdb028dd anv: flush render caches on first pipeline select
Given a situation like this :
  - CB_A: begin, renderDepthA, end
  - CB_B: begin, computeA, barrier (depth), computeB, end

The depth cache is not being flushed between renderDepthA & computeB
because :
  - it's not flushed at the end of CB_A (it's not required)
  - when CB_B starts, we're still on GFX pipeline mode but do not
    flush render caches because pipeline mode is unknown
  - when barrier is CB_B is executed, we're already in compute
    pipeline mode and HW cannot flush depth.

The fix is to flush RT/depth cached when switching from unknown
pipeline mode any pipeline mode.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e6dae6ef5f ("vulkan: Optimize implicit end_subpass barrier")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14816
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Tested-by: David Gow <david@davidgow.net>
(cherry picked from commit 888ac904a3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Juston Li
6dbd6ee94b anv: set missing protected bit for protected depth/stencil surfaces
This bit is set in mocs for other protected attachment types by
anv_image_fill_surface_state() however was ommited for depth/stencil
attachments here.

Without the protected bit set, it causes heavy black artifacting when
attaching a protected depth attachment image to a framebuffer.

Fixes: 794b0496e9 ("anv: enable protected memory")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit f84ed620c2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Matt Turner
2c250e6235 elk/cse: use copies in operands_match instead of in-place modification
`operands_match` was modifying instruction source operands in-place
(through the `elk_fs_reg *src` pointer member) and relying on a
save/restore pattern to undo the modifications. Work on local copies
instead, which is simpler and avoids mutating shared state in a
comparison function.

Fixes: 47c4b38540 ("i965/fs: Allow CSE to handle MULs with negated arguments.")
(cherry picked from commit 14c65322e8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Matt Turner
03e6f285e5 elk/cse: fix operands_match corrupting non-IMM register data
The MUL case in `operands_match` was reading and writing the `.f` union
member unconditionally, even when the register's `.file != IMM`. In that
case `.f` aliases the struct containing `.nr`/`.swizzle`/etc, so the
`fabsf()` call could corrupt the `.nr` by clearing bit 31.

Guard all `.f` accesses with `.file == IMM` checks.

Fixes: 47c4b38540 ("i965/fs: Allow CSE to handle MULs with negated arguments.")
(cherry picked from commit 93f39f87c4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Matt Turner
2b221e5a1a brw/cse: use copies in operands_match instead of in-place modification
`operands_match` was modifying instruction source operands in-place
(through the `brw_reg *src` pointer member) and relying on a
save/restore pattern to undo the modifications. Work on local copies
instead, which is simpler and avoids mutating shared state in a
comparison function.

Fixes: 47c4b38540 ("i965/fs: Allow CSE to handle MULs with negated arguments.")
(cherry picked from commit b302faad8b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:20 +01:00
Matt Turner
14c7d820cd brw/cse: fix operands_match corrupting non-IMM register data
The MUL case in `operands_match` was reading and writing the `.f` union
member unconditionally, even when the register's `.file != IMM`. In that
case `.f` aliases the struct containing `.nr`/`.swizzle`/etc, so the
`fabsf()` call could corrupt the `.nr` by clearing bit 31.

Guard all `.f` accesses with `.file == IMM` checks.

Fixes: 47c4b38540 ("i965/fs: Allow CSE to handle MULs with negated arguments.")
(cherry picked from commit f5e0f63216)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:19 +01:00
Eric Engestrom
547fd52a66 pick-ui: add Backport-to: * as a synonym to Cc: mesa-stable
(cherry picked from commit b2d99b9378)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:19 +01:00
Eric Engestrom
9a0d13be9a bin/gen_release_notes: fix support for python 3.14
There is no default even loop anymore, we need to make one if we want
one now.

Cc: mesa-stable
(cherry picked from commit c7603a11de)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:19 +01:00
Eric Engestrom
e5fb4a0682 .pick_status.json: Update to 03d2cc2b2a
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40092>
2026-02-25 14:22:19 +01:00
Eric Engestrom
8794fced82 docs: add sha sum for 26.0.0
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-02-11 19:19:12 +01:00
Eric Engestrom
c10cba7efa VERSION: bump for 26.0.0 2026-02-11 19:07:29 +01:00
Eric Engestrom
e0f7bc0024 docs: add release notes for 26.0.0 2026-02-11 19:07:29 +01:00
Georg Lehmann
3062621cf6 aco/opt_postRA: don't optimize across calls
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Could do better by checking which registers are clobbered/preserved,
but that's unlikely to be useful anyway.

Backport-to: 26.0

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit fc7b5d7eed)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Georg Lehmann
33ca80ea38 aco: handle all SALU that modifies PC in needs_exec_mask
Calls use swappc.

Backport-to: 26.0

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 10b12a6ee2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Georg Lehmann
d8acb10c56 aco/lower_branches: consider jump target of conditional branches based on vcc
Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 421a4dacf0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Karol Herbst
acdbdcc53b vtn: set default fp_math_ctrl values for kernels
The kernel capabilty has the `FPFastMathMode` decoration, but not the
`FPFastMathDefault` execution mode, so a SPIR-V module not using
`SPV_KHR_float_controls2` has no way of setting any defaults.

Fixes: 9da2d21804 ("vtn: implement default fp_math_ctrl without using execution mode")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Tested-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit faf3a93e8f)

[Eric: adjusted commit because of missing 46a617884e, as suggested by the author
at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39790#note_3325830]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Dave Airlie
b53dbb573a gallivm: handle u16 correct on const loads.
I somehow screwed this up on my previous attempt at fixing this bug,

This should fix the loop limiter bug on big endian properly.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Fixes: e28cfb2bad ("gallivm: handle u8/u16 const loads properly on big-endian.")
(cherry picked from commit c016346b50)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Eric R. Smith
160efe917e mesa: do not unbind general point when different indexed points are deleted
When a buffer is deleted, we have to remove it from all binding points.
We were re-using the code for BindBufferRange for this; however, this
caused the general binding point to be unbound (bound to NULL)
unconditionally, even if a different buffer is bound there. Fix this by
inlining the various bind calls into the delete buffers code.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14755
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit fa418f1e73)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Samuel Pitoiset
5f6d1e4b44 radv/meta: fix CmdCopyBufferToImage2() on compute queue with compressed HTILE
Only for partial copies because image stores don't decompress on writes
(ie. HTILE isn't updated by image stores).

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 9f5a20abde)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Karol Herbst
dc8a39037b vtn/opencl: flush denorms for cbrt()
libclc doesn't so we have to. fixes math_brutefore cbrt on Iris.

Co-authored-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit af954427bf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
OPNA2608
890ff49038 rocket: Fix printing of rknpu_mem_create.dma_addr
The Linux kernel's __u64 isn't always implemented as a long long, and there's no nice define for printing it like with uint64_t.

(cherry picked from commit 41b9dc3a2c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
OPNA2608
00db096003 vc4: Fix printing of get_tiling.modifier
The Linux kernel's __u64 isn't always implemented as a long long, and there's no nice define for printing it like with uint64_t.

(cherry picked from commit 4c699087d4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
José Expósito
ede2a1ce84 venus: Fix error log on PPC
On the ppc64le architecture error log fail to compile with error:

    ../src/virtio/vulkan/vn_renderer_virtgpu.c: In function ‘virtgpu_ioctl_map’:
    ../src/virtio/vulkan/vn_renderer_virtgpu.c:751:66: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ {aka ‘long unsigned int’} [-Werror=format=]
    751 |          "mmap failed: gpu_fd=%d, handle=%u, size=%zu, offset=%llu, err=%s",
        |                                                               ~~~^
        |                                                                  |
        |                                                                  long long unsigned int
        |                                                               %lu
    752 |          gpu->fd, gem_handle, size, args.offset, strerror(errno));
        |                                     ~~~~~~~~~~~
        |                                         |
        |                                         __u64 {aka long unsigned int}
    cc1: some warnings being treated as errors

Parse the parameters to fix the failure.

Fixes: a49b7adad8 ("venus: add error log coverage for virtgpu backend")
(cherry picked from commit dd3fe2d671)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
José Expósito
ee5075f221 winsys/amdgpu: Fix userq job info log on PPC
On the ppc64le architecture the macro printing the userq job info fails
to compile with error:

   In file included from ../src/gallium/winsys/amdgpu/drm/amdgpu_cs.cpp:11:
   ../src/gallium/winsys/amdgpu/drm/amdgpu_cs.cpp: In function ‘int amdgpu_cs_submit_ib_userq(amdgpu_userq*, amdgpu_cs*, uint32_t*, unsigned int, uint32_t*, unsigned int, uint64_t*, uint64_t)’:
   ../src/gallium/winsys/amdgpu/drm/amdgpu_cs.cpp:1652:20: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ {aka ‘long unsigned int’} [-Werror=format=]
   1652 |          mesa_logi("amdgpu: uq_log: %s:  num_wait_fences=%d  uq_va=%llx  job=%llx\n",
   1653 |                    amdgpu_userq_str[acs->queue_index], userq_wait_data.num_fences, fence_info[i].va,
         |                                                                                    ~~~~~~~~~~~~~~~~
         |                                                                                                  |
         |                                                                                                  __u64 {aka long unsigned int}
   ../src/util/log.h:78:70: note: in definition of macro ‘mesa_logi’
      78 | #define mesa_logi(fmt, ...) mesa_log(MESA_LOG_INFO, (MESA_LOG_TAG), (fmt), ##__VA_ARGS__)
         |                                                                      ^~~
   ../src/gallium/winsys/amdgpu/drm/amdgpu_cs.cpp:1652:20: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 7 has type ‘__u64’ {aka ‘long unsigned int’} [-Werror=format=]
   1652 |          mesa_logi("amdgpu: uq_log: %s:  num_wait_fences=%d  uq_va=%llx  job=%llx\n",
   1653 |                    amdgpu_userq_str[acs->queue_index], userq_wait_data.num_fences, fence_info[i].va,
   1654 |                    fence_info[i].value);
         |                    ~~~~~~~~~~~~~~~~~~~
         |                                  |
         |                                  __u64 {aka long unsigned int}
   ../src/util/log.h:78:70: note: in definition of macro ‘mesa_logi’
      78 | #define mesa_logi(fmt, ...) mesa_log(MESA_LOG_INFO, (MESA_LOG_TAG), (fmt), ##__VA_ARGS__)
         |                                                                      ^~~

Parse the parameters to fix the failure.

Fixes: 2547fd0f59 ("winsys/amdgpu: print userq job info")
(cherry picked from commit 757ae04bd9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Caio Oliveira
99bb93440f brw: Fix cooperative matrix constant sources other than src0
Code was wrongly using src0 to pick the constant value.

Fixes: bf9ad36f2d ("brw: Properly handle cooperative matrices created with constants")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 6b0e29bc77)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Faith Ekstrand
e0682b4317 pan/bi: Don't attempt to fuse AND(ICMP, ICMP) if the AND is swizzled
There might be cases under which we can make this work but they're
tricky at best.  For now, don't even try.

Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 918624174b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Faith Ekstrand
4dd76ad0a1 pan/bi: Run lower_alu_width after opt_algebraic_late
It can generate extract instructions which we expect to be scalar.

Cc: mesa-stable
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit deb9244436)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Faith Ekstrand
6eded1a7d0 nir/lower_bool_to_bit_size: Use the correct num_components for conversions
There's a nice little comment here saying we use the same write mask (an
out of date term in NIR) and swizzle but we're no longer actually doing
that.  Depending on nir_builder magic, we may actually generate a scalar
when we really want a vector.  The fix is to use more builder helpers
and just eat the potential copy.

Fixes: 3180656bbc ("nir: don't use nir_build_alu() with incomplete sources")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
(cherry picked from commit 711b3358a8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Karol Herbst
c0e5d821e1 rusticl/mesa: only use resource_from_user_memory if the cap is advertised
Fixes some buffer tests on some iris configurations.

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Tested-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 240bae6b23)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:48 +00:00
Alyssa Rosenzweig
cf716d4586 nir: disable fast-math for lowering conversions
the lowerings for e.g. f2f16_rtp have carefully written sequences using
Infinity. nir_opt_algebraic will stomp right through this. `feq x, inf`
without an exact flag is basically always a bug. Disable fast math here.
Fixes OpenCL CTS test_half on Iris.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 91550d0709)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Yiwei Zhang
74d8362ebd pan/kmod: drop pan_kmod_bo_check_import_flags validation
The passed flags is always zero on the import paths:
- panfrost_bo_import
- panvk_AllocateMemory
- panvk_GetMemoryFdPropertiesKHR

Fixes: 1c7793ea0b ("panvk: Advertise a HOST_CACHED memory type if we have WC maps")
Tested-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 8d25f9821b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Vinson Lee
f25e220841 freedreno/decode: Fix const correctness in get_tex_count
Fix compiler error:

../src/freedreno/decode/cffdec.c:580:7: error: assigning to 'char *'
from 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  580 |    p = strstr(name, "CONST");
      |      ^ ~~~~~~~~~~~~~~~~~~~~~

glibc now provides C23-style type-generic string functions. strstr
returns const char * when passed a const char * argument. Update p
declaration to const since it's only used for offset calculation.

Fixes: 1ea4ef0d3b ("freedreno: slurp in decode tools")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
(cherry picked from commit bc34a122f3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Khem Raj
bdfae9cc8b glx: fix const qualifier warnings found with C23 glibc support
glibc master has been C23'fying the functions which is resulting errors

Several functions assigned results of bsearch/strstr/strpbrk/memchr to
non-const pointers, triggering -Wincompatible-pointer-types-discards-qualifiers
under clang/gcc with -Werror. Cast bsearch return values where needed and
propagate const correctness for strstr/strpbrk/memchr results.

Removes build failures with strict warning flags without changing behavior.

Signed-off-by: Khem Raj <raj.khem@gmail.com>

[Eric: changed the glxglvnd.c hunk to add the missing `const` instead of casting it away]

Cc: mesa-stable
(cherry picked from commit 268e19378f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Samuel Pitoiset
6febbade40 radv: fix late decompressions for fbfetch with more corner cases
With layers, or custom sample locations for depth.
Found this by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit ce3539b54f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Iago Toral Quiroga
6e899b3eba nir/opt_vectorize_load_store: allow sizes unaligned with high offset for loads
This was added specifically for vectorized stores, so allow for loads.

Without this, the pass will fail to vectorize 2 consecutive 16-bit loads
into a single 32-bit load.

Fixes: 2ed79f80ba ("nir/load_store_vectorize: Skip new bit-sizes that are unaligned with high_offset")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit f6a2d14008)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Tapani Pälli
3442ccdcba anv: skip compressed flag for bo if not supported by modifier
This has not been problem before the compression hint given to kernel
but now that we set it we hit problems when allocating bo if modifier
does not support compression.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14625
Fixes: f91de58818 ("anv: Add support to DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit fc814fa828)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Reilly Brogan
66cd1f224c amd,compiler: fix const errors found with C23 glibc support
In glibc 2.43 the strstr function now propagate const to the output, triggering -Wincompatible-pointer-types-discards-qualifiers
under clang/gcc with -Werror.

Fix two of these cases by adding the const qualifier.

cc: mesa-stable

(cherry picked from commit ece5f671b3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Vinson Lee
a871c42e39 compiler/clc: Fix const correctness in libclc_add_generic_variants
Fix compiler error:

../src/compiler/clc/nir_load_libclc.c:266:13: error: initializing
'char *' with an expression of type 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  266 |       char *U3AS1 = strstr(func->name, "U3AS1");
      |             ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~

glibc now provides C23-style type-generic string functions. strstr
returns const char * when passed a const char * argument. Update U3AS1
declaration to const since it's only used for offset calculation.

Fixes: 4a08ee7ecf ("spirv/libclc: Add generic versions of arithmetic functions")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit 85fd63068e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Christian Gmeiner
cf20e1610c pan/compiler: Fix progress reporting in pan_nir_lower_store_component
lower_store_component() always returns false even though it modifies
NIR instructions (rewrites sources, creates new SSA defs, removes
previous stores). This triggers the "NIR changed but no progress
reported" assertion in nir_shader_intrinsics_pass.

Return true when a store_output or store_per_view_output intrinsic is
processed, since the function always modifies the shader in that case.

Closes: https://gitlab.freedesktop.org/panfrost/mesa/-/issues/274
Cc: mesa-stable
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 4938ad435e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Yiwei Zhang
3235b9a3dc venus: remove obsolete asserts for ANB image creation
Those have long been supported by vn_image_deferred_info_init because of
AHB support. For non-aliased ANB image, those are directly passed from
the platform swapchain create info as well. So we just need to drop the
obsolete asserts to make newer Android platform and ANGLE happy.

Cc: mesa-stable
(cherry picked from commit 091c4f43ff)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Rudi Heitbaum
6de99bcc31 mesa: retain const qualifier from pointer
Since glibc-2.43:

For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.

https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html

Resolves the following warnings:
    src/mesa/glapi/glapi/gen/enums.c: In function '_mesa_enum_to_string':
    src/mesa/glapi/glapi/gen/enums.c:7799:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     7799 |    elt = bsearch(& nr, enum_string_table_offsets,
          |        ^

    ../src/egl/main/egldispatchstubs.c: In function 'FindProcIndex':
    ../src/egl/main/egldispatchstubs.c:52:7: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
       52 |       bsearch(name, __EGL_DISPATCH_FUNC_NAMES, __EGL_DISPATCH_COUNT,
          |       ^~~~~~~

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
(cherry picked from commit 1acc96b8cb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Arjob Mukherjee
e8ec898e98 pvr: Fixup for deqp-vk.api 2d.optimal.* conformance
Its no longer an error for depth and stencil formats to have invalid
accumulator format.

Fixes the following tests:
* dEQP-VK.api.info.image_format_properties.2d.optimal.d16_unorm
* dEQP-VK.api.info.image_format_properties.2d.optimal.d24_unorm_s8_uint
* dEQP-VK.api.info.image_format_properties.2d.optimal.d32_sfloat
* dEQP-VK.api.info.image_format_properties.2d.optimal.d32_sfloat_s8_uint
* dEQP-VK.api.info.image_format_properties.2d.optimal.s8_uint
* dEQP-VK.api.info.image_format_properties.2d.optimal.x8_d24_unorm_pack32

Backport-to: 26.0
Signed-off-by: Arjob Mukherjee <arjob.mukherjee@imgtec.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
(cherry picked from commit 58c7437d3a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Samuel Pitoiset
5773c7bda6 radv/meta: fix the key for DCC decompress on compute
This could return the graphics DCC pipeline if it was created before,
and crash or potentially hang the GPU.

Found this while working on in-progress VKCTS coverage.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit ad7151f4bf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Zan Dobersek
aba5409384 tu/kgsl: wait-only submit handling should not ignore sparse bind commands
Commit cf4bd2e412 added a fast path for handling no-command submits to
accommodate a kernel behavior quirk. Sparse support was complete before
that change but landed afterwards, leaving sparse submits that don't have
command buffers but do have sparse bind commands to take that fast path,
leaving the bind commands unhandled. The condition for the fast path is
fixed to address that.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 71ef46717c ("tu/kgsl: Add support for sparse binding")
(cherry picked from commit 5b33ee9f0b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Calder Young
cd67481fd2 anv: Avoid dumping BVH before command buffer is submitted
Fixes a race condition where a BVH will be dumped before its command buffer is
actually submitted if a different command buffer completes between the time the
BVH dump is recorded and the time the command buffer is actually submitted.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Fixes: 1b55f101 ("anv/bvh: Dump BVH synchronously upon command buffer completion")
(cherry picked from commit 95e471e558)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Mel Henning
c87b0a77a1 zink: Emit float controls for preserve_denorms too
Fixes: 6afa1b3bad ("zink: handle denorm preserve execution modes")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit 9189a70598)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Tapani Pälli
bb9fef071e iris: set DisableAnyMCTRresponsefix to zero on init
This is to make sure early culling related Wa_16020518922 is enabled
properly.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 331238e44e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Tapani Pälli
e1446659f8 anv: set DisableAnyMCTRresponsefix to zero on init
This is to make sure early culling related Wa_16020518922 is enabled
properly.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14204
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 9aaed82543)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Tapani Pälli
3988bebbe9 intel/genxml: add CHICKEN_RASTER_2 with required bit for Xe3
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 61b5e91bba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Mary Guillemard
3e4b65fc7a nvk: Reenable compression support with nouveau 1.4.2
Now that the small/large pages race is fixed, we can safely enable it
back when the kernel side report 1.4.2 support.

Fixes: f3c53cf66b ("nvk: Disable large pages for now")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
(cherry picked from commit b524bf368e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Aitor Camacho
eefede5549 kk: Fix disabling workaround 4
Fixes: 67d05f71e9 ("kk: Track fragment helper status since Metal does not correctly demote them")

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 29900e8229)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
2026-02-11 14:54:47 +00:00
Erico Nunes
5b7b66e43b Revert "ci: lima farm maintenance"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit ca1d59d813.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39696>
(cherry picked from commit f3131bc145)
2026-02-11 15:51:45 +01:00
Eric Engestrom
3fe056f178 .pick_status.json: Update to d7814bcad0 2026-02-11 14:21:56 +01:00
Eric Engestrom
4ac24ba7e5 VERSION: bump for 26.0.0-rc3
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-02-04 19:35:07 +01:00
Bernd Kuhls
f83e86c29f blake3: add blake3_neon.c only for little endian archs
Fixes build error on big endian archs:

Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: aarch64
Host machine cpu: cortex-a53
Target machine cpu family: aarch64
Target machine cpu: cortex-a53
[...]
../src/util/blake3/blake3_neon.c:6:2: error: #error "This implementation only supports little-endian ARM."
    6 | #error "This implementation only supports little-endian ARM."

as detected by buildroot autobuilders:
https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/build-end.log

For reference:
$ grep -i endian output/build/mesa3d-25.3.4/buildroot-build/cross-compilation.conf
endian = 'big'

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39681>
(cherry picked from commit 248b818407)
2026-02-04 18:39:35 +01:00
Samuel Pitoiset
1e415d1bdf radv: emit pending flushes after late decompressions with fbfetch
If the rendering state is inherited in the secondary, otherwise nothing
wait for the pending flushes after a decompression pass. One more
argument to stop delaying this.

Fixes
dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.*

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39678>
(cherry picked from commit 13c9e529bd)
2026-02-04 18:39:35 +01:00
Samuel Pitoiset
870140c527 radv: disable unordered submits when SQTT queue events are enabled
Otherwise the QueuePresent event is missing and RGP is confused.

Fixes: 82d06b58ad ("radv: use vk_drm_syncobj_copy_payloads")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39158>
(cherry picked from commit 83ca338e37)
2026-02-04 18:39:35 +01:00
Hyunjun Ko
a7d0da012e anv/video: disable encoder on untested platforms
Not enough tested on over Gen12 platforms.
Turns out to be not working on DG2, for example.

Cc: mesa-stable
Closes: #14449

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39676>
(cherry picked from commit d2c24a0d8b)
2026-02-04 18:39:35 +01:00
Loïc Molinari
51ed940bb8 panfrost: Fix clean_pixel_write_enable forced check for AFBC
Clean tiles must actually be written back for AFBC buffers (color,
z/s) when either one of the effective tile size dimension is smaller
than the superblock dimension. This commit fixes the current check
which compares the effective tile size to the superblock size.

Fixes: 762a0f4133 ("panfrost: Add the concept of render block")
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38422>
(cherry picked from commit 098b69a05c)
2026-02-04 18:39:35 +01:00
Valentine Burley
db6cbb8410 tu: Fix memory leak of patchpoints_ctx in dynamic rendering
tu_CmdBeginRendering was unconditionally allocating a new
patchpoints_ctx. When resuming a render pass chain, this overwrote the
existing context from the suspended pass, leaking it and all associated
FDM patchpoints.

Fixes: 0dd06c74d6 ("tu: Fix FDM patchpoint memory leak")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39639>
(cherry picked from commit d4ad50752f)
2026-02-04 18:39:35 +01:00
Konstantin Seurer
b32cd7c265 radv/bvh: Make sure internal nodes are collapsed when possible
Avoiding NaNs should have the same effect but it's good practice to not
rely on float OPs for correctness.

Fixes: 95a89f7 ("radv: Report smaller bvh sizes when possible")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
(cherry picked from commit 24a1e3d8c2)
2026-02-04 18:39:35 +01:00
Konstantin Seurer
4b86b5e53d vulkan: Make sure no NaNs end up in the BVH
Fixes: 2032268 ("vulkan: Avoid NAN in the IR BVH")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
(cherry picked from commit 60c1e4e3e6)
2026-02-04 18:39:35 +01:00
Konstantin Seurer
cd1a3b7482 radv/rra: Fix nullptr dereference
cc: mesa-stable

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39640>
(cherry picked from commit 2f3a9c10f4)
2026-02-04 18:39:35 +01:00
Lucas Stach
4cae263356 etnaviv: idle the pipe before flushing texture caches
As seen in the Vivante kernel driver function gckHARDWARE_Flush(),
GPUs without gcvFEATURE_TEX_CACHE_FLUSH_FIX, which translates to
all GPUs before halti5, need a full stall of the GPU pipeline
before flushing the texture caches.

This fixes sporadic GPU hangs observed in use-cases where texture
data updates are intermixed with draws without any state changes
that might necessitate a stall.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39673>
(cherry picked from commit 643ba9a784)
2026-02-04 18:39:35 +01:00
Emma Anholt
4107091cfe ci/tu: Clear stale xfails from the nightlies.
Fixes: 63243bcc3e ("tu: Fix TU_DRAW_STATE_VB size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
(cherry picked from commit c0a4d3ef1e)
2026-02-04 18:39:35 +01:00
Emma Anholt
26a8c34ff4 lima/ci: Remove erroneous skips.
When you get UnexpectedResult(skip), that means take your xfail out
because it's now skipping.  Which is the fix, instead of "take the xfail
out and add it to manual skips".

Fixes: e54440d15e ("Uprev Piglit to a3826de3c26a279599d15b018a9a3e75ca46f4f8")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39568>
(cherry picked from commit 42e17a948e)
2026-02-04 18:39:35 +01:00
Juan A. Suarez Romero
86f442db75 broadcom/cle: bump up gen version for v3d
The generation version for V3D XML package was marked as 3.3, but
actually we removed all the code supporting this generation, and the
generations we support now are from 4.2 onwards.

So we bump up the generation version.

Fixes: 9c4829473a ("broadcom/cle: remove v33 and v41 from xml definition")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39577>
(cherry picked from commit 5a85b3d9f4)
2026-02-04 18:39:35 +01:00
Qiang Yu
67ad90c108 radeonsi: fix mesh shader outputs kill
Mesh shader uses store per vertex output for point size
and store per primitive output for layer id.

This fixes gpu-ratemeter run slow for kill point size
and layer id cases when mono shader is used which expect
to kill these outputs.

Also gather fragment shader per primitive input info
to kill mesh shader per primitive output.

Fixes: e6e21dfbf2 ("radeonsi: kill outputs for mesh shader")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39644>
(cherry picked from commit f20cd07e21)
2026-02-04 18:39:34 +01:00
Nanley Chery
a7ace43e9a anv: Don't set the display flag on WSI blit sources
These images are never used with scanout hardware.

Fixes: 2c00b7d1e6 ("anv: flag WSI images as scanout images for ISL")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39618>
(cherry picked from commit c429d7479e)
2026-02-04 18:39:34 +01:00
Nanley Chery
d6d5071a84 anv: Treat non-WSI PRESENT_SRC as TRANSFER_SRC
For non-WSI images, explicitly map VK_IMAGE_LAYOUT_PRESENT_SRC_KHR to
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL in anv_layout_to_aux_state().

Before this patch, the function passed PRESENT_SRC into
vk_image_layout_to_usage_flags() and got a return value of 0 from it
(that function expects that layout to be explicitly handled by the
caller). This caused the logic dependent on the return value to be
unreliable.

Fixes: c5cad407f8 ("anv: handle non-wsi images in anv_layout_to_aux_state")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39618>
(cherry picked from commit f616d4fb2a)
2026-02-04 18:39:34 +01:00
Nanley Chery
7571128959 anv: Fix clear state of WSI blit sources during presentation
On gfx12+, this fixes assert failures in hybrid GPU scenarios.

Fixes: 811c413f98 ("anv: Don't return the Xe2+ fast-clear type early")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39618>
(cherry picked from commit 476f461ce7)
2026-02-04 18:39:34 +01:00
Nanley Chery
f4e0da9e07 anv: Don't return the Xe2+ fast-clear type early
Don't return early from anv_layout_to_fast_clear_type() for Xe2+. We'll
need to make more use of the function for some MCS changes in later
commits.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit 811c413f98)
2026-02-04 18:39:34 +01:00
Patrick Lerda
14615a0add r600: improve vs_as_ls switch reliability
This change updates the vs_as_ls switch logic to make it
reliable. It resets the dirty flag when the switch is
happening. It uses also evergreen_emit_vs_constant_buffers()
to try to update again some of the states which could be
lost otherwise.

This change fixes some "flakes". These tests needed previously
to be executed twice to set the hardware in the proper state
for the test to pass. It also fixes the main issue of the
texture_view.view_sampling test.

This change was tested on palm and cayman. Here are the tests
which are now utterly fixed:
khr-gl4[3-6]/stencil_texturing/functional: fail pass
khr-gl4[4-6]/texture_cube_map_array/texture_size_tesselation_ev_sh: fail pass
khr-gles31/core/texture_cube_map_array/texture_size_tesselation_ev_sh: fail pass
khr-glesext/texture_cube_map_array/texture_size_tesselation_ev_sh: fail pass

Fixes: 25f96c1120 ("r600: hook up constants/samplers/sampler view for tessellation")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39269>
(cherry picked from commit 9c5e15e6f5)
2026-02-04 18:39:34 +01:00
Christian Gmeiner
8f6282d846 meson: Restore .clang-format for ninja clang-format target
The empty .clang-format file in the project root is required for meson
to generate the clang-format target. It was accidentally deleted.

Fixes: efe60d2940 ("intel: remove unused show_shader_stage debug option")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39648>
(cherry picked from commit 449261b6ba)
2026-02-04 18:39:34 +01:00
Mel Henning
05889250e6 nvk: Report additional host_image_copy layouts
Fixes dEQP-VK.image.host_image_copy.properties.properties
on VK CTS 1.4.5

Fixes: d5df263ac9 ("nvk: Enable VK_EXT_host_image_copy")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39634>
(cherry picked from commit 0e9d29f518)
2026-02-04 18:39:34 +01:00
Natalie Vock
872c536a88 radv/rt: Fix discardable attributes on chit and traversal shaders
It was incorrect to mark chit/miss arguments as discardable without
the equivalent in the traversal shader. Also, tail calls with modified
parameters that aren't marked discardable are incorrect.

This could lead to random corruption by clobbering parameter values
across two levels of nested calls: A Raygen shader calls traversal,
expecting e.g. the ray tMax parameter to be preserved. Traversal
overwrites the parameter's register with the hit t and tail-calls chit,
which immediately returns to raygen. Now the raygen shader still has the
clobbered tMax (which is actually the ray hit t) - if it calls traversal
multiple times, the second traversal iteration may use the previous
ray's hit t as tMax instead of the intended value.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
(cherry picked from commit 3275be503c)
2026-02-04 18:39:34 +01:00
Natalie Vock
8ab3b18cd7 radv/rt: Fix some tail-call compatibility checks
There were two issues here:
1. Tail calls where the tail-callee receives modified parameters are
hazardous and only work if the parameter is return or discardable.
Otherwise, the caller of the function that executes the tail-call may
not expect some of the parameters to be clobbered.
2. There was also an indexing confusion with the call instruction vs.
call signature parameters. The call instruction has not been adapted
to the new lowered signatures, where the system args are prepended. To
make things clearer, split the loop into two, one iterating over
parameters in the call signature and one for parameters of the call
instruction.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
(cherry picked from commit 0d7705c206)
2026-02-04 18:39:34 +01:00
Natalie Vock
0753012766 aco: Don't exclude discardable parameters from register preservation
The original semantic of discardable parameters was "okay, nothing
actually uses this parameter, feel free to clobber it", but we were
only using it with tail calls from a function without discardable
parameters, which was broken.

Instead, slightly change the use-case and utilize the "discardable"
attribute to mark parameters that the callee will clobber in a tail
call. This makes doing tail calls safe when the tail callee receives a
modified set of parameters.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
(cherry picked from commit ad23e02a28)
2026-02-04 18:39:34 +01:00
Natalie Vock
7b1c9adfea radv/rt: Refactor shader group stack size calculation to include traversal stack
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39579>
(cherry picked from commit 62254ab0be)
2026-02-04 18:39:34 +01:00
Mel Henning
d46967fafb nvk: Initialize SET_ALPHA_TO_COVERAGE_OVERRIDE
This matches the initialization that the proprietary driver does.

Fixes dEQP-VK.query_pool.discard.*.alpha_to_coverage* on vk cts 1.4.5

Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39621>
(cherry picked from commit 8d7f14620b)
2026-02-04 18:39:34 +01:00
Konstantin Seurer
55043ae265 vulkan: Limit the number of LBVH invocations
Fixes: 0817551 ("vulkan: Handle inactive primitives with LBVH builds")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39569>
(cherry picked from commit 529c83a134)
2026-02-04 18:39:34 +01:00
Valentine Burley
102b3d8008 tu: Handle VkDrmFormatModifierPropertiesList2EXT
Expose DRM format modifiers via VkDrmFormatModifierPropertiesList2EXT.
VVL is one notable user.

This is required for VK_EXT_image_drm_format_modifier when
VK_KHR_format_feature_flags2 is supported.

Cc: mesa-stable
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39600>
(cherry picked from commit e185f40fc3)
2026-02-04 18:39:34 +01:00
Karol Herbst
79f909808c clc: fix compile compatability with LLVM-22
See d090311aa7

Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374>
(cherry picked from commit dc03f94e07)
2026-02-04 18:39:34 +01:00
Karol Herbst
ca428e3b3c nir: fix nir_fixup_is_exported for LLVM-22
Starting with LLVM-22 we won't see the kernel wrapper anymore, and this
is a trivial fix to get around this.

See: 5458eb2511

Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374>
(cherry picked from commit 24d20df3d6)
2026-02-04 18:39:34 +01:00
Karol Herbst
84566763c2 clc: enable generic address space and seq_cst and device scope atomic features
This is going to be required with LLVM-22.

See 423bdb2bf2

Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374>
(cherry picked from commit 6eda573a8a)
2026-02-04 18:39:33 +01:00
Karol Herbst
05c679d37b clc: support some atomic and generic address space features
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374>
(cherry picked from commit 01e1392139)
2026-02-04 18:39:33 +01:00
Karol Herbst
c6f8d2ef92 clc: reorder headers to fix compilation errors due to UNUSED
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39374>
(cherry picked from commit 7f9a7ed553)
2026-02-04 18:39:33 +01:00
Lars-Ivar Hesselberg Simonsen
4a3a3a7d84 panfrost/bi: Fix unbound texel buffers
In case of texel buffers that are read in the shader, but not bound by
the application, the current implementation would incorrectly try to
read from non-existent buffers.

To ensure this does not happen, this change sets the format for any
unbound attributes to CONST_0000, which will kill any actual
reads/writes and always return zeroes.

This fixes the following two tests:
- spec@arb_shading_language_420pack@active sampler conflict
- spec@arb_texture_buffer_object@render-no-bo

Fixes: a21ee564e2 ("pan/bi: Make texel buffers use Attribute Buffers")
Acked-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/39431>
(cherry picked from commit aec8132b8b)
2026-02-04 18:39:33 +01:00
David Rosca
525cce7c2a radv/video: Fix maxActiveReferencePictures for H265 decode
Also change to use H265 constant for maxDpbSlots (both values for H264 and H265
are the same).

Fixes: ee535aa039 ("radv: video: rework maxActiveReferenceSlot/MaxDpbSlots")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39609>
(cherry picked from commit 7607aeefa6)
2026-02-04 18:39:33 +01:00
Eric Engestrom
5ec65a4378 Revert "meson: static link spirv-tools for darwin"
This reverts commit f21d0f2cbe.

This causes issues with other platforms trying to do static builds.

A better option is for everyone to use `meson setup --prefer-static`.

Fixes: f21d0f2cbe ("meson: static link spirv-tools for darwin")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14751
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39613>
(cherry picked from commit 342a5ba44e)
2026-02-04 18:39:33 +01:00
Samuel Pitoiset
a5d92b79fa radv: fix tracking of pipelines used in secondaries
This is just wrong if the secondary uses ESO because the emitted
pipelines would be NULL in the secondary, but if the app re-binds
the same pipeline in the primary it would consider it as already
emitted. A sequence like this would break:

CmdBindPipeline(compute)
CmdDispatch()
CmdExecuteCommands() --> with ESO compute
CmdBindPipeline(compute)
CmdDispatch()

This tracking is probably useless anyways because it's unlikely that
apps will rebind the same pipeline right after CmdExecuteCommands() but
let's keep it because this is a bugfix.

Fixes
dEQP-VK.api.command_buffers.pipeline_shader_object_mix_with_secondaries.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39587>
(cherry picked from commit 9ad02b5724)
2026-02-04 18:39:33 +01:00
Samuel Pitoiset
7eb9d75017 radv: zero-initialize image view objects
Mostly to make sure that color/depth descriptors are zero-initialized
in case applications are missing the usage flags. In this case, they
will be considerd as null descriptors.

This hides the issue in
https://gitlab.freedesktop.org/mesa/mesa/-/issues/14637
but the real fix has to be in the Steam Overlay.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39585>
(cherry picked from commit fa4da581c6)
2026-02-04 18:39:33 +01:00
Hyunjun Ko
e73e4e1554 anv/video: Compute AV1 tile positions internally
The pMiColStarts/pMiRowStarts arrays from applications may have
incorrect units. Instead of using them directly, compute the tile
start positions in superblock units internally based on the tile
dimensions.

Cc: mesa-stable
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39471>
(cherry picked from commit 8e9fec8e40)
2026-02-04 18:39:33 +01:00
Hyunjun Ko
162ef4da2c anv/video: fix a typo in Vulkan AV1 decoding.
Cc: mesa-stable
Fixes: e510efed05d("anv: support in-loop super resolution for AV1 decoding")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39471>
(cherry picked from commit 8004f46466)
2026-02-04 18:39:33 +01:00
Rhys Perry
d3a67ee1d9 radv: fix when incomplete rt pipeline libraries are loaded from cache
It might be that the radv_pipeline_cache_lookup_nir_handle() in
radv_ray_tracing_pipeline_cache_search() fails but we will later need the
NIR. If rt_stages[i].shader was non-NULL, then we would not have created
the NIR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.2
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38263>
(cherry picked from commit 89eefdcadb)
2026-02-04 18:39:33 +01:00
Olivia Lee
dc140f5500 hk: fix hk_passthrough_gs_key size computation
The non-dynamic members of xfb_info are already included in
sizeof(hk_passthrough_gs_key), so adding nir_xfb_info_size counts them
twice. Because of this we were including uninitialized memory in the key
in hk_handle_passthrough_gs, which is undefined behavior.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39574>
(cherry picked from commit d6745b358d)
2026-02-04 18:39:33 +01:00
Tapani Pälli
d89eceaa2c anv: route clear operations on compute to companion
This fixes bunch of cts tests hitting issues when attempting
anv_image_mcs_op with compute.

Fixes: ab9d3528dc ("anv: fix queue check in anv_blorp_execute_on_companion on xe3")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39581>
(cherry picked from commit 85978ccd28)
2026-02-04 18:39:33 +01:00
Zan Dobersek
be9d5d6508 tu: allocate transient attachments used for LRZ
When proceeding with rendering, any transient attachment that will be used
as LRZ buffer should also be allocated. With GMEM rendering, these
attachments otherwise remained unloaded and subsequent LRZ clears produced
GPU faults.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 764b3d9161 ("tu: Implement transient attachments and lazily allocated memory")
Fixes: #14604
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39535>
(cherry picked from commit b6a049ea4b)
2026-02-04 18:39:33 +01:00
Mike Blumenkrantz
5dddf74a34 ntv: emit ViewIndex with flat for fragment stage
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39606>
(cherry picked from commit 999aaac12e)
2026-02-04 18:39:33 +01:00
Nick Hamilton
d7a47c1627 pvr: Fix the isp samples per tile calculation
The samples per tile calculation was incorrect for sample count 4 and 8.

Fix:
dEQP-VK.pipeline.monolithic.multisample.std_sample_locations.draw.depth.samples_4.*
dEQP-VK.pipeline.monolithic.multisample.std_sample_locations.draw.stencil.samples_4.*

Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39580>
(cherry picked from commit 9f9788330e)
2026-02-04 18:39:33 +01:00
Lionel Landwerlin
844a79b474 vulkan/wsi/direct: remove VkDisplay created from GetDrmDisplayEXT on ReleaseDisplayEXT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39556>
(cherry picked from commit 1112c1461d)
2026-02-04 18:39:33 +01:00
Georg Lehmann
1f5f2cc952 nir/opt_algebraic: use correct syntax to create exact fsat
Fixes: 3b06824e4c ("nir/opt_algebraic: optimize some post peephole select patterns")

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39586>
(cherry picked from commit d8ef28671d)
2026-02-04 18:39:33 +01:00
Tomeu Vizoso
8111b41eb4 dril: don't build a rocket_dri.so
As Rocket has no graphics capability.

Fixes: 5b829658f7 ("rocket: Initial commit of a driver for Rockchip's NPU")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38532>
(cherry picked from commit a5daecafd3)
2026-02-04 18:39:32 +01:00
Eric Engestrom
1c4642663b .pick_status.json: Mark a66d19b691 as denominated 2026-02-04 18:39:32 +01:00
Eric Engestrom
7c3ff4cecc .pick_status.json: Update to 248b818407 2026-02-04 18:39:32 +01:00
Eric Engestrom
42f03572d1 VERSION: bump for 26.0.0-rc2
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-01-28 17:41:52 +01:00
Ella Stanforth
8808ec23fa pvr/csbgen: fix packing multiple addresses
Cc: mesa-stable
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
(cherry picked from commit 7be87ca82a)
2026-01-28 16:18:00 +01:00
Nick Hamilton
28f3e82f2d pco: Fix for atomic operations on an image buffer
Within the driver buffers are treated as 2D as sampling them as 1D
will run into HW restrictions on max size.

The compiler does the same however for atomic image ops the address
is manually calculated and doing this via the 2D path leads to
incorrect offsets.

The fix is to treat buffers as 1D for atomic ops which calculates
the correct offsets for the operations.

Fix deqp:
dEQP-VK.image.atomic_operations.add.buffer.*
dEQP-VK.image.atomic_operations.and.buffer.*
dEQP-VK.image.atomic_operations.compare_exchange.buffer.*
dEQP-VK.image.atomic_operations.dec.buffer.*
dEQP-VK.image.atomic_operations.exchange.buffer.*
dEQP-VK.image.atomic_operations.inc.buffer.*
dEQP-VK.image.atomic_operations.max.buffer.*
dEQP-VK.image.atomic_operations.min.buffer.*
dEQP-VK.image.atomic_operations.or.buffer.*
dEQP-VK.image.atomic_operations.sub.buffer.*
dEQP-VK.image.atomic_operations.xor.buffer.*

Fixes: 6dc5e1e109 ("pco: fully support Vulkan 1.2 image atomics")

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39521>
(cherry picked from commit 079377c767)
2026-01-28 16:18:00 +01:00
Olivia Lee
6f2d97ef41 Revert "panvk: advertise VK_EXT_primitives_generated_query on v10+"
This reverts commit 6eadcaa851.

VK_EXT_primitives_generated_query has a dependency on
VK_EXT_transform_feedback, which we do not implement yet. This is
breaking the android CTS. It will be reenabled once transform feedback
is in.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39547>
(cherry picked from commit 4959f45e99)
2026-01-28 16:17:59 +01:00
Iván Briano
cb8a069e24 brw: fix local_invocation_index with quad derivaties on mesh/task shaders
For mesh/task shaders, the thread payload provides a local invocation
index, but it's always linear so it doesn't give the correct value when
quad derivatives are in use.
The lowering pass where all of this is done correctly for compute
shaders assumes load_local_invocation_index will be lowered in the
backend for mesh/task, calculates the values for the quads correctly but
then avoid replacing the original intrinsic and we remain with the wrong
results.

Add an intel specific intrinsic and always lower the generic one to that
(or whatever else was calculated) to avoid ambiguities and fix the value
for quad derivatives.

Fixes future CTS tests using mesh/task shaders under:
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.*

Fixes: d89bfb1ff7 ("intel/brw: Reorganize lowering of LocalID/Index to handle Mesh/Task")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39276>
(cherry picked from commit 5b48805b42)
2026-01-28 16:17:59 +01:00
Georg Lehmann
8d9349e75b aco: disable DPP for rev integer subs and shifts
It is not documented anywhere, but at least on gfx12 and gfx10.3
DPP is applied to src1 instead of src0.
This might be useful for shifts, but to be safe just disable DPP
completely for now.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14739

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39516>
(cherry picked from commit 140ca3bb50)
2026-01-28 16:17:59 +01:00
Georg Lehmann
6553c4ce40 aco: add a helper function for non supported DPP opcodes
Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39516>
(cherry picked from commit 8e99bf5380)
2026-01-28 16:17:59 +01:00
Eric Engestrom
e68f96eb1f nir/meson: fix cpp_args of nir_opt_algebraic_pattern_tests
Fixes: 4c30c44b75 ("nir: Generate unit tests for nir_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39550>
(cherry picked from commit d12e3454e6)
2026-01-28 16:17:59 +01:00
Nanley Chery
c2eca1a1cc anv: Fix the fast clear type for FCV writes
We started allowing non-default clear colors with FCV in commit
cd8e120b97. When rendering to an image with FCV, set the fast-clear
type to ANV_FAST_CLEAR_ANY if the image properties allow such
fast-clears.

Fixes: cd8e120b97 ("anv: Allow more single subresource fast-clears with FCV")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit ce196c9de5)
2026-01-28 16:17:59 +01:00
Nanley Chery
f3db65d95e anv: Update predicated resolve documentation
* Don't mention gfx7-8 due to the hasvk split.
* Account for the array of clear colors.

Fixes: 0e6b132a75 ("anv: Access more colors in fast_clear_memory_range")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit e7854d06a5)
2026-01-28 16:17:59 +01:00
Nanley Chery
943fd8152a iris: Use the CLEAR state on Xe2+ for MCS
On Xe2+, HSD 14011946253 and the related documents explain that MCS
still only supports a single clear color.

Fixes: df006bba02 ("iris: Update aux state for color fast clears (xe2)")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit 6c6b2d8f30)
2026-01-28 16:17:59 +01:00
Nanley Chery
f3adaccb4b iris: Set missing flags on clear color changes
When changing the clear color without a fast clear, use dirty bits to
ensure that surfaces with inline clear colors are updated and that
partial resolves are done as needed.

Remove the flags at the bottom of fast_clear_color() as
blorp_fast_clear() already sets them for us.

Fixes: 64d861b700 ("iris: Skip some fast-clears even on color changes")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit 3b642f7456)
2026-01-28 16:17:59 +01:00
Nanley Chery
a680c20d40 intel/isl: Fix QPitch of arrayed MCS
From RENDER_SURFACE_STATE::AuxiliarySurfaceQPitch on BDW+,

   This field must be set to an integer multiple of the Surface
   Vertical Alignment

Accomplish this by aligning the height of each MCS layer to main
surface's vertical alignment. Prevents the following test group from
failing on Xe2 when a future commit enables multi-layer fast-clears in
anv:

   dEQP-VK.api.image_clearing.*.
   clear_color_attachment.multiple_layers.
   *_clamp_input_sample_count_*

The main test I used to debug this:

   dEQP-VK.api.image_clearing.core.
   clear_color_attachment.multiple_layers.
   a8b8g8r8_unorm_pack32_64x11_clamp_input_sample_count_2

Backport-to: 25.3
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit eb4a581e44)
2026-01-28 16:17:59 +01:00
Mel Henning
d20d30442c nvk: Disable large pages for now
Reviewed-by: Mary Guillemard <mary@mary.zone>
Fixes: cabfdb4404 ("nvk: Enable compression")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39364>
(cherry picked from commit f3c53cf66b)
2026-01-28 16:17:59 +01:00
Georg Lehmann
7e42c6e949 aco: fix demote in header of single iteration loop
The control is not divergent before a divergent break in a single iteration loop,
but we already pushed the loop mask on the stack.

Fixes: 90faadae72 ("aco/insert_exec_mask: don't disable dead quads on demote in divergent CF")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14733
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39528>
(cherry picked from commit 4b1996b1c7)
2026-01-28 16:17:59 +01:00
Tapani Pälli
41026e14f9 blorp: fix asserts hit with msaa blorp blits on xe3
Tested on PTL, fixes various copy_and_blit tests that utilize compute
after ab9d3528dc that exposed this to them.

Fixes: ab9d3528dc ("anv: fix queue check in anv_blorp_execute_on_companion on xe3")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39548>
(cherry picked from commit bb84773c81)
2026-01-28 16:17:59 +01:00
Caterina Shablia
174aa7ed66 panvk: fix sparse image non-opaque binds
I have no idea how this passed CTS.

Fixes: 5326c451 ("panvk/csf: implement sparse image non-opaque binds")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39546>
(cherry picked from commit a3ec5ece8b)
2026-01-28 16:17:59 +01:00
Samuel Pitoiset
362faeb15e radv: add a workaround for a synchronization bug in Strange Brigade Vulkan
This game has broken synchronization reported by VVL and it indeed
doesn't wait for idle right before present. Workaround this by
injecting a full barrier (easier than rewriting the dep struct).

This only applies to the Vulkan backend.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14705
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39480>
(cherry picked from commit 14d3fb5f1b)
2026-01-28 16:17:59 +01:00
Samuel Pitoiset
33fbf9bf61 radv: fix applying radv_ssbo_non_uniform=true for Crysis 2/3 remastered
DX11 games that use Vulkan interop for RT with a broken and too generic
app/engin name. This is very specific to these two games.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14718
Fixes: 56813236f4 ("radv: use app names instead of exec name for shader based drirc workarounds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39518>
(cherry picked from commit d679236e09)
2026-01-28 16:17:59 +01:00
Rob Clark
cda3f42323 freedreno/a6xx: Better program state size calc
Most of the time we were significantly over-allocating the size of
program stateobjs.  Except when the shader had a very large # of
immediates, in which case we were under-allocating (and crashing).

Fixes: 598928d7e7 ("nir/loop_analyze: determine whether all control flow gets eliminated upon loop unrolling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14731
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39545>
(cherry picked from commit 670ded35c1)
2026-01-28 16:17:59 +01:00
Konstantin Seurer
3ef0b4b27a vulkan: Avoid NAN in the IR BVH
Build and encoding stages should be able to assume that AABBs don't have
NANs. This commit covers all possible sources of NAN.

Fixes: 091b43b ("radv: Use HPLOC for TLAS builds")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14696
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39508>
(cherry picked from commit 20322687e0)
2026-01-28 16:17:59 +01:00
Konstantin Seurer
1f1da9bc5a vulkan: Handle inactive primitives with LBVH builds
cc: mesa-stable

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39378>
(cherry picked from commit 0817551f00)
2026-01-28 16:17:59 +01:00
Nanley Chery
0d3857c832 blorp: Fix Tile64 clear redescription assertion
Prevent assert failures in a future commit where Tile64 will be selected
more often.

Fixes: 42ef23ecd1 ("intel/blorp: Don't redescribe some Tile64 clears")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38063>
(cherry picked from commit 6fc0e5c0aa)
2026-01-28 16:17:59 +01:00
Nanley Chery
cec72c7a29 intel/isl: Fix miptail selection for compressed textures
When determining if an LOD can fit within a miptail, we must minify in
pixel space and then convert to elements.

Prevents the following test case from failing when Yf is force-enabled:

   dEQP-VK.image.texel_view_compatible.graphic.extended.3d_image.texture_read.astc_8x5_srgb_block.r32g32b32a32_uint

Fixes: 46f45d62d1 ("intel/isl: Start using miptails")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38063>
(cherry picked from commit add742fca6)
2026-01-28 16:17:59 +01:00
Mike Blumenkrantz
e2bf4b9007 ntv: emit demote extension/capability when emitting demote
this is cleaner and more accurate

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39540>
(cherry picked from commit a842e641d9)
2026-01-28 16:17:59 +01:00
Mel Henning
03c90bcd1f nvk: Ignore meta ops in occlusion queries
Fixes: 052bbd65c9 ("nvk: Implement pipeline statistics and occlusion queries")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39510>
(cherry picked from commit e32bfc5efe)
2026-01-28 16:17:59 +01:00
Faith Ekstrand
e8f33e8ffb nvk: Enable ZPASS_PIXEL_COUNT in draw_state_init()
Fixes: 052bbd65c9 ("nvk: Implement pipeline statistics and occlusion queries")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39510>
(cherry picked from commit c081ab864f)
2026-01-28 16:17:59 +01:00
Patrick Lerda
4a1133e769 r600: update cubearray imagesize calculation
The previous method to calculate imageSize().z was
incorrect for a cubearray view.

This change was tested on palm and cayman. Here is the test fixed:
spec/arb_texture_view/rendering-layers-image/layers rendering of imagecubearray: fail pass

Fixes: 6c1432f0be ("r600/eg: fix cube map array buffer images.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39063>
(cherry picked from commit 0b8d8f2b17)
2026-01-28 16:17:59 +01:00
Benjamin Cheng
4e1f5fda4a radv/video: Use a more reliable way of computing tile sizes
Some apps (old FFmpeg, contemporary CTS) send down pMi{Col,Row}Starts in
SB units, not MI units. Instead of dependening on those values which
could be unreliable, derive the tile sizes in SB using other parameters.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39492>
(cherry picked from commit c10ebb0fda)
2026-01-28 16:17:59 +01:00
Patrick Lerda
fd0ec1af2b r600: fix rv770 clamp to max_texel_buffer_elements
This change fixes the clamp to max_texel_buffer_elements
issue related to rv770 and older gpus.

Here are the tests fixed on rv770:
spec/arb_texture_buffer_object/texture-buffer-size-clamp/r8ui_texture_buffer_size_via_sampler: fail pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/rg8ui_texture_buffer_size_via_sampler: fail pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/rgba8ui_texture_buffer_size_via_sampler: fail pass

Fixes: 1a441ad5cb ("r600: clamp to max_texel_buffer_elements")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39385>
(cherry picked from commit afcead9158)
2026-01-28 16:17:58 +01:00
Patrick Lerda
161f3c2144 r600: make vertex r10g10b10a2_sscaled conformant on palm and beyond
This is a gl4.3 issue very similar to e8fa3b4950.

The mode r10g10b10a2_sscaled processed as vertex on palm at the
hardware level doesn't follow the current standard. Indeed, the .w
component (2-bits) is not calculated as expected. The table below
describes the situation.

This change fixes this issue by adding two gpu instructions at
the vertex fetch shader stage. An equivalent C representation and
a gpu asm dump of the generated sequence are available below.

.w(2-bits)	expected	palm		cypress
0		 0		0		 0
1		 1		1		 1
2		-2		2		-2
3		-1		3		-1

w_out = w_in - (w_in > 1. ? 4. : 0.);

0002 00000024 A0040000  ALU 2 @72
 0072 801F2C0A 600004C0     1 w:     SETGT*4                __.w,  R10.w, 1.0
 0074 839FCC0A 61400010     2 w:     ADD                    R10.w,  R10.w, -PV.w

Note: cypress returns the expected value, and does not need
this correction.

This change was tested on palm, barts and cayman. Here are the tests fixed:
khr-gl4[3-6]/vertex_attrib_binding/basic-input-case6: fail pass
khr-gles31/core/vertex_attrib_binding/basic-input-case6: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38849>
(cherry picked from commit 2ed761021f)
2026-01-28 16:17:58 +01:00
Patrick Lerda
88ae449dbc r600: fix rv770 dot4 operations
Using a PV register which is not PV.x, after a dot4 operation,
does not work on rv770. Anyway, this does work on evergreen
but this is not documented.

This change updates this behavior for all the r600 gpus
which fixes the issue on rv770. It adds max4 which has the
same requirement in the case of max4 being implemented.

Here are some of the affected tests on rv770:
piglit/bin/fp-abs-01 -auto -fbo
glcts --deqp-case=KHR-GL31.buffer_objects.triangles
piglit/bin/shader_runner generated_tests/spec/glsl-1.10/execution/built-in-functions/fs-distance-vec2-vec2.shader_test -auto -fbo

Fixes: 942e6af40b ("r600/sfn: use PS and PV inline registers when possible")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39101>
(cherry picked from commit da1108dcc4)
2026-01-28 16:17:58 +01:00
Patrick Lerda
3231523878 r600: fix cayman msaa shading behavior
The functionality was working properly at glMinSampleShading(0.)
and glMinSampleShading(1.). The issue was with the intermediary
values. This change makes this function compatible with the
evergreen setup.

Note: this was one of the few functionalities which were working
properly on evergreen but not on cayman.

Here are the tests fixed:
spec/arb_sample_shading/samplemask 4 all/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 4/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 6 all/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 6 all/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 6/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 6/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 8 all/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 8 all/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 8/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 8/0.500000 partition: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_rbo_4: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_rbo_8: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_texture_4: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_texture_8: fail pass

Fixes: f7796a966d ("radeonsi: add basic code for overrasterization")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38615>
(cherry picked from commit d5d844bfc4)
2026-01-28 16:17:58 +01:00
Georg Lehmann
6303313da0 aco/optimizer: fix parsing salu p_insert as shift
Fixes: 88f7e3fff3 ("aco/optimizer: parse pseudo alu instructions")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39412>
(cherry picked from commit ba73792de0)
2026-01-28 16:17:58 +01:00
Rhys Perry
ca22a66dd9 aco/insert_fp_mode: remove incorrect assertion
This can happen if a loop has no continues, and the later code should work
fine in this situation.

This fixes war_thunder/0013a69e097b2471 on navi21.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 6b9d28ab9b ("aco/insert_fp_mode: insert fp mode in reverse")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39481>
(cherry picked from commit e59a0df302)
2026-01-28 16:17:58 +01:00
Zan Dobersek
cfdaa05349 tu: handle DS_DEPTH_BOUNDS_TEST_BOUNDS state under TU_DYNAMIC_STATE_RB_DEPTH_CNTL
MESA_VK_DYNAMIC_DS_DEPTH_BOUNDS_TEST_BOUNDS state should be emitted as part
of TU_DYNAMIC_STATE_RB_DEPTH_CNTL along with other depth state, and not as
part of dynamic stencil state.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 979cf7bac0 ("tu: Merge depth/stencil draw states")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39323>
(cherry picked from commit 3cb4776ede)
2026-01-28 16:17:58 +01:00
Sushma Venkatesh Reddy
6c6ed2a9e6 brw: Use lookup tables for Gfx12+ 3src type encoding/decoding
The previous Gfx12+ implementation using bit masking is failing for FP8
types, so replacing with explicit lookup tables.
For float types, the encoding now aligns with brw_data_type_float, ensuring
correct behavior for DPAS and other 3-source instructions.

Fixes: d1d4e3d530 ("brw: Add EU assembler support for float8")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39448>
(cherry picked from commit 0ce4e8ba6f)
2026-01-28 16:17:58 +01:00
Calder Young
0148f7f746 Revert "anv,brw: Allow multiple ray queries without spilling to a shadow stack"
This optimization doesn't work when the ray query index isn't uniform across
the subgroup, which is something the spec allows. While there are some smart
ways to fix this and still avoid unnecessary spilling, its not worth investing
the time until we find a realtime raytracing workload that actually needs to
use multiple live ray queries for something.

Fixes: 1f1de7eb ("anv,brw: Allow multiple ray queries without spilling to a shadow stack")
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39445>
(cherry picked from commit 895ff7fe92)
2026-01-28 16:17:58 +01:00
Rob Clark
14887b7f03 freedreno/lrz: Correct lrz fc layout for gen8
Fixes: 14a23e8b3e ("freedreno/lrz: Add gen8 lrz layout support")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39375>
(cherry picked from commit 1d715662de)
2026-01-28 16:17:58 +01:00
Gurchetan Singh
98afd0c2f7 gallium: fix sometimes-uninitialized warning
Otherwise:

gallium/auxiliary/gallivm/lp_bld_nir_soa.c:2394:7:
 error: variable 'opname' is used uninitialized whenever switch default is taken

is observed.

Reviewed-by: @LingMan
Fixes: 12bceb228a ("gallivm: let reduce ops use llvm intrinsics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39418>
(cherry picked from commit 0f582b0268)
2026-01-28 16:17:58 +01:00
Danylo Piliaiev
ca25229f90 tu: Fix typo in min bounds calculation of FDM scissors
Fixes: fec372dfa5 ("tu: Implement FDM viewport patching")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39461>
(cherry picked from commit 1d6fe66989)
2026-01-28 16:17:58 +01:00
Rob Clark
4aa5731f09 freedreno: Force single wavesize if double threadsize is unsupported
Turns out ir3 isn't enforcing this itself.

Fixes: c323848b0b ("ir3, tu: Plumb through support for per-shader robustness")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39470>
(cherry picked from commit 455b692e4f)
2026-01-28 16:17:58 +01:00
Rob Clark
e1dae01299 freedreno/common: Fix gen8 EFU float control
This reg should be programmed to zero like previous gens.

Fixes: 6e3598177b ("freedreno/common: Add A840 and X2-85")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39467>
(cherry picked from commit 53b879ac58)
2026-01-28 16:17:58 +01:00
Silvio Vilerino
00632c8dfc d3d12: Add HAVE_GALLIUM_D3D12_VIDEO guards for d3d12_video_encoder_set_max_async_queue_depth/d3d12_video_encoder_get_last_slice_completion_fence
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14709
Fixes: e55b2b5064 ("d3d12: Add get_video_enc_last_slice_completion_fence interop")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39457>
(cherry picked from commit 4b366f8824)
2026-01-28 16:17:58 +01:00
Silvio Vilerino
944bcc85a0 d3d12: Add missing using Microsoft::WRL:ComPtr in d3d12_context_common
Fixes: b06b2fbaba ("d3d12: Remove Agility v717 guards for features now available in v618")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39457>
(cherry picked from commit 237313a243)
2026-01-28 16:17:58 +01:00
Lionel Landwerlin
fefa2b1e68 iris: fix incorrect intrinsic usage on ELK
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: faa857a061 ("intel: rework push constant handling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14708
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39443>
(cherry picked from commit 21661f66fc)
2026-01-28 16:17:58 +01:00
Nick Hamilton
861c689517 pvr: Temporarily disable the buffer device address extension
The extension is optional in Vulkan 1.2 and is causing crashes in
multiple CTS tests.

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Backport-to: 26.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39351>
(cherry picked from commit 3aacc324bc)
2026-01-28 16:17:58 +01:00
Natalie Vock
b055af7ceb aco: Fix parameter stack size calculation
This only accounted for 1/32 (or 1/64) of the actual parameter size. In
some cases this meant that some threads were smashing other threads'
stacks.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39455>
(cherry picked from commit 15328a5ef3)
2026-01-28 16:17:58 +01:00
Mike Blumenkrantz
b12d9282c9 zink: re-allow transient images during blitting
now that transient images are a more complete mechanism, this should
in theory be okay and also accounts for the case where
a framebuffer contains mixed msrtt textures and plain multisampled textures

(cherry picked from commit 6474af3b42)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39469>
2026-01-28 16:17:58 +01:00
Yiwei Zhang
2f53818f7a venus: refactor Android ANB tracking to avoid confusions with WSI
WSI used to track the similar for aliased wsi image creation, but later
got deprecated. So let's rename wsi.memory to wsi.anb_mem and drop
wsi.memory_owned to avoid confusions with common wsi related trackings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit 481df22209)
2026-01-28 16:17:58 +01:00
Yiwei Zhang
f299be5193 venus: properly handle wsi implicit in-fence
Vulkan is supposed to operate in explicit synchronization mode. However,
for legacy compositors that only support implicit fencing, we have to
extract the compositor implicit fence (release fence) and resolve it
properly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit 849e3552e8)
2026-01-28 16:17:58 +01:00
Yiwei Zhang
e0af337416 venus: refactor vn_AcquireNextImage2KHR
Prepare for valid implicit in-fence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit 211c21725c)
2026-01-28 16:17:58 +01:00
Yiwei Zhang
29b37e4484 venus: add vn_renderer_bo_export_sync_file helper
...and a renderer internal helper shared by virtgpu and vtest backend
when supported.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit 9718847dbf)
2026-01-28 16:17:58 +01:00
Yiwei Zhang
960a4d667b venus: track dedicated image during mem alloc
Need this because the new common wsi interface only returns the wsi
memory from the acquired image index.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit 3fca8423c9)
2026-01-28 16:17:58 +01:00
Yiwei Zhang
48c28ee238 venus: track prime blit dst buffer memory in the wsi image
This is to prepare for handling WSI implicit acquire fence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit eb709cba47)
2026-01-28 16:17:58 +01:00
Simon Perretta
1b1229d3b2 pco: update formatless skip check
The skip check should only be checking the format rather than the entire
packed word.

Fixes: 52ddc40a75 ("pco: restrict shadow sampler comparator clamping to unorm formats")
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39428>
(cherry picked from commit c5b70dcb48)
2026-01-28 16:17:58 +01:00
Samuel Pitoiset
f585d2fadc vulkan: fix missing begin debug marker for HPLOC
This fixes capturing with RGP.

Fixes: 091b43b970 ("radv: Use HPLOC for TLAS builds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39427>
(cherry picked from commit 873008f274)
2026-01-28 16:17:58 +01:00
Kitlith
a09bbbf3e1 pvr: Free drm device in can_present_on_device
Fixes: 6bda88bfdb ("pvr: copy WSI can_present_on_device function from PanVK")
Signed-off-by: Kitlith <kitlith@kitl.pw>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39415>
(cherry picked from commit b18b52e61d)
2026-01-28 16:17:57 +01:00
Kitlith
6d4b68c748 panvk: Free drm device in can_present_on_device
Fixes: 08da41f2f1 ("panvk: override can_present_on_device")
Signed-off-by: Kitlith <kitlith@kitl.pw>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39415>
(cherry picked from commit 4de41bf27d)
2026-01-28 16:17:57 +01:00
jaap aarts
700f6c3214 radv/sqtt: Prevent concurrent submit when sqtt is enabled
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39090>
(cherry picked from commit 8f7941f92d)
2026-01-28 16:17:57 +01:00
Aitor Camacho
f4e56b61da hk: Handle unbound sets that contain dynamic buffers
The offset for the dynamic buffers needs to be computed with the currently
bound pipeline layout. This change fixes incorrectly selecting the offset
for a dynamic buffer if a descriptor with a lower index than the currently
being bound contains a dynamic buffer but said descriptor hasn't being
bound yet. It also prevents the binding to override the dynamic buffers in
order to preserve the already bound dynamic descriptors.

Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
(cherry picked from commit aaf4405507)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39440>
2026-01-28 16:17:57 +01:00
Aitor Camacho
d2bc79c260 nvk: Handle unbound sets that contain dynamic buffers
The offset for the dynamic buffers needs to be computed with the currently
bound pipeline layout. This change fixes incorrectly selecting the offset
for a dynamic buffer if a descriptor with a lower index than the currently
being bound contains a dynamic buffer but said descriptor hasn't being
bound yet. It also prevents the binding to override the dynamic buffers in
order to preserve the already bound dynamic descriptors.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
(cherry picked from commit 80a076f5d0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39440>
2026-01-28 16:17:57 +01:00
Dylan Baker
1ed4f69065 bin/pick: When the main widget is replaced, trigger a redraw
The docs clearly say this, and though it used to just work that seems to
have been a coincidence rather than being correct.

CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39459>
(cherry picked from commit 0380c1228e)
2026-01-28 16:17:57 +01:00
Eric Engestrom
b317162543 pick-ui: update for python 3.14 support
```
Traceback (most recent call last):
  File "bin/pick-ui.py", line 31, in <module>
    loop = urwid.MainLoop(u.render(), PALETTE, event_loop=evl, handle_mouse=False)
                          ~~~~~~~~^^
  File "bin/pick/ui.py", line 196, in render
    asyncio.ensure_future(self.update())
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/asyncio/tasks.py", line 730, in ensure_future
    loop = events.get_event_loop()
  File "/usr/lib64/python3.14/asyncio/events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.
```

Of the 3 dependencies, only urwid actually needs to be updated, but
while at it let's pick the latest of each.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39452>
(cherry picked from commit 21829c9f7e)
2026-01-28 16:17:57 +01:00
Eric Engestrom
4141851e8a .pick_status.json: Update to bed1576b14 2026-01-28 16:17:57 +01:00
Eric Engestrom
a2b03c2117 VERSION: bump for 26.0.0-rc1
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-01-21 19:28:32 +01:00
5130 changed files with 376565 additions and 508015 deletions

View file

@ -1,4 +1,2 @@
# Vendored code
src/amd/vulkan/radix_sort/*
src/gallium/drivers/ethosu/mlw_codec/**/*
src/gallium/drivers/ethosu/ethosu_encode_support.h

View file

@ -12,4 +12,3 @@ src/amd/compiler/**/*
src/egl/**/*
src/etnaviv/isa/**/*
src/imagination/**/*
src/kosmickrisp/**/*

View file

@ -234,7 +234,7 @@ include:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
- !reference [.disable-farm-rules, rules]
- !reference [.disable-farm-mr-rules, rules]
# Never run immediately after merging, as we just ran everything
- !reference [.never-post-merge-rules, rules]
# Only rebuild containers in merge pipelines if any tags have been
@ -285,7 +285,7 @@ include:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
- !reference [.disable-farm-rules, rules]
- !reference [.disable-farm-mr-rules, rules]
# Never run immediately after merging, as we just ran everything
- !reference [.never-post-merge-rules, rules]
# Build everything in merge pipelines, if any files affecting the pipeline
@ -344,7 +344,7 @@ include:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
- !reference [.disable-farm-rules, rules]
- !reference [.disable-farm-mr-rules, rules]
# Never run immediately after merging, as we just ran everything
- !reference [.never-post-merge-rules, rules]
# Build everything in merge pipelines, if any files affecting the pipeline

View file

@ -1,5 +0,0 @@
# wsi_common_display.c doesn't properly hand off the oldSwapchain to the new one,
# and you can end up trying to atomic commit before the last present has flipped,
# and the kernel throws an error.
dEQP-VK.wsi.direct.present_timing.basic.retired_swapchain
dEQP-VK.wsi.direct_drm.present_timing.basic.retired_swapchain

View file

@ -1,39 +0,0 @@
# These tests require DRM master priveleges (sole access to the device),
# otherwise they return Skip.
dEQP-VK.wsi.direct.*
dEQP-VK.wsi.acquire_drm.*
# These tests try to allocate up to half of the device memory, which doesn't go
# well when other tests are running in parallel.
dEQP-VK.memory.mapping.*.full.variable.implicit_unmap
dEQP-VK.memory.mapping.*.full.variable.implicit_unmap_map2
# These allocate 600+MB of just the string for the spirv assembly in addition to
# normal deqp-vk memory overhead, which loves to thrash swap with other tests.
dEQP-VK.spirv_assembly.instruction.*.spirv_ids_abuse.lots_ids.*
# 2GB GPU memory for zink-tu
spec@!opengl 1.2@tex3d-maxsize
# 1GB GPU memory for a 16kx16k-sized driver.
spec@ext_framebuffer_object@fbo-maxsize
# 6GB GPU memory for zink-tu
spec@!opengl 1.1@max-texture-size
# 2GB GPU memory on tu
vkd3d-test_committed_non_zeroed_behavior_stress
# 600MB GPU memory on tu
vkd3d-test_fence_ping_pong_deadlock_stress_plain
# 2GB GPU memory on tu
vkd3d-test_heap_non_zeroed_behavior_stress
# 500MB GPU memory on tu
vkd3d-test_fence_wait_robustness
# Allocates a 2GB texel buffer
vkd3d-test_large_texel_buffer_view
# 550MB GPU memory on tu
vkd3d-test_placed_image_alignment
# Allocates until heap OOM.
vkd3d-test_stress_fallback_render_target_allocation_device
# 3GB GPU memory on tu
vkd3d-test_stress_suballocation_multithread
# 2GB GPU memory on tu
vkd3d-test_stress_suballocation_rebar

View file

@ -26,6 +26,20 @@ glx@glx_arb_sync_control@timing.*
# This test is not built with waffle, while we do build tests with waffle
spec@!opengl 1.1@windowoverlap
# These tests all read from the front buffer after a swap. Given that we
# run piglit tests in parallel in Mesa CI, and don't have a compositor
# running, the frontbuffer reads may end up with undefined results from
# windows overlapping us.
#
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
# marked as single-threaded and run after the rayon loop if we want to support
# them.
#
# Note that "glx-" tests don't appear in x11-skips.txt because they can be
# run even if PIGLIT_PLATFORM=gbm (for example)
glx@glx-copy-sub-buffer.*
# These test the loader more than the implementation and are broken because the
# Vulkan loader in Debian is too old
dEQP-VK.api.get_device_proc_addr.non_enabled
@ -35,12 +49,27 @@ dEQP-VK.api.version_check.unavailable_entry_points
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT
# gbm does not support reading the front buffer after a swapbuffers, and
# These tests attempt to read from the front buffer after a swap. They are skipped
# on both X11 and gbm, but for different reasons:
#
# On X11: Given that we run piglit tests in parallel in Mesa CI, and don't have a
# compositor running, the frontbuffer reads may end up with undefined results from
# windows overlapping us.
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
# marked as single-threaded and run after the rayon loop if we want to support
# them.
# Other front-buffer access tests like fbo-sys-blit, fbo-sys-sub-blit, or
# fcc-front-buffer-distraction don't appear here, because the DRI3 fake-front
# handling should be holding the pixels drawn by the test even if we happen to fail
# GL's window system pixel occlusion test.
# Note that glx skips don't appear here, they're in all-skips.txt (in case someone
# sets PIGLIT_PLATFORM=gbm to mostly use gbm, but still has an X server running).
#
# On gbm: gbm does not support reading the front buffer after a swapbuffers, and
# that's intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
# but don't swap.
#
# piglit should probably be fixed to throw skip on this platform
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
spec@!opengl 1.1@read-front

View file

@ -1,6 +0,0 @@
# These are variants of
# dEQP-VK.memory.mapping.suballocation.full.variable.implicit_unmap* that
# are very slow (often 30s on DUTs) due to allocating, mapping, filling,
# and reading back 32GB of memory, while not providing interesting pre-merge
# coverage for us.
dEQP-VK.memory.mapping.dedicated_alloc.*.implicit_unmap.*

View file

@ -8,18 +8,8 @@ set -uex
: "${ADB:=adb}"
$ADB wait-for-device
for i in $(seq 1 5); do
if $ADB root; then
break
fi
if [ "$i" -eq 5 ]; then
echo "Failed to get adb root after 5 attempts"
exit 1
fi
sleep 2
done
$ADB wait-for-device
$ADB wait-for-device root
sleep 1
# overlay
@ -81,10 +71,17 @@ $ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
# Remove and replace Vulkan drivers
if [ "${CUTTLEFISH_GPU_MODE:-}" = "venus" ] || [ "${CUTTLEFISH_GPU_MODE:-}" = "venus_guest_angle" ]; then
$ADB shell rm -f /vendor/lib64/hw/vulkan.virtio.so*
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
# Remove and replace Vulkan drivers:
# - For Cuttlefish virtual machines, replace lavapipe or venus
# - For Android hardware, replace the Vulkan driver specified by VK_DRIVER
if [ -n "${CUTTLEFISH_GPU_MODE:-}" ]; then
if [ "$CUTTLEFISH_GPU_MODE" = "mesa_swrast" ] || [ "$CUTTLEFISH_GPU_MODE" = "mesa_swrast_guest_angle" ]; then
$ADB shell rm -f /vendor/lib64/hw/vulkan.lvp.so*
$ADB push "$INSTALL/lib/libvulkan_lvp.so" /vendor/lib64/hw/vulkan.lvp.so
else
$ADB shell rm -f /vendor/lib64/hw/vulkan.virtio.so*
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
fi
else
$ADB shell rm -f /vendor/lib64/hw/vulkan.${VK_DRIVER}.so*
$ADB push "$INSTALL/lib/libvulkan_${VK_DRIVER}.so" /vendor/lib64/hw/vulkan.${VK_DRIVER}.so
@ -132,6 +129,7 @@ if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; th
fi
get_surfaceflinger_pid() {
while [ "$($ADB shell dumpsys -l | grep 'SurfaceFlinger$')" = "" ] ; do sleep 1; done
$ADB shell ps -A | grep -i surfaceflinger | tr -s ' ' | cut -d ' ' -f 2
}

View file

@ -1,4 +1,8 @@
# Skip these tests when running fractional dEQP batches, as the AHB and WSI tests are
# expected to be handled separately in non-fractional runs within the deqp-runner suite.
# Skip these tests when running fractional dEQP batches, as the AHB tests are expected
# to be handled separately in a non-fractional run within the deqp-runner suite.
dEQP-VK.api.external.memory.android_hardware_buffer.*
# Skip all WSI tests: the DEQP_ANDROID_EXE build used can't create native windows, as
# only APKs support window creation on Android.
dEQP-VK.image.swapchain_mutable.*
dEQP-VK.wsi.*

View file

@ -75,6 +75,8 @@ section_start prepare_rootfs "Preparing rootfs components"
set -ex
date +'%F %T'
# Clear out any previous run's artifacts.
rm -rf results/
mkdir -p results
@ -83,6 +85,8 @@ mkdir -p results
# state, since it's volume-mounted on the host.
rsync -a --delete $BM_ROOTFS/ /nfs/
date +'%F %T'
# If BM_BOOTFS is an URL, download it
if echo $BM_BOOTFS | grep -q http; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
@ -90,6 +94,8 @@ if echo $BM_BOOTFS | grep -q http; then
BM_BOOTFS=/tmp/bootfs.tar
fi
date +'%F %T'
# If BM_BOOTFS is a file, assume it is a tarball and uncompress it
if [ -f "${BM_BOOTFS}" ]; then
mkdir -p /tmp/bootfs
@ -97,6 +103,8 @@ if [ -f "${BM_BOOTFS}" ]; then
BM_BOOTFS=/tmp/bootfs
fi
date +'%F %T'
# Install kernel modules (it could be either in /lib/modules or
# /usr/lib/modules, but we want to install in the latter)
if [ -n "${BM_BOOTFS}" ]; then
@ -107,6 +115,8 @@ else
fi
date +'%F %T'
# Install kernel image + bootloader files
if [ -z "$BM_BOOTFS" ]; then
mv "${BM_KERNEL}" "${BM_DTB}.dtb" /tftp/
@ -114,9 +124,13 @@ else # BM_BOOTFS
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
fi
date +'%F %T'
# Create the rootfs in the NFS directory
. $BM/rootfs-setup.sh /nfs
date +'%F %T'
echo "$BM_CMDLINE" > /tftp/cmdline.txt
# Add some options in config.txt, if defined
@ -166,10 +180,13 @@ python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
set -e
date +'%F %T'
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
# will look for them.
cp -Rp /nfs/results/. results/
date +'%F %T'
section_end dut_cleanup
exit $ret

View file

@ -25,16 +25,17 @@ import argparse
import os
import re
import sys
import threading
from custom_logger import CustomLogger
from serial_buffer import SerialBuffer
class PoERun:
def __init__(self, args, boot_timeout, test_timeout, logger):
self.powerup = args.powerup
self.powerdown = args.powerdown
self.ser = SerialBuffer(args.dev, "results/serial-output.txt")
self.ser = SerialBuffer(
args.dev, "results/serial-output.txt", ": ")
self.boot_timeout = boot_timeout
self.test_timeout = test_timeout
self.logger = logger

View file

@ -9,10 +9,14 @@ mkdir -p $rootfs_dst/results
cp $BM/bm-init.sh $rootfs_dst/init
cp $CI_COMMON/init*.sh $rootfs_dst/
date +'%F %T'
# Make JWT token available as file in the bare-metal storage to enable access
# to MinIO
cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
date +'%F %T'
cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
set +x
@ -26,3 +30,5 @@ set -x
# Add the Mesa drivers we built, and make a consistent symlink to them.
mkdir -p $rootfs_dst/$CI_PROJECT_DIR
rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
date +'%F %T'

View file

@ -22,6 +22,7 @@
# IN THE SOFTWARE.
import argparse
from datetime import datetime, UTC
import queue
import serial
import threading
@ -29,7 +30,7 @@ import time
class SerialBuffer:
def __init__(self, dev, filename, timeout=None, line_queue=None):
def __init__(self, dev, filename, prefix, timeout=None, line_queue=None):
self.filename = filename
self.dev = dev
@ -48,6 +49,7 @@ class SerialBuffer:
self.line_queue = line_queue
else:
self.line_queue = queue.Queue()
self.prefix = prefix
self.timeout = timeout
self.sentinel = object()
self.closing = False
@ -86,7 +88,7 @@ class SerialBuffer:
break
self.byte_queue.put(b)
except Exception as err:
print(str(err))
print(self.prefix + str(err))
break
self.byte_queue.put(self.sentinel)
@ -128,7 +130,10 @@ class SerialBuffer:
if b == b'\n'[0]:
line = line.decode(errors="replace")
print("{endc}{line}".format(line=line, endc='\033[0m'), flush=True, end='')
ts = datetime.now(tz=UTC)
ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}"
print("{endc}{time}{prefix}{line}".format(
time=ts_str, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
self.line_queue.put(line)
line = bytearray()
@ -165,10 +170,12 @@ def main():
parser.add_argument('--dev', type=str, help='Serial device')
parser.add_argument('--file', type=str,
help='Filename for serial output', required=True)
parser.add_argument('--prefix', type=str,
help='Prefix for logging serial to stdout', nargs='?')
args = parser.parse_args()
ser = SerialBuffer(args.dev, args.file)
ser = SerialBuffer(args.dev, args.file, args.prefix or "")
for line in ser.lines():
# We're just using this as a logger, so eat the produced lines and drop
# them

View file

@ -45,7 +45,6 @@ debian-x86_64:
-D tools=drm-shim
-D valgrind=disabled
-D perfetto=true
-D vulkan-layers=screenshot
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
RUN_MESON_TESTS: "false" # debian-build-x86_64 already runs these
artifacts:
@ -60,6 +59,9 @@ debian-x86_64-asan:
variables:
VULKAN_DRIVERS: "swrast,amd,intel"
GALLIUM_DRIVERS: "llvmpipe,softpipe,zink,r300"
C_ARGS: >
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
EXTRA_OPTION: >
-D intel-elk=false
-D intel-rt=false
@ -120,6 +122,7 @@ debian-x86_64-msan:
-Wno-error=overloaded-virtual
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=unused-private-field
-Wno-error=vla-cxx-extension
-Wno-error=deprecated-declarations
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc and precomp-compiler (msan complains about uninitialized
@ -137,7 +140,6 @@ debian-x86_64-msan:
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
-D panfrost-rust=true
debian-x86_64-ubsan:
extends:
@ -145,6 +147,12 @@ debian-x86_64-ubsan:
- .meson-build-for-tests
- .build-run-long
variables:
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=array-bounds
GALLIUM_DRIVERS: "llvmpipe,softpipe"
VULKAN_DRIVERS: "swrast"
EXTRA_OPTION: >
@ -186,7 +194,7 @@ debian-build-x86_64:
GALLIUM_ST: >
-D gallium-extra-hud=true
-D gallium-va=enabled
-D gallium-rusticl=true
-D gallium-rusticl=false
-D legacy-wayland=bind-wayland-display
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus,radeonsi"
VULKAN_DRIVERS: "intel_hasvk,imagination,microsoft-experimental,nouveau,swrast"
@ -194,7 +202,6 @@ debian-build-x86_64:
EXTRA_OPTION: >
-D spirv-to-dxil=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
-D panfrost-rust=true
-D perfetto=true
S3_ARTIFACT_NAME: debian-build-x86_64
@ -206,6 +213,7 @@ debian-release:
variables:
UNWIND: "enabled"
C_ARGS: >
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=deprecated-declarations
@ -226,7 +234,6 @@ debian-release:
-D spirv-to-dxil=true
-D tools=all
-D mesa-clc=enabled
-D panfrost-rust=true
-D precomp-compiler=enabled
-D intel-rt=enabled
-D imagination-srv=true
@ -245,6 +252,8 @@ alpine-build-testing:
C_ARGS: >
-Wno-error=cpp
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=disabled
@ -280,10 +289,14 @@ fedora-release:
# maybe-uninitialized is misfiring in nir_lower_gs_intrinsics.c, and
# a "maybe" warning should never be an error anyway.
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=array-bounds
-Wno-error=maybe-uninitialized
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=dangling-reference
-Wno-error=overloaded-virtual
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=dri
@ -326,8 +339,13 @@ debian-android:
-Wno-error=enum-conversion
-Wno-error=initializer-overrides
-Wno-error=sometimes-uninitialized
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=c99-designator
-Wno-error=unused-variable
-Wno-error=unused-but-set-variable
-Wno-error=self-assign
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=disabled
-D gbm=disabled
@ -345,7 +363,6 @@ debian-android:
-D mesa-clc=system
-D precomp-compiler=system
-D perfetto=true
-D freedreno-kmds=msm,virtio
GALLIUM_ST: >
-D gallium-va=disabled
-D gallium-rusticl=false
@ -465,6 +482,10 @@ debian-arm64:
- .ci-deqp-artifacts
- .meson-build-for-tests
variables:
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
VULKAN_DRIVERS: "broadcom,freedreno,imagination,panfrost"
DRI_LOADERS:
@ -475,11 +496,8 @@ debian-arm64:
-D freedreno-kmds=msm,virtio
-D teflon=true
-D perfetto=true
-D vulkan-layers=screenshot
-D panfrost-rust=true
GALLIUM_ST:
-D gallium-rusticl=true
-D legacy-wayland=bind-wayland-display
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
@ -491,6 +509,8 @@ debian-arm64-asan:
variables:
VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
GALLIUM_DRIVERS: "freedreno,vc4,v3d,panfrost"
C_ARGS: >
-Wno-error=deprecated-declarations
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@ -498,7 +518,6 @@ debian-arm64-asan:
-D valgrind=disabled
-D tools=dlclose-skip
-D gallium-rusticl=false
-D panfrost-rust=true
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
@ -513,6 +532,12 @@ debian-arm64-ubsan:
GALLIUM_DRIVERS: "v3d,vc4"
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=array-bounds
-fno-var-tracking-assignments
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@ -533,7 +558,6 @@ debian-arm64-build-test:
-D glvnd=disabled
EXTRA_OPTION: >
-D tools=panfrost,imagination
-D panfrost-rust=true
-D perfetto=true
debian-arm64-release:
@ -543,6 +567,10 @@ debian-arm64-release:
variables:
BUILDTYPE: release
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
script:
- !reference [.meson-build-only, script]
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
@ -555,13 +583,15 @@ debian-no-libdrm:
VULKAN_DRIVERS: freedreno
GALLIUM_DRIVERS: "zink,llvmpipe"
BUILDTYPE: release
C_ARGS: >
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
EXTRA_OPTION: >
-D freedreno-kmds=kgsl
-D glx=dri
-D glx=disabled
-D gbm=disabled
-D egl=enabled
-D egl=disabled
-D perfetto=true
-D platforms=x11,wayland
debian-clang:
extends:
@ -604,7 +634,6 @@ debian-clang:
-D spirv-to-dxil=true
-D imagination-srv=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi,imagination
-D panfrost-rust=true
-D vulkan-layers=device-select,overlay
-D build-radv-tests=true
-D build-aco-tests=true
@ -692,7 +721,6 @@ debian-vulkan:
-D build-aco-tests=true
-D intel-rt=disabled
-D imagination-srv=true
-D panfrost-rust=true
debian-x86_32:
extends:
@ -726,10 +754,9 @@ debian-x86_32:
-D platforms=
-D mesa-clc=enabled
-D install-mesa-clc=true
-D panfrost-rust=true
# In case of issues with this job, contact @frankbinns
.debian-riscv64:
debian-riscv64:
extends:
- .meson-cross
- .use-debian/riscv64_build

View file

@ -96,21 +96,6 @@
- job: debian-x86_64
artifacts: false
.ci-tron-x86_64-test-vk-asan:
extends:
- .use-debian/x86_64_test-vk
- .ci-tron-x86_64-test
variables:
S3_ARTIFACT_NAME: "mesa-x86_64-asan-debugoptimized"
DEQP_FORCE_ASAN: 1
VKD3D_FORCE_ASAN: 1
needs:
- job: debian/x86_64_test-vk
artifacts: false
optional: true
- job: debian-x86_64-asan
artifacts: false
.ci-tron-x86_64-test-vk-manual:
extends:
- .use-debian/x86_64_test-vk
@ -124,17 +109,6 @@
- job: debian-build-x86_64
artifacts: false
.ci-tron-x86_64-test-video:
extends:
- .use-debian/x86_64_test-video
- .ci-tron-x86_64-test
needs:
- job: debian/x86_64_test-video
artifacts: false
optional: true
- job: debian-x86_64
artifacts: false
.ci-tron-x86_64-test-gl:
extends:
- .use-debian/x86_64_test-gl

View file

@ -41,11 +41,6 @@ trap cleanup INT TERM EXIT
# background by this script
BACKGROUND_PIDS=
# Until we uniformize the install dir to /install, we need to make it
# available to both possible CI_PROJECT_DIR paths.
if [ "$GIT_STRATEGY" = empty ]; then
ln -s "$CI_PROJECT_DIR" "${CI_PROJECT_DIR%-empty}"
fi
for path in '/dut-env-vars.sh' '/set-job-env-vars.sh' './set-job-env-vars.sh'; do
[ -f "$path" ] && source "$path"
@ -59,12 +54,6 @@ echo
section_switch init_stage2 "Pre-testing hardware setup"
job_time=$(get_job_seconds)
uptime=$(cut -d ' ' -f1 /proc/uptime)
echo "$(get_current_minsec) after job start == $uptime sec after kernel boot time"
printf -v uptime_rounded "%.0f" "$uptime"
echo "Kernel boot occurred $((job_time-uptime_rounded)) seconds after job start"
set -ex
# Set up any devices required by the jobs
@ -102,11 +91,6 @@ if [ -n "$HWCI_ENABLE_X86_KVM" ]; then
modprobe ${KVM_KERNEL_MODULE}
fi
if ! [ -e /install/ ] && ! [ -e $CI_PROJECT_DIR/install/ ]; then
echo "Missing install/ dir"
exit 1
fi
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
# it in /install
ln -sf $CI_PROJECT_DIR/install /install

View file

@ -6,12 +6,7 @@ mkdir -p /tmp/.X11-unix
export DISPLAY=:0
WAYLAND_DISPLAY=wayland-0
weston --config="$CI_COMMON_DIR/weston.ini" \
--socket="$WAYLAND_DISPLAY" \
--log "$RESULTS_DIR/weston.log" \
--logger-scopes=log,xwm-wm-x11 \
--width 1920 --height 1080 \
"$@" &
weston --config="$CI_COMMON_DIR/weston.ini" --socket="$WAYLAND_DISPLAY" "$@" &
export WAYLAND_DISPLAY
while [ ! -S /tmp/.X11-unix/X0 ]; do sleep 1; done

View file

@ -1,8 +1,7 @@
variables:
CONDITIONAL_BUILD_ANDROID_CTS_TAG: 3e87ed2c4c2d00d764321eb26dd70f48
CONDITIONAL_BUILD_ANGLE_TAG: 7b3e621c5e2facd17452d013f1b55d98
CONDITIONAL_BUILD_CROSVM_TAG: 7edabf28bbd50e00558e3b0bb2d94255
CONDITIONAL_BUILD_ANDROID_CTS_TAG: 2dfd3e288249e4776ef6866d34d344d4
CONDITIONAL_BUILD_ANGLE_TAG: 02a4786ac57d3ea16744b7795ddcdb56
CONDITIONAL_BUILD_CROSVM_TAG: 4c61f9707203afca91db3efeb57175db
CONDITIONAL_BUILD_FLUSTER_TAG: e13f8521875ebd70e207ec0f6f3d3e5b
CONDITIONAL_BUILD_PIGLIT_TAG: ca18ec9b1945c6ed69ecb5b3bcfb3479
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: ad10b7da6e386de52f812c6370544ffa
CONDITIONAL_BUILD_WINE_TAG: 3376ef5f6160dbc502a7f8710a2eac27
CONDITIONAL_BUILD_PIGLIT_TAG: d027ff7015ba411736c1ac28a8663805
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 7d968889179351fcec5c1898fe3c1eff

View file

@ -34,6 +34,7 @@ DEPS=(
glslang
graphviz
libclc-dev
libdrm-dev
libpciaccess-dev
libva-dev
linux-headers
@ -71,8 +72,6 @@ pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
. .gitlab-ci/container/build-rust.sh build
. .gitlab-ci/container/build-libdrm.sh
EXTRA_MESON_ARGS='--prefix=/usr' \
. .gitlab-ci/container/build-wayland.sh

View file

@ -26,21 +26,18 @@ ci_tag_build_time_check "ANDROID_CTS_TAG"
# This should be the union of all modules required by our CI jobs
# Specific modules to run are selected via the ${GPU_VERSION}-android-cts-include.txt files
ANDROID_CTS_MODULES=(
"CtsDeqpTestCases"
"CtsGraphicsTestCases"
"CtsNativeHardwareTestCases"
"CtsSkQPTestCases"
)
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r5"
case "$ANDROID_ARCH" in
x86_64) ANDROID_CTS_ARCH=x86;;
arm64) ANDROID_CTS_ARCH=arm;;
esac
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r3"
ANDROID_CTS_DEVICE_ARCH="x86"
# Download the stripped CTS from S3, because the CTS download from Google can take 20 minutes
CTS_FILENAME="android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_ARCH}"
ARTIFACT_PATH="${DATA_STORAGE_PATH}/android-cts/${DEBIAN_ARCH}/${ANDROID_CTS_TAG}.tar.zst"
CTS_FILENAME="android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}"
ARTIFACT_PATH="${DATA_STORAGE_PATH}/android-cts/${ANDROID_CTS_TAG}.tar.zst"
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found Android CTS at: ${FOUND_ARTIFACT_URL}"
@ -60,13 +57,6 @@ else
ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" "${ANDROID_CTS_MODULES[@]}" | sed -e 's/|$//g')
find /android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
# Android CTS bundles a JDK for x86_64 hosts.
# Replace this with the JDK we installed.
if [ "${DEBIAN_ARCH}" = "arm64" ]; then
rm -rf /android-cts/jdk
mv /usr/lib/jvm/java-21-openjdk-arm64 /android-cts/jdk
fi
# Using zstd compressed tarball instead of zip, the compression ratio is almost the same, but
# the extraction is faster, also LAVA overlays don't support zip compression.
tar --zstd -cf "${CTS_FILENAME}.tar.zst" /android-cts

View file

@ -13,7 +13,7 @@ section_start angle "Building ANGLE"
# setting up the environment variables locally
ci_tag_build_time_check "ANGLE_TAG"
ANGLE_REV="196d1b79eadbd8fdbf0590092266bb2d87264988"
ANGLE_REV="b406401e42080c2f8fe479e6c5fa48dfae97c482"
DEPOT_REV="5982a1aeb33dc36382ed8c62eddf52a6135e7dd3"
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
@ -129,57 +129,25 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
# 'arm64' toolchain you get from Google infrastructure is a cross-compiler
# from x86-64
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
# The Bullseye sysroot is too old for Chromium's default PAC/BTI setup.
# Chromium forces -z force-bti on arm64, but our sysroot objects lack BTI
# notes, which breaks linking. Disable branch protection to keep the build
# sane. See:
# https://chromium.googlesource.com/chromium/src/build/+/7c4a6063/config/linux/BUILD.gn#87
# https://chromium.googlesource.com/chromium/src/build/+/7c4a6063/config/arm.gni#77
cat >> out/Release/args.gn <<EOF
arm_control_flow_integrity="none"
EOF
fi
# The Chromium build system hardcodes these flags, and they're not compatible
# with our clang19 'unbundled' toolchain. See:
# https://chromium.googlesource.com/chromium/src/build/+/71caaf82/config/compiler/BUILD.gn#604
# https://chromium.googlesource.com/chromium/src/build/+/71caaf82/config/compiler/BUILD.gn#643
# https://chromium.googlesource.com/chromium/src/build/+/42209031/config/sanitizers/sanitizers.gni#548
sed -i '/-fdiagnostics-show-inlining-chain/d' build/config/compiler/BUILD.gn
sed -i '/-fno-lifetime-dse/d' build/config/compiler/BUILD.gn
sed -i '/-fsanitize-ignore-for-ubsan-feature=/d' build/config/sanitizers/sanitizers.gni
(
# The 'unbundled' toolchain configuration requires clang, and it also needs to
# be configured via environment variables.
if [[ "$ANGLE_TARGET" == "linux" ]]; then
CC="$(command -v "clang-${LLVM_VERSION}")"
export CC
export HOST_CC="$CC"
export BUILD_CC="$CC"
export CFLAGS="-Wno-unknown-warning-option"
export HOST_CFLAGS="$CFLAGS"
export BUILD_CFLAGS="$CFLAGS"
CXX="$(command -v "clang++-${LLVM_VERSION}")"
export CXX
export HOST_CXX="$CXX"
export BUILD_CXX="$CXX"
export CXXFLAGS="-Wno-unknown-warning-option"
export HOST_CXXFLAGS="$CXXFLAGS"
export BUILD_CXXFLAGS="$CXXFLAGS"
AR="$(command -v ar)"
export AR
export HOST_AR="$AR"
export BUILD_AR="$AR"
NM="$(command -v nm)"
export NM
export HOST_NM="$NM"
export BUILD_NM="$NM"
export LDFLAGS="-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
export HOST_LDFLAGS="$LDFLAGS"
export BUILD_LDFLAGS="$LDFLAGS"
fi
export CC="clang-${LLVM_VERSION}"
export HOST_CC="$CC"
export CFLAGS="-Wno-unknown-warning-option"
export HOST_CFLAGS="$CFLAGS"
export CXX="clang++-${LLVM_VERSION}"
export HOST_CXX="$CXX"
export CXXFLAGS="-Wno-unknown-warning-option"
export HOST_CXXFLAGS="$CXXFLAGS"
export AR="ar"
export HOST_AR="$AR"
export NM="nm"
export HOST_NM="$NM"
export LDFLAGS="-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
export HOST_LDFLAGS="$LDFLAGS"
gn gen out/Release
# depot_tools overrides ninja with a version that doesn't work. We want

View file

@ -7,9 +7,9 @@
set -uex
section_start apitrace "Building apitrace"
uncollapsed_section_start apitrace "Building apitrace"
APITRACE_VERSION="18cfd388ac47a9e00978b34d6c20341f3e2cdb56"
APITRACE_VERSION="45a005875d348b055d5b88dca285c109dee90457"
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
pushd /apitrace

View file

@ -6,7 +6,7 @@
# DEBIAN_BUILD_TAG
# FEDORA_X86_64_BUILD_TAG
section_start bindgen "Building bindgen"
uncollapsed_section_start bindgen "Building bindgen"
BINDGEN_VER=0.71.1
CBINDGEN_VER=0.26.0

View file

@ -22,12 +22,12 @@ pushd /platform/crosvm
git checkout "$CROSVM_VERSION"
git submodule update --init
VIRGLRENDERER_VERSION=37168812546aba59e79eb032d65e150c38ad3996
VIRGLRENDERER_VERSION=95610d57da49d76617bd6d8d21b9bfb1bf360f64
rm -rf third_party/virglrenderer
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
pushd third_party/virglrenderer
git checkout "$VIRGLRENDERER_VERSION"
meson setup build/ -D libdir=lib -D venus=true ${EXTRA_MESON_ARGS:-}
meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true ${EXTRA_MESON_ARGS:-}
meson install -C build
popd

View file

@ -9,7 +9,7 @@ set -uex
section_start deqp-runner "Building deqp-runner"
DEQP_RUNNER_VERSION=0.23.2
DEQP_RUNNER_VERSION=0.21.0
commits_to_backport=(
)

View file

@ -23,10 +23,10 @@ set -x
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_MAIN_COMMIT=634a3fc62d82c34de68c3b1add25e6b7f5777524
DEQP_VK_VERSION=1.4.5.3
DEQP_GL_VERSION=4.6.8.0
DEQP_GLES_VERSION=3.2.14.0
DEQP_MAIN_COMMIT=4d3bedc74e2258c483cf968753207cff84d9e4fc
DEQP_VK_VERSION=1.4.4.2
DEQP_GL_VERSION=4.6.7.0
DEQP_GLES_VERSION=3.2.13.0
# Patches to VulkanCTS may come from commits in their repo (listed in
# cts_commits_to_backport) or patch files stored in our repo (in the patch
@ -46,56 +46,12 @@ main_cts_patch_files=(
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Provide non-NULL setup slot for B frame tests
ebe05a88f36e3be8e232bfce97812353c396674a
# Fix enabling features in wsi incremental_present tests
fd8792395803546d03ee096f98fc20b21f22f047
# Check requirements in checkSupport, part 4 (draw module)
862a7d3c40be651aabc04913977db2cba6001ce9
# Check requirements in checkSupport, part 2 (spirv_assembly module)
fd3d404c142de4b0f68cb950b1a480c25c87c719
# Check requirements in checkSupport, part 1 (renderpass module)
3c6d790f5dd52f6e7a1d6a5264d5d4736c740b4c
# Check requirements in checkSupport, part 3 (ubo)
c2834cc642b55d4ffa3507a3ba3167862acb834b
# Add presentTimingSupported check
ef67ebbd16f8a5eb240227b172740e497887f057
# VulkanDisplayDirectDrm destructor for DRM direct display
d00394f5d14564a58d9e9a112ec04b8a38c36867
# Enable required extension for Vulkan 1.0
7cc6a1ad32e59861cb0a33f8b27646c41730c1b1
# Check requirements in checkSupport, part 7 (memory and memory_model modules)
59f04c088e30866e84f013a75029540b44d1f965
# Match VkImage size and render size for VkBindImageMemorySwapchainInfoKHR
1cf4ed5bc0620ea514404609b1a2958c4518b86d
# Add feature checks to present timing tests
7d783824ba621d9eab664f05e07143d8f88f27d5
# Allow VK_NOT_READY as a result of GetSwapchainTimingPropertiesEXT
84a468ec510060ff5af91822316562281e2d6d0a
# Fix crashing when vkAcquireDrmDisplayEXT fails
a3f15b1800d9b4892ad1776690abf5a1ac14efae
# accept VK_SUBOPTIMAL_KHR as success from vkAcquireNextImageKHR
46cb8b4dc7a45f2ec4aa4afc6dc5216fc24d570a
# Speedup sparse residency copies
a172173f1087a8c9229f4f16ef91f8ce0d00805b
# Add descriptor array/indexing feature checks
3f8cb8d341d9aed709a97493afac9c935d5afb81
# Fix for KHR_display query
ac8dc20073b2af60595615f661005c1f8680f4ee
# Delay shader object rendering test case creation to init method
e8f74066c15a2f94ec4457d75ab998d315a06bd7
# Fix invalid descriptor test
589820590126ca860dbbd0db26eb6bcdaa63dea0
# Fix validation errors found on qualcomm turnip
39ee33cd4be94216a9b657d089283b79767dc372
# Wait for sparse memory binds to finish in host image copy tests
976d729ae7982a32d117b0132e2bb8d3cd0df4d2
# Add an option to print to logcat in Android executable builds
fc51668efdfd0dffa30b3eddee34aa26172969fb
)
# shellcheck disable=SC2034
vk_cts_patch_files=(
build-deqp-android-Implement-headless-WSI-fallback-using-AImageR.patch
build-deqp-Delay-SPIR-V-assembly-type-test-case-creation-to-ini.patch
)
# shellcheck disable=SC2034
@ -104,22 +60,22 @@ gl_cts_commits_to_backport=(
# shellcheck disable=SC2034
gl_cts_patch_files=(
build-deqp-android-Implement-headless-WSI-fallback-using-AImageR.patch # We're only applying this avoid conflicts in the second patch
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
)
# shellcheck disable=SC2034
# GLES builds also EGL
gles_cts_commits_to_backport=(
# CMake: Include FindPkgConfig before using pkg_check_modules()
e09e0a210b041d0bf7b525620d0068eab3ffa66a
# Add an option to print to logcat in Android executable builds
fc51668efdfd0dffa30b3eddee34aa26172969fb
# Fix EGL render tests for rgba16 and rgb16 unorm fixed point
b5ed8718f19492781f8e9be3eb9d3346e961efa9
# Fix glGetnUniform* error codes when bufSize < 0
34259553e0cc77061465ae0c4bcd4c4658a0fb4a
)
# shellcheck disable=SC2034
gles_cts_patch_files=(
build-deqp-android-Implement-headless-WSI-fallback-using-AImageR.patch
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
)
@ -151,18 +107,7 @@ git checkout FETCH_HEAD
DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
for i in {5..1}; do
if merge_base=$(curl-with-retry -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -e -r .merge_base_commit.sha); then
break
fi
if [ "$i" -eq 1 ]; then
echo "Final attempt to fetch merge base from GitHub failed. VK-GL-CTS GitHub API might be down or rate-limited."
exit 1
fi
sleep 10
done
merge_base="$(curl-with-retry -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
exit 1

View file

@ -7,9 +7,9 @@
set -uex
section_start directx-headers "Building directx-headers"
uncollapsed_section_start directx-headers "Building directx-headers"
git clone https://github.com/microsoft/DirectX-Headers -b v1.619.1 --depth 1
git clone https://github.com/microsoft/DirectX-Headers -b v1.618.1 --depth 1
pushd DirectX-Headers
meson setup build --backend=ninja --buildtype=release -Dbuild-test=false ${EXTRA_MESON_ARGS:-}
meson install -C build

View file

@ -6,7 +6,7 @@
set -ex
section_start fossilize "Building fossilize"
uncollapsed_section_start fossilize "Building fossilize"
git clone https://github.com/ValveSoftware/Fossilize.git
cd Fossilize

View file

@ -19,7 +19,7 @@ pushd /gfxreconstruct
git checkout "$GFXRECONSTRUCT_VERSION"
git submodule update --init
git submodule update
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/gfxreconstruct/build -DBUILD_WERROR=OFF -DGFXRECON_ENABLE_OPENXR=OFF
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/gfxreconstruct/build -DBUILD_WERROR=OFF
cmake --build _build --parallel --target tools/{replay,info}/install/strip
find . -not -path './build' -not -path './build/*' -delete
popd

View file

@ -1,91 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_BASE_TAG
set -uex
section_start gpu-trace-perf "Building gpu-trace-perf"
GPU_TRACE_PERF_VERSION=1.9.0
commits_to_backport=(
)
patch_files=(
)
GPU_TRACE_PERF_GIT_URL="${GPU_TRACE_PERF_GIT_URL:-https://gitlab.freedesktop.org/anholt/gpu-trace-perf.git}"
if [ -n "${GPU_TRACE_PERF_GIT_TAG:-}" ]; then
GPU_TRACE_PERF_GIT_CHECKOUT="$GPU_TRACE_PERF_GIT_TAG"
elif [ -n "${GPU_TRACE_PERF_GIT_REV:-}" ]; then
GPU_TRACE_PERF_GIT_CHECKOUT="$GPU_TRACE_PERF_GIT_REV"
else
GPU_TRACE_PERF_GIT_CHECKOUT="v$GPU_TRACE_PERF_VERSION"
fi
BASE_PWD=$PWD
mkdir -p /gpu-trace-perf
pushd /gpu-trace-perf
mkdir gpu-trace-perf-git
pushd gpu-trace-perf-git
git init
git remote add origin "$GPU_TRACE_PERF_GIT_URL"
git fetch --depth 1 origin "$GPU_TRACE_PERF_GIT_CHECKOUT"
git checkout FETCH_HEAD
for commit in "${commits_to_backport[@]}"
do
PATCH_URL="https://gitlab.freedesktop.org/anholt/gpu-trace-perf/-/commit/$commit.patch"
echo "Backport gpu-trace-perf commit $commit from $PATCH_URL"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | git am
done
for patch in "${patch_files[@]}"
do
echo "Apply patch to gpu-trace-perf from $patch"
git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
done
if [ -z "${RUST_TARGET:-}" ]; then
RUST_TARGET=""
fi
if [[ "$RUST_TARGET" != *-android ]]; then
# When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
# this variable when cross-compiling arm32 and build fails for zsys-sys.
# So unset the CC variable when cross-compiling for arm32.
SAVEDCC=${CC:-}
if [ "$RUST_TARGET" = "armv7-unknown-linux-gnueabihf" ]; then
unset CC
fi
cargo install --locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local \
${EXTRA_CARGO_ARGS:-} \
--path .
CC=$SAVEDCC
else
cargo install --locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local --version 2.10.0 \
cargo-ndk
rustup target add $RUST_TARGET
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target $RUST_TARGET build --release
mv target/$RUST_TARGET/release/gpu-trace-perf /gpu-trace-perf
cargo uninstall --locked \
--root /usr/local \
cargo-ndk
fi
popd
rm -rf gpu-trace-perf-git
popd
section_end gpu-trace-perf

View file

@ -3,7 +3,7 @@
set -ex
section_start kdl "Building kdl"
uncollapsed_section_start kdl "Building kdl"
KDL_REVISION="42218ba7297a28d64ddd1d4b5f200a60b3659d42"
KDL_CHECKOUT_DIR="/tmp/ci-kdl.git"

View file

@ -2,7 +2,7 @@
set -uex
section_start libclc "Building libclc"
uncollapsed_section_start libclc "Building libclc"
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
LLVM_TAG="llvmorg-15.0.7"

View file

@ -5,9 +5,9 @@
set -uex
section_start libdrm "Building libdrm"
uncollapsed_section_start libdrm "Building libdrm"
export LIBDRM_VERSION=libdrm-2.4.133
export LIBDRM_VERSION=libdrm-2.4.122
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
https://dri.freedesktop.org/libdrm/"$LIBDRM_VERSION".tar.xz

View file

@ -2,7 +2,7 @@
set -ex
section_start llvm-spirv "Building LLVM-SPIRV-Translator"
uncollapsed_section_start llvm-spirv "Building LLVM-SPIRV-Translator"
if [ "${LLVM_VERSION:?llvm version not set}" -ge 18 ]; then
VER="${LLVM_VERSION}.1.0"

View file

@ -13,7 +13,7 @@ section_start piglit "Building piglit"
# setting up the environment variables locally
ci_tag_build_time_check "PIGLIT_TAG"
REV="6fd29fe44f8857b876a67bee962919635f22ecc8"
REV="62d499d63d2b8b29a67efd9d93ed9b6a94d4950e"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit

View file

@ -6,7 +6,7 @@
set -ex
section_start shader-db "Building shader-db"
uncollapsed_section_start shader-db "Building shader-db"
pushd /usr/local
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1

View file

@ -10,7 +10,7 @@
set -uex
section_start skqp "Building SkQP"
uncollapsed_section_start skqp "Building SkQP"
SKQP_BRANCH=android-cts-12.1_r5

View file

@ -11,35 +11,43 @@ section_start vkd3d-proton "Building vkd3d-proton"
# setting up the environment variables locally
ci_tag_build_time_check "VKD3D_PROTON_TAG"
VKD3D_PROTON_COMMIT="97a834b8473e700f3cb15567ba5f90b2236ecfc5"
VKD3D_PROTON_COMMIT="9ca0b9c076a01b5b7c046cb9a4fa9834c555eed3"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
VKD3D_PROTON_WINE_DIR="/vkd3d-proton-wine64"
VKD3D_PROTON_S3_ARTIFACT="vkd3d-proton.tar.zst"
mkdir -p "$VKD3D_PROTON_SRC_DIR"
if [ ! -d "$VKD3D_PROTON_WINE_DIR" ]; then
echo "Fatal: Directory '$VKD3D_PROTON_WINE_DIR' does not exist. Aborting."
exit 1
fi
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b master --no-checkout "$VKD3D_PROTON_SRC_DIR"
pushd "$VKD3D_PROTON_SRC_DIR"
git init
git remote add origin https://github.com/HansKristian-Work/vkd3d-proton.git
git fetch --depth 1 origin "$VKD3D_PROTON_COMMIT"
git checkout FETCH_HEAD
git checkout "$VKD3D_PROTON_COMMIT"
git submodule update --init --recursive
git submodule update --recursive
meson setup build --buildtype release -D enable_tests=true \
-D c_args=-Wno-error=incompatible-pointer-types
# Build and install specifically the bits we want; gets rid of 24MB of
# unwanted files, keeping only 7.6MB of the three useful files.
for file in \
libs/d3d12/libvkd3d-proton-d3d12.so \
libs/d3d12core/libvkd3d-proton-d3d12core.so \
tests/d3d12 \
; do
ninja -C build "$file"
strip build/"$file"
install -Dm755 -t "${VKD3D_PROTON_DST_DIR}/$(dirname "$file")" build/"$file"
done
meson setup \
-D c_args=-Wno-error=incompatible-pointer-types \
-D enable_tests=true \
--buildtype release \
--prefix "$VKD3D_PROTON_DST_DIR" \
--strip \
--libdir "lib" \
"$VKD3D_PROTON_BUILD_DIR/build"
install -m755 -t "${VKD3D_PROTON_DST_DIR}/tests" tests/test-runner.sh
ninja -C "$VKD3D_PROTON_BUILD_DIR/build" install
install -m755 -t "${VKD3D_PROTON_DST_DIR}/" "$VKD3D_PROTON_BUILD_DIR/build/tests/d3d12"
mkdir "$VKD3D_PROTON_DST_DIR/tests"
cp \
"tests/test-runner.sh" \
"tests/d3d12_tests.h" \
"$VKD3D_PROTON_DST_DIR/tests/"
popd
# Archive and upload vkd3d-proton for use as a LAVA overlay, if the archive doesn't exist yet
@ -48,12 +56,13 @@ if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found vkd3d-proton at: ${FOUND_ARTIFACT_URL}, skipping upload"
else
echo "Uploaded vkd3d-proton not found, reuploading..."
tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}"
tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" "${VKD3D_PROTON_WINE_DIR#/}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$VKD3D_PROTON_S3_ARTIFACT" \
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
rm "$VKD3D_PROTON_S3_ARTIFACT"
fi
rm -rf "$VKD3D_PROTON_BUILD_DIR"
rm -rf "$VKD3D_PROTON_SRC_DIR"
section_end vkd3d-proton

View file

@ -6,9 +6,9 @@
set -uex
section_start vulkan-validation "Building Vulkan validation layers"
uncollapsed_section_start vulkan-validation "Building Vulkan validation layers"
VALIDATION_TAG="2ab77a01659e3e46d6ca8a25425b19b3425adb11"
VALIDATION_TAG="f384bd565c752f53aae10849aff6ffeb035d9ec4"
mkdir Vulkan-ValidationLayers
pushd Vulkan-ValidationLayers

View file

@ -3,11 +3,13 @@
set -uex
section_start wayland "Building Wayland"
uncollapsed_section_start wayland "Building Wayland"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# ALPINE_X86_64_BUILD_TAG
# DEBIAN_BUILD_TAG
# DEBIAN_TEST_BASE_TAG
# FEDORA_X86_64_BUILD_TAG
export LIBWAYLAND_VERSION="1.24.0"

View file

@ -1,174 +0,0 @@
#!/bin/bash
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_VK_TAG
set -eux
# This script sets up the wine components and the wine prefix that will be used
# when running wine. All of this gets bundled up into a tarball that's
# conditionally overlaid on LAVA runners when we need wine (container-based jobs
# will have the wine contents in them). Everything that's included in the
# WINE_S3_ARTIFACT (other than the debian wine packages) must go in this script,
# because that determines the cached hash it's uploaded under for LAVA runners.
section_start wine "Setting up Wine"
# Do a very early check to make sure the tag is correct without the need of
# setting up the environment variables locally
ci_tag_build_time_check "WINE_TAG"
export WINEPREFIX="/wineprefix"
export WINEDEBUG="-all"
# We don't want crash dialogs
cat >crashdialog.reg <<EOF
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
"ShowCrashDialog"=dword:00000000
EOF
# Set the wine prefix and disable the crash dialog
wine regedit crashdialog.reg
rm crashdialog.reg
# An immediate wine command may fail with: "${WINEPREFIX}: Not a
# valid wine prefix." and that is just spit because of checking
# the existance of the system.reg file, which fails. Just giving
# it a bit more of time for it to be created solves the problem
# ...
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
section_end wine
section_start wine-apitrace "Setting up Apitrace for Wine"
APITRACE_VERSION="14.0"
APITRACE_VERSION_DATE=""
APITRACE_ARCH=""
if [ "$DEBIAN_ARCH" == "arm64" ]; then
APITRACE_ARCH="-arm"
fi
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
"https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64${APITRACE_ARCH}.7z"
7zr x "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64${APITRACE_ARCH}.7z" \
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64${APITRACE_ARCH}/bin/apitrace.exe" \
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64${APITRACE_ARCH}/bin/d3dretrace.exe"
mv "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64${APITRACE_ARCH}" /apitrace-msvc-win64
rm "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64${APITRACE_ARCH}.7z"
section_end wine-apitrace
section_start DXVK "Installing DXVK"
set -uex
overrideDll() {
if ! wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /d native /f; then
echo -e "Failed to add override for $1"
exit 1
fi
}
dxvk_install_release() {
local DXVK_VERSION=${1:?}
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
cp "dxvk-${DXVK_VERSION}"/x64/*.dll "$WINEPREFIX/drive_c/windows/system32/"
rm -rf "dxvk-${DXVK_VERSION}"
rm dxvk-"${DXVK_VERSION}".tar.gz
}
# DXVK upstream only builds for x64/x32, so we snag arm64 binaries out of
# another project that packages it as arm64 and arm64ec.
dxvk_install_hangover() {
local DXVK_VERSION=${1:?}
local HANGOVER_VERSION=${2:?}
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o hangover_dlls.tar \
-O "https://github.com/AndreRH/hangover/releases/download/hangover-${HANGOVER_VERSION}/hangover_${HANGOVER_VERSION}_dlls.tar"
tar xpf hangover_dlls.tar
rm hangover_dlls.tar
tar xpf "dxvk-v${DXVK_VERSION}.tar.gz"
rm "dxvk-v${DXVK_VERSION}.tar.gz"
cp "dxvk-v${DXVK_VERSION}"/aarch64/*.dll "$WINEPREFIX/drive_c/windows/system32/"
rm -rf "dxvk-v${DXVK_VERSION}"
}
if [ "$DEBIAN_ARCH" != arm64 ]; then
# x32 and x64 binaries
dxvk_install_release "2.7.1"
else
# Use another packager's tarball for ARM binaries, since upstream DXVK doesn't
# generate them.
dxvk_install_hangover "2.7.1" "11.4"
fi
overrideDll d3d8
overrideDll d3d9
overrideDll d3d10core
overrideDll d3d11
overrideDll dxgi
# make sure the registry keys are flushed.
wineserver -k
section_end DXVK
section_start Renderdoc "Installing Renderdoc"
renderdoc_install_upstream() {
local RDC_VERSION=${1:?}
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://renderdoc.org/stable/${RDC_VERSION}/RenderDoc_${RDC_VERSION}_64.zip"
unzip "RenderDoc_${RDC_VERSION}_64.zip"
mv "RenderDoc_${RDC_VERSION}_64/" /renderdoc-win64
}
# renderdoc doesn't have ARM64 binaries, so grab a snapshot of a build from a Linaro dev.
renderdoc_install_arm() {
# anholt's copy is a snapshot of the google drive link from https://linaro.atlassian.net/wiki/spaces/WOAR/pages/30353719316/RenderDoc
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o renderdoc_arm64.7z \
-O "https://people.freedesktop.org/~anholt/renderdoc-arm64-anthony-linaro-snapshot.7z"
mkdir /renderdoc-win64
7z -o/renderdoc-win64 x renderdoc_arm64.7z
}
if [ "$DEBIAN_ARCH" != arm64 ]; then
renderdoc_install_upstream "1.43"
else
renderdoc_install_arm
fi
# Clean up large binaries we won't use.
rm /renderdoc-win64/qrenderdoc.exe
section_end Renderdoc
# Archive and upload wine for use as a LAVA overlay, if the archive doesn't exist yet
WINE_S3_ARTIFACT="wine.tar.zst"
ARTIFACT_PATH="${DATA_STORAGE_PATH}/wine/${DEBIAN_TEST_VK_TAG}-${WINE_TAG}/${CI_JOB_NAME}/${WINE_S3_ARTIFACT}"
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found wine at: ${FOUND_ARTIFACT_URL}, skipping upload"
else
echo "Uploaded wine not found, reuploading..."
tar --zstd -cf "$WINE_S3_ARTIFACT" -C / \
"${WINEPREFIX#/}" \
/apitrace-msvc-win64 \
/renderdoc-win64 \
/usr/lib/*/wine
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$WINE_S3_ARTIFACT" \
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
rm "$WINE_S3_ARTIFACT"
fi

View file

@ -3,7 +3,7 @@
set -uex
section_start xwayland "Building XWayland"
uncollapsed_section_start xwayland "Building XWayland"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:

View file

@ -25,12 +25,6 @@ DEPS=(
"libpciaccess-dev:$arch"
"libstdc++6:$arch"
"libvulkan-dev:$arch"
"libwayland-client0:$arch"
"libwayland-cursor0:$arch"
"libwayland-dev:$arch"
"libwayland-egl1:$arch"
"libwayland-egl-backend-dev:$arch"
"libwayland-server0:$arch"
"libx11-dev:$arch"
"libx11-xcb-dev:$arch"
"libxcb-dri2-0-dev:$arch"
@ -45,7 +39,6 @@ DEPS=(
"libxrandr-dev:$arch"
"libxshmfence-dev:$arch"
"libxxf86vm-dev:$arch"
"wayland-protocols:$arch"
)
dpkg --add-architecture $arch
@ -85,6 +78,8 @@ fi
# dependencies where we want a specific version
MULTIARCH_PATH=$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)
export EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/${MULTIARCH_PATH}"
. .gitlab-ci/container/build-wayland.sh
. .gitlab-ci/container/build-directx-headers.sh
apt-get purge -y "${EPHEMERAL[@]}"

View file

@ -53,7 +53,6 @@ DEPS=(
libexpat1-dev
libflatbuffers-dev
"libllvm${LLVM_VERSION}"
libpng-dev
libvulkan-dev
libx11-dev
libx11-xcb-dev
@ -70,7 +69,6 @@ DEPS=(
libxshmfence-dev
libxtensor-dev
libxxf86vm-dev
libwayland-bin
libwayland-dev
libwayland-egl-backend-dev
"llvm-${LLVM_VERSION}-dev"
@ -86,7 +84,6 @@ DEPS=(
python3-venv
shellcheck
u-boot-tools
wayland-protocols
xz-utils
yamllint
zlib1g-dev
@ -112,6 +109,8 @@ arch=armhf
. .gitlab-ci/container/build-mold.sh
. .gitlab-ci/container/build-wayland.sh
. .gitlab-ci/container/build-llvm-spirv.sh
. .gitlab-ci/container/build-libclc.sh

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
ANDROID_ARCH=arm64 \
BUILD_CONTAINER=true \
TEST_CONTAINER=false \
DEBIAN_ARCH=amd64 \
. .gitlab-ci/container/debian/test-android.sh

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
ANDROID_ARCH=arm64 \
BUILD_CONTAINER=false \
TEST_CONTAINER=true \
DEBIAN_ARCH=arm64 \
. .gitlab-ci/container/debian/test-android.sh

View file

@ -185,7 +185,7 @@ debian/s390x_build:
LLVM_VERSION: &debian-android-llvm 19
CUTTLEFISH_PROJECT_PATH: gfx-ci/android/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS: mesa-venus
CUTTLEFISH_BUILD_NUMBER: 20260427.001
CUTTLEFISH_BUILD_NUMBER: 20260108.001
# Android NDK cross-build image
debian/android_build:
@ -527,51 +527,6 @@ debian/arm64_test-vk:
- job: debian/arm64_test-vk
optional: true
# Debian-based x86_64 builder for Android test tools.
# ANGLE, dEQP, and deqp-runner are built here since Google does not provide
# an arm64 NDK. Artifacts are then copied into the arm64 test image.
debian/arm64_test-android-tools:
extends:
- .android-variables
- .use-debian/x86_64_test-base # NOT a mistake!
- .container-builds-android
variables:
MESA_IMAGE_TAG: &debian-arm64_test-android ${DEBIAN_TEST_ANDROID_TAG}
# Debian based arm64 test image for Android
debian/arm64_test-android:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .android-variables
- .use-debian/arm64_test-base
- .container-builds-android
- .export-container
variables:
MESA_IMAGE_TAG: *debian-arm64_test-android
needs:
- !reference [.use-debian/arm64_test-base, needs]
- job: debian/arm64_test-android-tools
optional: true
.use-debian/arm64_test-android:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .android-variables
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm64_test-base
MESA_IMAGE_PATH: "debian/arm64_test-android"
MESA_IMAGE_TAG: *debian-arm64_test-android
needs:
- job: sanity
optional: true
- job: debian/arm64_test-android
optional: true
- job: debian/arm64_test-android-tools
optional: true
# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
.debian/baremetal_arm_test:
extends:

View file

@ -1,261 +0,0 @@
#!/usr/bin/env bash
# The relative paths in this file only become valid at runtime.
# shellcheck disable=SC1091
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
# Google provides Android NDK for x86_64 hosts only; there is no arm64-native NDK for Linux.
# Thus, we must cross-compile arm64 test tools on x86_64 runners.
# Container Variants Overview:
# - x86_64_test-android: Comprehensive environment for x86_64 testing.
# - arm64_test-android-tools: Used to cross-compile arm64 binaries (dEQP, ANGLE, etc)
# on x86_64 runners because the Android NDK only provides x86_64 host binaries.
# - arm64_test-android: Fetches components built by the 'tools' container to run
# tests on arm64 devices where full builds are unsupported.
#
# | Component | x86_64_test-android | arm64_test-android-tools | arm64_test-android |
# | :------------------: | :-----------------: | :----------------------: | :----------------: |
# | Runner arch | x86_64 | x86_64 | arm64 |
# | Android NDK | ✔ | ✔ | |
# | ANGLE / dEQP | ✔ (Built) | ✔ (Built) | ✔ (Downloaded) |
# | eglinfo / vulkaninfo | ✔ | | ✔ |
# | Cuttlefish / CTS | ✔ (Included) | | (LAVA overlay) |
# | Runtime Deps (AAPT) | ✔ | | ✔ |
#
# | Logic Variable | x86_64_test-android | arm64_test-android-tools | arm64_test-android |
# | :------------------: | :-----------------: | :----------------------: | :----------------: |
# | BUILD_CONTAINER | ✔ | ✔ | |
# | TEST_CONTAINER | ✔ | | ✔ |
if "${BUILD_CONTAINER}"; then
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
binutils-aarch64-linux-gnu
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
unzip
)
else
# We only need the build tools in build containers
EPHEMERAL=(
unzip
)
fi
if "${TEST_CONTAINER}"; then
# We only need the Cuttlefish runtime dependencies in test containers
DEPS=(
aapt
cuttlefish-base
cuttlefish-user
iproute2
)
# Android CTS only comes with x86_64 Java bundled, so we need to install it on arm64
if [ "${DEBIAN_ARCH}" = "arm64" ]; then
DEPS+=(openjdk-21-jdk-headless)
fi
else
DEPS=()
fi
apt-get install -y --no-remove --no-install-recommends \
"${DEPS[@]}" "${EPHEMERAL[@]}"
############### Building ...
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
if [ "${ANDROID_ARCH}" = "x86_64" ]; then
export RUST_TARGET=x86_64-linux-android
export ANDROID_ABI=x86_64
export ANGLE_ARCH=x64
fi
if [ "${ANDROID_ARCH}" = "arm64" ]; then
export RUST_TARGET=aarch64-linux-android
export ANDROID_ABI=arm64-v8a
export ANGLE_ARCH=arm64
export STRIP_CMD=aarch64-linux-gnu-strip
fi
############### Downloading Android tools
section_start android-tools "Downloading Android tools"
# Download pre-built Android utility binaries (eglinfo, vulkaninfo) for test environments
if "${TEST_CONTAINER}"; then
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-${ANDROID_ARCH}"
chmod +x eglinfo
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-${ANDROID_ARCH}"
chmod +x vulkaninfo
popd
fi
# Fetch cross-compiled test tools (ANGLE, dEQP) for the arm64 runtime.
# These were built in the 'tools' container due to NDK host limitations.
if ! "${BUILD_CONTAINER}"; then
curl-with-retry -O "https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${DEBIAN_TEST_ANDROID_TAG}/android-tools-arm64.tar.zst"
tar --zstd -xf android-tools-arm64.tar.zst -C /
rm android-tools-arm64.tar.zst
fi
section_end android-tools
############### Downloading NDK for native builds for the guest ...
# Skip NDK setup and builds for test-only runtimes
if "${BUILD_CONTAINER}"; then
section_start android-ndk "Downloading Android NDK"
# Fetch the NDK and extract just the toolchain we want.
ndk="android-ndk-${ANDROID_NDK_VERSION}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "$ndk.zip" "https://dl.google.com/android/repository/$ndk-linux.zip"
unzip -q -d / "$ndk.zip"
rm "$ndk.zip"
section_end android-ndk
############### Build ANGLE
ANGLE_TARGET=android \
. .gitlab-ci/container/build-angle.sh
############### Build dEQP runner
export ANDROID_NDK_HOME=/$ndk
. .gitlab-ci/container/build-rust.sh test
. .gitlab-ci/container/build-deqp-runner.sh
# Properly uninstall rustup including cargo and init scripts on shells
rustup self uninstall -y
############### Build dEQP
DEQP_API=tools \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=${ANDROID_ABI} -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=${ANDROID_ABI} -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=${ANDROID_ABI} -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
rm -rf /VK-GL-CTS
fi
############### Downloading Cuttlefish resources ...
# We only need to download the Cuttlefish image and host tools for the shared runners on x86_64, otherwise they are deployed as LAVA overlays
if [ "${ANDROID_ARCH}" = "x86_64" ]; then
section_start cuttlefish "Downloading and setting up Cuttlefish"
mkdir /cuttlefish
pushd /cuttlefish
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_${ANDROID_ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
tar --zstd -xvf "aosp_cf_${ANDROID_ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
rm "aosp_cf_${ANDROID_ARCH}_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package-${ANDROID_ARCH}.tar.zst"
tar --zst -xvf "cvd-host_package-${ANDROID_ARCH}.tar.zst"
rm "cvd-host_package-${ANDROID_ARCH}.tar.zst"
popd
section_end cuttlefish
fi
if "${TEST_CONTAINER}"; then
addgroup --system kvm
usermod -a -G kvm,cvdnetwork root
fi
############### Downloading Android CTS
if "${TEST_CONTAINER}"; then
. .gitlab-ci/container/build-android-cts.sh
fi
############### Packaging arm64 tools for S3 upload
# Upload cross-compiled arm64 binaries to S3 for consumption by the test runtime container
if ! "${TEST_CONTAINER}"; then
section_start android-tools-arm64 "Uploading Android tools"
TOOL_DIRS=(
/angle
/deqp-gles
/deqp-runner
/deqp-tools
/deqp-vk
/mesa-ci-build-tag
)
tar --zstd -cf android-tools-arm64.tar.zst "${TOOL_DIRS[@]}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "android-tools-arm64.tar.zst" \
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${DEBIAN_TEST_ANDROID_TAG}/android-tools-arm64.tar.zst"
section_end android-tools-arm64
fi
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
if "${BUILD_CONTAINER}"; then
rm -rf "/${ndk:?}"
fi
# We currently only have LAVA jobs on arm64, where we deploy Android CTS as a LAVA overlay.
# Remove it from the container image to save some space.
if "${TEST_CONTAINER}" && [ "${DEBIAN_ARCH}" = "arm64" ]; then
rm -rf "/android-cts"
fi
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup
############### Remove unused packages
. .gitlab-ci/container/strip-rootfs.sh

View file

@ -11,7 +11,7 @@ set -e
set -o xtrace
section_start debian_setup "Base Debian system setup"
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
@ -89,6 +89,7 @@ EPHEMERAL=(
python3-setuptools
python3-venv
python3-wheel
wayland-protocols
xz-utils
)
@ -123,11 +124,7 @@ DEPS=(
libtirpc3t64
libubsan1
libvulkan1
libwayland-bin
libwayland-client0
libwayland-cursor0
libwayland-dev
libwayland-egl1
libwayland-server0
libxcb-composite0
libxcb-dri2-0
@ -160,7 +157,6 @@ DEPS=(
sysvinit-core
vulkan-tools
waffle-utils
wayland-protocols
xinit
xserver-common
xserver-xorg-video-amdgpu
@ -213,6 +209,10 @@ section_end debian_setup
. .gitlab-ci/container/build-libclc.sh
############### Build Wayland
. .gitlab-ci/container/build-wayland.sh
############### Build Weston
. .gitlab-ci/container/build-weston.sh
@ -232,21 +232,17 @@ if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-crosvm.sh
fi
############### Build dEQP runner and gpu-trace-perf
############### Build dEQP runner
. .gitlab-ci/container/build-deqp-runner.sh
############### Build gpu-trace-perf
. .gitlab-ci/container/build-gpu-trace-perf.sh
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"

View file

@ -7,7 +7,7 @@ set -e
set -o xtrace
section_start debian_setup "Base Debian system setup"
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
: "${LLVM_VERSION:?llvm version not set!}"
@ -123,7 +123,7 @@ fi
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"

View file

@ -9,7 +9,7 @@ set -e
set -o xtrace
section_start debian_setup "Base Debian system setup"
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
@ -47,7 +47,6 @@ EPHEMERAL=(
python3-pip
python3-setuptools
python3-wheel
unzip
xz-utils
)
@ -109,23 +108,18 @@ if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-gfxreconstruct.sh
fi
############### Build Wine
# Wine isn't available on 32-bit ARM
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-wine.sh
fi
############### Build VKD3D-Proton
# Wine isn't available on 32-bit ARM
if [ "$DEBIAN_ARCH" != "armhf" ]; then
uncollapsed_section_switch proton "Installing Proton (Wine/D3DVK emulation)"
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
. .gitlab-ci/container/build-vkd3d-proton.sh
fi
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"

View file

@ -50,7 +50,7 @@ DEPS=(
libepoxy-dev
libexpat1-dev
libflatbuffers-dev
libglfw3-dev
libgtk-3-dev
"libllvm${LLVM_VERSION}"
libpciaccess-dev
libunwind-dev

View file

@ -35,7 +35,6 @@ DEPS=(
libgbm-dev
libglvnd-dev
liblua5.3-dev
libpng-dev
libxcb-dri2-0-dev
libxcb-dri3-dev
libxcb-glx0-dev
@ -46,9 +45,6 @@ DEPS=(
libxcb-xfixes0-dev
libxcb1-dev
libxml2-dev
libwayland-bin
libwayland-dev
libwayland-egl-backend-dev
"llvm-${LLVM_VERSION}-dev"
ocl-icd-opencl-dev
python3-pip
@ -56,7 +52,6 @@ DEPS=(
spirv-tools
strace
time
wayland-protocols
zstd
)
@ -81,6 +76,8 @@ tar -xvf $XORGMACROS_VERSION.tar.bz2 && rm $XORGMACROS_VERSION.tar.bz2
cd $XORGMACROS_VERSION; ./configure; make install; cd ..
rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/build-wayland.sh
. .gitlab-ci/container/build-shader-db.sh
. .gitlab-ci/container/build-directx-headers.sh

View file

@ -1,7 +1,157 @@
#!/usr/bin/env bash
# The relative paths in this file only become valid at runtime.
# shellcheck disable=SC1091
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
ANDROID_ARCH=x86_64 \
BUILD_CONTAINER=true \
TEST_CONTAINER=true \
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
unzip
)
DEPS=(
aapt
cuttlefish-base
cuttlefish-user
iproute2
)
apt-get install -y --no-remove --no-install-recommends \
"${DEPS[@]}" "${EPHEMERAL[@]}"
############### Building ...
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
############### Downloading Android tools
section_start android-tools "Downloading Android tools"
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-x86_64"
chmod +x eglinfo
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-x86_64"
chmod +x vulkaninfo
popd
section_end android-tools
############### Downloading NDK for native builds for the guest ...
section_start android-ndk "Downloading Android NDK"
# Fetch the NDK and extract just the toolchain we want.
ndk="android-ndk-${ANDROID_NDK_VERSION}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "$ndk.zip" "https://dl.google.com/android/repository/$ndk-linux.zip"
unzip -q -d / "$ndk.zip"
rm "$ndk.zip"
section_end android-ndk
############### Build ANGLE
ANGLE_TARGET=android \
DEBIAN_ARCH=amd64 \
. .gitlab-ci/container/debian/test-android.sh
. .gitlab-ci/container/build-angle.sh
############### Build dEQP runner
export ANDROID_NDK_HOME=/$ndk
export RUST_TARGET=x86_64-linux-android
. .gitlab-ci/container/build-rust.sh test
. .gitlab-ci/container/build-deqp-runner.sh
# Properly uninstall rustup including cargo and init scripts on shells
rustup self uninstall -y
############### Build dEQP
DEQP_API=tools \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_ANDROID_EXE_LOGCAT=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
rm -rf /VK-GL-CTS
############### Downloading Cuttlefish resources ...
section_start cuttlefish "Downloading and setting up Cuttlefish"
mkdir /cuttlefish
pushd /cuttlefish
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
tar --zstd -xvf aosp_cf_x86_64_only_phone-img-"$CUTTLEFISH_BUILD_NUMBER".tar.zst
rm aosp_cf_x86_64_only_phone-img-"$CUTTLEFISH_BUILD_NUMBER".tar.zst
ls -lhS ./*
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package-x86_64.tar.zst"
tar --zst -xvf cvd-host_package-x86_64.tar.zst
rm cvd-host_package-x86_64.tar.zst
popd
addgroup --system kvm
usermod -a -G kvm,cvdnetwork root
section_end cuttlefish
############### Downloading Android CTS
. .gitlab-ci/container/build-android-cts.sh
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
rm -rf "/${ndk:?}"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup
############### Remove unused packages
. .gitlab-ci/container/strip-rootfs.sh

View file

@ -48,13 +48,10 @@ buildah_export() {
# These components will be provided via LAVA overlays,
# so remove them from the core rootfs
rm -rf "${mountpoint}/android-cts"
rm -rf "${mountpoint}/apitrace-msvc-win64"
rm -rf "${mountpoint}/cuttlefish"
rm -rf "${mountpoint}/fluster/resources"
rm -rf "${mountpoint}/usr/lib/*/wine"
rm -rf "${mountpoint}/renderdoc-win64"
rm -rf "${mountpoint}/vkd3d-proton-tests"
rm -rf "${mountpoint}/wineprefix"
rm -rf "${mountpoint}/vkd3d-proton-wine64"
# Compress to zstd
ZSTD_CLEVEL=10 tar -C "$mountpoint" -I zstd -cf "$2" .

View file

@ -38,7 +38,6 @@ DEPS=(
gettext
glslang
kernel-headers
libstdc++-static
llvm-devel
ninja-build
"pkgconfig(LLVMSPIRVLib)"

View file

@ -20,6 +20,8 @@
extends:
- .set-image
- .incorporate-base-tag+templates-commit
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
.container:
stage: container
@ -40,7 +42,7 @@
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
# no need to pull the whole repo to build the container image
GIT_STRATEGY: none
CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANDROID_CTS $CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT $CI_BUILD_COMPONENTS_VKD3D_PROTON $CI_BUILD_COMPONENTS_WINE"
CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANDROID_CTS $CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT $CI_BUILD_COMPONENTS_VKD3D_PROTON"
.container-builds-angle:
variables:
@ -67,11 +69,6 @@
VKD3D_PROTON_TAG: "${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}"
CI_BUILD_COMPONENTS_VKD3D_PROTON: vkd3d-proton
.container-builds-wine:
variables:
WINE_TAG: "${CONDITIONAL_BUILD_WINE_TAG}"
CI_BUILD_COMPONENTS_WINE: wine
.container-builds-android-cts:
variables:
ANDROID_CTS_TAG: "${CONDITIONAL_BUILD_ANDROID_CTS_TAG}"
@ -103,7 +100,6 @@
extends:
- .container-builds-piglit
- .container-builds-vkd3d-proton
- .container-builds-wine
# Export the container rootfs and upload it to S3
.export-container:

View file

@ -0,0 +1,16 @@
#!/bin/bash
set -ue
APITRACE_VERSION="11.1"
APITRACE_VERSION_DATE=""
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
"https://github.com/apitrace/apitrace/releases/download/${APITRACE_VERSION}/apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"
7zr x "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z" \
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/apitrace.exe" \
"apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64/bin/d3dretrace.exe"
mv "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64" /apitrace-msvc-win64
rm "apitrace-${APITRACE_VERSION}${APITRACE_VERSION_DATE}-win64.7z"

View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -ue
overrideDll() {
if ! wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /d native /f; then
echo -e "Failed to add override for $1"
exit 1
fi
}
dxvk_install_release() {
local DXVK_VERSION=${1:?}
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://github.com/doitsujin/dxvk/releases/download/v${DXVK_VERSION}/dxvk-${DXVK_VERSION}.tar.gz"
tar xzpf dxvk-"${DXVK_VERSION}".tar.gz
cp "dxvk-${DXVK_VERSION}"/x64/*.dll "$WINEPREFIX/drive_c/windows/system32/"
overrideDll d3d9
overrideDll d3d10core
overrideDll d3d11
overrideDll dxgi
rm -rf "dxvk-${DXVK_VERSION}"
rm dxvk-"${DXVK_VERSION}".tar.gz
}
dxvk_install_release "2.1"

View file

@ -1,527 +0,0 @@
From e5840a8b8b2a4631a6a7ceab7099657298c9b14c Mon Sep 17 00:00:00 2001
From: Ricardo Garcia <rgarcia@igalia.com>
Date: Fri, 27 Mar 2026 12:22:16 +0100
Subject: [PATCH] Delay SPIR-V assembly type test case creation to init method
SPIR-V type tests have a simple problem: when creating a test group, the
test group itself allocates a lot of data to be used as inputs and
expected outputs for that subgroup of tests. This data is saved in a
shared resource buffer inside test case nodes to avoid duplicating too
much data between the different subcases that will use it, but it's
still a lot.
Untangling the buffer creation logic is quite challenging, because data
generation happens in routines that mix that with SPIR-V assembly
creation and other aspects, and depends on a wide variety of parameters,
so deferring those allocations or the data generation routines to
test instance creation time is very complex.
The end result is that, before this commit, peak memory usage for
deqp-vk when expanding the test hierarchy is 920MB, much of that coming
from SPIR-V assembly type tests.
Taking advantage of the fact that each test group does not contain a lot
of tests and some of them share the same inputs, this commit applies a
couple of simple tricks to delay test case creation until init() is
called for each test group, without heavily refactoring the existing
test creation code. The automatic call to deinit() when exiting test
groups will delete the children nodes automatically, decreasing their
lifetimes considerably.
The result is that, instead of having all buffers allocated at the same
time when exploring the SPIR-V type tests hierarchy, a small amount of
them are allocated when expanding a small subgroup of tests, and
deallocated before the next subgroup is created.
With this change, peak memory usage goes down to around 380MB, from the
initial 920MB.
Memory has been measured with valgrind's massif tool. A before/after
picture follows, in which the horizontal axis is "time" and the vertical
axis is allocated memory.
BEFORE:
------------------------------------------------------------------------
Command: ./deqp-vk --deqp-runmode=txt-trie
Massif arguments: (none)
ms_print arguments: massif.out.164123
------------------------------------------------------------------------
921.9 MB
^ #
| #
| #
| #
| #
| #
| #
| #
| #
| @@#
| @ #
| @ #
| @@ #
| @ @@ #
| @ @@ #
| @ : @@ # :
| @@ :: :: :@@ # ::@
| @@ ::::::::::::: :: :@@ # : :: ::@:::
| ::@@:::::::::::::::@::::@@ #::::: @:::::::@:::@:: :: ::@::::
| :@::@@:::::::::::::::@::::@@ #: ::: @::: :::@:::@:::::@: ::@:::::@:
+---------------------------------------------------------------------->
0 481.1 Gi
AFTER:
------------------------------------------------------------------------
Command: ./deqp-vk --deqp-runmode=txt-trie
Massif arguments: (none)
ms_print arguments: massif.out.656688
------------------------------------------------------------------------
379.7 MB
^ #
| #
| #
| #
| #
| #
| #
| #
| :: # :
| : : # ::
| @ : : : :# ::
| @ : : : :# ::::
| @ : ::: ::::::: :: :# :::
| @ : ::::: : :: : :#::: ::: ::: :
| @:::: ::::: : :: :: ::#: ::: :::::: :: ::: :::
| @@: :: ::::: : :: :: ::#: ::: :: : ::: @@::@: : : ::: ::
| ::@@: :: ::::: : :: :: ::#: ::: :: : ::: @ : @::::::::: ::: :: @
| :: @@: :: ::::: : :: :: ::#: ::: :: : ::: @ : @:::: ::: ::: :: @:
| :::: @@: :: ::::: : :: :: ::#: ::: :: : ::: @ : @:::: ::: : ::: :: @::
| : :: @@: :: ::::: : :: :: ::#: ::: :: : ::: @ : @:::: ::: ::::: :: @::
+---------------------------------------------------------------------->
0 484.3 Gi
Affects:
dEQP-VK.spirv_assembly.type.*
Components: Vulkan
VK-GL-CTS issue: 6420
Change-Id: If2b83e26b7c1c0dc85dbd269d443bae2bd5138e1
(cherry picked from commit efd184e1d58c6aff6b8e7812fa1cf23931b0b4d7,
hacked by anholt to apply even without 1ff671975b48 ("Tests for
VK_EXT_shader_long_vector")
---
.../vktPipelineExtendedDynamicStateTests.cpp | 1 +
...vktPipelineShaderModuleIdentifierTests.cpp | 1 +
.../spirv_assembly/vktSpvAsmTypeTests.cpp | 224 +++++++++++++++---
.../vktSynchronizationSignalOrderTests.cpp | 2 +
...tSynchronizationTimelineSemaphoreTests.cpp | 2 +
.../vktTransformFeedbackSimpleTests.cpp | 1 +
.../modules/vulkan/vktTestGroupUtil.hpp | 3 +
7 files changed, 207 insertions(+), 27 deletions(-)
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineExtendedDynamicStateTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineExtendedDynamicStateTests.cpp
index a2b1a4952700..257d2b1a9dcd 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineExtendedDynamicStateTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineExtendedDynamicStateTests.cpp
@@ -6953,6 +6953,7 @@ public:
void deinit(void) override
{
cleanupDevices();
+ tcu::TestCaseGroup::deinit();
}
};
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineShaderModuleIdentifierTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineShaderModuleIdentifierTests.cpp
index 3aec2a33c365..e47b039fa6cd 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineShaderModuleIdentifierTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineShaderModuleIdentifierTests.cpp
@@ -3729,6 +3729,7 @@ public:
void deinit(void) override
{
deviceHelperManage(nullptr, DeviceHelperOp::DELETE);
+ tcu::TestCaseGroup::deinit();
}
};
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmTypeTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmTypeTests.cpp
index f20ce2437b36..712b39a864d4 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmTypeTests.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmTypeTests.cpp
@@ -891,20 +891,171 @@ public:
SpvAsmTypeTests(tcu::TestContext &testCtx, const char *name, const char *deviceFeature, const char *spirvCapability,
const char *spirvType, InputType inputType, uint32_t typeSize, uint32_t vectorSize);
~SpvAsmTypeTests(void);
+
void createTests(const char *testName, uint32_t spirvOperation, OpUnaryFuncType op, UnaryFilterFuncType filter,
InputRange inputRange, InputWidth inputWidth, const char *spirvExtension,
- const bool returnHighPart = false);
+ const bool returnHighPart = false)
+ {
+ // Defer creation to ::init().
+ m_unaryTestsParams.emplace_back(testName, spirvOperation, op, filter, inputRange, inputWidth, spirvExtension,
+ returnHighPart);
+ }
+
void createTests(const char *testName, uint32_t spirvOperation, OpBinaryFuncType op, BinaryFilterFuncType filter,
InputRange inputRange, InputWidth inputWidth, const char *spirvExtension,
- const bool returnHighPart = false);
+ const bool returnHighPart = false)
+ {
+ // Defer creation to ::init().
+ m_binaryTestsParams.emplace_back(testName, spirvOperation, op, filter, inputRange, inputWidth, spirvExtension,
+ returnHighPart);
+ }
+
void createTests(const char *testName, uint32_t spirvOperation, OpTernaryFuncType op, TernaryFilterFuncType filter,
InputRange inputRange, InputWidth inputWidth, const char *spirvExtension,
- const bool returnHighPart = false);
+ const bool returnHighPart = false)
+ {
+ // Defer creation to ::init().
+ m_ternaryTestsParams.emplace_back(testName, spirvOperation, op, filter, inputRange, inputWidth, spirvExtension,
+ returnHighPart);
+ }
+
void createTests(const char *testName, uint32_t spirvOperation, OpQuaternaryFuncType op,
QuaternaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
- const char *spirvExtension, const bool returnHighPart = false);
+ const char *spirvExtension, const bool returnHighPart = false)
+ {
+ // Defer creation to ::init().
+ m_quaternaryTestsParams.emplace_back(testName, spirvOperation, op, filter, inputRange, inputWidth,
+ spirvExtension, returnHighPart);
+ }
+
+protected:
+ struct UnaryTestsCreationParams
+ {
+ UnaryTestsCreationParams(const char *testName_, uint32_t spirvOperation_, OpUnaryFuncType op_,
+ UnaryFilterFuncType filter_, InputRange inputRange_, InputWidth inputWidth_,
+ const char *spirvExtension_, const bool returnHighPart_)
+ : testName(testName_)
+ , spirvOperation(spirvOperation_)
+ , op(op_)
+ , filter(filter_)
+ , inputRange(inputRange_)
+ , inputWidth(inputWidth_)
+ , spirvExtension(spirvExtension_ ? spirvExtension_ : "")
+ , returnHighPart(returnHighPart_)
+ {
+ }
+
+ std::string testName;
+ uint32_t spirvOperation;
+ OpUnaryFuncType op;
+ UnaryFilterFuncType filter;
+ InputRange inputRange;
+ InputWidth inputWidth;
+ std::string spirvExtension;
+ bool returnHighPart;
+ };
+
+ struct BinaryTestsCreationParams
+ {
+ BinaryTestsCreationParams(const char *testName_, uint32_t spirvOperation_, OpBinaryFuncType op_,
+ BinaryFilterFuncType filter_, InputRange inputRange_, InputWidth inputWidth_,
+ const char *spirvExtension_, const bool returnHighPart_)
+ : testName(testName_)
+ , spirvOperation(spirvOperation_)
+ , op(op_)
+ , filter(filter_)
+ , inputRange(inputRange_)
+ , inputWidth(inputWidth_)
+ , spirvExtension(spirvExtension_ ? spirvExtension_ : "")
+ , returnHighPart(returnHighPart_)
+ {
+ }
+
+ std::string testName;
+ uint32_t spirvOperation;
+ OpBinaryFuncType op;
+ BinaryFilterFuncType filter;
+ InputRange inputRange;
+ InputWidth inputWidth;
+ std::string spirvExtension;
+ bool returnHighPart;
+ };
+
+ struct TernaryTestsCreationParams
+ {
+ TernaryTestsCreationParams(const char *testName_, uint32_t spirvOperation_, OpTernaryFuncType op_,
+ TernaryFilterFuncType filter_, InputRange inputRange_, InputWidth inputWidth_,
+ const char *spirvExtension_, const bool returnHighPart_)
+ : testName(testName_)
+ , spirvOperation(spirvOperation_)
+ , op(op_)
+ , filter(filter_)
+ , inputRange(inputRange_)
+ , inputWidth(inputWidth_)
+ , spirvExtension(spirvExtension_ ? spirvExtension_ : "")
+ , returnHighPart(returnHighPart_)
+ {
+ }
+
+ std::string testName;
+ uint32_t spirvOperation;
+ OpTernaryFuncType op;
+ TernaryFilterFuncType filter;
+ InputRange inputRange;
+ InputWidth inputWidth;
+ std::string spirvExtension;
+ bool returnHighPart;
+ };
+
+ struct QuaternaryTestsCreationParams
+ {
+ QuaternaryTestsCreationParams(const char *testName_, uint32_t spirvOperation_, OpQuaternaryFuncType op_,
+ QuaternaryFilterFuncType filter_, InputRange inputRange_, InputWidth inputWidth_,
+ const char *spirvExtension_, const bool returnHighPart_)
+ : testName(testName_)
+ , spirvOperation(spirvOperation_)
+ , op(op_)
+ , filter(filter_)
+ , inputRange(inputRange_)
+ , inputWidth(inputWidth_)
+ , spirvExtension(spirvExtension_ ? spirvExtension_ : "")
+ , returnHighPart(returnHighPart_)
+ {
+ }
+
+ std::string testName;
+ uint32_t spirvOperation;
+ OpQuaternaryFuncType op;
+ QuaternaryFilterFuncType filter;
+ InputRange inputRange;
+ InputWidth inputWidth;
+ std::string spirvExtension;
+ bool returnHighPart;
+ };
+
+ std::vector<UnaryTestsCreationParams> m_unaryTestsParams;
+ std::vector<BinaryTestsCreationParams> m_binaryTestsParams;
+ std::vector<TernaryTestsCreationParams> m_ternaryTestsParams;
+ std::vector<QuaternaryTestsCreationParams> m_quaternaryTestsParams;
+
+protected:
+ void doCreateTests(const char *testName, uint32_t spirvOperation, OpUnaryFuncType op, UnaryFilterFuncType filter,
+ InputRange inputRange, InputWidth inputWidth, const char *spirvExtension,
+ const bool returnHighPart);
+ void doCreateTests(const char *testName, uint32_t spirvOperation, OpBinaryFuncType op, BinaryFilterFuncType filter,
+ InputRange inputRange, InputWidth inputWidth, const char *spirvExtension,
+ const bool returnHighPart);
+ void doCreateTests(const char *testName, uint32_t spirvOperation, OpTernaryFuncType op,
+ TernaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
+ const char *spirvExtension, const bool returnHighPart);
+ void doCreateTests(const char *testName, uint32_t spirvOperation, OpQuaternaryFuncType op,
+ QuaternaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
+ const char *spirvExtension, const bool returnHighPart);
+
+public:
void createSwitchTests(void);
- void getConstantDataset(vector<T> inputDataset, vector<T> &outputDataset, uint32_t spirvOperation);
+
+ void getConstantDataset(const vector<T> &inputDataset, vector<T> &outputDataset, uint32_t spirvOperation);
virtual void getDataset(vector<T> &input, uint32_t numElements) = 0;
virtual void pushResource(vector<Resource> &resource, const vector<T> &data) = 0;
@@ -923,6 +1074,33 @@ public:
static string replicate(const std::string &replicant, const uint32_t count);
+public:
+ void init(void) override
+ {
+ for (const auto &params : m_unaryTestsParams)
+ doCreateTests(params.testName.c_str(), params.spirvOperation, params.op, params.filter, params.inputRange,
+ params.inputWidth, (params.spirvExtension.empty() ? nullptr : params.spirvExtension.c_str()),
+ params.returnHighPart);
+
+ for (const auto &params : m_binaryTestsParams)
+ doCreateTests(params.testName.c_str(), params.spirvOperation, params.op, params.filter, params.inputRange,
+ params.inputWidth, (params.spirvExtension.empty() ? nullptr : params.spirvExtension.c_str()),
+ params.returnHighPart);
+
+ for (const auto &params : m_ternaryTestsParams)
+ doCreateTests(params.testName.c_str(), params.spirvOperation, params.op, params.filter, params.inputRange,
+ params.inputWidth, (params.spirvExtension.empty() ? nullptr : params.spirvExtension.c_str()),
+ params.returnHighPart);
+
+ for (const auto &params : m_quaternaryTestsParams)
+ doCreateTests(params.testName.c_str(), params.spirvOperation, params.op, params.filter, params.inputRange,
+ params.inputWidth, (params.spirvExtension.empty() ? nullptr : params.spirvExtension.c_str()),
+ params.returnHighPart);
+
+ if (m_vectorSize == 1)
+ createSwitchTests();
+ }
+
protected:
de::Random m_rnd;
T m_cases[3];
@@ -1916,9 +2094,9 @@ string getVariableStr(vector<T> &dataset, const char *spirvType, uint32_t spirvO
}
template <class T>
-void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperation, OpUnaryFuncType operation,
- UnaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
- const char *spirvExtension, const bool returnHighPart)
+void SpvAsmTypeTests<T>::doCreateTests(const char *testName, uint32_t spirvOperation, OpUnaryFuncType operation,
+ UnaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
+ const char *spirvExtension, const bool returnHighPart)
{
DE_ASSERT(!isBooleanResultTest(spirvOperation));
@@ -2029,9 +2207,9 @@ void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperati
}
template <class T>
-void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperation, OpBinaryFuncType operation,
- BinaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
- const char *spirvExtension, const bool returnHighPart)
+void SpvAsmTypeTests<T>::doCreateTests(const char *testName, uint32_t spirvOperation, OpBinaryFuncType operation,
+ BinaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
+ const char *spirvExtension, const bool returnHighPart)
{
const bool isBoolean = isBooleanResultTest(spirvOperation);
const string resultName = (returnHighPart || isBoolean) ? "%op_result_pre" : "%op_result";
@@ -2098,9 +2276,9 @@ void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperati
}
template <class T>
-void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperation, OpTernaryFuncType operation,
- TernaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
- const char *spirvExtension, const bool returnHighPart)
+void SpvAsmTypeTests<T>::doCreateTests(const char *testName, uint32_t spirvOperation, OpTernaryFuncType operation,
+ TernaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
+ const char *spirvExtension, const bool returnHighPart)
{
DE_ASSERT(!isBooleanResultTest(spirvOperation));
@@ -2151,9 +2329,9 @@ void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperati
}
template <class T>
-void SpvAsmTypeTests<T>::createTests(const char *testName, uint32_t spirvOperation, OpQuaternaryFuncType operation,
- QuaternaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
- const char *spirvExtension, const bool returnHighPart)
+void SpvAsmTypeTests<T>::doCreateTests(const char *testName, uint32_t spirvOperation, OpQuaternaryFuncType operation,
+ QuaternaryFilterFuncType filter, InputRange inputRange, InputWidth inputWidth,
+ const char *spirvExtension, const bool returnHighPart)
{
DE_ASSERT(!spirvExtension);
DE_ASSERT(!isBooleanResultTest(spirvOperation));
@@ -2451,7 +2629,8 @@ void SpvAsmTypeTests<T>::createSwitchTests(void)
}
template <class T>
-void SpvAsmTypeTests<T>::getConstantDataset(vector<T> inputDataset, vector<T> &outputDataset, uint32_t spirvOperation)
+void SpvAsmTypeTests<T>::getConstantDataset(const vector<T> &inputDataset, vector<T> &outputDataset,
+ uint32_t spirvOperation)
{
const uint32_t numElements = (uint32_t)inputDataset.size();
@@ -4123,15 +4302,6 @@ tcu::TestCaseGroup *createTypeTests(tcu::TestContext &testCtx)
MAKE_TEST_V_I_8136("spec_constant_composite_initializer", SpvOpSpecConstantComposite, constant, FILTER_NONE,
RANGE_FULL, nullptr)
- int8Tests[0]->createSwitchTests();
- int16Tests[0]->createSwitchTests();
- int32Tests[0]->createSwitchTests();
- int64Tests[0]->createSwitchTests();
- uint8Tests[0]->createSwitchTests();
- uint16Tests[0]->createSwitchTests();
- uint32Tests[0]->createSwitchTests();
- uint64Tests[0]->createSwitchTests();
-
typeScalarTests->addChild(int8Tests[0].release());
typeScalarTests->addChild(int16Tests[0].release());
typeScalarTests->addChild(int32Tests[0].release());
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp
index 28795fe3e3c9..677633135d06 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSignalOrderTests.cpp
@@ -1119,6 +1119,7 @@ public:
void deinit(void)
{
cleanupGroup();
+ tcu::TestCaseGroup::deinit();
}
private:
@@ -1637,6 +1638,7 @@ public:
void deinit(void)
{
cleanupGroup();
+ tcu::TestCaseGroup::deinit();
}
private:
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp
index 31c87b39f8c3..c9c169dd856c 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp
@@ -1894,6 +1894,7 @@ public:
void deinit(void)
{
cleanupGroup();
+ tcu::TestCaseGroup::deinit();
}
private:
@@ -2429,6 +2430,7 @@ public:
void deinit(void)
{
cleanupGroup();
+ tcu::TestCaseGroup::deinit();
}
private:
diff --git a/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp b/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp
index be1ce0f6f6ed..726cdb872256 100644
--- a/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp
+++ b/external/vulkancts/modules/vulkan/transform_feedback/vktTransformFeedbackSimpleTests.cpp
@@ -6793,6 +6793,7 @@ public:
void deinit(void) override
{
cleanupDevices();
+ tcu::TestCaseGroup::deinit();
}
};
diff --git a/external/vulkancts/modules/vulkan/vktTestGroupUtil.hpp b/external/vulkancts/modules/vulkan/vktTestGroupUtil.hpp
index 06164076dd13..bfc3e4df08b2 100644
--- a/external/vulkancts/modules/vulkan/vktTestGroupUtil.hpp
+++ b/external/vulkancts/modules/vulkan/vktTestGroupUtil.hpp
@@ -56,6 +56,7 @@ public:
{
if (m_cleanupGroup)
m_cleanupGroup(this);
+ tcu::TestCaseGroup::deinit();
}
private:
@@ -87,6 +88,7 @@ public:
{
if (m_cleanupGroup)
m_cleanupGroup(this, m_arg0);
+ tcu::TestCaseGroup::deinit();
}
private:
@@ -120,6 +122,7 @@ public:
{
if (m_cleanupGroup)
m_cleanupGroup(this, m_arg0, m_arg1);
+ tcu::TestCaseGroup::deinit();
}
private:
--
2.51.0

View file

@ -1,367 +0,0 @@
From a801d75fcb16db89d2af67dd40040bc7c5f59df0 Mon Sep 17 00:00:00 2001
From: Valentine Burley <valentine.burley@collabora.com>
Date: Thu, 23 Apr 2026 11:03:14 +0200
Subject: [PATCH] android: Implement headless WSI fallback using AImageReader
When running dEQP as a native executable (DEQP_ANDROID_EXE) on Android,
a system-provided NativeActivity window is typically unavailable. This
prevents Vulkan and EGL WSI tests from running as they require a valid
ANativeWindow.
This patch:
- Implements a headless fallback using the AImageReader NDK API to
create an off-screen ANativeWindow in tcuAndroidPlatform.cpp.
- Implements an active "null compositor" via an AImageReader listener
that immediately drains and releases acquired images. This ensures the
producer never runs out of buffers, fixing intermittent timeouts in
tests that require active consumption (e.g. maintenance1 tests).
- Uses AImageReader_acquireNextImageAsync and AImage_deleteAsync (API 26+)
to handle GPU sync fences.
- Adds thread-safe teardown logic using an atomic flag and a non-blocking
mutex lock (std::try_to_lock) to prevent race conditions between the
main thread and the background listener callback.
- Adds ImageReaderNativeWindow (EGL) and ImageReaderVulkanWindow (Vulkan)
to manage the AImageReader and ImageQueue lifecycle.
- Extracts the AImageReader creation logic into a shared helper
acquireImageReaderWindow().
- Links against mediandk in android.cmake to provide AImageReader
support for Android API levels >= 24.
- Uses AImageReader_newWithUsage (API 26+) with explicit hardware buffer flags
(SAMPLED_IMAGE | COMPOSER_OVERLAY) to mimic SurfaceFlinger allocation
constraints.
- On Android API levels < 24 (where AImageReader is unavailable), window
acquisition failure now consistently throws ResourceError instead of
NotSupportedError. This aligns the EGL path with the existing Vulkan
behavior and reverts EGL to the previous CTS behavior.
This allows surface and swapchain tests to function correctly in headless
environments for both EGL and Vulkan.
Components: Android, EGL, Framework, Vulkan
VK-GL-CTS issue: 6468
Affects:
dEQP-EGL.*
dEQP-VK.wsi.android.*
Change-Id: I462e617ae60e4dc3d9f0aeec11fd1628d0c6ff12
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
---
external/openglcts/README.md | 7 +-
.../platform/android/tcuAndroidPlatform.cpp | 237 +++++++++++++++++-
targets/android/android.cmake | 5 +
3 files changed, 242 insertions(+), 7 deletions(-)
diff --git a/external/openglcts/README.md b/external/openglcts/README.md
index 2eae316f58..24b270aee5 100644
--- a/external/openglcts/README.md
+++ b/external/openglcts/README.md
@@ -323,9 +323,10 @@ This is identical to the builds on other platforms and is better for iterative
runs of headless tests as CTS can be invoked and the output can be checked from
a single interactive terminal.
-This build doesn't support WSI tests and shouldn't be used for conformance
-submissions, it also isn't recommended for longer running tests since Android
-will terminate this process as soon as the `adb shell` session ends which may
+This build supports WSI tests via a headless AImageReader fallback for both EGL
+and Vulkan (Android API 24+). However, it shouldn't be used for conformance
+submissions. It also isn't recommended for longer running tests since Android
+will terminate this process as soon as the `adb shell` session ends, which may
happen due to an unintentional device disconnection.
cmake <path to openglcts> -GNinja -DCMAKE_BUILD_TYPE=Debug \
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index af56dabb83..45861c8aee 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -35,6 +35,15 @@
// Assume no call translation is needed
#include <android/native_window.h>
+#if DE_ANDROID_API >= 24
+#include <media/NdkImageReader.h>
+#include <media/NdkImage.h>
+#include <mutex>
+#include <atomic>
+#endif
+#if DE_ANDROID_API >= 26
+#include <android/hardware_buffer.h>
+#endif
struct egl_native_pixmap_t;
DE_STATIC_ASSERT(sizeof(eglw::EGLNativeDisplayType) == sizeof(void *));
DE_STATIC_ASSERT(sizeof(eglw::EGLNativePixmapType) == sizeof(struct egl_native_pixmap_t *));
@@ -136,6 +145,141 @@ private:
WindowRegistry &m_windowRegistry;
};
+#if DE_ANDROID_API >= 24
+struct ImageQueue
+{
+ std::mutex lock;
+ std::atomic<bool> closing{false};
+ AImageReader_ImageListener listener;
+
+ ImageQueue()
+ {
+ listener.context = this;
+ listener.onImageAvailable = onImageAvailable;
+ }
+
+ ~ImageQueue()
+ {
+ }
+
+ static void onImageAvailable(void *context, AImageReader *reader)
+ {
+ ImageQueue *queue = reinterpret_cast<ImageQueue *>(context);
+
+ std::unique_lock<std::mutex> guard(queue->lock, std::try_to_lock);
+ if (!guard.owns_lock() || queue->closing.load(std::memory_order_acquire))
+ return;
+
+ AImage *image = nullptr;
+
+#if DE_ANDROID_API >= 26
+ int fenceFd = -1;
+ while (AImageReader_acquireNextImageAsync(reader, &image, &fenceFd) == AMEDIA_OK && image != nullptr)
+ {
+ AImage_deleteAsync(image, fenceFd);
+ }
+#else
+ while (AImageReader_acquireNextImage(reader, &image) == AMEDIA_OK && image != nullptr)
+ {
+ AImage_delete(image);
+ }
+#endif
+ }
+};
+
+static ANativeWindow *acquireImageReaderWindow(int width, int height, int32_t format, AImageReader **outReader,
+ ImageQueue **outQueue)
+{
+ AImageReader *reader = nullptr;
+#if DE_ANDROID_API >= 26
+ uint64_t usage = AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE | AHARDWAREBUFFER_USAGE_COMPOSER_OVERLAY;
+ media_status_t status = AImageReader_newWithUsage(width, height, format, usage, 4, &reader);
+#else
+ media_status_t status = AImageReader_new(width, height, format, 4, &reader);
+#endif
+ if (status != AMEDIA_OK || !reader)
+ throw ResourceError("Failed to create AImageReader", nullptr, __FILE__, __LINE__);
+
+ *outQueue = new ImageQueue();
+ AImageReader_setImageListener(reader, &(*outQueue)->listener);
+
+ ANativeWindow *nativeWindow = nullptr;
+ status = AImageReader_getWindow(reader, &nativeWindow);
+ if (status != AMEDIA_OK || !nativeWindow)
+ {
+ AImageReader_setImageListener(reader, nullptr);
+ delete *outQueue;
+ *outQueue = nullptr;
+ AImageReader_delete(reader);
+ throw ResourceError("Failed to get window from AImageReader", nullptr, __FILE__, __LINE__);
+ }
+
+ *outReader = reader;
+ return nativeWindow;
+}
+
+class ImageReaderNativeWindow : public eglu::NativeWindow
+{
+public:
+ ImageReaderNativeWindow(AImageReader *reader, ImageQueue *queue, ANativeWindow *window, int width, int height)
+ : eglu::NativeWindow(WINDOW_CAPABILITIES)
+ , m_reader(reader)
+ , m_queue(queue)
+ , m_window(window)
+ , m_size(width, height)
+ {
+ }
+
+ virtual ~ImageReaderNativeWindow(void)
+ {
+ if (m_reader)
+ {
+ if (m_queue)
+ {
+ m_queue->closing.store(true, std::memory_order_release);
+ std::lock_guard<std::mutex> guard(m_queue->lock);
+ AImageReader_setImageListener(m_reader, nullptr);
+ }
+ AImageReader_delete(m_reader);
+ }
+ if (m_queue)
+ delete m_queue;
+ }
+
+ virtual eglw::EGLNativeWindowType getLegacyNative(void)
+ {
+ return m_window;
+ }
+ virtual void *getPlatformExtension(void)
+ {
+ return m_window;
+ }
+ virtual void *getPlatformNative(void)
+ {
+ return m_window;
+ }
+ tcu::IVec2 getScreenSize(void) const
+ {
+ return m_size;
+ }
+ void setSurfaceSize(tcu::IVec2 size)
+ {
+ int32_t format = 0; // 0 means keep the existing format
+ ANativeWindow_setBuffersGeometry(m_window, size.x(), size.y(), format);
+ m_size = size;
+ }
+ virtual void processEvents(void)
+ {
+ }
+
+private:
+ AImageReader *m_reader;
+ ImageQueue *m_queue;
+ ANativeWindow *m_window;
+ tcu::IVec2 m_size;
+};
+#endif
+
// NativeWindow
NativeWindow::NativeWindow(Window *window, int width, int height, int32_t format)
@@ -197,10 +341,30 @@ eglu::NativeWindow *NativeWindowFactory::createWindow(const eglu::WindowParams &
{
Window *window = m_windowRegistry.tryAcquireWindow();
- if (!window)
- throw NotSupportedError("Native window is not available", nullptr, __FILE__, __LINE__);
-
- return new NativeWindow(window, params.width, params.height, format);
+ if (window)
+ {
+ return new NativeWindow(window, params.width, params.height, format);
+ }
+ else
+ {
+#if DE_ANDROID_API >= 24
+ int width = params.width != eglu::WindowParams::SIZE_DONT_CARE ? params.width : 256;
+ int height = params.height != eglu::WindowParams::SIZE_DONT_CARE ? params.height : 256;
+ width = width > 0 ? width : 256;
+ height = height > 0 ? height : 256;
+
+ AImageReader *reader = nullptr;
+ ImageQueue *queue = nullptr;
+ // Always use AIMAGE_FORMAT_RGBA_8888: the AImageReader is only used as a
+ // surface handle provider, and AIMAGE_FORMAT_* constants are not
+ // interchangeable with ANativeWindow_LegacyFormat values.
+ ANativeWindow *nativeWindow = acquireImageReaderWindow(width, height, AIMAGE_FORMAT_RGBA_8888, &reader, &queue);
+
+ return new ImageReaderNativeWindow(reader, queue, nativeWindow, width, height);
+#else
+ throw ResourceError("Native window is not available", nullptr, __FILE__, __LINE__);
+#endif
+ }
}
// NativeDisplayFactory
@@ -279,6 +443,55 @@ private:
tcu::Android::Window &m_window;
};
+#if DE_ANDROID_API >= 24
+class ImageReaderVulkanWindow : public vk::wsi::AndroidWindowInterface
+{
+public:
+ ImageReaderVulkanWindow(AImageReader *reader, ImageQueue *queue, ANativeWindow *window)
+ : vk::wsi::AndroidWindowInterface(vk::pt::AndroidNativeWindowPtr(window))
+ , m_reader(reader)
+ , m_queue(queue)
+ {
+ }
+
+ void setVisible(bool visible)
+ {
+ DE_UNREF(visible);
+ }
+
+ void resize(const UVec2 &newSize)
+ {
+ DE_UNREF(newSize);
+ }
+
+ void setMinimized(bool minimized)
+ {
+ DE_UNREF(minimized);
+ TCU_THROW(NotSupportedError, "Minimized on Android is not implemented");
+ }
+
+ ~ImageReaderVulkanWindow(void)
+ {
+ if (m_reader)
+ {
+ if (m_queue)
+ {
+ m_queue->closing.store(true, std::memory_order_release);
+ std::lock_guard<std::mutex> guard(m_queue->lock);
+ AImageReader_setImageListener(m_reader, nullptr);
+ }
+ AImageReader_delete(m_reader);
+ }
+ if (m_queue)
+ delete m_queue;
+ }
+
+private:
+ AImageReader *m_reader;
+ ImageQueue *m_queue;
+};
+#endif
+
class VulkanDisplay : public vk::wsi::Display
{
public:
@@ -306,7 +519,23 @@ public:
}
}
else
+ {
+#if DE_ANDROID_API >= 24
+ uint32_t width = initialSize ? initialSize->x() : 256;
+ uint32_t height = initialSize ? initialSize->y() : 256;
+ width = width > 0 ? width : 256;
+ height = height > 0 ? height : 256;
+
+ AImageReader *reader = nullptr;
+ ImageQueue *queue = nullptr;
+ ANativeWindow *nativeWindow =
+ acquireImageReaderWindow(width, height, AIMAGE_FORMAT_RGBA_8888, &reader, &queue);
+
+ return new ImageReaderVulkanWindow(reader, queue, nativeWindow);
+#else
TCU_THROW(ResourceError, "Native window is not available");
+#endif
+ }
}
private:
diff --git a/targets/android/android.cmake b/targets/android/android.cmake
index 33843fcc09..6da33d3c17 100644
--- a/targets/android/android.cmake
+++ b/targets/android/android.cmake
@@ -64,6 +64,11 @@ if (DE_ANDROID_API GREATER 8)
set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${ANDROID_LIBRARY})
endif ()
+if (DE_ANDROID_API GREATER 23)
+ find_library(MEDIANDK_LIBRARY NAMES mediandk PATHS /usr/lib)
+ set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${MEDIANDK_LIBRARY})
+endif ()
+
# Android uses customized execserver
include_directories(execserver)
set(DEQP_PLATFORM_LIBRARIES xscore ${DEQP_PLATFORM_LIBRARIES})
--
2.51.0

View file

@ -1,4 +1,4 @@
From 7d13c48a3d9d679d499f91e066e36340e72255bf Mon Sep 17 00:00:00 2001
From ccdc2b9341c703507cba6017d2a494595335ffdc Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Wed, 29 Jan 2025 12:50:33 +0000
Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
@ -6,15 +6,15 @@ Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
Change-Id: Ie412f914bb6264ffbd502deea57d80cc11a9948e
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
framework/platform/CMakeLists.txt | 9 -
.../platform/android/tcuAndroidPlatform.cpp | 191 +-----------------
framework/platform/CMakeLists.txt | 9 --
.../platform/android/tcuAndroidPlatform.cpp | 126 +-----------------
.../platform/android/tcuAndroidPlatform.hpp | 14 +-
framework/platform/lnx/tcuLnxPlatform.cpp | 9 +-
.../surfaceless/tcuSurfacelessPlatform.cpp | 52 -----
5 files changed, 3 insertions(+), 272 deletions(-)
.../surfaceless/tcuSurfacelessPlatform.cpp | 54 --------
5 files changed, 3 insertions(+), 209 deletions(-)
diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
index 8f6e0c5847..a675b815a9 100644
index ec1deb5c2..49fe412a7 100644
--- a/framework/platform/CMakeLists.txt
+++ b/framework/platform/CMakeLists.txt
@@ -15,8 +15,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
@ -35,7 +35,7 @@ index 8f6e0c5847..a675b815a9 100644
)
include_directories(lnx)
@@ -170,8 +166,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
@@ -164,8 +160,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
set(TCUTIL_PLATFORM_SRCS
osx/tcuOSXPlatform.cpp
osx/tcuOSXPlatform.hpp
@ -44,7 +44,7 @@ index 8f6e0c5847..a675b815a9 100644
osx/tcuOSXMetalView.mm
osx/tcuOSXMetalView.hpp
)
@@ -197,9 +191,6 @@ if (DEQP_USE_WAYLAND)
@@ -191,9 +185,6 @@ if (DEQP_USE_WAYLAND)
add_dependencies(tcutil-platform deqp-xdg-shell)
endif()
@ -55,7 +55,7 @@ index 8f6e0c5847..a675b815a9 100644
# Always link to glutil as some platforms such as Win32 always support GL
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index 45861c8aee..c1054656ed 100644
index af56dabb8..6b0de6dba 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -31,7 +31,6 @@
@ -66,7 +66,7 @@ index 45861c8aee..c1054656ed 100644
// Assume no call translation is needed
#include <android/native_window.h>
@@ -381,167 +380,6 @@ eglu::NativeDisplay *NativeDisplayFactory::createDisplay(const EGLAttrib *attrib
@@ -217,102 +216,6 @@ eglu::NativeDisplay *NativeDisplayFactory::createDisplay(const EGLAttrib *attrib
return new NativeDisplay();
}
@ -132,55 +132,6 @@ index 45861c8aee..c1054656ed 100644
- tcu::Android::Window &m_window;
-};
-
-#if DE_ANDROID_API >= 24
-class ImageReaderVulkanWindow : public vk::wsi::AndroidWindowInterface
-{
-public:
- ImageReaderVulkanWindow(AImageReader *reader, ImageQueue *queue, ANativeWindow *window)
- : vk::wsi::AndroidWindowInterface(vk::pt::AndroidNativeWindowPtr(window))
- , m_reader(reader)
- , m_queue(queue)
- {
- }
-
- void setVisible(bool visible)
- {
- DE_UNREF(visible);
- }
-
- void resize(const UVec2 &newSize)
- {
- DE_UNREF(newSize);
- }
-
- void setMinimized(bool minimized)
- {
- DE_UNREF(minimized);
- TCU_THROW(NotSupportedError, "Minimized on Android is not implemented");
- }
-
- ~ImageReaderVulkanWindow(void)
- {
- if (m_reader)
- {
- if (m_queue)
- {
- m_queue->closing.store(true, std::memory_order_release);
- std::lock_guard<std::mutex> guard(m_queue->lock);
- AImageReader_setImageListener(m_reader, nullptr);
- }
- AImageReader_delete(m_reader);
- }
- if (m_queue)
- delete m_queue;
- }
-
-private:
- AImageReader *m_reader;
- ImageQueue *m_queue;
-};
-#endif
-
-class VulkanDisplay : public vk::wsi::Display
-{
-public:
@ -208,23 +159,7 @@ index 45861c8aee..c1054656ed 100644
- }
- }
- else
- {
-#if DE_ANDROID_API >= 24
- uint32_t width = initialSize ? initialSize->x() : 256;
- uint32_t height = initialSize ? initialSize->y() : 256;
- width = width > 0 ? width : 256;
- height = height > 0 ? height : 256;
-
- AImageReader *reader = nullptr;
- ImageQueue *queue = nullptr;
- ANativeWindow *nativeWindow =
- acquireImageReaderWindow(width, height, AIMAGE_FORMAT_RGBA_8888, &reader, &queue);
-
- return new ImageReaderVulkanWindow(reader, queue, nativeWindow);
-#else
- TCU_THROW(ResourceError, "Native window is not available");
-#endif
- }
- }
-
-private:
@ -234,7 +169,7 @@ index 45861c8aee..c1054656ed 100644
static size_t getTotalSystemMemory(ANativeActivity *activity)
{
const size_t MiB = (size_t)(1 << 20);
@@ -570,8 +408,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
@@ -341,8 +244,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
// Platform
Platform::Platform(NativeActivity &activity)
@ -244,7 +179,7 @@ index 45861c8aee..c1054656ed 100644
{
m_nativeDisplayFactoryRegistry.registerFactory(new NativeDisplayFactory(m_windowRegistry));
m_contextFactoryRegistry.registerFactory(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
@@ -587,16 +424,6 @@ bool Platform::processEvents(void)
@@ -358,16 +260,6 @@ bool Platform::processEvents(void)
return true;
}
@ -261,7 +196,7 @@ index 45861c8aee..c1054656ed 100644
void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
{
// Worst-case estimates
@@ -630,22 +457,6 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
@@ -401,22 +293,6 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
limits.devicePageTableHierarchyLevels = 3;
}
@ -285,7 +220,7 @@ index 45861c8aee..c1054656ed 100644
} // namespace tcu
diff --git a/framework/platform/android/tcuAndroidPlatform.hpp b/framework/platform/android/tcuAndroidPlatform.hpp
index 32cc9068c4..3c3f02d98d 100644
index 32cc9068c..3c3f02d98 100644
--- a/framework/platform/android/tcuAndroidPlatform.hpp
+++ b/framework/platform/android/tcuAndroidPlatform.hpp
@@ -27,7 +27,6 @@
@ -332,7 +267,7 @@ index 32cc9068c4..3c3f02d98d 100644
const size_t m_totalSystemMemory;
};
diff --git a/framework/platform/lnx/tcuLnxPlatform.cpp b/framework/platform/lnx/tcuLnxPlatform.cpp
index 8c0a3ef06e..6b1a4985a1 100644
index 8c0a3ef06..6b1a4985a 100644
--- a/framework/platform/lnx/tcuLnxPlatform.cpp
+++ b/framework/platform/lnx/tcuLnxPlatform.cpp
@@ -23,12 +23,10 @@
@ -374,7 +309,7 @@ index 8c0a3ef06e..6b1a4985a1 100644
#if defined(DEQP_SUPPORT_GLX)
m_glPlatform.registerFactory(x11::glx::createContextFactory(m_eventState));
diff --git a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
index 2224f4164e..713c4ee9e2 100644
index 585bfbbae..9f386b3ca 100644
--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
@@ -43,7 +43,6 @@
@ -438,7 +373,7 @@ index 2224f4164e..713c4ee9e2 100644
bool isEGLExtensionSupported(const eglw::Library &egl, eglw::EGLDisplay, const std::string &extName)
{
const vector<string> exts = eglu::getClientExtensions(egl);
@@ -191,13 +144,8 @@ public:
@@ -191,13 +144,6 @@ public:
{
return *this;
}
@ -446,12 +381,12 @@ index 2224f4164e..713c4ee9e2 100644
- {
- return m_vkPlatform;
- }
private:
-
-private:
- VulkanPlatform m_vkPlatform;
};
class ContextFactory : public glu::ContextFactory
--
2.51.0
2.45.2

View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -u
uncollapsed_section_start wine "Setting up Wine"
export WINEPREFIX="$1"
export WINEDEBUG="-all"
# We don't want crash dialogs
cat >crashdialog.reg <<EOF
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wine\WineDbg]
"ShowCrashDialog"=dword:00000000
EOF
# Set the wine prefix and disable the crash dialog
wine regedit crashdialog.reg
rm crashdialog.reg
# An immediate wine command may fail with: "${WINEPREFIX}: Not a
# valid wine prefix." and that is just spit because of checking
# the existance of the system.reg file, which fails. Just giving
# it a bit more of time for it to be created solves the problem
# ...
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
section_end wine

View file

@ -47,7 +47,6 @@ UNNEEDED_PACKAGES=(
libgl1-mesa-dri mesa-vulkan-drivers mesa-va-drivers mesa-vdpau-drivers i965-va-driver
intel-media-va-driver
gnupg2
qemu-user
)
# Removing unneeded packages
@ -113,6 +112,7 @@ directories=(
/usr/lib/*/libdb-5.3.so # libdb-5.3.so that is only used by this pam module ^
/usr/lib/*/libnss_hesiod* # remove NSS support for nis, nisplus and hesiod
/usr/lib/*/libnss_nis*
/usr/lib/*/wine # don't need Wine's implementation, using Proton instead
/usr/local/bin/mold
/usr/local/bin/bindgen
/usr/local/bin/cargo*

View file

@ -150,17 +150,15 @@ crosvm --no-syslog run \
section_start crosvm_results "Processing crosvm results"
CROSVM_RET=$?
[ "${CROSVM_RET}" -eq 0 ] && {
[ ${CROSVM_RET} -eq 0 ] && {
# The actual return code is the crosvm guest script's exit code
CROSVM_RET=$(cat ${VM_TEMP_DIR}/exit_code 2>/dev/null)
# Sanitize it to a single integer
CROSVM_RET=$(echo "$CROSVM_RET" | grep -o '^[0-9]\+' | head -n 1)
# Force error when the guest script's exit code is not available
CROSVM_RET=${CROSVM_RET:-1}
}
# Show crosvm output on error to help with debugging
[ "${CROSVM_RET}" -eq 0 ] || {
[ ${CROSVM_RET} -eq 0 ] || {
{ set +x; } 2>/dev/null
echo "Dumping crosvm output.." >&2
cat ${VM_TEMP_DIR}/crosvm >&2

View file

@ -58,7 +58,7 @@ ulimit -n 32768
VSOCK_BASE=10000 # greater than all the default vsock ports
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
HOME=/cuttlefish timeout 5m launch_cvd \
HOME=/cuttlefish launch_cvd \
-daemon \
-verbosity=INFO \
-file_verbosity=VERBOSE \
@ -67,7 +67,6 @@ HOME=/cuttlefish timeout 5m launch_cvd \
-enable_bootanimation=false \
-enable_minimal_mode=true \
-enable_modem_simulator=false \
-enable_wifi=false \
-guest_enforce_security=false \
-report_anonymous_usage_stats=no \
-gpu_mode="$CUTTLEFISH_GPU_MODE" \

View file

@ -49,12 +49,6 @@ elif [ -d "/piglit" ]; then
rm -r /piglit
fi
if [ -n "$VKD3D_PROTON_TAG" ]; then
# Are we using the right vkd3d-proton version?
ci_tag_test_time_check "VKD3D_PROTON_TAG"
fi
# Ensure Mesa Shader Cache resides on tmpfs.
SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}
@ -64,13 +58,11 @@ findmnt -n tmpfs ${SHADER_CACHE_HOME} || findmnt -n tmpfs ${SHADER_CACHE_DIR} ||
mount -t tmpfs -o nosuid,nodev,size=2G,mode=1755 tmpfs ${SHADER_CACHE_DIR}
}
FILE_ARGS=""
touch /fails.txt
touch /flakes.txt
cat $INSTALL/all-skips.txt > /skips.txt
# There must be a single baseline expected fails list, this lets us cat together
# xfails from multiple possible sources. Do we actually use this, though?
cat_if_exists() {
add_if_exists() {
prefix=$1
kind=$2
if [ -e "$INSTALL/$prefix-$kind.txt" ]; then
@ -78,31 +70,22 @@ cat_if_exists() {
fi
}
add_if_exists() {
if [ -e "$INSTALL/$2" ]; then
FILE_ARGS="$FILE_ARGS $1 $INSTALL/$2"
fi
}
# remove duplicate values to avoid reading the same file multiple times
for prefix in $({
echo "all"
{
echo "$DRIVER_NAME"
echo "$GPU_VERSION"
} | sort -u); do
cat_if_exists "$prefix" fails
add_if_exists "--flakes" "$prefix-flakes.txt"
add_if_exists "--skips" "$prefix-skips.txt"
add_if_exists "--single-thread" "$prefix-single-thread.txt"
} | sort -u | while read -r prefix; do
add_if_exists "$prefix" fails
add_if_exists "$prefix" flakes
add_if_exists "$prefix" skips
done
if [[ $CI_JOB_NAME != *full* ]]; then
FILE_ARGS="$FILE_ARGS --skips $INSTALL/all-slow-skips.txt"
add_if_exists "--skips" "$GPU_VERSION-slow-skips.txt"
if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]; then
cat "$INSTALL/$GPU_VERSION-slow-skips.txt" >> /skips.txt
fi
if [ -n "${ANGLE_TAG:-}" ]; then
FILE_ARGS="$FILE_ARGS --skips $INSTALL/angle-skips.txt"
cat "$INSTALL/angle-skips.txt" >> /skips.txt
fi
# Set the path to VK validation layer settings (in case it ends up getting loaded)
@ -154,14 +137,15 @@ deqp-runner \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS_DIR \
--baseline /fails.txt \
$FILE_ARGS \
--skips /skips.txt \
--flakes /flakes.txt \
--testlog-to-xml /deqp-tools/testlog-to-xml \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
${DEQP_RUNNER_MAX_FAILS:+--max-fails "$DEQP_RUNNER_MAX_FAILS"} \
${DEQP_RUNNER_SHADER_CACHE_DIR:+--shader-cache-dir "$DEQP_RUNNER_SHADER_CACHE_DIR"} \
${DEQP_FORCE_ASAN:+--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so --env ASAN_OPTIONS=malloc_fill_byte=1}; DEQP_EXITCODE=$?
${DEQP_FORCE_ASAN:+--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so}; DEQP_EXITCODE=$?
{ set +x; } 2>/dev/null
@ -172,23 +156,12 @@ set -x
report_load
# Remove all but the first 50 individual XML, test log and caselist
# files uploaded as artifacts, to save fd.o space and avoid job log spam
# when you break everything.
# Note that each of these pattern gets to keep 50 files, but there is nothing
# making sure the remaining 50 files of each correspond to the same tests.
# Remove all but the first 50 individual XML files uploaded as artifacts, to
# save fd.o space when you break everything.
find $RESULTS_DIR -name \*.xml | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
find $RESULTS_DIR -name 'c*.r*.caselist.txt' | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
find $RESULTS_DIR -name 'c*.r*.log' | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \

View file

@ -43,7 +43,7 @@
# pengutronix | lava | @hnez, @lynxeye
# valve-kws | ci-tron | @mupuf, @eric
# valve-mupuf | ci-tron | @mupuf, @eric
# vmware | lava | @mombasa, @bhenden
# vmware | lava | @blu
.microsoft-farm-rules:
rules:
@ -336,66 +336,67 @@
# Skip container & build jobs when disabling any farm, and run them if any
# farm gets re-enabled.
# Just like above, don't apply these rules in scheduled pipelines (see comment
# on line 23).
.disable-farm-rules:
# Only apply these rules in MR context, because otherwise we get a false
# positive on files being 'created' when pushing to a new branch, and break
# our pipeline
.disable-farm-mr-rules:
rules:
# changes(disabled) + exists(disabled) = disabling the farm
# Note: this cannot be simplified into a single `.ci-farms-disabled/*` rule
# because if there are more than one disabled farm and we only re-enable
# one, the exits(.ci-farms-disabled/*) would match and what should be
# a farm re-enable pipeline will be detected as a farm disable pipeline.
- changes: [ .ci-farms-disabled/microsoft ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/microsoft ]
exists: [ .ci-farms-disabled/microsoft ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/collabora ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/collabora ]
exists: [ .ci-farms-disabled/collabora ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/igalia ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/igalia ]
exists: [ .ci-farms-disabled/igalia ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/lima ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/lima ]
exists: [ .ci-farms-disabled/lima ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/anholt ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/anholt ]
exists: [ .ci-farms-disabled/anholt ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/valve-mupuf ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/valve-mupuf ]
exists: [ .ci-farms-disabled/valve-mupuf ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/valve-kws ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/valve-kws ]
exists: [ .ci-farms-disabled/valve-kws ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/austriancoder ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/austriancoder ]
exists: [ .ci-farms-disabled/austriancoder ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/ondracka ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/ondracka ]
exists: [ .ci-farms-disabled/ondracka ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/vmware ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/vmware ]
exists: [ .ci-farms-disabled/vmware ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/pengutronix ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/pengutronix ]
exists: [ .ci-farms-disabled/pengutronix ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/lumag ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/lumag ]
exists: [ .ci-farms-disabled/lumag ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- changes: [ .ci-farms-disabled/imagination ]
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/imagination ]
exists: [ .ci-farms-disabled/imagination ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
# Any other change to ci-farms/* means some farm is getting re-enabled.
# Run jobs in Marge pipelines (and let it fallback to manual otherwise)

View file

@ -1,152 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_start traces_prepare "traces: preparing test setup"
set -ex
# Our rootfs may not have "less", which apitrace uses during apitrace dump
export PAGER=cat # FIXME: export everywhere
INSTALL=$(realpath -s "$PWD"/install)
if [ -n "${LAVA_HTTP_CACHE_URI:-}" ]; then
export EXTRA_ARGS="${EXTRA_ARGS} --download-caching-proxy=${LAVA_HTTP_CACHE_URI}"
elif [ -n "${CI_TRON_JOB_HTTP_SERVER:-}" ]; then
# The caching proxy doesn't appear to be working.
# export EXTRA_ARGS="${EXTRA_ARGS} --download-caching-proxy=${CI_TRON_JOB_HTTP_SERVER}/caching_proxy/"
true
elif [ -n "${FDO_HTTP_CACHE_URI:-}" ]; then
# FIXME: remove when there is no baremetal traces job anymore.
export EXTRA_ARGS="${EXTRA_ARGS} --download-caching-proxy=${FDO_HTTP_CACHE_URI}"
fi
if [ $GITLAB_USER_LOGIN == "marge-bot" ]; then
# When merging the MR, uploading to the permanent storage for .pngs must
# succeed.
export EXTRA_ARGS="${EXTRA_ARGS} --snapshot-url-must-work"
fi
# Set up the environment.
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/"
if [ -n "${VK_DRIVER}" ]; then
ARCH=$(uname -m)
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
export VK_ADD_LAYER_PATH="$INSTALL/share/vulkan/explicit_layer.d"
fi
MESA_VERSION=$(head -1 "$INSTALL/VERSION" | sed 's/\./\\./g')
# Set environment for replay tool executables.
export PATH="/apitrace/build:/gfxreconstruct/build/bin:$PATH"
echo "Version:"
apitrace version 2>/dev/null || echo "apitrace not found (Linux)"
if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
# replay is to use virpipe, and virgl_test_server llvmpipe
export GALLIUM_DRIVER="$GALLIUM_DRIVER"
GALLIUM_DRIVER=llvmpipe \
VTEST_USE_EGL_SURFACELESS=1 \
VTEST_USE_GLES=1 \
virgl_test_server >"$RESULTS_DIR"/vtest-log.txt 2>&1 &
sleep 1
fi
cd $RESULTS_DIR && rm -rf ..?* .[!.]* ./*
if [ -n "$WINE_TAG" ]; then
# Are we using the right wine version?
ci_tag_test_time_check "WINE_TAG"
# Set environment for Wine.
export WINEDEBUG="-all"
export WINEPREFIX="/wineprefix"
export WINEESYNC=1
export WINEPATH="/apitrace-msvc-win64/bin;/renderdoc-win64"
# This may be useful if you're debugging DXVK loading.
#export WINEDEBUG="+loaddll,+module"
fi
# Disable using fast-linked GPL shaders in DXVK. Otherwise, we may end up with
# (subtly, hopefully) flaky rendering when the optimized pipeline gets swapped
# in.
export DXVK_CONFIG="dxvk.enableGraphicsPipelineLibrary=False"
# ANGLE: download compiled ANGLE runtime and the compiled restricted traces
# (all-in-one package).
if [ -n "$ANGLE_TRACE_FILES_TAG" ]; then
ANGLE_DIR="${INSTALL}/traces-db/angle"
mkdir -p "${ANGLE_DIR}"
if [ "$(uname -m)" = "aarch64" ]; then
ANGLE_ARCH=arm64
else
ANGLE_ARCH=x64
fi
FILE="angle-bin-${ANGLE_ARCH}-${ANGLE_TRACE_FILES_TAG}.tar.zst"
curl --location --fail --retry-all-errors --retry 4 --retry-delay 60 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
"https://s3.freedesktop.org/mesa-tracie-private/${FILE}" --output "${FILE}"
tar --zstd -xf ${FILE} -C "${ANGLE_DIR}"
rm ${FILE}
EXTRA_ARGS="${EXTRA_ARGS} --traces-db ${INSTALL}/traces-db"
fi
# Sanity check to ensure that our environment is sufficient to make our tests
# run against the Mesa built by CI, rather than any installed distro version.
if [ -z "${VK_DRIVER}" ]; then
wflinfo -a gles2 -p wayland | tee /tmp/version.txt | grep "Mesa $MESA_VERSION\(\s\|$\)"
else
vulkaninfo | grep driverInfo | tee /tmp/version.txt | grep "Mesa $MESA_VERSION\(\s\|$\)"
fi
uncollapsed_section_switch traces "traces: run traces"
# This gets lost in uncollapsed_section_switch.
set -x
# wrapper to supress +x to avoid spamming the log
quiet() {
set +x
"$@"
set -x
}
report_failure() {
echo "Review the image changes and get a checksums patch at: ${ARTIFACTS_BASE_URL}/results/index.html"
echo "If the new traces look correct to you, you can update the checksums"
echo "locally by running:"
echo " ./bin/ci/update_traces_checksum.sh"
echo "and resubmit this merge request."
exit 1
}
report_success() {
echo "All image checksums matched. Results can be viewed at ${ARTIFACTS_BASE_URL}/results/index.html"
}
if gpu-trace-perf replay \
-j ${FDO_CI_CONCURRENT:-4} \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction ${CI_NODE_TOTAL} \
--output $RESULTS_DIR \
--cache-dir $CACHE_DIR \
--config $INSTALL/$REPLAY_CONFIG \
--device $GPU_VERSION \
--jwt "${S3_JWT_FILE}" \
--snapshots-url "https://$PIGLIT_REPLAY_REFERENCE_IMAGES_BASE/" \
--job-url "https://$JOB_ARTIFACTS_BASE/" \
$EXTRA_ARGS \
; then
quiet report_success
else
quiet report_failure
fi

View file

@ -19,27 +19,27 @@ include:
- .gitlab-ci/conditional-build-image-tags.yml
variables:
DEBIAN_BUILD_BASE_TAG: "20260529-rust-1.85"
DEBIAN_BUILD_TAG: "20260504-screenshot"
DEBIAN_BUILD_BASE_TAG: "20251016-riscv"
DEBIAN_BUILD_TAG: "20260106-android16"
DEBIAN_TEST_BASE_TAG: "20260529-rust-1.85"
DEBIAN_TEST_ANDROID_TAG: "20260602-angle-19"
DEBIAN_TEST_GL_TAG: "20260609-vvl-2a"
DEBIAN_TEST_VIDEO_TAG: "20260512-vkuprev"
DEBIAN_TEST_VK_TAG: "20260604-vkd3d"
DEBIAN_TEST_BASE_TAG: "20260113-deqp-runner"
DEBIAN_TEST_ANDROID_TAG: "20260119-glcts"
DEBIAN_TEST_GL_TAG: "20260119-glcts"
DEBIAN_TEST_VIDEO_TAG: "20250813-vector"
DEBIAN_TEST_VK_TAG: "20260114-vkcts"
ALPINE_X86_64_BUILD_TAG: "20260429-libdrm"
ALPINE_X86_64_BUILD_TAG: "20251001-realninja"
FEDORA_X86_64_BUILD_TAG: "20260429-staticcpp"
FEDORA_X86_64_BUILD_TAG: "20250917-rust"
KERNEL_TAG: "v6.19-mesa-712d"
KERNEL_TAG: "v6.17-mesa-ceea"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "69788eae"
FIRMWARE_TAG: "ff46ce35"
PKG_REPO_REV: "0d2527f6"
FIRMWARE_TAG: "8fc31b97"
FIRMWARE_REPO: "gfx-ci/firmware"
WINDOWS_X64_MSVC_TAG: "20251120-bison"
WINDOWS_X64_BUILD_TAG: "20260309-D3D619"
WINDOWS_X64_BUILD_TAG: "20251120-bison"
WINDOWS_X64_TEST_TAG: "20260309-D3D619"
WINDOWS_X64_TEST_TAG: "20251120-bison"

View file

@ -13,7 +13,7 @@ variables:
# 4. lava/health-check-docker - the slim container used for fastboot
# Set image: directly instead of extending .set-image to avoid conflicts
# with MESA_IMAGE_PATH and FDO_DISTRIBUTION_TAG between the containers.
image: registry.freedesktop.org/gfx-ci/lava-job-submitter/alpine/x86_64_lava-trigger:20260302.0
image: registry.freedesktop.org/gfx-ci/lava-job-submitter/alpine/x86_64_lava-trigger:20251111.0
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
# The jobs themselves shouldn't actually run for an hour, of course.
@ -187,24 +187,6 @@ variables:
KERNEL_IMAGE_TYPE: "image"
BOOT_METHOD: u-boot
.lava-arm64-test-android:
extends:
- .use-debian/arm64_test-android
- .lava-arm64-test
- .android-variables
variables:
HWCI_KERNEL_MODULES: vhost_vsock
HWCI_TEST_SCRIPT: install/cuttlefish-runner.sh
S3_ANDROID_ARTIFACT_NAME: mesa-arm64-android-debug
needs:
- job: debian/arm64_test-android
artifacts: false
optional: true
- job: debian-arm64 # The generic Linux build for the host will be downloaded later
artifacts: false
- job: debian-android # The Android build for the guest will be downloaded later and installed via adb
artifacts: false
.lava-arm64-test-gl:
extends:
- .use-debian/arm64_test-gl

View file

@ -41,14 +41,6 @@ fdo_log_section_end variables
fdo_log_section_start_collapsed lava_submit "Submitting job for scheduling"
# GitLab jobs use a default 1-hour timeout, which can allow jobs to run longer than intended.
# CI_JOB_TIMEOUT (GitLab timeout in seconds) is used here to set the LAVA job timeout.
# For Marge, we override this to 25 minutes (with 5 minutes subtracted below for lava-job-submitter),
# giving a still conservative, but safer timeout to avoid jobs running for too long.
if [ $GITLAB_USER_LOGIN == "marge-bot" ]; then
export CI_JOB_TIMEOUT=1500
fi
touch results/lava.log
tail -f results/lava.log &
# Ensure that we are printing the commands that are being executed,
@ -56,8 +48,6 @@ tail -f results/lava.log &
set -x
# List of optional overlays
# NOTE: If you encounter "Attempted path traversal in tar file at /dev/ttyS1",
# that is an indication that one of your rootfs and overlays contain a duplicate file.
LAVA_EXTRA_OVERLAYS=()
if [ -n "${LAVA_FIRMWARE:-}" ]; then
for fw in $LAVA_FIRMWARE; do
@ -83,7 +73,7 @@ if [ -n "${ANDROID_CTS_TAG:-}" ]; then
LAVA_EXTRA_OVERLAYS+=(
- append-overlay
--name=android-cts
--url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/android-cts/${DEBIAN_ARCH}/${ANDROID_CTS_TAG}.tar.zst")"
--url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/android-cts/${ANDROID_CTS_TAG}.tar.zst")"
--path="/"
--format=tar
--compression=zstd
@ -92,7 +82,7 @@ fi
if [ -n "${FLUSTER_TAG:-}" ]; then
LAVA_EXTRA_OVERLAYS+=(
- append-overlay
--name=fluster
--name=vkd3d-proton
--url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/fluster/${FLUSTER_TAG}/vectors.tar.zst")"
--path="/"
--format=tar
@ -109,16 +99,6 @@ if [ -n "${VKD3D_PROTON_TAG:-}" ]; then
--compression=zstd
)
fi
if [ -n "${WINE_TAG:-}" ]; then
LAVA_EXTRA_OVERLAYS+=(
- append-overlay
--name=wine
--url="$(fdo_find_s3_path "${DATA_STORAGE_PATH}/wine/${DEBIAN_TEST_VK_TAG}-${WINE_TAG}/${MESA_IMAGE_PATH}/wine.tar.zst")"
--path="/"
--format=tar
--compression=zstd
)
fi
if [ -n "${S3_ANDROID_ARTIFACT_NAME:-}" ]; then
LAVA_EXTRA_OVERLAYS+=(
- append-overlay

View file

@ -175,7 +175,6 @@ meson_subprojects=(
thiserror-impl-2-rs
ucd-trie-0.1-rs
unicode-ident-1-rs
xml-rs
zerocopy-derive-0.8-rs
${FORCE_FALLBACK_FOR:-}
)

View file

@ -2,7 +2,7 @@
# shellcheck disable=SC2086 # we want word splitting
if [[ -z "$STRACEDIR" ]]; then
STRACEDIR=meson-logs/strace/$(for i in "$@"; do basename -z -- $i; echo -n _; done | head -c100).$$
STRACEDIR=meson-logs/strace/$(for i in "$@"; do basename -z -- $i; echo -n _; done).$$
fi
mkdir -p $STRACEDIR

View file

@ -135,9 +135,7 @@ replay_s3_upload_images() {
SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
if [ "${GIT_STRATEGY:-}" = none ]; then
cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
fi
cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
cd /piglit
if [ -n "$USE_CASELIST" ]; then
@ -167,6 +165,16 @@ RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD &&
# run.
rm -rf replayer-db
# ANGLE: download compiled ANGLE runtime and the compiled restricted traces (all-in-one package)
if [ -n "$PIGLIT_REPLAY_ANGLE_ARCH" ]; then
FILE="angle-bin-${PIGLIT_REPLAY_ANGLE_ARCH}-${ANGLE_TRACE_FILES_TAG}.tar.zst"
curl --location --fail --retry-all-errors --retry 4 --retry-delay 60 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
"https://s3.freedesktop.org/mesa-tracie-private/${FILE}" --output "${FILE}"
mkdir -p replayer-db/angle
tar --zstd -xf ${FILE} -C replayer-db/angle/
fi
PIGLIT_RESULTS="${PIGLIT_RESULTS:-replay}"
RESULTSFILE="$RESULTS_DIR/$PIGLIT_RESULTS.txt"
mkdir -p .gitlab-ci/piglit

View file

@ -46,7 +46,6 @@ for f in \
.gitlab-ci/piglit \
.gitlab-ci/fossils.yml \
.gitlab-ci/fossils \
.gitlab-ci/gpu-trace-replay.sh \
.gitlab-ci/crosvm-init.sh \
.gitlab-ci/*.txt \
.gitlab-ci/report-flakes.py \

View file

@ -23,7 +23,7 @@ for driver in freedreno lima v3d vc4; do
done
# Run shader-db over a number of supported platforms for crocus/iris
for platform in hsw bdw skl mtl lnl ptl; do
for platform in hsw bdw skl mtl; do
section_start "shader-db-intel-${platform}" "Running shader-db for intel - ${platform}"
env LD_PRELOAD="$LIBDIR/libintel_noop_drm_shim.so" \
INTEL_STUB_GPU_PLATFORM="${platform}" \

View file

@ -41,13 +41,9 @@ export JOB_START_S=$(
{ date -u +"%s" -D "%Y-%m-%dT%H:%M:%SZ" "$CI_JOB_STARTED_AT" 2>/dev/null || true; }
)
function get_job_seconds {
DATE_S=$(date -u +"%s")
echo $((DATE_S-JOB_START_S))
}
function get_current_minsec {
CURR_TIME=$(get_job_seconds)
DATE_S=$(date -u +"%s")
CURR_TIME=$((DATE_S-JOB_START_S))
printf "%02d:%02d" $((CURR_TIME/60)) $((CURR_TIME%60))
}
@ -130,11 +126,11 @@ export -f _error_msg
if [ -z "${RESULTS_DIR:-}" ]; then
export RESULTS_DIR="${PWD%/}/results"
if [ "${GIT_STRATEGY:-}" = none ]; then
if [ -e "${RESULTS_DIR}" ]; then
rm -rf "${RESULTS_DIR}"
fi
mkdir -p "${RESULTS_DIR}"
fi
mkdir -p "${RESULTS_DIR}"
function error {
# we force the following to be not in a section

View file

@ -120,31 +120,6 @@
VKD3D_PROTON_TAG: ${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}
HWCI_TEST_SCRIPT: install/vkd3d-runner.sh
.test-wine:
variables:
WINE_TAG: ${CONDITIONAL_BUILD_WINE_TAG}
.traces-test:
artifacts:
# We don't specify on:failure, because it's useful for devs to be able to go
# look at the actual rendering results of other drivers.
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
paths:
- results/
variables:
CACHE_DIR: $CI_PROJECT_DIR/traces-db/
HWCI_TEST_SCRIPT: "install/gpu-trace-replay.sh"
# For downloading traces:
CI_TRON_HTTP_ARTIFACT__TRACIE_PUBLIC__PATH: /caching_proxy/https://s3.freedesktop.org/mesa-tracie-public/(.*)
CI_TRON_HTTP_ARTIFACT__TRACIE_PUBLIC__URL: https://s3.freedesktop.org/mesa-tracie-public/\1
CI_TRON_HTTP_ARTIFACT__TRACIE_PRIVATE__PATH: /caching_proxy/https://s3.freedesktop.org/mesa-tracie-private/(.*)
CI_TRON_HTTP_ARTIFACT__TRACIE_PRIVATE__URL: https://s3.freedesktop.org/mesa-tracie-private/\1
# For uploading renders:
# s3.fd.o redirects to hetzner, so we need that too
CI_TRON_PROXY__ALLOWED_ENDPOINTS_CATEGORY__S3__FDO: s3.freedesktop.org:443
CI_TRON_PROXY__ALLOWED_ENDPOINTS_CATEGORY__S3__BACKEND: fsn1.your-objectstorage.com:443
.piglit-traces-test:
artifacts:
when: on_failure
@ -174,7 +149,7 @@
.deqp-test:
script:
- if [ "${GIT_STRATEGY:-}" = none ]; then rm -rf results; fi # Clear out old results if the docker container was cached
- rm -rf results # Clear out old results if the docker container was cached
- ./install/deqp-runner.sh
artifacts:
exclude:
@ -200,6 +175,6 @@
# setup).
- section_start artifacts_download "Downloading artifacts from s3"
# Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
- if [ "${GIT_STRATEGY:-}" = none ]; then rm -rf install; fi
- rm -rf install
- (set -x; curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst | tar --zstd -x)
- section_end artifacts_download

View file

@ -61,6 +61,9 @@ shader-db:
paths:
- shader-db
timeout: 15m
tags:
# FIXME: kvm is a hack, should not be needed
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
yaml-toml-shell-py-test:
extends:
@ -78,6 +81,7 @@ yaml-toml-shell-py-test:
- section_end shellcheck
- .gitlab-ci/run-pytest.sh
rules:
- !reference [.disable-farm-mr-rules, rules]
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
# merge pipeline

View file

@ -29,13 +29,18 @@ INSTALL=$(realpath -s "$PWD"/install)
# Modifiying here directly LD_LIBRARY_PATH may cause problems when
# using a command wrapper. Hence, we will just set it when running the
# command.
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:$INSTALL/lib/"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:$INSTALL/lib/:/vkd3d-proton-tests/lib/"
# Set the Vulkan driver to use.
ARCH=$(uname -m)
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
# Set environment for Wine.
export WINEDEBUG="-all"
export WINEPREFIX="/vkd3d-proton-wine64"
export WINEESYNC=1
if [ -f "$INSTALL/$GPU_VERSION-vkd3d-skips.txt" ]; then
mapfile -t skips < <(grep -vE '^#|^$' "$INSTALL/$GPU_VERSION-vkd3d-skips.txt")
VKD3D_TEST_EXCLUDE=$(comma_separated "${skips[@]}")
@ -46,21 +51,11 @@ fi
# Sanity check to ensure that our environment is sufficient to make our tests
# run against the Mesa built by CI, rather than any installed distro version.
MESA_VERSION=$(cat "$INSTALL/VERSION")
if [ "${VKD3D_FORCE_ASAN:-0}" -eq 1 ]; then
export LD_PRELOAD="libasan.so.8:$INSTALL/lib/libdlclose-skip.so"
export ASAN_OPTIONS="malloc_fill_byte=1"
fi
if ! vulkaninfo | grep driverInfo | tee /tmp/version.txt | grep -qF "Mesa $MESA_VERSION"; then
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
exit 1
fi
if [ "${VKD3D_FORCE_ASAN:-0}" -eq 1 ]; then
unset LD_PRELOAD
fi
# Gather the list expected failures
EXPECTATIONFILE="$RESULTS_DIR/$GPU_VERSION-vkd3d-fails.txt"
if [ -f "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" ]; then
@ -104,15 +99,10 @@ fi
printf "%s\n" "Running vkd3d-proton testsuite..."
if [ "${VKD3D_FORCE_ASAN:-0}" -eq 1 ]; then
export LD_PRELOAD="libasan.so.8:$INSTALL/lib/libdlclose-skip.so"
export LD_LIBRARY_PATH="/vkd3d-proton-tests/libs/d3d12:/vkd3d-proton-tests/libs/d3d12core:${LD_LIBRARY_PATH}"
fi
LOGFILE="$RESULTS_DIR/vkd3d-proton-log.txt"
TEST_LOGS="/test-logs"
pushd /vkd3d-proton-tests
tests/test-runner.sh tests/d3d12 --jobs "${FDO_CI_CONCURRENT:-4}" --output-dir "$TEST_LOGS" | tee "$LOGFILE" || true
tests/test-runner.sh ./d3d12 --jobs "${FDO_CI_CONCURRENT:-4}" --output-dir "$TEST_LOGS" | tee "$LOGFILE" || true
popd
printf '\n\n'

View file

@ -12,7 +12,7 @@ $depsInstallPath="C:\mesa-deps"
Get-Date
Write-Host "Cloning DirectX-Headers"
git clone -b v1.619.1 --depth=1 https://github.com/microsoft/DirectX-Headers deps/DirectX-Headers
git clone -b v1.618.1 --depth=1 https://github.com/microsoft/DirectX-Headers deps/DirectX-Headers
if (!$?) {
Write-Host "Failed to clone DirectX-Headers repository"
Exit 1

View file

@ -8,7 +8,7 @@ $depsInstallPath="C:\mesa-deps"
Write-Host "Downloading DirectX 12 Agility SDK at:"
Get-Date
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.619.1 -OutFile 'agility.zip'
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.618.1 -OutFile 'agility.zip'
Expand-Archive -Path 'agility.zip' -DestinationPath 'C:\agility'
# Copy Agility SDK into mesa-deps\bin\D3D12
New-Item -ErrorAction SilentlyContinue -ItemType Directory -Path $depsInstallPath\bin -Name 'D3D12'

View file

@ -72,4 +72,4 @@ Consider recording a [GFXReconstruct](https://github.com/LunarG/gfxreconstruct/b
Does the issue reproduce with the LLVM backend (`RADV_DEBUG=llvm`) or on the AMDGPU-PRO drivers?
Does your environment set any of the variables `ACO_DEBUG`, `RADV_DEBUG`, `RADV_PERFTEST` and `RADV_EXPERIMENTAL`?
Does your environment set any of the variables `ACO_DEBUG`, `RADV_DEBUG`, and `RADV_PERFTEST`?

View file

@ -41,11 +41,10 @@ Alex Deucher <alexdeucher@gmail.com> <alex@botch2.(none)>
Alex Deucher <alexdeucher@gmail.com> <alex@cube.(none)>
Alex Deucher <alexdeucher@gmail.com> <alex@samba.(none)>
Alyssa Rosenzweig <alyssa@rosenz.ca> <alyssa.rosenzweig@intel.com>
Alyssa Rosenzweig <alyssa@rosenz.ca> <alyssa.rosenzweig@collabora.com>
Alyssa Rosenzweig <alyssa@rosenz.ca> <alyssa@rosenzweig.io>
Alyssa Rosenzweig <alyssa@rosenz.ca> <a@rosenzweig.io>
Alyssa Rosenzweig <alyssa@rosenz.ca> <alyssa@collabora.com>
Alyssa Rosenzweig <alyssa@rosenzweig.io> <alyssa.rosenzweig@intel.com>
Alyssa Rosenzweig <alyssa@rosenzweig.io> <alyssa.rosenzweig@collabora.com>
Alyssa Rosenzweig <alyssa@rosenzweig.io> <a@rosenzweig.io>
Alyssa Rosenzweig <alyssa@rosenzweig.io> <alyssa@collabora.com>
Andreas Fänger <a.faenger@e-sign.com> <a.faenger@e-sign.com>
@ -291,9 +290,6 @@ Ian Romanick <ian.d.romanick@intel.com> <idr@us.ibm.com>
Icecream95 <ixn@disroot.org> <ixn@keemail.me>
Icenowy Zheng <uwu@icenowy.me> <zhengxingda@iscas.ac.cn>
Icenowy Zheng <uwu@icenowy.me> <icenowy@aosc.io>
Igor Gnatenko <i.gnatenko.brain@gmail.com> <ignatenko@redhat.com>
Illia Iorin <illia.iorin@globallogic.com> <illia.iorin@gmail.com>
@ -430,9 +426,6 @@ Lionel Landwerlin <lionel.g.landwerlin@intel.com> <llandwerlin@gmail.com>
Liviu Prodea <liviuprodea@yahoo.com>
Lorenzo Rossi <lorenzo.rossi@collabora.com> <snowycoder@gmail.com>
Lorenzo Rossi <lorenzo.rossi@collabora.com> <git@rossilorenzo.dev>
Lucas Fryzek <lfryzek@igalia.com> <lucas.fryzek@gmail.com>
Lucas Stach <dev@lynxeye.de> <l.stach@pengutronix.de>

View file

@ -50,7 +50,7 @@ def get_problem_jobs(jobs: list[dict[str, Any]]):
for job in jobs:
if any(ignore.lower() in job["stage"] for ignore in ignore_stage_list):
continue
if job["status"] != "success":
if job["status"] in {"failed", "canceled"}:
problem_jobs.append(job)
return problem_jobs
@ -277,12 +277,6 @@ async def process_single_job(session, project_id, job):
job_name = job.get("name", "Unnamed Job")
message = f"[{job_name}]({job_url})"
if job["status"] == "running":
return f"{message}: still running<br>"
if job["status"] == "manual":
return f"{message}: waiting for manual action<br>"
# if a job times out it's cancelled, so worth mentioning here
if job["status"] == "canceled":
return f"{message}: canceled<br>"
@ -352,7 +346,7 @@ async def main(pipeline_id: str, project_id: str = "176") -> str:
session, project_id, pipeline_id
)
logging.debug(f"Pipeline status: {pipeline_status}")
if pipeline_status == "success":
if pipeline_status != "failed":
return message
jobs = await get_jobs_for_pipeline(session, project_id, pipeline_id)

View file

@ -122,13 +122,10 @@ merge_requests:
paths:
'^.gitlab/issue_templates/': ['docs']
'^.gitlab-ci': ['CI']
'^bin/ci/': ['CI']
'^.ci-farms(-disabled)?/collabora': ['CI', 'radeonsi', 'RADV', 'iris', 'ANV', 'panfrost', 'panvk', 'freedreno', 'turnip', 'venus', 'zink']
'^.*/gitlab-ci(-inc)?.yml': ['CI']
'^.*/ci/deqp-.*\.toml': ['CI']
'^.*/ci/.*-(fails|flakes|skips)\.txt': ['CI-Expectations']
'^.*/ci/(restricted-)?traces-.*\.yml': ['CI-Expectations', 'trace']
'^.*/ci/traces-.*\.toml': ['CI-Expectations', 'trace']
'^.*/ci/.*-validation-settings\.txt': ['CI-Expectations']
'^.*/ci/.*-vkd3d\.txt': ['CI-Expectations']
'^.gitlab-ci/windows/': ['Windows']
@ -164,6 +161,7 @@ merge_requests:
'^src/egl/': ['EGL']
'^src/egl/drivers/wgl/': ['wgl']
'^src/etnaviv/': ['etnaviv']
'^src/freedreno/afuc/': ['freedreno']
'^src/freedreno/common/': ['freedreno']
'^src/freedreno/computerator/': ['freedreno']
'^src/freedreno/decode/': ['freedreno']
@ -175,7 +173,6 @@ merge_requests:
'^src/freedreno/ir3/': ['ir3']
'^src/freedreno/isa/': ['freedreno']
'^src/freedreno/perfcntrs/': ['freedreno']
'^src/freedreno/qrisc/': ['freedreno']
'^src/freedreno/registers/': ['freedreno']
'^src/freedreno/rnn/': ['freedreno']
'^src/freedreno/vulkan/': ['turnip']
@ -234,7 +231,7 @@ merge_requests:
'^src/gallium/targets/mediafoundation/': ['mediafoundation']
'^src/gallium/tests/': ['gallium']
'^src/gallium/tools/': ['gallium']
'^src/gallium/winsys/amdgpu/': ['radeonsi']
# '^src/gallium/winsys/amdgpu/': ['']
'^src/gallium/winsys/crocus/': ['crocus']
'^src/gallium/winsys/d3d12/': ['d3d12']
'^src/gallium/winsys/etnaviv/': ['etnaviv']
@ -246,7 +243,7 @@ merge_requests:
'^src/gallium/winsys/lima/': ['lima']
'^src/gallium/winsys/nouveau/': ['nouveau']
'^src/gallium/winsys/panfrost/': ['panfrost']
'^src/gallium/winsys/radeon/': ['r300', 'r600', 'radeonsi']
# '^src/gallium/winsys/radeon/': ['radeon']
'^src/gallium/winsys/svga/': ['svga']
# '^src/gallium/winsys/sw/': ['']
'^src/gallium/winsys/sw/gdi/': ['wgl']
@ -289,7 +286,6 @@ merge_requests:
'^src/microsoft/compiler/': ['d3d12']
'^src/microsoft/spirv_to_dxil/': ['dozen']
'^src/microsoft/vulkan/': ['dozen']
'^src/nouveau/ci/.*nvk.*': ['NVK']
'^src/nouveau/codegen/': ['nouveau']
'^src/nouveau/compiler/': ['NAK']
'^src/nouveau/drm-shim/': ['nouveau']
@ -312,9 +308,6 @@ merge_requests:
'^src/util/00-mesa-defaults.conf': ['drirc']
'^src/vulkan/': ['vulkan']
'^src/vulkan/wsi/': ['wsi']
'^src/vulkan/wsi/wsi_common_metal': ['macOS']
'^src/vulkan/wsi/wsi_common_wayland.c': ['wayland']
'^src/vulkan/wsi/wsi_common_x11.c': ['X11']
'^VERSION$': ['mesa-release']
'Android': ['android']

36942
.pick_status.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -26,7 +26,6 @@ meson.build @dbaker @eric
# Build system - Android
/android/ @roman.stratiienko
/bin/update-android-headers.sh @zzyiwei
# Compatibility headers
/include/c99* @xexaxo
@ -47,8 +46,6 @@ meson.build @dbaker @eric
/src/vulkan/ @gfxstrand
/include/vulkan/ @gfxstrand
# Android Gralloc
/src/util/u_gralloc/ @roman.stratiienko @zzyiwei
#############
# PLATFORMS #
@ -97,9 +94,6 @@ meson.build @dbaker @eric
/src/vulkan/wsi/wsi_common_display.* @keithp
/src/*/vulkan/*_wsi_display.c @keithp
# Vulkan - Android
/include/vulkan/vk_android_native_buffer.h @zzyiwei
/src/vulkan/runtime/vk_android.* @zzyiwei
######
# CI #
@ -112,8 +106,6 @@ gitlab-ci*.yml @eric
# Broadcom
/src/broadcom/ci/ @jasuarez @chema
# Lima
/src/gallium/drivers/lima/ci/ @enunes
###########
# Drivers #
@ -124,9 +116,9 @@ gitlab-ci*.yml @eric
/src/gallium/drivers/asahi/ @alyssa
# Broadcom
/src/broadcom/ @chema @jasuarez @itoral @apinheiro
/src/gallium/drivers/v3d/ @chema @jasuarez @itoral @apinheiro
/src/gallium/drivers/vc4/ @chema @jasuarez @itoral @apinheiro
/src/broadcom/ @itoral @apinheiro
/src/gallium/drivers/v3d/ @itoral @chema @jasuarez
/src/gallium/drivers/vc4/ @itoral @chema @jasuarez
# Freedreno
/src/gallium/drivers/freedreno/ @robclark
@ -141,7 +133,6 @@ gitlab-ci*.yml @eric
/include/drm-uapi/i915_drm.h @kwg @llandwerlin @idr
/include/pci_ids/i*_pci_ids.h @kwg @llandwerlin @idr
/src/intel/ @kwg @llandwerlin @idr
/src/intel/compiler/jay/ @alyssa @kwg
/src/gallium/winsys/iris/ @kwg @llandwerlin @idr
/src/gallium/drivers/iris/ @kwg @llandwerlin @idr
/src/gallium/drivers/i915/ @anholt
@ -150,15 +141,12 @@ gitlab-ci*.yml @eric
/src/kosmickrisp @aitor
/src/kosmickrisp/compiler @agoldmints
# Lima
/src/gallium/drivers/lima/ @enunes @anarsoul
# Microsoft
/src/microsoft/ @jenatali
/src/gallium/drivers/d3d12/ @jenatali
# Panfrost
/src/panfrost/ @bbrezillon @larsivsi @chrpil
/src/panfrost/ @bbrezillon
/src/panfrost/midgard @italove
/src/gallium/drivers/panfrost/ @bbrezillon

View file

@ -1 +1 @@
26.2.0-devel
26.0.5

View file

@ -94,7 +94,6 @@ MESON_GEN_NINJA := \
-Dgbm-backends-path=/vendor/$(MESA3D_LIB_DIR) \
-Degl=$(if $(BOARD_MESA3D_GALLIUM_DRIVERS),enabled,disabled) \
-Dllvm=$(if $(MESON_GEN_LLVM_STUB),enabled,disabled) \
-Damdgpu-virtio=$(if $(filter true,$(BOARD_MESA3D_AMDGPU_VIRTIO)),true,false)\
-Dcpp_rtti=false \
-Dlmsensors=disabled \
-Dandroid-libbacktrace=disabled \

View file

@ -429,7 +429,7 @@ def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Tool to trigger a subset of container jobs "
+ "and monitor the progress of a test job",
epilog="Example: %(prog)s --rev $(git rev-parse HEAD) "
epilog="Example: mesa-monitor.py --rev $(git rev-parse HEAD) "
+ '--target ".*traces" ',
)
parser.add_argument(

View file

@ -11,4 +11,3 @@ rich==14.1.*
ruamel.yaml.clib==0.2.*
ruamel.yaml==0.17.*
tabulate==0.9.*
tomledit==1.*

View file

@ -17,8 +17,6 @@ import re
import json
import sys
from ruamel.yaml import YAML
from subprocess import check_output
from tomledit import Document
import gitlab
from gitlab_common import (get_gitlab_project, read_token, wait_for_pipeline,
@ -29,121 +27,6 @@ from rich import print
DESCRIPTION_FILE = "export PIGLIT_REPLAY_DESCRIPTION_FILE=.*/install/(.*)$"
DEVICE_NAME = "(?:declare -x|export) PIGLIT_REPLAY_DEVICE_NAME='?([^']*)'?$"
def gather_job_results_yml(cur_job):
log: list[str] = cur_job.trace().decode().splitlines()
filename: str = ''
dev_name: str = ''
for logline in log:
desc_file = re.search(DESCRIPTION_FILE, logline)
device_name = re.search(DEVICE_NAME, logline)
if desc_file:
filename = desc_file.group(1)
if device_name:
dev_name = device_name.group(1)
if not filename or not dev_name:
print("[red]Couldn't find device name or YML file in the logs!")
return
print(f"👁 Found {dev_name} and file {filename}")
# find filename in Mesa source
traces_file = glob.glob('./**/' + filename, recursive=True)
# write into it
with open(traces_file[0], 'r', encoding='utf-8') as target_file:
yaml = YAML()
yaml.compact(seq_seq=False, seq_map=False)
yaml.version = 1,2
yaml.width = 2048 # do not break the text fields
yaml.default_flow_style = None
target = yaml.load(target_file)
# parse artifact
results_json_bz2 = cur_job.artifact("results/results.json.bz2")
results_json = bz2.decompress(results_json_bz2).decode("utf-8", errors="replace")
results = json.loads(results_json)
for _, value in results["tests"].items():
if (
not value['images'] or
not value['images'][0] or
"image_desc" not in value['images'][0]
):
continue
trace: str = value['images'][0]['image_desc']
checksum: str = value['images'][0]['checksum_render']
if not checksum:
print(f"[red]{dev_name}: {trace}: checksum is missing! Crash?")
continue
if checksum == "error":
print(f"[red]{dev_name}: {trace}: crashed")
continue
if target['traces'][trace][dev_name].get('checksum') == checksum:
continue
if "label" in target['traces'][trace][dev_name]:
print(
f"{dev_name}: {trace}: please verify that label "
f"[blue]{target['traces'][trace][dev_name]['label']}[/blue] "
"is still valid"
)
print(f"[green]{dev_name}: {trace}: checksum updated")
target['traces'][trace][dev_name]['checksum'] = checksum
with open(traces_file[0], 'w', encoding='utf-8') as target_file:
yaml.dump(target, target_file)
def update_toml_checksum(toml_file, trace_path, device, old_checksum, new_checksum):
with open(toml_file, 'r', encoding='utf-8') as f:
doc = Document.parse(f.read())
for table in doc["traces"]:
if table["path"].value != trace_path:
continue
try:
table["devices"][device]["checksum"] = new_checksum
except KeyError:
return False
with open(toml_file, 'w', encoding='utf-8') as f:
f.write(doc.as_toml())
return True
return False
def gather_job_results_toml(cur_job) -> None:
"""Process checksum-changes.json artifact (gpu-trace-perf replay format)"""
toml_files = glob.glob('./**/traces-*.toml', recursive=True)
changes_json = cur_job.artifact("results/checksum-changes.json")
changes = json.loads(changes_json.decode("utf-8"))
for change in changes:
device = change['device']
trace = change['trace']
old_checksum = change['old_checksum']
new_checksum = change['new_checksum']
if not new_checksum:
print(f"[red]{device}: {trace}: no new checksum (crash?)")
continue
updated = False
for toml_file in toml_files:
if update_toml_checksum(toml_file, trace, device, old_checksum, new_checksum):
print(f"[green]{device}: {trace}: checksum updated")
updated = True
break
if not updated:
print(f"[red]{device}: {trace}: not found in any traces TOML file")
def gather_results(
project,
@ -151,17 +34,81 @@ def gather_results(
) -> None:
"""Gather results"""
target_jobs_regex = re.compile(".*-traces(-restricted)?([:].*)?$")
target_jobs_regex = re.compile(".*-traces([:].*)?$")
for job in pipeline.jobs.list(all=True, sort="desc"):
if target_jobs_regex.match(job.name) and job.status == "failed":
cur_job = project.jobs.get(job.id)
# get variables
print(f"👁 {job.name}...")
try:
gather_job_results_toml(cur_job)
except Exception:
gather_job_results_yml(cur_job)
log: list[str] = cur_job.trace().decode().splitlines()
filename: str = ''
dev_name: str = ''
for logline in log:
desc_file = re.search(DESCRIPTION_FILE, logline)
device_name = re.search(DEVICE_NAME, logline)
if desc_file:
filename = desc_file.group(1)
if device_name:
dev_name = device_name.group(1)
if not filename or not dev_name:
print("[red]Couldn't find device name or YML file in the logs!")
return
print(f"👁 Found {dev_name} and file {filename}")
# find filename in Mesa source
traces_file = glob.glob('./**/' + filename, recursive=True)
# write into it
with open(traces_file[0], 'r', encoding='utf-8') as target_file:
yaml = YAML()
yaml.compact(seq_seq=False, seq_map=False)
yaml.version = 1,2
yaml.width = 2048 # do not break the text fields
yaml.default_flow_style = None
target = yaml.load(target_file)
# parse artifact
results_json_bz2 = cur_job.artifact("results/results.json.bz2")
results_json = bz2.decompress(results_json_bz2).decode("utf-8", errors="replace")
results = json.loads(results_json)
for _, value in results["tests"].items():
if (
not value['images'] or
not value['images'][0] or
"image_desc" not in value['images'][0]
):
continue
trace: str = value['images'][0]['image_desc']
checksum: str = value['images'][0]['checksum_render']
if not checksum:
print(f"[red]{dev_name}: {trace}: checksum is missing! Crash?")
continue
if checksum == "error":
print(f"[red]{dev_name}: {trace}: crashed")
continue
if target['traces'][trace][dev_name].get('checksum') == checksum:
continue
if "label" in target['traces'][trace][dev_name]:
print(
f"{dev_name}: {trace}: please verify that label "
f"[blue]{target['traces'][trace][dev_name]['label']}[/blue] "
"is still valid"
)
print(f"[green]{dev_name}: {trace}: checksum updated")
target['traces'][trace][dev_name]['checksum'] = checksum
with open(traces_file[0], 'w', encoding='utf-8') as target_file:
yaml.dump(target, target_file)
def parse_args() -> None:
@ -171,7 +118,7 @@ def parse_args() -> None:
epilog="Example: update_traces_checksum.py --rev $(git rev-parse HEAD) "
)
parser.add_argument(
"--rev", metavar="revision", help="repository git revision", default='HEAD'
"--rev", metavar="revision", help="repository git revision",
)
parser.add_argument(
"--token",
@ -206,9 +153,8 @@ if __name__ == "__main__":
if not args.rev:
print('error: the following arguments are required: --rev')
sys.exit(1)
sha = check_output(['git', 'rev-parse', args.rev]).decode('ascii').strip()
print(f"Revision: {sha}")
(pipe, cur_project) = wait_for_pipeline([cur_project], sha)
print(f"Revision: {args.rev}")
(pipe, cur_project) = wait_for_pipeline([cur_project], args.rev)
print(f"Pipeline: {pipe.web_url}")
gather_results(cur_project, pipe)

View file

@ -1,171 +0,0 @@
#!/usr/bin/python3
#
# Copyright 2026 Intel Corporation
# SPDX-License-Identifier: MIT
import argparse
import os
import sys
import subprocess
ALIASES = {
"amd": "gfx1201",
"asahi": "m1",
"freedreno": "a750",
"intel": "lnl",
"lima": "lima-mali450",
"nouveau": "turing",
"v3d": "rpi5",
"vc4": "rpi3",
"a3xx": "a306",
"a5xx": "a530",
"a6xx": "a660",
"a7xx": "a750",
"lima-mali450": "mali450",
"panfrost-t860": "t860",
"panfrost-g52": "g52",
"panfrost-g57": "g57",
"panfrost-g72": "g72",
"panfrost-g610": "g610",
"panfrost-g925": "g925",
}
TARGETS = {
"stoney": ["amd", "STONEY"],
"raven": ["amd", "RAVEN2"],
"cezanne": ["amd", "RENOIR"],
"mendocino": ["amd", "RAPHAEL_MENDOCINO"],
"vangogh": ["amd", "VANGOGH"],
"navi21": ["amd", "NAVI21"],
"navi31": ["amd", "NAVI31"],
"gfx1201": ["amd", "GFX1201"],
"m1": ["asahi", None],
"a306": ["freedreno", "307"],
"a530": ["freedreno", "530"],
"a618": ["freedreno", "618"],
"a660": ["freedreno", "660"],
"a750": ["freedreno", "750"],
"skl": ["intel", "skl"],
"apl": ["intel", "apl"],
"glk": ["intel", "glk"],
"kbl": ["intel", "kbl"],
"jsl": ["intel", "jsl"],
"tgl": ["intel", "tgl"],
"adl": ["intel", "adl"],
"rpl": ["intel", "rpl"],
"lnl": ["intel", "lnl"],
"ptl": ["intel", "ptl"],
"mali450": ["lima", None],
"turing": ["nouveau", "160"],
"t860": ["panfrost", "860"],
"g52": ["panfrost", "7212"],
"g57": ["panfrost", "9093"],
"g72": ["panfrost", "6221"],
"g610": ["panfrost", "a867"],
"g925": ["panfrost", "d830:4"],
"rpi4": ["v3d", "42"],
"rpi5": ["v3d", "71"],
"rpi3": ["vc4", None],
}
LD_PRELOAD = {
"amd": "src/amd/drm-shim/libamdgpu_noop_drm_shim.so",
"asahi": "src/asahi/drm-shim/libasahi_noop_drm_shim.so",
"freedreno": "src/freedreno/drm-shim/libfreedreno_noop_drm_shim.so",
"intel": "src/intel/tools/libintel_noop_drm_shim.so",
"nouveau": "src/nouveau/drm-shim/libnouveau_noop_drm_shim.so",
"panfrost": "src/panfrost/drm-shim/libpanfrost_noop_drm_shim.so",
"v3d": "src/broadcom/drm-shim/libv3d_noop_drm_shim.so",
"vc4": "src/broadcom/drm-shim/libvc4_noop_drm_shim.so",
}
SHIM_VAR = {
"amd": "AMDGPU_GPU_ID",
"freedreno": "FD_GPU_ID",
"intel": "INTEL_STUB_GPU_PLATFORM",
"nouveau": "NOUVEAU_CHIPSET",
"panfrost": "PAN_GPU_ID",
"v3d": "V3D_GPU_ID",
}
DISASM = {
"amd": [("AMD_DEBUG", "vs,ps,gs,tcs,tes,cs,ts,ms,nir,aco,asm"), ("RADV_DEBUG", "shaders")],
"asahi": [("AGX_MESA_DEBUG", "shaders")],
"freedreno": [("IR3_SHADER_DEBUG", "disasm")],
"intel": [("INTEL_DEBUG", "vs,tcs,tes,gs,fs,cs,mesh,task,rt")],
"nouveau": [("NAK_DEBUG", "print")],
"panfrost": [
("MIDGARD_MESA_DEBUG", "shaders"),
("BIFROST_MESA_DEBUG", "shaders")
],
"vc4": [("VC4_DEBUG", "nir,vir,qpu")],
"v3d": [("V3D_DEBUG", "nir,vir,qpu")],
}
if __name__ == "__main__":
epilog = "Known GPUs: " + ' '.join([f'{target}' for target in TARGETS])
parser = argparse.ArgumentParser(
prog='drm-shim',
description='Run a program under drm-shim',
epilog=epilog)
parser.add_argument('gpu', help="Driver name, CI job or GPU model")
parser.add_argument('-d', '--disasm', action='store_true',
help="Disassemble shaders")
parser.add_argument('-z', '--zink', action='store_true',
help="Use Zink for OpenGL instead of the native driver")
args, rest = parser.parse_known_args()
command = ' '.join(rest)
build = os.environ.get('DRM_SHIM_PATH')
if build is None:
print("Must run inside a Mesa meson devenv")
sys.exit(1)
# Force zink for zink CI jobs
if args.gpu.startswith('zink-'):
args.zink = True
# Drop common CI job prefixes/suffixes
prefixes = ["zink-", "anv-", "radv-", "tu-", "radeonsi-"]
suffixes = ["-valve", "-gl", "-gles", "-gles2",
"-vk", "-piglit", "-glcts", "-vkcts"]
for prefix in prefixes:
args.gpu = args.gpu.removeprefix(prefix)
for suffix in suffixes:
args.gpu = args.gpu.removesuffix(suffix)
if args.gpu in ALIASES:
args.gpu = ALIASES[args.gpu]
if args.gpu not in TARGETS:
print(f"Unknown target {args.gpu}")
sys.exit(1)
driver, model = TARGETS[args.gpu]
env = os.environ.copy()
env['LD_PRELOAD'] = f'{build}/{LD_PRELOAD[driver]}'
if model is not None:
env[SHIM_VAR[driver]] = model
if args.zink:
env['MESA_LOADER_DRIVER_OVERRIDE'] = 'zink'
if args.disasm:
for (key, val) in DISASM[driver]:
env[key] = val
subprocess.call(command, env=env, shell=True)

View file

@ -40,7 +40,6 @@ import docutils.utils
import docutils.parsers.rst.states as states
CURRENT_GL_VERSION = '4.6'
CURRENT_CL_VERSION = '3.1'
CURRENT_VK_VERSION = '1.4'
TEMPLATE = Template(textwrap.dedent("""\
@ -62,10 +61,6 @@ TEMPLATE = Template(textwrap.dedent("""\
${gl_version} is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa ${this_version} implements the OpenCL ${cl_version} API, but the version reported by
the CL_DEVICE_VERSION, CL_DEVICE_NUMERIC_VERSION and CL_DEVICE_OPENCL_C_ALL_VERSIONS
clGetDeviceInfo queries depends on the particular driver being used.
Mesa ${this_version} implements the Vulkan ${vk_version} API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
@ -370,7 +365,6 @@ async def main() -> None:
changes=walk_shortlog(shortlog),
features=get_features(is_point_release),
gl_version=CURRENT_GL_VERSION,
cl_version=CURRENT_CL_VERSION,
this_version=this_version,
header=header,
header_underline=header_underline,

View file

@ -164,32 +164,21 @@ SOURCES = [
'api': 'opencl',
'inc_folder': 'CL',
'sources': [
Source('include/CL/opencl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/opencl.h'),
Source('include/CL/cl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl.h'),
Source('include/CL/cl_platform.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_platform.h'),
Source('include/CL/cl_gl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_gl.h'),
Source('include/CL/cl_gl_ext.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_gl_ext.h'),
Source('include/CL/cl_ext.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_ext.h'),
Source('include/CL/cl_version.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_version.h'),
Source('include/CL/cl_icd.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_icd.h'),
Source('include/CL/cl_egl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_egl.h'),
Source('include/CL/cl_d3d10.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_d3d10.h'),
Source('include/CL/cl_d3d11.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_d3d11.h'),
Source('include/CL/cl_dx9_media_sharing.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_dx9_media_sharing.h'),
Source('include/CL/cl_dx9_media_sharing_intel.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_dx9_media_sharing_intel.h'),
Source('include/CL/cl_egl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_egl.h'),
Source('include/CL/cl_ext.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_ext.h'),
Source('include/CL/cl_ext_intel.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_ext_intel.h'),
Source('include/CL/cl_function_types.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_function_types.h'),
Source('include/CL/cl_gl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_gl.h'),
Source('include/CL/cl_gl_ext.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_gl_ext.h'),
Source('include/CL/cl_half.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_half.h'),
Source('include/CL/cl_icd.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_icd.h'),
Source('include/CL/cl_layer.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_layer.h'),
Source('include/CL/cl_platform.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_platform.h'),
Source('include/CL/cl_va_api_media_sharing_intel.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_va_api_media_sharing_intel.h'),
Source('include/CL/cl_version.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/cl_version.h'),
Source('include/CL/opencl.h', 'https://github.com/KhronosGroup/OpenCL-Headers/raw/main/CL/opencl.h'),
],
},
{
'api': 'opencl_intel',
'inc_folder': 'CL_intel',
'sources': [
Source('include/CL_intel/cl_ext_private.h', 'https://github.com/intel/compute-runtime/raw/master/opencl/extensions/public/cl_ext_private.h'),
],
},

View file

@ -78,7 +78,7 @@ lcagustini, lucas.c.agustini@gmail.com, lcagustini
Leonard Göhrs, l.goehrs@pengutronix.de, hnez
Lionel Landwerlin, lionel.g.landwerlin@intel.com, llandwerlin
liuqiang, liuqiang@kylinos.cn, genhoayi
Lorenzo Rossi, lorenzo.rossi@collabora.com, SnowyCoder
Lorenzo Rossi, snowycoder@gmail.com, SnowyCoder
Lucas De Marchi, lucas.demarchi@intel.com, demarchi
Lucas Stach, dev@lynxeye.de, lynxeye
Lukas Lipp, lippls@hotmail.com, fknfilewalker

1 Aaron Ruby aruby@qnx.com aruby
78 Leonard Göhrs l.goehrs@pengutronix.de hnez
79 Lionel Landwerlin lionel.g.landwerlin@intel.com llandwerlin
80 liuqiang liuqiang@kylinos.cn genhoayi
81 Lorenzo Rossi lorenzo.rossi@collabora.com snowycoder@gmail.com SnowyCoder
82 Lucas De Marchi lucas.demarchi@intel.com demarchi
83 Lucas Stach dev@lynxeye.de lynxeye
84 Lukas Lipp lippls@hotmail.com fknfilewalker

View file

@ -76,7 +76,6 @@ if __name__ == "__main__":
description='Add review trailers')
parser.add_argument('person', nargs='+', help="Reviewer's username, first name, or full name")
parser.add_argument('-a', '--ack', action='store_true', help="Apply an acked-by tag")
parser.add_argument('-t', '--test', action='store_true', help="Apply an tested-by tag")
parser.add_argument('-d', '--dry-run', action='store_true',
help="Print trailer without applying")
parser.add_argument('-r', '--rebase', nargs='?',
@ -89,8 +88,6 @@ if __name__ == "__main__":
relevant_args = [sys.argv[0]]
if args.ack:
relevant_args.append("--ack")
elif args.test:
relevant_args.append("--test")
relevant_args += args.person
@ -110,12 +107,7 @@ if __name__ == "__main__":
if person is None:
print(f'Could not uniquely identify {p}, skipping')
trailer = 'Reviewed-by'
if args.ack:
trailer = 'Acked-by'
elif args.test:
trailer = 'Tested-by'
trailer = 'Acked-by' if args.ack else 'Reviewed-by'
trailer = f'{trailer}: {person[0]} <{person[1]}>'
if args.dry_run:

Some files were not shown because too many files have changed in this diff Show more