Compare commits

..

305 Commits

Author SHA1 Message Date
Eric Engestrom
02d708024f VERSION: bump for 25.1.2 2025-06-04 17:10:29 +02:00
Eric Engestrom
504560fe3c docs: add release notes for 25.1.2 2025-06-04 17:10:29 +02:00
Iago Toral Quiroga
39603d3b9d broadcom/compiler: handle moving last ubo load in the block correctly
Before we move a UBO load to a previous location in the block we take a
reference to the instruction after it so we can continue the loop from
there, however, if the load we just moved was already the last instruction
in the block we just want to break the loop right there.

Fixes crashes with shaders from http://flightradar24.com

Fixes: 8998666de7 ("broadcom/compiler: sort constant UBO loads by index and offset")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35333>
(cherry picked from commit c059c721fb)
2025-06-04 15:52:50 +02:00
Georg Lehmann
260b5112f4 nir/opt_if: limit rewrite_uniform_uses iand recursion
https://github.com/doitsujin/dxvk/issues/4970 has a shader
where unrolled loops caused large iand chains and if we don't
limit this  we won't finish compiling in reasonable time.

Cc: mesa-stable

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35312>
(cherry picked from commit 1c4070f3e9)
2025-06-04 15:52:50 +02:00
Georg Lehmann
f29d2c921a nir/opt_if: don't replace constant uses with other uniform values
If constant folding wasn't run, this could replace constant uses with different
constants.

Additional, it could also create worse code for "if (subgroupXor(1) == 1)".

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

Cc: mesa-stable

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35312>
(cherry picked from commit eaeaf9554d)
2025-06-04 15:52:50 +02:00
Lionel Landwerlin
994dd51b3b brw: fix brw_nir_fs_needs_null_rt helper
In 9b42215e0d ("iris: ensure null render target for specific cases") I
wrongly assumed that writing gl_SampleMask would only happen in
multisampled cases.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9b42215e0d ("iris: ensure null render target for specific cases")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13292
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35313>
(cherry picked from commit 79498a0849)
2025-06-04 15:52:50 +02:00
Samuel Pitoiset
c706d8e03c radv: set radv_zero_vram=true for GPUScore: Breaking limit
To workaroung application bugs that can cause GPU hangs.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11495
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35308>
(cherry picked from commit c26c9c6296)
2025-06-04 15:52:50 +02:00
Lionel Landwerlin
0b073e18e3 brw: don't generate invalid instructions
0e3e5146cf ("intel/brw: Use correct instruction for value change check
when coalescing") enabled some new cases that exposed a pre-existing
bug that would turn something like this :

      mul.sat(16) %789:F, %787:F, %788:F
      mov.g.f0.0(16) %790:F, %789:F
      (+f0.0) sel(16) %800:UD, %790:UD, 0u

into this :

      mul.sat(16) %790:F, %787:F, %788:F
      mov.g.f0.0(16) null:F, null<8,8,1>:F
      (+f0.0) sel(16) %800:UD, %790:UD, 0u

The mov[] array can contain the same instruction because it's repeated
for each REG_SIZE writes and a SIMD16 instruction will write 2
REG_SIZE.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0e3e5146cf ("intel/brw: Use correct instruction for value change check when coalescing")
Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35276>
(cherry picked from commit a51d061c00)
2025-06-04 15:52:50 +02:00
Mauro Rossi
666fd6bc51 Revert "android: Link with libc++fs up to SDK 35"
This reverts commit 84cae30f0a.

 Conflicts:
	android/Android.mk

Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35208>
(cherry picked from commit 7e523b4400)
2025-06-04 15:52:50 +02:00
Mauro Rossi
2e9fca424f llvmpipe: Use mkdir instead of std::filesystem::create_directory on Android
libc++fs symbols are not available to vendor modules up to Android 15
this patch allows to build llvmpipe as module for Android 14 and older

Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35208>
(cherry picked from commit 9fd6bae3c4)
2025-06-04 15:52:50 +02:00
Mauro Rossi
f4977849c0 llvmpipe: Define LP_NIR_SHADER_DUMP_DIR differently on Android
Reference Android temporary path /data/local/tmp is used for Android builds

Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35208>
(cherry picked from commit 4aafb5fcc3)
2025-06-04 15:52:50 +02:00
Mike Blumenkrantz
99aa2c4ce5 lavapipe: undo fb remapping before poisoning memory at end of renderpass
in a scenario like:
* begin_rendering(cbuf1:store=DONTCARE, cbuf2)
* draw
* remap(cbuf2, NULL)
* draw
* end_rendering

cbuf1 will be poisoned at the end of the renderpass, but the corresponding
clear call to trigger the poisoning will not be able to detect that this
texture is being written by an async fs, causing a write hazard

unremapping the fb here ensures that all attachments are fb-referenced
as expected in order to guarantee threads sync before memory is poisoned

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35319>
(cherry picked from commit d8a6ec5985)
2025-06-04 15:52:50 +02:00
Connor Abbott
30631106c4 tu: Use safe-const GS variant for VPC binning state
When binning with a GS, both VS and GS are active. This means that we
could have to use the safe-const variant for the GS. However we only
emitted VPC state for the binning case with the "normal" GS variant.
Emit the VPC state with the safe-const variant too, and select between
the state variants at link time.

This fixes a few tests like
dEQP-VK.spirv_assembly.instruction.graphics.8bit_storage.32struct_to_8struct.uniform_uint_geom
with TU_DEBUG=gmem,forcebin.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35294>
(cherry picked from commit 723a1fabac)
2025-06-04 15:52:50 +02:00
Karol Herbst
cb058e4b63 rusticl/memory: properly set pipe_image_view::access
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13294
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35305>
(cherry picked from commit f663e3330c)
2025-06-04 15:52:50 +02:00
Karol Herbst
ef0df70f62 rusticl/kernel: implement CL_INVALID_ARG_VALUE for image args in clSetKernelArg
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35305>
(cherry picked from commit 868ae6a262)
2025-06-04 15:52:49 +02:00
Georg Lehmann
250f423546 aco: clamp exponent of 16bit ldexp
The hw uses only a 16bit int, but NIR's src is 32bit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34073>
(cherry picked from commit a6675f35b2)
2025-06-04 15:52:49 +02:00
Juan A. Suarez Romero
b4cdd0e929 v3dv: consider render area when configuring supertiles
If the render area is restricted to a section of the framebuffer, there
is no need to consider all the framebuffer size when configuring the
supertiles, as only the supertiles coordinates of the affected area will
be submitted.

This allow to create supertiles smaller than the ones in case
considering the full screen, reducing the tiles that need to be
processed.

This also fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/13218.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35257>
(cherry picked from commit d30a6f8102)
2025-06-04 15:52:49 +02:00
Juan A. Suarez Romero
6685e04d8c v3d,v3dv: set max supertiles to 256
So far the driver was configuring the supertiles to be less than 256.
But actually, there can be up to 256, not strictly less than 256.

There is one restriction though: the frame width or height in supertiles
must be less than 256.

It also moves this limit to the limits file, which is shared by v3d and
v3dv.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35257>
(cherry picked from commit 2cac70558d)
2025-06-04 15:52:49 +02:00
Mary Guillemard
674726caa1 pan/bi: Stop writing pan_shader_info:🆚:idvs on non VS stages
We were unconditionally writing to vs anonymous union on other stages
than VS. this was not causing issues as pan_shader_compile
unconditionally overrite the value for fragment shaders and compute
shaders union is too small to be affecte.

Fixes: 1d21de788d ("pan/bi: Specialize shaders for IDVS")
Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34758>
(cherry picked from commit 4100f1d08a)
2025-06-04 15:52:49 +02:00
Rhys Perry
fe597d9e53 nir: fix unpack_unorm_2x16/unpack_snorm_2x16 constant folding
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35255>
(cherry picked from commit 6852538ba0)
2025-06-04 15:52:49 +02:00
Faith Ekstrand
e8c614b88e vulkan/pipeline: Hash null descriptor robustness info
Fixes: 6ae401aa86 ("vulkan: Add null descriptor bits to vk_pipeline_robustness_state")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34967>
(cherry picked from commit 347e957b44)
2025-06-04 15:52:49 +02:00
Natalie Vock
658a1624a8 radv/rt: Report 256 byte alignment for scratch
This mirrors AMDVLK. 128-byte alignment is possible, but DOOM: The Dark
Ages screws up scratch allocation with alignments <256 bytes.

Fixes hangs in DOOM: The Dark Ages.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35152>
(cherry picked from commit dac6f09451)
2025-06-04 15:52:49 +02:00
Jordan Justen
88e58951db intel/dev: Add PTL PCI IDs 0xb084-0xb087
Ref: linux v6.15 027a362fb36b ("drm/xe/ptl: Update the PTL pci id table")
Ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.15&id=027a362fb36b479030beecbaaec30711ddabf8fa
Ref: bspec 72574
Backport-to: 25.1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35226>
(cherry picked from commit d84d7b78e4)
2025-06-04 15:52:49 +02:00
Jonathan Gray
6566894300 vulkan: add missing include for FALLTHROUGH
When CLOCK_MONOTONIC_RAW and CLOCK_MONOTONIC_FAST are not
defined FALLTHROUGH is used.  Add the include for the define.
Fixes the build on OpenBSD.

Fixes: 3bc7564bb0 ("vulkan: add vk_device_get_timestamp")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35145>
(cherry picked from commit ca33127652)
2025-06-04 15:52:49 +02:00
Mike Blumenkrantz
7e2e576c32 zink: unlock instance mutex if creation fails
avoids a deadlock

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35292>
(cherry picked from commit cb6dfc4169)
2025-06-04 15:52:49 +02:00
Mike Blumenkrantz
c85b640fdb d3d10umd: stop using pipe_surface::width/height
these were deleted months ago

Fixes: 9d359c6d10 ("gallium: delete pipe_surface::width and pipe_surface::height")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
(cherry picked from commit 561fed955b)
2025-06-04 15:52:49 +02:00
David Rosca
3b3e051ba5 radv/video: Set correct minCodedExtent for encode
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35261>
(cherry picked from commit 25f7996395)
2025-06-04 15:52:49 +02:00
Samuel Pitoiset
8537a314f6 radv,radeonsi: emit UPDATE_DB_SUMMARIZER_TIMEOUT on GFX12
This try to mitigate the HiZ GPU hang by increasing a timeout. Loosely
based on PAL but I can confirm it delays the hang when
BOTTOM_OF_PIPE_TS is used as a workaround.

This must be emitted when the GFX queue is idle.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35212>
(cherry picked from commit 47f5d25f93)
2025-06-04 15:52:49 +02:00
Maíra Canal
f50f92716f v3d: make sure all jobs are done before destroying the context
Currently, Mesa CI is reporting the following kernel OOPS in the RPi 4:

[  800.139824] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000588
[  800.148619] Mem abort info:
[  800.151402]   ESR = 0x0000000096000005
[  800.155141]   EC = 0x25: DABT (current EL), IL = 32 bits
[  800.160444]   SET = 0, FnV = 0
[  800.163488]   EA = 0, S1PTW = 0
[  800.166619]   FSC = 0x05: level 1 translation fault
[  800.171487] Data abort info:
[  800.174357]   ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
[  800.179832]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[  800.184873]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[  800.190176] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001014c2000
[  800.196607] [0000000000000588] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[  800.205305] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
[  800.211564] Modules linked in: vc4 snd_soc_hdmi_codec drm_display_helper v3d cec gpu_sched drm_dma_helper drm_shmem_helper drm_kms_helper drm drm_panel_orientation_quirks snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm i2c_brcmstb snd_timer snd backlight
[  800.234448] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.25+rpt-rpi-v8 #1  Debian 1:6.12.25-1+rpt1
[  800.244182] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT)
[  800.250005] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  800.256959] pc : v3d_job_update_stats+0x60/0x130 [v3d]
[  800.262112] lr : v3d_job_update_stats+0x48/0x130 [v3d]
[  800.267251] sp : ffffffc080003e60
[  800.270555] x29: ffffffc080003e60 x28: ffffffd842784980 x27: 0224012000000000
[  800.277687] x26: ffffffd84277f630 x25: ffffff81012fd800 x24: 0000000000000020
[  800.284818] x23: ffffff8040238b08 x22: 0000000000000570 x21: 0000000000000158
[  800.291948] x20: 0000000000000000 x19: ffffff8040238000 x18: 0000000000000000
[  800.299078] x17: ffffffa8c1bd2000 x16: ffffffc080000000 x15: 0000000000000000
[  800.306208] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  800.313338] x11: 0000000000000040 x10: 0000000000001a40 x9 : ffffffd83b39757c
[  800.320468] x8 : ffffffd842786420 x7 : 7fffffffffffffff x6 : 0000000000ef32b0
[  800.327598] x5 : 00ffffffffffffff x4 : 0000000000000015 x3 : ffffffd842784980
[  800.334728] x2 : 0000000000000004 x1 : 0000000000010002 x0 : 000000ba4c0ca382
[  800.341859] Call trace:
[  800.344294]  v3d_job_update_stats+0x60/0x130 [v3d]
[  800.349086]  v3d_irq+0x124/0x2e0 [v3d]
[  800.352835]  __handle_irq_event_percpu+0x58/0x218
[  800.357539]  handle_irq_event+0x54/0xb8
[  800.361369]  handle_fasteoi_irq+0xac/0x240
[  800.365458]  handle_irq_desc+0x48/0x68
[  800.369200]  generic_handle_domain_irq+0x24/0x38
[  800.373810]  gic_handle_irq+0x48/0xd8
[  800.377464]  call_on_irq_stack+0x24/0x58
[  800.381379]  do_interrupt_handler+0x88/0x98
[  800.385554]  el1_interrupt+0x34/0x68
[  800.389123]  el1h_64_irq_handler+0x18/0x28
[  800.393211]  el1h_64_irq+0x64/0x68
[  800.396603]  default_idle_call+0x3c/0x168
[  800.400606]  do_idle+0x1fc/0x230
[  800.403827]  cpu_startup_entry+0x40/0x50
[  800.407742]  rest_init+0xe4/0xf0
[  800.410962]  start_kernel+0x5e8/0x790
[  800.414616]  __primary_switched+0x80/0x90
[  800.418622] Code: 8b170277 8b160296 11000421 b9000861 (b9401ac1)
[  800.424707] ---[ end trace 0000000000000000 ]---
[  800.429316] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[  800.436181] SMP: stopping secondary CPUs
[  800.440097] Kernel Offset: 0x17c1000000 from 0xffffffc080000000
[  800.446007] PHYS_OFFSET: 0x0
[  800.448877] CPU features: 0x08,00002013,c0200000,0200421b
[  800.454267] Memory Limit: none
[  800.457313] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---

The NULL pointer in question is the `job->file`, which represents the
DRM state for a file descriptor. This means that the process is
finishing before the job completes.

To avoid such issue, make sure all jobs are done before flushing the
jobs when destroying the context.

Backport-to: 25.1
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35233>
(cherry picked from commit 9e4e8542d4)
2025-06-04 15:52:48 +02:00
Robert Mader
516b00530d egl: Fixes for eglQueryContext and RESET_NOTIFICATION_STRATEGY
Streamline the conditions for when `RESET_NOTIFICATION_STRATEGY_EXT` can
be queried to match the conditions when it can be set - notably only
with GLES.

While on it, add support to query the KHR and suffix-less versions.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35242>
(cherry picked from commit afd6788036)
2025-06-04 15:52:48 +02:00
Robert Mader
2ce5cd09e5 egl: Remove check for GL or GLES
They are the only APIs supported these days and, most likely,
going forward.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35242>
(cherry picked from commit ba1bd9aed8)
2025-06-04 15:52:48 +02:00
Sviatoslav Peleshko
b843ba4bf1 intel/brw: Use correct instruction for value change check when coalescing
When we have partial VGRF MOVs with offsets, we will reach
`channels_remaining == 0` with `inst` that is not writing the whole VGRF.
Currently, even though we check `can_coalesce_vars()` for each offset
separately, it will always check if the dst value is not changed only
for the offset from the instruction that satisfied the
`channels_remaining == 0` condition.

Instead, we should remember and use the correct instruction for each
written offset separately.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10916
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35062>
(cherry picked from commit 0e3e5146cf)
2025-06-04 15:52:48 +02:00
Mel Henning
eacca4b1ec nak: Don't swap f2fp sources in legalize
The order of these is important.

Fixes: e19871bd6a ("nak: Use F2FP for nir_op_pack_half_2x16_split on SM86+")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12717
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35267>
(cherry picked from commit aae67ab678)
2025-06-04 15:52:48 +02:00
Mel Henning
a77ee5440a nak: Forbid reordering labeled OpNop
Totals:
Static cycle count: 1104322907 -> 1108862573 (+0.41%)

Totals from 111376 (56.68% of 196502) affected shaders:
Static cycle count: 948085895 -> 952625561 (+0.48%)

Fixes: 79d0f8263d ("nak: Add a simple postpass instruction scheduler")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35141>
(cherry picked from commit 018f4f1c27)
2025-06-04 15:52:48 +02:00
Eric Engestrom
e6c03f1755 .pick_status.json: Mark f0dde6ca7f as denominated 2025-06-04 15:52:48 +02:00
David Rosca
05f6b0f3bb radeonsi/vcn: Use picture fence in JPEG decode
The fence needs to be passed to frontend to make vaSyncSurface work
correctly.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35258>
(cherry picked from commit 3bb9905e7f)
2025-06-04 15:52:48 +02:00
Yao Zi
a18027acec radeonsi: Fix violation of aliasing rules in radeon_ws_bo_reference
Applications using Mesa built with LLVM 20.1.4 fail to start with
strange segmentfaults/bus errors when radeonsi driver is used. The last
piece of stacktrace looks like

  - pipe_reference_described
  - pipe_reference
  - radeon_bo_reference
  - radeon_ws_bo_reference
  - radeon_lookup_or_add_real_buffer

Coredump shows the pointer dst passed to pipe_reference_described() is
either unaligned or even invalid, which is the reason of crashing. The
crash goes away when Mesa is built without optimization.

Looking through the related functions, it's found that
radeon_ws_bo_reference() contains unsafe type cast from radeon_bo to
pb_buffer_lean: though the former's first field is just the later, this
violates strict aliasing rules as pb_buffer_lean isn't compatible with
radeon_bo. Such violation ultimately results in miscompilation.

Let's take the address of pb_buffer_lean field, avoiding the unsafe
cast. It's still required to cast pb_buffer_lean back to radeon_bo since
radeon_bo_reference may update the pointer, which is safe as radeon_bo
contains a pb_buffer_lean member and C language permits access members
through a pointer in type of the container.

Fixes: 6d913a2bcc ("r300,r600,radeonsi: switch to pb_buffer_lean")
Link: https://www.gnu.org/software/c-intro-and-ref/manual/html_node/Aliasing-Type-Rules.html
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35249>
(cherry picked from commit b1d81a7df1)
2025-06-04 15:52:48 +02:00
David Rosca
6676ae1a2d frontends/va: Fix H264 top/bottom is reference flags
All pics in the ReferenceFrames array should be references,
so there is no need to require the SHORT_TERM_REFERENCE flag
to actually treat them as references.
This fixes decoding with apps that doesn't set this flag,
eg. NoMachine remote desktop viewer (nxplayer).

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13229
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35186>
(cherry picked from commit a9a54632af)
2025-06-04 15:52:48 +02:00
Eric R. Smith
54caa53302 panfrost, panvk: fix G31 use of SHADER_MODE_EARLY_ZS_ALWAYS
PRE_POST_FRAME_SHADER_MODE_EARLY_ZS_ALWAYS was introduced in
architecture version 7.2, not 7.0 as we assumed. Using it on
G31 (a 7.0 device) caused some CTS failures.

Cc: mesa-stable
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34744>
(cherry picked from commit 13b35a3c9c)
2025-06-04 15:52:48 +02:00
Mike Blumenkrantz
6eb10b69a4 zink: fix queue transition check in check_for_layout_update()
this only applies if the resource has active binds, otherwise it triggers crashes

Fixes: 18d206d67c ("zink: Check queue families when binding image resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35234>
(cherry picked from commit 44bff7eb05)
2025-06-04 15:52:48 +02:00
Mike Blumenkrantz
af3a5a15d2 zink: also check for host-visible on staging uploads
this has strange mechanics on lavapipe

Fixes: e63acdd2b7 ("zink: force cached mem for streaming uploads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35239>
(cherry picked from commit d8d913c341)
2025-06-04 15:52:48 +02:00
Mel Henning
031c20e9d3 nvk: Call ensure_slm for nvk_cmd_dispatch_shader
Internal shaders can also use slm, so we need to allocate it correctly.

This fixes
dEQP-VK.dgc.ext.compute.misc.max_pc_range_256_full_preprocess_with_execution_set
with NAK_DEBUG=spill

Fixes: 105bdf2e36 ("nvk: Add a helper for dispatching compute shaders")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35143>
(cherry picked from commit 0e5880ebe4)
2025-06-04 15:52:48 +02:00
Faith Ekstrand
569459a804 nvk: Only allow importing mappable dma-bufs to HOST_VISIBLE types
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35213>
(cherry picked from commit 601cf33c44)
2025-06-04 15:52:48 +02:00
Olivia Lee
43b914aef4 panfrost: legalize afbc before zs and rt clears
In panfrost_clear_depth_stencil and panfrost_clear_render_target, we
start the blit context before binding the clear targets. If we don't
legalize AFBC beforehand, we get a recursive blit crash. panfrost_clear
does not need this because the resource should already be legalized in
panfrost_batch_add_surface.

Fixes the following piglit tests with pan_force_afbc_packing:
 - spec@arb_clear_texture@arb_clear_texture-base-formats
 - spec@arb_clear_texture@arb_clear_texture-simple
 - spec@arb_clear_texture@arb_clear_texture-sized-formats

Fixes: 17a62ff993 ("panfrost: legalize afbc before blitting")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34992>
(cherry picked from commit 104ea2e4cf)
2025-06-04 15:52:48 +02:00
Olivia Lee
b4d4799ce9 panfrost: fix assertion failure compiling image conversion shaders
In 59a3e12039, we changed the UBO->push optimization in panfrost to
only push UBOs that are available in a CPU buffer. We require
first_ubo_is_default_ubo, to ensure that UBO0 will be a user buffer. We
weren't setting this flag for the image conversion shaders, so got an
assertion failure compiling them. This can be triggered by the
panvk_force_afbc_packing driconf option.

The conversion shader info UBO isn't exactly a "default" UBO in the
sense of being lowered from uniforms, but it is a user buffer, so
setting the flag should be fine.

Fixes: 59a3e12039 ("panfrost: do not push "true" UBOs")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34992>
(cherry picked from commit bed54fa402)
2025-06-04 15:52:47 +02:00
Yiwei Zhang
ed16a3a87c vulkan/wsi: include missing barrier for transferring to blit dst image
Fixes: 2975a7f453 ("vulkan/wsi: Add support for image -> image blits")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35220>
(cherry picked from commit 2af2314fb2)
2025-06-04 15:52:47 +02:00
Paulo Zanoni
ba15c7a660 intel/isl: don't clamp num_elements to (1 << 27)
The BSpec page for Structure_RENDER_SURFACE_STATE says:

  "For typed buffer and structured buffer surfaces, the number of
   entries in the buffer ranges from 1 to 2^27. For raw buffer
   surfaces, the number of entries in the buffer is the number of
   bytes which can range from 1 to 2^30. After subtracting one from
   the number of entries, software must place the fields of the
   resulting 27-bit value into the Height, Width, and Depth fields as
   indicated, right-justified in each field. Unused upper bits must be
   set to zero."

According to the vkd3d-proton developers, this is what is happening
with the applications:

  "There's also the problematic case of games using typed descriptors
   but passing non-typed buffer descriptors, which is an extremely
   common app bug that works on all D3D12 drivers that we need to work
   around by creating typed views."

Previously, we had an assert() to check for "num_elements > (1 <<
27)", but that assert was preventing us from running games such as
Marvel's Spider-Man Remastered and Assassin's Creed: Valhalla in Debug
mode. So not only I removed the assert, but I also made the code clamp
num_elements to the maximum of (1 << 27) based on my incorrect
interpretation of the paragraph quoted above from BSpec.

What I did not realize was that num_elements is being used just to
calculate Structure_RENDER_SURFACE_STATE Height, Width and Depth, and
our register bit fields on SKL and newer are big enough to fit any
number of num_elements up to 2^32, not only 2^27. Clamping
num_elements results in an incorrect value for S.Depth, which
generates visual corruption in some games.

On Marvel's Spider-Man Remastered, without this patch the texture of
the asphalt in some streets (like the very first one you jump to when
the game starts) gets rendered incorrectly.

Testcase: vkd3d-proton/d3d12/test_large_texel_buffer_view
Link: https://github.com/HansKristian-Work/vkd3d-proton/issues/2071
Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12827
Fixes: f3c7e14f09 ("isl: don't assert(num_elements > (1ull << 27))")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35032>
(cherry picked from commit ecc90e1bb3)
2025-06-04 15:52:47 +02:00
Jordan Justen
b7472364c2 intel/dev: Add BMG PCI IDs 0xe220-0xe223
Ref: bspec 68090
Backport-to: 25.0, 25.1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35139>
(cherry picked from commit 4c4d90ae49)
2025-06-04 15:52:47 +02:00
Karol Herbst
bfecaf4040 rusticl/kernel: rework validation in clSetKernelExecInfo
We should use the cl_slice code to get proper validation, which also makes
it simpler to read out data and gets rid of some UB there.

This also fixes CL_KERNEL_EXEC_INFO_SVM_PTRS with param_value being null.

Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
(cherry picked from commit 35a9829391)
2025-06-04 15:52:47 +02:00
Karol Herbst
a1966159d9 zink: set unordered_read/write after buffer_barrier in set_global_binding
Fixes: a6e9e0f0d7 ("zink: add set_global_binding")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
(cherry picked from commit a04569b2ea)
2025-06-04 15:52:47 +02:00
Yiwei Zhang
6acc812477 panvk: fix memory binding for wsi image alias
Fixes: f77fe432c1 ("panvk: support binding swapchain memory")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35197>
(cherry picked from commit 7e2fe6d1c1)
2025-06-04 15:52:47 +02:00
Mary Guillemard
6ce036e6c0 pan/genxml: Fix typo for NEXT_SB_ENTRY
"NEXT_SB_ENTR" -> "NEXT_SB_ENTRY"

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 811525b543 ("pan/genxml: Build libpanfrost_decode for v12")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
(cherry picked from commit f6f5bee080)
2025-06-04 15:52:47 +02:00
Marek Olšák
4fd8946062 glsl: fix sampler and image type checking in lower_precision
Use the param type, not the referenced variable. The referenced variable
can be a structure, which wouldn't be recognized as a sampler or image.

Fixes: 733bee57eb - glsl: lower samplers with highp coordinates correctly

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Dieter Nützel Dieter@nuetzel-hh.de on gfx8 (Polaris 20)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34959>
(cherry picked from commit bd5d623674)
2025-06-04 15:52:47 +02:00
Marek Olšák
39a8d4425a winsys/amdgpu: fix running out of 32bit address space with high FPS
Reproduced with gfxbench5 gl_tess_off.

Fixes: 4d486888ee - winsys/amdgpu: rewrite BO fence tracking by adding a new queue fence system

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
(cherry picked from commit 4bf2a28334)
2025-06-04 15:52:47 +02:00
Samuel Pitoiset
e35c5d643b radv: add radv_disable_hiz_his_gfx12 and enable for Mafia Definitive Edition
This is a workaround for random GPU hangs with HiZ/HiS on GFX12
because the correct fix is complex and it will take time to be
implemented properly.

Mafia Definitive Edition is the first known game affected by this.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13222
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35182>
(cherry picked from commit 2ebfa64be7)
2025-06-04 15:52:47 +02:00
Adam Jackson
a186710269 vtn/opencl: Handle OpenCLstd_F{Min,Max}_common
Normal fmin doesn't make any promises about NaN, common additionally
doesn't make any promises about infinities. Would be nice to hook that
up to codegen but lowering them to normal works for now.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34941>
(cherry picked from commit 4b1c824b67)
2025-06-04 15:52:47 +02:00
Adam Jackson
0ab0792c46 vtn: (Silently) handle FunctionParameterAttributeNo{Capture,Write}
Silences a few thousand warnings in sycl/test-e2e

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34941>
(cherry picked from commit 92f07860a4)
2025-06-04 15:52:47 +02:00
Samuel Pitoiset
5ad7ae003f radv: fix capture/replay with sparse images and descriptor buffer
The sparse image VA needs to be returned to the application for replay.

Reported by Baldur.

VKCTS has coverage but it doesn't verify this yet.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35162>
(cherry picked from commit 63758bc093)
2025-06-04 15:52:47 +02:00
Erik Faye-Lund
c29cacb77a panfrost: do not try to use 4x4 tiles on v4 gpus
Mali V4 GPUs only ever use 16x16 tiles, so we need to set the minimum
tile-size to match.

Fixes: 329568b5eb ("panfrost: add color-attachment and msaa helpers")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
(cherry picked from commit 483ce5a1dc)
2025-06-04 15:52:47 +02:00
Erik Faye-Lund
7fb8044bcc mesa/main: remove non-existing function prototype
This function was removed about a decade ago, let's get rid of the
prototype as well!

Fixes: a347a0f53f ("mesa: Completely remove QuerySamplesForFormat from driver func table")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
(cherry picked from commit 439b88c619)
2025-06-04 15:52:46 +02:00
Faith Ekstrand
7e0c8b8efd nouveau/mme: Don't install the HW tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35163>
(cherry picked from commit 26ba29f75b)
2025-06-04 15:52:46 +02:00
Mel Henning
4483824a0a nak/spill_values: Follow phis from src to dest
ssa_state_out has the predecessor's SSAValue, so we need look for it in
the phi_src map.

Totals:
CodeSize: 4545122720 -> 4534830176 (-0.23%); split: -0.23%, +0.00%
Number of GPRs: 10963889 -> 10963693 (-0.00%); split: -0.00%, +0.00%
SLM Size: 1855380 -> 1649308 (-11.11%); split: -11.11%, +0.01%
Static cycle count: 1104322907 -> 1093035821 (-1.02%); split: -1.02%, +0.00%
Spills to memory: 480689 -> 139107 (-71.06%)
Fills from memory: 480689 -> 139107 (-71.06%)
Spills to reg: 458804 -> 242139 (-47.22%); split: -47.23%, +0.01%
Fills from reg: 303068 -> 222030 (-26.74%); split: -26.75%, +0.01%
Max warps/SM: 7245516 -> 7245580 (+0.00%)

Totals from 9899 (5.04% of 196502) affected shaders:
CodeSize: 1056727952 -> 1046435408 (-0.97%); split: -0.98%, +0.00%
Number of GPRs: 1666652 -> 1666456 (-0.01%); split: -0.01%, +0.00%
SLM Size: 1107988 -> 901916 (-18.60%); split: -18.61%, +0.01%
Static cycle count: 254942337 -> 243655251 (-4.43%); split: -4.43%, +0.01%
Spills to memory: 480689 -> 139107 (-71.06%)
Fills from memory: 480689 -> 139107 (-71.06%)
Spills to reg: 367784 -> 151119 (-58.91%); split: -58.92%, +0.01%
Fills from reg: 222209 -> 141171 (-36.47%); split: -36.49%, +0.02%
Max warps/SM: 119188 -> 119252 (+0.05%)

Fixes: bcad2add47 ("nak: Add a spilling pass")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit 6c68c2c3ba)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35244>
2025-06-04 15:52:46 +02:00
Olivia Lee
d0dd9ab2a8 panvk/csf: fix provoking vertex mode in partial secondary cmdbufs
For partial secondary cmdbufs, we emit FBDs/TDs in the primary cmdbuf
before calling the secondary. In order to set the provoking vertex mode
correctly here, we need to look at the mode set by pipelines bound in
the secondary cmdbuf.

This leaves one edge case: reemitting FBDs/TDs in a secondary cmdbuf
after a flush. If the secondary cmdbuf only contains vk_meta draws,
without ever binding a pipeline, we won't know which provoking vertex
mode to use here. This is actually okay, because in that case the
provoking vertex mode doesn't matter for any of the draws in the
secondary, and the FBDs/TDs will be reemitted on the primary with the
correct mode.

Fixes: 7a9f14d3c2 ("panvk: advertise VK_EXT_provoking_vertex")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit 65406cf500)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Olivia Lee
fa98cf6af0 panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST
In this case, we need to emit the FBDs and TDs for the meta command
before we know what provoking vertex mode the application is going to
use. To handle this, we make a guess for which provoking vertex mode we
need. Then we use cs_maybe to leave space to flip the provoking vertex
bit if the guess was wrong.

This case is still unhandled on JM.

Fixes: 7a9f14d3c2 ("panvk: advertise VK_EXT_provoking_vertex")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit 885805560f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Olivia Lee
f8b061c99c panvk: fix case where vk_meta is used after PROVOKING_VERTEX_MODE_LAST
Because we advertise provokingVertexModePerPipeline=false, the provoking
vertex mode must be set the same for all pipelines used in a renderpass.
vk_meta doesn't care about the provoking vertex mode, but the vulkan api
doesn't provide a way to express this, so it always sets
PROVOKING_VERTEX_MODE_FIRST (the vulkan default). This causes an
assertion failure when vk_meta is used in a renderpass where the
application sets PROVOKING_VERTEX_MODE_LAST.

There are a few different cases here, that need different handling. The
simplest is when vk_meta is used after the first application draw, in
which case we can just ignore the state passed by vk_meta and use the
existing state.

Fixes: 7a9f14d3c2 ("panvk: advertise VK_EXT_provoking_vertex")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit 4d99346477)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Olivia Lee
4f2353e598 panvk: track whether we are in a vk_meta command
This is needed to handle the provoking vertex mode correctly. vk_meta
doesn't care which provoking vertex mode is used, but there is no way to
express this directly in the vulkan api.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit 32177b99d5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Olivia Lee
49bdf4669b panvk/csf: set up shared register dump regions for cs functions
The tiler OOM exception handler allocated a region of memory to dump
save/restored registers. For defining more functions in the future, we
allocate a register dump region for each subqueue, that can hold the
largest number of registers needed by any functions executed on that
subqueue.

This does mean that we cannot have function calls more than one deep. If
we ever need nested function calls, we will have to consider a real
stack.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit d60c688317)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Olivia Lee
41c8b9a461 pan/csf: rename cs_exception_handler to cs_function
The register save/restore machinery is useful for more general callable
functions, not just exception handlers.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit 61e7d47270)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Olivia Lee
48e9e7ba47 pan/csf: add cs_maybe mechanism to retroactively patch cs contents
We have an edge case with VK_EXT_provoking_vertex where we may need to
emit FBDs and TDs before we know what provoking vertex mode the
application is using for the renderpass. To handle this, we want to
retroactively patch the provoking vertex bit. This commit introduces an
abstraction to do that.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
(cherry picked from commit 83bb97796b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
2025-06-04 15:52:46 +02:00
Mike Blumenkrantz
a4f5779bb1 tc: fix detection of in-flight resource usage when sync is used
tc_sync reuses the same batch, which breaks the current disambiguation
methods by returning !busy for work which is currently executing
on the reused batch

by also tracking the completed generation, this scenario is detected
and disambuguated

Fixes: 9cc06f817c ("tc: allow unsynchronized texture_subdata calls where possible")
(cherry picked from commit b89e0fa226)

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35204>
2025-06-04 15:52:46 +02:00
Lars-Ivar Hesselberg Simonsen
c01db1fb7f panfrost: Apply direct dispatch WLS instance limit
Apply the direct dispatch WLS instance limit to panfrost as well to keep
compute jobs with large workgroup counts from running out of memory.

Fixes: 1304f4578d ("panfrost: Adapt emit_shared_memory for indirect dispatch")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34979>
(cherry picked from commit 64ce37b2d9)
2025-06-04 15:52:46 +02:00
Lars-Ivar Hesselberg Simonsen
cc2e341a14 panvk/jm: Apply direct dispatch WLS instance limit
Apply the direct dispatch WLS instance limit to PanVK/JM as well to keep
compute jobs with large workgroup counts from hitting
VK_ERROR_OUT_OF_DEVICE_MEMORY.

Fixes: 005703e5b5 ("panvk: Move TLS preparation logic to cmd_dispatch_prepare_tls"
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34979>
(cherry picked from commit e6e406de0e)
2025-06-04 15:52:46 +02:00
Lars-Ivar Hesselberg Simonsen
6d1e51de04 panvk/v10+: Limit direct dispatch WLS allocation
During direct dispatch, we calculate the size of the WLS allocation
based on the number of WLS instances which is an unbounded calculation
on number of workgroups.

This leads to extreme allocation sizes and potentially
VK_ERROR_OUT_OF_DEVICE_MEMORY for direct dispatches with a high amount
of workgroups.

This change adds an upper bound to the number of WLS instances, using
the same value we assume for indirect dispatches.

Additionally, this commit fixes the WLS max instance calculation (which
should be per core).

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34979>
(cherry picked from commit 0a47a1cb6d)
2025-06-04 15:52:46 +02:00
Lars-Ivar Hesselberg Simonsen
de8423ef2a panvk/v10+: Remove unnecessary alloc in dispatch_precomp
The CSF version of dispatch_precomp allocates TLS/WLS prior to calling
cmd_dispatch_prepare_tls, which will do the same.

This commit removes this unnecessary allocation.

Fixes: cc02c5deb4 ("panvk: Implement precomp dispatch")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34979>
(cherry picked from commit a6c7a774ab)
2025-06-04 15:52:46 +02:00
Faith Ekstrand
84e66ae44a nvk: Allocate the correct VAB size on Kepler
We were allocating 128 KiB but claimed 256 KiB.  Allocate the right size
and assert that the size matches.

Fixes: 970bd70584 ("nvk: allocate VAB memory area")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35172>
(cherry picked from commit 9fe2a21e93)
2025-06-04 15:52:46 +02:00
Patrick Lerda
80263066b9 r600: fix pop-free clipping
This update is aimed at fixing pop-free clipping and follows
the advices by Vitaliy Kuzmin: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12440

This functionality requires calculating the value of the following two
registers: PA_CL_GB_HORZ_DISC_ADJ and PA_CL_GB_VERT_DISC_ADJ. These two
registers are available on all the gpus of the r600 family.

This code is built on the backport of radeonsi updates which are relevant
to this very functionality:
57e658d041 "radeonsi: rework how guardband registers are updated to decrease overhead"
146c2b7c28 "radeonsi: adjust clip discard based on line width / point size"
4d74432dd3 "radeonsi: don't discard points and lines"
63680471f9 "radeonsi: remove si_context::{scissor_enabled,clip_halfz}"

This change was tested on rv770, barts and cayman:
deqp-gles[2-3]/functional/clipping/line/wide_line_clip_viewport_center: fail pass
deqp-gles[2-3]/functional/clipping/line/wide_line_clip_viewport_corner: fail pass
deqp-gles[2-3]/functional/clipping/point/wide_point_clip: fail pass
deqp-gles[2-3]/functional/clipping/point/wide_point_clip_viewport_center: fail pass
deqp-gles[2-3]/functional/clipping/point/wide_point_clip_viewport_corner: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35052>
(cherry picked from commit df2c774a83)
2025-06-04 15:52:45 +02:00
Qiang Yu
25604929b1 nir/opt_varyings: fix mesh shader miss promote varying to flat
We still allow mesh shader promote constant output to flat, but
mesh shader like geometry shader may store multi vertices'
varying in a single thread. So mesh shader may store different
constant values to different vertices in a single thread, we
should not promote this case to flat.

I'm not using shader_info.mesh.ms_cross_invocation_output_access
because OpenGL does not require IO to have explicit location, so
when nir_shader_gather_info is called in OpenGL GLSL compiler to
compute ms_cross_invocation_output_access, some implicit output
has -1 location which causes ms_cross_invocation_output_access
unset for it.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13134
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35081>
(cherry picked from commit 6f2a1e19da)
2025-06-04 15:52:45 +02:00
Timothy Arceri
d976a8fdf7 util: add workaround for the game Foundation
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12882
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35107>
(cherry picked from commit bf24d56862)
2025-06-04 15:52:45 +02:00
Timothy Arceri
826fe18abd mesa: extend linear_as_nearest work around
Here we allow packed stencils to skip the completeness check also.
Will be used in the following patch for a bug in the game Foundation.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35107>
(cherry picked from commit 27945bbd8a)
2025-06-04 15:52:45 +02:00
Mel Henning
3dedf9bbc1 nak: Fix a perf regression in tex lowering
These lines look like they were mistakenly introduced, and cause a
significant perf hit. Eg. this fix improves the Horizon Zero Dawn
in-game benchamark by ~42% on my ampere machine (5992 pts -> 8517 pts).

Fixes: d16e75e55f ("nak: Lower texture inputs for Kepler B")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35100>
(cherry picked from commit 9d620fabd2)
2025-06-04 15:52:45 +02:00
Mike Blumenkrantz
c9ff965c22 lavapipe: handle counterOffset in vkCmdDrawIndirectByteCountEXT
fixes dEQP-VK.transform_feedback.simple.draw_indirect*counter_offset*

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35076>
(cherry picked from commit 42b303c7b0)
2025-06-04 15:52:45 +02:00
Mike Blumenkrantz
0311bc6d0e llvmpipe: disable conditional rendering mem for blits
u_blitter doesn't support this, and changing u_blitter to support a niche
lavapipe feature seems like overkill

fixes dEQP-VK.conditional_rendering.conditional_ignore.resolve_image*

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35076>
(cherry picked from commit 753d3e71d3)
2025-06-04 15:52:45 +02:00
Lionel Landwerlin
bb12110359 anv: don't use pipeline layout at descriptor bind
An application is allowed to bind an empty descriptor set in a place
where a pipeline layout has no descriptor set layout. For example :

  pipeline_layout_A :
     set0 : NULL
     set1 : descriptor_set_layout_A

  vkCmdBindDescriptor :
     set0 : descriptor_set_B (with layout bindingCount=0)
     set1 : descriptor_set_C (compatible with descriptor_set_layout_A)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13227
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35125>
(cherry picked from commit 39f55541a3)
2025-06-04 15:52:45 +02:00
Mauro Rossi
7e4f9ab45d android: fix llvmpipe build rules
llvmpipe driver name needs to be added to the list triggering MESON_GEN_LLVM_STUB := true
due to swrast driver name being an invalid gallium driver

swrast driver name is still used for lavapipe vulkan driver

Fixes: a3909092 ("meson: drop deprecated `swrast` alias for softpipe+llvmpipe")
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35121>
(cherry picked from commit ff6b181c2d)
2025-06-04 15:52:45 +02:00
Timothy Arceri
e99910538e mesa: update validation when draw buffer changes
Otherwise validation that depends on the _IntegerDrawBuffers and
_FP32DrawBuffers bitfield can end up stale.

Fixes: d04d9da98c ("st/mesa: fix _IntegerBuffers bitfield use")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35063>
(cherry picked from commit 3ec68e8382)
2025-06-04 15:52:45 +02:00
Paulo Zanoni
c37ca4cd68 anv/trtt: don't avoid the TR-TT submission when there is stuff to signal
When an application issues a sparse binding operation, it may be the
case that the state the app is setting is the state that is already
there. In that case, both n_l3l2_binds and n_l1_binds are zero, so the
batch doesn't contain anything and, since 0802bbd486, we just skip
the batch submission and return.

The problem is that skipping the batch submission and returning
ignores the synchronization: there may be syncobjs that we have to
wait and, more importantly, there may be syncobjs that we have to
signal.

This case is exercised by vkd3d-proton's test suite, but I'm not aware
of any other workload that triggers it. This commit only affects
Meteor Lake and older, as TR-TT is only the default behavior for the
platforms running i915.ko.

Testcase: vkd3d-proton/d3d12/test_sparse_buffer_memory_lifetime
Fixes: 0802bbd486 ("anv/trtt: don't submit empty batches when there are no binds to do")
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35078>
(cherry picked from commit d77b49eb0a)
2025-06-04 15:52:45 +02:00
Dmitry Baryshkov
6c8e78027a freedreno: replace fixed array for globabl_bindings with dynamic array
Freedreno limits set_global_binding() to 16 resource entries
(MAX_GLOBAL_BUFFERS), however RustiCL can pass more global resources
(e.g. OpenCL CTS test api / min_max_constant_args requires passing of
17). Follow example of other drivers and use dynamic array for global
bindings.

Backport-to: 25.1
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35122>
(cherry picked from commit 5c43cf823c)
2025-06-04 15:52:45 +02:00
Karol Herbst
d1525e8c2b vtn: fix use-after-free on function parameter names
Fixes: 5d7a230324 ("vtn: gather function parameter names")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35098>
(cherry picked from commit abbb0c0125)
2025-06-04 15:52:45 +02:00
Karol Herbst
a26e7f4624 nir: fix use-after-free on function parameter names
Fixes: 3da8444be5 ("nir: add names to function parameters")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35098>
(cherry picked from commit bc444f6d26)
2025-06-04 15:52:45 +02:00
Dmitry Baryshkov
a88780114f meson: stop building XA by default
Commit cf40099730 ("meson: deprecate gallium-xa") deprecated XA
tracker, but didn't disable it by default. Thus any attempt to disable
it would cause a deprecated option warning. Flip the default to disable
XA tracker by default.

Fixes: cf40099730 ("meson: deprecate gallium-xa")
Backport-to: 25.1
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35113>
(cherry picked from commit 31cf6b94ad)
2025-06-04 15:52:45 +02:00
Christian Gmeiner
0ddbd895e2 zink: Fix NIR validation error in cubemap-to-array lowering
The cubemap-to-array pass was changing variable types from samplerCubeArray
to sampler2DArray but leaving the corresponding deref instruction types
unchanged. This caused NIR validation to fail with "instr->type ==
instr->var->type" assertion.

Fix by updating both the variable type and the deref instruction type
to maintain consistency required by NIR validation.

Cc: mesa-stable
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35117>
(cherry picked from commit 86f7ce06be)
2025-06-04 15:52:45 +02:00
Calder Young
a85b4a7a64 iris: set dependency between SF_CL and CC states
Applied the fix from commit 3a54e9f6 to the Iris Gallium driver

Fixes: bc42bbff4c ("iris: Wa_14016820455 for GFX_VERx10 == 12.5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35082>
(cherry picked from commit b0eb715b50)
2025-06-04 15:52:45 +02:00
Gurchetan Singh
4754594e87 gfxstream: get rid of logspam in virtualized case
In the case of running a Linux VM using some other capability
set than gfxstream, some logspam may be triggered.  Fix this.

CC: mesa-stable

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35109>
(cherry picked from commit 126af1feb9)
2025-06-04 15:52:44 +02:00
Calder Young
d5d2e046e9 iris: Fix accidental writes to global dirty bit instead of local
Fixes: 0e9a26372b ("iris: implement Wa_14018912822")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35102>
(cherry picked from commit 8547f8b557)
2025-06-04 15:52:44 +02:00
David Rosca
840325c2f7 radv/video: Limit 10bit H265 decode support to stoney and newer
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12132
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35105>
(cherry picked from commit 1608bc20b5)
2025-06-04 15:52:44 +02:00
Lionel Landwerlin
bf3ba86cb8 hasvk/elk: stop turning load_push_constants into load_uniform
Those intrinsics have different semantics in particular with regards
to divergence. Turning one into the other without invalidating the
divergence information breaks NIR validation. But also the conversion
means we get artificially less convergent values in the shaders.

So just handle load_push_constants in the backend and stop changing
things in Hasvk.

Fixes a bunch of tests in
   dEQP-VK.descriptor_indexing.*
   dEQP-VK.pipeline.*.push_constant.graphics_pipeline.dynamic_index_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34546>
(cherry picked from commit b036d2ded2)
2025-06-04 15:52:44 +02:00
Lionel Landwerlin
a3293eb26c anv/brw: stop turning load_push_constants into load_uniform
Those intrinsics have different semantics in particular with regards
to divergence. Turning one into the other without invalidating the
divergence information breaks NIR validation. But also the conversion
means we get artificially less convergent values in the shaders.

So just handle load_push_constants in the backend and stop changing
things in Anv.

Fixes a bunch of tests in
   dEQP-VK.descriptor_indexing.*
   dEQP-VK.pipeline.*.push_constant.graphics_pipeline.dynamic_index_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34546>
(cherry picked from commit df15968813)
2025-06-04 15:52:44 +02:00
Yiwei Zhang
747b170d46 kopper: Revert "kopper: Explicitly choose zink"
This reverts commit 854bc2ee05.

Forcing zink explicitly would get zink-on-lvp picked up over llvmpipe
for gbm dri support, which is not intended. Currently, zink_screen's
choose_pdev won't be able to reject it when the driver name is explicit.
So we have to revert the change first to mitigate regressions.

Reported-by: @n3rdopolis @0xnihilo
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13009
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13053
Fixes: 854bc2ee05 ("kopper: Explicitly choose zink")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35039>
(cherry picked from commit e6481d3f42)
2025-06-04 15:52:44 +02:00
LingMan
d18c33b1fe entaviv/isa: Silence warnings about non snake case names
These are benign style warnings. The code is generated by bindgen and it's a bug there that these
names get generated at all.

Silences these warnings since we can't do anything about them:

```
warning: method `use__raw` should have a snake case name
   --> src/etnaviv/isa/isa_bindings.rs:358:19
    |
358 |     pub unsafe fn use__raw(this: *const Self) -> ::std::os::raw::c_uint {
    |                   ^^^^^^^^ help: convert the identifier to snake case: `use_raw`
    |
    = note: `#[warn(non_snake_case)]` on by default

warning: method `use__raw` should have a snake case name
    --> src/etnaviv/isa/isa_bindings.rs:1023:19
     |
1023 |     pub unsafe fn use__raw(this: *const Self) -> ::std::os::raw::c_uint {
     |                   ^^^^^^^^ help: convert the identifier to snake case: `use_raw`
```

Fixes: 15a784689e ("etnaviv: isa: Generate Rust FFI bindings for asm.h")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34969>
(cherry picked from commit 040ef8f5c9)
2025-06-04 15:52:44 +02:00
Eric Engestrom
8aeafe5130 .pick_status.json: Mark 09e713f46b as denominated 2025-06-04 15:52:44 +02:00
Rob Clark
f712f30414 ci: Disable fd-farm
Take the google farm offline in preparation for shipping.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35093>
(cherry picked from commit 45a2f02876)
2025-06-04 15:52:44 +02:00
Eric Engestrom
5dc2f6bdc8 .pick_status.json: Update to 57b04e8dfd 2025-06-04 15:52:40 +02:00
Eric Engestrom
128f4f06a0 docs: add sha sum for 25.1.1 2025-05-21 10:04:06 +02:00
Eric Engestrom
7485541cc3 VERSION: bump for 25.1.1 2025-05-21 09:15:28 +02:00
Eric Engestrom
006b6be2d8 docs: add release notes for 25.1.1 2025-05-21 09:15:28 +02:00
Dmitry Baryshkov
9e353682c9 rusticl/device: relax some params for embdded profile
As stated in the OpenCL standard, the lowest allowed values
CL_DEVICE_MAX_PARAMETER_SIZE and CL_DEVICE_LOCAL_MEM_SIZE in case of the
embedded profile are 1K. Limit the check to full profile only, in order
to stop forcing OpenCL 1.0 for embedded-profile device like Qualcomm
Adreno A702.

Backport-to: 25.1
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35073>
(cherry picked from commit 275a39b3c6)
2025-05-20 20:18:08 +02:00
Samuel Pitoiset
f0f5af73d4 radv: fix non-indexed draws with primitive restart enable
On GFX11+, DISABLE_FOR_AUTO_INDEX=1 automatically disables primitive
restart enable for non-indexed draws.

On GFX10-GFX10.3 the hw considers primitive restart enable for
non-indexed draws and the driver must disable it explicitly.

GFX9 and older gens aren't affected but applying the change for them
simplifies the implementation.

To fix that, move emitting primitive restart enable at draw time
because it needs to know if the draw is indexed or not.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13037
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34996>
(cherry picked from commit 4d1fcd75f9)
2025-05-20 20:18:08 +02:00
Samuel Pitoiset
db7d38ccef radv: fix missing texel scale for unaligned linear SDMA copies
texel_scale was 0 which caused GPU hangs for unaligned linear copies.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13195
Fixes: 4b73d7e817 ("radv: fix SDMA copies for linear 96-bits formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35047>
(cherry picked from commit c22d86e844)
2025-05-20 20:18:08 +02:00
Tapani Pälli
9ff1596f67 anv: use internal rt-null-ahs when any_hit is null
Tested on BMG and PTL using both settings for RT_CTRL.

Cc: mesa-stable
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/35044>
(cherry picked from commit 5828612da2)
2025-05-20 20:18:08 +02:00
Tapani Pälli
ad159bbd93 intel/compiler: provide a helper for null any-hit shader
Xe driver will be disabling the HW functionality for null any-hit
shaders, drivers need to take care of it instead. This commit brings
back parts of older workaround (see b0624e414f) we used to have to
handle the null any-hit case.

Cc: mesa-stable
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/35044>
(cherry picked from commit 0f591425c9)
2025-05-20 20:18:08 +02:00
Georg Lehmann
4fa2dbdf55 aco: assume sram ecc is enabled on Vega20
There are D16 load issues on Vega20 that are expected if sram ecc is enabled.
It's a professional class chip and I found mentions of it supporting ecc,
so assume it's enabled.

Maybe this could be improved by querying ecc info from the kernel, but
I'm not sure which query should be used.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13189
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12393
Cc: mesa-stable

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35045>
(cherry picked from commit 0257644130)
2025-05-20 20:18:08 +02:00
Matt Turner
4bd75f552c gallivm: Use llvm.roundeven in lp_build_round()
`lp_build_round` intends to implement round with ties-to-even behavior,
as can be seen by its test's use of `nearbyint` to generate reference
values and by it use in implementing `nir_op_fround_even`.

Fixes: 0d3b285360 ("gallivm: use llvm intrinsics for 16-bit round/trunc/roundeven")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34937>
(cherry picked from commit eea3ed6a37)
2025-05-20 20:18:08 +02:00
Timothy Arceri
dda7d88800 mesa: fix _FP32Buffers bitfield use
Previously we were assuming that all color attachments were active.

Fixes: 070a5e5d92 ("mesa: add explicit enable for EXT_float_blend, and error condition")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35014>
(cherry picked from commit c7c4905981)
2025-05-20 20:18:08 +02:00
Timothy Arceri
66fc7554b3 mesa/st: fix _IsRGBDraw bitfield use
Previously we were assuming that all color attachments were active.

Fixes: 5b51d754d0 ("st/mesa: Optionally override RGB/RGBX dst alpha blend factors")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35014>
(cherry picked from commit b7d8c195a2)
2025-05-20 20:18:08 +02:00
Timothy Arceri
50b5881450 mesa/st: fix _BlendForceAlphaToOneDraw bitfield use
Previously we were assuming that all color attachments were active.

Fixes: 4f28e2827c ("mesa: fix blending when using luminance/intensity emulation")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35014>
(cherry picked from commit c1d00c9a1a)
2025-05-20 20:18:08 +02:00
Timothy Arceri
bf62b98220 st/mesa: fix _IntegerBuffers bitfield use
Previously we were assuming that all color attachments were active.

Fixes: 8fb966688b ("st/mesa: Disable blending for integer formats.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13168
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35014>
(cherry picked from commit d04d9da98c)
2025-05-20 20:18:08 +02:00
Lionel Landwerlin
0b141f56a3 anv: enable preemption setting on command/batch correctly
The 2 helpers we're using for doing internal operations (copies,
command generation, etc...) can work on command buffers or lower level
batches.

When working with command buffers, the helpers should set the
preemption using genX(cmd_buffer_set_preemption) so that whatever
operation comes after toggles the state back to what it needs and we
minimize the toggles.

When working with batchs, the helpers should disable preemption using
genX(batch_set_preemption) and turn it back on when done.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35030>
(cherry picked from commit c570740272)
2025-05-20 20:18:08 +02:00
Alessandro Astone
4e65cf4f40 android: Link with libc++fs up to SDK 35
Before SDK35 the c++ filesystem API was part of a standalone library

Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34797>
(cherry picked from commit 84cae30f0a)
2025-05-20 20:18:08 +02:00
llyyr
b0b1820098 vulkan/wsi/wayland: make needs_color_surface_old check if surface exists
Otherwise we end up removing refcount even when we don't have a color
surface already for applications going from SRGB_NONLINEAR to
PASS_THROUGH dring runtime.

To reproduce the bug, start mpv with "--target-colorspace-hint=yes" then
set it to "no" during runtime with a keybind

Fixes: 789507c99c ("vulkan/wsi: implement the Wayland color management protocol")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34708>
(cherry picked from commit 033ce1bae1)
2025-05-20 20:18:08 +02:00
Ella Stanforth
7e425861cf v3d/compiler: Fix ub when using memcmp for texture comparisons.
We need to zero out all memory in the struct otherwise memcmp ends up comparing
padding bytes.

Cc: mesa-stable
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34945>
(cherry picked from commit be3ce07f58)
2025-05-20 20:18:08 +02:00
Olivia Lee
1aa0aad8ff util/u_printf: fix memory leak in u_printf_singleton_add_serialized
info->arg_sizes and info->strings were leaked because they were
allocated in the global context.

Fixes: 007f60c8b8 ("util/u_printf: add singleton implementation")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34987>
(cherry picked from commit 22fb7eaa8c)
2025-05-20 20:18:08 +02:00
David Rosca
6ff9f42c32 radeonsi/vce: Fix output quality and performance in speed preset
Fixes: 544a180320 ("radeonsi/vce: Support quality presets")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34894>
(cherry picked from commit bade93c447)
2025-05-20 20:18:08 +02:00
David Rosca
66c3193e4a radeonsi/vce: Only send one task per IB
There is no need to use second task for config when creating the
session, also it doesn't work now as we don't set the next task
offset in task info anymore.

Fixes: 9ca1cda2be ("radeonsi/vce: Cleanup")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34894>
(cherry picked from commit ad96031ec6)
2025-05-20 20:18:08 +02:00
David Rosca
984786396d radeonsi/vce: Fix bitstream buffer size
On old VCE this was being rejected by kernel because the size here
was the buffer size, but the bitstream buffer address includes the
offset.

Fixes: 901aafb030 ("radeonsi/vce: Support raw packed headers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13128
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34894>
(cherry picked from commit fd1480c3df)
2025-05-20 20:18:08 +02:00
Mel Henning
7fc8c5e10f nouveau/headers: Ignore PermissionError in rustfmt
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13172
Fixes: 591b5da4 ("nouveau/headers: Run rustfmt on generated files")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35008>
(cherry picked from commit bfe8340296)
2025-05-20 20:18:07 +02:00
Mel Henning
5d6a3c5862 nouveau/headers: Run rustfmt after file is closed
If we run a subprocess while the file is still open, we may not have
flushed the file contents to disk.

Fixes: 591b5da4 ("nouveau/headers: Run rustfmt on generated files")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35008>
(cherry picked from commit da22094593)
2025-05-20 20:18:07 +02:00
Rob Clark
9a36291900 freedreno: Fix shader-clock when kernel exposes UCHE_TRAP_BASE
Fixes: 4b1b4ee10c ("freedreno,tu: Read and pass to compiler uche_trap_base)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35010>
(cherry picked from commit 65e18a8494)
2025-05-20 20:18:07 +02:00
José Roberto de Souza
12ddaa6b8b anv: Enable preemption due 3DPRIMITIVE in GFX 12
The issues preventing it to be enabled were fixed so now we can enable
it but we need also to enable workaround 16013994831 back again.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34988>
(cherry picked from commit 3cd972a2d3)
2025-05-20 20:18:07 +02:00
José Roberto de Souza
5064fad403 anv: Implement missing part of Wa_1604061319
Description of this workaround are not clear but looking at Iris
implementation we need to emit all 3DSTATE_PUSH_CONSTANT_ALLOC_XS if
any 3DSTATE_PUSH_CONSTANT_ALLOC_XS is emitted.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34988>
(cherry picked from commit 2432d6677e)
2025-05-20 20:18:07 +02:00
Rob Clark
ef95ed1e2e freedreno/ir3: Fix tess/geom asan error
Fixes: ee0ee2a317 ("ir3: don't sync every TCS/GEOM block")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34989>
(cherry picked from commit d8ed4f14e6)
2025-05-20 20:18:07 +02:00
Mary Guillemard
dd47ebcc19 pan/bi: Lower ffract in bifrost_nir_algebraic on v11+
On v11+, because FROUND.v2f16 is gone we end up with precision issues.
We now lower ffract in bifrost_nir_algebraic instead of during common
algebraic to ensure lower_bit_size has been performed.

This fixes
"dEQP-GLES3.functional.shaders.builtin_functions.common.fract.vec2_lowp_vertex"
and
"dEQP-GLES31.functional.shaders.builtin_functions.common.fract.vec2_lowp_compute".

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34970>
(cherry picked from commit 60b131a712)
2025-05-20 20:18:07 +02:00
Mary Guillemard
360d2958af pan/bi: Flush subnormals to zero for FROUND on v11+
FROUND on v11+ does not flush subnormals to zero even when configured in
the shader program header.

We now use FLUSH.ftz on the input of FROUND to ensure proper
behavior when rounding up and down with FTZ enabled.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34970>
(cherry picked from commit 5588ff49a7)
2025-05-20 20:18:07 +02:00
Hans-Kristian Arntzen
912437c1a3 radv: Consider that DGC might need shader reads of predicated data.
Similar to indirect draw barrier, need similar fixups for conditional
rendering access.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34956>
(cherry picked from commit e674823d55)
2025-05-20 20:18:07 +02:00
Samuel Pitoiset
91898fbe37 radv: fix conditional rendering with DGC and non native 32-bit predicate
When the hardware doesn't natively support 32-bit predication, the
driver has a fallback which allocates a 64-bit predicate to the upload
BO in order to copy the original value.

But when conditional rendering is enabled in the stateCommandBuffer
which is used by preprocess() and the execute() is recorded also in the
stateCommandBuffer. If the preprocess() is recorded in a different
cmdbuf which is submitted before the cmdbuf that contains execute(),
the fallback (ie. alloc + COPY_DATA) will be performed after. This would
cause the predicate value to be always 0.

To fix that, keep track of the user predication VA which is the only
VA that needs to be used by DGC because it reads 32-bit from the shader.

This fixes a very weird corner case with vkd3d-proton.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13143
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34953>
(cherry picked from commit 3ca2f71f3d)
2025-05-20 20:18:07 +02:00
Samuel Pitoiset
0e15ea9546 radv: fix fetching conditional rendering state for DGC preprocess
This state must be fetched from the stateCommandBuffer, not from the
current cmdbuf which executes the preprocess().

Partial fix for https://gitlab.freedesktop.org/mesa/mesa/-/issues/13143

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34953>
(cherry picked from commit e2625fa9ca)
2025-05-20 20:18:07 +02:00
Dave Airlie
05f249ca93 nvk: Fix compute class comparison in dispatch indirect
This works by coincidence rather than design.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
(cherry picked from commit bd7777aee6)
2025-05-20 20:18:07 +02:00
Olivia Lee
c966a7abe4 panvk: fix driconf memory leak
The driconf options were leaked when the panvk instance was destroyed.

Fixes: aa8fec638f ("panvk: add basic driconf infrastructure")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34986>
(cherry picked from commit c053bc2213)
2025-05-20 20:18:07 +02:00
Rhys Perry
799685659d aco/gfx115: consider point sample acceleration
Like 15428e0d786939a5c7629a9978947c8a9112ce96 in LLVM.

fossil-db (gfx1150):
Totals from 909 (1.14% of 79653) affected shaders:
Instrs: 5840489 -> 5840705 (+0.00%); split: -0.00%, +0.00%
CodeSize: 31133460 -> 31134296 (+0.00%); split: -0.00%, +0.00%
Latency: 52982280 -> 53438577 (+0.86%); split: -0.00%, +0.86%
InvThroughput: 10841454 -> 10942682 (+0.93%); split: -0.00%, +0.93%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34935>
(cherry picked from commit 171920ceed)
2025-05-20 20:18:07 +02:00
Georg Lehmann
d0131a4041 radeonsi: always lower alu bit sizes
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13072

load_vs_input_from_vertex_buffer can create unsupported 16bit shifts on GFX6/7.

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

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34946>
(cherry picked from commit 33b5d8b2ec)
2025-05-20 20:18:06 +02:00
Timothy Arceri
39301bd70d mesa: relax EXT_texture_integer validation
This updates mesa to avoid throwing an error if an attached fbo
wont actually be drawn into.

Fixes: 705978e283 ("mesa: do integer FB / shader validation check in _mesa_valid_to_render()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13144
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34949>
(cherry picked from commit 1d4ebe79b5)
2025-05-20 20:18:06 +02:00
Thomas H.P. Andersen
d1610cb046 driconf: update X4 Foundations executable name
'X4.exe' is the executable. But there is also a script 'X4' that is used to
launch the game. This script is what steam uses.
This updates driconf to match that.
This also brings the executable in line with other configs for the game.

Fixes: 5532f13566 ("driconf: override vendor id for X4 Foundations on NVK")
Fixes: 8654a7727f ("driconf: set vk_zero_vram driconf for X4 Foundations")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34168>
(cherry picked from commit a87c9bc49e)
2025-05-20 20:18:06 +02:00
Samuel Pitoiset
e81572403c radv: remove the optimization for equal immutable samplers
This optimization used to optimize the allocated space for descriptors
when immutable samplers are equal. Though, this was basically broken :

- descriptor copies were broken for combiner image sampler (or sampler)
  with equal immutable samplers because 96 bytes were copied instead of
  64 bytes (cf. the linked ticket). This could be fixed but it's not
  worth it.
- the value returned by vkGetDescriptorLayoutSupport() was broken, it
  should have been 96 with no immutable samplers (or when they aren't
  equal)

This optimization was also not applied for descriptor buffers which is
the default for vkd3d-proton and Zink. DXVK doesn't use db but it
doesn't use immutable samplers, so basically only native vulkan games
would be concerned.

Note that immutable samplers would still be inlined in shaders if no
indirect access which should be 99.9% of the usecase.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11165
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34928>
(cherry picked from commit 69ff204422)
2025-05-20 20:18:06 +02:00
Samuel Pitoiset
1512a1cdd7 radv: fix emitting dynamic viewports/scissors when the count is static
In a scenario where the viewports/scissors are a dynamic state but the
count is static (ie. updated when a graphics pipeline is bound), the
driver wasn't considering that and it was re-emitting the previous
number of viewports/scissors.

This fixes rendering issue with Blender.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13127
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34921>
(cherry picked from commit 9a07ccbc89)
2025-05-20 20:18:06 +02:00
David Rosca
22826ec621 radv/video: Use ac_uvd_alloc_stream_handle
ac_uvd_alloc_stream_handle tries to avoid collisions in the case
when PID is not unique (eg. in sandboxes like Flatpak).

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12607
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
(cherry picked from commit 5fee04bcae)
2025-05-20 20:18:06 +02:00
David Rosca
4cfaede767 ac/uvd: Add ac_uvd_alloc_stream_handle
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
(cherry picked from commit 69455e8208)
2025-05-20 20:18:06 +02:00
Natalie Vock
11385075a2 driconf: Add workarounds for DOOM: The Dark Ages
Like other idTech games, it needs radv_zero_vram and
radv_disable_dedicated_sparse_queue. It also needs
radv_force_64k_sparse_alignment.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34944>
(cherry picked from commit 4339cf0aff)
2025-05-20 20:18:06 +02:00
Natalie Vock
42519ff23a radv,driconf: Add radv_force_64k_sparse_alignment config
Needed by DOOM: The Dark Ages.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34944>
(cherry picked from commit e32a90b57c)
2025-05-20 20:18:06 +02:00
Tapani Pälli
9ec2dae6d3 mesa: add missing stencil formats to _mesa_is_stencil_format
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13070
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34931>
(cherry picked from commit 720dae85f2)
2025-05-20 20:18:06 +02:00
Samuel Pitoiset
6a1a256578 radv: fix SDMA copies for linear 96-bits formats
The hardware requires a power of two bpe. To do that, the driver
needs to adjust the pitch/offset/extent based on a texel scale factor
which only applies to 96-bits formats.

This fixes new VKCTS coverage.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34927>
(cherry picked from commit 4b73d7e817)
2025-05-20 20:18:06 +02:00
Marek Olšák
62c3ed9d35 nir: fix gathering color interp modes in nir_lower_color_inputs
Fixes: 709ebd82 ("amd: expose nir_io_mix_convergent_flat_with_interpolated")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12800

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34942>
(cherry picked from commit a1ee6d6730)
2025-05-20 20:18:06 +02:00
Mike Blumenkrantz
dbb360f5d1 zink: fix broken comparison for dummy pipe surface sizing
this should create a new surface if the existing one is too small,
not if it is too big

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34933>
(cherry picked from commit ef63e3e4d2)
2025-05-20 20:18:06 +02:00
Matthieu Oechslin
ae1d465543 r600: Take dual source blending in account when creating target mask with RATs
This is properly checked when filling CB_... registers in
evergreen_emit_image_state(), but not when generating CB_TARGET_MASK.
It would lead to an invalid command steam if a fragment shader
uses SSBO/Image load/store alongside dual source blending.

Acked-by: Patrick Lerda <patrick9876@free.fr>
Fixes: a6b3792843
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/622
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34333>
(cherry picked from commit 4e68e422e0)
2025-05-20 20:18:05 +02:00
Rhys Perry
55241615c6 ac/llvm: correctly set alignment of vector global load/store
For coherent/volatile access, this would be too high for vector access.

Even when we didn't set the alignment, LLVM seemed to assume too high of
an alignment for 8/16-bit vector access.

Fixes generated_tests/cl/vload/vload-char-constant.cl

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903>
(cherry picked from commit d0a09b6ff7)
2025-05-20 20:18:05 +02:00
Rhys Perry
98f96feda8 ac/llvm: correctly split vector 8/16-bit stores
This assumes that the start of the load is 32-bit aligned.

For example, a vec3 16-bit store with align_offset=2 should split off the
first component, not the last.

This probably also fixed splitting with 8-bit stores.

Fixes arb_copy_buffer-overlap

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903>
(cherry picked from commit c1ecad2b11)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
e11a494e27 panvk/v9+: Set up limited texture descs for storage use
Storage access to images using LEA_TEX[_IMM] has limitations on some
fields in the texture descriptors, making them incompatible with the
descriptors required for texture access, specifically in the case
non-zero levels.

This change sets up two sets of texture descriptors for image views of
storage images, then picks the correct one when writing the image view
descriptors.

Backport-to: 25.0
Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit 7451bc3bef)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
e74e8b1828 pan/texture/v10+: Set width/height in the plane descs
We're currently not setting the v10+ width/height in the plane
descriptors. This change ensures we do.

Backport-to: 25.0
Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit e2aa0b7566)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
b79911101e pan/genxml/v13: Add minus1 mod for plane width/height
The width/height fields in the plane descriptors for v13 are missing
their minus(1) modifiers.

This change adds the missing modifiers, which implies also setting
default values to 1 due to how the Two-Plane YUV Overlay interacts with
the plane descriptors.

Fixes: ece01443e1 ("pan/genxml: Add v13 definition")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit 009e4c2eba)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
f3b0580d4d pan/genxml/v12: Add minus1 mod for plane width/height
The width/height fields in the plane descriptors for v12 are missing
their minus(1) modifiers.

This change adds the missing modifiers, which implies also setting
default values to 1 due to how the Two-Plane YUV Overlay interacts with
the plane descriptors.

Fixes: b6d5e01120 ("pan/genxml: Add v12 definition")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit e38eb00e4e)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
b55999c725 pan/genxml/v10: Add minus1 mod for plane width/height
The width/height fields in the plane descriptors for v10 are missing
their minus(1) modifiers.

This change adds the missing modifiers, which implies also setting
default values to 1 due to how the Two-Plane YUV Overlay interacts with
the plane descriptors.

Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit 2542857259)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
bdc7e7a786 pan/texture: Set plane size to slice size
Rather than setting the plane size to the full allocation minus the
current offset, set it to the actual size of the plane.

Fixes: db20152c8a ("panfrost: Handle Valhall texturing")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit 6a9a4b3eef)
2025-05-20 20:18:05 +02:00
Lars-Ivar Hesselberg Simonsen
8d907f8719 pan/texture: Correctly handle slice stride for MSAA
Currently, we will always be setting the slice stride in the plane
descriptor to the surface stride, as the check for multisampling is true
even for single sampled surfaces.

This change fixes this check.

Fixes: db20152c8a ("panfrost: Handle Valhall texturing")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
(cherry picked from commit cc58e30847)
2025-05-20 20:18:05 +02:00
Marek Olšák
3d14a71b98 nir/opt_vectorize_io: fix a failure when vectorizing different bit sizes
Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13085

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34897>
(cherry picked from commit dbef8f1791)
2025-05-20 20:18:05 +02:00
David Rosca
11b4ac1920 frontends/vdpau: Fix creating surfaces with 422 chroma
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13103
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34831>
(cherry picked from commit f8042fa926)
2025-05-20 20:18:05 +02:00
Samuel Pitoiset
25c188a743 radv: ignore conditional rendering with vkCmdTraceRays*
CmdTraceRays is neither a dispatch or a draw command which means it
shouldn't be affected by conditional rendering.

Fixes recent VKCTS coverage.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34868>
(cherry picked from commit 4b76d04f7f)
2025-05-20 20:18:05 +02:00
Robert Mader
a06889bd0f llvmpipe: Fix dmabuf import paths for DRM_FORMAT_YUYV variants
Right now llvmpipe only successfully supports single-plane formats,
limiting the number of supported YCbCr formats to a relatively small
number.

The implicit support for R8G8_R8B8 style subsampled RGB formats
causes the most common ones, YUYV and its variants, to chain up
to to lp_build_fetch_subsampled_rgba_aos() when importing (u)dmabufs
with EXT_image_dma_buf_import.
This code path currently has at least the following issues:
1. It doesn't support the YVYU/PIPE_FORMAT_R8B8_R8G8_UNORM and
    VYUY/PIPE_FORMAT_B8R8_G8R8_UNORM, resulting in asserts/crashes.
2. The supported cases, YUYV and UYVY, end up with sub-optimal results
    as they always return BT.601/narrow results, ignoring
    EGL_YUV_COLOR_SPACE_HINT_EXT and EGL_SAMPLE_RANGE_HINT_EXT.

Stopping advertising support for those formats, as well as native support
for PIPE_FORMAT_YUYV and PIPE_FORMAT_UYVY, results in all four variants
taking fallback paths which happen to be much better supported.

An additional effect is that YUYV and UYVY are correctly advertised as
external only.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34775>
(cherry picked from commit 4051d4ef59)
2025-05-20 20:18:05 +02:00
Gurchetan Singh
ca91cef9f2 gfxstream: make sure by default descriptor is negative
Otherwise, another valid fd may be closed.

Cc: mesa-stable
Reviewed-by: Aaron Ruby <aruby@qnx.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34885>
(cherry picked from commit 03a35024a6)
2025-05-20 20:18:04 +02:00
Samuel Pitoiset
b1c7064a68 radv: ignore radv_disable_dcc_stores on GFX12
It's not necessary because DCC is completely transparent to the
userspace driver. Also it's causing issues with scanout.

This fixes rendering issues with scanout in Indiana Jones.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12924
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34859>
(cherry picked from commit b7d2cdd2b4)
2025-05-20 20:18:04 +02:00
Lionel Landwerlin
8a1e3f3b45 vulkan/runtime: fixup assert with link_geom_stages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementations")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34874>
(cherry picked from commit 565ac1ee6a)
2025-05-20 20:18:04 +02:00
Lionel Landwerlin
a4c042b67a brw: fix brw_nir_move_interpolation_to_top
In a case like this :
   block_0:
      %5 = ...
      %6 = ...
      block_1:
         %7 = load_interpolated_input %5, %6

The current logic would move load_interpolated_input to block_0 before
%5 but not move %5 & %6 which are sources of that instruction.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
(cherry picked from commit 6230f3029f)
2025-05-20 20:18:04 +02:00
Timothy Arceri
c1bd710b0f mesa: fix color material tracking
f6c8ca06 changed this code to only set color materials mask when
the VERT_BIT_COLOR0 bit is set instead of when color material
is enabled. But this meant we always skipped over the
STATE_CURRENT_ATTRIB values.

Fixes: f6c8ca06f6 ("mesa: fix material inputs in ffvertex_prog.c")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7122
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34833>
(cherry picked from commit 600892802d)
2025-05-20 20:18:04 +02:00
Sagar Ghuge
36d45e2c5a anv: Fix untyped data port cache pipe control dump output
Fixes: 845ab3d627
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34855>
(cherry picked from commit bb61a78911)
2025-05-20 20:18:04 +02:00
Eric Engestrom
50a5d6b025 .pick_status.json: Update to 8edee1e25b 2025-05-20 20:17:59 +02:00
Eric Engestrom
e8011985b0 docs: add sha sum for 25.1.0 2025-05-07 19:06:10 +02:00
Eric Engestrom
5c142e46f3 VERSION: bump for 25.1.0 2025-05-07 18:35:10 +02:00
Eric Engestrom
72b8389416 docs: add release notes for 25.1.0 2025-05-07 18:35:09 +02:00
Faith Ekstrand
349c1e2cf4 nak: Set lower_pack_64_4x16
Otherwise, these can cause infinite loops in optimization because there
aren't _split variants and the optimizer tries to combine and split
things infinitely.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34849>
(cherry picked from commit efd1cddbe9)
2025-05-07 09:04:51 +02:00
Dmitry Osipenko
e7c1f35024 virtio/vpipe: Correct vdrm_vpipe_connect() definition
The vdrm_vpipe_connect() prototype defined in vdrm.c doesn't match
vdrm_vpipe_connect() defined in vdrm_vpipe.c. This leads to a compilation
warning about the wrong proto when Mesa linked with enabled LTO. Fix the
vdrm_vpipe_connect() definition.

Fixes: bf0e3d6274 ("virtio/vdrm: Add vtest backend")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34819>
(cherry picked from commit daad392d5c)
2025-05-07 09:04:50 +02:00
Konstantin Seurer
8b8ca028a0 radv: Return VK_ERROR_INCOMPATIBLE_DRIVER for unsupported devices
VK_ERROR_INITIALIZATION_FAILED will fail physical device enumeration.
Returning VK_ERROR_INCOMPATIBLE_DRIVER means that the driver can still
be used on supported GPUs when multiple GPUs are installed.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34783>
(cherry picked from commit 84b9c281fe)
2025-05-07 09:04:49 +02:00
Rhys Perry
77e7fd0dee aco: swap the correct v_mov_b32 if there are two of them
Previously, this function tried to swap the instruction which is not
v_mov_b32, so that it doesn't introduce any new OPY-only instructions. If
both were v_mov_b32, it swapped Y. Since this makes Y opy-only, this can't
be done if X is also opy-only.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 408fa33c09 ("aco/gfx12: don't use second VALU for VOPD's OPX if there is a WaR")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13101
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34841>
(cherry picked from commit 9ca71b52aa)
2025-05-07 09:04:39 +02:00
Eric Engestrom
9c49a2e03f .pick_status.json: Update to 84b9c281fe 2025-05-07 09:04:33 +02:00
Mel Henning
4c1447e89b nak: Check that swizzles are none
wherever we check that src_mod is none.

This commit simply does:
s/src_mod.is_none()/is_unmodified()/
across all of nak except the definition of is_unmodified() itself.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: bad23ddb48 ("nak: Add F16 and F16v2 sources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
(cherry picked from commit 9d1c38ddf1)
2025-05-06 23:40:53 +02:00
Mel Henning
81b877c9a0 nak: Add Src::is_unmodified() helper
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: bad23ddb48 ("nak: Add F16 and F16v2 sources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
(cherry picked from commit 6e72f0f81b)
2025-05-06 17:45:13 +02:00
Lionel Landwerlin
0ce1adf683 brw: add pre ray trace intrinsic moves
Some intrinsics are implemented by reading memory location that could
be rewritten by a further tracing calls. So we need to move those
reads prior to tracing operations in the shaders.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8979
Tested-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34214>
(cherry picked from commit c434050a00)
2025-05-06 17:24:10 +02:00
Karol Herbst
8780fd7da5 iris/xe: take the grids variable_shared_mem into account
This fixes OpenCL local memory kernel arguments.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34548>
(cherry picked from commit 7c78c76181)
2025-05-06 17:24:07 +02:00
Karol Herbst
de59c4b553 iris/xe: fix compute shader start address
It needs to apply the offset so it selects the correct SIMD shader.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34548>
(cherry picked from commit fee9230bb5)
2025-05-06 17:24:06 +02:00
Karol Herbst
855bc8242a iris: parse global bindings for every gen
This fixes OpenCL support on gen 12.5+

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34548>
(cherry picked from commit 57ccfd0502)
2025-05-06 17:24:05 +02:00
Mary Guillemard
8d2520cf95 pan/genxml: Fix inverted logic on nr_regs
v10 have 96 and v12+ have 128, not the opposite.

Fixes: 811525b543 ("pan/genxml: Build libpanfrost_decode for v12")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34815>
(cherry picked from commit 8447f7aaae)
2025-05-06 17:24:04 +02:00
Samuel Pitoiset
867fb6756b radv: fix GPU hangs with image copies for ASTC/ETC2 formats on transfer queue
Emitting compute dispatches on SDMA just hangs. It might be needed
to switch to gang submit for these to work but fixing the GPU hang is
more important for now.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34805>
(cherry picked from commit 0684dc5fa8)
2025-05-06 17:24:03 +02:00
Danylo Piliaiev
024ccb1c4b tu: Fix disable_fs state update condition
tu_calc_disable_fs depends on FS, so it should be updated on
TU_CMD_DIRTY_FS.

Fixes: be481e6615 ("tu: Disable FS in certain cases even if FS is not empty")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34791>
(cherry picked from commit 2797f42451)
2025-05-06 17:24:03 +02:00
Samuel Pitoiset
963b9fc2f3 radv: disable SINGLE clear codes to workaround a hw bug with DCC on GFX11
This fixes a very weird cache-related corruption with DCC on GFX11 due
to a hw bug according to PAL.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12932
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34790>
(cherry picked from commit 1356d20042)
2025-05-06 17:24:02 +02:00
Samuel Pitoiset
49d96917d5 radv: do not clear unwritten color attachments with dual-source blending
This is incorrect because the color format at slot 0 needs to be
replicated to the slot 1. But with dual-source blending the colors
written mask is only 0xf and this was clearing the color format at
slot 1.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13082
Fixes: e1483d022b ("radv: clear unwritten color attachments for monolithic PS earlier")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34773>
(cherry picked from commit 55ad0fd35c)
2025-05-06 17:24:01 +02:00
Timothy Arceri
52d082981f util/driconf: add force_gl_depth_component_type_int workaround
This allow us to force mesa to use GL_UNSIGNED_INT rather than
GL_UNSIGNED_SHORT for when chosing the texture format for
GL_DEPTH_COMPONENT. The increased depth precision allows us to
match the Nvidia/AMD closed drivers default behaviour.

Here we also enable the workaround for the remastered tombraider
games.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13032
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34752>
(cherry picked from commit e0a111540f)
2025-05-06 17:24:00 +02:00
Eric Engestrom
d762b354c7 .pick_status.json: Update to c434050a00 2025-05-06 17:23:57 +02:00
José Roberto de Souza
293aaa43b9 intel/tools: Fix batch buffer decoder
intel_decoder_init() initializes intel_batch_decode_ctx so later
we can call decode functions but it depends on data stored in
brw/elk_isa_info but that was being allocated in stack
of intel_decoder_init() then when the decode functions were executed
it was accessing garbage at the brw/elk_isa_info memory.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ec2d20a70d ("intel/tools: Add helpers for decoder_init/disasm")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34776>
(cherry picked from commit 3e5a735d01)
2025-05-03 12:48:02 +02:00
Lionel Landwerlin
d8cf36fbb1 intel: fix null render target setup logic
Or current render target cache setting is to key on the binding table
index, meaning the HW associates a number in the range [0, 7] to a
RENDER_SURFACE_STATE description. If you want change the render target
0 between 2 draw calls, you need to insert a PIPE_CONTROL in between
the 2 draw calls with pb-stall + rt-flush in order to flush an writes
to a previous RENDER_SURFACE_STATE that has now becomed disassociated
with the [0, 7] number.

This PIPE_CONTROL taking care of the flush is dealt with in
cmd_buffer_maybe_flush_rt_writes(). This function diffs the current
BTI setup for render targets (first 0 to 7 BTIs) with what the next
fragment shader wants.

The issue here is we might have a render pass with 0 color attachments
and yet in 98cdb9349a we added one pointing to the render target 0,
but in the emit_binding_table() when we finally program the BTI, we
check the render pass color count and program a null surface state
instead of an actual surface state. And this leads to hangs because
the render target cache will end up with inconsistent state data.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 98cdb9349a ("anv: ensure null-rt bit in compiler isn't used when there is ds attachment")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12955
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34603>
(cherry picked from commit 63f633557f)
2025-05-03 12:48:02 +02:00
Paul Gofman
234d66a1e2 radv/amdgpu: Fix hash key in radv_amdgpu_winsys_destroy().
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34774>
(cherry picked from commit 96765935e8)
2025-05-03 12:48:02 +02:00
Karol Herbst
c42b829ac4 r600: fix r600_buffer_from_user_memory for rusticl
Not entirely sure if it's actually required, but this makes it consistence
with r600_resource_create also calling r600_compute_global_buffer_create
for global memory buffers.

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Patrick Lerda <patrick9876@free.fr>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
(cherry picked from commit f6e3c967d9)
2025-05-03 12:48:02 +02:00
Eric Engestrom
53adfa7182 ci: drop tracking of removed folder
Fixes: 185a3f9105 ("gallium: delete tests")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
(cherry picked from commit 7addf551f3)
2025-05-03 12:48:02 +02:00
Eric Engestrom
28264fe953 .pick_status.json: Update to 7f0de1a512 2025-05-03 12:48:02 +02:00
Aleksi Sapon
8125b0def2 lp: fix gnu-empty-initializer warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34655>
(cherry picked from commit 501ed5be49)
2025-05-03 12:48:02 +02:00
Mike Blumenkrantz
cdafaef206 egl: fix sw fallback rejection in non-sw EGL_PLATFORM=device
previously progress could still be made during sw fallback here,
which would lead to unpredictable results with driver loading e.g., crashing

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34609>
(cherry picked from commit 8a339cdebc)
2025-05-01 09:39:47 +02:00
Connor Abbott
746f2986ec ir3: Take LB restriction on constlen into account on a7xx
On a7xx, the max constlen for compute is increased to 512 vec4s or 8KB,
however the size of the LB was not increased beyond 40KB. A quick
calculation shows that 8KB of consts multiplied by 2 banks plus the
API maximum of 32KB shared memory would exceed 40KB. This means that
we can't always use a constlen of 512, and sometimes have to fall back
to 256 when a lot of shared memory is in use.

In the future, we can use similar calculations to figure out how much
"extra" shared memory is available for the backend to spill to, but we
currently don't support spilling to shared memory.

Fixes: 5879eaac18 ("ir3: Increase compute const size on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34746>
(cherry picked from commit ea9d694a7b)
2025-05-01 09:39:45 +02:00
Connor Abbott
385a56642b freedreno/a6xx, turnip: Set CONSTANTRAMMODE correctly
This should fix hangs when using more than 256 constants on a7xx.

Fixes: 5879eaac18 ("ir3: Increase compute const size on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34746>
(cherry picked from commit 80bcbc0e92)
2025-05-01 09:39:44 +02:00
Connor Abbott
2a06a20a4a freedreno/a6xx: Define CONSTANTRAMMODE
While we're here, give SP_CS_UNKNOWN_A9B1 a better name.

Fixes: 5879eaac18 ("ir3: Increase compute const size on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34746>
(cherry picked from commit 57986ae5ec)
2025-05-01 09:39:43 +02:00
Connor Abbott
f6450df88f freedreno: Add compute_lb_size device info
This is really a guess except for a6xx and later, however it shouldn't
change behavior from before.

Fixes: 5879eaac18 ("ir3: Increase compute const size on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34746>
(cherry picked from commit 156ab5839d)
2025-05-01 09:39:42 +02:00
Karol Herbst
84f1dcdc2a nak: fix handling of delays > 15
Fixes: 2b569ecdb6 ("nak: Handle delays > 15")
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34722>
(cherry picked from commit 9a97a5d577)
2025-05-01 09:39:41 +02:00
Janne Grunau
6101b0ae4b ci: Switch cross-builds to '-D tools=panfrost'
It is not longer necessary to build the panfrost gallium driver for
panfrost_compile so do not do that.

Backport-to: 25.1
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34693>
(cherry picked from commit f6c5f0c19d)
2025-05-01 09:39:39 +02:00
Janne Grunau
e37333798c panfrost: build panfrost_compile for -Dtools=panfrost
This allows building tools for cross-compiling without building gallium
or vulkan drivers unnecessarily.

Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34693>
(cherry picked from commit 674c96ad0a)
2025-05-01 09:38:52 +02:00
Janne Grunau
449a7f98c7 asahi: Drop unnecessary idep_mesaclc dependency
Fixes build with `-Dmesa-clc=system`.

Backport-to: 25.1
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34693>
(cherry picked from commit a228d715b6)
2025-05-01 09:38:51 +02:00
Janne Grunau
afe870756d asahi: build asahi_clc for -Dtools=asahi
This allows building tools for cross-compiling without building gallium
or vulkan drivers unnecessarily.

Backport-to: 25.1
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34693>
(cherry picked from commit 007d7418f8)
2025-05-01 09:38:50 +02:00
Lionel Landwerlin
a17da10518 anv: force fragment shader execution when occlusion queries are active
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34732>
(cherry picked from commit f7bc22e0d7)
2025-05-01 09:38:49 +02:00
Eric Engestrom
ebf87ad70b .pick_status.json: Update to 615d0c9669 2025-05-01 09:38:44 +02:00
Eric Engestrom
695aca39c2 VERSION: bump for 25.1.0-rc3 2025-04-30 16:08:47 +02:00
Tapani Pälli
5838a36951 intel/dev: update mesa_defs.json from internal database
Cc: mesa-stable
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/34753>
(cherry picked from commit eeffb4e674)
2025-04-30 14:16:00 +02:00
Karmjit Mahil
058922a3b8 tu: Fix segfault in fail_submit KGSL path
Fixes: ec268fa5b6 ("tu/kgsl: Support u_trace and perfetto")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34749>
(cherry picked from commit 9dfd4a091c)
2025-04-30 14:15:59 +02:00
Iván Briano
b939de025d brw: make HALT instruction act as barrier in new CSE pass
This brings back c9e33e5cbf ("intel/fs/cse: Make HALT instruction act
as CSE barrier."), from the old CSE pass into the new one.

Fixes new CTS test: dEQP-VK.subgroups.shader_quad_control.terminated_invocation

Fixes: 9690bd369d ("intel/brw: Delete old local common subexpression elimination pass")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34643>
(cherry picked from commit 29d7b90cfc)
2025-04-30 14:15:58 +02:00
Mel Henning
d0627d243d nak: Remove hfma2 src 1 modifiers
This fixes a compilation issue in Marvel Rivals where the legalization
logic and the encoding logic don't line up, which results in an
assertion failure on this instruction:

    r17 = hfma2 r17.xx -r18.xx 0x3c003c00

The fix here is a little overly restrictive because it turns out we
actually do have modifiers for all 3 sources. Those modifiers will
be added in later commits.

Fixes: 567cae69c3 ("nak: Add 16-bits float operations")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34750>
(cherry picked from commit 1ff7135691)
2025-04-30 14:15:58 +02:00
Sagar Ghuge
fd80d0027b intel/compiler: Fix stackIDs on Xe2+
For Xe2+, from Bspec 64643, bit field "StackID": The maximum number of
StackIDs can be 2^12- 1.

Cc: mesa-stable
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34709>
(cherry picked from commit 821c1bfa7e)
2025-04-30 14:15:57 +02:00
Caio Oliveira
bb56867a1b intel/executor: Fix bfloat example for converting F to packed BF
In float pointing rules adding +0.0f preserves all values except
for -0.0f, so what we want here is to add -0.0f.  In the future
we should add proper support for float immediates in the assembler.

Fixes: fafdd24285 ("intel/executor: Update bfloat example")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
(cherry picked from commit 3e0418ba02)
2025-04-30 14:15:56 +02:00
Mary Guillemard
1f82af229d pan/bi: Properly lower add/sub with saturation on v11+
We were wrongly lowering all add/sub operations with saturation on 8-bit
values on v11+.

This fixes CTS failures on
"dEQP-VK.spirv_assembly.instruction.compute.opudotaccsatkhr.*" and
likely more apps.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: d79a31bf81 ("pan/bi: Lower removed instructions in algebraic on v11+")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34743>
(cherry picked from commit 6ab4ae1a19)
2025-04-30 14:15:55 +02:00
Samuel Pitoiset
03dc23baa2 radv: fix re-emitting VRS state when rendering begins
This state also depends on whether a VRS attachment is used.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11693
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34735>
(cherry picked from commit 1fccc09abe)
2025-04-30 14:15:54 +02:00
Ian Romanick
f2a54f5244 brw/cmod: Don't propagate from CMP to possible Inf + (-Inf)
Most of the churn in this commit is changing unit tests that were
testing things that are now invalid.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17122204 -> 17122669 (<.01%)
instructions in affected programs: 120669 -> 121134 (0.39%)
helped: 0 / HURT: 124

total cycles in shared programs: 895602370 -> 895613210 (<.01%)
cycles in affected programs: 17868974 -> 17879814 (0.06%)
helped: 35 / HURT: 85

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 210736518 -> 210743769 (+0.00%)
Cycle count: 30377733040 -> 30377699060 (-0.00%); split: -0.00%, +0.00%
Max live registers: 66056852 -> 66056966 (+0.00%)

Totals from 1505 (0.21% of 706776) affected shaders:
Instrs: 1890151 -> 1897402 (+0.38%)
Cycle count: 48397408 -> 48363428 (-0.07%); split: -0.11%, +0.04%
Max live registers: 256821 -> 256935 (+0.04%)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34509>
(cherry picked from commit e26270249b)
2025-04-30 14:15:52 +02:00
Ian Romanick
aa08dfbad4 brw/cmod: Fix some errors when propagating from CMP to ADD.SAT
When I originally wrote that code, I didn't understand what a jerk NaN
can be.

v2: Remove the brw_type_is_uint stuff. This function is currently only
called for float types. In a later commit, integer types will be
supported but only for NZ and Z conditions. Noticed by Matt.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17122197 -> 17122204 (<.01%)
instructions in affected programs: 1691 -> 1698 (0.41%)
helped: 0 / HURT: 4

total cycles in shared programs: 895602484 -> 895602370 (<.01%)
cycles in affected programs: 912964 -> 912850 (-0.01%)
helped: 2 / HURT: 2

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 210736388 -> 210736518 (+0.00%)
Cycle count: 30377728900 -> 30377733040 (+0.00%); split: -0.00%, +0.00%

Totals from 130 (0.02% of 706776) affected shaders:
Instrs: 169911 -> 170041 (+0.08%)
Cycle count: 18021210 -> 18025350 (+0.02%); split: -0.00%, +0.02%

Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34509>
(cherry picked from commit 0dab520a19)
2025-04-30 14:15:51 +02:00
Danylo Piliaiev
d14c0562c6 ir3: VARYING_SLOT_LAYER output is used for binning
In multi-layered framebuffer LRZ also has several layers and binning
pass needs to write depth to a correct layer, so binning VS needs
VARYING_SLOT_LAYER.

Fixes: 9775b33d0f ("tu: Enable GMEM with layered rendering")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34728>
(cherry picked from commit dea4bb3757)
2025-04-30 14:15:50 +02:00
Samuel Pitoiset
1664381813 radv: set radv_disable_dcc=true for WWE 2k23
This game is no longer available Steam, so it's more annoying to
reproduce the issue.

Let's disable DCC for that game to workaround rendering issues which
are likely game bugs.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10850
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34607>
(cherry picked from commit 5841d44f91)
2025-04-30 14:15:48 +02:00
Rhys Perry
87902dca71 aco: fix get_temp_reg_changes with clobbered operands
The spiller might have tried to spill a live-through first or second
s_fmac_f32 operand, but this wouldn't have reduced the SGPRs if the third
operand wasn't killed

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13038
Fixes: d6cb45dbb0 ("aco/spill: Allow spilling live-through operands")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34699>
(cherry picked from commit 7fe84024cb)
2025-04-30 14:15:47 +02:00
Tapani Pälli
a900b3f39d anv: put parenthesis to the set_sampler_size equation
This fixes errors seen with some renderdoc captures failing to allocate
descriptor sets.

Fixes: 76096d04bb ("anv: relax restriction on variable count descriptors")
Signed-off-by: Tapani Pälli <tapani.palli@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/34671>
(cherry picked from commit ed9f135936)
2025-04-30 14:15:45 +02:00
Eric Engestrom
d06fb6fb4b .pick_status.json: Update to eeffb4e674 2025-04-30 14:15:30 +02:00
Erik Faye-Lund
7926758a78 panvk: support vulkan 1.2 on v10+
While not yet officially conformant, we support all the required
features, and we pass the CTS. Let's mark off Vulkan 1.2, to make things
easier for applications.

Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34512>
(cherry picked from commit b3fd8ddf6a)
2025-04-27 11:51:59 +02:00
Mary Guillemard
8d01b5577b panvk: Take resource index in valhall_lower_get_ssbo_size
Previously we were not extracting the resource index from the resource
handle.

This fixes failures with PanVK+ANGLE on "dEQP-GLES31.functional.ssbo.array_length.unsized_*".

Fixes: e4613f8b23 ("panvk: Lower get_ssbo_size() on Valhall")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34697>
(cherry picked from commit 845611bb43)
2025-04-27 11:51:37 +02:00
John Anthony
a9b90aa1ce panvk: Enable VK_EXT_direct_mode_display
Panvk already enables VK_EXT_acquire_xlib_display, but not
VK_EXT_direct_mode_display which is a dependency. This causes a failure
in dEQP-VK.info.instance_extensions.

Fixes: 8c2bfa279d ("panvk: support x11 wsi")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34672>
(cherry picked from commit 8dd578e2a4)
2025-04-27 11:51:34 +02:00
Mary Guillemard
6bde6bfde7 panvk: Take rasterization sample into account in indirect draw on v10+
This has been an oversight when implementing indirect draw.

Fixes: 1f3b8bb918 ("panvk: Add support for Draw[Indexed]Indirect")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34674>
(cherry picked from commit c7f2bc6bed)
2025-04-27 11:50:23 +02:00
Olivia Lee
3c85516be1 panfrost: allow promoting sysval UBO to push constants
We already had a path for sysvals in panfrost_emit_const_buf, but it was
unused because we only allowed pushing the default UBO 0. Improves
glmark2 score on G610 from 3051 to 3071, but mostly we need it as a
prerequisite for dynamic blend constants.

Signed-off-by: Olivia Lee <benjamin.lee@collabora.com>
Fixes: 59a3e12039 ("panfrost: do not push "true" UBOs")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34664>
(cherry picked from commit e93261f579)
2025-04-27 11:50:23 +02:00
Boris Brezillon
518f052e98 pan/format: Disable image storage on A8_UNORM
A8_UNORM on v9+ is using RGBA8_UNORM as a pixel format with the
A8_UNORM clump format to dealing with the diffences between
RGBA8 and the actual A8 in-memory layout.

The problem is, LEA_TEX only loads the InternalConversionDescriptor
which contains only the pixel format, and that's what ST_CVT uses
to do the conversion, so we'll actually store 4 components instead
of one.

This shows up with
dEQP-VK.image.load_store.without_any_format.buffer.a8_unorm* after
enabling maintenance5.

For now I've turned off the image storage capability for A8_UNORM
on all gens, but I'd be fine disabling it only on v9+ if you think
that's preferable.

Fixes: d95423686f ("pan/format: Add PAN_BIND_STORAGE_IMAGE flag")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34648>
(cherry picked from commit 9d1262e108)
2025-04-27 11:50:22 +02:00
Alyssa Rosenzweig
91cf9b4e43 asahi: do not use "Null" layout
This is the most serious bug we've had in a long time due to a fundamental
misunderstanding of the hardware (due to incomplete reverse-engineering). It
caught me off guard.

The texture descriptor has "mode" bits which configure two aspects of how the
address pointer is interpreted:

* whether it is indirected, pointing to a secondary page table for sparse
* whether it writes texture access counters (for Metal's idea of sparse).

...Neither of these is a "null texture" mode.

So why did I see Apple's blob using a non-normal mode for null textures, and why
did I copy those settings?

1. Because the hardware texture access counters provide a cheap way to detect
   null texture accesses after the fact, which I think their GPU debug tools
   use. I'm not sure why release builds of the driver do/did that, but whatever.

2. Because I assumed Cupertino knew best and I didn't bother looking too close.

We can't use them here (without doing extra memory allocations), since then
the GPU will increment access counters. And since our null texture address used
to just be a pointer in the command buffer, that mean the GPU will trash
whatever memory happened to be 0x400 bytes after the start of the null texture
descriptor. The symptom being random faults.

This bug was caught when trying to use the zero-page instead, which raised a
permission fault when the GPU tried to write counts. Then I remembered the
sparse mechanism and had a bit of a eureka moment. Immediately followed by an
"oh, f#$&" moment as I realized how many random bugs could potentially be root
caused to this.

The fix is two-fold:

1. Use normal layout instead.
2. Set the address to the zero-page (which is a fixed VA) and detect null
   textures by checking the address, instead of the mode.

The latter is a good idea anyway, but both parts needs to be done atomically to
maintain bisectability.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34703>
(cherry picked from commit 3eb7575679)
2025-04-27 11:45:30 +02:00
Rhys Perry
e1f06788f5 aco/gfx11: create waitcnt for workgroup vmem barriers
It seems this is necessary on GFX11.

Similar to 576a2e798c

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 25.0
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34634>
(cherry picked from commit b03e071583)
2025-04-27 11:45:27 +02:00
Timur Kristóf
5c9733618d radv: Clear dirty flag for clip rects state after emitting it.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Fixes: 0ba3a8b3cc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34686>
(cherry picked from commit 3ad385b9cc)
2025-04-27 11:45:24 +02:00
Timur Kristóf
d18a3d5f09 radv: Clear dirty flag for MSAA state after emitting it.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Fixes: 08918f0880
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13022
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34686>
(cherry picked from commit 3a05477ac6)
2025-04-27 11:45:23 +02:00
Lionel Landwerlin
dfc807a303 anv: use companion batch for operations with HIZ/STC_CCS destination
We're currently crashing a couple of tests :
   dEQP-VK.pipeline.monolithic.depth.xfer_queue_layout.*

   deqp-vk: ../src/intel/blorp/blorp_blit.c:2935:
     blorp_copy: Assertion `blorp_copy_supports_blitter(batch->blorp, src_surf->surf, dst_surf->surf, src_surf->aux_usage, dst_surf->aux_usage)' failed.

Tested on:
  dEQP-VK.api.copy_and_blit.copy_commands2.image_to_image_transfer_queue.all_formats.depth_stencil.*
  dEQP-VK.api.copy_and_blit.multiplanar_xfer.*
  dEQP-VK.pipeline.monolithic.depth.xfer_queue_layout.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 31eeb72e45 ("blorp: Add support for blorp_copy via XY_BLOCK_COPY_BLT")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34023>
(cherry picked from commit e60416b4e4)
2025-04-27 11:45:21 +02:00
Karol Herbst
148d66678e nir_lower_mem_access_bit_sizes: fix negative chunk offsets
With a 64 bit pointer model, instead of doing -1 the pass ended up doing
+4294967295. The reason here was some implicit integer conversion going
horribly wrong, so just do the offset math in 64 bit to get a nice result.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13023
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34669>
(cherry picked from commit 33965bb21b)
2025-04-27 11:45:16 +02:00
Yinjie Yao
5973aa8505 frontends/va: Handle properly when decoding more slices than limit
For h264/h265/av1/vp9, give warning when application is
sending more slices than allowed by limit, and stop copying
remaining slices to avoid unwanted behaviour.

Cc: mesa-stable
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34633>
(cherry picked from commit eecfb02463)
2025-04-27 11:45:13 +02:00
Yurii Kolesnykov
c3c65d8b25 Get rid of 5 remaining references to glapitable.h
Closes: #13003
Fixes: 0cebfb15 ("glapi: remove duplicated generated header glapitable.h")

Co-authored-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34682>
(cherry picked from commit 9822fa3ef3)
2025-04-27 11:44:57 +02:00
Mel Henning
a7dae0fec8 wsi/headless: Override finish_create
Since headless overrides create_mem, it needs to override finish_create
too. Fixes a segfault in nvk that was caused by us mixing
wsi_create_null_image_mem with wsi_finish_create_blit_context, which
would then call CmdCopyImageToBuffer with image->blit.buffer == NULL

Fixes a cts failure on nvk in:
dEQP-VK.image.swapchain_mutable.headless.2d.r8g8b8a8_unorm_b8g8r8a8_unorm_clear_copy_format_list
and several others

Fixes: 579578f10a ("vulkan/wsi/drm: Break create_prime_image in pieces")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34646>
(cherry picked from commit 60452e016e)
2025-04-27 11:44:56 +02:00
Dmitry Baryshkov
3619611b31 mesa-clc: add an option to force inclusion of OpenCL headers
Currently mesa-clc bundles OpenCL headers from Clang only if the static
LLVM is used (which means Clang / LLVM are not present on the target
system). In some cases (e.g. when building in OpenEmbedded environemnt)
it is desirable to have shared LLVM library, but skip installing the
whole Clang runtime just to compile shaders. Add an option that forces
OpenCL headers to be bundled with the mesa-clc binary.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34551>
(cherry picked from commit 419a9e9d42)
2025-04-27 11:43:43 +02:00
Eric Engestrom
631022841f .pick_status.json: Update to 3493500abb 2025-04-27 11:43:39 +02:00
Eric Engestrom
1eba12fc5f VERSION: bump for 25.1.0-rc2 2025-04-23 19:47:02 +02:00
Eric Engestrom
72c2990b5c [25.1 only] ci: don't treat misleading-indentation warnings are error on alpine
I don't understand why, but somehow the changes in e38631ad...3d9ac270
is causing this 1) in a file that has not changed, and 2) on lines that
are indented identically, with the `for` in the macro being terminated
with a `;` semicolon by the caller, so it looks all good to me.

Silencing this allows me to get the release through, but I probably
won't look back either, so hopefully there won't be a legitimate
instance of that warning in the future 😇
2025-04-23 19:45:39 +02:00
Georg Lehmann
3d9ac270e2 aco/insert_exec: reset temporary when recreating wqm mask from exact mask
The old, now incorrect temporary was still used for invert blocks and loop masks.

Foz-DB Navi31:
Totals from 379 (0.48% of 79789) affected shaders:
Instrs: 399471 -> 399897 (+0.11%); split: -0.00%, +0.11%
CodeSize: 2197292 -> 2198908 (+0.07%); split: -0.00%, +0.08%
Latency: 2500636 -> 2500895 (+0.01%); split: -0.00%, +0.01%
SClause: 7912 -> 7918 (+0.08%); split: -0.04%, +0.11%
Copies: 25687 -> 26068 (+1.48%); split: -0.04%, +1.53%
PreSGPRs: 15648 -> 15562 (-0.55%)
SALU: 35125 -> 35517 (+1.12%)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12901
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13019
Fixes: b872ff6ef2 ("aco/insert_exec_mask: if applicable, use s_wqm to restore exec after divergent CF")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34659>
(cherry picked from commit dd3e1190a2)
2025-04-23 12:21:56 +02:00
Georg Lehmann
4fb4880183 aco/insert_exec: only restore wqm mask after control flow if necessary
The next commit will make this not free, so we should avoid it if possible.

Foz-DB Navi31:
Totals from 3933 (4.93% of 79789) affected shaders:
Instrs: 5726914 -> 5727295 (+0.01%); split: -0.00%, +0.01%
CodeSize: 31307100 -> 31308884 (+0.01%); split: -0.00%, +0.01%
SpillSGPRs: 1797 -> 1793 (-0.22%); split: -0.33%, +0.11%
Latency: 58973929 -> 58974343 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 8591893 -> 8591911 (+0.00%); split: -0.00%, +0.00%
SClause: 209074 -> 209115 (+0.02%); split: -0.00%, +0.02%
Copies: 423965 -> 432420 (+1.99%)
Branches: 149976 -> 149979 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 200175 -> 200663 (+0.24%)
VALU: 3440165 -> 3440156 (-0.00%); split: -0.00%, +0.00%
SALU: 555727 -> 556143 (+0.07%); split: -0.00%, +0.08%

Fixes: b872ff6ef2 ("aco/insert_exec_mask: if applicable, use s_wqm to restore exec after divergent CF")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34659>
(cherry picked from commit 13f6be262a)
2025-04-23 12:21:56 +02:00
Ella Stanforth
461f11239e v3d/compiler: Fixup output types for all 8 outputs
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
(cherry picked from commit 1ec0cdb733)
2025-04-23 12:21:56 +02:00
José Roberto de Souza
c912c746c5 intel: Fix the MOCS values in XY_BLOCK_COPY_BLT for Xe2+
One more instruction were the MOCS value was splited into two
registes.

Cc: mesa-stable
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34592>
(cherry picked from commit fcb6dfb29c)
2025-04-23 12:21:56 +02:00
José Roberto de Souza
14a045df1c intel: Fix the MOCS values in XY_FAST_COLOR_BLT for Xe2+
Xe2 changed the MOCS field in few instructions, those now have a field
for the MOCS index and other the encryption enable bit but ISL returns
the combination of both aka MEMORY_OBJECT_CONTROL_STATE.

To minimize changes I have added 2 macros to extract the values
from the value returned by isl.

From all the instructions changed Mesa only make use of two, so the
other instruction will be handled in the next patch.

Cc: mesa-stable
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34592>
(cherry picked from commit 161c412a82)
2025-04-23 12:21:56 +02:00
José Roberto de Souza
6fdcc55f6d intel: Program XY_FAST_COLOR_BLT::Destination Mocs for gfx12
Copy engine is not used in gfx12 platforms on ANV but that is possible
in Iris.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34560>
(cherry picked from commit a96e280dfe)
2025-04-23 12:21:56 +02:00
Pierre-Eric Pelloux-Prayer
ff40113ad5 radeonsi: fix potential use after free in si_set_debug_callback
si_destroy_context needs to call context->set_debug_callback(...) to
avoid the debug logs to access the destroyed context.

Adding this change introduced a different problem: when an aux context
is destroyed from si_destroy_screen, parts of the screen have been
freed already: the shader_compiler_queue_*.

c467a87e06 ("radeonsi: Destroy queues before the aux contexts") moved
the util_queue_destroy calls above the context destruction, but with
the 59a3f38ff6 change, it's not needed anymore: si_destroy_context
will finish the screen shader queues before proceeding with releasing,
so use-after-free isn't possible.

Fixes: 59a3f38ff6 ("radeonsi: clear the debug callback on ctx destroy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12035
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34574>
(cherry picked from commit 2a381bbc3c)
2025-04-23 12:21:56 +02:00
Boris Brezillon
f127f9ca88 panvk/csf: Fix instance attribute offseting
Letting the shader offset instanceID by baseInstance works only if
the divisor is one. If the divisor is greater than one, the firstInstance
parameter shouldn't be applied this divisor, but it currently is. Zero
divisors are also problematic, in that they will force use of the
instance zero attribute all the time.

The only way to fix that is to tweak the offsets of the per-instance
attributes instead, like is done in the JM backend.

Fixes: 1570f0172e ("panvk: Fix base_{instance,vertex} handling")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34642>
(cherry picked from commit b2a8e3838d)
2025-04-23 12:21:56 +02:00
Boris Brezillon
41a2ccc117 panvk/csf: Pass less arguments to emit_vs_attrib()
Most of the arguments we pass to emit_vs_attrib() can be extracted
from panvk_cmd_buffer, so let's pass a cmdbuf before we add more to
this function.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34642>
(cherry picked from commit b093855caa)
2025-04-23 12:21:56 +02:00
Karol Herbst
c1a358d8ca rusticl/device: fix panic when disabling 3D image write support
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12985
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34649>
(cherry picked from commit 6f080ac532)
2025-04-23 12:21:56 +02:00
Danylo Piliaiev
6cf01adf6b tu,freedreno: Don't fallback to LINEAR with DRM_FORMAT_MOD_QCOM_COMPRESSED
DRM_FORMAT_MOD_QCOM_COMPRESSED forces the image to be UBWC regardless
of what's better for perf, we should respect that.

The regression is seen in GTK4 when it tries to create tiny swapchain
images.

Fixes: fc50fb35b0
("tu,freedreno: Enable linear mipmap tail for UBWC images")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34628>
(cherry picked from commit 36f22cc951)
2025-04-23 12:21:56 +02:00
Connor Abbott
559d33b2b6 tu: Fix flushing when using a staging buffer for copies
When doing the flushing, I forgot that because the staging buffer can be
used with different formats with different cpp, we need to make sure
that CCU is properly flushed and invalidated between each copy to the
staging buffer to prevent stale cache entries from creeping in, as the
CCU seems to rely on the cpp staying the same, even on a7xx which
dropped some of the other restrictions like using the same RT
index/layer. For "normal" user-visible copies this is done via
transitioning from UNDEFINED.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34611>
(cherry picked from commit ee10938bee)
2025-04-23 12:21:56 +02:00
Mary Guillemard
a05f320447 panvk: reset dyn_bufs map count to 0 in create_copy_table
We were forgetting to reset the map count to 0 in case of dyn_bufs in
create_copy_table.

This was causing invalid copy entries to be added to the table causing
invalid copies in most situation with holes in the set definition while
still binding set 0 or at worst an assert to be triggered in
cmd_fill_dyn_bufs.

This fixes "dEQP-GLES3.functional.ubo.*" and
dEQP-GLES31.functional.ubo.*" on PanVK+ANGLE.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: e350c334b6 ("panvk: Extend the descriptor lowering pass to support Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34652>
(cherry picked from commit 8d2e16cc11)
2025-04-23 12:21:56 +02:00
Georg Lehmann
d3285fe971 aco: set opsel_hi to 1 for WMMA
This is ignored by the hardware but LLVM requires it to disassemble GFX12 WMMA.

Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34396>
(cherry picked from commit b0c8f31600)
2025-04-23 12:21:56 +02:00
Faith Ekstrand
6f9e010794 nvk: Maxwell+ is now conformant
This advertises Vulkan 1.4 conformance for Maxwell+ GPUs as well as
enabling Vulkan on them by default.

Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34582>
(cherry picked from commit d383d78e8c)
2025-04-23 12:21:56 +02:00
Eric Engestrom
0693f55fe3 pick-ui: add missing dependency
Somehow I forgot to commit this line 🤦

Fixes: c37a468a8a ("pick-ui: make `Backport-to: 25.0` backport to 25.0 *and more recent release branches*")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34657>
(cherry picked from commit 0a41200f82)
2025-04-23 12:21:56 +02:00
Eric Engestrom
e0ebea94db .pick_status.json: Update to dd3e1190a2 2025-04-23 12:21:53 +02:00
Tomeu Vizoso
e38631ad0a etnaviv: Release screen->dummy_desc_reloc.bo
We are currently trying to release twice the same dummy BO, while
leaking the other one.

Fixes: bca5ef70a4 ("etnaviv: split dummy RT backing store from reloc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
(cherry picked from commit 63251d43ae)
2025-04-22 18:44:54 +02:00
Georg Lehmann
b9ed912660 nir/opt_algebraic: disable fsat(a + 1.0) opt if a can be NaN
Foz-DB Navi21:
Totals from 9 (0.01% of 79789) affected shaders:
Instrs: 6782 -> 6796 (+0.21%); split: -0.03%, +0.24%
CodeSize: 40020 -> 40108 (+0.22%); split: -0.04%, +0.26%
Latency: 23764 -> 23758 (-0.03%)
InvThroughput: 6424 -> 6431 (+0.11%); split: -0.08%, +0.19%
SClause: 273 -> 275 (+0.73%)
Copies: 338 -> 339 (+0.30%)
VALU: 5138 -> 5147 (+0.18%); split: -0.06%, +0.23%
SALU: 349 -> 350 (+0.29%)
SMEM: 498 -> 500 (+0.40%)

Fixes: a4a3487aae ("nir/opt_algebraic: optimize patterns from Skia")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
(cherry picked from commit 3e26fc4498)
2025-04-22 18:44:53 +02:00
Yinjie Yao
b1c0dc9259 gallium/pipe: Increase hevc max slice to 600
According to the spec, increase max supported slices of hevc to 600.

Cc: mesa-stable
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34632>
(cherry picked from commit 2b5ca87927)
2025-04-22 18:44:52 +02:00
Mel Henning
9811e2b7d1 nvk: Override render enable for blits and resolves
Fixes cts tests:

dEQP-VK.conditional_rendering.conditional_ignore.blit_image
dEQP-VK.conditional_rendering.conditional_ignore.blit_image_inverted
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image_inverted

which were introduced in vk-gl-cts commit 4aa277c300

Fixes: 32f2317223 ("nvk: Use meta for doing blits with the 3D hardware")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34644>
(cherry picked from commit 2fc4c98aaf)
2025-04-22 18:44:52 +02:00
Mel Henning
e52fac2e6d nvk: SET_STATISTICS_COUNTER at start of meta_begin
Ideally, begin/end should be roughly symmetric - the initialization
order should be the reverse of the teardown order.

Fixes: 6f85e6b06b ("nvk: Disable statistics around meta ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34644>
(cherry picked from commit 52085f2a0e)
2025-04-22 18:44:51 +02:00
Eric Engestrom
94628a8fbf pick-ui: make Backport-to: 25.0 backport to 25.0 *and more recent release branches*
It is what developers expect, so make the code match it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34580>
(cherry picked from commit c37a468a8a)
2025-04-22 18:38:51 +02:00
Eric Engestrom
b072a973ee .pick_status.json: Update to 5f3a3740dc 2025-04-22 18:38:47 +02:00
Mary Guillemard
066850bb3a panfrost: Take tiler memory budget into account in pan_select_tiler_hierarchy_mask
On v12+, the hardware report support for 8 levels but
effectively only support up to 4 levels.

In case more than 4 levels are used, it will default to 0xAA when
tile_size is 32x32 or lower, otherwise 0xAC when the tile_size is greater than 32x32.

This patch makes it that we now ensure that the bins can fit inside out
tiler budget and otherwise drop levels until it fit.

This also allows the hardware to decide the hierarchy on v12+
if we know it will fit.

This fixes "dEQP-GLES31.functional.fbo.no_attachments.maximums.all" and
dEQP-GLES31.functional.fbo.no_attachments.maximums.size" on v12+ but
also likely more if we were exhausting the memory budget.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34559>
(cherry picked from commit 92afeb37bf)
2025-04-22 01:25:05 +02:00
David Rosca
5bae75e3a0 radeonsi/vcn: Fix decode target index for H264 interlaced streams
With H264 the target surface can also be in the reference list for
current frame, so it can only be inserted into the DPB list after
iterating over all references.

Fixes: 0e68a2655f ("radeonsi/vcn: Rework decode ref handling")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34527>
(cherry picked from commit b0b52d4922)
2025-04-22 01:25:04 +02:00
Marek Olšák
39e4fe7ab4 radv: fix incorrect patch_outputs_read for TCS with dynamic state
Fixes: 8c2f9f0665 - radv: switch to the new TCS LDS/offchip size computation

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
(cherry picked from commit 4a51089f30)
2025-04-22 01:25:00 +02:00
Janne Grunau
b47ada6635 venus: virtgpu: Require stable wire format
When VMMs do not support VIRTGPU_DRM_CAPSET_VENUS the capset data
remains zeroed. By requiring the stable wire_format_version 1 this can
be detected early without initialising the renderer.

Avoids triggering `assert(capset->supports_blob_id_0);` in debug builds
under such circumstances.

Cc: mesa-stable
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
(cherry picked from commit 3d3ca9b65e)
2025-04-22 01:24:59 +02:00
Yiwei Zhang
da4de27515 venus: fix missing renderer destructions
With failed compatibility check, the created renderer must be destroyed
within vn_instance_init_renderer.

Cc: mesa-stable
Fixes: 25b8f4f714 ("venus: handle device probing properly.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
(cherry picked from commit 2a4675ee9f)
2025-04-22 01:24:58 +02:00
Janne Grunau
6f12ae221c venus: Do not use instance pointer before NULL check
Fixes: a753f50668 ("venus: break up vn_device.c")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
(cherry picked from commit 39e4fd98ce)
2025-04-22 01:24:57 +02:00
Alyssa Rosenzweig
cba13b7c52 asahi: fix possible null deref
with indirect non-indexed draws.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612>
(cherry picked from commit 84505c5d99)
2025-04-22 01:24:54 +02:00
Alyssa Rosenzweig
2be4fb62cf hk: fix patch count = 0 handling
fixes fault in dEQP-VK.tessellation.misc_draw.triangles_no_patches

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612>
(cherry picked from commit e541ffcbe8)
2025-04-22 01:24:53 +02:00
Alyssa Rosenzweig
2099c23dab agx: early-kill sources only if it won't shuffle
rather than always early killing and then hitting pathological shuffle
situations, only early-kill when we can prove that we won't need to shuffle. it
turns out that's most of the time.

even with this heuristic, we still get hurt bad in shader-db due to extra moves.
but hopefully, the #s here are small enough that we can move on with our lives
and fix this source of known unsoundness.

this is tagged for backport as it's needed to avoid a perf regression with the
previous patch.

combined stats from this commit and the previous commit:

total instrs in shared programs: 2846065 -> 2852257 (0.22%)
instrs in affected programs: 618734 -> 624926 (1.00%)

total alu in shared programs: 2329477 -> 2335534 (0.26%)
alu in affected programs: 508119 -> 514176 (1.19%)

total gprs in shared programs: 894762 -> 901327 (0.73%)
gprs in affected programs: 36946 -> 43511 (17.77%)

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34595>
(cherry picked from commit b1e86b3eae)
2025-04-22 01:24:52 +02:00
Alyssa Rosenzweig
27b46ecfb8 agx: late-kill sources
shader-db stats combined with next commit. this is the rip off the bandaid, next
is the optimize. split to enable bisecting.

the code we have to shuffle clobbered killed sources is broken and, after
thinking about that for a Long time, I don't see a reasonable way to fix it. But
if we late-kill sources - or model our calculations as-if we were late-killing
souces - we never have to shuffle onto a killed source and the problem goes away
entirely.

this is similar in spirit to what NAK does. it's not "optimal", but it's sane.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34595>
(cherry picked from commit b88fe9b0c5)
2025-04-22 01:24:51 +02:00
Alyssa Rosenzweig
1c5cd9ff7a agx: model sources as late-kill in demand calcs
This hurts us in two ways:
* slightly more spilling (not actually a big problem)
* slightly worse occupancy (the shaders that are "helped" here are from trying
  less hard to fit at higher occupancy levels)

However, in exchange we get a LOT more flexibility in the RA.

total instrs in shared programs: 2847015 -> 2846065 (-0.03%)
instrs in affected programs: 84134 -> 83184 (-1.13%)

total alu in shared programs: 2330406 -> 2329477 (-0.04%)
alu in affected programs: 62305 -> 61376 (-1.49%)

total code size in shared programs: 20497326 -> 20491690 (-0.03%)
code size in affected programs: 586664 -> 581028 (-0.96%)

total gprs in shared programs: 894202 -> 894762 (0.06%)
gprs in affected programs: 8900 -> 9460 (6.29%)

total scratch in shared programs: 13292 -> 13304 (0.09%)
scratch in affected programs: 2924 -> 2936 (0.41%)

total threads in shared programs: 27819712 -> 27814272 (-0.02%)
threads in affected programs: 55296 -> 49856 (-9.84%)

total spills in shared programs: 907 -> 914 (0.77%)
spills in affected programs: 419 -> 426 (1.67%)

total fills in shared programs: 857 -> 862 (0.58%)
fills in affected programs: 389 -> 394 (1.29%)

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34595>
(cherry picked from commit 7fad96d194)
2025-04-22 01:24:50 +02:00
Alyssa Rosenzweig
3cc215b1cc hk: fix null FS corner cases
this fixes null FS + cull distance/API sample mask, which require a prolog.
fixes upcoming CTS.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
(cherry picked from commit 3ab8ce8579)
2025-04-22 01:24:49 +02:00
Alyssa Rosenzweig
5c048f7860 hk: fix tessellation + clipper queries
fixes upcoming cts

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
(cherry picked from commit d959557669)
2025-04-22 01:24:48 +02:00
GKraats
c196a64471 EGL: legacy-x11=dri2 should support hardware driver
Since MR !33891 EGL only supports a software driver (LLVM).
Routine dri3_x11_connect at
src/egl/drivers/dri2/platform_x11.c fails if DRI3 is not
available. So at that location variable *allow_dri2 should be set.

Looking at the major codition, we see it is not executed
if LIBGL_DRI3_DISABLE is set. In that case the hardware driver
is activated as desired. Previously this was not needed.
Also it is not practical, and not necessary.

I do not understand the major condition, so I did not change it.
This causes some duplicate coding.

Fixes: 323bad6b18 ("egl/x11: split out dri2 init entirely")
Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34530>
(cherry picked from commit 995dc61bf5)
2025-04-22 01:24:45 +02:00
Rhys Perry
76db8496a9 aco: combine VALU lanemask hazard into VALUMaskWriteHazard
This is now basically the same as the original VALUMaskWriteHazard, except
it now considers both VALU and SALU writes.

Now that it's a part of VALUMaskWriteHazard, differences from the original
VALU lanemask workaround are:
- it includes SALU reads after the write
- it includes VALU writes and SALU/VALU reads after the write which are
  not lanemasks
- it combines s_waitcnt_depctr instructions when it's a read after both a
  SALU write and a VALU write
- non-exec VALU SGPR reads reset the SGPRs read by VALU as a lanemask
- exec SGPRs are ignored

resolve_all_gfx11() is also finished.

fossil-db (navi31):
Totals from 21538 (27.13% of 79377) affected shaders:
Instrs: 27628855 -> 27552972 (-0.27%); split: -0.30%, +0.03%
CodeSize: 145968448 -> 145667616 (-0.21%); split: -0.23%, +0.02%
Latency: 209537805 -> 209509519 (-0.01%); split: -0.02%, +0.00%
InvThroughput: 36304270 -> 36301624 (-0.01%); split: -0.01%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12623
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11480
Backport-to: 25.0
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34529>
(cherry picked from commit ce2be5ab8e)
2025-04-22 01:24:39 +02:00
Mel Henning
614c26c634 nak: Handle idp4 ureg latencies
Fixes: 6b8a4e6bb7 ("nak: Add Turing latency information")
Fixes: 7a01953a39 ("nak: Add Ampere and Ada latency information")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12993
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34563>
(cherry picked from commit eee3c8eab8)
2025-04-22 01:24:38 +02:00
Mel Henning
53c8864428 nak/spill_values: Spill constants across edges if needed
In a previous iteration of the spilling code, we added an extra check to
only spill across edges if the value being spilled is in the W set.
This was due to a misunderstanding of the modeling of S and W in Braun
and Hack.  In the current implementation, we maintain the invariant that
every live value is in at least one of S or W so we don't need that
check but it was left in by mistake.

One exception to this rule was added when we special-cased constant
values.  Now the invariant is that every live value is in S, in W, or is
a constant.  When we made this change, the check we accidentally left in
bit us because now if a value is constant but not in W, it wasn't
getting spilled across the edge.  This can result in a value getting
filled later which was never spilled, leading to undefined values.

Fixes: 7b82e26e3c ("nak: Don't spill/fill const values")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12993
Co-authored-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34563>
(cherry picked from commit de1ed48325)
2025-04-22 01:24:36 +02:00
Eric Engestrom
fe3c767841 meson: remove duplicate deprecated for power8 option
Fixes: c4b305079d ("meson: Simplify the power8 optimization logic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34565>
(cherry picked from commit 8744c98fa9)
2025-04-22 01:24:35 +02:00
Eric Engestrom
9967c83f0b meson: remove duplicate deprecated for gallium-xa option
Fixes: cf40099730 ("meson: deprecate gallium-xa")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34565>
(cherry picked from commit b9472db496)
2025-04-22 01:24:34 +02:00
Rohan Garg
e106478551 anv: re enable compression for CPS surfaces on platforms other than Xe
I accidentally disabled compression on CPS surfaces marked as storage or
color attachment for all platforms, when this should only be limited to
Xe.

Fixes: 80f9b6 ('anv: CPB surfaces that are used as color attachments or for stores cannot be compressed')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34297>
(cherry picked from commit cbc1ec4f73)
2025-04-22 01:24:32 +02:00
Rhys Perry
dd304bfd80 aco/gfx12: don't use second VALU for VOPD's OPX if there is a WaR
fossil-db (gfx1201):
Totals from 38908 (49.02% of 79377) affected shaders:
Instrs: 30268107 -> 30268131 (+0.00%); split: -0.00%, +0.00%
CodeSize: 180843648 -> 180843640 (-0.00%); split: -0.00%, +0.00%
Latency: 224905962 -> 224906072 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 44322988 -> 44323004 (+0.00%)
VALU: 15124145 -> 15124167 (+0.00%)
VOPD: 4018504 -> 4018482 (-0.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.0
Backport-to: 25.1
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34246>
(cherry picked from commit 408fa33c09)
2025-04-22 01:24:31 +02:00
Tapani Pälli
2f1fd84e4d iris: make sure to not mix compressed vs non-compressed
This commit implements the following requirement:

   "Keep any UMD-recycling of compression-enabled/disabled
    memory separate."

As additional info there are 2 related wa's for the issue:

   Wa_14018443005
   Wa_18038669374

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34499>
(cherry picked from commit 6d70ec449f)
2025-04-22 00:04:17 +02:00
Tapani Pälli
d0b2f4830d iris: force reallocate on eglCreateImage with GFX >= 20
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34499>
(cherry picked from commit c2a4657862)
2025-04-22 00:04:16 +02:00
Faith Ekstrand
e944636ff7 nak/sm70: Fix the bit74_75_ar_mod assert
It's used for src2, not src0.

Fixes: 40422927dc ("nak: Pass has_mod to all form of src2 requiring it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
(cherry picked from commit 47fc468944)
2025-04-22 00:04:15 +02:00
Faith Ekstrand
0702e54b55 nak/legalize: Take a RegFile in copy_alu_src_and_lower_ineg()
Fixes: af6093a712 ("nak/legalize: Add a helper for lowering ineg")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
(cherry picked from commit 328112c6bc)
2025-04-22 00:04:14 +02:00
Faith Ekstrand
9fa9cd870f nak/legalize: Take a RegFile in copy_alu_src_and_lower_fmod
Otherwise, we'll screw up uniform GPRs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
(cherry picked from commit 22a30bfa4f)
2025-04-22 00:04:12 +02:00
Eric Engestrom
6491da3220 .pick_status.json: Update to 1bf8542490 2025-04-22 00:03:43 +02:00
Patrick Lerda
da655b10ad mesa_interface: fix legacy dri2 compatibility
These values are shared with xcb/dri2.h, and can't be changed
without breaking the legacy dri2 compatibility. This change
reverses partially the update done by 3b603d1646.

For instance this issue is triggered on dri2 i915 with
"piglit/bin/glx-copy-sub-buffer -auto" or
"piglit/bin/hiz-depth-read-window-stencil0 -auto".

Fixes: 3b603d1646 ("mesa_interface: remove unused stuff")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34561>
(cherry picked from commit 60a31156b0)
2025-04-17 02:28:20 +02:00
Mike Blumenkrantz
2bfe468661 zink: verify that surface exists when adding implicit feedback loop
this can be null if multiple contexts are in use

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34557>
(cherry picked from commit de6efc01c1)
2025-04-17 02:28:19 +02:00
Tomeu Vizoso
d588bebd75 etnaviv/ml: Use etna_buffer_resource instead of etna_resource
Otherwise we hit an assert in newly added code.

Fixes: d738b3ea2b ("etnaviv: split PIPE_BUFFER resources from other types of resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
(cherry picked from commit 251d1e2551)
2025-04-17 02:28:18 +02:00
Alyssa Rosenzweig
5c0cd81232 hk: fix underbinding scratch
need to round up to page size (minimally) or we assert out. hit in vulkaninfo
of all things.

Fixes: 678134add5 ("hk: implement sparse")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34526>
(cherry picked from commit 9b55451ea7)
2025-04-17 02:28:16 +02:00
Pierre-Eric Pelloux-Prayer
4350f7e7db winsys/amdgpu: disable VM_ALWAYS_VALID
The referenced commit has been identified as the root cause of
graphic artifacts / hangs on some APUs.

For now disable AMDGPU_GEM_CREATE_VM_ALWAYS_VALID on all chips
except when user queues are used.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/12809.

Fixes: 8c91624614 ("winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT allocations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34547>
(cherry picked from commit 555821ff93)
2025-04-17 02:28:14 +02:00
Eric Engestrom
7a48ce1ed4 .pick_status.json: Update to d5ad798140 2025-04-17 02:28:11 +02:00
Eric Engestrom
b2f79a5e1a VERSION: bump for 25.1.0-rc1 2025-04-16 15:29:25 +02:00
1072 changed files with 51775 additions and 22718 deletions

View File

@@ -47,10 +47,6 @@ workflow:
DEQP_RUNNER_MAX_FAILS: 40
# post-merge pipeline
- if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
variables:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
# Pre-merge pipeline
- if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_request_event"
# Push to a branch on a fork
@@ -78,11 +74,12 @@ workflow:
variables:
FDO_UPSTREAM_REPO: mesa/mesa
MESA_TEMPLATES_COMMIT: &ci-templates-commit c6aeb16f86e32525fa630fb99c66c4f3e62fc3cb
MESA_TEMPLATES_COMMIT: &ci-templates-commit 48e4b6c9a2015f969fbe648999d16d5fb3eef6c4
CI_PRE_CLONE_SCRIPT: |-
set -o xtrace
curl --silent --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
bash download-git-cache.sh
rm download-git-cache.sh
set +o xtrace
S3_JWT_FILE: /s3_jwt
S3_JWT_FILE_SCRIPT: |-
@@ -169,34 +166,37 @@ stages:
- build-only
- code-validation
- amd
- amd-nightly
- amd-postmerge
- intel
- intel-nightly
- intel-postmerge
- nouveau
- nouveau-nightly
- nouveau-postmerge
- arm
- arm-nightly
- arm-postmerge
- broadcom
- broadcom-nightly
- broadcom-postmerge
- freedreno
- freedreno-nightly
- freedreno-postmerge
- etnaviv
- etnaviv-nightly
- etnaviv-postmerge
- software-renderer
- software-renderer-nightly
- software-renderer-postmerge
- layered-backends
- layered-backends-nightly
- layered-backends-postmerge
- performance
- deploy
include:
- project: 'freedesktop/ci-templates'
ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
file:
- '/templates/ci-fairy.yml'
- project: 'freedesktop/ci-templates'
ref: *ci-templates-commit
file:
- '/templates/alpine.yml'
- '/templates/debian.yml'
- '/templates/fedora.yml'
- '/templates/ci-fairy.yml'
- local: '.gitlab-ci/image-tags.yml'
- local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
- local: '.gitlab-ci/container/gitlab-ci.yml'
@@ -337,7 +337,7 @@ include:
# Git archive
make-git-archive:
make git archive:
extends:
- .fdo.ci-fairy
stage: git-archive
@@ -351,7 +351,7 @@ make-git-archive:
# compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
- ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
- s3_upload ../$CI_PROJECT_NAME.tar.gz "https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/"
# Sanity checks of MR settings and commit logs
sanity:
@@ -381,6 +381,7 @@ sanity:
DEBIAN_TEST_GL_TAG
DEBIAN_TEST_VK_TAG
FEDORA_X86_64_BUILD_TAG
KERNEL_ROOTFS_TAG
KERNEL_TAG
PKG_REPO_REV
WINDOWS_X64_BUILD_TAG

View File

@@ -4,8 +4,8 @@
. "${SCRIPTS_DIR}/setup-test-env.sh"
export PATH=/android-cts/jdk/bin/:$PATH
export JAVA_HOME=/android-cts/jdk
export PATH=/android-tools/android-cts/jdk/bin/:/android-tools/build-tools:$PATH
export JAVA_HOME=/android-tools/android-cts/jdk
# Wait for the appops service to show up
while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done
@@ -14,23 +14,23 @@ SKIP_FILE="$INSTALL/${GPU_VERSION}-android-cts-skips.txt"
EXCLUDE_FILTERS=""
if [ -e "$SKIP_FILE" ]; then
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -e 's/\s*$//g' -e 's/.*/--exclude-filter "\0" /g')"
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -s 's/.*/--exclude-filter "\0" /g')"
fi
INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
if [ -e "$INCLUDE_FILE" ]; then
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -e 's/\s*$//g' -e 's/.*/--include-filter "\0" /g')"
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -s 's/.*/--include-filter "\0" /g')"
else
INCLUDE_FILTERS=$(printf -- "--include-filter %s " $ANDROID_CTS_MODULES | sed -e 's/ $//g')
fi
set +e
eval "/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
$INCLUDE_FILTERS \
$EXCLUDE_FILTERS
eval "/android-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
$EXCLUDE_FILTERS \
$INCLUDE_FILTERS
[ "$(grep "^FAILED" /android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
[ "$(grep "^FAILED" /android-tools/android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
EXIT_CODE=$?
@@ -38,7 +38,7 @@ set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
cp -r "/android-cts/results/latest"/* $RESULTS_DIR
cp -r "/android-cts/logs/latest"/* $RESULTS_DIR
cp -r "/android-tools/android-cts/results/latest"/* $RESULTS_DIR
cp -r "/android-tools/android-cts/logs/latest"/* $RESULTS_DIR
section_end cuttlefish_results

View File

@@ -0,0 +1,17 @@
#!/bin/bash
# shellcheck disable=SC2086 # we want word splitting
if [ -z "$BM_POE_INTERFACE" ]; then
echo "Must supply the PoE Interface to power down"
exit 1
fi
if [ -z "$BM_POE_ADDRESS" ]; then
echo "Must supply the PoE Switch host"
exit 1
fi
SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
SNMP_OFF="i 4"
snmpset -v2c -r 3 -t 30 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_OFF

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# shellcheck disable=SC2086 # we want word splitting
if [ -z "$BM_POE_INTERFACE" ]; then
echo "Must supply the PoE Interface to power up"
exit 1
fi
if [ -z "$BM_POE_ADDRESS" ]; then
echo "Must supply the PoE Switch host"
exit 1
fi
set -ex
SNMP_KEY="1.3.6.1.4.1.9.9.402.1.2.1.1.1.$BM_POE_INTERFACE"
SNMP_ON="i 1"
SNMP_OFF="i 4"
snmpset -v2c -r 3 -t 10 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_OFF
sleep 3s
snmpset -v2c -r 3 -t 10 -cmesaci "$BM_POE_ADDRESS" "$SNMP_KEY" $SNMP_ON

View File

@@ -144,6 +144,33 @@ fi
date +'%F %T'
# Set up the pxelinux config for Jetson Nano
mkdir -p /tftp/pxelinux.cfg
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra210-p3450-0000
PROMPT 0
TIMEOUT 30
DEFAULT primary
MENU TITLE jetson nano boot options
LABEL primary
MENU LABEL CI kernel on TFTP
LINUX Image
FDT tegra210-p3450-0000.dtb
APPEND \${cbootargs} $BM_CMDLINE
EOF
# Set up the pxelinux config for Jetson TK1
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra124-jetson-tk1
PROMPT 0
TIMEOUT 30
DEFAULT primary
MENU TITLE jetson TK1 boot options
LABEL primary
MENU LABEL CI kernel on TFTP
LINUX zImage
FDT tegra124-jetson-tk1.dtb
APPEND \${cbootargs} $BM_CMDLINE
EOF
# Create the rootfs in the NFS directory
. $BM/rootfs-setup.sh /nfs

View File

@@ -0,0 +1,41 @@
#!/usr/bin/python3
# Copyright © 2020 Christian Gmeiner
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# Tiny script to read bytes from telnet, and write the output to stdout, with a
# buffer in between so we don't lose serial output from its buffer.
#
import sys
import telnetlib
host = sys.argv[1]
port = sys.argv[2]
tn = telnetlib.Telnet(host, port, 1000000)
while True:
bytes = tn.read_some()
sys.stdout.buffer.write(bytes)
sys.stdout.flush()
tn.close()

View File

@@ -130,7 +130,7 @@ debian-testing-asan:
-D mesa-clc=system
-D tools=dlclose-skip
-D valgrind=disabled
S3_ARTIFACT_NAME: mesa-x86_64-asan-${BUILDTYPE}
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc (asan complains not being loaded as
@@ -138,6 +138,7 @@ debian-testing-asan:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-rusticl=false
-D gallium-nine=false
-D gallium-drivers=
@@ -176,7 +177,8 @@ debian-testing-msan:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-drivers=panfrost
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
@@ -185,6 +187,7 @@ debian-testing-msan:
-D install-mesa-clc=true
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
debian-testing-ubsan:
extends:
@@ -211,6 +214,7 @@ debian-testing-ubsan:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-rusticl=false
-D gallium-drivers=
-D vulkan-drivers=
@@ -298,6 +302,7 @@ alpine-build-testing:
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=misleading-indentation
DRI_LOADERS: >
-D glx=disabled
-D gbm=enabled
@@ -416,7 +421,8 @@ debian-android:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-drivers=panfrost
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
@@ -425,6 +431,7 @@ debian-android:
-D install-mesa-clc=true
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
script:
# x86_64 build:
@@ -494,7 +501,8 @@ debian-arm32:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-drivers=panfrost
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
@@ -503,6 +511,7 @@ debian-arm32:
-D install-mesa-clc=true
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
S3_ARTIFACT_NAME: mesa-arm32-default-${BUILDTYPE}
# The strip command segfaults, failing to strip the binary and leaving
# tempfiles in our artifacts.
@@ -786,6 +795,7 @@ debian-x86_32:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=

View File

@@ -49,6 +49,7 @@ VARS=(
FLAKES_CHANNEL
FLUSTER_CODECS
FLUSTER_FRACTION
FLUSTER_VECTORS_VERSION
FREEDRENO_HANGCHECK_MS
GALLIUM_DRIVER
GALLIVM_PERF
@@ -107,7 +108,6 @@ VARS=(
PIGLIT_REPLAY_SUBCOMMAND
PIGLIT_RESULTS
PIGLIT_RUNNER_OPTIONS
PIGLIT_TAG
PIGLIT_TESTS
PIGLIT_TRACES_FILE
PIPELINE_ARTIFACTS_BASE
@@ -120,6 +120,8 @@ VARS=(
S3_RESULTS_UPLOAD
SKQP_ASSETS_DIR
SKQP_BACKENDS
STORAGE_FORK_HOST_PATH
STORAGE_MAINLINE_HOST_PATH
TU_DEBUG
VIRGL_HOST_API
VIRGL_RENDER_SERVER

View File

@@ -109,9 +109,6 @@ export LIBGL_DRIVERS_PATH=/install/lib/dri
# telling it to look in /usr/local/lib.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
# The Broadcom devices need /usr/local/bin unconditionally added to the path
export PATH=/usr/local/bin:$PATH
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
export XDG_CACHE_HOME=/tmp
@@ -233,7 +230,7 @@ cleanup
# upload artifacts (lava jobs)
if [ -n "$S3_RESULTS_UPLOAD" ]; then
tar --zstd -cf results.tar.zst results/;
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst
s3_upload results.tar.zst "https://${S3_RESULTS_UPLOAD}/"
fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such

View File

@@ -1,3 +1,2 @@
variables:
CONDITIONAL_BUILD_ANGLE_TAG: be4f59328ef607bcbf5048a3f6f27410
CONDITIONAL_BUILD_PIGLIT_TAG: a19e424b8a3f020dbf1b9dd29f220a4f
CONDITIONAL_BUILD_ANGLE_TAG: ab19bccfd3858c539ba8cb8d9b52a003

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env bash
# shellcheck disable=SC2154 # arch is assigned in previous scripts
set -e
set -o xtrace
@@ -7,12 +6,11 @@ set -o xtrace
# Fetch the arm-built rootfs image and unpack it in our x86_64 container (saves
# network transfer, disk usage, and runtime on test jobs)
S3_PATH="https://${S3_HOST}/${S3_KERNEL_BUCKET}"
if curl -L --retry 3 -f --retry-delay 10 -s --head "${S3_PATH}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}"; then
ARTIFACTS_URL="${S3_PATH}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}"
# shellcheck disable=SC2154 # arch is assigned in previous scripts
if curl --fail -L -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
else
ARTIFACTS_URL="${S3_PATH}/${CI_PROJECT_PATH}/${LAVA_DISTRIBUTION_TAG}"
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
fi
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
@@ -35,11 +33,30 @@ if [[ $arch == "arm64" ]]; then
DEVICE_TREES=""
DEVICE_TREES="$DEVICE_TREES apq8016-sbc-usb-host.dtb"
DEVICE_TREES="$DEVICE_TREES apq8096-db820c.dtb"
DEVICE_TREES="$DEVICE_TREES tegra210-p3450-0000.dtb"
DEVICE_TREES="$DEVICE_TREES imx8mq-nitrogen.dtb"
for DTB in $DEVICE_TREES; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "${KERNEL_IMAGE_BASE}/arm64/$DTB"
done
popd
elif [[ $arch == "armhf" ]]; then
mkdir -p /baremetal-files
pushd /baremetal-files
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "${KERNEL_IMAGE_BASE}"/armhf/zImage
DEVICE_TREES=""
DEVICE_TREES="$DEVICE_TREES imx6q-cubox-i.dtb"
DEVICE_TREES="$DEVICE_TREES tegra124-jetson-tk1.dtb"
for DTB in $DEVICE_TREES; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "${KERNEL_IMAGE_BASE}/armhf/$DTB"
done
popd
fi

View File

@@ -114,7 +114,7 @@ tar --zstd -cf "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "$LLVM_INSTALL_PREFIX"
# version does not change, and delete it.
# The file is not deleted for non-CI because it can be useful in local runs.
if [ -n "$CI" ]; then
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
s3_upload "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/"
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
fi

View File

@@ -3,17 +3,17 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# KERNEL_ROOTFS_TAG
set -uex
section_start angle "Building ANGLE"
uncollapsed_section_start angle "Building ANGLE"
# 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 "ANGLE_TAG"
ANGLE_REV="f355e2b37ed43939e2753fc7dacccf75abb4c1a3"
ANGLE_REV="a3f2545f6bb3e8d27827dceb2b4e901673995ad1"
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
if [[ -z "${ANGLE_ARCH:-}" ]]; then

View File

@@ -3,13 +3,15 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BASE_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -uex
uncollapsed_section_start apitrace "Building apitrace"
APITRACE_VERSION="b6102d10960c9f43b1b473903fc67937dd19fb98"
APITRACE_VERSION="952bad1469ea747012bdc48c48993bd5f13eec04"
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
pushd /apitrace

View File

@@ -6,6 +6,7 @@
# DEBIAN_BASE_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -uex

View File

@@ -5,10 +5,11 @@
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_BASE_TAG
# KERNEL_ROOTFS_TAG
set -uex
section_start deqp-runner "Building deqp-runner"
uncollapsed_section_start deqp-runner "Building deqp-runner"
DEQP_RUNNER_VERSION=0.20.3

View File

@@ -6,13 +6,14 @@
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ue -o pipefail
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
section_start deqp-$deqp_api "Building dEQP $DEQP_API"
uncollapsed_section_start deqp-$deqp_api "Building dEQP $DEQP_API"
set -x
@@ -288,7 +289,7 @@ if [ "$DEQP_API" != tools ]; then
# Compress the caselists, since Vulkan's in particular are gigantic; higher
# compression levels provide no real measurable benefit.
zstd -f -1 --rm mustpass/*.txt
zstd -1 --rm mustpass/*.txt
fi
if [ "$DEQP_API" = tools ]; then

View File

@@ -4,61 +4,36 @@
# shellcheck disable=SC2034 # Variables are used in scripts called from here
# 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_VIDEO_TAG
# Install fluster in /usr/local.
set -uex
section_start fluster "Install fluster"
FLUSTER_REVISION="e997402978f62428fffc8e5a4a709690d9ca9bc5"
git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
export SKIP_UPDATE_FLUSTER_VECTORS=false
check_fluster()
{
S3_PATH_FLUSTER="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DATA_STORAGE_PATH}/fluster/${FLUSTER_VECTORS_VERSION}/vectors.tar.zst"
if curl -L --retry 4 -f --retry-connrefused --retry-delay 30 -s --head \
"https://${S3_PATH_FLUSTER}"; then
echo "Fluster vectors are up-to-date, skip rebuilding them."
export SKIP_UPDATE_FLUSTER_VECTORS=true
fi
}
check_fluster "${FDO_UPSTREAM_REPO}"
if ! $SKIP_UPDATE_FLUSTER_VECTORS; then
check_fluster "${CI_PROJECT_PATH}"
fi
pushd fluster || exit
git checkout "${FLUSTER_REVISION}"
git checkout ${FLUSTER_REVISION}
popd || exit
if ! $SKIP_UPDATE_FLUSTER_VECTORS; then
if [ "${SKIP_UPDATE_FLUSTER_VECTORS}" != 1 ]; then
# Download the necessary vectors: H264, H265 and VP9
# When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
# fluster-runner will report Missing results.
fluster/fluster.py download -j ${FDO_CI_CONCURRENT:-4} \
fluster/fluster.py download \
JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-SVC_V1 \
JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
# Build fluster vectors archive and upload it
tar --zstd -cf "vectors.tar.zst" fluster/resources/
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "vectors.tar.zst" \
"https://${S3_PATH_FLUSTER}/vectors.tar.zst"
s3_upload vectors.tar.zst "https://${S3_PATH_FLUSTER}/"
touch /lava-files/done
s3_upload /lava-files/done "https://${S3_PATH_FLUSTER}/"
# Don't include the vectors in the rootfs
rm -fr fluster/resources/*
fi
mv fluster/ /usr/local/
mkdir -p "${ROOTFS}/usr/local/"
mv fluster "${ROOTFS}/usr/local/"
if $SKIP_UPDATE_FLUSTER_VECTORS; then
curl -L --retry 4 -f --retry-connrefused --retry-delay 30 \
"${FDO_HTTP_CACHE_URI:-}https://${S3_PATH_FLUSTER}" | tar --zstd -x -C /usr/local/
fi
section_end fluster

View File

@@ -3,6 +3,7 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex

View File

@@ -8,6 +8,7 @@ set -ex
# DEBIAN_BASE_TAG
# DEBIAN_BUILD_TAG
# FEDORA_X86_64_BUILD_TAG
# KERNEL_ROOTFS_TAG
uncollapsed_section_start mold "Building mold"

View File

@@ -8,12 +8,9 @@ uncollapsed_section_start piglit "Building piglit"
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
# 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 "PIGLIT_TAG"
REV="c50d9aa54f85e0af9d72fab86c73f89356d96399"
REV="0ecdebb0f5927728ddeeb851639a559b0f7d6590"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit

View File

@@ -5,7 +5,7 @@
set -ex
section_start rust "Building Rust toolchain"
uncollapsed_section_start rust "Building Rust toolchain"
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
RUST_VERSION=1.78.0-2024-05-02

View File

@@ -6,11 +6,11 @@
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# KERNEL_ROOTFS_TAG
set -uex
uncollapsed_section_start skqp "Building SkQP"
uncollapsed_section_start skqp "Building skqp"
SKQP_BRANCH=android-cts-12.1_r5
@@ -75,7 +75,7 @@ popd
# Fetch some needed build tools needed to build skia/skqp.
# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
# directory.
python3 tools/git-sync-deps
python tools/git-sync-deps
mkdir -p "${SKQP_OUT_DIR}"
mkdir -p "${SKQP_INSTALL_DIR}"

View File

@@ -1,13 +1,12 @@
#!/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_VIDEO_TAG
# KERNEL_ROOTFS_TAG
set -uex
section_start va-tools "Building va-tools"
uncollapsed_section_start va-tools "Building va-tools"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"

View File

@@ -7,30 +7,36 @@ set -ex
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
VKD3D_PROTON_COMMIT="7eef0a64e3fc107a6cb10e3abd1b56d21b575de8"
VKD3D_PROTON_COMMIT="078f07f588c849c52fa21c8cfdd1c201465b1932"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
function build_arch {
local arch="$1"
meson setup \
-Denable_tests=true \
--buildtype release \
--prefix "$VKD3D_PROTON_DST_DIR" \
--strip \
--bindir "x${arch}" \
--libdir "x${arch}" \
"$VKD3D_PROTON_BUILD_DIR/build.${arch}"
ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/d3d12"
}
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 checkout "$VKD3D_PROTON_COMMIT"
git submodule update --init --recursive
git submodule update --recursive
meson setup \
-D enable_tests=true \
--buildtype release \
--prefix "$VKD3D_PROTON_DST_DIR" \
--strip \
--libdir "lib" \
"$VKD3D_PROTON_BUILD_DIR/build"
ninja -C "$VKD3D_PROTON_BUILD_DIR/build" install
install -m755 -t "${VKD3D_PROTON_DST_DIR}/" "$VKD3D_PROTON_BUILD_DIR/build/tests/d3d12"
build_arch 64
build_arch 86
mkdir "$VKD3D_PROTON_DST_DIR/tests"
cp \
"tests/test-runner.sh" \

View File

@@ -3,6 +3,7 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# KERNEL_ROOTFS_TAG
set -uex

View File

@@ -14,6 +14,7 @@ uncollapsed_section_start wayland "Building Wayland"
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# FEDORA_X86_64_BUILD_TAG
# KERNEL_ROOTFS_TAG
export LIBWAYLAND_VERSION="1.21.0"
export WAYLAND_PROTOCOLS_VERSION="1.41"

View File

@@ -38,6 +38,14 @@ chmod +x /usr/local/bin/ninja
# flags (doesn't apply to non-container builds, but we don't run make there)
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
# make wget to try more than once, when download fails or timeout
echo -e "retry_connrefused = on\n" \
"read_timeout = 300\n" \
"tries = 4\n" \
"retry_on_host_error = on\n" \
"retry_on_http_error = 429,500,502,503,504\n" \
"wait_retry = 32" >> /etc/wgetrc
# Ensure that rust tools are in PATH if they exist
CARGO_ENV_FILE="$HOME/.cargo/env"
if [ -f "$CARGO_ENV_FILE" ]; then

View File

@@ -86,8 +86,7 @@ apt-get update
apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
arch=armhf
. .gitlab-ci/container/cross_build.sh

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env bash
set -e
arch=arm64 . .gitlab-ci/container/debian/baremetal_arm_test.sh

View File

@@ -3,6 +3,7 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BASE_TAG
# KERNEL_ROOTFS_TAG
set -e
@@ -41,3 +42,15 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o /usr/share/snmp/mibs/SNMPv2-SMI.txt
. .gitlab-ci/container/baremetal_build.sh
mkdir -p /baremetal-files/jetson-nano/boot/
ln -s \
/baremetal-files/Image \
/baremetal-files/tegra210-p3450-0000.dtb \
/baremetal-files/jetson-nano/boot/
mkdir -p /baremetal-files/jetson-tk1/boot/
ln -s \
/baremetal-files/zImage \
/baremetal-files/tegra124-jetson-tk1.dtb \
/baremetal-files/jetson-tk1/boot/

View File

@@ -21,8 +21,6 @@ sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
echo "deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] https://deb.debian.org/debian ${FDO_DISTRIBUTION_VERSION%-*} non-free-firmware" | tee /etc/apt/sources.list.d/non-free-firmware.list
: "${LLVM_VERSION:?llvm version not set!}"
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
@@ -73,13 +71,13 @@ EPHEMERAL=(
"llvm-${LLVM_VERSION}-dev"
make
meson
openssh-server
patch
pkgconf
protobuf-compiler
python3-dev
python3-pip
python3-setuptools
python3-venv
python3-wheel
wayland-protocols
xz-utils
@@ -89,7 +87,6 @@ DEPS=(
apt-utils
clinfo
curl
dropbear
git
git-lfs
inetutils-syslogd
@@ -132,7 +129,6 @@ DEPS=(
python3-simplejson
python3-six
python3-yaml
sntp
socat
spirv-tools
sysvinit-core
@@ -146,58 +142,34 @@ DEPS=(
xauth
xvfb
zlib1g
)
HW_DEPS=(
firmware-realtek
netcat-openbsd
mount
python3-distutils
python3-serial
tzdata
zstd
)
[ "$DEBIAN_ARCH" = "arm64" ] && ARCH_DEPS=(
firmware-linux-nonfree
firmware-qcom-media
)
[ "$DEBIAN_ARCH" = "armhf" ] && ARCH_DEPS=(
firmware-misc-nonfree
)
[ "$DEBIAN_ARCH" = "amd64" ] && ARCH_DEPS=(
firmware-amd-graphics
firmware-misc-nonfree
)
apt-get update
apt-get dist-upgrade -y
apt-get install --purge -y \
sysvinit-core libelogind0
apt-get install -y --no-remove "${DEPS[@]}" "${HW_DEPS[@]}" "${ARCH_DEPS[@]}"
apt-get install -y --no-remove "${DEPS[@]}"
apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_pre_build.sh
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
# Needed for ci-fairy, this revision is able to upload files to MinIO
# and doesn't depend on git
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
section_end debian_setup
############### Build ci-kdl
. .gitlab-ci/container/build-kdl.sh
############### Download prebuilt kernel and firmware
############### Download prebuilt kernel
if [ "$DEBIAN_ARCH" = amd64 ]; then
uncollapsed_section_start kernel "Downloading kernel and firmware"
uncollapsed_section_start kernel "Downloading kernel for crosvm"
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /kernel
# shellcheck disable=SC2153 # KERNEL_IMAGE_BASE is set in the root .gitlab-ci.yml file
@@ -205,7 +177,6 @@ if [ "$DEBIAN_ARCH" = amd64 ]; then
-o "/kernel/${KERNEL_IMAGE_NAME}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${KERNEL_IMAGE_NAME}"
section_end kernel
fi
. .gitlab-ci/container/get-firmware-from-source.sh / "$FIRMWARE_FILES"
############### Build mold

View File

@@ -27,15 +27,12 @@ EPHEMERAL=(
libcap-dev
"libclang-cpp${LLVM_VERSION}-dev"
libdrm-dev
libfontconfig-dev
libgl-dev
libgles2-mesa-dev
libglu1-mesa-dev
libgtest-dev
libglx-dev
libpciaccess-dev
libpng-dev
libudev-dev
libvulkan-dev
libwaffle-dev
libwayland-dev
libx11-xcb-dev
@@ -53,15 +50,11 @@ EPHEMERAL=(
ocl-icd-opencl-dev
patch
pkgconf
python-is-python3
python3-distutils
xz-utils
)
DEPS=(
libfontconfig1
libglu1-mesa
libvulkan-dev
)
apt-get update
@@ -76,7 +69,7 @@ section_end debian_setup
############### Build ANGLE
if [ "$DEBIAN_ARCH" != "armhf" ]; then
if [ "$DEBIAN_ARCH" == "arm64" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
fi
@@ -119,13 +112,6 @@ rm -rf /VK-GL-CTS
. .gitlab-ci/container/build-vulkan-validation.sh
############### Build SKQP
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-skqp.sh
fi
############### Build nine tests
. .gitlab-ci/container/build-ninetests.sh

View File

@@ -99,8 +99,8 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
. .gitlab-ci/container/build-libclc.sh
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
# Needed for ci-fairy, this revision is able to upload files to S3
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
. .gitlab-ci/container/install-meson.sh

View File

@@ -54,8 +54,8 @@ apt-get update
apt-get install -y --no-remove --no-install-recommends "${DEPS[@]}" "${EPHEMERAL[@]}" \
"${EXTRA_LOCAL_PACKAGES:-}"
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
# Needed for ci-fairy, this revision is able to upload files to S3
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
pip3 install --break-system-packages -r bin/ci/test/requirements.txt

View File

@@ -12,25 +12,22 @@ set -e
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
sudo
unzip
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
)
DEPS=(
aapt
iproute2
)
apt-get install -y --no-remove --no-install-recommends \
@@ -40,21 +37,15 @@ apt-get install -y --no-remove --no-install-recommends \
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
############### 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"
unzip -d / "$ndk.zip"
rm "$ndk.zip"
section_end android-ndk
############### Build ANGLE
ANGLE_TARGET=android \
@@ -92,7 +83,7 @@ rm -rf /VK-GL-CTS
############### Downloading Cuttlefish resources ...
section_start cuttlefish "Downloading, building and installing Cuttlefish"
uncollapsed_section_start cuttlefish "Downloading, building and installing Cuttlefish"
CUTTLEFISH_PROJECT_PATH=ao2/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS=mesa-venus
@@ -147,29 +138,40 @@ usermod -a -G kvm,cvdnetwork root
section_end cuttlefish
############### Downloading Android CTS
############### Downloading Android CTS tools
section_start android-cts "Downloading Android CTS"
uncollapsed_section_start android-cts "Downloading Android CTS tools"
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
ANDROID_CTS_DEVICE_ARCH="x86"
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" \
"https://dl.google.com/dl/android/cts/android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
unzip -q -d / "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
unzip "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
rm "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
# Keep only the interesting tests to save space
# shellcheck disable=SC2086 # we want word splitting
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
find android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" "https://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
unzip "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
rm "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
mv "android-$ANDROID_VERSION" build-tools
popd
section_end android-cts
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
rm -rf "/${ndk:?}"

View File

@@ -1,71 +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_VIDEO_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y gstreamer1.0-vaapi # This interferes with systemd deps, install separately
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
g++
libdrm-dev
libva-dev
meson
pkgconf
)
DEPS=(
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly
gstreamer1.0-tools
libgstreamer1.0-0
libva-drm2
libva-wayland2
libva2
)
apt-get update
apt-get install -y --no-remove --no-install-recommends \
"${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
############### Build libva tests
. .gitlab-ci/container/build-va-tools.sh
############### Install Fluster
. .gitlab-ci/container/build-fluster.sh
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
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

@@ -1,73 +0,0 @@
#!/usr/bin/env bash
# This script exports the container image to a rootfs tarball and uploads it to
# S3.
#
# Usage:
#
# ./fdo_cntr_export.sh <container-image-url>
#
# The container image URL is the URL of the container image to export. It can be
# a local path or a remote URL.
# Example:
# ./fdo_cntr_export.sh registry.freedesktop.org/mesa/mesa/debian/x86_64_test-android:tag
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VIDEO_TAG
# DEBIAN_TEST_VK_TAG
set -eux -o pipefail
: "${CONTAINER:=$1}"
IMAGE_URL="${CONTAINER}"
readonly IMAGE_URL
container=$(buildah from "$IMAGE_URL")
readonly container
readonly ROOTFSTAR=lava-rootfs.tar.zst
touch "$ROOTFSTAR"
buildah copy "$container" ".gitlab-ci/container/setup-rootfs.sh" /root/setup-rootfs.sh
# Using --isolation chroot to ensure proper execution in CI/CD environments
buildah run --isolation chroot "$container" -- /root/setup-rootfs.sh
buildah_export() {
# Mount the volume
mountpoint=$(buildah mount "$1")
if [ ! -d "$mountpoint" ]; then
echo "Mount point not found: $mountpoint" >/dev/stderr
exit 1
fi
# Compress to zstd
ZSTD_CLEVEL=10 tar -C "$mountpoint" -I zstd -cf "$2" .
}
# When hacking on it locally, the script might not be executed as root.
# In CI it's always root.
if (($(id -u) != 0)); then
# Run unshare for rootless envs
buildah unshare -- bash -c "$(declare -f buildah_export); buildah_export '$container' '$ROOTFSTAR'"
else
# Run directly
buildah_export "$container" "$ROOTFSTAR"
fi
# Unmount the container
buildah umount "$container"
# Remove the container
buildah rm "$container"
# Upload the rootfs tarball to S3.
# The URL format matches the registry format, and LAVA_DISTRIBUTION_TAG is
# used later to match this URL.
curl --fail --retry-connrefused --retry 4 --retry-delay 30 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
-X PUT --form file=@"$ROOTFSTAR" \
"https://${S3_HOST}/${S3_KERNEL_BUCKET}/${CI_PROJECT_PATH}/${CI_JOB_NAME}:${FDO_DISTRIBUTION_TAG}"

View File

@@ -78,35 +78,17 @@
# should make CI_BUILD_COMPONENTS="angle piglit"
CI_BUILD_COMPONENTS: "angle"
.container-builds-piglit:
variables:
PIGLIT_TAG: "${CONDITIONAL_BUILD_PIGLIT_TAG}"
.container-builds-x86_64:
extends:
- .container-builds-angle
- .container-builds-piglit
variables:
CI_BUILD_COMPONENTS: "angle piglit"
.container-builds-arm32:
extends:
- .container-builds-piglit
variables:
CI_BUILD_COMPONENTS: "piglit"
CI_BUILD_COMPONENTS: "angle"
.container-builds-arm64:
extends:
- .container-builds-angle
- .container-builds-piglit
variables:
CI_BUILD_COMPONENTS: "angle piglit"
# Export the container rootfs and upload it to S3
.export-container:
variables:
FDO_DISTRIBUTION_PACKAGES: zstd
FDO_DISTRIBUTION_POST_EXEC: 'bash .gitlab-ci/container/fdo_cntr_export.sh'
CI_BUILD_COMPONENTS: "angle"
.use-base-image:
extends:
@@ -131,6 +113,7 @@ debian/x86_64_build-base:
variables:
MESA_BASE_IMAGE: "debian/x86_64_build-base"
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_ARTIFACTS_BASE_TAG: *debian-x86_64_build-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build-base
@@ -220,15 +203,14 @@ debian/s390x_build:
# Android NDK cross-build image
.android-variables:
extends:
- .container-builds-android
variables:
ANDROID_VERSION: 14
ANDROID_NDK_VERSION: "r27c"
ANDROID_SDK_VERSION: 34
# Space-separated list of interesting CTS modules
ANDROID_CTS_MODULES: >-
CtsGraphicsTestCases
CtsNativeHardwareTestCases
CtsSkQPTestCases
ANDROID_CTS_MODULES: CtsGraphicsTestCases
ANDROID_LLVM_VERSION: llvmorg-19.1.7
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250324
# This can be confusing: LLVM_VERSION refers to the host LLVM toolchain
@@ -239,6 +221,7 @@ debian/s390x_build:
debian/android_build:
extends:
- .android-variables
- .container-builds-android
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
@@ -331,9 +314,9 @@ fedora/x86_64_build:
- .fdo.container-build@fedora
- .container
variables:
FDO_DISTRIBUTION_VERSION: 42
FDO_DISTRIBUTION_VERSION: 41
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
LLVM_VERSION: &fedora-x86_64-llvm 20
LLVM_VERSION: &fedora-x86_64-llvm 19
.use-fedora/x86_64_build:
tags:
@@ -351,7 +334,6 @@ fedora/x86_64_build:
debian/x86_64_test-base:
extends:
- .debian-container
- .firmware_x86_64
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}"
LLVM_VERSION: *debian-x86_64-llvm
@@ -403,7 +385,6 @@ debian/arm64_test-base:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .debian-container
- .firmware_arm64
variables:
MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: *debian-arm64-llvm
@@ -424,13 +405,9 @@ debian/arm64_test-base:
# Debian based x86_64 test image for GL
debian/x86_64_test-gl:
extends:
- .use-debian/x86_64_test-base
- .container-builds-x86_64
- .export-container
extends: .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
LAVA_DISTRIBUTION_TAG: "debian/x86_64_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
.use-debian/x86_64_test-gl:
tags:
@@ -446,13 +423,9 @@ debian/x86_64_test-gl:
# Debian based x86_64 test image for VK
debian/x86_64_test-vk:
extends:
- .use-debian/x86_64_test-base
- .container-builds-x86_64
- .export-container
extends: .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
LAVA_DISTRIBUTION_TAG: "debian/x86_64_test-vk:${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
.use-debian/x86_64_test-vk:
tags:
@@ -471,7 +444,6 @@ debian/x86_64_test-android:
extends:
- .android-variables
- .use-debian/x86_64_test-base
- .container-builds-android
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
@@ -488,27 +460,6 @@ debian/x86_64_test-android:
needs:
- debian/x86_64_test-android
# Debian based x86_64 test image for video
debian/x86_64_test-video:
extends:
- .use-debian/x86_64_test-base
- .export-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-video ${DEBIAN_TEST_VIDEO_TAG}
LAVA_DISTRIBUTION_TAG: "debian/x86_64_test-video:${DEBIAN_TEST_VIDEO_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
.use-debian/x86_64_test-video:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_test-base
MESA_IMAGE_PATH: "debian/x86_64_test-video"
MESA_IMAGE_TAG: *debian-x86_64_test-video
needs:
- debian/x86_64_test-video
# Debian-based x86_64 image to run Python utilities
debian/x86_64_pyutils:
extends:
@@ -533,13 +484,9 @@ debian/x86_64_pyutils:
debian/arm32_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm32_test-base
- .container-builds-arm32
- .export-container
extends: .use-debian/arm32_test-base
variables:
MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
LAVA_DISTRIBUTION_TAG: "debian/arm32_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
.use-debian/arm32_test-gl:
tags:
@@ -559,9 +506,7 @@ debian/arm32_test-vk:
- when: never # There are currently no arm32 VK jobs
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm32_test-base
- .container-builds-arm32
extends: .use-debian/arm32_test-base
variables:
MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
@@ -584,10 +529,8 @@ debian/arm64_test-gl:
extends:
- .use-debian/arm64_test-base
- .container-builds-arm64
- .export-container
variables:
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
LAVA_DISTRIBUTION_TAG: "debian/arm64_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
.use-debian/arm64_test-gl:
tags:
@@ -605,13 +548,9 @@ debian/arm64_test-gl:
debian/arm64_test-vk:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm64_test-base
- .container-builds-arm64
- .export-container
extends: .use-debian/arm64_test-base
variables:
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
LAVA_DISTRIBUTION_TAG: "debian/arm64_test-vk:${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
.use-debian/arm64_test-vk:
tags:
@@ -626,7 +565,7 @@ debian/arm64_test-vk:
- debian/arm64_test-vk
# Get firmware directly rather than using package versions.
# Change DEBIAN_BASE_TAG to add firmware changes.
# Change KERNEL_ROOTFS_TAG to add firmware changes.
# FIRMWARE_FILES is a list of json files arranged by vendor in .gitlab-ci/firmware/*
.firmware_x86_64:
variables:
@@ -643,6 +582,60 @@ debian/arm64_test-vk:
variables:
FIRMWARE_FILES: |
.kernel+rootfs:
extends:
- .container+build-rules
- .debian-container-version
stage: container
timeout: 120m
variables:
GIT_STRATEGY: fetch
MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
script:
- .gitlab-ci/container/lava_build.sh
kernel+rootfs_x86_64:
extends:
- .use-debian/x86_64_build-base
- .kernel+rootfs
- .firmware_x86_64
- .container-builds-x86_64
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-x86_64 "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
LLVM_VERSION: *debian-x86_64-llvm
kernel+rootfs_arm64:
extends:
- .use-debian/arm64_build
- .kernel+rootfs
- .firmware_arm64
- .container-builds-arm64
variables:
DEBIAN_ARCH: "arm64"
LLVM_VERSION: *debian-arm64-llvm
kernel+rootfs_arm32:
extends:
- kernel+rootfs_arm64
- .firmware_arm32
variables:
DEBIAN_ARCH: "armhf"
LLVM_VERSION: &debian-arm32-llvm 15 # no armhf builds for LLVM
# Cannot use anchors defined here from included files, so use extends: instead
.use-kernel+rootfs-arm:
variables:
DISTRIBUTION_TAG: *distribution-tag-arm
MESA_ROOTFS_TAG: *kernel-rootfs
.use-kernel+rootfs-x86_64:
variables:
DISTRIBUTION_TAG: *distribution-tag-x86_64
MESA_ROOTFS_TAG: *kernel-rootfs
# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
.debian/baremetal_arm_test:
extends:
@@ -652,57 +645,49 @@ debian/arm64_test-vk:
# Don't want the .container rules
- .container+build-rules
variables:
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
ARTIFACTS_PREFIX: "https://${S3_HOST}/${S3_KERNEL_BUCKET}"
ARTIFACTS_SUFFIX: "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARTIFACTS_TAG: *debian-arm64_build
MESA_ROOTFS_TAG: *kernel-rootfs
debian/baremetal_arm32_test-gl:
debian/baremetal_arm32_test:
extends:
- .debian/baremetal_arm_test
needs:
- debian/arm32_test-gl
- kernel+rootfs_arm32
variables:
MESA_IMAGE_TAG: &baremetal-arm32_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LAVA_DISTRIBUTION_TAG: !reference [debian/arm32_test-gl, variables, LAVA_DISTRIBUTION_TAG]
MESA_IMAGE_TAG: &debian-arm32_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
debian/baremetal_arm64_test-gl:
debian/baremetal_arm64_test:
extends:
- .debian/baremetal_arm_test
needs:
- debian/arm64_test-gl
- kernel+rootfs_arm64
variables:
MESA_IMAGE_TAG: &baremetal-arm64_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LAVA_DISTRIBUTION_TAG: !reference [debian/arm64_test-gl, variables, LAVA_DISTRIBUTION_TAG]
MESA_IMAGE_TAG: &debian-arm64_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
debian/baremetal_arm64_test-vk:
.use-debian/baremetal_arm_test:
variables:
MESA_ROOTFS_TAG: *kernel-rootfs
.use-debian/baremetal_arm32_test:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
extends:
- .debian/baremetal_arm_test
needs:
- debian/arm64_test-vk
- .use-debian/baremetal_arm_test
variables:
MESA_IMAGE_TAG: &baremetal-arm64_test-vk "${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LAVA_DISTRIBUTION_TAG: !reference [debian/arm64_test-vk, variables, LAVA_DISTRIBUTION_TAG]
.use-debian/baremetal_arm32_test-gl:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm32_test-gl"
MESA_IMAGE_TAG: *baremetal-arm32_test-gl
MESA_IMAGE_PATH: "debian/baremetal_arm32_test"
MESA_IMAGE_TAG: *debian-arm32_test
needs:
- debian/baremetal_arm_test
.use-debian/baremetal_arm64_test-gl:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
.use-debian/baremetal_arm64_test:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
extends:
- .use-debian/baremetal_arm_test
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm64_test-gl"
MESA_IMAGE_TAG: *baremetal-arm64_test-gl
needs:
- debian/baremetal_arm_test
.use-debian/baremetal_arm64_test-vk:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm64_test-vk"
MESA_IMAGE_TAG: *baremetal-arm64_test-vk
MESA_IMAGE_PATH: "debian/baremetal_arm64_test"
MESA_IMAGE_TAG: *debian-arm64_test
needs:
- debian/baremetal_arm_test

View File

@@ -0,0 +1,428 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# shellcheck disable=SC2034 # Variables are used in scripts called from here
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC2016 # non-expanded variables are intentional
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
# If you need to update the fluster vectors cache without updating the fluster revision,
# you can update the FLUSTER_VECTORS_VERSION tag in .gitlab-ci/image-tags.yml.
# When changing FLUSTER_REVISION, KERNEL_ROOTFS_TAG needs to be updated as well to rebuild
# the rootfs.
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
: "${LLVM_VERSION:?llvm version not set!}"
export FIRMWARE_FILES="${FIRMWARE_FILES}"
export SKIP_UPDATE_FLUSTER_VECTORS=0
check_minio()
{
S3_PATH="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
if curl -L --retry 4 -f --retry-delay 60 -s \
"https://${S3_PATH}/done"; then
echo "Remote files are up-to-date, skip rebuilding them."
exit
fi
}
check_fluster()
{
S3_PATH_FLUSTER="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DATA_STORAGE_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
if curl -L --retry 4 -f --retry-delay 60 -s \
"https://${S3_PATH_FLUSTER}/done"; then
echo "Fluster vectors are up-to-date, skip downloading them."
export SKIP_UPDATE_FLUSTER_VECTORS=1
fi
}
check_minio "${FDO_UPSTREAM_REPO}"
check_minio "${CI_PROJECT_PATH}"
check_fluster "${FDO_UPSTREAM_REPO}"
check_fluster "${CI_PROJECT_PATH}"
. .gitlab-ci/container/container_pre_build.sh
# Install rust, which we'll be using for deqp-runner. It will be cleaned up at the end.
. .gitlab-ci/container/build-rust.sh
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
BUILD_CL="ON"
BUILD_VK="ON"
GCC_ARCH="aarch64-linux-gnu"
KERNEL_ARCH="arm64"
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
BUILD_CL="OFF"
BUILD_VK="OFF"
GCC_ARCH="arm-linux-gnueabihf"
KERNEL_ARCH="arm"
. .gitlab-ci/container/create-cross-file.sh armhf
CONTAINER_ARCH_PACKAGES=(
libegl1-mesa-dev:armhf
libelf-dev:armhf
libgbm-dev:armhf
libgles2-mesa-dev:armhf
libpng-dev:armhf
libudev-dev:armhf
libvulkan-dev:armhf
libwaffle-dev:armhf
libwayland-dev:armhf
libx11-xcb-dev:armhf
libxkbcommon-dev:armhf
)
else
BUILD_CL="ON"
BUILD_VK="ON"
GCC_ARCH="x86_64-linux-gnu"
KERNEL_ARCH="x86_64"
CONTAINER_ARCH_PACKAGES=(
libasound2-dev libcap-dev libfdt-dev libva-dev p7zip wine
)
fi
# Determine if we're in a cross build.
if [[ -e /cross_file-$DEBIAN_ARCH.txt ]]; then
EXTRA_MESON_ARGS="--cross-file /cross_file-$DEBIAN_ARCH.txt"
EXTRA_CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=/toolchain-$DEBIAN_ARCH.cmake"
if [ $DEBIAN_ARCH = arm64 ]; then
RUST_TARGET="aarch64-unknown-linux-gnu"
elif [ $DEBIAN_ARCH = armhf ]; then
RUST_TARGET="armv7-unknown-linux-gnueabihf"
fi
rustup target add $RUST_TARGET
export EXTRA_CARGO_ARGS="--target $RUST_TARGET"
export ARCH=${KERNEL_ARCH}
export CROSS_COMPILE="${GCC_ARCH}-"
fi
# no need to remove these at end, image isn't saved at the end
CONTAINER_EPHEMERAL=(
arch-test
automake
bc
"clang-${LLVM_VERSION}"
cmake
curl
mmdebstrap
git
glslang-tools
jq
libdrm-dev
libegl1-mesa-dev
libxext-dev
libfontconfig-dev
libgbm-dev
libgl-dev
libgles2-mesa-dev
libglu1-mesa-dev
libglx-dev
libpng-dev
libssl-dev
libudev-dev
libvulkan-dev
libwaffle-dev
libwayland-dev
libx11-xcb-dev
libxcb-dri2-0-dev
libxkbcommon-dev
libwayland-dev
"lld-${LLVM_VERSION}"
ninja-build
openssh-server
patch
protobuf-compiler
python-is-python3
python3-distutils
python3-mako
python3-numpy
python3-serial
python3-venv
unzip
wayland-protocols
zstd
)
[ "$BUILD_CL" == "ON" ] && CONTAINER_EPHEMERAL+=(
ocl-icd-opencl-dev
)
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
apt-get update
apt-get install -y --no-remove \
-o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' \
"${CONTAINER_EPHEMERAL[@]}" \
"${CONTAINER_ARCH_PACKAGES[@]}" \
${EXTRA_LOCAL_PACKAGES}
export ROOTFS=/lava-files/rootfs-${DEBIAN_ARCH}
mkdir -p "$ROOTFS"
# rootfs packages
PKG_BASE=(
tzdata mount
)
PKG_CI=(
firmware-realtek
bash ca-certificates curl
initramfs-tools jq netcat-openbsd dropbear openssh-server
libasan8
libubsan1
git
python3-dev python3-pip python3-setuptools python3-wheel
weston # Wayland
xinit xserver-xorg-core xwayland # X11
)
PKG_MESA_DEP=(
libdrm2 libsensors5 libexpat1 # common
libvulkan1 # vulkan
libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrender1 libxshmfence1 libxxf86vm1 # X11
)
PKG_DEP=(
libpng16-16
libva-wayland2
libwaffle-1-0
libpython3.11 python3 python3-lxml python3-mako python3-numpy python3-packaging python3-pil python3-renderdoc python3-requests python3-simplejson python3-yaml # Python
sntp
strace
waffle-utils
zstd
)
# arch dependent rootfs packages
[ "$DEBIAN_ARCH" = "arm64" ] && PKG_ARCH=(
libgl1 libglu1-mesa
firmware-linux-nonfree firmware-qcom-media
libfontconfig1
)
[ "$DEBIAN_ARCH" = "amd64" ] && PKG_ARCH=(
firmware-amd-graphics
firmware-misc-nonfree
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-vaapi libgstreamer1.0-0 # Fluster
libgl1 libglu1-mesa
inetutils-syslogd iptables libcap2
libfontconfig1
spirv-tools
libelf1 libfdt1 "libllvm${LLVM_VERSION}"
libva2 libva-drm2
socat
sysvinit-core
wine
)
[ "$DEBIAN_ARCH" = "armhf" ] && PKG_ARCH=(
firmware-misc-nonfree
)
[ "$BUILD_CL" == "ON" ] && PKG_ARCH+=(
clinfo
"libclang-cpp${LLVM_VERSION}"
"libclang-common-${LLVM_VERSION}-dev"
ocl-icd-libopencl1
)
[ "$BUILD_VK" == "ON" ] && PKG_ARCH+=(
libvulkan-dev
)
mmdebstrap \
--variant=apt \
--arch="${DEBIAN_ARCH}" \
--components main,contrib,non-free-firmware \
--customize-hook='.gitlab-ci/container/get-firmware-from-source.sh "$ROOTFS" "$FIRMWARE_FILES"' \
--include "${PKG_BASE[*]} ${PKG_CI[*]} ${PKG_DEP[*]} ${PKG_MESA_DEP[*]} ${PKG_ARCH[*]}" \
bookworm \
"$ROOTFS/" \
"http://deb.debian.org/debian" \
"deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" \
"${LLVM_APT_REPO:-}"
############### Install mold
. .gitlab-ci/container/build-mold.sh
############### Building
STRIP_CMD="${GCC_ARCH}-strip"
mkdir -p $ROOTFS/usr/lib/$GCC_ARCH
############### Build libclc
if [ "$BUILD_CL" = "ON" ]; then
rm -rf /usr/lib/clc/*
. .gitlab-ci/container/build-libclc.sh
mkdir -p $ROOTFS/usr/{share,lib}/clc
mv /usr/share/clc/spirv*-mesa3d-.spv $ROOTFS/usr/share/clc/
ln -s /usr/share/clc/spirv64-mesa3d-.spv $ROOTFS/usr/lib/clc/
ln -s /usr/share/clc/spirv-mesa3d-.spv $ROOTFS/usr/lib/clc/
fi
############### Build Vulkan validation layer (for zink)
if [ "$DEBIAN_ARCH" = "amd64" ]; then
. .gitlab-ci/container/build-vulkan-validation.sh
mv /usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so $ROOTFS/usr/lib/x86_64-linux-gnu/
mkdir -p $ROOTFS/usr/share/vulkan/explicit_layer.d
mv /usr/share/vulkan/explicit_layer.d/* $ROOTFS/usr/share/vulkan/explicit_layer.d/
fi
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
mkdir -p $ROOTFS/apitrace
mv /apitrace/build $ROOTFS/apitrace
rm -rf /apitrace
############### Build ANGLE
if [ "$DEBIAN_ARCH" != "armhf" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
mv /angle $ROOTFS/.
rm -rf /angle
fi
############### Build dEQP runner
. .gitlab-ci/container/build-deqp-runner.sh
mkdir -p $ROOTFS/usr/bin
mv /usr/local/bin/*-runner $ROOTFS/usr/bin/.
############### Build dEQP
DEQP_API=tools \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
if [ "$BUILD_VK" == "ON" ]; then
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
if [ "$DEBIAN_ARCH" == "amd64" ]; then
DEQP_API=VK-main \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
fi
fi
rm -rf /VK-GL-CTS
mv /deqp-* $ROOTFS/.
############### Build SKQP
if [[ "$DEBIAN_ARCH" = "arm64" ]] \
|| [[ "$DEBIAN_ARCH" = "amd64" ]]; then
. .gitlab-ci/container/build-skqp.sh
mv /skqp $ROOTFS/.
fi
############### Build piglit
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=ON
-DPIGLIT_USE_WAYLAND=ON
-DPIGLIT_USE_X11=ON
-DPIGLIT_BUILD_GLX_TESTS=ON
-DPIGLIT_BUILD_EGL_TESTS=ON
-DPIGLIT_BUILD_WGL_TESTS=OFF
-DPIGLIT_BUILD_GL_TESTS=ON
-DPIGLIT_BUILD_GLES1_TESTS=ON
-DPIGLIT_BUILD_GLES2_TESTS=ON
-DPIGLIT_BUILD_GLES3_TESTS=ON
-DPIGLIT_BUILD_CL_TESTS=$BUILD_CL
-DPIGLIT_BUILD_VK_TESTS=$BUILD_VK
-DPIGLIT_BUILD_DMA_BUF_TESTS=ON" \
. .gitlab-ci/container/build-piglit.sh
mv /piglit $ROOTFS/.
############### Build libva tests
if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
. .gitlab-ci/container/build-va-tools.sh
mv /va/bin/* $ROOTFS/usr/bin/
fi
############### Build Crosvm
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
. .gitlab-ci/container/build-crosvm.sh
mv /usr/local/bin/crosvm $ROOTFS/usr/bin/
mv /usr/local/lib/libvirglrenderer.* $ROOTFS/usr/lib/$GCC_ARCH/
mkdir -p $ROOTFS/usr/local/libexec/
mv /usr/local/libexec/virgl* $ROOTFS/usr/local/libexec/
fi
############### Build ci-kdl
. .gitlab-ci/container/build-kdl.sh
mv /ci-kdl $ROOTFS/
############### Install fluster
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
section_start fluster "Install fluster"
. .gitlab-ci/container/build-fluster.sh
section_end fluster
fi
############### Build local stuff for use by igt and kernel testing, which
############### will reuse most of our container build process from a specific
############### hash of the Mesa tree.
if [[ -e ".gitlab-ci/local/build-rootfs.sh" ]]; then
. .gitlab-ci/local/build-rootfs.sh
fi
############### Delete rust, since the tests won't be compiling anything.
rm -rf /root/.cargo
rm -rf /root/.rustup
############### Delete firmware files we don't need
if [ "$DEBIAN_ARCH" = "amd64" ]; then
dpkg -L firmware-misc-nonfree | grep -v "i915" | xargs rm || true
fi
############### Fill rootfs
cp .gitlab-ci/setup-test-env.sh $ROOTFS/.
cp .gitlab-ci/container/setup-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/strip-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key $ROOTFS/.
cp .gitlab-ci/container/debian/winehq.gpg.key $ROOTFS/.
chroot $ROOTFS bash /setup-rootfs.sh
rm $ROOTFS/{llvm-snapshot,winehq}.gpg.key
rm "$ROOTFS/setup-test-env.sh"
rm "$ROOTFS/setup-rootfs.sh"
rm "$ROOTFS/strip-rootfs.sh"
cp /etc/wgetrc $ROOTFS/etc/.
# Copy all tags to the rootfs, so test jobs can check if they are using the intended version
TAG_FILE_DIR="$(get_tag_file)"
if [ -d "${TAG_FILE_DIR}" ]; then
cp --parents -r "${TAG_FILE_DIR}" $ROOTFS/.
fi
if [ "${DEBIAN_ARCH}" = "arm64" ]; then
mkdir -p /lava-files/rootfs-arm64/lib/firmware/qcom/sm8350/ # for firmware imported later
fi
ROOTFSTAR="lava-rootfs.tar.zst"
du -ah "$ROOTFS" | sort -h | tail -100
pushd $ROOTFS
tar --zstd -cf /lava-files/${ROOTFSTAR} .
popd
. .gitlab-ci/container/container_post_build.sh
s3_upload /lava-files/"${ROOTFSTAR}" "https://${S3_PATH}/"
touch /lava-files/done
s3_upload /lava-files/done "https://${S3_PATH}/"

18
.gitlab-ci/container/setup-rootfs.sh Executable file → Normal file
View File

@@ -2,11 +2,19 @@
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VIDEO_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
set -eux -o pipefail
. setup-test-env.sh
export DEBIAN_FRONTEND=noninteractive
# Needed for ci-fairy, this revision is able to upload files to
# MinIO and doesn't depend on git
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
passwd root -d
chsh -s /bin/sh
@@ -21,3 +29,5 @@ chmod +x /init
# Copy timezone file and remove tzdata package
rm -rf /etc/localtime
cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
. strip-rootfs.sh

View File

@@ -4,8 +4,8 @@
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VIDEO_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
section_start strip-rootfs "Stripping rootfs"
@@ -38,6 +38,7 @@ UNNEEDED_PACKAGES=(
udev
init-system-helpers
cpio
passwd
libsemanage1 libsemanage-common
libsepol1
gpgv

View File

@@ -49,14 +49,6 @@ ulimit -S -n 32768
VSOCK_BASE=10000 # greater than all the default vsock ports
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
# Venus requires a custom kernel for now
if [ "$ANDROID_GPU_MODE" = "venus" ] || [ "$ANDROID_GPU_MODE" = "venus_guest_angle" ]; then
CUSTOM_KERNEL_ARGS="
-kernel_path=/cuttlefish/bzImage
-initramfs_path=/cuttlefish/initramfs.img
"
fi
HOME=/cuttlefish launch_cvd \
-daemon \
-verbosity=VERBOSE \
@@ -72,7 +64,8 @@ HOME=/cuttlefish launch_cvd \
-gpu_mode="$ANDROID_GPU_MODE" \
-cpus=${FDO_CI_CONCURRENT:-4} \
-memory_mb 8192 \
$CUSTOM_KERNEL_ARGS
-kernel_path="/cuttlefish/bzImage" \
-initramfs_path="/cuttlefish/initramfs.img"
sleep 1

View File

@@ -31,16 +31,6 @@ if [ -n "$ANGLE_TAG" ]; then
export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
fi
if [ -n "$PIGLIT_TAG" ]; then
# Are we using the right Piglit version?
ci_tag_test_time_check "PIGLIT_TAG"
elif [ -d "/piglit" ]; then
# The job does not inherit from .test-piglit, so we move it out of the way.
# This makes sure that we can both do the right version checks when needed,
# and also optimise our dependencies so we don't pull unneeded stuff.
mv /piglit /piglit.unused
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}

View File

@@ -16,8 +16,8 @@ fi
TMP_DIR=$(mktemp -d)
echo "$(date +"%F %T") Downloading archived master..."
if ! curl --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
--output "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
if ! /usr/bin/wget \
-O "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
"https://${S3_HOST}/${S3_GITCACHE_BUCKET}/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz";
then
echo "Repository cache not available"

View File

@@ -13,6 +13,19 @@ if [ -z "$FLUSTER_CODECS" ]; then
exit 1
fi
# Check which fluster vectors to get
FLUSTER_VECTORS_HOST_PATH="${STORAGE_MAINLINE_HOST_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
if [ "$CI_PROJECT_PATH" != "$FDO_UPSTREAM_REPO" ]; then
if ! curl -s -L --retry 4 -f --retry-delay 60 "${FDO_HTTP_CACHE_URI:-}https://${FLUSTER_VECTORS_HOST_PATH}/done"; then
echo "Using Fluster vectors from the fork, cached from mainline is unavailable."
FLUSTER_VECTORS_HOST_PATH="${STORAGE_FORK_HOST_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
else
echo "Using the cached Fluster vectors."
fi
fi
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 "${FDO_HTTP_CACHE_URI:-}https://${FLUSTER_VECTORS_HOST_PATH}/vectors.tar.zst" | tar --zstd -x -C /usr/local/
INSTALL="$PWD/install"
# Set up the driver environment.

View File

@@ -8,8 +8,6 @@ set -ex
INSTALL=$PWD/install
export PATH=/va/bin:$PATH
# Set up the driver environment.
export LD_LIBRARY_PATH=$INSTALL/lib/

View File

@@ -19,22 +19,22 @@ include:
- .gitlab-ci/conditional-build-image-tags.yml
variables:
DEBIAN_BASE_TAG: "20250424-rootfs"
DEBIAN_BASE_TAG: "20250408-virgl"
DEBIAN_BUILD_TAG: "20250422-ci-fairy"
DEBIAN_BUILD_TAG: "20250324-android"
DEBIAN_TEST_ANDROID_TAG: "20250423-rootfs"
DEBIAN_TEST_GL_TAG: "20250423-rootfs"
DEBIAN_TEST_VIDEO_TAG: "20250423-rootfs"
DEBIAN_TEST_VK_TAG: "20250423-rootfs"
DEBIAN_TEST_ANDROID_TAG: "20250415-anglit"
DEBIAN_TEST_GL_TAG: "20250415-anglit"
DEBIAN_TEST_VK_TAG: "20250416-vkvideo"
KERNEL_ROOTFS_TAG: "20250415-anglit"
DEBIAN_PYUTILS_TAG: "20250422-ci-fairy"
DEBIAN_PYUTILS_TAG: "20250321-s3cp-fix5"
ALPINE_X86_64_BUILD_TAG: "20250423-rootfs"
ALPINE_X86_64_LAVA_SSH_TAG: "20250423-rootfs"
FEDORA_X86_64_BUILD_TAG: "20250423-rootfs"
ALPINE_X86_64_BUILD_TAG: "20250324-sphinx"
ALPINE_X86_64_LAVA_SSH_TAG: "20250321-s3cp-fix5"
FEDORA_X86_64_BUILD_TAG: "20250321-s3cp-fix5"
KERNEL_TAG: "v6.14-mesa-dea4"
KERNEL_TAG: "v6.14-mesa-0bdd"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "95bf62c"

View File

@@ -20,14 +20,13 @@ variables:
timeout: 1h
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
HWCI_TEST_SCRIPT: ./install/deqp-runner.sh
FDO_CI_CONCURRENT: 6 # should be replaced by per-machine definitions
# the dispatchers use this to cache data locally
LAVA_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri="
# base system generated by the container build job, shared between many pipelines
BASE_SYSTEM_HOST_PREFIX: "${S3_HOST}/${S3_KERNEL_BUCKET}"
BASE_SYSTEM_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}"
BASE_SYSTEM_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${LAVA_DISTRIBUTION_TAG}"
BASE_SYSTEM_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
BASE_SYSTEM_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
# per-job build artifacts
JOB_ROOTFS_OVERLAY_PATH: "${JOB_ARTIFACTS_BASE}/job-rootfs-overlay.tar.gz"
JOB_RESULTS_PATH: "${JOB_ARTIFACTS_BASE}/results.tar.zst"
@@ -36,6 +35,8 @@ variables:
S3_RESULTS_UPLOAD: "${JOB_ARTIFACTS_BASE}"
PIGLIT_NO_WINDOW: 1
VISIBILITY_GROUP: "Collabora+fdo"
STORAGE_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DATA_STORAGE_PATH}"
STORAGE_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${DATA_STORAGE_PATH}"
before_script:
- !reference [.download_s3, before_script]
script:
@@ -63,52 +64,7 @@ variables:
- job: python-artifacts
artifacts: false
.lava-x86_64-test:
variables:
ARCH: x86_64
DEBIAN_ARCH: amd64
KERNEL_IMAGE_NAME: bzImage
KERNEL_IMAGE_TYPE: "zimage"
BOOT_METHOD: u-boot
extends:
- .use-debian/x86_64_pyutils
- .lava-test
needs:
- !reference [.lava-test, needs]
- job: debian-testing
artifacts: false
.lava-x86_64-test-gl:
variables:
LAVA_DISTRIBUTION_TAG: !reference [debian/x86_64_test-gl, variables, LAVA_DISTRIBUTION_TAG]
extends:
- .lava-x86_64-test
needs:
- !reference [.lava-x86_64-test, needs]
- job: debian/x86_64_test-gl
artifacts: false
.lava-x86_64-test-video:
variables:
LAVA_DISTRIBUTION_TAG: !reference [debian/x86_64_test-video, variables, LAVA_DISTRIBUTION_TAG]
extends:
- .lava-x86_64-test
needs:
- !reference [.lava-x86_64-test, needs]
- job: debian/x86_64_test-video
artifacts: false
.lava-x86_64-test-vk:
variables:
LAVA_DISTRIBUTION_TAG: !reference [debian/x86_64_test-vk, variables, LAVA_DISTRIBUTION_TAG]
extends:
- .lava-x86_64-test
needs:
- !reference [.lava-x86_64-test, needs]
- job: debian/x86_64_test-vk
artifacts: false
.lava-arm32-test:
.lava-test:arm32:
variables:
ARCH: arm32
DEBIAN_ARCH: armhf
@@ -116,24 +72,24 @@ variables:
KERNEL_IMAGE_TYPE: "zimage"
BOOT_METHOD: u-boot
extends:
- .use-debian/arm64_build # for same $MESA_ARTIFACTS_TAG as in kernel+rootfs_arm32
- .use-debian/x86_64_pyutils
- .lava-test
- .use-kernel+rootfs-arm
needs:
- !reference [.lava-test, needs]
- job: kernel+rootfs_arm32
artifacts: false
- job: debian-arm32
artifacts: false
.lava-arm32-test-gl:
variables:
LAVA_DISTRIBUTION_TAG: !reference [debian/arm32_test-gl, variables, LAVA_DISTRIBUTION_TAG]
.lava-test-deqp:arm32:
extends:
- .lava-arm32-test
needs:
- !reference [.lava-arm32-test, needs]
- job: debian/arm32_test-gl
artifacts: false
- .lava-test:arm32
variables:
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
.lava-arm64-test:
.lava-test:arm64:
variables:
ARCH: arm64
DEBIAN_ARCH: arm64
@@ -141,36 +97,49 @@ variables:
KERNEL_IMAGE_TYPE: "image"
BOOT_METHOD: u-boot
extends:
- .use-debian/arm64_build # for same $MESA_ARTIFACTS_TAG as in kernel+rootfs_arm64
- .use-debian/x86_64_pyutils
- .lava-test
- .use-kernel+rootfs-arm
needs:
- !reference [.lava-test, needs]
- job: kernel+rootfs_arm64
artifacts: false
- job: debian-arm64
artifacts: false
.lava-arm64-test-gl:
.lava-test-deqp:arm64:
variables:
LAVA_DISTRIBUTION_TAG: !reference [debian/arm64_test-gl, variables, LAVA_DISTRIBUTION_TAG]
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
extends:
- .lava-arm64-test
- .lava-test:arm64
.lava-test:x86_64:
variables:
ARCH: x86_64
DEBIAN_ARCH: amd64
KERNEL_IMAGE_NAME: bzImage
KERNEL_IMAGE_TYPE: "zimage"
BOOT_METHOD: u-boot
extends:
- .use-debian/x86_64_build-base # for same $MESA_ARTIFACTS_BASE_TAG as in kernel+rootfs_x86_64
- .use-debian/x86_64_pyutils
- .lava-test
- .use-kernel+rootfs-x86_64
needs:
- !reference [.lava-arm64-test, needs]
- job: debian/arm64_test-gl
- !reference [.lava-test, needs]
- job: kernel+rootfs_x86_64
artifacts: false
- job: debian-testing
artifacts: false
.lava-arm64-test-vk:
.lava-test-deqp:x86_64:
variables:
LAVA_DISTRIBUTION_TAG: !reference [debian/arm64_test-vk, variables, LAVA_DISTRIBUTION_TAG]
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
extends:
- .lava-arm64-test
needs:
- !reference [.lava-arm64-test, needs]
- job: debian/arm64_test-vk
artifacts: false
- .lava-test:x86_64
.lava-piglit-traces:
extends:
- .test-piglit
variables:
HWCI_TEST_SCRIPT: "/install/piglit/piglit-traces.sh"
# until we overcome Infrastructure issues, give traces extra 5 min before timeout
@@ -181,19 +150,19 @@ variables:
reports:
junit: results/junit.xml
.lava-x86_64-piglit-traces:
.lava-piglit-traces:x86_64:
extends:
- .lava-x86_64-test-gl
- .lava-test:x86_64
- .lava-piglit-traces
.lava-arm32-piglit-traces:
.lava-piglit-traces:arm32:
extends:
- .lava-arm32-test-gl
- .lava-test:arm32
- .lava-piglit-traces
.lava-arm64-piglit-traces:
.lava-piglit-traces:arm64:
extends:
- .lava-arm64-test-gl
- .lava-test:arm64
- .lava-piglit-traces
.lava-fluster:

View File

@@ -40,6 +40,7 @@ section_start prepare_rootfs "Preparing root filesystem"
set -ex
section_switch rootfs "Assembling root filesystem"
ROOTFS_URL="$(get_path_to_artifact lava-rootfs.tar.zst)"
[ $? != 1 ] || exit 1
@@ -51,7 +52,7 @@ cp artifacts/ci-common/init-*.sh results/job-rootfs-overlay/
cp "$SCRIPTS_DIR"/setup-test-env.sh results/job-rootfs-overlay/
tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ .
ci-fairy s3cp --token-file "${S3_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}"
s3_upload job-rootfs-overlay.tar.gz "https://${JOB_ARTIFACTS_BASE}/"
# Prepare env vars for upload.
section_switch variables "Environment variables passed through to device:"

View File

@@ -225,9 +225,10 @@ def wait_for_job_get_started(job, attempt_no):
def bootstrap_log_follower(main_test_case, timestamp_relative_to) -> LogFollower:
deploy_timeout = GL_SECTION_TIMEOUTS[LogSectionType.LAVA_DEPLOY]
start_section = GitlabSection(
id="dut_deploy",
header="Running LAVA deploy action",
header=f"Running LAVA deploy action - Timeout: {deploy_timeout}",
type=LogSectionType.LAVA_DEPLOY,
start_collapsed=True,
timestamp_relative_to=timestamp_relative_to,

View File

@@ -257,8 +257,7 @@ class LAVAJobDefinition:
# since the license isn't bundled inside the repository
if self.job_submitter.device_type == "sm8350-hdk":
run_steps.append(
"mkdir -p /lib/firmware/qcom/sm8350 && "
+ "curl -L --retry 4 -f --retry-all-errors --retry-delay 60 "
"curl -L --retry 4 -f --retry-all-errors --retry-delay 60 "
+ "https://github.com/allahjasif1990/hdk888-firmware/raw/main/a660_zap.mbn "
+ '-o "/lib/firmware/qcom/sm8350/a660_zap.mbn"'
)

View File

@@ -14,6 +14,7 @@ class LogSectionType(Enum):
LAVA_QUEUE = auto()
LAVA_DEPLOY = auto()
LAVA_BOOT = auto()
TEST_DUT_SUITE = auto()
TEST_SUITE = auto()
TEST_CASE = auto()
LAVA_POST_PROCESSING = auto()
@@ -43,9 +44,12 @@ LAVA_BOOT_TIMEOUT = int(getenv("LAVA_BOOT_TIMEOUT", 5))
# including LAVA scheduling and boot duration
LAVA_TEST_OVERHEAD_MIN = 5
# Test suite phase is where initialization occurs on both the DUT and the Docker container.
# The device will be listening to the SSH session until the end of the job.
LAVA_TEST_SUITE_TIMEOUT = int(getenv("CI_JOB_TIMEOUT")) // 60 - LAVA_TEST_OVERHEAD_MIN
# Test DUT suite phase is where the initialization happens in DUT, not on docker.
# The device will be listening to SSH session until the end of the job.
LAVA_TEST_DUT_SUITE_TIMEOUT = int(getenv("CI_JOB_TIMEOUT")) // 60 - LAVA_TEST_OVERHEAD_MIN
# Test suite phase is where the initialization happens on docker.
LAVA_TEST_SUITE_TIMEOUT = int(getenv("LAVA_TEST_SUITE_TIMEOUT", 5))
# Test cases may take a long time, this script has no right to interrupt
# them. But if the test case takes almost 1h, it will never succeed due to
@@ -62,6 +66,7 @@ DEFAULT_GITLAB_SECTION_TIMEOUTS = {
LogSectionType.LAVA_QUEUE: timedelta(minutes=LAVA_QUEUE_TIMEOUT),
LogSectionType.LAVA_DEPLOY: timedelta(minutes=LAVA_DEPLOY_TIMEOUT),
LogSectionType.LAVA_BOOT: timedelta(minutes=LAVA_BOOT_TIMEOUT),
LogSectionType.TEST_DUT_SUITE: timedelta(minutes=LAVA_TEST_DUT_SUITE_TIMEOUT),
LogSectionType.TEST_SUITE: timedelta(minutes=LAVA_TEST_SUITE_TIMEOUT),
LogSectionType.TEST_CASE: timedelta(minutes=LAVA_TEST_CASE_TIMEOUT),
LogSectionType.LAVA_POST_PROCESSING: timedelta(
@@ -90,9 +95,10 @@ class LogSection:
section_id = self.section_id.format(*match.groups())
section_header = self.section_header.format(*match.groups())
is_main_test_case = section_id == main_test_case
timeout = DEFAULT_GITLAB_SECTION_TIMEOUTS[self.section_type]
return GitlabSection(
id=section_id,
header=section_header,
header=f"{section_header} - Timeout: {timeout}",
type=self.section_type,
start_collapsed=self.collapsed,
suppress_start=is_main_test_case,
@@ -116,22 +122,27 @@ LOG_SECTIONS = (
section_id="{}",
section_header="test_case {}",
section_type=LogSectionType.TEST_CASE,
collapsed=True,
),
LogSection(
regex=re.compile(r"<?STARTRUN>? ([^>]*ssh.*server.*)"),
levels=("debug"),
section_id="{}",
section_header="Setting up hardware device for remote control",
section_header="[dut] test_suite {}",
section_type=LogSectionType.TEST_DUT_SUITE,
),
LogSection(
regex=re.compile(r"<?STARTRUN>? ([^>]*)"),
levels=("debug"),
section_id="{}",
section_header="[docker] test_suite {}",
section_type=LogSectionType.TEST_SUITE,
collapsed=True,
),
LogSection(
regex=re.compile(r"ENDTC>? ([^>]+)"),
levels=("target", "debug"),
section_id="post-{}",
section_header="Post test_case {}",
section_type=LogSectionType.LAVA_POST_PROCESSING,
collapsed=True,
section_type=LogSectionType.LAVA_POST_PROCESSING,
),
)

View File

@@ -177,6 +177,7 @@ meson setup _build \
-D libunwind=${UNWIND} \
${DRI_LOADERS} \
${GALLIUM_ST} \
-D gallium-opencl=disabled \
-D gallium-drivers=${GALLIUM_DRIVERS:-[]} \
-D vulkan-drivers=${VULKAN_DRIVERS:-[]} \
-D video-codecs=all \

View File

@@ -12,9 +12,6 @@ set -ex
# Our rootfs may not have "less", which apitrace uses during apitrace dump
export PAGER=cat # FIXME: export everywhere
# Check we're using the version of Piglit we think we are
ci_tag_test_time_check "PIGLIT_TAG"
INSTALL=$(realpath -s "$PWD"/install)
export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"
@@ -130,8 +127,7 @@ replay_s3_upload_images() {
__DESTINATION_FILE_PATH="$__S3_TRACES_PREFIX/${line##*-}"
fi
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$RESULTS_DIR/$__PREFIX/$line" \
"https://${__S3_PATH}/${__DESTINATION_FILE_PATH}"
s3_upload "$RESULTS_DIR/$__PREFIX/$line" "https://${__S3_PATH}/${__DESTINATION_FILE_PATH%/*}/"
done
}

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=SC2038 # TODO: rewrite the find
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # relative paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
@@ -12,6 +14,7 @@ mkdir -p artifacts/
# Test runs don't pull down the git tree, so put the dEQP helper
# script and associated bits there.
echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" > artifacts/VERSION
cp -Rp .gitlab-ci/report-flakes.py artifacts/
cp -Rp .gitlab-ci/setup-test-env.sh artifacts/
cp -Rp .gitlab-ci/common artifacts/ci-common
@@ -20,11 +23,37 @@ cp -Rp .gitlab-ci/bare-metal artifacts/
cp -Rp .gitlab-ci/lava artifacts/
cp -Rp .gitlab-ci/bin/*_logger.py artifacts/
mapfile -t duplicate_files < <(
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec basename -a {} + | sort | uniq -d
)
if [ ${#duplicate_files[@]} -gt 0 ]; then
echo 'Several files with the same name in various ci/ folders:'
printf -- ' %s\n' "${duplicate_files[@]}"
exit 1
fi
if [ -d "src/" ]; then
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec cp -p {} artifacts/ \;
fi
cp -Rp .gitlab-ci/*.txt artifacts/
if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_TAR="$S3_ARTIFACT_NAME.tar.zst"
tar c artifacts/ | zstd -o "${S3_ARTIFACT_TAR}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_TAR}"
s3_upload "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/"
rm "${S3_ARTIFACT_TAR}"
fi

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# shellcheck disable=SC2038 # TODO: rewrite the find
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
@@ -31,8 +32,7 @@ fi
# Test runs don't pull down the git tree, so put the dEQP helper
# script and associated bits there.
git_sha=$(git rev-parse --short=10 HEAD)
echo "$(cat VERSION) (git-$git_sha)" > install/VERSION
echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" > install/VERSION
cp -Rp .gitlab-ci/bare-metal install/
cp -Rp .gitlab-ci/common install/
cp -Rp .gitlab-ci/piglit install/
@@ -71,11 +71,20 @@ find src/ -path '*/ci/*' \
\) \
-exec cp -p {} install/ \;
# Tar up the install dir so that symlinks and hardlinks aren't each
# packed separately in the zip file.
mkdir -p artifacts/
tar -cf artifacts/install.tar install
cp -Rp .gitlab-ci/common artifacts/ci-common
cp -Rp .gitlab-ci/lava artifacts/
cp -Rp .gitlab-ci/b2c artifacts/
cp bin/ci/structured_logger.py artifacts/
if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_TAR="$S3_ARTIFACT_NAME.tar.zst"
tar -c install | zstd --quiet --threads ${FDO_CI_CONCURRENT:-0} -o ${S3_ARTIFACT_TAR}
ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_TAR} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_TAR}
S3_ARTIFACT_NAME="$S3_ARTIFACT_NAME.tar.zst"
zstd --quiet --threads ${FDO_CI_CONCURRENT:-0} artifacts/install.tar -o ${S3_ARTIFACT_NAME}
s3_upload "${S3_ARTIFACT_NAME}" "https://${PIPELINE_ARTIFACTS_BASE}/"
fi
section_end prepare-artifacts

View File

@@ -285,6 +285,25 @@ export -f get_tag_file
# Structured tagging ------
s3_upload() {
x_off
local file=$1 s3_folder_url=$2
if [ ! -f "$file" ] || [[ "$s3_folder_url" != https://*/ ]]
then
echo "Error: s3_upload incorrect usage."
echo "Usage: s3_upload <file> <s3_folder_url>"
echo " - <file> must exist."
echo " - <s3_folder_url> must start with 'https://' and end with '/'."
exit 1
fi
curl --fail --retry-all-errors --retry 4 --retry-delay 60 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
-X PUT --form file=@"$file" \
"$s3_folder_url"
x_restore
}
export -f s3_upload
export -f error
export -f trap_err

View File

@@ -133,9 +133,16 @@
extends:
- .piglit-performance-base
needs:
- debian/baremetal_arm64_test-gl
- debian/baremetal_arm64_test
- debian-arm64-release
.piglit-performance:x86_64:
extends:
- .piglit-performance-base
needs:
- kernel+rootfs_x86_64
- debian-release
# Mesa source file dependencies that may impact any GL driver test job.
.gallium-core-rules:
rules:
@@ -148,7 +155,6 @@
- src/gallium/frontends/dri/*
- src/gallium/frontends/glx/**/*
- src/gallium/targets/**/*
- src/gallium/tests/**/*
- src/gallium/winsys/*
when: on_success

View File

@@ -2,11 +2,12 @@
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
# `before_script:` is only used by test jobs on generic fdo runners
# it's overwritten by hardware test jobs
GIT_STRATEGY: none # testing doesn't build anything from source
before_script:
- !reference [.download_s3, before_script]
- !reference [default, before_script]
# Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
- rm -rf install
- tar -xf artifacts/install.tar
- section_start ldd_section "Checking ldd on driver build"
- LD_LIBRARY_PATH=install/lib find install/lib -name "*.so" -print -exec ldd {} \;
- section_end ldd_section
@@ -85,9 +86,11 @@ yaml-toml-shell-py-test:
- uncollapsed_section_start tomllint "tomllint"
- echo "If your change looks right but this script rejects it, contact @eric (GitLab) / eric_engestrom (IRC)."
- python3 bin/toml_lint.py
- uncollapsed_section_switch yamllint "yamllint"
- section_end tomllint
- section_start yamllint "yamllint"
- .gitlab-ci/run-yamllint.sh
- uncollapsed_section_switch shellcheck "shellcheck"
- section_end yamllint
- section_start shellcheck "shellcheck"
- .gitlab-ci/run-shellcheck.sh
- section_end shellcheck
- .gitlab-ci/run-pytest.sh
@@ -127,7 +130,6 @@ yaml-toml-shell-py-test:
- !reference [.required-for-hardware-jobs, needs]
variables:
DEBIAN_ARCH: amd64
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
.test-vk:
extends:
@@ -139,7 +141,6 @@ yaml-toml-shell-py-test:
- !reference [.required-for-hardware-jobs, needs]
variables:
DEBIAN_ARCH: amd64
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
.test-cl:
extends:
@@ -148,8 +149,6 @@ yaml-toml-shell-py-test:
needs:
- debian/x86_64_test-gl
- !reference [.required-for-hardware-jobs, needs]
variables:
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
.test-android:
extends:
@@ -159,7 +158,6 @@ yaml-toml-shell-py-test:
# This is for the guest artifacts from debian-android which will be
# downloaded explicitly by cuttlefish-runner.sh
S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug
S3_ARTIFACT_NAME: mesa-x86_64-default-debugoptimized
# Set the default Vulkan driver to lavapipe for some preliminary checks
# that Cuttlefish always performs before starting the VM. This can be
# overwritten depending on the physical machine running the job.
@@ -183,11 +181,7 @@ yaml-toml-shell-py-test:
variables:
ANGLE_TAG: ${CONDITIONAL_BUILD_ANGLE_TAG}
.test-piglit:
variables:
PIGLIT_TAG: ${CONDITIONAL_BUILD_PIGLIT_TAG}
.test-vkd3d-proton:
.b2c-vkd3d-proton-test:
variables:
HWCI_TEST_SCRIPT: install/vkd3d-runner.sh
@@ -201,8 +195,6 @@ yaml-toml-shell-py-test:
- results/
exclude:
- results/*.shader_cache
extends:
- .test-piglit
variables:
# until we overcome Infrastructure issues, give traces extra 5 min before timeout
DEVICE_HANGING_TIMEOUT_SEC: 600
@@ -217,7 +209,7 @@ yaml-toml-shell-py-test:
.deqp-test:
script:
- rm -rf results # 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:
@@ -268,98 +260,62 @@ yaml-toml-shell-py-test:
junit: results/junit.xml
# ARM testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm32-gl:
.baremetal-test-arm32:
extends:
- .baremetal-test
- .use-debian/baremetal_arm32_test-gl
- .use-debian/baremetal_arm32_test
variables:
DEBIAN_ARCH: armhf
S3_ARTIFACT_NAME: mesa-arm32-default-debugoptimized
needs:
- debian/baremetal_arm32_test-gl
- debian/baremetal_arm32_test
- job: debian-arm32
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm64-gl:
.baremetal-test-arm64:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-gl
- .use-debian/baremetal_arm64_test
variables:
DEBIAN_ARCH: arm64
S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
needs:
- debian/baremetal_arm64_test-gl
- job: debian-arm64
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm64-vk:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-vk
variables:
DEBIAN_ARCH: arm64
S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
needs:
- debian/baremetal_arm64_test-vk
- debian/baremetal_arm64_test
- job: debian-arm64
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
.baremetal-arm32-asan-test-gl:
.baremetal-arm32-asan-test:
variables:
S3_ARTIFACT_NAME: mesa-arm32-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- debian/baremetal_arm32_test-gl
- debian/baremetal_arm32_test
- job: debian-arm32-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test-gl:
.baremetal-arm64-asan-test:
variables:
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- debian/baremetal_arm64_test-gl
- debian/baremetal_arm64_test
- job: debian-arm64-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test-vk:
variables:
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- debian/baremetal_arm64_test-vk
- job: debian-arm64-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test-gl:
.baremetal-arm64-ubsan-test:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-vk
- .use-debian/baremetal_arm64_test
variables:
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
needs:
- debian/baremetal_arm64_test-vk
- job: debian-arm64-ubsan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test-vk:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-vk
variables:
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
needs:
- debian/baremetal_arm64_test-vk
- debian/baremetal_arm64_test
- job: debian-arm64-ubsan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
@@ -367,7 +323,7 @@ yaml-toml-shell-py-test:
.baremetal-deqp-test:
variables:
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
FDO_CI_CONCURRENT: 0 # Default to number of CPUs
FDO_CI_CONCURRENT: 0 # Default to number of CPUs
# For Valve's bare-metal testing farm jobs.
.b2c-test:
@@ -420,9 +376,6 @@ yaml-toml-shell-py-test:
B2C_JOB_TEMPLATE: "${CI_B2C_ARTIFACTS}/b2c.yml.jinja2.jinja2"
JOB_FOLDER: "job_folder"
# Assume by default this is running deqp, as that's almost always true
HWCI_TEST_SCRIPT: install/deqp-runner.sh
needs:
- job: python-artifacts
artifacts: true

View File

@@ -118,15 +118,19 @@ def test_gl_sections():
section_types = [s.type for s in lf.section_history]
assert "section_start" in parsed_lines[0]
assert "collapsed=true" in parsed_lines[0]
assert "collapsed=true" not in parsed_lines[0]
assert "section_end" in parsed_lines[1]
assert "section_start" in parsed_lines[2]
assert "collapsed=true" in parsed_lines[2]
assert "collapsed=true" not in parsed_lines[2]
assert "section_end" in parsed_lines[3]
assert "section_start" in parsed_lines[4]
assert "collapsed=true" in parsed_lines[4]
assert "collapsed=true" not in parsed_lines[4]
assert "section_end" in parsed_lines[5]
assert "section_start" in parsed_lines[6]
assert "collapsed=true" in parsed_lines[6]
assert section_types == [
# LogSectionType.LAVA_BOOT, True, if LogFollower started with Boot section
LogSectionType.TEST_DUT_SUITE,
LogSectionType.TEST_SUITE,
LogSectionType.TEST_CASE,
LogSectionType.LAVA_POST_PROCESSING,

View File

@@ -3,7 +3,7 @@
. "${SCRIPTS_DIR}/setup-test-env.sh"
set -eu -o pipefail
set -e
comma_separated() {
local IFS=,
@@ -21,7 +21,7 @@ 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/:/vkd3d-proton-tests/lib/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/:/vkd3d-proton-tests/x64/"
# Set the Vulkan driver to use.
@@ -43,7 +43,7 @@ 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 ! vulkaninfo 2>/dev/null | grep driverInfo | tee /tmp/version.txt | grep -qF "Mesa $MESA_VERSION"; then
if ! vulkaninfo | grep driverInfo | tee /tmp/version.txt | grep -F "Mesa $MESA_VERSION"; then
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
exit 1
fi
@@ -51,10 +51,7 @@ fi
# Gather the list expected failures
EXPECTATIONFILE="$RESULTS_DIR/$GPU_VERSION-vkd3d-fails.txt"
if [ -f "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" ]; then
# Ignore the grep "failure" if the file exists but contains only comments
# or empty lines; the expectation file used will be empty in this case,
# which is not a problem.
grep -vE '^(#|$)' "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" | sort > "$EXPECTATIONFILE" || true
grep -vE '^(#|$)' "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" | sort > "$EXPECTATIONFILE"
else
printf "%s\n" "$GPU_VERSION-vkd3d-fails.txt not found, assuming a \"no failures\" baseline."
touch "$EXPECTATIONFILE"
@@ -92,13 +89,17 @@ fi
printf "%s\n" "Running vkd3d-proton testsuite..."
LOGFILE="$RESULTS_DIR/vkd3d-proton-log.txt"
TEST_LOGS="/test-logs"
pushd /vkd3d-proton-tests
tests/test-runner.sh ./d3d12 --jobs "${FDO_CI_CONCURRENT:-4}" --output-dir "$TEST_LOGS" | tee "$LOGFILE" || true
popd
TEST_LOGS="$RESULTS_DIR/test-logs"
(cd /vkd3d-proton-tests && tests/test-runner.sh x64/bin/d3d12 --jobs "${FDO_CI_CONCURRENT:-4}" --output-dir "$TEST_LOGS" | tee "$LOGFILE")
printf '\n\n'
# Check if the executable finished (ie. no segfault).
if ! grep -E "^Finished" "$LOGFILE" > /dev/null; then
error "Failed, see ${ARTIFACTS_BASE_URL}/results/vkd3d-proton-log.txt"
exit 1
fi
# Print list of flakes seen this time
flakes_seen=()
for flake in "${flakes[@]}"; do
@@ -113,17 +114,12 @@ if [ ${#flakes_seen[@]} -gt 0 ]; then
printf >&2 ' %s\n' "${flakes_seen[@]}"
fi
# Collect all the failures; ignore grep "failure" if there are none
fails_lines=$(grep -oE "^FAILED .+$" "$LOGFILE" | cut -d' ' -f2 | sort) || true
if [ -n "$fails_lines" ]; then
mapfile -t fails < <(echo "$fails_lines")
else
fails=()
fi
# Collect all the failures
mapfile -t fails < <(grep -oE "^FAILED .+$" "$LOGFILE" | cut -d' ' -f2 | sort)
# Save test output for failed tests (before excluding flakes)
for failed_test in "${fails[@]}"; do
cp "$TEST_LOGS/$failed_test.log" "$RESULTS_DIR/$failed_test.log"
cp "$TEST_LOGS/$failed_test.log" "$RESULTS/$failed_test.log"
done
# Ignore flakes when comparing
@@ -133,11 +129,11 @@ for flake in "${flakes[@]}"; do
done
done
RESULTSFILE="$RESULTS_DIR/$GPU_VERSION.txt"
RESULTSFILE="$RESULTS/$GPU_VERSION.txt"
for failed_test in "${fails[@]}"; do
if ! grep -qE "$failed_test end" "$RESULTS_DIR/$failed_test.log"; then
if ! grep -qE "$failed_test end" "$RESULTS/$failed_test.log"; then
test_status=Crash
elif grep -qE "Test failed:" "$RESULTS_DIR/$failed_test.log"; then
elif grep -qE "Test failed:" "$RESULTS/$failed_test.log"; then
test_status=Fail
else
test_status=Unknown
@@ -151,7 +147,7 @@ for expected_fail_line in "${expected_fail_lines[@]}"; do
test_name=$(cut -d, -f1 <<< "$expected_fail_line")
if [ ! -f "$TEST_LOGS/$test_name.log" ]; then
test_status='UnexpectedImprovement(Skip)'
elif [ ! -f "$RESULTS_DIR/$test_name.log" ]; then
elif [ ! -f "$RESULTS/$test_name.log" ]; then
test_status='UnexpectedImprovement(Pass)'
else
continue

View File

@@ -53,6 +53,7 @@ meson setup `
-Dvideo-codecs="all" `
-Dgles1=enabled `
-Dgles2=enabled `
-Dgallium-opencl=icd `
-Dgallium-rusticl=false `
-Dmicrosoft-clc=enabled `
-Dstatic-libclc=all `

20152
.pick_status.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
25.2.0-devel
25.1.2

View File

@@ -51,7 +51,7 @@ LOCAL_HEADER_LIBRARIES := libnativebase_headers hwvulkan_headers
MESON_GEN_PKGCONFIGS := log cutils expat hardware libdrm:$(LIBDRM_VERSION) nativewindow sync zlib:1.2.11 libelf
LOCAL_CFLAGS += $(BOARD_MESA3D_CFLAGS)
ifneq ($(filter swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),)
ifneq ($(filter llvmpipe swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),)
ifeq ($(BOARD_MESA3D_FORCE_SOFTPIPE),)
MESON_GEN_LLVM_STUB := true
endif
@@ -104,7 +104,6 @@ LOCAL_SHARED_LIBRARIES += \
libutils
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 35; echo $$?), 0)
LOCAL_SHARED_LIBRARIES += libui
LOCAL_STATIC_LIBRARIES += libzstd
MESON_GEN_PKGCONFIGS += ui
endif
MESON_GEN_PKGCONFIGS += android.hardware.graphics.mapper:4.0

View File

@@ -16,12 +16,12 @@ import argparse
import re
import sys
import time
from collections import defaultdict, Counter
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor
from functools import partial
from itertools import chain
from subprocess import check_output, CalledProcessError
from typing import Callable, Dict, TYPE_CHECKING, Iterable, Literal, Optional, Tuple, cast
from typing import Dict, TYPE_CHECKING, Iterable, Literal, Optional, Tuple
import gitlab
import gitlab.v4.objects
@@ -44,7 +44,6 @@ if TYPE_CHECKING:
REFRESH_WAIT_LOG = 10
REFRESH_WAIT_JOBS = 6
MAX_ENABLE_JOB_ATTEMPTS = 3
URL_START = "\033]8;;"
URL_END = "\033]8;;\a"
@@ -100,44 +99,17 @@ def job_duration(job: gitlab.v4.objects.ProjectPipelineJob) -> float:
if job.duration:
return job.duration
elif job.started_at:
# Convert both times to UTC timestamps for consistent comparison
current_time = time.time()
start_time = job.started_at.timestamp()
return current_time - start_time
return time.perf_counter() - time.mktime(job.started_at.timetuple())
return 0.0
def pretty_wait(sec: int) -> None:
"""shows progressbar in dots"""
for val in range(sec, 0, -1):
print(f"{val:2d} seconds", end="\r") # U+23F2 Timer clock
print(f"{val} seconds", end="\r") # U+23F2 Timer clock
time.sleep(1)
def run_target_job(
job: gitlab.v4.objects.ProjectPipelineJob,
enable_job_fn: Callable,
stress: int,
execution_times: dict,
target_statuses: dict,
name_field_pad: int,
) -> None:
execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url)
if stress and job.status in COMPLETED_STATUSES:
if (
stress < 0
or len(execution_times[job.name]) < stress
):
enable_job_fn(job=job, action_type="retry")
# Wait for the next loop to get the updated job object
return
else:
enable_job_fn(job=job, action_type="target")
print_job_status(job, job.status not in target_statuses[job.name], name_field_pad)
target_statuses[job.name] = job.status
def monitor_pipeline(
project: gitlab.v4.objects.Project,
pipeline: gitlab.v4.objects.ProjectPipeline,
@@ -150,7 +122,8 @@ def monitor_pipeline(
"""Monitors pipeline and delegate canceling jobs"""
statuses: dict[str, str] = defaultdict(str)
target_statuses: dict[str, str] = defaultdict(str)
execution_times: dict[str, dict[str, tuple[float, str, str]]] = defaultdict(lambda: defaultdict(tuple))
stress_status_counter: dict[str, dict[str, int]] = defaultdict(lambda: defaultdict(int))
execution_times = defaultdict(lambda: defaultdict(tuple))
target_id: int = -1
name_field_pad: int = len(max(dependencies, key=len))+2
# In a running pipeline, we can skip following job traces that are in these statuses.
@@ -164,18 +137,17 @@ def monitor_pipeline(
include_stage_regex.fullmatch(job.stage) and \
not exclude_stage_regex.fullmatch(job.stage) and \
job.status in COMPLETED_STATUSES:
stress_status_counter[job.name][job.status] += 1
execution_times[job.name][job.id] = (job_duration(job), job.status, job.web_url)
# jobs_waiting is a list of job names that are waiting for status update.
# It occurs when a job that we want to run depends on another job that is not yet finished.
jobs_waiting = []
# Dictionary to track the number of attempts made for each job
enable_attempts: dict[int, int] = {}
# FIXME: This function has too many parameters, consider refactoring.
enable_job_fn = partial(
enable_job,
project=project,
enable_attempts=enable_attempts,
pipeline=pipeline,
job_name_field_pad=name_field_pad,
jobs_waiting=jobs_waiting,
)
@@ -184,20 +156,28 @@ def monitor_pipeline(
to_cancel = []
jobs_waiting.clear()
for job in sorted(pipeline.jobs.list(all=True), key=lambda j: j.name):
job = cast(gitlab.v4.objects.ProjectPipelineJob, job)
if target_jobs_regex.fullmatch(job.name) and \
include_stage_regex.fullmatch(job.stage) and \
not exclude_stage_regex.fullmatch(job.stage):
run_target_job(
job,
enable_job_fn,
stress,
execution_times,
target_statuses,
name_field_pad,
)
target_id = job.id
target_status = job.status
if stress and target_status in COMPLETED_STATUSES:
if (
stress < 0
or sum(stress_status_counter[job.name].values()) < stress
):
stress_status_counter[job.name][target_status] += 1
execution_times[job.name][job.id] = (job_duration(job), target_status, job.web_url)
job = enable_job_fn(job=job, action_type="retry")
else:
execution_times[job.name][job.id] = (job_duration(job), target_status, job.web_url)
job = enable_job_fn(job=job, action_type="target")
print_job_status(job, target_status not in target_statuses[job.name], name_field_pad)
target_statuses[job.name] = target_status
continue
# all other non-target jobs
if job.status != statuses[job.name]:
print_job_status(job, True, name_field_pad)
@@ -205,9 +185,7 @@ def monitor_pipeline(
# run dependencies and cancel the rest
if job.name in dependencies:
if not enable_job_fn(job=job, action_type="dep"):
# Wait for the next loop to get the updated job object
continue
job = enable_job_fn(job=job, action_type="dep")
if job.status == "failed":
deps_failed.append(job.name)
else:
@@ -217,22 +195,14 @@ def monitor_pipeline(
if stress:
enough = True
status_counters = {
name: Counter(info[1] for info in runs.values())
for name, runs in execution_times.items()
}
for job_name, counter in sorted(status_counters.items()):
n_succeed = counter.get("success", 0)
n_failed = counter.get("failed", 0)
n_total_completed = n_succeed + n_failed
n_total_seen = len(execution_times[job_name])
for job_name, status in sorted(stress_status_counter.items()):
print(
f"* {job_name:{name_field_pad}}succ: {n_succeed}; "
f"fail: {n_failed}; "
f"total: {n_total_seen} of {stress}",
f"* {job_name:{name_field_pad}}succ: {status['success']}; "
f"fail: {status['failed']}; "
f"total: {sum(status.values())} of {stress}",
flush=False,
)
if stress < 0 or n_total_completed < stress:
if stress < 0 or sum(status.values()) < stress:
enough = False
if not enough:
@@ -248,10 +218,8 @@ def monitor_pipeline(
pretty_wait(REFRESH_WAIT_JOBS)
continue
if (
stress in [0, 1]
and len(target_statuses) == 1
and RUNNING_STATUSES.intersection(target_statuses.values())
if len(target_statuses) == 1 and RUNNING_STATUSES.intersection(
target_statuses.values()
):
return target_id, None, execution_times
@@ -279,58 +247,42 @@ def monitor_pipeline(
pretty_wait(REFRESH_WAIT_JOBS)
def get_pipeline_job(
pipeline: gitlab.v4.objects.ProjectPipeline,
job_id: int,
) -> gitlab.v4.objects.ProjectPipelineJob:
pipeline_jobs = pipeline.jobs.list(all=True)
return [j for j in pipeline_jobs if j.id == job_id][0]
def enable_job(
project: gitlab.v4.objects.Project,
pipeline: gitlab.v4.objects.ProjectPipeline,
job: gitlab.v4.objects.ProjectPipelineJob,
enable_attempts: dict[int, int],
action_type: Literal["target", "dep", "retry"],
job_name_field_pad: int = 0,
jobs_waiting: list[str] = [],
) -> bool:
"""
Enable a job to run.
:param project: The GitLab project.
:param job: The job to enable.
:param enable_attempts: A dictionary to track the number of attempts made for each job.
:param action_type: The type of action to perform.
:return: True if the job was enabled, False otherwise.
"""
) -> gitlab.v4.objects.ProjectPipelineJob:
# We want to run this job, but it is not ready to run yet, so let's try again in the next
# iteration.
if job.status == "created":
jobs_waiting.append(job.name)
return False
return job
if (
(job.status in COMPLETED_STATUSES and action_type != "retry")
or job.status in {"skipped"} | RUNNING_STATUSES
):
return False
# Get current attempt number
attempt_count = enable_attempts.get(job.id, 0)
# Check if we've exceeded max attempts to avoid infinite loop
if attempt_count >= MAX_ENABLE_JOB_ATTEMPTS:
raise RuntimeError(
f"Maximum enabling attempts ({MAX_ENABLE_JOB_ATTEMPTS}) reached for job {job.name} "
f"({link2print(job.web_url, job.id)}). Giving up."
)
enable_attempts[job.id] = attempt_count + 1
return job
pjob = project.jobs.get(job.id, lazy=True)
if job.status in {"success", "failed", "canceled", "canceling"}:
try:
pjob.retry()
except Exception as e:
print(f"Error retrying job {job.name}: {e}")
return False
new_job = pjob.retry()
job = get_pipeline_job(pipeline, new_job["id"])
else:
try:
pjob.play()
except Exception as e:
print(f"Error playing job {job.name}: {e}")
return False
pjob.play()
job = get_pipeline_job(pipeline, pjob.id)
if action_type == "target":
jtype = "🞋 target" # U+1F78B Round target
@@ -342,7 +294,7 @@ def enable_job(
job_name_field_pad = len(job.name) if job_name_field_pad < 1 else job_name_field_pad
print(Fore.MAGENTA + f"{jtype} job {job.name:{job_name_field_pad}}manually enabled" + Style.RESET_ALL)
return True
return job
def cancel_job(
@@ -426,9 +378,9 @@ def parse_args() -> argparse.Namespace:
help="Job stages to exclude when searching for target jobs. "
"For multiple targets, pass multiple values, eg. "
"`--exclude-stage foo bar`. By default, performance and "
"nightly jobs are excluded; pass --exclude-stage '' to "
"post-merge jobs are excluded; pass --exclude-stage '' to "
"include them for consideration.",
default=["performance", ".*-postmerge", ".*-nightly"],
default=["performance", ".*-postmerge"],
nargs=argparse.ONE_OR_MORE,
)
parser.add_argument(

View File

@@ -85,46 +85,3 @@ relevant as we have many stable branches all using CI).
Now it's time to define your test jobs in the driver-specific
gitlab-ci.yml file, using the device-specific tags.
Caching downloads
-----------------
To improve the runtime for downloading traces during traces job runs, you will
want a pass-through HTTP cache. On your runner box, install nginx:
.. code-block:: sh
sudo apt install nginx libnginx-mod-http-lua
Add the server setup files:
.. literalinclude:: fdo-cache
:name: /etc/nginx/sites-available/fdo-cache
:caption: /etc/nginx/sites-available/fdo-cache
.. literalinclude:: uri-caching.conf
:name: /etc/nginx/snippets/uri-caching.conf
:caption: /etc/nginx/snippets/uri-caching.conf
Edit the listener addresses in fdo-cache to suit the ethernet interface that
your devices are on.
Enable the site and restart nginx:
.. code-block:: sh
sudo rm /etc/nginx/sites-enabled/default
sudo ln -s /etc/nginx/sites-available/fdo-cache /etc/nginx/sites-enabled/fdo-cache
sudo systemctl restart nginx
# First download will hit the internet
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo-v2.trace
# Second download should be cached.
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo-v2.trace
Now, set ``download-url`` in your ``traces-*.yml`` entry to something like
``http://caching-proxy/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public``
and you should have cached downloads for traces. Add it to
``FDO_HTTP_CACHE_URI=`` in your ``config.toml`` runner environment lines and you
can use it for cached artifact downloads instead of going all the way to
freedesktop.org on each job.

View File

@@ -1,10 +1,232 @@
Bare-metal CI
=============
Bare-metal support is being removed from Mesa, and adding new devices is
no longer supported.
The bare-metal scripts run on a system with gitlab-runner and Docker,
connected to potentially multiple bare-metal boards that run tests of
Mesa. Currently "fastboot", "ChromeOS Servo", and POE-powered devices are
supported.
Please consider using one of the following alternatives:
In comparison with LAVA, this doesn't involve maintaining a separate
web service with its own job scheduler and replicating jobs between the
two. It also places more of the board support in Git, instead of
web service configuration. On the other hand, the serial interactions
and bootloader support are more primitive.
- `CI-tron <https://gfx-ci.pages.freedesktop.org/ci-tron/>`__
- :doc:`LAVA`
Requirements (fastboot)
-----------------------
This testing requires power control of the DUTs by the gitlab-runner
machine, since this is what we use to reset the system and get back to
a pristine state at the start of testing.
We require access to the console output from the gitlab-runner system,
since that is how we get the final results back from the tests. You
should probably have the console on a serial connection, so that you
can see bootloader progress.
The boards need to be able to have a kernel/initramfs supplied by the
gitlab-runner system, since Mesa often needs to update the kernel either for new
DRM functionality, or to fix kernel bugs.
The boards must have networking, so that we can extract the dEQP XML results to
artifacts on GitLab, and so that we can download traces (too large for an
initramfs) for trace replay testing. Given that we need networking already, and
our dEQP/Piglit/etc. payload is large, we use NFS from the x86 runner system
rather than initramfs.
See ``src/freedreno/ci/gitlab-ci.yml`` for an example of fastboot on DB410c and
DB820c (freedreno-a306 and freedreno-a530).
Requirements (Servo)
--------------------
For Servo-connected boards, we can use the EC connection for power
control to reboot the board. However, loading a kernel is not as easy
as fastboot, so we assume your bootloader can do TFTP, and that your
gitlab-runner mounts the runner's tftp directory specific to the board
at /tftp in the container.
Since we're going the TFTP route, we also use NFS root. This avoids
packing the rootfs and sending it to the board as a ramdisk, which
means we can support larger rootfses (for Piglit testing), at the cost
of needing more storage on the runner.
Telling the board about where its TFTP and NFS should come from is
done using dnsmasq on the runner host. For example, this snippet in
the dnsmasq.conf.d in the Google farm, with the gitlab-runner host we
call "servo"::
dhcp-host=1c:69:7a:0d:a3:d3,10.42.0.10,set:servo
# Fixed dhcp addresses for my sanity, and setting a tag for
# specializing other DHCP options
dhcp-host=a0:ce:c8:c8:d9:5d,10.42.0.11,set:cheza1
dhcp-host=a0:ce:c8:c8:d8:81,10.42.0.12,set:cheza2
# Specify the next server, watch out for the double ',,'. The
# filename didn't seem to get picked up by the bootloader, so we use
# tftp-unique-root and mount directories like
# /srv/tftp/10.42.0.11/jwerner/cheza as /tftp in the job containers.
tftp-unique-root
dhcp-boot=tag:cheza1,cheza1/vmlinuz,,10.42.0.10
dhcp-boot=tag:cheza2,cheza2/vmlinuz,,10.42.0.10
dhcp-option=tag:cheza1,option:root-path,/srv/nfs/cheza1
dhcp-option=tag:cheza2,option:root-path,/srv/nfs/cheza2
See ``src/freedreno/ci/gitlab-ci.yml`` for an example of Servo on cheza. Note
that other Servo boards in CI are managed using LAVA.
Requirements (POE)
------------------
For boards with 30W or less power consumption, POE can be used for the power
control. The parts list ends up looking something like (for example):
- x86-64 gitlab-runner machine with a mid-range CPU, and 3+ GB of SSD storage
per board. This can host at least 15 boards in our experience.
- Cisco 2960S gigabit ethernet switch with POE. (Cisco 3750G, 3560G, or 2960G
were also recommended as reasonable-priced HW, but make sure the name ends in
G, X, or S)
- POE splitters to power the boards (you can find ones that go to micro USB,
USBC, and 5V barrel jacks at least)
- USB serial cables (Adafruit sells pretty reliable ones)
- A large powered USB hub for all the serial cables
- A pile of ethernet cables
You'll talk to the Cisco for configuration using its USB port, which provides a
serial terminal at 9600 baud. You need to enable SNMP control, which we'll do
using a "mesaci" community name that the gitlab runner can access as its
authentication (no password) to configure. To talk to the SNMP on the router,
you need to put an IP address on the default VLAN (VLAN 1).
Setting that up looks something like:
.. code-block: console
Switch>
Password:
Switch#configure terminal
Switch(config)#interface Vlan 1
Switch(config-if)#ip address 10.42.0.2 255.255.0.0
Switch(config-if)#end
Switch(config)#snmp-server community mesaci RW
Switch(config)#end
Switch#copy running-config startup-config
With that set up, you should be able to power on/off a port with something like:
.. code-block: console
% snmpset -v2c -r 3 -t 30 -cmesaci 10.42.0.2 1.3.6.1.4.1.9.9.402.1.2.1.1.1.1 i 1
% snmpset -v2c -r 3 -t 30 -cmesaci 10.42.0.2 1.3.6.1.4.1.9.9.402.1.2.1.1.1.1 i 4
Note that the "1.3.6..." SNMP OID changes between switches. The last digit
above is the interface id (port number). You can probably find the right OID by
Google, that was easier than figuring it out from finding the switch's MIB
database. You can query the POE status from the switch serial using the ``show
power inline`` command.
Other than that, find the dnsmasq/tftp/NFS setup for your boards "servo" above.
See ``src/broadcom/ci/gitlab-ci.yml`` and ``src/nouveau/ci/gitlab-ci.yml`` for an
examples of POE for Raspberry Pi 3/4, and Jetson Nano.
Setup
-----
Each board will be registered in freedesktop.org GitLab. You'll want
something like this to register a fastboot board:
.. code-block:: sh
sudo gitlab-runner register \
--url https://gitlab.freedesktop.org \
--registration-token $1 \
--name MY_BOARD_NAME \
--tag-list MY_BOARD_TAG \
--executor docker \
--docker-image "alpine:latest" \
--docker-volumes "/dev:/dev" \
--docker-network-mode "host" \
--docker-privileged \
--non-interactive
For a Servo board, you'll need to also volume mount the board's NFS
root dir at /nfs and TFTP kernel directory at /tftp.
The registration token has to come from a freedesktop.org GitLab admin
going to https://gitlab.freedesktop.org/admin/runners
The name scheme for Google's lab is google-freedreno-boardname-n, and
our tag is something like google-freedreno-db410c. The tag is what
identifies a board type so that board-specific jobs can be dispatched
into that pool.
We need privileged mode and the /dev bind mount in order to get at the
serial console and fastboot USB devices (--device arguments don't
apply to devices that show up after container start, which is the case
with fastboot, and the Servo serial devices are actually links to
/dev/pts). We use host network mode so that we can spin up a nginx
server to collect XML results for fastboot.
Once you've added your boards, you're going to need to add a little
more customization in ``/etc/gitlab-runner/config.toml``. First, add
``concurrent = <number of boards>`` at the top ("we should have up to
this many jobs running managed by this gitlab-runner"). Then for each
board's runner, set ``limit = 1`` ("only 1 job served by this board at a
time"). Finally, add the board-specific environment variables
required by your bare-metal script, something like::
[[runners]]
name = "google-freedreno-db410c-1"
environment = ["BM_SERIAL=/dev/ttyDB410c8", "BM_POWERUP=google-power-up.sh 8", "BM_FASTBOOT_SERIAL=15e9e390", "FDO_CI_CONCURRENT=4"]
The ``FDO_CI_CONCURRENT`` variable should be set to the number of CPU threads on
the board, which is used for auto-tuning of job parallelism.
Once you've updated your runners' configs, restart with ``sudo service
gitlab-runner restart``
Caching downloads
-----------------
To improve the runtime for downloading traces during traces job runs, you will
want a pass-through HTTP cache. On your runner box, install nginx:
.. code-block:: sh
sudo apt install nginx libnginx-mod-http-lua
Add the server setup files:
.. literalinclude:: fdo-cache
:name: /etc/nginx/sites-available/fdo-cache
:caption: /etc/nginx/sites-available/fdo-cache
.. literalinclude:: uri-caching.conf
:name: /etc/nginx/snippets/uri-caching.conf
:caption: /etc/nginx/snippets/uri-caching.conf
Edit the listener addresses in fdo-cache to suit the ethernet interface that
your devices are on.
Enable the site and restart nginx:
.. code-block:: sh
sudo rm /etc/nginx/sites-enabled/default
sudo ln -s /etc/nginx/sites-available/fdo-cache /etc/nginx/sites-enabled/fdo-cache
sudo systemctl restart nginx
# First download will hit the internet
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo-v2.trace
# Second download should be cached.
wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo-v2.trace
Now, set ``download-url`` in your ``traces-*.yml`` entry to something like
``http://caching-proxy/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public``
and you should have cached downloads for traces. Add it to
``FDO_HTTP_CACHE_URI=`` in your ``config.toml`` runner environment lines and you
can use it for cached artifact downloads instead of going all the way to
freedesktop.org on each job.

View File

@@ -53,11 +53,16 @@ Kconfigs location
Updating image tags
-------------------
Every kernel uprev should update the following tag:
Every kernel uprev should update 3 image tags, located at two files.
:code:`.gitlab-ci/image-tags.yml` tag
:code:`.gitlab-ci/container/gitlab-ci.yml` tag
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- **KERNEL_URL** for the location of the new kernel
:code:`.gitlab-ci/image-tags.yml` tags
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- **KERNEL_TAG** to use the new kernel
- **KERNEL_ROOTFS_TAG** to rebuild rootfs with the new kernel
- **DEBIAN_X86_TEST_GL_TAG** to ensure that the new rootfs is being used by the GitLab x86 jobs
Development routine
-------------------

View File

@@ -249,11 +249,11 @@ To integrate structured tagging for a new component (for example, ``my_component
variables:
MY_COMPONENT_TAG: "${CONDITIONAL_BUILD_MY_COMPONENT_TAG}"
- It is time to modify the job that builds the component image to include the new component tag. Let's suppose that only the ``debian/arm64_test-gl`` job builds the component image. We need to add the new component tag to the job as an extension:
- It is time to modify the job that builds the component image to include the new component tag. Let's suppose that only the ``kernel+rootfs_x86_64`` job builds the component image. We need to add the new component tag to the job as an extension:
.. code-block:: yaml
debian/arm64_test-gl:
kernel+rootfs_x86_64:
extends:
- .container-builds-my-component
- .container-builds-my-component2

View File

@@ -51,7 +51,7 @@ Add this to your ``.vimrc`` to automatically format any C & C++ file
If ``/usr/share/clang/clang-format.py`` doesn't exist, try
``/usr/share/clang/clang-format-$CLANG_VERSION/clang-format.py``
(replacing ``$CLANG_VERSION`` with your clang version). If your distribution
(replacing ``$CLANG_VERSION`` with your clang version). If your distro
has put the file somewhere else, look through the files in the package
providing ``clang-format``.
@@ -82,8 +82,8 @@ Add this to your ``.emacs`` to automatically format any C & C++ file
(add-hook 'c++-mode-hook (lambda () (clang-format-save-hook-for-this-buffer)))
If ``/usr/share/clang/clang-format.el`` doesn't exist, look through the
files in the package providing ``clang-format`` in your distribution.
If you can't find anything (e.g. on Debian/Ubuntu), refer to `this StackOverflow
files in the package providing ``clang-format`` in your distro. If you
can't find anything (e.g. on Debian/Ubuntu), refer to `this StackOverflow
answer <https://stackoverflow.com/questions/59690583/how-do-you-use-clang-format-on-emacs-ubuntu/59850773#59850773>`__
to install clang-format through Emacs instead.

View File

@@ -6,12 +6,9 @@ NVK is a Vulkan driver for NVIDIA GPUs.
Hardware support
----------------
NVK currently supports Maxwell (some GTX 700 and 800 series, most 900
series) and later GPUs. Kepler (GeForce 600 and 700 series) work is
currently in-progress but incomplete. Support for new GPU generations may
take up to a year after the launch of the hardware because it takes time
for Nouveau developers to get access to hardware and documentation from
NVIDIA.
NVK currently supports Turing (RTX 20XX and GTX 16XX) and later GPUs.
Eventually, we plan to support as far back as Kepler (GeForce 600 and 700
series) GPUs but anything pre-Turing is currently disabled by default.
Kernel requirements
-------------------
@@ -21,8 +18,8 @@ NVK requires at least a Linux 6.6 kernel
Conformance status:
-------------------
NVK is a conformant Vulkan 1.4 implementation for all Maxwell (some GTX 700
and 800 series, most 900 series) and later GPUs.
NVK is a conformant Vulkan 1.3 implementation for all Turing (RTX 20XX and
GTX 16XX) and later GPUs.
Debugging
---------

View File

@@ -60,8 +60,8 @@ LLVM is required by Panfrost's compilers at build time.
In case of cross compilation without LLVM,
you can build and install the required tools on the host (with LLVM installed) with
``meson . build-host/ -Dvulkan-drivers=panfrost -Dgallium-drivers=panfrost
-Dmesa-clc=enabled -Dinstall-mesa-clc=true -Dprecomp-compiler=enabled -Dinstall-precomp-compiler=true``
``meson . build-host/ -Dtools=panfrost -Dmesa-clc=enabled -Dinstall-mesa-clc=true
-Dprecomp-compiler=enabled -Dinstall-precomp-compiler=true``
and then use ``-Dmesa-clc=system -Dprecomp-compiler=system`` on the cross compile side.
For general information on building Mesa, read :doc:`the install documentation

View File

@@ -201,10 +201,10 @@ Core Mesa environment variables
if set, determines the directory to be used for the on-disk cache of
compiled shader programs. If set then the cache will be stored in
``$MESA_SHADER_CACHE_DIR/mesa_shader_cache``. If this variable is not
``$MESA_SHADER_CACHE_DIR/mesa_shader_cache_db``. If this variable is not
set, then the cache will be stored in
``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set), or else
within ``.cache/mesa_shader_cache`` within the user's home directory.
``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that variable is set), or else
within ``.cache/mesa_shader_cache_db`` within the user's home directory.
.. envvar:: MESA_SHADER_CACHE_SHOW_STATS
@@ -228,9 +228,9 @@ Core Mesa environment variables
.. envvar:: MESA_DISK_CACHE_MULTI_FILE
if set to 1 (set by default), enables the multi file on-disk
shader cache implementation. This implementation increases the overall
disk usage.
if set to 1, enables the multi file on-disk shader cache implementation
instead of the default Mesa-DB cache implementation.
This implementation increases the overall disk usage.
If :envvar:`MESA_SHADER_CACHE_DIR` is set, the cache will be stored in
``$MESA_SHADER_CACHE_DIR/mesa_shader_cache``, or else within
``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set)
@@ -248,18 +248,6 @@ Core Mesa environment variables
and ``filename1_idx.foz``. A limit of 8 DBs can be loaded and this limit
is shared with :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST`.
.. envvar:: MESA_DISK_CACHE_DATABASE
if set to 1, enables the Mesa-DB single file on-disk shader cache
implementation instead of the default multi-file cache implementation.
Like :envvar:`MESA_DISK_CACHE_SINGLE_FILE`, Mesa-DB reduces overall
disk usage but Mesa-DB supports cache size limits via
:envvar:`MESA_SHADER_CACHE_MAX_SIZE`. If
:envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
in ``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that variable is set)
or else within ``.cache/mesa_shader_cache_db`` within the user's home
directory.
.. envvar:: MESA_DISK_CACHE_DATABASE_NUM_PARTS
specifies number of mesa-db cache parts, default is 50.
@@ -1089,20 +1077,20 @@ Gallium environment variables
.. envvar:: GALLIUM_TRACE
If set, this variable will cause the trace output to be written to the
If set, this variable will cause the :ref:`trace` output to be written to the
specified file. Paths may be relative or absolute; relative paths are relative
to the working directory. For example, setting it to "trace.xml" will cause
the trace to be written to a file of the same name in the working directory.
.. envvar:: GALLIUM_TRACE_TC
If enabled while trace is active, this variable specifies that the threaded context
If enabled while :ref:`trace` is active, this variable specifies that the threaded context
should be traced for drivers which implement it. By default, the driver thread is traced,
which will include any reordering of the command stream from threaded context.
.. envvar:: GALLIUM_TRACE_TRIGGER
If set while trace is active, this variable specifies a filename to monitor.
If set while :ref:`trace` is active, this variable specifies a filename to monitor.
Once the file exists (e.g., from the user running 'touch /path/to/file'), a single
frame will be recorded into the trace output.
Paths may be relative or absolute; relative paths are relative to the working directory.
@@ -1147,6 +1135,54 @@ Gallium environment variables
``sse4.1``
``avx``
Clover environment variables
----------------------------
.. envvar:: CLOVER_DEVICE_TYPE
allows to overwrite the device type of devices. Possible values are
``accelerator``, ``cpu``, ``custom`` and ``gpu``
.. envvar:: CLOVER_DEVICE_VERSION_OVERRIDE
overwrites the auto detected OpenCL version of a device. Possible values:
``1.0``
``1.1``
``1.2``
``2.0``
``2.1``
``2.2``
``3.0``
.. envvar:: CLOVER_DEVICE_CLC_VERSION_OVERRIDE
overwrites the auto detected CLC version. Possible values:
``1.0``
``1.1``
``1.2``
``2.0``
``2.1``
``2.2``
``3.0``
.. envvar:: CLOVER_EXTRA_BUILD_OPTIONS
allows specifying additional compiler and linker options. Specified
options are appended after the options set by the OpenCL program in
``clBuildProgram``.
.. envvar:: CLOVER_EXTRA_COMPILE_OPTIONS
allows specifying additional compiler options. Specified options are
appended after the options set by the OpenCL program in
``clCompileProgram``.
.. envvar:: CLOVER_EXTRA_LINK_OPTIONS
allows specifying additional linker options. Specified options are
appended after the options set by the OpenCL program in
``clLinkProgram``.
.. _rusticl-env-var:
Rusticl environment variables
@@ -1473,8 +1509,6 @@ RADV driver environment variables
Dump backend IR (ACO or LLVM) for selected shader stages.
``asm``
Dump shader disassembly for selected shader stages.
``bvh4``
Use bvh4 encoding on GPUs that support bvh8 encoding.
.. envvar:: RADV_FORCE_FAMILY

View File

@@ -125,8 +125,8 @@ popular and feature-complete.
2.1 What's the easiest way to install Mesa?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you're using a Linux-based system, your distribution
most likely already includes Mesa packages.
If you're using a Linux-based system, your distro CD most likely already
has Mesa packages (like RPM or DEB) which you can easily install.
2.2 I get undefined symbols such as bgnpolygon, v3f, etc...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -99,7 +99,7 @@ GL 3.2, GLSL 1.50 --- all DONE: freedreno, nv50, nvc0, r600, radeonsi, llvmpipe,
GL 3.3, GLSL 3.30 --- all DONE: freedreno, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe, virgl, zink, d3d12, iris, crocus/gen6+, asahi
GL_ARB_blend_func_extended DONE (freedreno/a3xx, freedreno/a6xx, v3d, panfrost, lima)
GL_ARB_blend_func_extended DONE (freedreno/a3xx, freedreno/a6xx, panfrost, lima)
GL_ARB_explicit_attrib_location DONE (all drivers that support GLSL)
GL_ARB_occlusion_query2 DONE (v3d, panfrost)
GL_ARB_sampler_objects DONE (all drivers)
@@ -461,7 +461,7 @@ Vulkan 1.2 -- all DONE: anv, nvk, panvk, tu, vn
VK_KHR_buffer_device_address DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_create_renderpass2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_depth_stencil_resolve DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_draw_indirect_count DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_draw_indirect_count DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, vn)
VK_KHR_driver_properties DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_image_format_list DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_imageless_framebuffer DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
@@ -487,21 +487,21 @@ Vulkan 1.3 -- all DONE: anv, lvp, nvk, radv, tu, vn, v3dv
VK_KHR_copy_commands2 DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_dynamic_rendering DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_format_feature_flags2 DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_maintenance4 DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn)
VK_KHR_shader_integer_dot_product DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_maintenance4 DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_shader_integer_dot_product DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_shader_non_semantic_info DONE (anv, hasvk, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_shader_terminate_invocation DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_shader_terminate_invocation DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_synchronization2 DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_zero_initialize_workgroup_memory DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_4444_formats DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_extended_dynamic_state DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_extended_dynamic_state2 DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_extended_dynamic_state DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_extended_dynamic_state2 DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_inline_uniform_block DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_pipeline_creation_cache_control DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_pipeline_creation_feedback DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_private_data DONE (anv, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_image_robustness DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_shader_demote_to_helper_invocation DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_subgroup_size_control DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn)
VK_EXT_texel_buffer_alignment DONE (anv, hasvk, lvp, nvk, pvr, radv, tu, v3dv, vn)
VK_EXT_texture_compression_astc_hdr DONE (vn)
@@ -515,7 +515,7 @@ Vulkan 1.4 -- all DONE: anv, lvp, nvk, radv/gfx8+, tu/a7xx+, vn
VK_KHR_index_type_uint8 DONE (anv, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_line_rasterization DONE (anv, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_load_store_op_none DONE (anv, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_maintenance5 DONE (anv, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn)
VK_KHR_maintenance5 DONE (anv, lvp, nvk, radv, tu, v3dv, vn)
VK_KHR_maintenance6 DONE (anv, lvp, nvk, radv, tu, vn)
VK_KHR_map_memory2 DONE (anv, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_push_descriptor DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, vn)
@@ -559,12 +559,11 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_ray_tracing_maintenance1 DONE (anv/gfx12.5+, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_ray_tracing_pipeline DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, vn)
VK_KHR_ray_tracing_position_fetch DONE (anv, radv/gfx10.3+, vn)
VK_KHR_shader_bfloat16 DONE (anv/gfx12.5+)
VK_KHR_shader_clock DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_KHR_shader_maximal_reconvergence DONE (anv, lvp, nvk, panvk/v10+, radv, vn)
VK_KHR_shader_relaxed_extended_instruction DONE (anv, hasvk, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_shader_subgroup_uniform_control_flow DONE (anv, hasvk, nvk, panvk/v10+, radv, tu, vn)
VK_KHR_shader_quad_control DONE (anv, nvk, panvk/v10+, radv, vn)
VK_KHR_shader_quad_control DONE (anv, nvk, radv, vn)
VK_KHR_shared_presentable_image not started
VK_KHR_surface DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_KHR_surface_protected_capabilities DONE (anv, lvp, nvk, radv, tu, v3dv, vn)
@@ -590,7 +589,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_debug_marker DONE (radv)
VK_EXT_debug_report DONE (anv, dzn, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_debug_utils DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_depth_bias_control DONE (anv, nvk, panvk, radv, vn)
VK_EXT_depth_bias_control DONE (anv, nvk, radv, vn)
VK_EXT_depth_clamp_control DONE (anv, hasvk, nvk, radv, vn)
VK_EXT_depth_clip_control DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_depth_clip_enable DONE (anv, hasvk, lvp, nvk, panvk, radv, tu, v3dv/vc7+, vn)
@@ -649,7 +648,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_shader_atomic_float2 DONE (anv, lvp, radv, vn)
VK_EXT_shader_image_atomic_int64 DONE (nvk, radv, vn)
VK_EXT_shader_object DONE (lvp, nvk, radv)
VK_EXT_shader_replicated_composites DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_shader_replicated_composites DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_shader_stencil_export DONE (anv, lvp, radv, tu, vn)
VK_EXT_shader_subgroup_ballot DONE (anv, dzn, hasvk, lvp, nvk, radv, vn)
VK_EXT_shader_subgroup_vote DONE (anv, dzn, hasvk, lvp, nvk, radv, vn)
@@ -657,8 +656,8 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_surface_maintenance1 DONE (anv, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_swapchain_maintenance1 DONE (anv, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_transform_feedback DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_vertex_attribute_divisor DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn)
VK_EXT_vertex_input_dynamic_state DONE (anv, lvp, nvk, panvk, radv, tu, vn)
VK_EXT_vertex_attribute_divisor DONE (anv, dzn, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_vertex_input_dynamic_state DONE (anv, lvp, nvk, radv, tu, vn)
VK_EXT_ycbcr_image_arrays DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, vn)
VK_ANDROID_external_memory_android_hardware_buffer DONE (anv, radv, tu, vn)
VK_ANDROID_native_buffer DONE (anv, radv, tu, v3dv, vn)
@@ -698,6 +697,160 @@ Khronos extensions that are not part of any Vulkan version:
VK_QCOM_fragment_density_map_offset DONE (tu)
Clover OpenCL 1.0 -- all DONE:
Image support in progress
- Optional image formats in progress
Clover OpenCL 1.1 -- all DONE:
Additional queries for clGetDeviceInfo DONE (nvc0, r600, radeonsi)
CL_CONTEXT_NUM_DEVICES for clGetContextInfo DONE
New optional image formats not started
- CL_Rx not started
- CL_RGx not started
- CL_RGBx not started
clCreateSubBuffer DONE
Read from, write to, copy rectangular regions DONE
clSetMemObjectDestructorCallback DONE
Control OpenCL C version when building DONE
Query for preferred work-group size multiple DONE (nvc0, r600, radeonsi)
Support user events DONE
clSetEventCallback DONE
Minimum requirement changes for clGetDeviceInfo DONE (nvc0, r600, radeonsi)
Arg prerequisite change for clEnqueueNDRangeKernel DONE ()
OpenCL C 1.1 DONE (nvc0, r600, radeonsi)
- 3-component vector data types DONE (nvc0, r600, radeonsi)
- cl_khr_byte_addressable_store DONE (nvc0, r600, radeonsi)
- cl_khr_global_int32_base_atomics DONE (nvc0, r600, radeonsi)
- cl_khr_global_int32_extended_atomics DONE (nvc0, r600, radeonsi)
- cl_khr_local_int32_base_atomics DONE (nvc0, r600, radeonsi)
- cl_khr_local_int32_extended_atomics DONE (nvc0, r600, radeonsi)
Clover OpenCL 1.2 -- all DONE:
Custom devices DONE
Built-in kernels in progress
Device partitioning not started
Separate compilation and linking of programs DONE
Extend cl_mem_flags DONE
clEnqueueFillBuffer, clEnqueueFillImage DONE
Add CL_MAP_WRITE_INVALIDATE_REGION to cl_map_flags DONE
New image types not started
clCreateImage DONE
clEnqueueMigrateMemObjects DONE
Retrieve kernels information from a program DONE
clGetKernelArgInfo DONE
clEnqueueMarkerWithWaitList DONE
clEnqueueBarrierWithWaitList DONE
clUnloadPlatformCompiler DONE
cl_khr_fp64 DONE (nvc0, r600, radeonsi)
printf DONE (nvc0)
CL_KERNEL_ATTRIBUTES for clGetKernelInfo DONE
OpenCL C 1.2 DONE
Clover OpenCL 2.0 -- all DONE:
Shared virtual memory DONE (nvc0, llvmpipe)
Device queues not started
- cl_khr_create_command_queue not started
- Additional queries for clGetDeviceInfo not started
Pipes not started
Extended 2D images creation in progress
- CL_ABGR DONE
- cl_khr_image2d_from_buffer not started
- cl_khr_depth_images not started
- from sRGB images not started
clCreateSamplerWithProperties not started
Non-uniform work-group sizes not started
cl_khr_3d_image_writes not started
OpenCL C 2.0 in progress
- Work-group Collective Functions not started
- Generic address space in progress
Clover OpenCL 2.1 -- all DONE:
Sub groups not started
- cl_khr_subgroups not started
cl_khr_il_program DONE (nvc0)
Device and host timer synchronization not started
clEnqueueSVMMigrateMem not started
clCloneKernel not started
Default device command queue not started
CL_UNORM_INT_101010_2 DONE
Clover OpenCL 2.2 -- all DONE:
clSetProgramSpecializationConstant not started
clSetProgramReleaseCallback not started
Initialization and clean-up kernels not started
CL_MAX_SIZE_RESTRICTION_EXCEEDED for clSetKernelArg not started
Support SPIR-V 1.1 and 1.2 not started
Clover OpenCL 3.0 -- all DONE:
Optional device capabilities queries in progress
cl_khr_extended_versioning DONE
clSetContextDestructorCallback DONE
clCreateBufferWithProperties DONE
clCreateImageWithProperties DONE
Query properties arrays in progress
Supported OpenCL C versions and features queries DONE
CL_COMMAND_SVM_MIGRATE_MEM for clGetEventInfo not started
OpenCL C 3.0 DONE
Latest conformance version passed for devices not started
Clover extensions that are not part of any OpenCL version:
cl_khr_async_copy_fence not started
cl_khr_async_work_group_copy_fence not started
cl_khr_device_enqueue_local_arg_types not started
cl_khr_device_uuid not started
cl_khr_egl_event not started
cl_khr_egl_image not started
cl_khr_expect_assume not started
cl_khr_extended_async_copies not started
cl_khr_extended_bit_ops not started
cl_khr_fp16 DONE ()
cl_khr_gl_depth_images not started
cl_khr_gl_msaa_sharing not started
cl_khr_gl_sharing not started
cl_khr_icd DONE
cl_khr_initialize_memory not started
cl_khr_int64_base_atomics DONE ()
cl_khr_int64_extended_atomics DONE ()
cl_khr_integer_dot_product not started
cl_khr_mipmap_image not started
cl_khr_pci_bus_info not started
cl_khr_priority_hints not started
cl_khr_spirv_extended_debug_info not started
cl_khr_spirv_linkonce_odr not started
cl_khr_spirv_no_integer_wrap_decoration not started
cl_khr_srgb_image_writes not started
cl_khr_subgroup_ballot not started
cl_khr_subgroup_clustered_reduce not started
cl_khr_subgroup_extended_types not started
cl_khr_subgroup_named_barrier not started
cl_khr_subgroup_non_uniform_arithmetic not started
cl_khr_subgroup_non_uniform_vote not started
cl_khr_subgroup_rotate not started
cl_khr_subgroup_shuffle not started
cl_khr_subgroup_shuffle_relative not started
cl_khr_suggested_local_work_size not started
cl_khr_terminate_context not started
cl_khr_throttle_hints not started
cl_khr_work_group_uniform_arithmetic not started
cl_arm_non_uniform_work_group_size not started
cl_arm_shared_virtual_memory DONE (nvc0)
cl_intel_unified_shared_memory not started
Rusticl OpenCL 1.0 -- all DONE:
Image support DONE

View File

@@ -56,7 +56,7 @@ flatshade
CONSTANT, LINEAR and PERSPECTIVE. The flatshade state is needed at
clipping time to determine how to set the color of new vertices.
Draw can implement flat shading by copying the provoking vertex
:ref:`Draw` can implement flat shading by copying the provoking vertex
color to all the other vertices in the primitive.
flatshade_first
@@ -80,7 +80,7 @@ Polygons
light_twoside
If set, there are per-vertex back-facing colors. The hardware
(perhaps assisted by Draw) should be set up to use this state
(perhaps assisted by :ref:`Draw`) should be set up to use this state
along with the front/back information to set the final vertex colors
prior to rasterization.
@@ -178,7 +178,7 @@ sprite_coord_enable
always rasterized as quads). Any mismatch between these states should
be considered a bug in the gallium frontend.
This feature is implemented in the Draw module but may also be
This feature is implemented in the :ref:`Draw` module but may also be
implemented natively by GPUs or implemented with a geometry shader.
@@ -187,7 +187,7 @@ sprite_coord_mode
point sprites. For PIPE_SPRITE_COORD_LOWER_LEFT, the lower-left vertex will
have coordinates (0,0,0,1). For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left
vertex will have coordinates (0,0,0,1).
This state is used by Draw to generate texcoords.
This state is used by :ref:`Draw` to generate texcoords.
point_quad_rasterization

187
docs/gallium/distro.rst Normal file
View File

@@ -0,0 +1,187 @@
Distribution
============
Along with the interface definitions, the following drivers, Gallium frontends,
and auxiliary modules are shipped in the standard Gallium distribution.
Drivers
-------
Intel i915
^^^^^^^^^^
Driver for Intel i915 and i945 chipsets.
LLVM Softpipe
^^^^^^^^^^^^^
A version of :ref:`softpipe` that uses the Low-Level Virtual Machine to
dynamically generate optimized rasterizing pipelines.
NVIDIA NV30
^^^^^^^^^^^
Driver for the NVIDIA NV30 and NV40 families of GPUs.
NVIDIA NV50
^^^^^^^^^^^
Driver for the NVIDIA NV50 family of GPUs.
NVIDIA NVC0
^^^^^^^^^^^
Driver for the NVIDIA NVC0 / Fermi family of GPUs.
VMware SVGA
^^^^^^^^^^^
Driver for VMware virtualized guest operating system graphics processing.
ATI R300
^^^^^^^^
Driver for the ATI/AMD R300, R400, and R500 families of GPUs.
ATI/AMD R600
^^^^^^^^^^^^
Driver for the ATI/AMD R600, R700, Evergreen and Northern Islands families of GPUs.
AMD RadeonSI
^^^^^^^^^^^^
Driver for the AMD Southern Islands family of GPUs.
Freedreno
^^^^^^^^^
Driver for Qualcomm Adreno 2xx, 3xx, and 4xx series of GPUs.
.. _softpipe:
Softpipe
^^^^^^^^
Reference software rasterizer. Slow but accurate.
.. _trace:
Trace
^^^^^
Wrapper driver. Trace dumps an XML record of the calls made to the
:ref:`Context` and :ref:`Screen` objects that it wraps.
Gallium frontends
-----------------
Clover
^^^^^^
Tracker that implements the Khronos OpenCL standard.
.. _dri:
Direct Rendering Infrastructure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Tracker that implements the client-side DRI protocol, for providing direct
acceleration services to X11 servers with the DRI extension. Supports DRI1
and DRI2. Only GL is supported.
GLX
^^^
MesaGL
^^^^^^
The Gallium frontend implementing a GL state machine. Not usable as
a standalone frontend; Mesa should be built with another Gallium frontend,
such as :ref:`DRI` or EGL.
Nine
^^^^
The Gallium frontend implements the Direct3D 9 API.
VDPAU
^^^^^
Tracker for Video Decode and Presentation API for Unix.
WGL
^^^
Xorg DDX
^^^^^^^^
Tracker for Xorg X11 servers. Provides device-dependent
modesetting and acceleration as a DDX driver.
Auxiliary
---------
OS
^^
The OS module contains the abstractions for basic operating system services:
* memory allocation
* simple message logging
* obtaining run-time configuration option
* threading primitives
This is the bare minimum required to port Gallium to a new platform.
The OS module already provides the implementations of these abstractions for
the most common platforms. When targeting an embedded platform no
implementation will be provided -- these must be provided separately.
CSO Cache
^^^^^^^^^
The CSO cache is used to accelerate preparation of state by saving
driver-specific state structures for later use.
.. _draw:
Draw
^^^^
Draw is a software :term:`TCL` pipeline for hardware that lacks vertex shaders
or other essential parts of pre-rasterization vertex preparation.
Gallivm
^^^^^^^
Indices
^^^^^^^
Indices provides tools for translating or generating element indices for
use with element-based rendering.
Pipe Buffer Managers
^^^^^^^^^^^^^^^^^^^^
Each of these managers provides various services to drivers that are not
fully utilizing a memory manager.
Remote Debugger
^^^^^^^^^^^^^^^
Runtime Assembly Emission
^^^^^^^^^^^^^^^^^^^^^^^^^
TGSI
^^^^
The TGSI auxiliary module provides basic utilities for manipulating TGSI
streams.
Translate
^^^^^^^^^
Util
^^^^

View File

@@ -15,6 +15,7 @@ Contents:
context
cso
buffermapping
distro
postprocess
glossary

View File

@@ -66,7 +66,7 @@ Check/install the respective development package as prompted by the
configure error message.
Here are some common ways to retrieve most/all of the dependencies based
on the packaging tool used by your distribution.
on the packaging tool used by your distro.
.. code-block:: sh

View File

@@ -51,7 +51,7 @@ most of these with just one command. On Fedora and similar, ``sudo dnf
builddep mesa`` does the same.
.. note::
All these dependencies are for latest Linux distributions and is tested on Ubuntu 24.xx only for now.
All these dependencies are for latest linux distros and is tested on ubuntu-24 only for now.
Also note, some packages below might not be available in your OS with the exact name, in such case you can search for it and install the distribution specific one.

View File

@@ -1,5 +1,8 @@
25.0,2025-04-30,25.0.5,Eric Engestrom,
25.0,2025-04-16,25.0.4,Eric Engestrom,
,2025-04-30,25.0.5,Eric Engestrom,
,2025-05-14,25.0.6,Eric Engestrom,
,2025-05-28,25.0.7,Eric Engestrom,Last planned 25.0.x release.
25.1,2025-04-30,25.1.0-rc3,Eric Engestrom,
25.1,2025-04-16,25.1.0-rc1,Eric Engestrom,25.1 branchpoint
,2025-04-23,25.1.0-rc2,Eric Engestrom,
,2025-04-30,25.1.0-rc3,Eric Engestrom,
,2025-05-07,25.1.0-rc4,Eric Engestrom,or 25.1.0 final
1 25.0 2025-04-30 2025-04-16 25.0.5 25.0.4 Eric Engestrom
2 2025-04-30 25.0.5 Eric Engestrom
3 2025-05-14 2025-05-14 25.0.6 25.0.6 Eric Engestrom
4 2025-05-28 2025-05-28 25.0.7 25.0.7 Eric Engestrom Last planned 25.0.x release.
5 25.1 2025-04-30 2025-04-16 25.1.0-rc3 25.1.0-rc1 Eric Engestrom 25.1 branchpoint
6 2025-04-23 25.1.0-rc2 Eric Engestrom
7 2025-04-30 25.1.0-rc3 Eric Engestrom
8 2025-05-07 2025-05-07 25.1.0-rc4 25.1.0-rc4 Eric Engestrom or 25.1.0 final

View File

@@ -3,7 +3,9 @@ Release Notes
The release notes summarize what's new or changed in each Mesa release.
- :doc:`25.0.4 release notes <relnotes/25.0.4>`
- :doc:`25.1.2 release notes <relnotes/25.1.2>`
- :doc:`25.1.1 release notes <relnotes/25.1.1>`
- :doc:`25.1.0 release notes <relnotes/25.1.0>`
- :doc:`25.0.3 release notes <relnotes/25.0.3>`
- :doc:`25.0.2 release notes <relnotes/25.0.2>`
- :doc:`25.0.1 release notes <relnotes/25.0.1>`
@@ -447,7 +449,9 @@ The release notes summarize what's new or changed in each Mesa release.
:maxdepth: 1
:hidden:
25.0.4 <relnotes/25.0.4>
25.1.2 <relnotes/25.1.2>
25.1.1 <relnotes/25.1.1>
25.1.0 <relnotes/25.1.0>
25.0.3 <relnotes/25.0.3>
25.0.2 <relnotes/25.0.2>
25.0.1 <relnotes/25.0.1>

View File

@@ -1,256 +0,0 @@
Mesa 25.0.4 Release Notes / 2025-04-17
======================================
Mesa 25.0.4 is a bug fix release which fixes bugs found since the 25.0.3 release.
Mesa 25.0.4 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.0.4 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: 76293cf4372ca4e4e73fd6c36c567b917b608a4db9d11bd2e33068199a7df04d mesa-25.0.4.tar.xz
SHA512: 562a97bd0374ff2a76f71c848df4fe542f1fc66c420a9101eb4bb1947d00eee4417d9c6f2d1be19638663753785c19384f8a6dc078c3187448ab79413d906152 mesa-25.0.4.tar.xz
New features
------------
- None
Bug fixes
---------
- RADV: Performance regression in Elden Ring on GFX8/Polaris
- RADV: Performance regression in Elden Ring on GFX8/Polaris
- Confidential issue #12324
- Confidential issue #12946
- The Last of Us Part I GPU hang on gfx1201
- brw: new Xe2 CTS failures
- [NVK] NAK assert in The Last of Us Part 2 shader
- [ANV][LNL] - Lost Records: Bloom & Rage (1902960) - Title hangs on launch and subsequently crashes to desktop.
- [BMG] Intel b580 battlemage: Fort Solis (Unreal Engine game) boots to menu, hangs while loading after hitting continue from the main menu
- [ANV][LNL] - NINJA GAIDEN 2 Black (3287520) - Environment assets are incorrectly rendered or missing.
- [ANV][LNL] - The Headliners (3059070) - Title hangs a few minutes after launch.
- anv, regression: Invisibly blinking cliffs & rocks in Satisfactory DX12 on BMG
- vk/overlay: output_file option failing
- [bisected, LNL] brw: 341e5117ecbc ("brw/nir: Treat load_const as convergent") regresses arb_gpu_shader5-interpolateAtOffset on LNL
- vulkan regression mesa 24.3.4 to 25.0.0.rc3 with broadcom
- radv: nir_opt_varyings.c:2766: deduplicate_outputs: Assertion \`list_index == 0' failed.
- vulkan/wsi: memory leak from wsi_CreateSwapchainKHR
Changes
-------
Aaron Ruby (2):
- gfxstream: Make the virtgpu device discovery for LinuxVirtGpu more robust
- gfxstream: Add common interfaces in the VirtGpuDevice to query DrmInfo and PciBusInfo
Alyssa Rosenzweig (4):
- nir/lower_blend: refactor logicop variables
- nir/lower_blend: disable logic ops for unsupported formats
- panfrost: invert and rename no_ubo_to_push flag
- panfrost: do not push "true" UBOs
Benjamin Lee (2):
- panvk/csf: fix uninitialized read in utrace_clone_init_builder
- panfrost/pps: fix omitting several counters
Benjamin Otte (1):
- lavapipe: Don't advertise support for multiplane drm formats
Boris Brezillon (2):
- vulkan/state: Fix input attachment map state initialization/copy
- vk/pass: Add input attachment location info
Caio Oliveira (1):
- nir/load_store_vectorize: Skip new bit-sizes that are unaligned with high_offset
Caterina Shablia (2):
- panfrost: don't overwrite push uniforms and sysvals UBO with user's UBO
- panfrost: update nr_uniform_buffers before dispatching XFB
Connor Abbott (1):
- tu: Fix layer_count with dynamic rendering + multiview
David Rosca (4):
- radeonsi/vcn: Disable AV1 unidir compound with rate control
- radv/video: Fix msg header total size
- radv/video: Fix encode session info for VCN3+
- radeonsi/vpe: Use float division to get scaling ratio
Eric Engestrom (7):
- docs: add sha sum for 25.0.3
- [25.0 only] update more ci expectations
- .pick_status.json: Update to 7c5389695bdf106acaab6ccc69535f25c1d7a8e6
- ci: rename ci-tron priority tag to avoid conflict with the generic fdo runners
- .pick_status.json: Update to 2f00daf67a7990da68dfc4a8e5f2019daecb7a59
- .pick_status.json: Update to 58321cf2e57279079bf742be1063ac2900ea2436
- .pick_status.json: Update to 555821ff93118d4a6ea441127cd0427a95743d47
Eric R. Smith (2):
- panfrost,lima: use index size in panfrost minmax_cache
- panfrost: fix transaction elimination crc valid calculation
Erik Faye-Lund (4):
- panfrost: fixup typo in 16x sample-pattern
- nir/lower_tex: use texture_mask instead of shifting on use
- panvk: set shared_addr_format
- panvk: claim official conformance on v10
Faith Ekstrand (3):
- nak: Allow predicates in nir_intrinsic_as_uniform
- nvk/nvkmd: Check the correct flag for the Kepler GART workaround
- nil: Multiply by array_stride_B instead of adding
Felix DeGrood (1):
- vk/overlay-layer: fix regression in non-control pathway
Georg Lehmann (2):
- spirv: clamp/sign-extend non 32bit ldexp exponents
- spirv: fix cooperative matrix by value function params
Gurchetan Singh (3):
- gfxstream: check device exists before using it
- gfxstream: refactor device initialization
- gfxstream: follow the semantics desired by distro VK loader
Ian Romanick (4):
- brw/algebraic: Constant folding for BROADCAST and SHUFFLE
- brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset
- brw/algebraic: Optimize derivative of convergent value
- brw/nir: Use offset() for all uses of offs in emit_pixel_interpolater_alu_at_offset
Jan Alexander Steffens (heftig) (1):
- gfxstream: Use proper log format for 32-bit Vulkan
Job Noorman (1):
- ir3/ra: assign interval offsets to new defs after shared RA
Jose Maria Casanova Crespo (1):
- v3dv: avoid TFU reading unmapped pages beyond the end of the buffers
Juan A. Suarez Romero (1):
- v3dv: don't check if DRM device is master
Kenneth Graunke (4):
- brw: Track the largest VGRF size in liveness analysis
- brw: Use live->max_vgrf_size in register coalescing
- brw: Use live->max_vgrf_size in pre-RA scheduling
- brw: Don't assert about MAX_VGRF_SIZE in brw_opt_split_virtual_grfs()
Lars-Ivar Hesselberg Simonsen (2):
- panvk: Add barrier for interleaved ZS copy cmds
- vk/sync: Fix execution only barriers
Lionel Landwerlin (3):
- brw: fix shuffle with scalar/uniform index
- anv: fix self dependency computation
- brw: fix Wa_22013689345 emission
Marek Olšák (5):
- radeonsi: work around a primitive restart bug on gfx10-10.3
- radeonsi: make si_shader_selector::main_shader_part_* an iterable union
- radeonsi: add ACO-specific main shader parts
- ac/surface: make gfx12_estimate_size reusable by gfx6
- ac/surface: select 3D tile mode without overallocating too much for gfx6-8
Mike Blumenkrantz (4):
- gallium/util: check nr_samples in pipe_surface_equal()
- tu: check for valid descriptor set when binding descriptors
- zink: don't set shared block stride without KHR_workgroup_memory_explicit_layout
- zink: stop setting ArrayStride on image arrays
Natalie Vock (1):
- aco: Make private_segment_buffer/scratch_offset per-resume
Patrick Lerda (9):
- r600: move stores to the end of shader when required
- r600: fix textures with swizzles limited to zero and one
- r600: fallback to util_blitter_draw_rectangle when required
- r600: fix pa_su_vtx_cntl rounding mode
- r600: fix points clipping
- i915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redundancies
- i915: fix slab_create() related memory leaks
- i915: fix nir_to_tgsi() related memory leak
- i915: fix draw_create_fragment_shader() related memory leak
Pierre-Eric Pelloux-Prayer (1):
- winsys/amdgpu: disable VM_ALWAYS_VALID
Rob Clark (1):
- tu/vdrm: Fix userspace fence cmds
Ryan Mckeever (1):
- pan/format: Update format flags to follow HW spec
Samuel Pitoiset (4):
- radv: fix ignoring conditional rendering with vkCmdResolveImage()
- radv: determine if HiZ/HiS is enabled earlier on GFX12
- radv: add a workaround for buggy HiZ/HiS on GFX12
- radv: apply the workaround for buggy HiZ/HiS on GFX12 for DGC
Sviatoslav Peleshko (1):
- vulkan/wsi/headless: Remove unnecessary wsi_configure_image()
Tapani Pälli (3):
- compiler/glsl: check that bias is not used outside fragment stage
- mesa: clamp texbuf query size to MAX_TEXTURE_BUFFER_SIZE
- mesa: various fixes for ClearTexImage/ClearTexSubImage
Timothy Arceri (1):
- glsl: fix regression in ubo cloning
Timur Kristóf (4):
- nir/xfb: Preserve some xfb information when gathering from intrinsics.
- nir/opt_varyings: Fix assertion when deduplicating TCS outputs.
- radv: Use buffers_written mask when gathering XFB info.
- radv: Call nir_opt_undef too after nir_opt_varyings.

4109
docs/relnotes/25.1.0.rst Normal file

File diff suppressed because it is too large Load Diff

213
docs/relnotes/25.1.1.rst Normal file
View File

@@ -0,0 +1,213 @@
Mesa 25.1.1 Release Notes / 2025-05-21
======================================
Mesa 25.1.1 is a bug fix release which fixes bugs found since the 25.1.0 release.
Mesa 25.1.1 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.1.1 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
SHA256: cf942a18b7b9e9b88524dcbf0b31fed3cde18e6d52b3375b0ab6587a14415bce mesa-25.1.1.tar.xz
SHA512: 8000fec61da3b7c0355b74458c52f8faeb562398a1882d68cd31a253848edd3333072521ec52f8c5c1a62d909afd6667803d43cb54027d0af3d944f1add27aae mesa-25.1.1.tar.xz
New features
------------
- None
Bug fixes
---------
- radv: VK_EXT_primitive_topology_list_restart bug
- [RADV][GFX9] Recent Mesa-git broken on AMD Vega 64 with ring sdma0 timeouts when launching DXVK games
- ACO: IR Validation error "SDWA operand selection size" triggered by compute shader on VEGA20
- RADV: Gibberish output with llama.cpp (Vulkan compute) on Radeon VII (Vega20) with Mesa 25.1.0, works on 25.0.5
- Blending broken in game SkinDeep
- Radeon R5 (Mullins) H264 VA-API encoding acceleration doesn't work
- nvk: lib_rs_gen.py requires \`rustfmt`
- radv: vkd3d-proton test failure with predication + EXT_dgc
- mesa-25.0.4 aborts Xserver due to ACO "Unsupported opcode" v_lshlrev_b16
- In SkinDeep, GL_LINES causes GL_INVALID_OPERATION with radeonsi and llvmpipe
- radv: UB and artifacts when copying a \`COMBINED_IMAGE_SAMPLER` with an immutable sampler
- RADV: Dynamic state multiple viewport corruption
- [drm:amdgpu_uvd_cs_pass2 [amdgpu]] \*ERROR* )Handle 0x48780001 already in use!
- glGetInternalformativ returns incorrect information for GL_STENCIL_INDEX8
- RadeonSI: Psychonauts rendering regression since !29895
- [r600g] Rejected CS when using dolphin's GPU texture decoder
- radeonsi: Assertion \`src_bit_size == bit_size' failed. when running without MESA_GLSL_DISABLE_IO_OPT=1
- radeonsi vdpau + Packed YUY2 = assert
- Indiana Jones and The Great Circle, Graphical corruption on 9070 XT.
- glPushAttrib/glPopAttrib broken with glColorMaterial and ligthing
Changes
-------
Alessandro Astone (1):
- android: Link with libc++fs up to SDK 35
Dave Airlie (1):
- nvk: Fix compute class comparison in dispatch indirect
David Rosca (6):
- frontends/vdpau: Fix creating surfaces with 422 chroma
- ac/uvd: Add ac_uvd_alloc_stream_handle
- radv/video: Use ac_uvd_alloc_stream_handle
- radeonsi/vce: Fix bitstream buffer size
- radeonsi/vce: Only send one task per IB
- radeonsi/vce: Fix output quality and performance in speed preset
Dmitry Baryshkov (1):
- rusticl/device: relax some params for embdded profile
Ella Stanforth (1):
- v3d/compiler: Fix ub when using memcmp for texture comparisons.
Eric Engestrom (2):
- docs: add sha sum for 25.1.0
- .pick_status.json: Update to 8edee1e25b62aa0a60dfa060f68c35cf4e60f59e
Georg Lehmann (2):
- radeonsi: always lower alu bit sizes
- aco: assume sram ecc is enabled on Vega20
Gurchetan Singh (1):
- gfxstream: make sure by default descriptor is negative
Hans-Kristian Arntzen (1):
- radv: Consider that DGC might need shader reads of predicated data.
José Roberto de Souza (2):
- anv: Implement missing part of Wa_1604061319
- anv: Enable preemption due 3DPRIMITIVE in GFX 12
Lars-Ivar Hesselberg Simonsen (7):
- pan/texture: Correctly handle slice stride for MSAA
- pan/texture: Set plane size to slice size
- pan/genxml/v10: Add minus1 mod for plane width/height
- pan/genxml/v12: Add minus1 mod for plane width/height
- pan/genxml/v13: Add minus1 mod for plane width/height
- pan/texture/v10+: Set width/height in the plane descs
- panvk/v9+: Set up limited texture descs for storage use
Lionel Landwerlin (3):
- brw: fix brw_nir_move_interpolation_to_top
- vulkan/runtime: fixup assert with link_geom_stages
- anv: enable preemption setting on command/batch correctly
Marek Olšák (2):
- nir/opt_vectorize_io: fix a failure when vectorizing different bit sizes
- nir: fix gathering color interp modes in nir_lower_color_inputs
Mary Guillemard (2):
- pan/bi: Flush subnormals to zero for FROUND on v11+
- pan/bi: Lower ffract in bifrost_nir_algebraic on v11+
Matt Turner (1):
- gallivm: Use \`llvm.roundeven` in lp_build_round()
Matthieu Oechslin (1):
- r600: Take dual source blending in account when creating target mask with RATs
Mel Henning (2):
- nouveau/headers: Run rustfmt after file is closed
- nouveau/headers: Ignore PermissionError in rustfmt
Mike Blumenkrantz (1):
- zink: fix broken comparison for dummy pipe surface sizing
Natalie Vock (2):
- radv,driconf: Add radv_force_64k_sparse_alignment config
- driconf: Add workarounds for DOOM: The Dark Ages
Olivia Lee (2):
- panvk: fix driconf memory leak
- util/u_printf: fix memory leak in u_printf_singleton_add_serialized
Rhys Perry (3):
- ac/llvm: correctly split vector 8/16-bit stores
- ac/llvm: correctly set alignment of vector global load/store
- aco/gfx115: consider point sample acceleration
Rob Clark (2):
- freedreno/ir3: Fix tess/geom asan error
- freedreno: Fix shader-clock when kernel exposes UCHE_TRAP_BASE
Robert Mader (1):
- llvmpipe: Fix dmabuf import paths for DRM_FORMAT_YUYV variants
Sagar Ghuge (1):
- anv: Fix untyped data port cache pipe control dump output
Samuel Pitoiset (9):
- radv: ignore radv_disable_dcc_stores on GFX12
- radv: ignore conditional rendering with vkCmdTraceRays*
- radv: fix SDMA copies for linear 96-bits formats
- radv: fix emitting dynamic viewports/scissors when the count is static
- radv: remove the optimization for equal immutable samplers
- radv: fix fetching conditional rendering state for DGC preprocess
- radv: fix conditional rendering with DGC and non native 32-bit predicate
- radv: fix missing texel scale for unaligned linear SDMA copies
- radv: fix non-indexed draws with primitive restart enable
Tapani Pälli (3):
- mesa: add missing stencil formats to _mesa_is_stencil_format
- intel/compiler: provide a helper for null any-hit shader
- anv: use internal rt-null-ahs when any_hit is null
Thomas H.P. Andersen (1):
- driconf: update X4 Foundations executable name
Timothy Arceri (6):
- mesa: fix color material tracking
- mesa: relax EXT_texture_integer validation
- st/mesa: fix _IntegerBuffers bitfield use
- mesa/st: fix _BlendForceAlphaToOneDraw bitfield use
- mesa/st: fix _IsRGBDraw bitfield use
- mesa: fix _FP32Buffers bitfield use
llyyr (1):
- vulkan/wsi/wayland: make needs_color_surface_old check if surface exists

268
docs/relnotes/25.1.2.rst Normal file
View File

@@ -0,0 +1,268 @@
Mesa 25.1.2 Release Notes / 2025-06-04
======================================
Mesa 25.1.2 is a bug fix release which fixes bugs found since the 25.1.1 release.
Mesa 25.1.2 implements the OpenGL 4.6 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
4.6 is **only** available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
Mesa 25.1.2 implements the Vulkan 1.4 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
SHA checksums
-------------
::
TBD.
New features
------------
- None
Bug fixes
---------
- Confidential issue #13281
- anv, regression: Missing terrain in It Takes Two on BMG
- "breaking-limit" benchmark will Freeze before starting.
- rusticl: CL_MEM_HOST_READ_ONLY cl_image2d reads zeroes from host on AMD Vega8
- Bug (bad code optimization?) in the GLSL (compute) shader compiler
- nvk: Broken lighting in Trine 5
- RX9070 hard crash with Mafia Definitive Edition
- RADV: Potential bug with vulkan fragment shader interpolation (on outputs from mesh shaders?)
- In the game "Foundation" a buildings areas of effect is missing
- ANV: Dota 2 May 22 2025 update crashing in vkCmdBindDescriptorSets with no validation error
- Vulkan Video engages during playback of format which is not supported by my Fiji GPU
- Weston hangs on virtio (non-accelerated version) on QEMU with Mesa main
- KVM/qemu: GDM fails to start / gnome-shell crashes after update to mesa-dri-drivers-25.0.3
Changes
-------
Adam Jackson (2):
- vtn: (Silently) handle FunctionParameterAttributeNo{Capture,Write}
- vtn/opencl: Handle OpenCLstd_F{Min,Max}_common
Calder Young (2):
- iris: Fix accidental writes to global dirty bit instead of local
- iris: set dependency between SF_CL and CC states
Christian Gmeiner (1):
- zink: Fix NIR validation error in cubemap-to-array lowering
Connor Abbott (1):
- tu: Use safe-const GS variant for VPC binning state
David Rosca (4):
- radv/video: Limit 10bit H265 decode support to stoney and newer
- frontends/va: Fix H264 top/bottom is reference flags
- radeonsi/vcn: Use picture fence in JPEG decode
- radv/video: Set correct minCodedExtent for encode
Dmitry Baryshkov (2):
- meson: stop building XA by default
- freedreno: replace fixed array for globabl_bindings with dynamic array
Eric Engestrom (4):
- docs: add sha sum for 25.1.1
- .pick_status.json: Update to 57b04e8dfda9b09fb018907ae921f3ebbc68ad3a
- .pick_status.json: Mark 09e713f46be03ec22c9f9d592c2a435e9afca3f3 as denominated
- .pick_status.json: Mark f0dde6ca7f64a25bc541b9437dc9de6fc59761a5 as denominated
Eric R. Smith (1):
- panfrost, panvk: fix G31 use of SHADER_MODE_EARLY_ZS_ALWAYS
Erik Faye-Lund (2):
- mesa/main: remove non-existing function prototype
- panfrost: do not try to use 4x4 tiles on v4 gpus
Faith Ekstrand (4):
- nvk: Allocate the correct VAB size on Kepler
- nouveau/mme: Don't install the HW tests
- nvk: Only allow importing mappable dma-bufs to HOST_VISIBLE types
- vulkan/pipeline: Hash null descriptor robustness info
Georg Lehmann (3):
- aco: clamp exponent of 16bit ldexp
- nir/opt_if: don't replace constant uses with other uniform values
- nir/opt_if: limit rewrite_uniform_uses iand recursion
Gurchetan Singh (1):
- gfxstream: get rid of logspam in virtualized case
Iago Toral Quiroga (1):
- broadcom/compiler: handle moving last ubo load in the block correctly
Jonathan Gray (1):
- vulkan: add missing include for FALLTHROUGH
Jordan Justen (2):
- intel/dev: Add BMG PCI IDs 0xe220-0xe223
- intel/dev: Add PTL PCI IDs 0xb084-0xb087
Juan A. Suarez Romero (2):
- v3d,v3dv: set max supertiles to 256
- v3dv: consider render area when configuring supertiles
Karol Herbst (6):
- nir: fix use-after-free on function parameter names
- vtn: fix use-after-free on function parameter names
- zink: set unordered_read/write after buffer_barrier in set_global_binding
- rusticl/kernel: rework validation in clSetKernelExecInfo
- rusticl/kernel: implement CL_INVALID_ARG_VALUE for image args in clSetKernelArg
- rusticl/memory: properly set pipe_image_view::access
Lars-Ivar Hesselberg Simonsen (4):
- panvk/v10+: Remove unnecessary alloc in dispatch_precomp
- panvk/v10+: Limit direct dispatch WLS allocation
- panvk/jm: Apply direct dispatch WLS instance limit
- panfrost: Apply direct dispatch WLS instance limit
LingMan (1):
- entaviv/isa: Silence warnings about non snake case names
Lionel Landwerlin (5):
- anv/brw: stop turning load_push_constants into load_uniform
- hasvk/elk: stop turning load_push_constants into load_uniform
- anv: don't use pipeline layout at descriptor bind
- brw: don't generate invalid instructions
- brw: fix brw_nir_fs_needs_null_rt helper
Marek Olšák (2):
- winsys/amdgpu: fix running out of 32bit address space with high FPS
- glsl: fix sampler and image type checking in lower_precision
Mary Guillemard (2):
- pan/genxml: Fix typo for NEXT_SB_ENTRY
- pan/bi: Stop writing pan_shader_info::vs::idvs on non VS stages
Mauro Rossi (4):
- android: fix llvmpipe build rules
- llvmpipe: Define LP_NIR_SHADER_DUMP_DIR differently on Android
- llvmpipe: Use mkdir instead of std::filesystem::create_directory on Android
- Revert "android: Link with libc++fs up to SDK 35"
Maíra Canal (1):
- v3d: make sure all jobs are done before destroying the context
Mel Henning (5):
- nak: Fix a perf regression in tex lowering
- nak/spill_values: Follow phis from src to dest
- nvk: Call ensure_slm for nvk_cmd_dispatch_shader
- nak: Forbid reordering labeled OpNop
- nak: Don't swap f2fp sources in legalize
Mike Blumenkrantz (8):
- llvmpipe: disable conditional rendering mem for blits
- lavapipe: handle counterOffset in vkCmdDrawIndirectByteCountEXT
- tc: fix detection of in-flight resource usage when sync is used
- zink: also check for host-visible on staging uploads
- zink: fix queue transition check in check_for_layout_update()
- d3d10umd: stop using pipe_surface::width/height
- zink: unlock instance mutex if creation fails
- lavapipe: undo fb remapping before poisoning memory at end of renderpass
Natalie Vock (1):
- radv/rt: Report 256 byte alignment for scratch
Olivia Lee (9):
- pan/csf: add cs_maybe mechanism to retroactively patch cs contents
- pan/csf: rename cs_exception_handler to cs_function
- panvk/csf: set up shared register dump regions for cs functions
- panvk: track whether we are in a vk_meta command
- panvk: fix case where vk_meta is used after PROVOKING_VERTEX_MODE_LAST
- panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST
- panvk/csf: fix provoking vertex mode in partial secondary cmdbufs
- panfrost: fix assertion failure compiling image conversion shaders
- panfrost: legalize afbc before zs and rt clears
Patrick Lerda (1):
- r600: fix pop-free clipping
Paulo Zanoni (2):
- anv/trtt: don't avoid the TR-TT submission when there is stuff to signal
- intel/isl: don't clamp num_elements to (1 << 27)
Qiang Yu (1):
- nir/opt_varyings: fix mesh shader miss promote varying to flat
Rhys Perry (1):
- nir: fix unpack_unorm_2x16/unpack_snorm_2x16 constant folding
Rob Clark (1):
- ci: Disable fd-farm
Robert Mader (2):
- egl: Remove check for GL or GLES
- egl: Fixes for eglQueryContext and RESET_NOTIFICATION_STRATEGY
Samuel Pitoiset (4):
- radv: fix capture/replay with sparse images and descriptor buffer
- radv: add radv_disable_hiz_his_gfx12 and enable for Mafia Definitive Edition
- radv,radeonsi: emit UPDATE_DB_SUMMARIZER_TIMEOUT on GFX12
- radv: set radv_zero_vram=true for GPUScore: Breaking limit
Sviatoslav Peleshko (1):
- intel/brw: Use correct instruction for value change check when coalescing
Timothy Arceri (3):
- mesa: update validation when draw buffer changes
- mesa: extend linear_as_nearest work around
- util: add workaround for the game Foundation
Yao Zi (1):
- radeonsi: Fix violation of aliasing rules in radeon_ws_bo_reference
Yiwei Zhang (3):
- kopper: Revert "kopper: Explicitly choose zink"
- panvk: fix memory binding for wsi image alias
- vulkan/wsi: include missing barrier for transferring to blit dst image

View File

@@ -1,22 +0,0 @@
removed clover frontend
VK_EXT_vertex_input_dynamic_state/vertexInputDynamicState on panvk
pushDescriptor on panvk
VK_EXT_vertex_input_dynamic_state on panvk
VK_EXT_vertex_attribute_divisor on panvk
supportsNonZeroFirstInstance on panvk
GL_ARB_blend_func_extended on v3d
dualSrcBlend on v3dv
VK_KHR_maintenance4 on panvk/v10+
VK_KHR_maintenance5 on panvk/v10+
VK_EXT_direct_mode_display on panvk
VK_EXT_extended_dynamic_state[2] on panvk
Vulkan 1.2 on panvk/v10+
VK_KHR_shader_quad_control on panvk/v10+
multiDrawIndirect on panvk/v10+
VK_KHR_draw_indirect_count on panvk/v10+
VK_KHR_shader_integer_dot_product on panvk
VK_KHR_shader_terminate_invocation on panvk
VK_EXT_shader_demote_to_helper_invocation on panvk
VK_EXT_shader_replicated_composites on panvk
VK_EXT_depth_bias_control on panvk
VK_KHR_shader_bfloat16 on anv/gfx125+

View File

@@ -132,6 +132,7 @@ each directory.
- **frontends** - These implement various libraries using the
device drivers
- **clover** - OpenCL frontend
- **d3d10umd** - D3D10 frontend for Windows only. It's similar to Microsoft WARP, but using LLVMpipe/Softpipe.
- **dri** - Meta frontend for DRI drivers, see mesa/state_tracker
- **glx** - Meta frontend for GLX

View File

@@ -413,7 +413,7 @@ Our documentation is written as `reStructuredText`_ files in the
.. code-block:: sh
# Install dependencies (adapt for your distribution)
# Install dependencies (adapt for your distro)
apk add coreutils graphviz py3-clang clang-dev musl-dev linux-headers
pip3 install sphinx===5.1.1 mako===1.2.3 hawkmoth===0.16.0

View File

@@ -502,12 +502,6 @@ struct drm_amdgpu_userq_fence_info {
};
struct drm_amdgpu_userq_wait {
/**
* @waitq_id: Queue handle used by the userq wait IOCTL to retrieve the
* wait queue and maintain the fence driver references in it.
*/
__u32 waitq_id;
__u32 pad;
/**
* @syncobj_handles: The list of syncobj handles submitted by the user queue
* job to get the va/value pairs.
@@ -1460,9 +1454,6 @@ struct drm_amdgpu_info_device {
__u32 csa_size;
/* context save area base virtual alignment for gfx11 */
__u32 csa_alignment;
/* Userq IP mask (1 << AMDGPU_HW_IP_*) */
__u32 userq_ip_mask;
__u32 pad;
};
struct drm_amdgpu_info_hw_ip {

View File

@@ -89,7 +89,7 @@ if with_gallium_st_nine
subdir : 'd3dadapter',
)
endif
opencl_headers = files(
'CL/cl.h',
'CL/cl.hpp',
@@ -113,3 +113,11 @@ opencl_headers = files(
'CL/opencl.h',
'CL/opencl.hpp',
)
# Only install the headers if we are building a stand alone implementation and
# not an ICD enabled implementation
if with_gallium_clover and not with_opencl_icd
install_headers(
opencl_headers,
subdir: 'CL'
)
endif

View File

@@ -282,11 +282,19 @@ CHIPSET(0xe211, bmg, "BMG G21", "Intel(R) Graphics")
CHIPSET(0xe212, bmg, "BMG G21", "Intel(R) Graphics")
CHIPSET(0xe215, bmg, "BMG", "Intel(R) Graphics")
CHIPSET(0xe216, bmg, "BMG", "Intel(R) Graphics")
CHIPSET(0xe220, bmg, "BMG", "Intel(R) Graphics")
CHIPSET(0xe221, bmg, "BMG", "Intel(R) Graphics")
CHIPSET(0xe222, bmg, "BMG", "Intel(R) Graphics")
CHIPSET(0xe223, bmg, "BMG", "Intel(R) Graphics")
CHIPSET(0xb080, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb081, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb082, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb083, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb084, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb085, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb086, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb087, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb08f, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb090, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)
CHIPSET(0xb0a0, ptl, "PTL", "Intel(R) Graphics", FORCE_PROBE)

View File

@@ -743,7 +743,24 @@ if get_option('vmware-mks-stats')
pre_args += '-DVMX86_STATS=1'
endif
_opencl = get_option('gallium-opencl')
_rtti = get_option('cpp_rtti')
if _opencl != 'disabled'
warning('Clover will be removed in Mesa 25.2')
if not with_gallium
error('OpenCL Clover implementation requires at least one gallium driver.')
endif
if not _rtti
error('The Clover OpenCL state tracker requires rtti')
endif
with_gallium_clover = true
with_opencl_icd = _opencl == 'icd'
else
with_gallium_clover = false
with_opencl_icd = false
endif
with_gallium_rusticl = get_option('gallium-rusticl')
if with_gallium_rusticl
@@ -812,7 +829,7 @@ else
endif
dep_clc = null_dep
if with_clc
if with_gallium_clover or with_clc
dep_clc = dependency('libclc')
endif
@@ -1699,6 +1716,15 @@ if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
llvm_modules += 'asmparser'
endif
endif
if with_gallium_clover
llvm_modules += [
'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
'lto', 'option', 'objcarcopts', 'profiledata'
]
# all-targets is needed to support static linking LLVM build with multiple targets
# windowsdriver is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
llvm_optional_modules += ['all-targets', 'frontendopenmp', 'windowsdriver']
endif
if with_clc
llvm_modules += ['coverage', 'target', 'linker', 'irreader', 'option', 'libdriver', 'lto']
# all-targets is needed to support static linking LLVM build with multiple targets.
@@ -1724,6 +1750,8 @@ if with_amd_vk or with_gallium_radeonsi
_llvm_version = '>= 18.0.0'
elif with_clc or llvm_with_orcjit
_llvm_version = '>= 15.0.0'
elif with_gallium_clover
_llvm_version = '>= 11.0.0'
else
_llvm_version = '>= 5.0.0'
endif
@@ -1743,7 +1771,7 @@ if _llvm.allowed()
modules : llvm_modules,
optional_modules : llvm_optional_modules,
required : (
with_amd_vk or with_gallium_radeonsi or with_clc
with_amd_vk or with_gallium_radeonsi or with_gallium_clover or with_clc
or _llvm.enabled()
),
static : not _shared_llvm,
@@ -1797,6 +1825,8 @@ elif with_swrast_vk
error('lavapipe requires LLVM and is enabled, but LLVM is disabled.')
elif with_any_llvmpipe
error('llvmpipe requires LLVM and is enabled, but LLVM is disabled.')
elif with_gallium_clover
error('The OpenCL "Clover" state tracker requires LLVM, but LLVM is disabled.')
elif with_clc
error('The CLC compiler requires LLVM, but LLVM is disabled.')
else
@@ -1846,7 +1876,7 @@ if dep_spirv_tools.found()
endif
dep_clang = null_dep
if with_clc
if with_clc or with_gallium_clover
llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
@@ -1861,7 +1891,7 @@ if with_clc
if dep_llvm.version().version_compare('>= 15.0')
clang_modules += 'clangSupport'
endif
if dep_llvm.version().version_compare('>= 16.0')
if dep_llvm.version().version_compare('>= 16.0') or with_gallium_clover
clang_modules += 'clangASTMatchers'
endif
if dep_llvm.version().version_compare('>= 18.0')
@@ -2384,6 +2414,9 @@ if with_gallium
if with_gallium_st_nine
gallium_frontends += 'nine'
endif
if with_gallium_clover
gallium_frontends += 'clover'
endif
if with_gallium_rusticl
gallium_frontends += 'rusticl'
endif

View File

@@ -127,6 +127,7 @@ option(
option(
'gallium-xa',
type : 'feature',
value : 'disabled',
description : 'enable gallium xa frontend.',
deprecated: true,
)
@@ -146,6 +147,15 @@ option(
description : 'build gallium D3D10 WDDM UMD frontend.',
)
option(
'gallium-opencl',
type : 'combo',
choices : ['icd', 'standalone', 'disabled'],
value : 'disabled',
description : 'build gallium "clover" OpenCL frontend.',
deprecated: true,
)
option(
'gallium-rusticl',
type : 'boolean',
@@ -156,7 +166,7 @@ option(
option(
'gallium-rusticl-enable-drivers',
type : 'array',
value : ['auto', 'asahi', 'radeonsi'],
value : ['auto', 'asahi'],
description : 'List of gallium drivers for which rusticl will be enabled ' +
'by default',
)
@@ -572,8 +582,8 @@ option(
type : 'integer',
min : 25,
max : 10000,
value : 34,
description : 'Android Platform SDK version. Default: Android14 version.'
value : 25,
description : 'Android Platform SDK version. Default: Nougat version.'
)
option(

Some files were not shown because too many files have changed in this diff Show More