Compare commits

...

3784 Commits

Author SHA1 Message Date
Faith Ekstrand
f3ba1e24b2 egl/wayland: Refuse to initialize Zink+DRM
Trying to use Zink with the DRM winsys is problematic at best.  In
theory all the pieces should be there but there are bugs around
synchronization, etc.  This copies the current behavior of X11 which
also refuses to initialize DRM on Zink.

This is particularly important for Nouveau users which are getting Zink
via the loader returning "zink" for get_driver_for_fd().  On Wayland
today, we go ahead and load zink and attempt to use the DRM EGL paths,
which are broken.  On X11, it fails to load the driver and then the EGL
device initialization code re-tries with zink which succeeds.  Because
the second try is using Zink from the start, it's equivalent to if the
user had set MESA_LOADER_DRIVER_OVERRIDE=zink and they get the kopper
path, which is more reliable.

This absolutely not what we want because it means we don't load the
driver the loader requested and are dependent on fallback paths to get a
driver loaded at all.  However, the real solution in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36014
is too complex to backport.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13498
Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36119>
2025-07-15 11:28:03 -04:00
Jose Maria Casanova Crespo
a81d0efaaa v3d: Fix depth resource invalidation with separate_stencil
If there is a separate stencil in use, the resource invalidation
flag was not being removed for the depth buffer as rsc was assigned
to the separate stencil.

Fixes: 6ff509593c ("v3d: Only apply TLB load invalidation on first job after FB state update")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36030>
(cherry picked from commit 7d51a10cda)
2025-07-15 17:23:59 +02:00
Mel Henning
5d16bd56d9 nouveau/headers: Stop running rustfmt
rustfmt would change not only lib.rs, which is output by this script,
but also all of the other files in the library. The problem is, those
other files are inputs to lib_rs_gen so the script was changing its own
inputs which meant ninja needed to be run twice before we reached a
fixed point. Remove rustfmt for now to prevent this issue.

Fixes: 591b5da4 ("nouveau/headers: Run rustfmt on generated files")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36121>
(cherry picked from commit 9b275cdbcc)
2025-07-15 17:23:59 +02:00
Olivia Lee
9e600d2c64 pan/shared: fix typo in pan_tiling doc comments
Fixes: 944049dedc ("panfrost: Document arguments to tiling routines")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36102>
(cherry picked from commit a59e3c6a8b)
2025-07-15 17:23:59 +02:00
Jordan Justen
38610fa518 intel/dev: Enable PTL PCI IDs (without INTEL_FORCE_PROBE)
Tested with:

commit 3a252ff9d8b6dc22b20463bfcb31a4e8992b0e8f
Merge: 9800bf6fae3b 11895f375939
Author: Simona Vetter <simona.vetter@ffwll.ch>
Date:   Fri Jul 11 11:25:34 2025 +0200

Backport-to: 25.1
Ref: drm/drm-next 3a252ff9d8b6dc22b20463bfcb31a4e8992b0e8f
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31893>
(cherry picked from commit 6dee0c3dae)
2025-07-15 17:23:59 +02:00
Jordan Justen
dafd704ac6 anv: Set Xe3 as supported
Backport-to: 25.1
Ref: 16a835ed3d ("anv: Drop "not yet supported" warning for Xe2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31893>
(cherry picked from commit f19e2e69e9)
2025-07-15 17:23:59 +02:00
Faith Ekstrand
62d2825f11 loader: Report DRI_PRIME errors earlier
This needs devices[] in order to print an appropriate message but we
free it right after the loop.  Instead, print the error right away and
make the error case after the free just handle jumping to err.

Fixes: ea84b85887 ("loader: add DRI_PRIME_DEBUG env var")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36014>
(cherry picked from commit 9e1a1633c4)
2025-07-15 17:23:55 +02:00
Faith Ekstrand
2fb25103a5 zink/kopper: Don't recycle unused acquire semaphores
Fixes: e9f18f64b9 ("zink: also cache swapchain semaphores")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36014>
(cherry picked from commit 8d9675520f)
2025-07-15 16:19:58 +02:00
Patrick Lerda
70b193dc9b r600: fix rv770 border color
The border color of the rv770 gpu behaves the same way as
the evergreen border color. This change updates the software
accordingly.

This change is enabled for all the pre-evergreen gpus.

This change fixes 120 piglit tests. The rv770 ci is updated
as well.

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34502>
(cherry picked from commit 5bee7c0b12)
2025-07-15 16:19:58 +02:00
Patrick Lerda
ac689f19b2 r600: set never as the depth compare function when depth compare is disabled
This is the backport of 0c0b978938 "radeonsi: set NEVER as
the depth compare func if depth compare is disabled".

The function r600_tex_compare arguments are updated with the "const"
keyword.

This change fixes the test below which was broken after 0c6e56c391:
khr-gl4[5-6]/incomplete_texture_access/sampler: fail pass

Fixes: 0c6e56c391 ("mesa: (more) correctly handle incomplete depth textures")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35968>
(cherry picked from commit d9baadcfb5)
2025-07-15 16:19:58 +02:00
Samuel Pitoiset
beb1ae7603 radv/sdma: fix unaligned 96-bits copies on GFX9
On SDMA4, when the pitch isn't aligned, the width needs to be scaled
by 3 for 96-bits formats.

On SDMA5+, the pitch is aligned and the driver doesn't need to fallback
to unaligned copies.

CC: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36067>
(cherry picked from commit a51afbaff8)
2025-07-15 16:19:58 +02:00
Yiwei Zhang
9aeb5cac72 hasvk: avoid leaking private binding for aliased wsi image
This time for hasvk and is the same with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35893

Aliased wsi image has to share the same private binding with the
original wsi image for memory consistency. If the private binding
exists, it needs to be released before being overridden.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36095>
(cherry picked from commit c647c422db)
2025-07-15 16:19:58 +02:00
Mike Blumenkrantz
09e4fc7696 zink: lock harder around memory mappings
this addresses an ancient race condition where unmapping memory
in one thread at the same time memory is mapped in a different thread
could proceed without synchronization and result in the second thread
writing to unmapped memory

this was the actual cause of #12533

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36076>
(cherry picked from commit 841080ed42)
2025-07-15 16:19:58 +02:00
David Rosca
047ffcc1e4 frontends/va: Fix leaking fences in GetImage/PutImage
When we need to perform format conversion, we use temporary surface
allocated with vlVaHandleSurfaceAllocate. If the driver requires
clearing the surface on allocation, it will create a fence that
must be destroyed later.

Fixes: 0f20a3a4f1 ("frontends/va: Add surface pipe_fence for vl_compositor rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13198
Reported-by: Mariusz Białończyk <manio@skyboo.net>
Tested-by: Mariusz Białończyk <manio@skyboo.net>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36040>
(cherry picked from commit 2d6560611f)
2025-07-15 16:19:58 +02:00
Mike Blumenkrantz
1ab2d62819 zink: always create gfx shader objects with 5 descriptor layouts
these are separate shader objects

fixes VUID-vkCmdDraw*-None-08879

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
(cherry picked from commit d6e89787ed)
2025-07-15 16:19:58 +02:00
Mike Blumenkrantz
5a1ecb9c3b zink: double-check descriptor layout creation before adding to cache
this can race against the background compile thread, so ensure that
no collisions happen

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>
(cherry picked from commit 39f45f2a04)
2025-07-15 16:19:58 +02:00
Samuel Pitoiset
d1fb5f12d3 radv: fix the maximum variable descriptor count with inline uniform blocks
It must not be larger than maxInlineUniformBlockSize.

Fixes recent VKCTS
dEQP-VK.api.maintenance3_check.support_count_inline_uniform_block*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36044>
(cherry picked from commit b7f4e344bc)
2025-07-15 16:19:58 +02:00
Samuel Pitoiset
ed7d8e8b67 radv: fix indexing with variable descriptor count
The Vulkan spec says:
    "If bindingCount is zero or if this structure is not included in
     the pNext chain, the VkDescriptorBindingFlags for each descriptor
     set layout binding is considered to be zero. Otherwise, the
     descriptor set layout binding at
     VkDescriptorSetLayoutCreateInfo::pBindings[i] uses the flags in
     pBindingFlags[i]."

Fixes recent VKCTS dEQP-VK.api.maintenance3_check.*.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13503
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36044>
(cherry picked from commit 36879c4f99)
2025-07-15 16:19:58 +02:00
Qiang Yu
561f5dfb24 radeonsi: fix gfx11 ngg shader emit
Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35931>
(cherry picked from commit 09e6bc90ee)
2025-07-15 16:19:58 +02:00
Timothy Arceri
34bd7e6ecd glsl: fix reuse of deref
We can't reuse the deref or validation will get mad at us.

Fixes: 3da4b5eaa5 ("glsl: always copy bindless sampler packing constructors to a temp")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13464

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36038>
(cherry picked from commit bda89200ce)
2025-07-15 16:19:57 +02:00
Faith Ekstrand
81657e76df zink: Clean up file descriptor closing in export_dmabuf_semaphore()
First, we handle the case where GetMemoryFdKHR fails.  This is unlikely
and, if it's a Mesa driver it probably won't stomp the FD but we should
be extra careful.  Then, we can close the dma-buf file immediately after
we call drmIoctl() on it, ensuring we don't leak the dma-buf file
descriptor if drmIoctl() fails.  If ImportSemaphoreFdKHR() fails, then
we need to clean up the sync file.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36048>
(cherry picked from commit de4224a57c)
2025-07-15 16:19:57 +02:00
Charlotte Pabst
3d2cea3c27 mesa: clear program info when updating program string
The program info contains all sorts of flags concerning the compilation state of
the program, and those need to be reset when the program is going to be recompiled
when its source changes.

For example, before this change, after info.flrp_lowered got set following the
first call to glProgramStringARB, flrp lowering would not happen for any subsequent
updates to the program string, leading to compilation failures.

Signed-off-by: Charlotte Pabst <cpabst@codeweavers.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35523>
(cherry picked from commit be6b49449c)
2025-07-15 16:19:57 +02:00
Mary Guillemard
c30e7b17d8 panvk: Fix wrong reporting of subgroup size for executable properties
Fixes: 563823c9ca ("panvk: Implement vk_shader")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Caterina Shablia <caterina.shablia@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36006>
(cherry picked from commit d08a21b7a3)
2025-07-15 16:19:57 +02:00
Mary Guillemard
288610f06b pan/bi: Disallow FAU for CLPER in bi_check_fau_src
Previously this was allowing invalid forms like
"CLPER.i32.subgroup8.zero lane-id, src1" to reach bi_pack.

This fixes the assert that can be seen with
"dEQP-VK.glsl.derivate.dfdxsubgroup.*" but doesn't fix failures.

Fixes: 0acc6b564e ("pan/bi: Rework FAU lowering")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36006>
(cherry picked from commit db5ad8e3d2)
2025-07-15 16:19:57 +02:00
Mary Guillemard
cb03929a21 pan/bi: Do not allow passthrough for instructions disallowing temps
Previously we were allowing passthrough to temps without using
bi_reads_temps.

This was causing instructions like CLPER to create undefined encodings.

We now check if the instruction support temps.

Fixes: 4252fb84f4 ("pan/bi: Add passthrough register rewriting helper")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36006>
(cherry picked from commit 48d716a05f)
2025-07-15 16:19:57 +02:00
Timothy Arceri
a93ca06f28 util: add workaround for legacy OpenGL tf2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3514
Fixes: a34cc97ca3 ("glsl: when NIR linker enable use it to resize uniform arrays")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36036>
(cherry picked from commit f617b4f850)
2025-07-15 16:19:57 +02:00
Vitaliy Triang3l Kuzmin
6f10f11854 r600: Fix rectangle coordinate limits on R6xx/R7xx
R6xx/R7xx use D3D10 15.8 fixed-point coordinates rather than 16.8.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35953>
(cherry picked from commit 21136d931d)
2025-07-15 16:19:57 +02:00
Gorazd Sumkovski
878f37732f panfrost: Fix incorrect condition in assert
Since commit 8bb46de0, the correct way to check for a compute shader is
with `gl_shader_stage_is_compute()`.

Fixes: d2838f3c ("pan/bi: handle barriers with SUBGROUP scope")

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35957>
(cherry picked from commit 7bc1c456cb)
2025-07-15 16:19:57 +02:00
Mel Henning
6f0494869d egl: Clear modifiers if we clear use_flags
zink assumes that we won't pass modifiers without PIPE_BIND_SHARED

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13439
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36008>
(cherry picked from commit 295768c13e)
2025-07-15 16:19:57 +02:00
Daniel Stone
1dd1eaff75 vulkan: Remove build-system remnants of wl_drm support
We don't need to depend on the generated wl_drm files, as wl_drm support
was removed from Vulkan quite some time ago.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: e090316570 ("vulkan/wsi/wayland: drop support for wl_drm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
(cherry picked from commit 94b51503b3)
2025-07-15 16:19:57 +02:00
Yiwei Zhang
64d2cf1851 venus: allow to build vtest-only on non-DRM/KMS systems
The vtest backend doesn't require drm.

Backport-to: 25.1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13420
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36017>
(cherry picked from commit d93840dc22)
2025-07-15 16:19:57 +02:00
Caleb Callaway
2c12fffef7 anv: Increase max VBs to 33 on Gen11+
Prior to Gen 11, we had to upload a bunch of SGVs
(FirstVertex, BaseVertex, BaseInstance, DrawID) via
3DSTATE_VERTEX_BUFFERS.

For Gen11+, we upload via 3DSTATE_SGVS_2 instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35376>
(cherry picked from commit 111005066d)
2025-07-15 16:19:57 +02:00
Mike Blumenkrantz
8cd9637aec lavapipe: fix advertised depth resolve modes
only sample0 is actually supported

Fixes: 07956bbcae ("lavapipe: VK_KHR_depth_stencil_resolve support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36004>
(cherry picked from commit eed207e597)
2025-07-15 16:19:57 +02:00
Yiwei Zhang
f278cc38e6 anv: fix ANB gralloc usage query to not append display usage bits
The consumer of the Android surface may or may not be display. e.g. it
can also be a media encoder. When BufferQueue makes the allocation, it
takes the gralloc usage bits from both the client API (EGL/Vulkan) and
the consumer side.

Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
(cherry picked from commit 8f4c938c1e)
2025-07-15 16:19:56 +02:00
Yiwei Zhang
4dfc5f4145 vulkan/android: fix to not append GRALLOC_USAGE_HW_COMPOSER bit
The composer usage bit is automatically added by the surface consumer
side when the consumer is SurfaceFlinger. e.g. if the swapchain is
connected with a media encoder surface, the consumer side would append
encoder usage bit instead.

Fixes: c406d53858 ("vulkan/android: Add common vkGetSwapchainGrallocUsage{2}ANDROID")
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
(cherry picked from commit 495156079c)
2025-07-15 16:19:56 +02:00
Sviatoslav Peleshko
6af4598af4 brw/disasm: Fix Gfx11 3src-instructions dst register disassembly
The conversion from bit value to register file type is already done
by the brw_eu_inst_3src_a1_dst_reg_file in the FFC macro now, so doing it
again produced incorrect results.

Fixes: e7179232 ("intel/brw: Move encoding of Gfx11 3-src inside the inst helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13141
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35960>
(cherry picked from commit 8d22eb960b)
2025-07-15 16:19:56 +02:00
Calder Young
53e87c6b47 iris: Fix issue with conditional dispatching
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35946>
(cherry picked from commit a39779e695)
2025-07-15 16:19:56 +02:00
Mel Henning
d6ef45b48b meson: Allow unnecessary_transmutes for bindgen
Otherwise I get hundreds of "unnecessary transmute" warnings
on rustc 1.88.0

Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35874>
(cherry picked from commit b9a9f6cd53)
2025-07-15 16:19:56 +02:00
LingMan
d78e41e89c meson: Streamline silencing of warnings in bindgen generated code
Everyone was doing roughly the same.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34969>
(cherry picked from commit 3fbee8bae6)
2025-07-15 16:19:56 +02:00
Lionel Landwerlin
690b16d96c anv: do not rely on sampler objects for pipeline compilation
Descriptor set layout lifetime can be shorter than what the
implementation requires. One example is :
  * create descriptor set layout
  * create graphics pipeline library
  * destroy descriptor set layout
  * link optimize library in a final pipeline

The last step might need the descriptor set layout information again.

We've so far worked around this by taking a reference on the
descriptor set layout in the pipelines. But we forgot that descriptor
set layouts have pointers to samplers (for immutable & embedded
samplers).

We could take a reference to samplers but that sucks for various
reasons :
  - it consumes dynamic state heap space
  - it could cause issues with capture-replay placement

So instead we copy the information from the samplers that might be
needed in cases like link optimization. This includes :
  - ycbcr conversion state (used for NIR lowering)
  - embedded sampler data (to recreate the sampler)

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/35955>
(cherry picked from commit 67e452669e)
2025-07-15 16:19:56 +02:00
Lionel Landwerlin
658f29cef2 anv: rework embedded sampler hashing
Create a hashing key on all samplers so we can just copy that anywhere
we need it. That key already contains the needed parameters for
embedded samplers, so the sha1 stuff can go away.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35955>
(cherry picked from commit 98bc185376)
2025-07-15 16:19:56 +02:00
Marek Olšák
9a05d14e81 glsl: fix a possible crash in gl_nir_lower_xfb_varying
If the last block is empty, nir_block_last_instr returns NULL, which
sets the cursor to NULL, which crashes.

I think this can't crash currently because if xfb is present, there is
always at least 1 output store in the last block due to
lower_io_vars_to_temporaries, but that won't be true after we stop
calling it in a later commit.

Fixes: fa9cee4247 - glsl: implement lower_xfb_varying() as a NIR pass

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35945>
(cherry picked from commit 9083e8b984)
2025-07-15 16:19:56 +02:00
Autumn Ashton
ff45036ed7 radv: Fix handling of NULL pColorAttachmentLocations in vkCmdSetRenderingAttachmentLocations
From the Vulkan spec:
`If pColorAttachmentLocations is NULL, it is
equivalent to setting each element to its index
within the array.`

Use similar logic to what we do in
CmdSetRenderingInputAttachmentIndices to handle
this behaviour properly.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35948>
(cherry picked from commit 1ceded0c83)
2025-07-15 16:19:56 +02:00
Konstantin Seurer
9ab7bbeb5d llvmpipe: Use the correct field to decide if coroutines are used
Fixes: 92083fc ("llvmpipe: Do not use coroutines when they are unnecessary")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26282>
(cherry picked from commit d519f917e1)
2025-07-15 16:19:56 +02:00
Mike Blumenkrantz
9995630fbe zink: always insert current batch sparse semaphore into sparse wait chain
this avoids desync in the case where a batch performs multiple distinct
sparse commit operations

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35978>
(cherry picked from commit f335158cfa)
2025-07-15 16:19:56 +02:00
Patrick Lerda
2f59c310dc r600: fix emit_ssbo_store() wrmask compatibility
This issue was generating unwanted write accesses that
could overwrite previous operations.

Note: This functionality could also be tested with
nir_lower_wrmasks. This problem seems to only affect
the ssbos.

This change was tested on cypress, barts and cayman. Here are the tests fixed:
khr-gl4[3-6]/compute_shader/pipeline-pre-vs: fail pass
khr-gl4[5-6]/direct_state_access/queries_functional: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_image_load_store/advanced-cast-cs: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_image_load_store/advanced-cast-fs: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_storage_buffer_object/advanced-switchbuffers-cs: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_storage_buffer_object/advanced-switchprograms-cs: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_storage_buffer_object/basic-operations-case1-cs: fail pass
khr-gl4[3-6]/shader_storage_buffer_object/advanced-switchbuffers-cs: fail pass
khr-gl4[3-6]/shader_storage_buffer_object/advanced-switchprograms-cs: fail pass
khr-gl4[3-6]/shader_storage_buffer_object/basic-operations-case1-cs: fail pass
khr-gl4[4-6]/texture_buffer/texture_buffer_max_size: fail pass
khr-gles31/core/compute_shader/pipeline-pre-vs: fail pass
khr-gles31/core/shader_image_load_store/advanced-cast-cs: fail pass
khr-gles31/core/shader_image_load_store/advanced-cast-fs: fail pass
khr-gles31/core/shader_storage_buffer_object/advanced-switchbuffers-cs: fail pass
khr-gles31/core/shader_storage_buffer_object/advanced-switchprograms-cs: fail pass
khr-gles31/core/shader_storage_buffer_object/basic-operations-case1-cs: fail pass
khr-gles31/core/texture_buffer/texture_buffer_max_size: fail pass
khr-glesext/texture_buffer/texture_buffer_max_size: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35830>
(cherry picked from commit 9e5d11bff3)
2025-07-15 16:19:56 +02:00
Mike Blumenkrantz
929906a1b1 zink: fix submit_count disambiguation for bo usage checks
also improve docs for submit_count to avoid similar errors

Fixes: 61b0955308 ("zink: always check submit_count to disambiguate when checking/waiting")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35940>
(cherry picked from commit 3925e53efe)
2025-07-15 16:19:56 +02:00
Mike Blumenkrantz
232311722f zink: fix acquire semaphore sync
the semaphore stage is VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
so the src access barrier must also use this in order to ensure it happens
after the acquire

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35940>
(cherry picked from commit 69b5abee14)
2025-07-15 16:19:55 +02:00
Mike Blumenkrantz
625f22be13 zink: don't modify the u_foreach_bit64 bit inside the loop in loop_io_var_mask()
this breaks the macro and causes infinite loops on patch locations in release builds

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35922>
(cherry picked from commit ef0bf50ae9)
2025-07-15 16:19:55 +02:00
Erik Faye-Lund
47553ba5a0 panfrost: limit sample_shading to bifrost and later
We haven't wired this up in the Midgard compiler, so we can't expose
sample shading on Midgard GPUs. This all seems fixable, because the KILL
instruction can update the coverage without the kill-flag (yeah, a bit
confusing naming), but until someone puts in the time to wire up that,
let's just disable the functionality to avoid crashes.

Fixes: 6bba718027 ("panfrost: Advertise SAMPLE_SHADING")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35881>
(cherry picked from commit 504e511c44)
2025-07-15 16:19:55 +02:00
Caleb Callaway
92170f6fc1 iris: ISP invalidate at end of compute batches
We're now re-emitting push constants at the
start of compute batches, so we can avoid the
overhead of restoring them.

CC: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35873>
(cherry picked from commit 6f38d58db3)
2025-07-15 16:19:55 +02:00
Caleb Callaway
1c2c5559de iris: re-emit push constants at compute batch start
Per Ken Graunke, corruption issues with push
constants for render batches on Gen12 graphics
have been observed and worked around by re-emitting
push constants at the start of the batch buffer.
We're seeing similar issues with compute batches,
so we'll apply the same work-around.

Fixes corruption reported in Blender on ADL/RPL

CC: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35873>
(cherry picked from commit 8fd008a45f)
2025-07-15 16:19:55 +02:00
Yiwei Zhang
9f4368e394 anv: avoid leaking private binding for aliased wsi image
Aliased wsi image has to share the same private binding with the
original wsi image for memory consistency. If the private binding
exists, it needs to be released before being overridden.

Fixes: d85a9d658f ("anv/image: Call into WSI to create swapchain images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35893>
(cherry picked from commit b21e62b71a)
2025-07-15 16:19:55 +02:00
Mary Guillemard
5c71a3db0f pan/genxml: Fix wrong size for compute size workgroup
Fix annoying warnings when decoding CSF.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35909>
(cherry picked from commit a3272cd0ce)
2025-07-15 16:19:55 +02:00
Erik Faye-Lund
094e9e4e83 st/pbo: use sized nir-types for download-path
The Midgard compiler only deals with sized NIR types for image loads and
stores. Since we already have nir_get_nir_type_for_glsl_base_type()
which can provide us with the corresponding sized type, let's just use
that, and drop the extra table.

This fixes the following piglits on Mali-T760:
- spec/ext_texture_compression_s3tc/getteximage-targets 2d s3tc
- spec/ext_texture_compression_s3tc/getteximage-targets cube s3tc

Fixes: 9123ee0f18 ("st/mesa/pbo: Set src type on image_store")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35882>
(cherry picked from commit 96d124092f)
2025-07-15 16:19:55 +02:00
Samuel Pitoiset
e04ac3f94a ac/surface: select a different swizzle mode for ASTC formats on GFX12
It seems only 4KiB swizzle works fine with ASTC.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34877>
(cherry picked from commit 2af3ef9305)
2025-07-15 16:19:55 +02:00
José Roberto de Souza
635ba76fbf anv: Do not emit batch_emit_fast_color_dummy_blit() for video engine
Wa_16018063123 don't apply to video engine also video engine don't
support XY_FAST_COLOR_BLT.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Fixes: ec43c20182 ("anv: implement dummy blit for Wa_16018063123")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35700>
(cherry picked from commit 926e6a94ad)
2025-07-15 16:19:55 +02:00
José Roberto de Souza
74c88f22ae anv: Flush before invalidate aux map in copy and video engines
BSpec: 43904
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 46f5359238 ("anv: Invalidate aux map for copy/video engine")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35700>
(cherry picked from commit 4618a99a4c)
2025-07-15 16:19:55 +02:00
José Roberto de Souza
c2461e75b5 anv: Read the correct register for aux table invalidation when in GPGPU mode in render engine
For 3D or GPGPU modes the same render engine should be used, CCS
register should only be used when using compute engine.

Fixes: 46f5359238 ("anv: Invalidate aux map for copy/video engine")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
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/35700>
(cherry picked from commit e68f81eaf6)
2025-07-15 16:19:55 +02:00
Faith Ekstrand
4c3edecfab nak: Surface handles are not allowed to be rZ
The chances of this happening are near zero with the way we do surface
ops today but I have seen it in the wild and this is apparently a rule.
The hardware throws an illegal instruction encoding if it sees 255.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35895>
(cherry picked from commit 19bee26056)
2025-07-15 16:19:55 +02:00
Samuel Pitoiset
f8cc14aabd ac/surface: use align with NPOT for estimating surface size
ac_estimate_size() triggers an assertion because the block size isn't
aligned to a power of two for ASTC formats.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35879>
(cherry picked from commit cb6f2d9409)
2025-07-15 16:19:54 +02:00
Eric Engestrom
aa5c66fdd0 freedreno/ci: fix a750-piglit-cl rules
Fixes: 5b3f7de99f ("ci/freedreno: Introduce OpenCL testing for Adreno 618, 660, and 750")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35888>
(cherry picked from commit 32fe81a02b)
2025-07-15 16:19:54 +02:00
Mike Blumenkrantz
416ad99090 aux/trace: always finish dumping draw/dispatch calls before triggering them
this avoids deadlocks

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
(cherry picked from commit f946167e30)
2025-07-15 16:19:54 +02:00
Samuel Pitoiset
579385e32b radv: disable RB+ with E5B9G9R9 to workaround failures on GFX10.3-GFX11.5
This looks like a hw bug on GFX10.3-GFX11.5 because RB+ seems to only
work as expected when all channels (RGBA) are written. With that format,
RGB channels must be all set or unset but setting the A channel is
legal so far.

This will reduce rendering performance with that format but it's the
less intrusive solution for now. This might be revisited in the near
future, also with more VKCTS coverage.

This has been tested and verified on GFX10.3 (NAVI21) and GFX11
(NAVI31) and GFX12 (NAVI48), unfortunately I don't have GFX11.5 but
let's assume it's broken there too.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13371
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35631>
(cherry picked from commit 10ef9c6a80)
2025-07-15 16:19:54 +02:00
Samuel Pitoiset
3eaf0a6489 radv: stop disabling the alpha optimization with E5B9G9R9 and RB+
This old workaround was added due to test failures with VKCTS but it
turns out the tests were broken. Color writemask for E5B9G9R9 must be
all RGB or none and some tests are testing various RGB channels which
is illegal.

See https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5821.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35631>
(cherry picked from commit 7017b25d6a)
2025-07-15 16:19:54 +02:00
Caio Oliveira
bfb578f2ca brw: Use the right width in brw_nir_apply_key for BS shaders
Fixes: 23c7142cd6 ("anv: disable SIMD16 for RT shaders")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35798>
(cherry picked from commit c733f07378)
2025-07-15 16:19:54 +02:00
Rhys Perry
fe59e9ffdf aco/ra: fix repeated compact_linear_vgprs() in get_reg()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b7738de4f9 ("aco/ra: rework linear VGPR allocation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13431
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35838>
(cherry picked from commit dce1d4ad4c)
2025-07-15 16:19:54 +02:00
Boris Brezillon
4c94de4044 panvk: Lower maxImageDimension{2D,3D,Cube} to match the HW caps
Maximum texture dimension is 2^16, but we're limited by the 32-bit
fields that are used to pass strides/sizes in various descriptors.
Assuming RGBA32_FLOAT is the biggest format we support, that gives us a
16k-1 image size for 2D and cube map, and 512 for 3D.

Change our GetPhysicalDeviceImageFormatProperties2() implementation so
that smaller formats can still advertise bigger image sizes.

Fixes: d5ed77800e ("panvk: Fix GetPhysicalDeviceProperties2() to report accurate info")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
(cherry picked from commit e25a91d919)
2025-07-15 16:19:54 +02:00
Eric Engestrom
e6b9543668 meson: only run symbols-check if nm is available
And drop the redundant check from symbols-check.py, which was actually
masking all kinds of issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit 4be493862d)
2025-07-15 16:19:54 +02:00
Eric Engestrom
313130c431 bin/symbols-check: document new platform symbols exported since symbols-check was broken
The `pthread_mutexattr_*` symbols probably shouldn't be exported, but
let's fix that later so that we can at least get symbols-check to run
again ASAP.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit f350803fb3)
2025-07-15 16:19:54 +02:00
Eric Engestrom
a2bc0d2079 bin/symbols-check: sort platform symbols
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit f06fff8148)
2025-07-15 16:19:54 +02:00
Eric Engestrom
21c1e4f371 bin/symbols-check: ignore version of platform symbols
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit 3d9b76db8e)
2025-07-15 16:19:54 +02:00
Eric Engestrom
fc37fbb555 bin/symbols-check: ignore nm lines that don't have a symbol name
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit 5672230c19)
2025-07-15 16:19:54 +02:00
Eric Engestrom
643d542143 bin/symbols-check: fix fields length condition before accessing fields
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
(cherry picked from commit e626636e90)
2025-07-15 16:19:54 +02:00
Yiwei Zhang
b67b5cbec2 meson: drop vdrm from virgl and venus
Currently neither virgl nor venus uses vdrm. One big blocker is neither
of them has adopted drm_syncobj yet.

Fixes: 1a6fc7006a ("meson: split subdir for virtio/vdrm and virtio/vulkan")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35933>
(cherry picked from commit 60eebe964d)
2025-07-15 16:19:54 +02:00
Eric Engestrom
da0f67c5d0 meson: split subdir for virtio/vdrm and virtio/vulkan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
(cherry picked from commit 1a6fc7006a)
2025-07-15 16:19:54 +02:00
Eric Engestrom
0968cd5859 virtio: move inc_virtio up one folder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
(cherry picked from commit 6f8c4a7ce1)
2025-07-15 16:19:53 +02:00
Eric Engestrom
faaa6f1480 .pick_status.json: Mark 485b520cf2 as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
a6671662ef .pick_status.json: Mark 0a581e7408 as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
12cc9a4d7b .pick_status.json: Mark 94f42bb201 as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
cd1d798ab0 .pick_status.json: Mark 2f5ff9788a as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
18f347d364 .pick_status.json: Mark 6ad0b59cc8 as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
24db8ef2a8 .pick_status.json: Mark 85e4a19ed1 as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
030d2daa14 .pick_status.json: Mark abe23e1cd0 as denominated 2025-07-15 16:19:53 +02:00
Eric Engestrom
c62c2a5510 .pick_status.json: Update to 37ae4df3e4 2025-07-15 16:19:49 +02:00
Eric Engestrom
8a3d5aed64 docs: add sha sum for 25.1.5 2025-07-02 17:57:21 +02:00
Eric Engestrom
fe77ae26db VERSION: bump for 25.1.5 2025-07-02 17:46:17 +02:00
Eric Engestrom
1bf5e50bb2 docs: add release notes for 25.1.5 2025-07-02 17:46:17 +02:00
Rob Clark
1a85ddb514 rusticl: Fix work group size validation
For each dimension, we `threads *= lws`.. which is still zero if threads
is initialized to zero.

Fixes: eca4f0f632 ("rusticl/kernel: check that local size on dispatch doesn't exceed limits")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35864>
(cherry picked from commit 6bc47e65d7)
2025-07-02 16:55:02 +02:00
Rob Clark
9b3b65d7c3 freedreno/a6xx: Fix thread calc for dummy kernels
If a kernel uses no regs, max_reg will be -1.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35864>
(cherry picked from commit c417b83f19)
2025-07-02 16:55:02 +02:00
Boris Brezillon
d861a7b498 pan/layout: Fix size_B calculation for AFBC(3D)
Right now the headers are not counted when we calculate the total slice
size of an AFBC(3D) image. Fix that by special-casing size_B
initialization for AFBC.

I couldn't get back to the original commit introducing this mistakes,
so I'm flagging for backport instead of adding a proper Fixes tag.

Backport-to: 25.1
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
(cherry picked from commit 1389a23708)
2025-07-02 16:19:33 +02:00
Iván Briano
61761d49d5 anv: move view_usage check to before setting the protected bit on it
Otherwise the comparison will always be false for protected content.

Also remove extra setting of the protected bit that was happening later.

Fixes: 8d9cc6aa23 ("anv: properly flag image/imageviews for ISL protection")
Reviewed-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/35870>
(cherry picked from commit 5b58b838fe)
2025-07-02 16:19:33 +02:00
Rhys Perry
27d61a6fd2 aco: update ctx.block when inserting discard block
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13432
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35833>
(cherry picked from commit 21c4400278)
2025-07-02 16:19:32 +02:00
Jose Maria Casanova Crespo
09915f11a4 v3d: fix support for no buffer object bound
Piglit arb_texture_buffer_object-render-no-bo was generating
gpu resets because the uniform stream was missing the last
Fragment Shader uniform. So it was reading instead of the last
fragment shader uniform the first uniform of the vertex shader.

And using that unrelated VS uniform as the sampler address where
the texture should be read.

So now if a buffer object is not bound for a texture buffer object
we write the texture state base address to 0 (NULL) so the default
texture state is used.

So only is needed to set the 4 lower bits of the tmu_p0 with
the bit-mask of word enables.

Fixes: bb8285c258 ("v3d: add support for no buffer object bound")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35847>
(cherry picked from commit 0f8c681c5c)
2025-07-02 16:19:32 +02:00
Timothy Arceri
2ae8d0362b dri: fix __DRI_IMAGE_FORMAT* to PIPE_FORMAT* mappings
As per the old comment:

"These formats correspond to the similarly named MESA_FORMAT_*
 tokens, except in the native endian of the CPU.  For example, on
 little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to
 MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian."

Fixes: 7e10601786 ("dri: Redeclare __DRI_IMAGE_FORMAT_* as PIPE_FORMAT_*")
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35814>
(cherry picked from commit 2ca46c7a7a)
2025-07-02 16:19:32 +02:00
Faith Ekstrand
b2186f35a1 nak: I/O offsets are unsigned when combined with RZ
Fixes dEQP-VK.pipeline.monolithic.descriptor_limits.compute_shader.samplers_16384

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
(cherry picked from commit 3853f72f52)
2025-07-02 16:19:32 +02:00
Alyssa Rosenzweig
8bcc9c9a04 asahi: flush around XFB
this is required by the spec. fixes
gles-3.0-transform-feedback-uniform-buffer-object.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Backport-to: 25.1
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35802>
(cherry picked from commit 03a5b7f25c)
2025-07-02 16:19:32 +02:00
Jesse Natalie
fe9d475e34 dzn: Roll up initialization failure in dzn_meta_init
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13416
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35748>
(cherry picked from commit 7f4ae75903)
2025-07-02 16:19:32 +02:00
Rhys Perry
a20567eead nir/lower_bit_size: fix bitz/bitnz
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 6585209cdd ("nir/lower_bit_size: mask bitz/bitnz src1 like shifts")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35770>
(cherry picked from commit 08859cbe50)
2025-07-02 16:19:32 +02:00
Faith Ekstrand
dd65919d84 nak: Tell NIR to lower invalid implicit LODs
I think NVIDIA hardware more or less does this for us for free but it's
nice to have NIR make sure.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
(cherry picked from commit c6ad70551b)
2025-07-02 16:19:32 +02:00
Dave Airlie
0124b9a342 nouveau: workaround linear/z rendering interaction
nvidia hardware can't render to linear surfaces except under some
very limited circumstances, one of those is if Z is enabled.

However there appears to be some combination of gnome-shell, and
prime (with 2 nouveau cards) where we end up getting through the
GL API to the situation where we try this. This in a production
build causes the kernel to crash with a GR error.

However there existed a period of time where the hw/kernel due to
some other random hw misconfiguration didn't crash when this happened
and doing this was prefect fine. (linear + tiled Z).

This restores the userspace code to do this and just ignores the
Z buffers if we are asked for linear rendering, and seems sufficient
to fix the problem.

I do understand this is a workaround, but I think it's reasonable to
add to the nouveau GL driver at this time since we don't want to
maintain if for ever and it probably should fix a bunch of wierd
user problems with multi gpu and nouveau.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35221>
(cherry picked from commit 06e8db646a)
2025-07-02 16:19:32 +02:00
Jose Maria Casanova Crespo
78dbc63715 v3d: Avoid fast TLB blit if reused job doesn't store the color buffer
Fixes: 66de8b4b5c ("v3d: add a faster TLB blit path")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35739>
(cherry picked from commit d0163f1096)
2025-07-02 16:19:32 +02:00
Calder Young
e09031bbd3 anv: Fix typo when checking format's extended usage flag
Fixes: f4c1753c1a ("anv: report color/storage features on YCbCr images with EXTENDED_USAGE")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35703>
(cherry picked from commit 646977348b)
2025-07-02 16:19:32 +02:00
Yiwei Zhang
fec4040ada venus: fix msaa state sample location info sanitization
The additional reference has corrupted the below D/S state instead of
properly ending the msaa state pnext chain.

Fixes: ff64092ff3 ("venus: support VK_EXT_sample_locations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35808>
(cherry picked from commit cb54338f65)
2025-07-02 16:19:32 +02:00
David Rosca
2089eaa39e frontends/va: Fix SyncSurface when used to sync coded buffer
This would skip the coded buffer fence wait if the surface fence is NULL.

Fixes: 0f20a3a4f1 ("frontends/va: Add surface pipe_fence for vl_compositor rendering")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35782>
(cherry picked from commit 53e3e44eb3)
2025-07-02 16:19:32 +02:00
Pierre-Eric Pelloux-Prayer
f3f56a8668 ac/virtio: fix alignment of metadata command
Command size must be aligned to 8.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 22263616ed ("amd: amdgpu-virtio implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
(cherry picked from commit 3210484fe2)
2025-07-02 16:19:32 +02:00
Hans-Kristian Arntzen
11bc07dcf5 radv: Timestamps are not valid on dedicated sparse queue.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35766>
(cherry picked from commit ac16b8c439)
2025-07-02 16:19:32 +02:00
James Price
e9629998aa spirv: Fix cooperative matrix in OpVariable initializer
Check for cooperative matrix types first in the
nir_lower_variable_initializers pass, since they are also considered
to be scalar types.

Fixes: 7e6cd395c7 ("nir: Handle cmat types in lower_variable_initializers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13388
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35668>
(cherry picked from commit 10ae673368)
2025-07-02 16:19:32 +02:00
Konstantin Seurer
b474d8e858 lavapipe: Suspend conditional rendering around ray tracing dispatches
cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35754>
(cherry picked from commit 131b917246)
2025-07-02 16:19:32 +02:00
mojyack
27df7b4a8c mesa: reorder mesa format corresponding to GL_BGRA
current `st_ChooseTextureFormat(..., internalFormat=GL_BGRA8, ...)`
returns `PIPE_FORMAT_R8G8B8A8_UNORM`.
this causes significant performance loss in apps that use BGRA texture
format(e.g. firefox) when transferring textures because of format
conversions, if the driver doesn't support PIPE_TEXTURE_TRANSFER_BLIT.
fix this by modifying the texture format mapping.

See Also: https://community.mnt.re/t/poor-browser-performance/2042/30

Signed-off-by: mojyack <mojyack@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35678>
(cherry picked from commit db383ceb64)
2025-07-02 16:19:32 +02:00
Pierre-Eric Pelloux-Prayer
74e35799b2 radeonsi: transition to TC-compatible HTILE on full clears
The new layout affects the whole buffer so it needs to be done
on a full clear.

This fixes this piglit test on a RX 6800 XT:
   ext_framebuffer_multisample-accuracy 6 depth_resolve small depthstencil

Fixes: 75a03d733a ("radeonsi: simplify and fix enable_tc_compatible_htile_next_clear logic")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35582>
(cherry picked from commit 04d283c628)
2025-07-02 16:19:31 +02:00
Samuel Pitoiset
d9b72d2987 radv: gather nir shader info at the end of radv_optimize_nir()
Otherwise, outputs_read/outputs_written might not be up-to-date
(mostly after nir_remove_dead_variables) and remove_point_size() might
reach an assertion later because the output variable isn't found.

It seems better to run nir_shader_gather_info() at the very end of
radv_optimize_nir() which can change a lot of things anyways.

No fossils-db changes.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35707>
(cherry picked from commit 30ccd97cd2)
2025-07-02 16:19:31 +02:00
Rob Clark
8a8f5b6962 freedreno/a6xx: Fix max_threads to account for reg footprint
The register footprint could limit occupancy.  We need to take this into
account to avoid deadlocks when a kernel is using barriers.

Fixes: 6d85cd6a3b ("freedreno: Implement get_compute_state_info for Adreno 6xx/7xx")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35745>
(cherry picked from commit 2e00925c81)
2025-07-02 16:19:31 +02:00
Eric Engestrom
27ba4a7eab freedreno/drm: fix libvdrm inclusion logic
Fixes: 0e3584df44 ("freedreno/drm/virtio: Switch to vdrm helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
(cherry picked from commit 2801c51a9e)
2025-07-02 16:19:31 +02:00
Eric Engestrom
1bc18de415 meson: fix vdrm inclusion logic
This is about which driver use vdrm, not which OS we're on.

Fixes the build on non-KMS/DRM system.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12899
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
(cherry picked from commit a1daeb87a8)
2025-07-02 16:19:31 +02:00
Eric Engestrom
b615e50845 meson: allow "venus without virgl" builds
`cc: mesa-stable` instead of `fixes:` because several commits have
modified this but keeping this bug:
- 06e57e3231 ("virtio: Add vdrm native-context helper") made
  an unconditional copy of subdir(virtio)
- cede4e7ac3 ("meson: Only include virtio when DRM available")
  introduced a new condition, which doesn't cover everything that was
  needed
- other commits made more changes

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
(cherry picked from commit d0c7bea727)
2025-07-02 16:19:31 +02:00
Antonino Maniscalco
b5964cd623 zink: wait for sparse queue to go idle
When destroying the context we should also wait for the sparse queue to
go idle.

cc: mesa-stable

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35750>
(cherry picked from commit 8ea0b00a75)
2025-07-02 16:19:31 +02:00
Pierre-Eric Pelloux-Prayer
f8411611b3 radeonsi: check set_debug_callback before use
The callback might not be installed yet if si_create_context fails
early.

Fixes: 59a3f38ff6 ("radeonsi: clear the debug callback on ctx destroy")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
(cherry picked from commit 613e9e9c23)
2025-07-02 16:19:31 +02:00
Adrián Larumbe
a4b30d9fd0 panfrost: Add missing util_range_init()
It was absent when initialising a panfrost_resource from a winsys handle.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: 7da251fc72 ("panfrost: Check in sources for command stream")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
(cherry picked from commit cf4a137459)
2025-07-02 16:19:31 +02:00
Adrián Larumbe
e1f6a0c4df panfrost: Fix Panfrost BO leak in error handling path
When panfrost_resource_init_afbc_headers() fails, freeing the newly
created resource is not enough, because we need to unreference its BOs.
This will also take care of freeing its resource label.

Also replace instances of FREE() in error-handling paths with
panfrost_resource_destroy(), as it is capable of handling partially
initialised resources.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: e3f2bc7963 ("panfrost: handle mmap failures")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
(cherry picked from commit 32b128be01)
2025-07-02 16:19:31 +02:00
Romaric Jodin
c76a7410dc panvk: fix bi_emit_alu calling bi_make_vec_to
bi_emit_alu needs to fully set the vector of bi_index pass to
bi_make_vec_to, as it is expected by the callee.

Fixes: 3cc6a4c5 ("pan/bi: Handle swizzles in i2i8")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35642>
(cherry picked from commit bc973d687c)
2025-07-02 16:19:31 +02:00
Emma Anholt
2fb2db4d3a turnip: Fix subpass depth/stencil change detection.
Subpass had a postfix increment, not prefix, so last_subpass was the same
as subpass.

Fixes: 550975f229 ("turnip: Don't disable LRZ in subpasses after the first in the easy case.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17943>
(cherry picked from commit 2b0e6f42de)
2025-07-02 16:19:31 +02:00
Emma Anholt
69d345c4f6 freedreno/a2xx: Disable interpolated input intrinsics.
We never wanted them, it appears to be a refactor bug.

Fixes: 25d4943481 ("nir: make use_interpolated_input_intrinsics a nir_lower_io parameter")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8431>
(cherry picked from commit 5a3300f4a3)
2025-07-02 16:19:31 +02:00
Patrick Lerda
b89b1ffb2b r600: fix emit_image_load_or_atomic() snorm formats
The snorm formats are not compatible with the srf flag
which was set by the emit_image_load_or_atomic() function.
In this specific case, "use_const_fields" is not set which
implies that the format definition is local. The other
supported formats do not require the srf flag as well.

This change was tested on cypress, barts and cayman. Here are the tests fixed:
khr-gl4[2-6]/shader_image_load_store/basic-allformats-load: fail pass
khr-gl4[2-6]/shader_image_load_store/basic-alltargets-loadstorecs: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_image_load_store/basic-allformats-loadstorecomputestage: fail pass
khr-gl4[5-6]/es_31_compatibility/shader_image_load_store/basic-alltargets-loadstorecs: fail pass
khr-gles31/core/shader_image_load_store/basic-allformats-loadstorecomputestage: fail pass
khr-gles31/core/shader_image_load_store/basic-alltargets-loadstorecs: fail pass
deqp-gles31/functional/image_load_store/2d/format_reinterpret/r32f_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/2d/format_reinterpret/rgba8_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/2d_array/format_reinterpret/r32f_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/2d_array/format_reinterpret/rgba8_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/3d/format_reinterpret/r32f_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/3d/format_reinterpret/rgba8_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/buffer/format_reinterpret/r32f_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/buffer/format_reinterpret/rgba8_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/cube/format_reinterpret/r32f_rgba8_snorm: fail pass
deqp-gles31/functional/image_load_store/cube/format_reinterpret/rgba8_rgba8_snorm: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35548>
(cherry picked from commit d27ed38d1a)
2025-07-02 16:19:31 +02:00
Patrick Lerda
72ccce7953 r600: make vertex r10g10b10a2_snorm conformant on palm and beyond
The mode r10g10b10a2_snorm processed as vertex on palm at the
hardware level doesn't follow the current standard. Indeed, the .w
component (2-bits) is not calculated as expected. The table below
describes the situation.

This change fixes this issue by adding three gpu instructions at
the vertex fetch shader stage. An equivalent C representation and
a gpu asm dump of the generated sequence are available below.

.w(2-bits) expected	palm
0	    0.0		0.000000
1 	    1.0		0.333333
2	   -1.0		0.666667
3	   -1.0		1.000000

w_out = (4.*w_in > 1. ? 1. : 4.*w_in) - (w_in > 0.5 ? 2. : 0.);

0002 00000008 A0080000  ALU 3 @16
 0016 00000C02 A0000CC0     1 y:     MOV*4_sat              __.y,  R2.w
 0018 801F8C02 600004A0       w:     SETGT*2                __.w,  R2.w, 0.5
 0020 839FC4FE 60400010     2 w:     ADD                    R2.w,  PV.y, -PV.w

Note: The rv770 and cypress don't need this correction. This is
definitely a hardware change between these gpus.

This change was tested on palm, barts and cayman. Here are the tests fixed:
spec/arb_vertex_type_2_10_10_10_rev/arb_vertex_type_2_10_10_10_rev-array_types: fail pass
deqp-gles3/functional/draw/random/124: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/normalize/int2_10_10_10/components4_quads1: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/normalize/int2_10_10_10/components4_quads256: fail pass
khr-gl43/vertex_attrib_binding/basic-input-case5: fail pass
khr-gl44/vertex_attrib_binding/basic-input-case5: fail pass
khr-gl45/vertex_attrib_binding/basic-input-case5: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32427>
(cherry picked from commit e8fa3b4950)
2025-07-02 16:19:31 +02:00
Lionel Landwerlin
8a951265e0 anv: fix sampler hashing in set layouts
The logic needs to handle embedded samplers without conversion state.

Fixes vkd3d-proton's test_sampler_border_color

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35679>
(cherry picked from commit 786bace191)
2025-07-02 16:19:31 +02:00
Lionel Landwerlin
1dde4bccd4 anv: fix clears on single aspect of YCbCr images
Fixes vkd3d-proton's test_planar_video_formats

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35679>
(cherry picked from commit 32b53a7c6a)
2025-07-02 16:19:30 +02:00
Lionel Landwerlin
e4f52e75ef isl: handle DISABLE_AUX in get_mcs_surf
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35679>
(cherry picked from commit 691ac65000)
2025-07-02 16:19:30 +02:00
Doug Nazar
813fe7e59d glx: Fix memory leak with software dri
dri_screen_init() now calls glx_screen_init() directly. Calling
twice overwrites the config.

Fixes: 7930fe5f01 ("glx: unify dri screen init")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35525>
(cherry picked from commit c3980bb4ec)
2025-07-02 16:19:30 +02:00
Alyssa Rosenzweig
6d258a379e asahi,hk: fix ts allocation for more shader types
3c5c3d7819 ("hk: fix texture state count"), part 2.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35662>
(cherry picked from commit cdb4463b52)
2025-07-02 16:19:30 +02:00
Eric Engestrom
d994ff9c89 intel/compiler tests: fix variable type for getopt_long() return value
`getopt_long()` returns an `int`, not a `char`; putting the value in
a `char` before comparing it to `-1` was making the comparison always
fail, resulting in the invalid codepath taken that then fails with:

    option `-' is invalid: ignored

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34756>
(cherry picked from commit 99e8d804bf)
2025-07-02 16:19:30 +02:00
Eric Engestrom
08edf564a7 intel/compiler tests: fix "is there something after the options" check
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34756>
(cherry picked from commit f545f9eed4)
2025-07-02 16:19:30 +02:00
Eric Engestrom
f36dcedc36 intel/compiler tests: fix path-to-string conversion
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34756>
(cherry picked from commit 729922cdae)
2025-07-02 16:19:30 +02:00
Eric Engestrom
aea08bbb1f intel/compiler tests: rewrite subprocess handling in run-test.py
`subprocess.Popen()` returns immediately, and the subprocess might not
have finished by the time `stdout` is read on the next line, spuriously
failing the tests.

`subprocess.check_output()` makes sure the output is available before
returning, solving this issue; it additionally raises an error if the
subprocess failed, giving a better error than a failed diff later in the
script.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34756>
(cherry picked from commit de6ab1beda)
2025-07-02 16:19:30 +02:00
Eric Engestrom
22debc9b65 hasvk: only run tests on x86 (32 & 64 bit)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13305
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35635>
(cherry picked from commit 6addaca3d4)
2025-07-02 16:19:30 +02:00
Yiwei Zhang
1e63392359 u_gralloc/mapper4: fill u_gralloc_buffer_color_info properly
Clients are expecting the color info to be fully filled when the api
exists. Give proper defaults for the metadata to stay aligned with
legacy backends.

Also amend the missing ChromaSiting cases.

Fixes: ee42e2166d ("android: Introduce the Android buffer info abstraction")
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613>
(cherry picked from commit 64d18f84b0)
2025-07-02 16:19:30 +02:00
Yiwei Zhang
8ce5dadcce u_gralloc/mapper5: fill u_gralloc_buffer_color_info properly
Clients are expecting the color info to be fully filled when the api
exists. Give proper defaults for the metadata to stay aligned with
legacy backends.

Fixes: 122fd46b15 ("Android15 support gralloc IMapper5")
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613>
(cherry picked from commit 0ac1e05f65)
2025-07-02 16:19:30 +02:00
Mike Blumenkrantz
fd81fda9ef zink: don't use TRANSFER bit as default pipeline stage if no access is set
should be TOP_OF_PIPE

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
(cherry picked from commit cb026adc4c)
2025-07-02 16:19:30 +02:00
Yiwei Zhang
8701d0e4da radv: relax the native_handle_t::numFds requirement
For modern gralloc impl, usually there's other fds appended in the
native_handle_t for gralloc buffer metadata sharing. So numFds can be
greater than 1, while the common agreement is still that the format
plane handles being placed at the beginning in the lack of a standard
format plane fd metadata query mapper api.

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

Cc: mesa-stable
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35038>
(cherry picked from commit 41d241bf6e)
2025-07-02 16:19:30 +02:00
Erik Faye-Lund
653f9e1239 pan/bi: rework memory barriers
The MEMORY_BARRIER instruction has some issues, where we end up
dead-code eliminating it before it gets to do what it's supposed to do.

But even if we fix that, we have issues where we can end up inserting
flow control into it, which isn't going to work because we have nothing
to emit here either.

So let's rework this to a special-cased NOP instruction, which is marked
as a scheduling barrier. The beneft here is that NOPs are already properly
handled when it comes to flow control.

Note that this isn't perfect either; this only prevents memory operations
from crossing the scheduling barrier. We should really prevent any
operation with observable side effects from crossing the barrier. This
includes things like reading clocks etc.

But that's a larger change, and it's a step in the right direction to get
this to no longer be dead-code eliminated. So let's put this band-aid on
for now.

Fixes: f77a50e45e ("pan/bi: add a MEMORY_BARRIER pseudo-instruction")
Reviewed-by: Caterina Shablia <caterina.shablia@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35502>
(cherry picked from commit 18893a250f)
2025-07-02 16:19:30 +02:00
Eric Engestrom
33f6a87b75 .pick_status.json: Mark 3778b22268 as denominated 2025-07-02 16:19:30 +02:00
Marek Olšák
be5227e654 radeonsi: don't clamp the shadow comparison value for nir_texop_lod on gfx8-9
It doesn't have the value. This fixes a crash on gfx8-9.

Cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35344>
(cherry picked from commit 56ed949e08)
2025-07-02 16:19:30 +02:00
Lionel Landwerlin
cd001c54a5 anv: only use compressed memory types on Xe2+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 252cac1e5c ("anv: avoid memory type changes with INTEL_DEBUG=noccs")
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35615>
(cherry picked from commit bfee389f0c)
2025-07-02 16:19:29 +02:00
Rhys Perry
be6ede15eb aco/lower_branches: keep blocks with multiple logical successors
It might be the case that both the branch and exec mask write in a
divergent branch block are removed. try_remove_simple_block() might then
try to remove it, but fail because it has multiple logical successors.
Instead, just skip these blocks.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35202>
(cherry picked from commit 5344abbc56)
2025-07-02 16:19:29 +02:00
Olivia Lee
bbb75759ef panvk: return error when mmap fails in BindImageMemory2 and BindBufferMemory2
Previous code crashed with an assertion failure in this case.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 211aa20194 ("panvk: Move away from panfrost_{bo,device}")
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35528>
(cherry picked from commit b31dee9b7e)
2025-07-02 16:19:29 +02:00
Olivia Lee
67e969ee89 panfrost: fix depth clip range with u_blitter
u_blitter sets a viewport transform with depth range [-1,1], which is
outside the [0,1] range that is allowed by opengl.

The mali hardware docs state that setting the LOW_DEPTH_CLAMP register
outside of [0,1] is undefined behavior. We haven't observed any problems
with this so far, but better to fix it.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 810135fb42 ("gallium/u_blitter: Fix depth.")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35225>
(cherry picked from commit b8c7fcda27)
2025-07-02 16:19:29 +02:00
Christopher Gautier
ebae6797d6 panfrost, panvk: The size of resource tables needs to be a multiple of 4.
The HW specifications require the size of shader resource tables to be a
multiple of 4, otherwise correct behaviour is not guaranteed.

Fixes: 713f5c3600 ("panvk: Prepare the cmd_desc_state logic for Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35553>
(cherry picked from commit 48e8d6d207)
2025-07-02 16:19:29 +02:00
Faith Ekstrand
f9b1adcc7e nir/lower_input_attachments: Don't ignore tex coordinates
The SPIR-V spec is pretty clear that coordinates on subpass attachments
are relative to the current pixel.  They're required to be zero but we
should stay consistent with ourselves (we already do this for image
intrinsics) and with the spec.

Fixes: 84b08971fb ("nir/lower_input_attachments: lower nir_texop_fragment_{mask}_fetch")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35551>
(cherry picked from commit 2c13e1e655)
2025-07-02 16:19:29 +02:00
Faith Ekstrand
1631acbd52 nir/lower_input_attachments: Stop assuming tex src indices
There's nothing in NIR which guarantees that the deref is the first
source or that the coordinate is the second.  Use
nir_tex_instr_src_index() to get the actual indices.

Fixes: 84b08971fb ("nir/lower_input_attachments: lower nir_texop_fragment_{mask}_fetch")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35551>
(cherry picked from commit 9a52b9372c)
2025-07-02 16:19:29 +02:00
Ryan Houdek
551045b217 tu: Fixes missing sse2 flags
Turnip when cross-compiled for i386 needs to be built with SSE2 as a
minimum spec, as it uses clflush unconditionally. Make sure to pass in
the sse2_args, which will be empty on Arm64 targets.

Fixes: 7231eef630
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35621>
(cherry picked from commit f872cbea37)
2025-07-02 16:19:29 +02:00
Emma Anholt
312c62a6d7 intel/shim: Report support for PXP status.
Otherwise drm-shim complains on every shader-db run.

Fixes: e358173fbf ("iris: Add GET_PARAM for protected context capability support")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
(cherry picked from commit 1b6689d79e)
2025-07-02 16:19:29 +02:00
Sagar Ghuge
1cf750367a anv: Apply flush during WriteAccelerationStructures
We are reading accel header parameter those are updated by CS, so we
need to apply flushes to make L3 coherent with CS.

This fixes ray query tests on MTL:
- dEQP-VK.ray_query.*.serialization.*

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/35590>
(cherry picked from commit a676ba9294)
2025-07-02 16:19:29 +02:00
José Roberto de Souza
b09fcbc09b Revert "anv: Enable preemption due 3DPRIMITIVE in GFX 12"
Enabling preemption in 3DPRIMITIVE is causing glitches on Dota 2,
so reverting this until the issue with preemption is fixed.

This reverts commit 3cd972a2d3.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13289
Fixes: 12ddaa6b8b ("anv: Enable preemption due 3DPRIMITIVE in GFX 12")
Acked-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/35586>
(cherry picked from commit 37f4182ac3)
2025-07-02 16:19:29 +02:00
Georg Lehmann
5afe7c8f1a nir/opt_intrinsic: fix inclusive scan rewrite with multiple uses
Modifying the iterated list is a footgun, so just create a new instruction.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13364
Fixes: 5c70a55bf3 ("nir/opt_intrinsics: optimize (exclusive_scan(op, a) op a) to inclusive scan")

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35577>
(cherry picked from commit e9c886c331)
2025-07-02 16:19:29 +02:00
Vinson Lee
51d5d13411 freedreno: Sort MRTs so output is stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7095
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35402>
(cherry picked from commit 8c8496e2f6)
2025-07-02 16:19:29 +02:00
Eric Engestrom
1aa840d251 .pick_status.json: Update to e2a2663638 2025-07-02 16:19:24 +02:00
Eric Engestrom
b42f307dd8 docs: add sha sum for 25.1.4 2025-06-18 19:56:34 +02:00
Eric Engestrom
bcb723ed9e VERSION: bump for 25.1.4 2025-06-18 19:45:40 +02:00
Eric Engestrom
9089e0a91c docs: add release notes for 25.1.4 2025-06-18 19:45:39 +02:00
Eric Engestrom
38da287ed1 [25.1 only] anv+zink/ci: skip blender-demo-cube_diorama.trace on tgl because it's highly flaky 2025-06-18 17:55:49 +02:00
Russell Greene
1c2d3b3cd1 radeonsi: vpe: fix noisy false error
When running `ffmpeg -vaapi_device /dev/dri/renderD128 -f lavfi -i smptebars=duration=5:size=1280x720:rate=30 -vf format=rgba,hwupload,scale_vaapi=format=nv12,hwdownload  testout.mp4`,

the vpe is asked to transform into NV12, which cannot be done with a blit. `si_vpe_construct_blt` fails, but then it gracefully falls back into `vlVaPostProcCompositor` and finishes the task correctly, but not before logging the error:

SIVPE ERROR ../mesa-25.1.3/src/gallium/drivers/radeonsi/si_vpe.c:1095 si_vpe_construct_blt Failed in checking process operation and build settings(9)

for each frame that is processed. Since this is expected, my original thought was to demote this to a warning. But looking at all the reasons it could fail for, there already is a warning (or error) logged, so it seems to me the best thing to do is remove the error entirely

There may be a better approach here, and I'm all ears.

Fixes: e85a6b6a63 ("radeonsi/vpe: check reduction ratio")
Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35449>
(cherry picked from commit e1bcd0f4a5)
2025-06-18 17:55:48 +02:00
Yiwei Zhang
9fe545c99b hasvk: use narrow range to match up with mesa EGL
This matches up with the native gl drivers as well as the media stack.

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW <=> EGL_YUV_NARROW_RANGE_EXT

Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35597>
(cherry picked from commit 5cb50c3cf5)
2025-06-18 17:55:48 +02:00
Yiwei Zhang
edfea2d928 anv: use narrow range to match up with mesa EGL
This matches up with the native gl drivers as well as the media stack.

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW <=> EGL_YUV_NARROW_RANGE_EXT

Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35597>
(cherry picked from commit c169ad60c1)
2025-06-18 17:55:48 +02:00
Connor Abbott
bdd1d0fc98 tu: Re-emit viewports/scissors when has_fdm changes
This shouldn't matter if FDM is actually enabled, because in that case
the pipeline must enable the bit and we dirty FDM state at the
beginning, but pipelines can enable FDM even if the renderpass they're
used in doesn't use FDM and in that case we still need to use the FDM
path to duplicate the viewports. Fix the case where a different pipeline
is bound that enables FDM without actually using FDM.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35581>
(cherry picked from commit 60843bc806)
2025-06-18 17:55:48 +02:00
Connor Abbott
7c40697ca0 tu: Make sure to re-emit viewports if per_view_viewport changes
We may need to re-emit the viewports if a different shader is bound that
does or doesn't use gl_ViewportIndex.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35581>
(cherry picked from commit 0017b9e8ed)
2025-06-18 17:55:48 +02:00
Mike Blumenkrantz
4f355cd8cc tc: fix zsbuf rp info persistence across fb states
zsbuf info is only part of data8[3], not the whole thing

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
(cherry picked from commit ea85a14c35)
2025-06-18 17:55:48 +02:00
Janne Grunau
72e64b2713 gallium/dril: Add entrypoint for apple (asahi) kms driver
Ensures that GLX uses "DRI2 GL" instead of "DRISWRAST GL" provider
caused by "AIGLX error: apple exports no extensions
(/usr/lib64/dri/apple_dri.so: undefined symbol: __driDriverExtensions)".

Backport-to: 25.1
Fixes: 27d2bd5925 ("gallium: wire up asahi driver")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35562>
(cherry picked from commit 48ede1a757)
2025-06-18 17:55:48 +02:00
Lionel Landwerlin
5464d3cbec ci/zink: add validation error
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35358>
(cherry picked from commit 4a966fd28d)
2025-06-18 17:55:48 +02:00
Lionel Landwerlin
8861861cd5 ci/zink: add the same glx@glx-tfp flake on ADL
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35358>
(cherry picked from commit 4a93c4f5e3)
2025-06-18 17:55:48 +02:00
Calder Young
44e5299310 anv: Support multi-planar formats in anv_formats_are_compatible
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35358>
(cherry picked from commit 03cdb3078a)
2025-06-18 17:55:48 +02:00
Lionel Landwerlin
28fd73a459 anv: report color/storage features on YCbCr images with EXTENDED_USAGE
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13219
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35358>
(cherry picked from commit f4c1753c1a)
2025-06-18 17:55:48 +02:00
Lionel Landwerlin
c29689a1fa anv: pass image usage/flags to anv_get_image_format_features2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35358>
(cherry picked from commit bd959ea48f)
2025-06-18 17:55:48 +02:00
Lionel Landwerlin
7e8d243549 anv: fix R64 format support reporting
We only want the atomic bit to be conditional to non sparse.

Also take the opportunity to fix buffer features and report the same
supported atomic formats as images.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ed77f67e44 ("anv: add emulated 64bit integer storage support")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35358>
(cherry picked from commit befc2a2f62)
2025-06-18 17:55:48 +02:00
Jonathan Gray
27c2d384fa intel/dev: update BMG device names
Ref: https://www.intel.com/content/www/us/en/products/sku/241676/intel-arc-b570-graphics/specifications.html
Ref: https://www.intel.com/content/www/us/en/products/sku/241598/intel-arc-b580-graphics/specifications.html
Ref: https://www.intel.com/content/www/us/en/products/sku/242615/intel-arc-pro-b50-graphics/specifications.html
Ref: https://www.intel.com/content/www/us/en/products/sku/243916/intel-arc-pro-b60-graphics/specifications.html

Fixes: c1d3fa007c ("intel/dev: Add BMG PCI IDs (with FORCE_PROBE set)")
Fixes: d3ec467031 ("intel/dev: Add BMG 0xe211 PCI ID")
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35539>
(cherry picked from commit 270035fdce)
2025-06-18 17:55:48 +02:00
Rob Clark
7628703669 freedreno/a6xx: Fix buffer clears
The max dimensions are in units of pixels, not bytes.  But the x
coordinate shift is based on aligning the address/offset to 64.
Rework the buffer clear loop to iterate in terms of pixels, but
with the x dimension shift based on converting aligned offset
to pixels.

Fixes OpenCL-CTS test_buffers.

Fixes: dafc4476f7 ("freedreno: Implement fast clear_buffer for Adreno 6xx and 7xx")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35557>
(cherry picked from commit 8d13fc447e)
2025-06-18 17:55:48 +02:00
Karol Herbst
f8e5efcc26 rusticl/image: fix sub-buffer images
There were two issues with the current implementation:
 - We didn't set the offset for sampler and image views
 - Image::fill didn't take the parents offset into account

Cc: mesa-stable
Reported-by: Rob Clark <rob.clark@oss.qualcomm.com>
Tested-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35537>
(cherry picked from commit 7e9ee2000a)
2025-06-18 17:55:47 +02:00
Jordan Justen
ee98d9d4bc intel/dev: Update names for BMG G31 PCI IDs
Ref: bspec 68090
Fixes: 4c4d90ae49 ("intel/dev: Add BMG PCI IDs 0xe220-0xe223")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35509>
(cherry picked from commit 17fbd0df51)
2025-06-18 17:55:47 +02:00
Tapani Pälli
89aac52efa drirc: toggle filter addr rounding for Heroes Of Valor
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13357
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/35541>
(cherry picked from commit cc6681e878)
2025-06-18 17:55:47 +02:00
Karol Herbst
d6eb93ba7a ac/nir: fix unaligned single component load/stores
This fixes two problems:
1. we need to lower the bit_size according to the alignment.
2. num_components could end up being 0, so we need to round up instead.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13102
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34976>
(cherry picked from commit 4f5ce2d5aa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35575>
2025-06-18 17:55:47 +02:00
Patrick Lerda
d85452e2c9 r600: handle cayman border color sint formats
This is the cayman implementation for these border
color formats which are already working on evergreen.

Here are the tests fixed:
deqp-gles31/functional/texture/border_clamp/formats/r16i/nearest_size_npot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/r16i/nearest_size_pot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/r8i/nearest_size_npot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/r8i/nearest_size_pot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rg16i/nearest_size_npot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rg16i/nearest_size_pot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rg8i/nearest_size_npot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rg8i/nearest_size_pot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rgb16i/nearest_size_npot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rgb16i/nearest_size_pot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rgb8i/nearest_size_npot: fail pass
deqp-gles31/functional/texture/border_clamp/formats/rgb8i/nearest_size_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_2d/int_color/nearest/s_clamp_to_edge_t_clamp_to_border_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_2d/int_color/nearest/s_clamp_to_edge_t_clamp_to_border_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_2d/int_color/nearest/s_mirrored_repeat_t_clamp_to_border_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_2d/int_color/nearest/s_mirrored_repeat_t_clamp_to_border_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_2d/int_color/nearest/s_repeat_t_clamp_to_border_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_2d/int_color/nearest/s_repeat_t_clamp_to_border_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_clamp_to_border_t_clamp_to_border_r_clamp_to_border_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_clamp_to_border_t_clamp_to_border_r_clamp_to_border_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_clamp_to_border_t_clamp_to_border_r_repeat_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_clamp_to_border_t_clamp_to_border_r_repeat_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_mirrored_repeat_t_clamp_to_border_r_repeat_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_mirrored_repeat_t_clamp_to_border_r_repeat_pot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_repeat_t_mirrored_repeat_r_clamp_to_border_npot: fail pass
deqp-gles31/functional/texture/border_clamp/per_axis_wrap_mode/texture_3d/int_color/nearest/s_repeat_t_mirrored_repeat_r_clamp_to_border_pot: fail pass
deqp-gles31/functional/texture/border_clamp/range_clamp/nearest_int_color: fail pass
deqp-gles31/functional/texture/border_clamp/sampler/int_color: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35280>
(cherry picked from commit 1d28931d2c)
2025-06-18 17:55:47 +02:00
Samuel Pitoiset
71cf1fed4f radv: fix 1x user sample locations on GFX10+
Only GFX10+ can support 1x user sample locations, but MSAA_ENABLE
needs to be enabled.

Fixes new VKCTS coverage dEQP-VK.pipeline.*samples_1*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35492>
(cherry picked from commit 061bc6151a)
2025-06-18 17:55:47 +02:00
Samuel Pitoiset
e232bf4bcd ac/surface: fix aliasing DCC tilings with HiZ info on GFX12
DCC tilings info needs to be set for all surfaces, including
depth/stencil. But because this is a C union, settings those fields
for depth/stencil surfaces might accidentally overwrite HiZ info.

This fixes rendering issues with RADV_DEBUG=nohiz.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35515>
(cherry picked from commit 251b23f6c2)
2025-06-18 17:55:47 +02:00
Yiwei Zhang
528ad9c03d v3dv: fix swapchain bind info look up
Fixes: c672b23857 ("v3dv: implement interactions of VK_KHR_device_group with VK_KHR_swapchain")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35505>
(cherry picked from commit 8368328d98)
2025-06-18 17:55:47 +02:00
Lucas Stach
e91c881ec5 etnaviv: use most recent shadow of resources as blit source/target
The frontend does not know that etnaviv may keep multiple shadows around
for a resource, so it will always pass in the base resource as blit source
and destination. For those blits to work as expected by the API we need to
work out which shadow is the most recent one and use those as blit source
and destination resources.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35526>
(cherry picked from commit ede41372f4)
2025-06-18 17:55:47 +02:00
Lucas Stach
8d98d896ab etnaviv: use direct BLT/RS blit hook for internal copies
etna_copy_resource() and etna_copy_resource_box() are used to keep the
internal shadow copies of a resource up to date. They are supposed to
always use the RS or BLT engines to do the copy, never requiring any
fallbacks or fake format handling. They should also work regardless of
the current render condition state. So instead of going through the
pipe_context blit hook, directly call the RS or BLT blit hook on the
etna_context.

CC: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35526>
(cherry picked from commit d4780f03fc)
2025-06-18 17:55:47 +02:00
Mary Guillemard
8c2a70314e pan/lib: Rewrite npot divisor algorithm
It was based on reverse engineering and inaccurate.

This also get ride of fp64 usage and will allow us to use it in OpenCL C
shaders for indirect/indexed draw.

On the full 32-bit range, this fixes ~10 millions inaccurate results.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 467ae0d39d ("panfrost: Factor out panfrost_compute_magic_divisor")
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35490>
(cherry picked from commit b53d98eb41)
2025-06-18 17:55:47 +02:00
Rhys Perry
7d9487439d ac/llvm: convert to integer after reductions
These return floating point types for floating point ops.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35489>
(cherry picked from commit 2ff53fd97c)
2025-06-18 17:55:47 +02:00
Rhys Perry
df1cf8119b ac/llvm: fix overloading of intrinsic names
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35489>
(cherry picked from commit 3c2b3fbd03)
2025-06-18 17:55:47 +02:00
Rhys Perry
706095e8c3 ac/nir: create lowered inverse_ballot
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b49eab68a8 ("ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35489>
(cherry picked from commit ac2e36b377)
2025-06-18 17:55:46 +02:00
Faith Ekstrand
caeee413a3 nil: Don't use Fermi bits in the Maxwell null descriptor
Fixes: c8d8e2249a ("nil: Add a helper for populating the null descriptor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35475>
(cherry picked from commit bbc6f50963)
2025-06-18 17:55:46 +02:00
Yiwei Zhang
a2f5cd915c venus: fix maint7 layered vk props query
We should not touch the pNext of the nested props2 struct.

Fixes: 8c6a5250ec ("venus: support VK_KHR_maintenance7")
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35453>
(cherry picked from commit d6bff136bd)
2025-06-18 17:55:46 +02:00
Yiwei Zhang
43f43865bf lvp: fix wsi platform swapchain image bind
The prior incomplete ANB support broke it.

Fixes: 0dce939e6d ("lavapipe: Add android platform integration")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35506>
(cherry picked from commit 6781dcc565)
2025-06-18 17:55:46 +02:00
Mel Henning
cf247fa2fa zink: Handle null instance in 2nd create_screen
If zink_internal_create_screen is called twice and the first call fails
with instance==NULL, then the second call also needs to goto fail
instead of just asserting that instance is non-null.

Fixes: 015eda4a ("zink: deduplicate VkDevice and VkInstance")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13337
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35518>
(cherry picked from commit 7d974c32ce)
2025-06-18 17:55:46 +02:00
Job Noorman
7e8ed66bbd ir3/lower_io_offsets: set progress when scalarizing UAV loads
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 91f19bcbe0 ("ir3: Plumb through two-dimensional UAV loads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34311>
(cherry picked from commit fca143946e)
2025-06-18 17:55:46 +02:00
Job Noorman
ded915ca94 Revert "ir3: optimize SSBO offset shifts for nir_opt_offsets"
This reverts commit 57ea689273.

This optimization is only sound when the operands of iadd are unsigned.
It turns out this is not always the case.

While the particular failure I was seeing was fixed by changing the
unsigned shifts to signed ones, I don't believe this is sound either. So
it's better to disable it for now until we find a better solution.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 57ea689273 ("ir3: optimize SSBO offset shifts for nir_opt_offsets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34324>
(cherry picked from commit 29eb9ec7b7)
2025-06-18 17:55:46 +02:00
Samuel Pitoiset
1541e3cd7a radv: fix 3-plane formats with descriptor buffers
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35455>
(cherry picked from commit 7f7ed18929)
2025-06-18 17:55:46 +02:00
Samuel Pitoiset
aaa489a1d0 radv: make sure to zero-initialize image view descriptors
This prevents a regression from the next commit which would write
garbage for combined image+sampler descriptors and that might break
capture&replay.

It seems also more robust to write zeroes than garbage overall.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35455>
(cherry picked from commit 22e06d65d7)
2025-06-18 17:55:46 +02:00
Tapani Pälli
be41f162d1 drirc: toggle on intel_storage_cache_policy_wt for tlou2
Fixes rendering issues seen in the game.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12948
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35486>
(cherry picked from commit 6e57f3738d)
2025-06-18 17:55:46 +02:00
Timothy Arceri
f0c5d5f49c mesa: get correct src address for transferOps
When texstore_rgba() takes the path that doesn't handle
transferOps it was correctly calling _mesa_image_address()
to apply any pixel store unpack setting to the starting src
address. This was missing from the transferOps path so we add it
in this patch.

Fixes: 4b249d2eed ("mesa: Handle transferOps in texstore_rgba")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10314

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35481>
(cherry picked from commit 1f2568ae31)
2025-06-18 17:55:46 +02:00
Jonathan Gray
8b24f5441a util: fix OpenBSD/powerpc64 build
use defined(HAVE_ELF_AUX_INFO) as HAVE_ELF_AUX_INFO is not defined to a value
avoids 'error: expected value in expression' on powerpc64

Fixes: 67333c2632 ("util: Support elf_aux_info() on OpenBSD arm and ppc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35422>
(cherry picked from commit 68be3b7159)
2025-06-18 17:55:46 +02:00
Lars-Ivar Hesselberg Simonsen
a3c4eec46d panvk: Skip barrier QFOT if src_qfi equals dst_qfi
Do not perform a queue family ownership transfer during memory barriers
if srcQueueFamilyIndex equals dstQueueFamilyIndex, as the Vulkan spec
mandates that this should only happen if the two values are unequal.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Fixes: 715d6e740a ("panvk: improve VK_QUEUE_FAMILY_EXTERNAL support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35458>
(cherry picked from commit 5d0465a253)
2025-06-18 17:55:46 +02:00
Mike Blumenkrantz
f2547ac6e3 util/box: make u_box_test_intersection_2d() consistent with other funcs
cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21738>
(cherry picked from commit 2b39cd0722)
2025-06-18 17:55:46 +02:00
Mel Henning
b845100f44 zink: Return NULL on vkCreateInstance failure
Previously we were returning uninitialized data on the error path.

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35471>
(cherry picked from commit d764e1c062)
2025-06-18 17:55:45 +02:00
Juan A. Suarez Romero
10efad67d4 vc4: free RA interference graph on failure
This fixes a leak in the driver.

Backport-to: 25.1
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35464>
(cherry picked from commit d983280da9)
2025-06-18 17:55:45 +02:00
Pierre-Eric Pelloux-Prayer
e5e959b0fd ac/llvm: rework component trimming in visit_tex
The referenced commit was a step in the right direction, but not
complete.

ac_build_image_opcode returns a vec<4> or a struct<vec<4>, int>
so we can simplify visit_tex. We just need to map these 4/5 values
to the expected layout from NIR.
eg: depth + TFE would produces "<d, x, x, x>, t" so it has to be
transformed into <d, t>.

nir_texop_fragment_mask_fetch_amd + sparse doesn't exist, so it's
another opportunity for simplification.

This is required to get KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_depth_component16
working properly.
The same test fails with ACO so it probably needs a change in the
same area.

Fixes: c0ef2aa7f8 ("DEPENDENCY: ac/llvm: fix sparse code handling")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
(cherry picked from commit 4a84ebfcb1)
2025-06-18 17:55:45 +02:00
Emma Anholt
49d98e15ba u_trace: Fix payload refcounting in u_trace_clone_append().
If the clone_append was to a chunk of the same u_trace that gets
process_chunk()ed after where we're cloning from, then the payloads would
have been unreffed in the previous chunk's cleanup_chunk().

Fixes use-after-frees with turnip gmem rendering that resulted in
corrupted payloads.

Fixes: 14e45cb21e ("util/u_trace: refcount payloads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35379>
(cherry picked from commit 6e97df1d76)
2025-06-18 17:55:45 +02:00
Rhys Perry
333cb92f69 ac/nir: run nir_lower_vars_to_ssa after nir_lower_task_shader
nir_lower_task_shader does nir_lower_returns, so we need this if the
launch_mesh_workgroups was in control flow.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13326
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35411>
(cherry picked from commit bc2edf14d8)
2025-06-18 17:55:45 +02:00
Samuel Pitoiset
18aaac6153 radv/meta: fix using the wrong pipeline layout for ASTC decoding
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35359>
(cherry picked from commit f3578973d7)
2025-06-18 17:55:45 +02:00
Mike Blumenkrantz
c02f060dc3 zink: emulated alpha formats do not require mutable
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35433>
(cherry picked from commit 0d3dc92863)
2025-06-18 17:55:45 +02:00
Erik Faye-Lund
83b014996e Revert "mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXT"
This reverts commit 74bec42b45.

This is not conformant behavior, and if we *really* want to do this, it
should be guarded behind a DRIconf or something instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35099>
(cherry picked from commit 02457ee29e)
2025-06-18 17:55:45 +02:00
Patrick Lerda
3cc02c9387 r600: index_bias should be forced to zero for all indirect draw calls
The previous fix 0cae8d372e is the right way to proceed, but it
should also apply when index_size is non-zero.

This change was tested on palm and cayman. Here is the test fixed:
spec/arb_multi_draw_indirect/arb_draw_elements_base_vertex-multidrawelements -indirect: fail pass

Fixes: 0cae8d372e ("r600: don't set an index_bias for indirect draw calls")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
(cherry picked from commit a640b7233c)
2025-06-18 17:55:45 +02:00
Karol Herbst
3542819e98 clc: fix DiagnosticOptions related build failure with llvm-21
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13257
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35399>
(cherry picked from commit a482ec7f05)
2025-06-18 17:55:45 +02:00
Karol Herbst
bfd76f4d73 clc: use new createTargetMachine overload with llvm-21
The old one is deprecated, so let's move and silence the warning.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35399>
(cherry picked from commit 392ad203eb)
2025-06-18 17:55:45 +02:00
Georg Lehmann
fc89f9e60d aco: do not use v_cvt_pk_u8_f32 for f2u8
The ISA docs don't mention this, but instead of always truncating
like other integer conversions, this opcode actually uses the single
precision rounding mode.

We could continue to use the opcode and set the rounding mode to rtz
in lower_to_hw_instrs, but I think I should just concede that f2u8
isn't worth the effort.

Fixes: 9bb10b58 ("aco: use v_cvt_pk_u8_f32 for f2u8")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35391>
(cherry picked from commit d95e90ab5f)
2025-06-18 17:55:45 +02:00
Rhys Perry
b03ee0a308 aco/gfx12: fix VALUReadSGPRHazard with carry-out
fossil-db (gfx1201):
Totals from 370 (0.46% of 79653) affected shaders:
Instrs: 3933639 -> 3935914 (+0.06%)
CodeSize: 20743448 -> 20752068 (+0.04%); split: -0.00%, +0.04%
Latency: 26261246 -> 26261921 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 5363675 -> 5363760 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 65f95ae74e ("aco/insert_NOPs: implement VALU -> VALU case for VALUReadSGPRHazard on GFX12")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35387>
(cherry picked from commit a714a19e16)
2025-06-18 17:55:45 +02:00
Natalie Vock
85af264acc radv/rt: Avoid encoding infinities in box node coords
On Navi33, certain box sorting modes combined with infinity/-infinity in
the child AABBs cause image_bvh64_intersect_ray to return garbage node
pointers.

To avoid this, convert infinity to the maximum representable
floating-point value, which will still intersect with any non-inf ray.

Fixes consistent hangs in DOOM: The Dark Ages.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35254>
(cherry picked from commit 6628ac8ad9)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35412>
2025-06-18 17:55:44 +02:00
Yiwei Zhang
341139a917 venus: force sw wsi path on nv proprietary
We have to force it here, otherwise, if we'd like to preserve the
modifier path, it'd be too late when it falls back to prime blit with
unsupported compositors/envs.

(cherry picked from commit d4cedcd362)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35419>
2025-06-18 17:55:44 +02:00
Erik Faye-Lund
4310da5e50 panfrost: plug leak of modifier conversion shaders
We were allocating these, but never freeing the actual CSOs here.

Let's wire things up so we delete the data when we destroy the
hash-table. Because we don't have access to the context in that
callback, we can't call the pipe-level function to delete a CSO,
but luckily we don't actually need the context for the
driver-logic. So let's add an internal helper for that.

Fixes: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Fixes: f39194cdd3 ("panfrost: support MTK 16L32S detiling")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35336>
(cherry picked from commit fb0a422be2)
2025-06-18 17:55:44 +02:00
Erik Faye-Lund
48c977115c panfrost: do not double-insert shader into hash-table
We were inserting twice here, once without holding the lock before
compiling the shaders, and once after while holding it. Let's remove
the insert without the lock.

Fixes: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35336>
(cherry picked from commit cc66651fc1)
2025-06-18 17:55:44 +02:00
Ashley Smith
6d69a8eb9a panfrost: Fix shader_clock support for v6+
This code sets PANFROST_JD_REQ_CYCLE_COUNT when using LD_GCLK to enable
shader_clock

Fixes: c1ce2dcc ("pan/bi: Enable ARB_shader_clock extension support")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35363>
(cherry picked from commit 95c508d950)
2025-06-18 17:55:44 +02:00
Boris Brezillon
9297d6e9a6 pan/afrc: Reject AFRC(compressed)
This is not a valid combination.

Fixes: 2dae926850 ("panfrost: add utils for AFRC fixed-rate support")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
(cherry picked from commit b65b621062)
2025-06-18 17:55:44 +02:00
Boris Brezillon
433a8626db pan/afrc: Let's not pretend we support AFRC(YUV)
Not only the is_yuv() check in pan_afrc_get_format_info() didn't work,
because we use the multiplanar-RGB variants in panfrost, but we also
need the plane index to pick the right format.

Let's just assume AFRC(YUV) is not supported until someone decides to
add the necessary bits.

Fixes: 2dae926850 ("panfrost: add utils for AFRC fixed-rate support")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
(cherry picked from commit bba62e047e)
2025-06-18 17:55:44 +02:00
Boris Brezillon
8f2192f460 pan/afrc: Fix pan_format_supports_afrc()
pan_format_supports_afrc() returns true for formats that are then
rejected by pan_afrc_get_format_info(). Let's reconcile the two
helpers by using pan_afrc_get_format_info() to check for AFRC support.

Fixes: 894657a5ed ("panfrost: add support for AFRC modifiers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
(cherry picked from commit fc92caf216)
2025-06-18 17:55:44 +02:00
Georg Lehmann
afbda6b431 radv: don't accidentally expose samplerFilterMinmax through Vulkan 1.2
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35339>
(cherry picked from commit 297fdc6636)
2025-06-18 17:55:44 +02:00
Jose Maria Casanova Crespo
d17f1adcb3 v3d: Force job submit if the number of attached BOs is over 2048
At draw time, if the number of BOs is bigger than 2048, the current
job submission is forced.

The 2048 limit has been validated to be big enough to not be reached
in most of the scenarios. Only a couple of CTS tests get over this
threshold.

So the new V3D_JOB_MAX_BO_HANDLE_COUNT is defines as 2048 and
V3D_JOB_MAX_BO_REFERENCED_SIZE is defined as 768MB.

This forced submission is useful to handle scenarios where the client
application is not calling glFlush() or where SwapBuffers() is a NOP
because of not having a window surface. In this case, the CLE can
grow indefinitely until the system runs out of memory resources.
This approach is followed by different drivers forcing the flush
of CL when it reaches a defined size because of HW limitations.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12227
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35042>
(cherry picked from commit ed16884bfa)
2025-06-18 17:55:44 +02:00
Jose Maria Casanova Crespo
662f89fb9b v3d: Only apply TLB load invalidation on first job after FB state update
Mark when at least one job for the current active FBO has already been
submitted since the last framebuffer state update.

With this we can apply TLB load invalidation only to the first
job that is submitted to the same FBO. Not applying TLB
loads invalidation on follow-up jobs targeting the same framebuffer
state.

With this we avoid doing incorrect invalidations when we force
a job submission for a reason not related with a new framebuffer bind.

Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35042>
(cherry picked from commit 6ff509593c)
2025-06-18 17:55:44 +02:00
Rhys Perry
aad33936b6 aco: set vmem_types for args_pending_vmem
fossil-db (gfx1201):
Totals from 0 (0.00% of 79653) affected shaders:

fossil-db (navi31):
Totals from 11 (0.01% of 79653) affected shaders:
Instrs: 4543 -> 4554 (+0.24%)
CodeSize: 23256 -> 23300 (+0.19%)

fossil-db (navi21):
Totals from 8 (0.01% of 79653) affected shaders:
Instrs: 2333 -> 2341 (+0.34%)
CodeSize: 12328 -> 12360 (+0.26%)

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/34978>
(cherry picked from commit 62a9b4b976)
2025-06-18 17:55:44 +02:00
Alyssa Rosenzweig
b2b0f17d80 hk: fix texture state count
default is 256 which is not what we want! perf issue maybe.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
(cherry picked from commit 3c5c3d7819)
2025-06-18 17:55:44 +02:00
Alyssa Rosenzweig
b6313f2f42 agx: fix sample_mask packing overflow
identified with new disassembler. truncated immediate masks to 63

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
(cherry picked from commit c16bb0365a)
2025-06-18 17:55:43 +02:00
David Rosca
2f067ac630 radeonsi/vcn: Fix encoding multiple tiles with recent VCN4 firmwares
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35369>
(cherry picked from commit c72987350b)
2025-06-18 17:55:43 +02:00
Lionel Landwerlin
c68292dea9 anv: fix pool allocation failure reporting
When resetting the pool, also reset the allocated size so that failure
to allocation correctly reports VK_ERROR_OUT_OF_POOL_MEMORY instead of
VK_ERROR_FRAGMENTED_POOL.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12690
Tested-by: David Gow <david@ingeniumdigital.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35360>
(cherry picked from commit 426ddb4fc9)
2025-06-18 17:55:43 +02:00
Calder Young
9ebeef8ef3 anv: Support render to aspect other than IMAGE_ASPECT_COLOR_BIT
On ANV the vkCmdBeginRendering function was hard coded to use
VK_IMAGE_ASPECT_COLOR_BIT for all color attachments, instead of using
the aspect bit specified when the vkImageView was initialized, which
made it impossible for applications to render to views of multi-planar
formats like VK_FORMAT_G8_B8R8_2PLANE_420_UNORM correctly.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13221
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35340>
(cherry picked from commit 57c5419bbd)
2025-06-18 17:55:43 +02:00
Mike Blumenkrantz
f9cf332fa7 zink: update renderdoc layer string for android
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35350>
(cherry picked from commit 1ad37360de)
2025-06-18 17:55:43 +02:00
Mike Blumenkrantz
8fa2cd2fee nir/lower_to_scalar: fix opt_varying with output reads
no_varying cannot be used to eliminate stores on locations which may
be subsequently read

Fixes: 0058989357 ("nir/lower_io_to_scalar: don't create output stores that have no effect")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35325>
(cherry picked from commit 208450fc57)
2025-06-18 17:55:43 +02:00
Eric Engestrom
aa060b69cb .pick_status.json: Mark dca392b119 as denominated 2025-06-18 17:55:43 +02:00
Dave Airlie
d23eb781f3 Revert "hasvk/elk: stop turning load_push_constants into load_uniform"
This reverts commit b036d2ded2.

This seems to break gtk4 and other stuff.

Cc: mesa-stable
(taking ack from Lionel saying we should revert)

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35407>
(cherry picked from commit 870b8717b2)
2025-06-18 17:55:43 +02:00
Eric Engestrom
e8357d486d .pick_status.json: Update to 034ac06c64 2025-06-18 17:55:39 +02:00
Eric Engestrom
c9d5ec71fe docs: add sha sum for 25.1.3 2025-06-07 16:01:08 +02:00
Eric Engestrom
ba95e694fe VERSION: bump for 25.1.3 2025-06-07 15:47:15 +02:00
Eric Engestrom
61c5f9319d docs: add release notes for 25.1.3 2025-06-07 15:47:14 +02:00
Samuel Pitoiset
e3637cdb69 radv,radeonsi: fix emitting UPDATE_DB_SUMMARIZER_TIMEOUT on GFX12
Not all PFP firmwares for GFX12 have this packet.

Fixes: 47f5d25f93 ("radv,radeonsi: emit UPDATE_DB_SUMMARIZER_TIMEOUT on GFX12")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13312
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35370>
(cherry picked from commit babeb975c4)
2025-06-07 15:44:17 +02:00
Eric Engestrom
a3c110e9d6 .pick_status.json: Update to 16dbcd9b04 2025-06-07 15:44:14 +02:00
Eric Engestrom
98320e5ca2 docs: add sha sum for 25.1.2 2025-06-04 20:12:14 +02:00
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
Mark Collins
93547d45ce ir3/a7xx: Add post-RA pass to track liveness and insert (last)
Introduces a backwards dataflow analysis pass to determine when a
certain register is always written to prior to being read in a
similar manner to SSA liveness but performed after RA which we can
use to determine when we can insert (last) on src regs on A7XX.

Passing VK-CTS: dEQP-VK.pipeline.*

Signed-off-by: Mark Collins <mark@igalia.com>
Co-Authored-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25077>
2025-04-16 07:40:50 +00:00
David Rosca
6586689661 radeonsi/vpe: Use studio range for YUV and full for RGB by default
If application doesn't specify color range, use studio for YUV and
full for RGB.
Also stop always forcing full for RGB as that's wrong.

Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34519>
2025-04-16 07:17:57 +00:00
David Rosca
1a502fcd89 radeonsi/vpe: Fix process_frame return value
VPE_STATUS_OK is 1, but the function should return 0 on success.

Fixes: 4fe586f71e ("radeonsi/vpe: support geometric scaling")
Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34519>
2025-04-16 07:17:56 +00:00
David Rosca
bd6f9e8aee radeonsi/vpe: Use float division to get scaling ratio
Fixes: e85a6b6a63 ("radeonsi/vpe: check reduction ratio")
Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34519>
2025-04-16 07:17:56 +00:00
Samuel Pitoiset
b4940255ed radv/sdma: add support for compression on GFX12
Similar to previous generations that support compression, except that
the driver don't need to configure a meta VA because DCC is completely
transparent to the userspace.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517>
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
efa0b16bb2 radv/sdma: add a new flag to know if the surface is compressed
On GFX12, DCC is transparent to the driver and there is no meta VA.
Adding a new flag to know if the SDMA surface is compressed is needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517>
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
03671ccf9e radv/sdma: use the correct helper to get the number type field
This wasn't technically incorrect because V_028C70_BU_NUM_xxx values
are similar to V_028C70_NUMBER_xxx but it's better to use the corect
helper.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517>
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
b44dc98cde radv/sdma: remove redundant check for compression when getting metadata
It's already checked by the caller.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517>
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
d3d5d2fe86 radv/sdma: use SDMA5_DCC_xxx bitfields
It's cleaner.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517>
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
f44342199a radv/sdma: simplify configuring the number of uncompressed DCC blocks
SDMA doesn't support MSAA, so the value can be
V_028C78_MAX_BLOCK_SIZE_256B.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517>
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
13db408e59 ac/perfcounter: add support for GFX12
Sourced from PAL to add SPM support.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34524>
2025-04-16 06:35:33 +00:00
Samuel Pitoiset
c42d43e8eb radv: print more error messages during SPM initialization
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34524>
2025-04-16 06:35:33 +00:00
Marek Olšák
177427877b radeonsi: use nir_opt_shrink_vectors
It reduces VGPR usage, but the impact is almost none.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
b7eff9cd87 radeonsi: always scalarize shared memory instructions
to get ds_load_2addr/ds_store_2addr more often and to prevent code size
regressions from nir_opt_shrink_vectors.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
78cacfd9ce ac/surface: select 3D tile mode without overallocating too much for gfx6-8
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12466
Fixes: c87ce78d - ac/surface: enable thick tiling for 3D textures for better perf on gfx6-8

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
195e7b4f75 ac/surface: make gfx12_estimate_size reusable by gfx6
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12466
Fixes: c87ce78d - ac/surface: enable thick tiling for 3D textures for better perf on gfx6-8

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
2c122d478b ac/nir: set X=0 for task->mesh shader dispatch when Y or Z is 0
The code set X=0 when Y and Z is 0, not "or".

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
963147d7fd ac/gpu_info: add 256 to payload_entry_size to increase future task shader perf
It has no effect because num_entries is 1K, but the table shows a lot of
potential.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
d7c903f258 ac/gpu_info: add payload_entry_size into ac_task_info
to stop causing full RADV recompiles when it's changed.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
0dafd04695 ac/gpu_info: remove has_tmz_support function
It's not needed since:
    8b3056343f - ac/gpu_info: bump required DRM minor version to 3.42.0 (kernel 5.15+)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Marek Olšák
0be5a3559a ac/gpu_info: increase the attribute ring size for gfx12
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432>
2025-04-16 06:08:48 +00:00
Ian Romanick
e783930b10 elk/algebraic: Don't optimize float SEL.CMOD to MOV
Floating point SEL.CMOD may flush denorms to zero. We don't have enough
information at this point in compilation to know whether or not it is
safe to remove that.

Integer SEL or SEL without a conditional modifier is just a fancy
MOV. Those are always safe to eliminate.

See also 3f782cdd25.

Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192>
2025-04-15 23:59:31 +00:00
Ian Romanick
f4ede9c10a elk/algebraic: Clear condition modifier on optimized SEL instruction
The condition modifier on SEL means something completely different than
it means on MOV.  On MOV it means to modify the flags based on the value
written to the destination. On SEL it means to compare the sources using
that mode and pick the result (i.e., as min() or max()) without
modifying the flags.

The resulting MOV should not have a condition modifier for the same
reason it (already) doesn't have a predicate. This bug was found by
inspection, so I added a unit test.

Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192>
2025-04-15 23:59:31 +00:00
Ian Romanick
6a19d8915f brw/algebraic: Don't optimize float SEL.CMOD to MOV
Floating point SEL.CMOD may flush denorms to zero. We don't have enough
information at this point in compilation to know whether or not it is
safe to remove that.

Integer SEL or SEL without a conditional modifier is just a fancy
MOV. Those are always safe to eliminate.

See also 3f782cdd25.

Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")

No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209903490 -> 209903492 (+0.00%)
Cycle count: 30546025224 -> 30546021980 (-0.00%); split: -0.00%, +0.00%
Max live registers: 65516231 -> 65516235 (+0.00%)

Totals from 2 (0.00% of 706657) affected shaders:
Instrs: 3197 -> 3199 (+0.06%)
Cycle count: 361650 -> 358406 (-0.90%); split: -10.05%, +9.15%
Max live registers: 300 -> 304 (+1.33%)

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192>
2025-04-15 23:59:31 +00:00
Ian Romanick
07dc1d4043 brw/algebraic: Clear condition modifier on optimized SEL instruction
The condition modifier on SEL means something completely different than
it means on MOV.  On MOV it means to modify the flags based on the value
written to the destination. On SEL it means to compare the sources using
that mode and pick the result (i.e., as min() or max()) without
modifying the flags.

The resulting MOV should not have a condition modifier for the same
reason it (already) doesn't have a predicate. This bug was found by
inspection, so I added a unit test.

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

Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192>
2025-04-15 23:59:31 +00:00
Ian Romanick
1d2ebeca17 nir/algebraic: Allow fmin(a,a) optimization when flush denorm to zero is not set
I was surprised this had any affect on Intel GPUs because we have been
unconditionally performing this optimization in the backend since June
2014.

Once that error is fixed (later in this MR), this change prevents a
couple dozen regressions in shader-db and around 90 regressions in
fossil-db. Many of the regressions in fossil-db were loss of SIMD32, and
that can be a big deal.

v2: Add 64-bit too. Suggested by Alyssa.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16970141 -> 16970139 (<.01%)
instructions in affected programs: 40 -> 38 (-5.00%)
helped: 2 / HURT: 0

total cycles in shared programs: 914617580 -> 914617548 (<.01%)
cycles in affected programs: 3428 -> 3396 (-0.93%)
helped: 2 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Cycle count: 30546028462 -> 30546025224 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 237017827 -> 237017731 (-0.00%)

Totals from 83 (0.01% of 706657) affected shaders:
Cycle count: 3042978 -> 3039740 (-0.11%); split: -0.13%, +0.02%
Non SSA regs after NIR: 78997 -> 78901 (-0.12%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192>
2025-04-15 23:59:31 +00:00
Faith Ekstrand
44b01b55d5 nvk: Handle shifted QMD cbuf addrs in indirect command processing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443>
2025-04-15 23:38:54 +00:00
Faith Ekstrand
8b2f0be254 nak/qmd: Add QMD version 4.0 for Hopper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443>
2025-04-15 23:38:54 +00:00
Faith Ekstrand
a62c59d7e0 nak/qmd: Add support for shifted cbuf addresses
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443>
2025-04-15 23:38:54 +00:00
Faith Ekstrand
7050a285a3 nak/qmd: Rework cbuf size suffix handling
Addresses will also be shifted starting with QMD version 4.0 and we'll
need something a little more general for that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443>
2025-04-15 23:38:54 +00:00
Faith Ekstrand
c8a5086213 nvk: Disable VK_EXT_descriptor_buffer pre-Maxwell
Our strategy of covering the entire address space in buffer views
requires that we be able to create very large buffer views.  The
pre-Maxwell texture unit doesn't allow for this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34542>
2025-04-15 18:03:53 -05:00
Faith Ekstrand
c135bd6542 nak: Get rid of RegRef::zero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538>
2025-04-15 22:17:38 +00:00
Faith Ekstrand
7125b25800 nak/sm70: Add zero_reg() and true_reg() helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538>
2025-04-15 22:17:38 +00:00
Faith Ekstrand
c4452c5fa4 nak/sm50: Add zero_reg() and true_reg() helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538>
2025-04-15 22:17:38 +00:00
Faith Ekstrand
32570924cf nak: Move some legalization helpers from sm50 to common code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538>
2025-04-15 22:17:38 +00:00
Dave Airlie
6a4c1ac464 nak: add F2FP to sm75 instr latencies
hw_tests found this was missing, copy it from Ampere.

Fixes: 6b8a4e6bb7 ("nak: Add Turing latency information")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34537>
2025-04-15 21:56:55 +00:00
Ryan Mckeever
1efa53ac17 panvk: shaderStorageImageWriteWithoutFormat support
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787>
2025-04-15 21:30:41 +00:00
Ryan Mckeever
e79a568442 panvk: shaderStorageImageReadWithoutFormat support
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787>
2025-04-15 21:30:41 +00:00
Ryan Mckeever
70b8056df1 panvk: Enable KHR_format_feature_flags2 and use them
We need to enable this to use
VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT and
VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787>
2025-04-15 21:30:41 +00:00
Ryan Mckeever
d95423686f pan/format: Add PAN_BIND_STORAGE_IMAGE flag
The HW does not support STORAGE_IMAGE for all formats that can be sampled
or used as render targets. The HW does not support STORAGE_TEXEL_BUFFER
for all formats that can be used as render targets.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787>
2025-04-15 21:30:41 +00:00
Ryan Mckeever
b9a9798c46 pan/format: Update format flags to follow HW spec
Fixes: 861e7dca ("panfrost: Switch formats to table")

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787>
2025-04-15 21:30:41 +00:00
Faith Ekstrand
58321cf2e5 nak: Add stubs for Fermi and Kepler A
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34536>
2025-04-15 16:04:10 -05:00
Faith Ekstrand
c0cd01241a nak: Add stubs for Kepler B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34536>
2025-04-15 16:04:10 -05:00
Faith Ekstrand
af6093a712 nak/legalize: Add a helper for lowering ineg
This is similar to the helper we have for lowering float modifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34536>
2025-04-15 16:04:09 -05:00
Faith Ekstrand
d16e75e55f nak: Lower texture inputs for Kepler B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535>
2025-04-15 20:02:52 +00:00
Faith Ekstrand
9c5a0eca95 nak: Add False and True to IntCmpOp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535>
2025-04-15 20:02:52 +00:00
Faith Ekstrand
eb4fb70bae nak: Add a plop2 test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535>
2025-04-15 20:02:52 +00:00
Faith Ekstrand
e84f210362 nak/hw_tests: Feed predicate/carry sources with 0/1 data
Instead of doing the &1 on the GPU, do it on the CPU.  This saves an
instruction and also makes things easier to debug.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535>
2025-04-15 20:02:51 +00:00
Erik Faye-Lund
26a4a2ee18 docs/panvk: add missing new features
We missed these from the release notes, let's add them.

Fixes: fbb2805575 ("panvk: Advertise KHR_dynamic_rendering_local_read support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:54:09 +02:00
Erik Faye-Lund
c6025f6cb6 docs/panvk: document EXT extension aswell
We're supporting both, let's mention both in the release notes.

Fixes: 4fabd37a3c ("panvk: enable KHR_line_rasterization support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
469985cfa4 docs/panvk: document ycbr in terms of extensions
We usually document these features in terms of extensions when they
exist, so let's do that here too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
37e75da005 docs/panvk: add VK_-prefix for extension name
We're using the VK_-prefix elsewhere, let's be consistent.

Fixes: d4797b8ab7 ("panvk: enable KHR_spirv_1_4 on v10+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
d5fce25fb0 docs/panvk: fixup docs around float controls
We both misnamed the extension, and missed the v10+ detail for the
second version.

Fixes: 22fa3e88dd ("panvk: advertise VK_KHR_float_controls2")
Fixes: 7612dc4713 ("panvk: advertise VK_KHR_shader_float_controls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
68669ba0c1 docs/panvk: remove disabled extension
We ended up reverting this one, let's remove it from the release notes
and features.txt.

Fixes: 305925c439 ("panvk: disable VK_KHR_shader_quad_control")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
4efb1dac6b docs/panvk: fixup extension support
This extension is now only supported on PanVK/v10+

Fixes: 23c0d64e24 ("panvk: disable VK_EXT_image_drm_format_modifier for arch < 10")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525>
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
790093f625 panvk: enable dualSrcBlend
This is already implemented, we just didn't report it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34520>
2025-04-15 18:34:36 +00:00
Aleksi Sapon
9301b7098a llvmpipe: improve aniso filtering
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34438>
2025-04-15 18:03:22 +00:00
Eric Engestrom
54bcfb4c1f ci/deqp: fix vulkan video build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34532>
2025-04-15 17:23:05 +00:00
Eric Engestrom
05926cc68b ci: fix image tags indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34532>
2025-04-15 17:23:05 +00:00
David Rosca
f87759d537 radeonsi/video: Remove cs argument from si_video_resize_buffer
Not needed anymore.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34477>
2025-04-15 16:58:59 +00:00
David Rosca
996dbe0ba3 radeonsi/uvd,vce: Don't try to flush cs from buffer_map
There is nothing to do on cs flush anyway. Also remove the dummy
flush callback.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34477>
2025-04-15 16:58:59 +00:00
David Rosca
d12f2c65b1 radeonsi/vcn: Don't try to flush cs from buffer_map
There is nothing to do on cs flush anyway. Also remove the dummy
flush callback.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34477>
2025-04-15 16:58:59 +00:00
David Rosca
ee4d7e98d5 radeonsi/vpe: Don't try to flush cs from buffer_map
cs flush callback is NULL so this will crash when the buffer_map ends
up needing to flush the cs.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34477>
2025-04-15 16:58:59 +00:00
Mary Guillemard
e82e72b5b7 panvk: Fix inverted ZS read flags in DCD2 on v11+
Those flags are negative so it should have been the opposite (no read)

Fixes: 9b4886d6f4 ("panvk: Implement Z/S dependency tracking on v11+")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reported-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34528>
2025-04-15 16:20:47 +00:00
Eric Engestrom
904052a9d8 docs/ci: follow convention of only running jobs by default for Marge
Because `alpine/x86_64_build` references these rules, this commit fixes
that job as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34469>
2025-04-15 15:14:50 +00:00
Eric Engestrom
ddeaa10bfc docs/ci: split pre-merge & merge pipeline rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34469>
2025-04-15 15:14:50 +00:00
Eric Engestrom
6922ef5294 docs/ci: add comment explaining what that long rule actually does
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34469>
2025-04-15 15:14:50 +00:00
Eric Engestrom
bda8692b95 docs/ci: add link to the website preview for convenience
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34469>
2025-04-15 15:14:50 +00:00
Eric Engestrom
33f82078e0 docs/ci: replace deprecated pages job with pages: true
See https://docs.gitlab.com/ci/yaml/#pages

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34469>
2025-04-15 15:14:50 +00:00
Alyssa Rosenzweig
618409a934 agx: switch to common LOD bias lowering
only functional change is a slight instr count regression for cube map txd
because of pass ordering but lol.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34507>
2025-04-15 14:10:50 +00:00
Alyssa Rosenzweig
d53ad63c66 hk: handle lod/min_lod size mismatch
can be hit with the new lod bias lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34507>
2025-04-15 14:10:50 +00:00
Alyssa Rosenzweig
63eb27d166 nir: add sampler LOD bias lowering
this is a cleaned up version of the lowering originally written for asahi, moved
to common code so it can be shared with an upcoming Vulkan implementation (not
honeykrisp).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34507>
2025-04-15 14:10:50 +00:00
Alyssa Rosenzweig
9de7ea875d nir: handle mismatched bias/lod bitsizes
the sampler lod bias lowering uses fp16 for perf on AGX.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34507>
2025-04-15 14:10:49 +00:00
Alyssa Rosenzweig
2e15b42eec nir: unvendor lod_bias(_agx)
this will be useful for other backends.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34507>
2025-04-15 14:10:49 +00:00
Karol Herbst
09896ee79e nouveau: ignore req_input_mem
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Karol Herbst
b3437ffb2f gallium: stop implementing set_compute_resources in various drivers
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Karol Herbst
a2d3cd3df7 gallium: stop using PIPE_BIND_COMPUTE_RESOURCE in drivers
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Karol Herbst
c80e5b5946 gallium: stop filling ir_target in various drivers
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com> (v3d)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Karol Herbst
17b9af42b7 llvmpipe: remove all clover support code
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Karol Herbst
8963defa4f freedreno: remove all clover support code
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Karol Herbst
d073701a24 iris: remove all clover support code
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34051>
2025-04-15 13:28:27 +00:00
Guilherme Gallo
e5105a8852 ci: Add some unit tests for the duration field
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34478>
2025-04-15 13:04:11 +00:00
Juan A. Suarez Romero
dd3cad2201 ci: include duration in the CustomLogger
Include the difference between start and end times, so it is easy to
check how much time it took.

This can be used for things like ensuring the test phase is under 10
minutes, as suggested in the documentation.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34478>
2025-04-15 13:04:11 +00:00
Mary Guillemard
07b3fedcf0 panfrost: Update the release note to mention G720/G725 addition
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
fb0a8488db panfrost: Advertize Mali-G725 support
We need GPU_FEATURES to determine if this is another variant but this
will do for now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
e7308a3902 panfrost: Advertize Mali-G720 support
We need GPU_FEATURES to determine if this is another variant but this
will do for now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
4950c99dd8 panfrost/ci: Add Mali-G725 current expectations
We don't have CI for this yet but let's document it still.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
d98d4893f5 panfrost/ci: Add Mali-G720 current expectations
We don't have CI for this yet but let's document it still.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
1eef84aaab panfrost: Add v13 support to the Gallium driver
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
1f1c36094b panfrost: Add v12 support to the Gallium driver
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
7a8d0b78e9 panvk: Add v13 support
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
c7b94b098c panvk: Add v12 support
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
9b4886d6f4 panvk: Implement Z/S dependency tracking on v11+
On v11+, Z/S read flags are optionally tracked on DCD2.
With v12+, this behavior is active by default.

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/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
0bcd8f08a9 pan/earlyzs: Default to FORCE_EARLY for ZS update on v11+
This rule changed with v11 and is needed for
"dEQP-VK.fragment_operations.early_fragment.discard_early_fragment_tests_stencil"
to pass.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
168cf64d70 panvk: Use spd variant instead of pos_points when checking for vs shader presence
This result in the same thing and will avoid us needing specific
per-arch checks for v12+.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
5b712e4b2a panfrost: Disable hierarchy levels based on multiple of tile_size
This disable hierachy levels in a more generic way to handle v12+
differences.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
3cdc39ee16 pan/lib: Adapt CRC calculation to align to 64x64 on v12+
The meta tile size changed on v12+ to 64x64 and the same apply to the
checksum region size.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
c191b36456 panvk: Support 64x64 meta tile size for v12 in cmd_preload_render_area_border
On "5th Gen", the meta tile size changed to 64x64.

This adds a new helper to get the meta tile size depending on the
generation.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
1c4be73222 pan/clc: Build for v13
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
250988e963 pan/clc: Build for v12
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
2210eb873a pan/lib: Build for v13
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
9814f2d553 pan/lib: Build for v12
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
49417e6c86 pan/genxml: Build libpanfrost_decode for v13
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Mary Guillemard
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>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Mary Guillemard
ece01443e1 pan/genxml: Add v13 definition
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Mary Guillemard
b6d5e01120 pan/genxml: Add v12 definition
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Mary Guillemard
079426dd62 pan/genxml: Rename UMIN32 opcode to COMPARE_SELECT32
This is the official name, let's match with newer generation too.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Mary Guillemard
2d7c402645 pan/bi: Allow no_psiz variant with IDVS2
This can be supported for IDVS2 and that will reduce arch diffs on panvk
and the Gallium driver.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Mary Guillemard
0f56b59cac pan/bi: Lower IADD.v4s8 in algebraic on v11+
We lowered ISUB.v4s8 but forgot about IADD.v4s8.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:06 +02:00
Erik Faye-Lund
0eb0fd64aa docs/panfrost: use anonymous hyperlinks
These aren't supposed to be referred to from elsewhere, so let's use
anonymous links here instead.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34500>
2025-04-15 11:15:30 +00:00
Erik Faye-Lund
65b7d2e865 panvk: claim official conformance on v10
It's official, PanVK is Vulkan 1.1 conformant on v10. Let's make this
clear.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34500>
2025-04-15 11:15:30 +00:00
Loïc Molinari
9205212d2e mesa: Add CPU traces
A few function scope traces are added to texture management entry
points, shader compilation, draw and 2D rect copy to give better
context to driver traces.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34385>
2025-04-15 10:37:39 +00:00
Loïc Molinari
2bf9b9b73d docs: Add Panfrost to the list of drivers with CPU traces
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34385>
2025-04-15 10:37:39 +00:00
Loïc Molinari
bb63d7cfee pan/kmod: Add drmIoctl() wrapper pan_kmod_ioctl() with CPU trace
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34385>
2025-04-15 10:37:39 +00:00
Loïc Molinari
5cd89d48ee panfrost: Add CPU traces
A few function scope traces are added to instrument blits, clears,
flushes, BOs and resources handling, shader compilation and cache,
draws, compute shader job emissions and AFBC packing.

Give the panfrost_flush_all_batches() call from panfrost_flush() a
more specific reason ("Gallium flush") to improve traces.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34385>
2025-04-15 10:37:39 +00:00
Loïc Molinari
a7727f692f perfetto: Let MESA_TRACE_FUNC() take printf-like format arguments
This can be useful to track different values like buffer sizes, ioctl
ops, etc.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34385>
2025-04-15 10:37:39 +00:00
Collabora's Gfx CI Team
b1af5780d1 Uprev ANGLE to a3f2545f6bb3
3818d37d5e...a3f2545f6b

Also disable -Werror, because we're not necessarily using the same
toolchain or dependencies as the upstream builds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34515>
2025-04-15 10:06:53 +00:00
Collabora's Gfx CI Team
d5f4733702 Uprev Piglit to 0ecdebb0f592
ebdf60e0d4...0ecdebb0f5

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34515>
2025-04-15 10:06:53 +00:00
Erik Faye-Lund
d4797b8ab7 panvk: enable KHR_spirv_1_4 on v10+
The previous fix seems to be all that was needed to enable this, so
let's flip the switch.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34514>
2025-04-15 09:15:29 +00:00
Erik Faye-Lund
e77a815299 panvk: set shared_addr_format
We need to set this, otherwise we end up failing tests.

Fixes: 4e111c259c ("panvk: Lower shared memory")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34514>
2025-04-15 09:15:29 +00:00
Alyssa Rosenzweig
d31db877e2 util/simple_mtx: fix duplicate definition
botched #ifdef in the cited commit caused simple_mtx_t to be defined
twice in certain cases, which broke the docs build.

Fixes: cb31b5a958 ("clc,libcl: Clean up CL includes")
Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34504>
2025-04-15 08:30:40 +00:00
Valentine Burley
75214c599c zink/ci: Work around recent OOM issues in zink-anv-tgl
Lower the concurrency for the zink-anv-tgl job to avoid the out-of-memory
issues seen recently.
Remove the flakes that were added as the previous workaround.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34505>
2025-04-15 06:51:09 +00:00
Samuel Pitoiset
e86e0fc525 radv: allocate the SPM BO in GTT for faster readback
Reading VRAM from CPU is very slow.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34467>
2025-04-15 06:30:38 +00:00
Job Noorman
af8105d085 ir3/ra: ignore phis handled by shared RA
If shared RA is used, it may have handled some phis. These are already
ignored by regular RA in handle_phi but were used before that in
potentially dangerous ways. More specifically, the interval of such phis
was accessed which may cause an out-of-bounds read since it was never
created. Fix this by skipping such phis earlier.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: c6a932d4b3 ("ir3/ra: handle phis with preferred regs first")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34503>
2025-04-15 06:04:04 +00:00
Job Noorman
d8033ba173 ir3/ra: add helper for getting a dst interval
There have been multiple issues related to accessing intervals through
invalid register names. This usually results in a (difficult to
diagnose) out-of-bounds access. Wrap all the interval accesses in a
helper where we can assert that the name is in-bounds.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34503>
2025-04-15 06:04:04 +00:00
Saroj Kumar
384bf8e58e radeonsi: Move buffer descriptor slot to the beginning
Move the buffer descriptor slot to index 0 in 16 dword
image+sampler slot in si_descriptors.c

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34491>
2025-04-14 22:44:14 +00:00
Marek Olšák
dc70e1c198 radeonsi: determine VM_ALWAYS_VALID accurately
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34491>
2025-04-14 22:44:14 +00:00
Marek Olšák
480c8addd8 winsys/amdgpu: don't add VM_ALWAYS_VALID buffers into the BO list
They shouldn't be there.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34491>
2025-04-14 22:44:13 +00:00
Marek Olšák
7f7d6deb18 radeonsi: add ACO-specific main shader parts
We can't have merged shaders where the first part is compiled using ACO
and the second part is compiled using LLVM.

Add ACO-specific main shader parts to fix that.

This happens when ACO is enabled for gfx12 streamout where GS can be paired
with a previous shader compiled by LLVM.

Fixes: 8ba718fb7d - radeonsi/gfx12: use ACO for streamout because it's faster

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34491>
2025-04-14 22:44:13 +00:00
Marek Olšák
4865ac57cc radeonsi: make si_shader_selector::main_shader_part_* an iterable union
for the next commit

Fixes: 8ba718fb7d - radeonsi/gfx12: use ACO for streamout because it's faster

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34491>
2025-04-14 22:44:13 +00:00
Marek Olšák
1adf969318 radeonsi/ci: add gfx12 failures and flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34491>
2025-04-14 22:44:13 +00:00
Jose Maria Casanova Crespo
0bcb82048c v3dv: avoid TFU reading unmapped pages beyond the end of the buffers
TFU units is doing a readahead of 64 bytes. This is causing invalid read
MMU errors that can be observed at the nightly full Vulkan runs on
Broadcom devices.

04:13:59.969: [   85.623205] v3d 1002000000.v3d: MMU error from client TLB (3) at 0x4869000, pte invalid
04:14:05.408: [   91.019321] v3d 1002000000.v3d: MMU error from client TLB (3) at 0x5209000, pte invalid
04:14:05.413: [   91.031662] v3d 1002000000.v3d: MMU error from client TLB (3) at 0x7521000, pte invalid

Although the log reports the TLB the real culprit is the TFU. A fix
to the kernel was submitted to fix AXI ID on V3D 4.2 and 7.1

So doing an over-allocation of 64-bytes at v3dv_AllocateMemory is
the simplest method to make these MMU errors itp disapear.

Running ./deqp-vk for an hour, we can see that ~%40 of allocations
would need an extra page (4096 bytes) to accomodate this 64 bytes
padding.

Fixes: ca330f7f04 ("v3dv: implement VK_EXT_memory_budget")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34475>
2025-04-15 00:17:11 +02:00
Caio Oliveira
fafdd24285 intel/executor: Update bfloat example
Elaborate on the packed/unpack restrictions, use ADD(x, 0.0f)
as a workaround for F->BF conversion.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34506>
2025-04-14 18:23:43 +00:00
Caio Oliveira
fbe5d559bd brw: Update EU validation to allow packed BF mixed with packed F
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34506>
2025-04-14 18:23:43 +00:00
Caio Oliveira
d1dd088ede brw: Allow DPAS with BF on Gfx125
MTL doesn't support, but both ACM and ARL-H do.

Fixes: e384ccde28 ("brw: Expand EU validation for DPAS")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34506>
2025-04-14 18:23:43 +00:00
Caio Oliveira
050acb9def intel: Disable has_bfloat16 for MTL
Not supported.  Some operations *do* work, but proper support
was removed since it also doesn't support DPAS.

Fixes: 9916cc1050 ("brw: Add BRW_TYPE_BF for bfloat16")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34506>
2025-04-14 18:23:43 +00:00
Caio Oliveira
adfab666a4 intel: Add intel_device_info::has_systolic
Gfx125+ has systolic, with exception for MTL and some ARL
variants.  Update code and tests to use it.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34506>
2025-04-14 18:23:43 +00:00
Mike Blumenkrantz
bf5273dd38 ci: update VVL to current week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33651>
2025-04-14 17:51:05 +00:00
Mike Blumenkrantz
0b7611824a zink: use implicit stride in ntv for temp vars
APPARENTLY explicit stride is illegal for temp vars because they should
just be using the element stride implicitly

this makes total sense and is very obvious

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33651>
2025-04-14 17:51:05 +00:00
Mike Blumenkrantz
b4e3535650 zink: stop setting ArrayStride on image arrays
this is illegal

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33651>
2025-04-14 17:51:05 +00:00
Mike Blumenkrantz
1c0de360bc zink: don't set shared block stride without KHR_workgroup_memory_explicit_layout
this is illegal

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33651>
2025-04-14 17:51:05 +00:00
Connor Abbott
74531094cb ir3: Vectorize shared memory loads/stores
This drastically helps a Path of Exile 2 compute dispatch, going from
4.6ms to 2.7ms.
Totals from 969 (0.59% of 164134) affected shaders:
MaxWaves: 9586 -> 9560 (-0.27%); split: +0.02%, -0.29%
Instrs: 1252433 -> 1234724 (-1.41%); split: -1.47%, +0.05%
CodeSize: 2237424 -> 2195238 (-1.89%); split: -1.91%, +0.03%
NOPs: 362213 -> 360913 (-0.36%); split: -0.92%, +0.56%
MOVs: 58879 -> 59591 (+1.21%); split: -0.62%, +1.83%
Full: 15817 -> 15867 (+0.32%); split: -0.04%, +0.36%
(ss): 35671 -> 35434 (-0.66%); split: -1.80%, +1.14%
(sy): 23953 -> 23964 (+0.05%); split: -0.38%, +0.43%
(ss)-stall: 127807 -> 124930 (-2.25%); split: -3.43%, +1.18%
(sy)-stall: 583947 -> 585886 (+0.33%); split: -0.61%, +0.94%

Early-preamble: 317 -> 316 (-0.32%)
Cat0: 394577 -> 393316 (-0.32%); split: -0.85%, +0.53%
Cat1: 100335 -> 101057 (+0.72%); split: -0.36%, +1.08%
Cat2: 415880 -> 415835 (-0.01%); split: -0.05%, +0.04%
Cat3: 187928 -> 187929 (+0.00%); split: -0.00%, +0.00%
Cat5: 19143 -> 19148 (+0.03%)
Cat6: 69630 -> 52523 (-24.57%)
Cat7: 47160 -> 47136 (-0.05%); split: -0.56%, +0.51%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34441>
2025-04-14 17:22:47 +00:00
Connor Abbott
9977c4d682 ir3: Move load/store vectorization to finalize
Some frontends such as rusticl and turnip call the optimization loop
before choosing the shared memory layout, in order to be able to delete
variables that turn out to be unused. This means that we can't vectorize
them until after the first run of the optimization loop. Other drivers
also seem to do something similar.

This also has the benefit that by delaying vectorization of UBOs until
after they are lowered from derefs, we don't insert casts which remove
the ability of nir_lower_explicit_io to insert a range, which was
blocking the pushing of vectorized indirect UBO loads. This has a
significant positive impact on fossil-db:

Only doing vectorization later exposes a bug where vectorization could
change the bitsize after we used it to determine which descriptor to
use. It happened to work before because vectorization was usually done
early. To fix it, move adjusting the descriptor to a new pass that
happens after finalizing.

Totals:
MaxWaves: 2249140 -> 2281068 (+1.42%); split: +1.43%, -0.01%
Instrs: 49624230 -> 49143117 (-0.97%); split: -1.14%, +0.17%
CodeSize: 103796862 -> 104143744 (+0.33%); split: -0.98%, +1.31%
NOPs: 8489860 -> 8512218 (+0.26%); split: -1.55%, +1.81%
MOVs: 1531650 -> 1574911 (+2.82%); split: -1.37%, +4.20%
Full: 1814334 -> 1748906 (-3.61%); split: -3.64%, +0.03%
(ss): 1155395 -> 1128249 (-2.35%); split: -3.48%, +1.13%
(sy): 608650 -> 567972 (-6.68%); split: -7.32%, +0.64%
(ss)-stall: 4352550 -> 4340473 (-0.28%); split: -2.08%, +1.80%
(sy)-stall: 17852259 -> 16943647 (-5.09%); split: -6.25%, +1.16%
STPs: 24568 -> 24215 (-1.44%)
LDPs: 37799 -> 37468 (-0.88%)
Early-preamble: 115698 -> 113694 (-1.73%); split: +0.17%, -1.90%
Cat0: 9345228 -> 9367782 (+0.24%); split: -1.41%, +1.65%
Cat1: 2445265 -> 2549122 (+4.25%); split: -0.81%, +5.06%
Cat2: 18704736 -> 18377519 (-1.75%); split: -1.76%, +0.01%
Cat3: 14210303 -> 14130558 (-0.56%); split: -0.56%, +0.00%
Cat4: 1346895 -> 1346462 (-0.03%); split: -0.03%, +0.00%
Cat5: 1420418 -> 1420417 (-0.00%); split: -0.07%, +0.07%
Cat6: 745590 -> 549358 (-26.32%); split: -26.66%, +0.34%
Cat7: 1405795 -> 1401899 (-0.28%); split: -0.96%, +0.68%

Totals from 79089 (48.19% of 164134) affected shaders:
MaxWaves: 947648 -> 979576 (+3.37%); split: +3.40%, -0.03%
Instrs: 38664140 -> 38183027 (-1.24%); split: -1.47%, +0.22%
CodeSize: 80179110 -> 80525992 (+0.43%); split: -1.27%, +1.70%
NOPs: 6880907 -> 6903265 (+0.32%); split: -1.91%, +2.23%
MOVs: 1183855 -> 1227116 (+3.65%); split: -1.78%, +5.43%
Full: 1107056 -> 1041628 (-5.91%); split: -5.96%, +0.05%
(ss): 939342 -> 912196 (-2.89%); split: -4.28%, +1.39%
(sy): 457959 -> 417281 (-8.88%); split: -9.73%, +0.85%
(ss)-stall: 3664495 -> 3652418 (-0.33%); split: -2.47%, +2.14%
(sy)-stall: 12266805 -> 11358193 (-7.41%); split: -9.10%, +1.69%

STPs: 7494 -> 7141 (-4.71%)
LDPs: 7050 -> 6719 (-4.70%)
Early-preamble: 46339 -> 44335 (-4.32%); split: +0.43%, -4.75%
Cat0: 7548630 -> 7571184 (+0.30%); split: -1.75%, +2.05%
Cat1: 1823872 -> 1927729 (+5.69%); split: -1.09%, +6.78%
Cat2: 14767716 -> 14440499 (-2.22%); split: -2.22%, +0.01%
Cat3: 10630582 -> 10550837 (-0.75%); split: -0.75%, +0.00%
Cat4: 1150090 -> 1149657 (-0.04%); split: -0.04%, +0.00%
Cat5: 1068913 -> 1068912 (-0.00%); split: -0.09%, +0.09%
Cat6: 554910 -> 358678 (-35.36%); split: -35.82%, +0.45%
Cat7: 1119427 -> 1115531 (-0.35%); split: -1.20%, +0.86%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34441>
2025-04-14 17:22:46 +00:00
Connor Abbott
2f93137308 nir/opt_preamble: Handle load_global_ir3
fossil-db results with turnip:

Totals from 994 (0.60% of 165023) affected shaders:
MaxWaves: 10720 -> 11528 (+7.54%); split: +7.57%, -0.04%
Instrs: 1032004 -> 972314 (-5.78%); split: -5.99%, +0.21%
CodeSize: 1847536 -> 1942472 (+5.14%); split: -0.11%, +5.25%
NOPs: 261089 -> 233279 (-10.65%); split: -10.89%, +0.23%
MOVs: 57217 -> 51434 (-10.11%); split: -14.11%, +4.00%
Full: 16412 -> 14647 (-10.75%); split: -10.96%, +0.21%
(ss): 23330 -> 25594 (+9.70%); split: -5.51%, +15.21%
(sy): 17803 -> 15711 (-11.75%); split: -11.93%, +0.18%
(ss)-stall: 96387 -> 107976 (+12.02%); split: -5.14%, +17.17%
(sy)-stall: 952952 -> 765754 (-19.64%); split: -19.84%, +0.19%

STPs: 494 -> 327 (-33.81%)
LDPs: 1447 -> 1163 (-19.63%)
Early-preamble: 668 -> 22 (-96.71%)
Cat0: 280935 -> 251779 (-10.38%); split: -10.60%, +0.22%
Cat1: 93400 -> 84766 (-9.24%); split: -11.79%, +2.55%
Cat2: 343880 -> 337270 (-1.92%); split: -3.20%, +1.28%
Cat3: 189311 -> 180918 (-4.43%)
Cat4: 21008 -> 19920 (-5.18%)
Cat5: 17788 -> 17783 (-0.03%)
Cat6: 45786 -> 39531 (-13.66%)
Cat7: 39896 -> 40347 (+1.13%); split: -0.43%, +1.56%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34483>
2025-04-14 16:53:34 +00:00
Connor Abbott
ec780eb0e7 ir3: Pass through access flags when lowering global accesses
This will let us do optimizations such as moving loads to a preamble.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34483>
2025-04-14 16:53:34 +00:00
Boris Brezillon
b7ff9dddd4 pan/earlyzs: Fix the read-only ZS optimization
Read-only ZS optimization can only happen if the ZS tile buffer is not
written, which can only be known when the fixed-function settings is
set.

Change pan_earlyzs_get() to take an enum instead of a boolean and
differentiate ZS-read and ZS-read-with-readonly-optimization-allowed.

Fixes: 25a993731087 ("pan/earlyzs: Support the shader ZS read-only case and its optimization on v10+")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34480>
2025-04-14 15:20:06 +00:00
Eric R. Smith
69a6db4b2b panfrost: fix transaction elimination crc valid calculation
The setting of the clean_pixel_write_enable flag in pan_prepare_rt
was not consistent with the crc valid calculations in pan_emit_fbd.
This caused the crc_valid flag to not be accurate, causing transaction
elimination to fail.

Fixes: eac8f1d460 ("Revert "panfrost: Disable CRC by default"")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34408>
2025-04-14 14:56:35 +00:00
Adam Jackson
c4b305079d meson: Simplify the power8 optimization logic
If it compiles, it works. And there's not a particularly good reason to
disable it, so don't let people disable it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34239>
2025-04-14 14:12:30 +00:00
Maíra Canal
3122df666e broadcom/simulator: Fix Indirect CSD jobs for V3D 7.1.6+
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34465>
2025-04-14 12:13:30 +00:00
Maíra Canal
d3ad4e3465 broadcom/simulator: Expose V3D revision number in the simulator interface
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34465>
2025-04-14 12:13:30 +00:00
Erik Faye-Lund
1d5da22dfd nir/lower_tex: avoid undefined-behavior
When texture_index and sampler_index are over 32, we can't really check
for them in a single 32-bit word. This happens among other things when
Panfrost uses preload shaders on v9 and later. Otherwise, we trigger
undefined behavior.

We're already doing this for textures in one case, let's be consistent.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34365>
2025-04-14 11:22:43 +00:00
Erik Faye-Lund
41b136f674 nir/lower_tex: use texture_mask instead of shifting on use
In commit 292ac71a4a ("nir/lower_tex: handle deref casts"), we avoided
using texture_index when a texture instruction contained a variable
deref. There's no good reason why this should be done to some of the
lowering, but not all.

So let's fix up code-paths that were added after this change to do the
same.

The first two patches here crossed paths with the commit that introduced
texture_mask, so it's not strange that the change was missed. The last
one seems to have just copied what was done around it, propagating the
issue.

Fixes: 880b00dc59 ("nir/lower_tex: Add support for lowering YUYV formats")
Fixes: 1358d93650 ("nir/lower_tex: Add support for lowering Y41x formats")
Fixes: 65d6f5aed2 ("nir: add options to lower y_vu, yv_yu, yx_xvxu and xy_vxux")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34365>
2025-04-14 11:22:43 +00:00
Vignesh Raman
8e069e1ef9 ci: Uprev kernel to 6.14
Move to 6.14 for all mesa-ci jobs using gfx-ci/linux, except anv-jsl, and
Raven.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34401>
2025-04-14 10:53:50 +00:00
Philipp Zabel
39855a8fd1 teflon: Log (un)supported operations
Log all operations with the information used to decide whether they
are supported or unsupported. Include tensor data types, conv2d fused
activation and dilation parameters to debug output.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34472>
2025-04-14 10:33:38 +00:00
Philipp Zabel
f23b376e84 etnaviv/ml: Fix padding input/output tensor zero points
For tensors that were converted from signed 8-bit tensors to unsigned
8-bit tensors with offset zero point, use the offset zero point also
for the TP pad operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34474>
2025-04-14 09:16:29 +00:00
Philipp Zabel
13a120d13c etnaviv/ml: Drop duplicated function reorder_for_hw_depthwise()
This function is unused, remove it.
An identical copy is found (and used) in etnaviv_ml_nn.c.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34471>
2025-04-14 08:59:15 +00:00
Samuel Pitoiset
8ea46b14fa ci: update VKCTS main to 76c1572eaba42d7ddd9bb8eb5788e52dd932068e
RADV is the only driver using VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34299>
2025-04-14 08:24:14 +00:00
Samuel Pitoiset
410f7f9f6e radv: only enable DCC for invisible VRAM on GFX12
DCC should only be allowed on invisible VRAM, otherwise the CPU could
read the data and it will read garbage if it's compressed.

This also caused GPU hangs after suspend/resume probably because
some buffers were compressed when moved back from GTT to VRAM.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12962
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12922
Fixes: 9af11bf306 ("radv: add initial DCC support on GFX12")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34347>
2025-04-14 07:39:33 +00:00
Samuel Pitoiset
75be860eec radv: use paired context regs when optimal on GFX12
CP is very slow on GFX12 and parsing the packet header is the main
bottleneck. Using paired context regs reduce the number of packet
headers and it should be more optimal.

It doesn't seem worth when only one context reg is emitted (one packet
header and same number of DWORDS) or when consecutive context regs are
emitted (would increase the number of DWORDS).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34421>
2025-04-14 06:18:13 +00:00
Samuel Pitoiset
f92f50c58a radv: add macros for paired context registers on GFX12
Imported from RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34421>
2025-04-14 06:18:13 +00:00
Job Noorman
35ec960f6f ir3: run cp after ir3_imm_const_to_preamble
Now that ir3_cp has an option to not lower immediates to const
registers, we can use it after ir3_imm_const_to_preamble instead of
manually propagating immediates.

This fixes a lot of missed opportunities for early-preamble as we didn't
propagate the mova1 immediate which a caused a GPR to be used in many
preambles.

Totals:
Instrs: 49704517 -> 49703700 (-0.00%); split: -0.16%, +0.16%
CodeSize: 103917968 -> 103187072 (-0.70%); split: -0.82%, +0.11%
NOPs: 8516944 -> 8511764 (-0.06%); split: -0.78%, +0.72%
MOVs: 1534023 -> 1536385 (+0.15%); split: -1.12%, +1.27%
Full: 1816517 -> 1816548 (+0.00%); split: -0.05%, +0.06%
(ss): 1162108 -> 1161490 (-0.05%); split: -1.03%, +0.98%
(sy): 611398 -> 610311 (-0.18%); split: -0.80%, +0.62%
(ss)-stall: 4384529 -> 4388096 (+0.08%); split: -1.22%, +1.30%
(sy)-stall: 17858701 -> 17837101 (-0.12%); split: -0.87%, +0.74%
STPs: 25096 -> 25491 (+1.57%); split: -0.05%, +1.63%
LDPs: 37635 -> 38030 (+1.05%); split: -0.03%, +1.08%
Preamble Instrs: 12589113 -> 11391946 (-9.51%); split: -9.75%, +0.24%
Early Preamble: 115946 -> 122893 (+5.99%); split: +6.05%, -0.06%
Cat0: 9374513 -> 9370393 (-0.04%); split: -0.71%, +0.67%
Cat1: 2443348 -> 2446546 (+0.13%); split: -0.82%, +0.95%
Cat2: 18731502 -> 18731478 (-0.00%); split: -0.00%, +0.00%
Cat7: 1410092 -> 1410221 (+0.01%); split: -0.61%, +0.62%

Totals from 39189 (23.81% of 164575) affected shaders:
Instrs: 30656115 -> 30655298 (-0.00%); split: -0.26%, +0.26%
CodeSize: 61714230 -> 60983334 (-1.18%); split: -1.37%, +0.19%
NOPs: 6074700 -> 6069520 (-0.09%); split: -1.10%, +1.01%
MOVs: 1010392 -> 1012754 (+0.23%); split: -1.70%, +1.93%
Full: 617108 -> 617139 (+0.01%); split: -0.16%, +0.16%
(ss): 778842 -> 778224 (-0.08%); split: -1.54%, +1.46%
(sy): 362803 -> 361716 (-0.30%); split: -1.35%, +1.05%
(ss)-stall: 3203827 -> 3207394 (+0.11%); split: -1.67%, +1.78%
(sy)-stall: 9507680 -> 9486080 (-0.23%); split: -1.63%, +1.40%
STPs: 23004 -> 23399 (+1.72%); split: -0.06%, +1.77%
LDPs: 33942 -> 34337 (+1.16%); split: -0.04%, +1.20%
Preamble Instrs: 8090918 -> 6893751 (-14.80%); split: -15.18%, +0.38%
Early Preamble: 12246 -> 19193 (+56.73%); split: +57.25%, -0.52%
Cat0: 6656706 -> 6652586 (-0.06%); split: -1.00%, +0.94%
Cat1: 1546399 -> 1549597 (+0.21%); split: -1.30%, +1.50%
Cat2: 11642214 -> 11642190 (-0.00%); split: -0.00%, +0.00%
Cat7: 943911 -> 944040 (+0.01%); split: -0.91%, +0.92%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34397>
2025-04-14 04:37:28 +00:00
Job Noorman
226ec669d8 ir3/cp: ignore alias sources for sam.s2en
ir3_cp asserts that the first source of a sam.s2en is a collect which
isn't necessarily true after creating alias registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34397>
2025-04-14 04:37:28 +00:00
Job Noorman
1618c2495b ir3/cp: add option to disable immediate to const lowering
This will allow it to be used after ir3_imm_const_to_preamble so that we
don't have to do the propagation of immediates manually there.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34397>
2025-04-14 04:37:27 +00:00
Job Noorman
6546a40225 ir3: remove spaces in shader stats
The shaderdb scripts don't like them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34397>
2025-04-14 04:37:27 +00:00
Trigger Huang
1e709dbea3 radeonsi: Change program seqnece for perf counters
Based on the sample usage described in
https://registry.khronos.org/OpenGL/extensions/AMD/AMD_performance_monitor.txt
, the value read from SQ_0004 is always 0, while other counters can be read
successfully.

This patch will sync the program sequence with the following link
https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-2023.Q3.3
With it, SQ_0004 and also other counters can be raed successfully

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34360>
2025-04-14 10:23:46 +08:00
Karol Herbst
fc7badeac0 zink: don't apply the map_offset when mapping a staging resource in zink_buffer_map
Fixes regressions in the OpenCL CTS allocation tests.

Fixes: 5d46e2bf3c ("zink: implement unsynchronized staging uploads for buffers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34494>
2025-04-12 17:42:53 +00:00
Faith Ekstrand
fadac25b0c nil: Multiply by array_stride_B instead of adding
Fixes: 5577128c83 ("nil: Rewrite the TIC code in Rust")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34495>
2025-04-12 17:04:40 +00:00
Faith Ekstrand
5c81b3546f nvk/nvkmd: Check the correct flag for the Kepler GART workaround
Fixes: 1db57bb414 ("nvk/nvkmd: Rework memory placement flags")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34495>
2025-04-12 17:04:40 +00:00
Konstantin Seurer
985f5e0875 lavapipe: Do not emit aabb handling if no isec shader is used
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34003>
2025-04-12 17:22:50 +02:00
Konstantin Seurer
7113620625 lavapipe: pre-load tmax
tmax is lowered to scratch with ray tracing pipelines.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34003>
2025-04-12 17:22:44 +02:00
Konstantin Seurer
c1a620ae19 lavapipe: Run nir optimizations on ray tracing pipelines
Improves performance by 10%.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34003>
2025-04-12 17:22:37 +02:00
Konstantin Seurer
cdb2e3d2b5 lavapipe: Prefetch 56 bytes of node data during ray traversal
Almost all node types need around 56 bytes of data. This patch fetches
this data in a less divergent block.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34003>
2025-04-12 17:22:27 +02:00
Konstantin Seurer
676e26aed5 radv: Fix rayTracingPositionFetch with multiple geometies
The fix adds more indirections to avoid increasing register pressure by
tracking the primitive address.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34460>
2025-04-11 22:26:08 +00:00
Aleksi Sapon
77eb58baad draw: fix gl_PrimitiveID in tessellation
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33415>
2025-04-11 22:01:05 +00:00
Konstantin Seurer
cb31b5a958 clc,libcl: Clean up CL includes
This patch does a couple of things to make CL integration with drivers
as seamless as possible:
- We pull in opencl-c.h and opencl-c-base.h to stop relying on system
  headers.
- Parts of libcl.h are moved to new headers that are incomplete CL-safe
  variants of libc headers.
- A couple of util headers are changed to remove now unnecessary
  __OPENCL_VERSION__ guards and make more headers CL safe.
- Drivers now include src/compiler/libcl and use headers like
  macros.h,u_math.h instead of libcl.h.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33576>
2025-04-11 21:27:37 +00:00
Konstantin Seurer
a80fab3e87 clc: Allow bitfields
bitfields are not officially supported by Open CL but there is a clang
extension that adds support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33576>
2025-04-11 21:27:37 +00:00
Konstantin Seurer
ed07aab147 clc: Print errors when initializing clang fails
It's nice to know what actually went wrong.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33576>
2025-04-11 21:27:37 +00:00
Dmitry Baryshkov
b9c6afd3a7 meson: disable SIMD blake optimisations on x32 host
On X.org startup libgallium crashes on x32 hosts inside
blake3_hash_many_sse41(), most likely because of the different pointer
size. Disable SIMD blake implementation if x32 is detected.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34453>
2025-04-11 20:57:38 +00:00
Kenneth Graunke
eb1ec9cf8e brw: Don't assert about MAX_VGRF_SIZE in brw_opt_split_virtual_grfs()
This allows us to create temporary VGRFs that are larger than
MAX_VGRF_SIZE(devinfo), which will be split eventually.  They may not
be split on the initial pass, because we may need LOAD_PAYLOAD lowering,
copy propagation, and so on to occur first.  So we allow registers to
exceed that size initially.

The "Register allocation relies on split_virtual_grfs()" assertion in
brw_reg_allocate.cpp still asserts that all VGRFs which reach the
register allocator have been properly split.

One case where this is useful is for vectorizing convergent block loads.
We create temporaries to splat the SIMD1 values out to SIMD(N), which
can lead to some very large temporaries.  However, copy propagation and
so on ultimately eliminate these and they'll get split down to proper
sizes or elided entirely in the end.

(Note: both this and the prior commits from this merge request are
 needed to close the linked issue.)

Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12324
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34461>
2025-04-11 20:34:51 +00:00
Kenneth Graunke
a45583f078 brw: Use live->max_vgrf_size in pre-RA scheduling
Post-RA scheduling doesn't use liveness analysis, so we continue using
MAX_VGRF_SIZE(devinfo).  But for pre-RA scheduling, we now use
live->max_vgrf_size.

This helps get us to a place where we can emit arbitrarily large VGRFs
early on in compilation, but which will be split and cleaned up prior to
register allocation.  It may also allocate smaller arrays in practice
since MAX_VGRF_SIZE(devinfo) assumes the worst case scenario for things
we actually could need to allocate.

Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34461>
2025-04-11 20:34:51 +00:00
Kenneth Graunke
4b27b5895c brw: Use live->max_vgrf_size in register coalescing
We already require liveness, so just use the actual maximum size we saw
instead of a hardcoded pessimal size.

Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34461>
2025-04-11 20:34:51 +00:00
Kenneth Graunke
ea468412f6 brw: Track the largest VGRF size in liveness analysis
We're already looking at this data to calculate the per-component
vars_from_vgrf[] and vgrf_from_vars[] mappings, so just record the
largest VGRF size while we're here.  This will allow passes to size
arrays based on the actual size needed, rather than hardcoding some
fixed size.  In many cases, MAX_VGRF_SIZE(devinfo) is larger than
necessary, because e.g. vec5 sparse sampling results aren't used.
Not hardcoding this means we can also temporarily handle very large
VGRFs which we know will be split eventually, without having to
increase the maximum which is ultimately used for RA classes.

Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34461>
2025-04-11 20:34:51 +00:00
Alyssa Rosenzweig
4a299bea27 hk: drop soft fault assumption in hk_buffer_addr_range
fixes test_index_buffer_edge_case_stream_output without soft fault.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Alyssa Rosenzweig
0f9b396588 hk: advertise sparseResidencyBuffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Alyssa Rosenzweig
4b119b36c8 hk: use ro maps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Alyssa Rosenzweig
f3272ebab8 hk: bind for sparse emulation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Alyssa Rosenzweig
fb71b8a4ee asahi: fix zero bo leak
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Alyssa Rosenzweig
546bc893f1 asahi: add sparse emu helpers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Alyssa Rosenzweig
c2d00c94b1 asahi: shrink VA space for sparse emulation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34486>
2025-04-11 20:16:01 +00:00
Eric Engestrom
1f718c5b0f zink+anv/ci: document a bunch of flaky glx tests that have been preventing merges all day
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34484>
2025-04-11 19:51:10 +00:00
Caio Oliveira
2ed79f80ba nir/load_store_vectorize: Skip new bit-sizes that are unaligned with high_offset
Otherwise this would require combining two values to produce a single
(new bit-size) channel, which vectorize_stores() don't handle.  The pass
can still keep trying smaller bit-sizes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12946
Fixes: ce9205c03b ("nir: add a load/store vectorization pass")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34414>
2025-04-11 19:17:17 +00:00
Caio Oliveira
eaf9371fd5 broadcom/ci: Skip test due to timeout
A later change will cause this test to take more than the
timeout limit, so skip it per maintainers request.
Suggested by Iago.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34414>
2025-04-11 19:17:17 +00:00
José Roberto de Souza
20bf10ba17 drm-uapi: Sync xe_drm.h
Sync with:
commit cf05922d63e2ae6a9b1b52ff5236a44c3b29f78c
Merge: a82866fbecca6 bfef148f3680e
Author: Dave Airlie <airlied@redhat.com>

    Merge tag 'drm-intel-gt-next-2025-03-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

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/34457>
2025-04-11 18:35:49 +00:00
José Roberto de Souza
68a617076d intel/perf: Update intel_perf to match xe_drm.h
There was a mismatch between drm-next version of xe_drm.h and the one
in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142.
So this does the necessary changes to build with current and new
xe_drm.h

Fixes: 2a828c35a1 ("intel/perf: add eu stall sampling support")
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/34457>
2025-04-11 18:35:49 +00:00
Timur Kristóf
371b1bf789 radv: Don't call nir_opt_varyings a second time when unnecessary.
When nir_opt_varyings doesn't make progress the first time,
it should not be necessary to call it a second time.

No Fossil DB changes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33880>
2025-04-11 18:01:47 +00:00
Timur Kristóf
403b3958c1 radv: Move preparation and fixup to separate loops in varying optimization.
This is to stop calling nir_shader_gather_info repeatedly for
some stages, and also as a pre-requisite to the work in the next commits.

No Fossil DB changes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33880>
2025-04-11 18:01:47 +00:00
Timur Kristóf
a98186bbf6 radv: Refactor loops in radv_graphics_shaders_link_varyings.
No functional changes, just improved code readability.

No Fossil DB changes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33880>
2025-04-11 18:01:47 +00:00
Timur Kristóf
1942227e73 radv: Inline radv_graphics_shaders_link_varyings_{first/second}.
The first step of reorganizing this code.

No Fossil DB changes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33880>
2025-04-11 18:01:47 +00:00
Timur Kristóf
412af41258 radv: Add radv_foreach_stage to ForEachMacros again.
This was lost when .clang-format was removed
from the amd folder.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33880>
2025-04-11 18:01:47 +00:00
Erico Nunes
23c0d64e24 panvk: disable VK_EXT_image_drm_format_modifier for arch < 10
VK_KHR_sampler_ycbcr_conversion is a dependency from the
VK_EXT_image_drm_format_modifier spec. panvk arch < 10 still
doesn't support it, so VK_EXT_image_drm_format_modifier should
not be exposed.
Otherwise, a Vulkan validation error is triggered for users of
VK_EXT_image_drm_format_modifier and it may cause applications
to fail to create a device.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34458>
2025-04-11 16:36:52 +00:00
Lionel Landwerlin
243c01c703 anv/iris: implement Wa_18040903259
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34433>
2025-04-11 13:54:35 +00:00
Lionel Landwerlin
d123aedfc7 anv: remove ALWAYS_INLINE from globally visible functions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34433>
2025-04-11 13:54:35 +00:00
Lionel Landwerlin
bcaf08b47c intel/dev: remove ADLN references
Not used anymore, just use the existing ADL definitions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34433>
2025-04-11 13:54:35 +00:00
Lionel Landwerlin
938f79ed82 anv: update Wa_1607156449 to use WA infrastructure
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34433>
2025-04-11 13:54:35 +00:00
Lionel Landwerlin
77a3572ae0 iris: update Wa_1607156449 to use WA infrastructure
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34433>
2025-04-11 13:54:35 +00:00
Georg Lehmann
d046ecf95a nir/opt_algebraic: optimize open coded ffract
Foz-DB Navi21:
Totals from 274 (0.34% of 79789) affected shaders:
Instrs: 522630 -> 522181 (-0.09%); split: -0.09%, +0.01%
CodeSize: 2880668 -> 2878940 (-0.06%); split: -0.07%, +0.01%
VGPRs: 14488 -> 14464 (-0.17%)
Latency: 4092358 -> 4091243 (-0.03%); split: -0.04%, +0.01%
InvThroughput: 1014148 -> 1013471 (-0.07%); split: -0.07%, +0.00%
VClause: 11646 -> 11639 (-0.06%)
SClause: 18614 -> 18611 (-0.02%)
Copies: 56248 -> 56309 (+0.11%); split: -0.05%, +0.16%
PreVGPRs: 13649 -> 13647 (-0.01%)
VALU: 359733 -> 359285 (-0.12%); split: -0.13%, +0.01%
SALU: 59719 -> 59720 (+0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33369>
2025-04-11 12:36:02 +00:00
David Rosca
f1f87d302f radv/video: Always enable B pictures for H264 encode
We always allocate the extra memory needed for B pictures, so there is
no reason not to also enable B pictures always.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34449>
2025-04-11 11:15:47 +00:00
David Rosca
a1fbaddc9c radv/video: Use ac_vcn_enc_init_cmds
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34449>
2025-04-11 11:15:47 +00:00
David Rosca
7249d9548e radv/video: Fix encode session info for VCN3+
Last dword should be 0.

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34449>
2025-04-11 11:15:47 +00:00
David Rosca
34031531fc radv/video: Fix msg header total size
It needs to include also codec msg size.

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34449>
2025-04-11 11:15:47 +00:00
Juan A. Suarez Romero
6cb7765409 v3d(v)/ci: update expected results
Add new flakes and timeouts.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34476>
2025-04-11 10:36:34 +00:00
Seán de Búrca
ea6c57cfcb rusticl: cap max alloc size to i32 to avoid overflowing gallium
v2: remove stray comment

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34166>
2025-04-11 09:54:07 +00:00
Seán de Búrca
5b1088220e rusticl: correct calculation of maximum allocation size
This verifies that the requested allocation doesn't exceed the maximum
in cases where the size passed to `clSVMAlloc()` isn't a multiple of the
provided alignment. It also clamps the maximum allocation to `i32::MAX`,
which prevents overflowing `pipe_box`'s `width` field.

Both of these changes prevent possible undefined behavior on 32-bit
systems due to violation of `Layout` prerequisites.

v2: use safe layout creation for maintainability, add a few comments
v3: use Layout utils for aligned size calc, split out max alloc changes
v4: use `checked_compare()` for alloc/size comparison

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34166>
2025-04-11 09:54:06 +00:00
Erik Faye-Lund
7c88a52350 panvk: enable sampledImageIntegerSampleCounts for all MSAA formats
There's no good reason not to support this, it should just work...

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
1729409141 panvk: enable 8x and 16x msaa when supported
This uses the helpers from the previous patch to calculate how many
attachments and MRT buffers we have space for.

In the case where we can support more MSAA samples for smaller formats,
we also add support for that.

The flaking test seems to be due to a CTS issue, see this ticket for
details:

https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5651

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
329568b5eb panfrost: add color-attachment and msaa helpers
In order to enable higher MSAA modes, we're going to have to perform
some calculations on how to budget the (sometimes) limited tile-buffer
space.

Due to limited tilebuffer space, we need to prioritize a bit here.
First, we reserve space for 4x MSAA for all formats. Then we try to fit
8 color attachments into the tile-buffer. And then finally, we calculate
how many extra multi-sample buffers we can fit into the rest.

The reason we reserve 4x MSAA first, is that this is required by all
Vulkan versions. It also prevents us from regressing existing features.

Then we try to pick 8 color attachments next, because that's required by
Vulkan 1.4 as well as Vulkan Roadmap 2024 and D3D12. Vulkan Roadmap 2022
requires 7 as well.

This adds helpers that implements this, which can be used by both the
Gallium and the Vulkan driver. It's really benefitial if both of these
drivers prioritize the same way here.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
20acee81ac panfrost: disable tile-pipelining when needed
On v5, as well as v7 onwards, we can disable pipelining in order to fit
more data into the tile-memory. This is important in order to support
multiple, large color buffers with high MSAA sample counts.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Boris Brezillon
77d38bb7ca panfrost: also consider z/s for tile-size
We also have a budget for the tile size for depth-buffers. It's
currently hard to trigger issues with this than for color-buffers,
but this becomes important when we support larger MSAA counts.

We also need to take a bit of care for stencil-only attachments, because
they also count against a limit here. We really only care about the
sample counts here, because the stencil buffer budget is always a
quarter of the depth-buffer budget, and always uses a single byte per
sample.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
9ec6197a0b panfrost: allocate tile-buffer for dummy render-targets
There's two limitations we have to cater to:

1. The HW needs at least one render-target. We can disable write-back for
   it, but it needs to allocate tile-buffer space for it.
2. The HW can't have "holes" in the render-targets.

In both of those cases, we already set up dummy RGBA8 UNORM as the format,
and disable write-back. But we forgot to take this into account when
calculating the tile buffer allocation.

This makes what we program the HW to do consistent, meaning we don't end
up smashing the tile-buffer space. We might be able to do something
better by adjusting how we program these buffers, but let's leave that
for later.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
af87aa5ee4 panfrost: properly align value
This matches the rest of this file.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
c2ddafb935 panvk/ci: move timeouts to crash
These seems to crash on CI, not timeout. And the stencil.samples_1
variant is already present in the fails file, so let's remove the
duplicate.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
c99a3298d9 panfrost: correct tile-buffer size for some v7 GPUs
These GPUs had their tilebuffer sizes listed at twice their actual
values. While that still works, it ends up disabling pipelining in some
cases. This gives a significant performance hit, compared to using the
correct values.

But, it turns out to be hard or impossible to trigger at the moment, due
to the limited number of MSAA samples we support. Once that changes,
this is a lot easier to trigger, so let's fix it up.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
b4ebffa1aa panfrost: fixup typo in 16x sample-pattern
This is an n-queen pattern, where no two values should be on the same
row or column. But this and the second to last element has the same y
component, and neither has the negative one.

Let's fix this up by setting the first value to the negative value. This
matches the D3D 16x sample pattern.

Fixes: a61fb62966 ("panfrost: Upload sample positions on device init")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Valentine Burley
b49eaf0966 ci/lava: Consolidate piglit trace job definitions
Clean up LAVA job definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:07 +00:00
Valentine Burley
f9564e1754 ci/piglit: Consolidate identical skip lists for X11 and gbm
The tests skipped in x11-skips.txt and gbm-skips.txt were identical,
so consolidate them into the common all-skips.txt file.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
b8a9aa8487 ci/piglit: Remove piglit-runner.sh script
This is no longer used, since all jobs migrated to using deqp-runner
suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
87d58ea57a ci/piglit: Consolidate HWCI_TEST_SCRIPT for piglit traces
The HWCI_TEST_SCRIPT variable was always getting overwritten for these
definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
1aeedddbb6 ci/piglit: Drop redundant PIGLIT_PROFILES variable
PIGLIT_PROFILES was only used with the piglit-runner.sh script, which no
jobs were using anymore.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
09f86df938 intel/ci: Convert iris-kbl-piglit to deqp-runner suite
This was the last job using the piglit-runner.sh script.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Benjamin Lee
a02b6e6bef panvk: don't advertise VK_KHR_float_controls2 on bifrost
This extension requires vulkan 1.1. Fixes
dEQP-VK.api.info.extension_core_versions.extension_core_versions on
bifrost.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 22fa3e88dd ("panvk: advertise VK_KHR_float_controls2")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34463>
2025-04-10 20:12:21 +00:00
Konstantin Seurer
b218c45973 radv: Handle nir_intrinsic_printf
Makes it possible to use printf statements inside glsl meta shaders.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34208>
2025-04-10 19:31:37 +00:00
Konstantin Seurer
ba001626ac nir: Turn the format string index into a const index
It is already expected to be constant.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34208>
2025-04-10 19:31:37 +00:00
Konstantin Seurer
d21926bc04 spirv: Emit code for NonSemantic.DebugPrintf if supported
This can be useful for debugging code in situations where VVL cannot be
used. (DGC, meta shaders)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34208>
2025-04-10 19:31:37 +00:00
Benjamin Lee
28e2d9088c panvk: enable uniformAndStorageBuffer8BitAccess and storagePushConstant8
8-bit loads are already supported by bi_emit_load_ubo and
bi_emit_load_push_constant, so the only necessary changes were fixing
swizzle lowering issues uncovered by these CTS tests.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:16:02 -07:00
Benjamin Lee
b683a59438 panfrost/va: valhall-specific swizzle lowering
For most swizzled instructions that are different between valhall and
bifrost, valhall allows more values than bifrost does, so we can avoid
some unnecessary lowering.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
168c96816a panfrost: use bifrost instruction table for bi_lower_swizzle
Fixes two known issues:

 - We did not lower invalid swizzles for IADD.v4s8, triggered in the CTS by
   enabling uniformAndStorageBuffer8BitAccess and storageBuffer8BitAccess in
   panvk.
 - We did not lower invalid swizzles for IMUL.v4i8, triggered by
   dEQP-VK.spirv_assembly.instruction.compute.mul_extended.(un)signed_8bit
   on bifrost.

The old logic was missing several other instructions, so there may be
additional bugs that we don't know about.

There are no cases where the new behavior will keep swizzles that would
have been lowered previously, so this change should not introduce any
new bugs with valhall.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
f513ddfc1c panfrost/va: use 'lane' modifier for MKVEC.v2i8
Previously we were using 'swizzle', with special handling in va_pack.
This does not work if we want to use va_src_info to determine allowed
swizzles in bi_lower_swizzle. The allowed set of swizzle values for
'lane' is correct for this instruction.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
f2c8267962 panfrost: add bi_swizzle values for unused swizzles
This makes codegen using bifrost/ISA.xml swizzle values simpler because
we don't need to special-case the values that we don't emit.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
4abd75c7d1 panfrost: define bi_swizzle alias values
Primary reason to do this is to make codegen using the swizzle names in
bifrost/ISA.xml simpler. A secondary benefit is that dependent code can
now use the swizzle name that matches the context, making things a
little more readable.

We may want to consider giving widens separate values later, so that
va_lower_constants and bi_opt_constant_fold can fold them correctly, but
I don't know of current bugs caused by this.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Lionel Landwerlin
06ad9a25e5 brw: fix Wa_22013689345 emission
2 problems :
  - not detecting null destination correctly
  - applied too late using SHADER_OPCODE_MEMORY_FENCE, when lowering
    already happened

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/34319>
2025-04-10 16:44:28 +00:00
Benjamin Lee
22fa3e88dd panvk: advertise VK_KHR_float_controls2
This is all supported by the common nir code, no changes needed on our
end.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
7612dc4713 panvk: advertise VK_KHR_shader_float_controls
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
95056fa75a panvk/va: don't advertise independent denorm behavior
Valhall supports all combinations of ftz/preserve denorm behavior
between FP16 and FP32 except FP16=ftz, FP32=preserve. Because of this,
we can't advertise independent denorm behavior.

Even with INDEPENDENCE_NONE, it is still possible for shaders to set
denorm behavior for one size and leave the other size unspecified.
Previously we were defaulting to preserve for any unspecified size, but
with FP16=ftz, we need to default unspecified FP32 to preserve.

When advertising INDEPENDENCE_NONE, the CTS checks that the
shaderDenormFlushToZeroFloat* and shaderDenormPreserveFloat* features
are equal for all sizes, so we need to advertise the same supported
denorm behavior for FP64 even though we don't support FP64 at all.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
b6406c179b pan/bi: implement denorm behavior float controls
On bifrost independent float controls are implementable, just
potentially expensive because it requires scheduling FP16 and FP32
instructions in separate clauses.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
9737c1fa15 pan/bi: ignore ftz mode when scheduling int instructions
This allows more efficient scheduling by putting a 16-bit int
instruction in the same clause as a 32-bit float instruction even when
the 16-bit and 32-bit float controls are different.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
08765d53c9 pan/bi: refactor bi_instr_ftz to allow dontcare FTZ states
The current behavior is identical, but we can express that some
instructions may be packed in either FTZ and no-FTZ clauses in the
future.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
5bb85e965e pan/va: preserve signed zero in f32->f16 conversions
Using 'FADD.f32 x, +0' for f32->f16 conversions strips signed zero,
which we can't do if we advertise shaderSignedZeroInfNanPreserveFloat16.
Adding -0 instead preserves the original sign.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: b63ef74e73 ("pan/bi: Stop using V2F32_TO_V2F16 on Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
239c6b833a panfrost: implement float controls rounding mode
Many float instructions do not have a rounding mode modifier, but all of
the operations that are listed as requiring correct rounding in the
vulkan spec are supported in hardware.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
6f68649400 pan/va: add roundmode modifier to additional instructions
These are needed to implement VK_KHR_shader_float_controls rounding
mode.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Lars-Ivar Hesselberg Simonsen
20c0d169e4 vk/sync: Fix execution only barriers
With vkCmdPipelineBarrier, it's possible to specify a barrier with
pipeline stages but without any memory barriers. These might not be
practical, but are legal Vulkan code.

Barriers like this are currently ignored in mesa, as we only convert
barriers with passed memory barriers into vkCmdPipelineBarrier2.

This commit adds handling of execution only barriers by converting them
into a memory barrier without access masks.

Fixes: 97f0a4494b ("vulkan: implement legacy entrypoints on top of VK_KHR_synchronization2")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34187>
2025-04-10 15:28:22 +00:00
Daniel Stone
7c73b9a498 doc/ci: Update nginx caching snippets
Fix the nginx cache snippets - I'd missed the file nesting somehow.
Tested on a debian:bookworm image with nginx-full installed, checked
that we could pull an arbitrary external site, as well as S3, as well
as GitLab artifacts.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34341>
2025-04-10 15:21:51 +00:00
Ludvig Lindau
6393ebbdbb panvk: Get flush_id once per submit
Get flush_id once per command buffer in the submit and use it for all
subqueues instead of getting a new flush_id for every subqueue.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34448>
2025-04-10 15:00:57 +00:00
Tapani Pälli
30d78dc942 mesa: various fixes for ClearTexImage/ClearTexSubImage
Fixes some upcoming CTS tests for texture clears.

* some drivers will attempt to issue clears with zero range
  and hit asserts/crashes (spec clarification for negative
  values)

* fix error thrown with negative values to match spec

* fix cases for clearing generic compressed formats

* fix negative case of using color format while having
  depth/stencil internalformat and vice versa

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34428>
2025-04-10 14:32:56 +00:00
Tapani Pälli
3bc016bb6c mesa: clamp texbuf query size to MAX_TEXTURE_BUFFER_SIZE
Fixes upcoming CTS test checking for clamping.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34428>
2025-04-10 14:32:56 +00:00
Boris Brezillon
24b1aa6c28 panvk/csf: Optimize read-only tile buffer access
When the color/input attachment map is known at compile time, we can
determine the set of read-only render targets and replace .wait by
.wait_resource flows, in order to avoid read-after-read serialization.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:54 +00:00
Boris Brezillon
4f4ac56145 pan/va: Support relaxed waits on read-only render targets
On Valhall we can optimize lower waits, which waits for both readers and
writers, into resource_waits which only wait for writers, allowing
threads accessing read-only resources to execute concurrently.

Let's use that on LD_TILE instructions so we can optmize the read-only
case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
fbb2805575 panvk: Advertise KHR_dynamic_rendering_local_read support
Now that we support local reads we can safely advertise
KHR_dynamic_rendering_local_read.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
7a2b23b0bd panvk: Skip BY_REGION barriers if we're in a render pass
If we are in a render pass, the intra-draw synchronization happens
through the FPK parameters, shader waits and draw dependencies, so we
can safely skip the barrier in that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
bfd5ddbf32 panvk: Optimize input attachment loads when we can
When we know the input attachment is also an active color attachment
we can load the value from the tile buffer instead of going back to
the texture.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
20275d6521 pan/bi: Introduce two intrinsics to support input attachment remapping
In order to dynamically load the content of the tile buffer, we need
to know the target (color, depth or stencil) and the conversion to
apply. Let's define the load_input_attachment_{target,conv}_pan
intrinsics so we can dissociate the logic lowering input attachment
loads into load_converted_output_pan, and the part optimizing the shader
when input attachment map is passed at compile time.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
244995e4af panvk: Support color attachment remapping
We take the color attachment remapping into account when emitting
blend descriptors, and we make sure we re-emit those when this color
attachment map is dirty.

We also need to take the remapping into account when checking the
render targets written by the fragment shader, hence the addition of
a color_attachment_written_mask() helper.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
9d5d03bf78 panvk/jm: Move cmd_prepare_draw_sysvals() out of the layer loop
The only sysval that changes is the layer_id, so let's call
cmd_prepare_draw_sysvals() outside of the layer loop, and manually
update the sysval there.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
fe21da08ed pan/earlyzs: Support the shader ZS read-only case and its optimization on v10+
We are about to allow ZS tile buffer reads in panvk in order to support
VK_KHR_dynamic_rendering_local_read, and this requires dealing with
a new case in the early ZS logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
d2cd5ca609 panvk: Generate the earlyzs LUT at shader creation time
Do what the gallium driver does and generate the LUT when creating the
shader to avoid regenerating this LUT in the draw path.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
b8174b21d2 panvk: Isolate CS specific bits in panvk_shader
We are about to add FS specific info there, so let's make sure all the
per-stage bits are part of a union and are conditionally
filled/[de]serialized based on the shader type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
8a16636444 panvk: Re-order things in panvk_deserialize_shader()
Re-order things in panvk_deserialize_shader() to avoid declaring local
variables for stuff we feed the panvk_shader with. The only exception
is pan_shader_info, because we need to know the shader stage to call
vk_shader_zalloc(), which if part of pan_shader_info.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
864ea81dcf panvk/csf: Set invalidate_inherited_ctx only if the render pass is inherited
Secondary command buffers don't necessarily inherit their render
context. If we flush draws, we should only set invalidate_inherited_ctx
when the render context is inherited, otherwise is messes up with the
primary command buffer state.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
f3be0836b7 pan/bi: Pass an explicit sampleid to load_converted_output_pan
Needed if we want to lower multisample input attachment loads to
tile buffer loads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
cdeda45282 pan/bi: Pass load_converted_output_pan target through a source
This allows us to pass a dynamic render target which will be needed
to support VK_KHR_dynamic_rendering_local_read.

While at it, we also enable support for depth/stencil tile loads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
2e8829f54a pan/bi: Allow depth/stencil tile buffer access using LD_TILE
LD_TILE has a .z_stencil modifier we can use to access the depth/stencil
tile buffer.

This will be needed for native depth/stencil input attachments support in
panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
08307ecf3c panvk/jm: Don't force a preload if the previous batch didn't have draws
We should only force a preload after a batch split if the batch we
flush had draws, otherwise we might lose the effect of clears asked
by the user.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
3669cc66c6 vulkan/state: Fix default input attachment map values
When no input attachment location info is provided, the depth/stencil
attachment are supposed to be NO_INDEX, not UNUSED, and we should also
set the color_attachment_count to UNKNOWN.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Lionel Landwerlin
e321c438dc anv: fix self dependency computation
Some upcoming changes in the runtime will make it impossible to rely
on the pipeline or runtime information to know whether a fragment
shader has input attachments.

Instead we gather that information at compile time and store it in our
shader bind_map.

At runtime we check whether the fragment shader has input attachments
and whether those map to the runtime depth/stencil input attachments
to set the 3DSTATE_PS_EXTRA::PixelShaderKillsPixel.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d2f7b6d5a7 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
be2532fc00 vk/pass: Add input attachment location info
For drivers using the render pass emulation provided by the
runtime, it's important to express the mapping between
depth/stencil/color attachments and input attachments using
VkRenderingInputAttachmentIndexInfoKHR, otherwise those drivers
have to special-case emulated render passes in their
CmdBeginRendering() implementation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
38e546c202 vulkan/state: Fix input attachment map state initialization/copy
vk_dynamic_graphics_state_copy() is not copying the input attachment
map, and color_attachment_count is not initialized in
vk_dynamic_graphics_state_init_ial().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Corentin Noël
34a5f4ac7c virgl: Use drmCloseBufferHandle instead of calling dmIoctl directly
Makes the code a bit lighter.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34437>
2025-04-10 12:55:51 +00:00
Corentin Noël
5144a4f56c virgl: Close handle on resource info failure
We just opened the GEM handle a few line before (or used drmPrimeFDToHandle to
acquire it), on failure it is just better to close it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34437>
2025-04-10 12:55:51 +00:00
Martin Krastev
60d815d1bf docs/svga: Add steps how to get VMware Workstation Pro on Linux
Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12829
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34429>
2025-04-10 10:38:56 +00:00
Caterina Shablia
e5bdb41200 panfrost: move the comment closer to what it's about
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Caterina Shablia
83383cb4b8 panfrost: require buffer_count and pushed_words to be passed to panfrost_emit_const_buf
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Alyssa Rosenzweig
59a3e12039 panfrost: do not push "true" UBOs
Panfrost supports pushing uniforms to hardware uniform registers (RMU/FAU for
Midgard/Bifrost respectively). Since OpenGL uniforms are lowered to UBO #0, it
does this with a pass that pushes UBOs. That's good!

The pass also pushes 'true' OpenGL UBOs, since they look the same in the backend
at this point. This is where the trouble comes in:

- True UBOs are allocated in GPU BOs, not CPU allocated buffers. That means it's
  write-combine memory, which we cannot read from efficiently (at least
  depending on coherency details that were never plumbed through panfrost.ko and
  unlikely to be replumbed now that panthor is the new hot stuff). So, pushing
  true UBOs reduces GPU overhead at the cost of tremendous CPU overhead. This is
  dubious... When I benchmarked this on MT8192 in early 2023, this pushing
  improved FPS in SuperTuxKart but hurt FPS in Dolphin.

- True UBOs can be written on the GPU. In OpenGL, we have batch tracking
  infrastructure to sort this mess out in theory. What this means is that
  pushing UBOs requires us to flush writers AND STALL at draw-time. If this is
  ever hit, our performance is utterly trashed. But it gets worse.

- True UBOs can be written in the same batch that reads them. For example, we
  could bind a buffer as a transform feedback buffer, do a draw with XFB, then
  rebind as a UBO and do a draw reading. This is where we collapse -- our logic
  will flush the writer, which is the same batch we were in the middle of
  enqueueing a draw to. When we try to push words, we'll crash with theatrics.
  This could be solved by smartening the batch tracking logic but it's not
  trivial by any means.

So, pushing true UBOs on the CPU is broken and can hurt performance. Stop doing
it!

Long term, the solution will be to push on the GPU instead. This avoids all of
these issues. This can be done with a compute kernel or with CSF instructions.
The Vulkan driver will likely have to do this for performance, since pushing
UBOs from the CPU is utterly broken in Vulkan for the above reasons.

I have a branch somewhere doing this on v9 but I'm doing this on NIR time to
unblock a core change that was crashing piglit due to this pile of unsoundness.
Let's fix the correctness issues first, then someone can look at recovering
performance later when we're not blocking unrelated work.

Fixes corruption in Piglit test
gles-3.0-transform-feedback-uniform-buffer-object, which writes a UBO with
transform feedback. (I suspect the test still doesn't pass for the same reason
it's broken on other tilers. But that's a better place to be than oodles of
memory corruption.)

According to CI, fixes spec@arb_uniform_buffer_object@rendering{-dsa}-offset.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Caterina Shablia
2c75b6bb01 panfrost: update nr_uniform_buffers before dispatching XFB
Currently nr_uniform_buffers will be whatever the previous draw set
for its vertex shader, which is not what the XFB shader usually
expects.

Fixes: c246af0d ("panfrost: Only upload UBOs when needed")

Cc: mesa-stable

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Caterina Shablia
6948ab727f panfrost: don't overwrite push uniforms and sysvals UBO with user's UBO
ss->info.ubo_mask includes the push+sysval UBO so if there's a user
UBO bound at the same index as the push+sysval UBO, without this
change we end up writing a descriptor for the user UBO at that index.

Fixes: 3b3cd59f ("panfrost: Launch transform feedback shaders")

Cc: mesa-stable

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Alyssa Rosenzweig
f179f6952f panfrost: invert and rename no_ubo_to_push flag
only the GL driver actually wants this, neither panvk nor internal shaders do.

Cc'd as a prereq to the next patch

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Samuel Pitoiset
2f00daf67a radv: tidy up radv_emit_hw_ngg()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
1290b38f57 radv: tidy up radv_emit_raster_state()
Better isolation between configuration and emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
4b2d119d90 radv: reduce the number of emitted DWORDS for MSAA 8x user sample locs
From 24 DWORDS to 16 DWORDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
c1ebf82700 radv: track redundant DB_RENDER_OVERRRIDE register writes on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
7f5727b313 radv: use consecutive registers for PA_SC_WINDOW_SCISSOR_{TL,BR}
For less DWORDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
32ea7df586 radv: move emitting more fb registers when rendering begins
No need to delay the emission of these registers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
001fa1cf11 radv: move the disable_trunc_coord drirc at instance/pdev level
It no longer relies on enabled device features.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34425>
2025-04-10 06:36:09 +00:00
Samuel Pitoiset
65d717b45a radv: remove an old workaround for D3D9 with DXVK 2.3.0 and older
Proton 8.x+ uses this DXVK version but Proton 9.x+ is the default now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34425>
2025-04-10 06:36:09 +00:00
Dave Airlie
0df8c4f20c nvk: add hopper support to nv_push_dump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34442>
2025-04-10 00:37:45 +00:00
Dave Airlie
725e84974e nvk: add ADA compute class to nv_push_dump
now we have the classes use them in the push dump.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34442>
2025-04-10 00:37:45 +00:00
Faith Ekstrand
a441bd3c7e nvk: Call vk_device_finish() last in nvk_DestroyDevice()
We initialize it first so we should destroy it last.  Otherwise, things
we call in our own destroy code might reference a dead vk_device and
blow up.

Fixes: d2ea532528 ("vulkan: Use syncobj shim")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34444>
2025-04-10 00:18:47 +00:00
Patrick Lerda
f0cfc1bbdc i915: fix draw_create_fragment_shader() related memory leak
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -fbo":
Direct leak of 16400 byte(s) in 5 object(s) allocated from:
    #0 0xb720689a in __interceptor_calloc (/usr/lib/libasan.so.6+0xb289a)
    #1 0xaf10f896 in draw_create_fragment_shader ../src/gallium/auxiliary/draw/draw_fs.c:47
    #2 0xaef64619 in i915_create_fs_state ../src/gallium/drivers/i915/i915_state.c:550
    #3 0xae16a955 in ureg_create_shader ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2194
    #4 0xae17f45f in ureg_create_shader_with_so_and_destroy ../src/gallium/auxiliary/tgsi/tgsi_ureg.h:150
    #5 0xae17f45f in ureg_create_shader_and_destroy ../src/gallium/auxiliary/tgsi/tgsi_ureg.h:159
    #6 0xae17f45f in util_make_fs_blit_zs ../src/gallium/auxiliary/util/u_simple_shaders.c:365
    #7 0xaf13300e in blitter_get_fs_texfetch_depth ../src/gallium/auxiliary/util/u_blitter.c:1157
    #8 0xaf13300e in util_blitter_cache_all_shaders ../src/gallium/auxiliary/util/u_blitter.c:1322
    #9 0xaef6b738 in i915_create_context ../src/gallium/drivers/i915/i915_context.c:233
    #10 0xacb33c49 in st_api_create_context ../src/mesa/state_tracker/st_manager.c:986
    #11 0xac845740 in dri_create_context ../src/gallium/frontends/dri/dri_context.c:178
    #12 0xac854d97 in driCreateContextAttribs ../src/gallium/frontends/dri/dri_util.c:631
    #13 0xb6ce79a3 in dri2_create_context_attribs ../src/glx/dri2_glx.c:240
    #14 0xb6c9606f in dri_common_create_context ../src/glx/dri_common.c:665
    #15 0xb6ca4f00 in CreateContext ../src/glx/glxcmds.c:322
    #16 0xb6ca5c0b in glXCreateNewContext ../src/glx/glxcmds.c:1449

Fixes: 1a69b50b3b ("i915g: Fix point sprites.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
2025-04-09 23:54:52 +00:00
Patrick Lerda
5af5f508b1 i915: fix nir_to_tgsi() related memory leak
For instance, this issue is triggered with "piglit/bin/glx-multithread-texture -auto -fbo":
Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0xb71eda62 in __interceptor_realloc (/usr/lib/libasan.so.6+0xb2a62)
    #1 0xadd5a32f in tokens_expand ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:239
    #2 0xadd5a32f in get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:262
    #3 0xadd62519 in copy_instructions ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2079
    #4 0xadd62519 in ureg_finalize ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2129
    #5 0xadd64bde in ureg_get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2206
    #6 0xade377d0 in nir_to_tgsi_options ../src/gallium/auxiliary/nir/nir_to_tgsi.c:4043
    #7 0xade3da63 in nir_to_tgsi ../src/gallium/auxiliary/nir/nir_to_tgsi.c:3831
    #8 0xaeb606c9 in i915_create_vs_state ../src/gallium/drivers/i915/i915_state.c:662
    #9 0xac781a2c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:720
    #10 0xac78e8a4 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:773
    #11 0xac78fc10 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1259
    #12 0xac78fc10 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
    #13 0xac790b1a in st_program_string_notify ../src/mesa/state_tracker/st_program.c:1378
    #14 0xace457a9 in _mesa_get_fixed_func_vertex_program ../src/mesa/main/ffvertex_prog.c:1397
    #15 0xac5ef8db in update_program ../src/mesa/main/state.c:281
    #16 0xac5f0ece in _mesa_update_state_locked ../src/mesa/main/state.c:560
    #17 0xac5f1653 in _mesa_update_state ../src/mesa/main/state.c:593
    #18 0xacdf9fe2 in _mesa_DrawArrays ../src/mesa/main/draw.c:1403

Fixes: 487a493325 ("i915g: Add support for per-vertex point size.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
2025-04-09 23:54:52 +00:00
Patrick Lerda
92802ea90a i915: fix slab_create() related memory leaks
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -fbo":
Direct leak of 836 byte(s) in 1 object(s) allocated from:
    #0 0xb71eb6f2 in malloc (/usr/lib/libasan.so.6+0xb26f2)
    #1 0xaefadc78 in slab_add_new_page ../src/util/slab.c:179
    #2 0xaefadc78 in slab_alloc ../src/util/slab.c:221
    #3 0xaef7d461 in i915_texture_transfer_map ../src/gallium/drivers/i915/i915_resource_texture.c:789
    #4 0xac9e931e in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:555
    #5 0xac9e931e in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
    #6 0xad49c5e4 in readpixels_memcpy ../src/mesa/main/readpix.c:260
    #7 0xad49c5e4 in _mesa_readpixels ../src/mesa/main/readpix.c:898
    #8 0xad5d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
    #9 0xad4a0caf in read_pixels ../src/mesa/main/readpix.c:1199
    #10 0xad4a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
    #11 0xad4a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231

or "piglit/bin/fcc-read-to-pbo-after-clear -auto":
Direct leak of 772 byte(s) in 1 object(s) allocated from:
    #0 0xb726b6f2 in malloc (/usr/lib/libasan.so.6+0xb26f2)
    #1 0xaf0adc88 in slab_add_new_page ../src/util/slab.c:179
    #2 0xaf0adc88 in slab_alloc ../src/util/slab.c:221
    #3 0xaf07aad7 in i915_buffer_transfer_map ../src/gallium/drivers/i915/i915_resource_buffer.c:75
    #4 0xad10de74 in pipe_buffer_map_range ../src/gallium/auxiliary/util/u_inlines.h:398
    #5 0xad10de74 in _mesa_bufferobj_map_range ../src/mesa/main/bufferobj.c:499
    #6 0xad5677ce in _mesa_map_pbo_dest ../src/mesa/main/pbo.c:308
    #7 0xad59be3b in _mesa_readpixels ../src/mesa/main/readpix.c:894
    #8 0xad6d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
    #9 0xad5a0caf in read_pixels ../src/mesa/main/readpix.c:1199
    #10 0xad5a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
    #11 0xad5a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231

Fixes: e7a73b75a0 ("gallium: switch drivers to the slab allocator in src/util")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
2025-04-09 23:54:52 +00:00
Mike Blumenkrantz
cf40099730 meson: deprecate gallium-xa
this is not maintained and will be removed in a future version

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34216>
2025-04-09 23:16:42 +00:00
Mike Blumenkrantz
6b6cb825e9 meson: deprecate gallium-nine
this is not maintained and will be removed in a future version

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34216>
2025-04-09 23:16:41 +00:00
Paulo Zanoni
fdbdfaed01 anv: add ANV_SYS_MEM_LIMIT for debugging system memory restrictions
If you suspect a workload is failing because it needs more memory, you
can set ANV_SYS_MEM_LIMIT=100 to give it all the memory available.
This could make, for example, certain games start working (it really
depends on how much RAM you have and how much the game wants).

If you suspect a workload is too resource hungry, you can try to limit
it with ANV_SYS_MEM_LIMIT=30 (or some other value) to see if it can
deal with the more restricted environment and behave accordingly.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Paulo Zanoni
ec4b2ce664 anv: restore the old behavior of up to 75% of RAM for the system heap
"We paid for sixteen gigs of RAM, so we gonna use the whole damn
   sixteen gigs of RAM!"
     - My Mom

First, some history:

The Anv 50%-or-75% rule was originally added in 2017 by 060a6434ec
("anv: Advertise larger heap sizes"). When i915.ko started reporting
memory sizes in its ioctls, it didn't impose any restrictions: 100% of
SRAM was reported as available, so the restriction was in Mesa. When
xe.ko was introduced, it only reported 50% of the SRAM as available
through its ioctls, so commit b571ae6e7a ("intel: Make memory heaps
consistent between KMDs") adapted the code to not take an extra 25% of
the 50% that was already cut, and restricted i915.ko to 50% instead of
the 50%-or-75%. In Kernel commit d2d5f6d57884 ("drm/xe: Increase the
XE_PL_TT watermark"), xe.ko changed to reporting 100% of SRAM through
its ioctls, so we adapted Mesa to do the right thing depending on
which Kernel version was running.

While this was all happening, we were discussing about which behavior
was actually the best: restrict everything to 50% in order to avoid
issues when many things are running in parallel, or keep the
restriction only at 75% in order to allow high demanding workloads to
make full use of the hardware.

The way I see, if parallel applications are causing the system to run
out of resources, the user always has the option to kill applications
and use one thing at a time. On the other hand, if a single
application needs more than 50% of the SRAM and we don't allow it in
our heaps, the application will never work (unless, of course, the
user patches Mesa). So in this commit we go back to allowing
high-demanding applications to work by restoring the 50%-or-75% rule.

This commit is especially useful in systems with integrated graphics,
like LNL, where the option to upgrade RAM is not present.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Paulo Zanoni
02e896bc49 anv/xe: detect the newer xe.ko memory reporting model and act accordingly
Kernel commit d2d5f6d57884 ("drm/xe: Increase the XE_PL_TT watermark")
changed how xe.ko reportes memory: its ioctls now report 100% of the
system RAM as available. Since our policy is to report 50% of the SRAM
as available for the heaps, add some code to check the amount reported
by xe.ko against the amount reported by the system, then act
accordingly.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Paulo Zanoni
3db8931d4a intel/i915: restrict the RAM size restrictions to Anv
Before commit b571ae6e7a ("intel: Make memory heaps consistent
between KMDs"), we had the following policy for reporting Sytem RAM
memory sizes:

- For OpenGL, we reported the total available RAM.
- For Vulkan, we reported the total available RAM as:
  - 50% of the total RAM if the total RAM was <= 4GB,
  - 75% otherwise
  - In addition, the Memory Budget (for VK_EXT_memory_budget) is 90%
    of the "free" memory, which can be an extra 10% off of the 50% or
    75%.

When xe.ko was added, one key difference was noted: while i915.ko
reported the "real" RAM memory sizes in its ioctls, xe.ko reported
only 50% of the system RAM as available. Because of that (and other
reasons, see this discussion on MR 28513), commit b571ae6e7a decided
to unify the behavior by changing the Anv i915.ko rule to "always 50%"
instead of "50% or 75%". This also changed the Iris rule to 50%
instead of 100%.

In my research, I couldn't find any reason why this restriction should
also apply to Iris, so here we revert back to handling these size
restrictions on Anv only.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Ian Romanick
cb69d019cf brw/nir: Use offset() for all uses of offs in emit_pixel_interpolater_alu_at_offset
This is necessary to appropriately uniformize the first component
access of a convergent vector. Without this, this is produced:

    load_payload(16) %18:D, 0d, 0d NoMask group0
    add(32) %21:F, %18+0.0:F, 0.5f
    add(32) %22:F, %18+2.0<0>:F, 0.5f

This is the correct code:

    load_payload(16) %18:D, 0d, 0d NoMask group0
    add(32) %21:F, %18+0.0<0>:F, 0.5f
    add(32) %22:F, %18+2.0<0>:F, 0.5f

Without 38b58e286f, the code generated was more incorrect, but happened
to work for this test case:

    load_payload(16) %18:D, 0d, 0d NoMask group0
    add(32) %21:F, %18+0.0<0>:F, 0.5f
    add(32) %22:F, %18+0.4<0>:F, 0.5f

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 38b58e286f ("brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset")
Closes: #12969
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34427>
2025-04-09 22:21:18 +00:00
Dave Airlie
b5d1b0d7e3 nvk: update nvidia class header files.
This adds Ada/Hopper compute headers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34440>
2025-04-09 22:03:18 +00:00
Caleb Callaway
64b5ee3001 intel/tools: fix 32b build for EU stall tool
Fixes: 610ad8d3 ("intel/tools: create intel_monitor for sampling eu stalls")

Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34439>
2025-04-09 21:40:46 +00:00
Benjamin Lee
fdf43f9152 panfrost: add core mask driconf options
These options are equivalent to the corresponding panvk options.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34374>
2025-04-09 21:09:20 +00:00
Benjamin Lee
e8cc44f4bd panvk: add core mask driconf options
These can be used to pin an application to specific cores. A tiler mask
option is not included because there is no current hardware that
includes more than one tiler.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34374>
2025-04-09 21:09:20 +00:00
Benjamin Lee
d46e76be02 driconf: add uint64 type
This is needed for panvk, where we want to expose uint64 core masks. The
previous int parsing logic was technically UB rather than guaranteed
truncate-on-overflow, but was likely compiled to truncate in practice.
It is very unlikely that anyone was relying on this.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34374>
2025-04-09 21:09:20 +00:00
Alyssa Rosenzweig
141f0ef4e4 asahi: fix i/a queries with tess
fixes new CTS additions to KHR-GL46.pipeline_statistics_query_tests_ARB.functional_tess_queries

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:50 +00:00
Alyssa Rosenzweig
27d2bd5925 gallium: wire up asahi driver
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:50 +00:00
Alyssa Rosenzweig
1a76310fb7 asahi: remove unstable uapi header
now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:50 +00:00
Alyssa Rosenzweig
c64a2bbff5 asahi: port to stable uAPI
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:49 +00:00
Alyssa Rosenzweig
3e110005a6 asahi: disable virtio gpu for upstream
until the wire protocol is stable.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:49 +00:00
Alyssa Rosenzweig
2db1ae16f3 drm-uapi: add asahi uapi
from drm-misc-next:
https://cgit.freedesktop.org/drm-misc/commit/?id=12a2bf6765c2a61eb7f20870452bb915eb28fdcc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:49 +00:00
Caio Oliveira
7457c4ecfd brw: Make brw_range use half-open ranges
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
6509f8139d brw: Use brw_range::last() to explicit get the last valid IP
This is a preparation to change what is stored in brw_range::end.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
596bbb2c95 brw: Use brw_range to store Vars ranges
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
0b4a3c0ff6 brw: Use brw_range to store VGRF ranges
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
e644b42e59 brw: Use brw_range when operating with live ranges
Makes the intention of some comparisons clearer by using the named
helper functions.  Add commentary when the straightforward range is not
the one used, e.g. VGRF interference.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
f56a5cf1eb brw: Use brw_range in IP ranges analysis
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
fb50461220 brw: Add brw_range struct
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:48 +00:00
Caio Oliveira
8d9155e34d brw: Clean up saturate propagation after non-defs version removal
Remove now unused analysis and no need to walk blocks in reverse
after the non-defs version of the pass was removed.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:48 +00:00
Caio Oliveira
cfc4067b0e brw: Add a few basic tests for register coalesce
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:48 +00:00
Patrick Lerda
22c399320b i915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redundancies
Indeed, this resource was assigned twice and was not properly freed.

For instance, this issue is triggered with:
"piglit/bin/glsl-fs-pointcoord -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 0278d1fa32 ("gallium: add unbind_num_trailing_slots to set_vertex_buffers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27572>
2025-04-09 18:47:33 +00:00
Bo Hu
0d3355e41b gfxstream: update code generator for simplified dep graph
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
6cd7b4953c gfxstream: Wrap vkEnumerateInstanceExtensionProperties for host
Due to AMD driver issues on linux, we need to serialize
multithreaded calls.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
c46e8ca4e6 gfxstream: Add dispatcher validity checks
Add conditioning before making driver calls to be
able to workaround some of the fatal errors, such
as unboxing issues during or after snapshot load.
This enables invalidating a host dispatcher based
on the application state. A default error will be
returned for vulkan calls.

Builtin expectation function is used to reduce
performance cost of the checks.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Jeongik Cha
284a1d5cb6 gfxstream: Add AHARDWAREBUFFER_FORMAT_B8G8R8A8_UNORM in android_format_is_yuv
To avoid warning message, I added that.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Jason Macnak
11bec23bba gfxstream: Remove extra dispatch variable
... to addresss variable shadowing warnings and handle the 2 global
commands that do not require a dispatch.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Jason Macnak
e458641516 gfxstream: Update variable names to avoid -Wshadow error
... as vkCmdUpdateBuffer() uses these param names.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
425fe5edf8 gfxstream: wrap semaphore functions on the host
Codegen changes to be able to alter the behavior of vkSignalSemaphores
and vkWaitSemaphores calls on the host side.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
af8b08281b gfxstream: track pipeline layouts on decoder
Track pipeline layout creation and destroy calls
to cleanup them correctly on device teardown.

Pipeline layouts require delayed delete operations for
VulkanQueueSubmitWithCommands feature which modifies order
of commands and they need to stay valid during recording.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Caio Oliveira
b148f57dad spirv: Take a separate data_type when creating a new vtn_variable
This will be useful for untyped pointers.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34436>
2025-04-09 16:33:03 +00:00
Faith Ekstrand
18b2bef45a nak: Add a NAK_DEBUG=panic option
This tells it to actually panic instead of unwinding and returning NULL.
I find myself commenting out the unwind code pretty frequently so I can
get GDB to break at the panic.  This should help avoid that extra debug
step.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34435>
2025-04-09 16:14:00 +00:00
Tapani Pälli
0750c4c5f1 intel/dev: update mesa_defs.json from internal database
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/34430>
2025-04-09 15:44:22 +00:00
Faith Ekstrand
4d1399629b nak: Allow predicates in nir_intrinsic_as_uniform
As of 76e542e92a ("nak: Add nak_nir_mark_lcssa_invariants"), we can
now get predicates as inputs to as_uniform.  We can't assume the result
will always be a UGPR.

Fixes: 76e542e92a ("nak: Add nak_nir_mark_lcssa_invariants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12970
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34434>
2025-04-09 15:26:35 +00:00
Natalie Vock
916d7277c0 radv/ci: Test FP16 for GFX8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Natalie Vock
f0f4ae1713 radv: Add radv_enable_float16_gfx8 drirc and enable for Indiana Jones TGC
This is a hard requirement from the game preventing it to start on GFX8.
Adding this allows playing it on GFX8.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Natalie Vock
e385cb1750 radv: Add radv_emulate_rt drirc and enable for Indiana Jones TGC
There have been various people successfully trying it out on GFX9-GFX10.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Natalie Vock
3d8db3cbbb aco: Make private_segment_buffer/scratch_offset per-resume
We need different Temps for each resume shader, because registers aren't
preserved across resume boundaries.

This was likely fine in practice because arg registers are the same for
each shader, but resulted in invalid IR and asserts.

Fixes crashes in Indiana Jones RT with assertions enabled on GFX8.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Lionel Landwerlin
76096d04bb anv: relax restriction on variable count descriptors
VUID-VkDescriptorSetAllocateInfo-pSetLayouts-09380 says that :

   "If pSetLayouts[i] was created with an element of pBindingFlags
   that includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT,
   and VkDescriptorSetVariableDescriptorCountAllocateInfo is included
   in the pNext chain, and
   VkDescriptorSetVariableDescriptorCountAllocateInfo::descriptorSetCount
   is not zero, then
   VkDescriptorSetVariableDescriptorCountAllocateInfo::pDescriptorCounts[i]
   must be less than or equal to
   VkDescriptorSetLayoutBinding::descriptorCount for the corresponding
   binding used to create pSetLayouts[i]"

But applications like are not following the spec. RADV doesn't apply
that limit and allocates if there is enough space in the pool. Let's
just do the same.

Note that this issue got resolved with a vkd3d-proton change :

a7ac1a7d2f

But since this change is deleting more code than it adds, might as
well go with it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12185
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32305>
2025-04-09 16:29:21 +03:00
K900
3d7bfcf984 meson: support building with system libgbm
This is the next step towards making libgbm just a loader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33890>
2025-04-09 12:15:33 +00:00
Natalie Vock
d1ff9e951a aco: Fix RT VGPR limit on Navi31/32, GFX11.5, GFX12
Since 128 is not a multiple of the VGPR allocation granule, we will
actually allocate 134 VGPRs. No reason not to use the extra 6.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34265>
2025-04-09 10:02:52 +00:00
Benjamin Lee
c0be0a845d panfrost/va: remove dead code for packing BRANCHZI.i16 lane mod
As of 839f15259a, we no longer use 'lane'
for BRANCHZI.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34416>
2025-04-09 07:39:23 +00:00
Alyssa Rosenzweig
3e82395306 bin: add rebase mode
when we need to apply trailers to a whole MR at once, it's convenient to
do something like `git rebase --exec "rb faith" origin/main`. This adds that
operation into the script itself, so that can be done with simply
`rb -r origin/main faith`.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34409>
2025-04-08 17:05:58 -04:00
Lionel Landwerlin
19e4dda9a2 brw: fix shuffle with scalar/uniform index
The fixes commit isn't actually the source of the bug but likely the
biggest enabler because it creates scalar values that more easily end
up in the shuffle operations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1b24612c57 ("brw/nir: Treat load_*_uniform_block_intel as convergent")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12927
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12688
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12570
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12905
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12734
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34393>
2025-04-08 20:14:11 +00:00
Felix DeGrood
610ad8d378 intel/tools: create intel_monitor for sampling eu stalls
Created stand alone tool for sampling gfx data on regular
intervals. Tool has inner loop that performs sampling every N
useconds. Press any key to end sampling. Results will be dumped
when intel_monitor exits.

First application of intel_monitor will be to collect eu stall
data. Perhaps more applications can be added at a later date.

How to use:
 0. Set sysctl dev.xe.observation_paranoid=0
 1. Clean shader cache and launch gfx INTEL_DEBUG=shaders-lineno.
    Redirect stderr to asm.txt.
 2. When gfx app ready to monitor, begin capturing eustall data by
    launching `intel_monitor -e > eustall.csv` in separate console.
 3  When done collected, close intel_monitor by pressing any key.
 4. Correlate eustall data in eustall.csv with shader instructions in
    asm.txt by matching instruction offsets. Use data to determine which
    instructions are stalling and why.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
2fcebf2f1e util: add hash functions for u64 data type
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
2a828c35a1 intel/perf: add eu stall sampling support
Xe2+ GPUs have support for eu stall sampling perf debug feature.
This feature allows driver to collect count and reasons for why
EUs are stalled on GPU. Stall data is cross referenced with ip
address within individual shaders so it is possible to know which
instructions in which shaders are generating stalls. This should
be a very useful feature for debugging performance of slow shaders.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
d6a379f7a7 intel/perf: remove unnused argument from xe_perf_stream_read_error
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
6e16e92532 drm-uapi: add eu_stall uapi
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
69b73e807f iris: add INTEL_DEBUG=shaders-lineno
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
a09ddc3b77 anv: add INTEL_DEBUG=shaders-lineno
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
7a3de9e877 intel/brw: support for dumping shader line numbers
Add support for dumping shader asm containing instruction line numbers
matching offsets within instruction state pool buffer. Offsets
should match values collected from eu stall sampling. This is
required for match eu stall data with individual shader instructions.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Alyssa Rosenzweig
1dc90e3f8b hk: advertise maintenance8
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
ab8adb8438 hk: advertise maintenance7
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
af6646c3ce hk: advertise VK_EXT_queue_family_foreign
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12904
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
0da52e1fd8 hk: support colour <--> z/s copies
dEQP-VK.api.ds_color_copy.* for maint8, but there's more to maint8

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
f0e6746ffa hk: fix last VGT output component limits
per discussion.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
56fc62c1ea hk: drop dead todo
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
4f1d08b234 agx: optimize nonuniform offset
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
924075cd56 asahi,hk: disentangle logicop_enable
logicop_func=COPY is different from logicop_enable due to overriding blending.
maintain the info we need to implement properly. fixes

dEQP-VK.pipeline.shader_object_unlinked_binary.logic_op_na_formats.r32g32b32a32_sfloat.copy_blend

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
045880c8a6 vk/meta: generalize 3D blit code
This handles the 3D->2D Array case that we hit with maintenance8. Fixes tests
like
dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.simple_tests.3d_to_2d_array.max_slices_linear

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
c2a3c70086 nir/lower_tex: use vector_insert_imm
was in the area.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
c23201ad8a nir/lower_blend: disable logic ops for unsupported formats
Fixes new Vulkan CTS cases on Honeykrisp (and probably panvk and whatever)

dEQP-VK.pipeline.shader_object_unlinked_binary.logic_op_na_formats.*

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
54ccc8ed0b nir/lower_blend: refactor logicop variables
This pulls out the logicop_func variable from the options struct, so we can
modify it in the next commit in a central place. It then refactors out the
format variable from the options struct since we end up duplicating
options->format[rt] a zillion times and passing in both an options struct and a
logicop func override is confusing so this will just make everything neater and
self-contained next commit.

no functional change.

Cc'd to make the next commit cherrypickable.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:46 +00:00
Renato Pereyra
7190949927 perfetto/android: align datasource names with tooling expectations
A few Android tools are based on/assume the datasource names
gpu.renderstages and gpu.counters. It is less effort to align with that
naming for Android builds than to chase down those tools and fix them,
not to mention account for new tools that may be created in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34330>
2025-04-08 18:29:10 +00:00
Felix DeGrood
b895c0ec05 vk/overlay-layer: fix regression in non-control pathway
Fixes regression introduced by prior commit. Prior commit fixed
the control pathway to starting overlay-layer but broke non-
control pathway. Now both pathways should be working.

Fixes: 06423b1792 ("defer log creation to swapchain creation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12884
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34413>
2025-04-08 17:52:57 +00:00
Erik Faye-Lund
5c11b4a039 docs/features: update panvk support
We were missing panvk in two places here, and missing that one ext is
only supported on v10 and later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34310>
2025-04-08 16:44:27 +00:00
Corentin Noël
ab2c8e8fa6 ci: Uprev virglrenderer to latest version on time
This includes version 1.1.1

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34377>
2025-04-08 16:11:49 +00:00
Rob Clark
ea6e69e9d3 tu: vdrm vtest support
In a few places, we need to deal with not having direct access to the
rendernode device.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
bf0e3d6274 virtio/vdrm: Add vtest backend
This allows for testing drm native ctx support without spinning up a VM.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
d2ea532528 vulkan: Use syncobj shim
This will allow syncobj use in cases where the process does not have
direct rendernode access (ex, vtest).

An alternative would be an alternate vk_sync_type implementation, but
the WSI code was also directly using drm syncobjs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
3f5dc6329a panvk: Remove dependency on vk_device::drm_fd
Move to panvk_device so we can remove drm_fd from the base class.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
e76b1acbfe util: Add drmSyncobj shim
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
28ad8fd5b1 tu: Add some func traces
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
db88a490b8 tu: Avoid extraneous set_iova
The GEM_NEW ccmd already passes the iova, so we don't need an extra
SET_IOVA for newly created BOs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
081869e591 tu/vdrm: Fix userspace fence cmds
Somehow the update of the fence value to write was dropped, so the
cmdstream that wrote the fence value would simply write zero over and
over again.

Fixes: 84d6eedd5e ("tu: Refactor the submit path")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
471961d0ca ir3: Comment re-indent
To make this more readable.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Patrick Lerda
e4a60c216a r600: clean up not used fields detected by clang
../src/gallium/drivers/r600/sfn/sfn_shader_gs.h:54:9: warning: private field 'm_first_vertex_emitted' is not used [-Wunused-private-field]
   54 |    bool m_first_vertex_emitted{false};
      |         ^
...

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34153>
2025-04-08 13:23:47 +00:00
Patrick Lerda
bd88a92dde r600: enable ARB_compute_variable_group_size
This change was tested and passes the piglit tests (20/20)
on cypress, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34404>
2025-04-08 13:04:17 +00:00
Patrick Lerda
58ddf6aaf0 r600: fix points clipping
This is the backport of eca57f85ee ("radeonsi: fix
gl_ClipDistance and gl_ClipVertex for points").

This change was tested on rv770, palm, barts and cayman. It
fixes 450 khr-gl tests and 64 khr-gles tests on evergreen
and cayman gpus. Here is the list:
spec/glsl-1.20/execution/clipping/vs-clip-vertex-primitives: fail pass
spec/glsl-1.30/execution/clipping/vs-clip-distance-primitives: fail pass
spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-primitives-points: fail pass
khr-gl(3[0-3]|4[0-5])/clip_distance/functional: fail pass
khr-gl(33|4[0-5])/cull_distance/functional_test_item_[0-8]_primitive_mode_points_max_culldist_[0-7]: fail pass
khr-gles3/clip_distance/functional: fail pass
khr-gles3/cull_distance/functional_test_item_[0-8]_primitive_mode_points_max_culldist_[0-7]: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403>
2025-04-08 12:41:10 +00:00
Patrick Lerda
8fc01db1ac r600: fix pa_su_vtx_cntl rounding mode
This is the backport of 9c49550163. This rounding functionality
is available on all the gpus of the r600 family.

This change was tested on rv770, palm and cayman. This change fixes
at least the "turn-on-off" tests on all these gpus and it does not
add any regression. Here are the tests fixed on palm:
spec/ext_framebuffer_multisample/interpolation 6 centroid-edges: fail pass
spec/ext_framebuffer_multisample/interpolation 8 centroid-edges: fail pass
spec/ext_framebuffer_multisample/turn-on-off 2: fail pass
spec/ext_framebuffer_multisample/turn-on-off 4: fail pass
spec/ext_framebuffer_multisample/turn-on-off 6: fail pass
spec/ext_framebuffer_multisample/turn-on-off 8: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403>
2025-04-08 12:41:10 +00:00
Patrick Lerda
4d17f8d10a r600: fallback to util_blitter_draw_rectangle when required
This is the backport of dc293ffe50 ("radeonsi:
fallback to util_blitter_draw_rectangle").

This change was tested on rv770, palm and cayman. Here is
the test fixed:
spec/ext_framebuffer_blit/fbo-blit-check-limits: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403>
2025-04-08 12:41:10 +00:00
Patrick Lerda
9b95e4181e r600: remove deprecated NIR_PASS_V
This change is done in two steps:
find src/gallium/drivers/r600 -type f -exec grep -l NIR_PASS_V {} + | xargs sed -r -i "s/NIR_PASS_V[(]/NIR_PASS(_, /"
git clang-format <previous_commit>

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33976>
2025-04-08 12:21:24 +00:00
Xaver Hugl
0c1f2b90c9 vulkan/wsi: warn once when HDR metadata is skipped because of protocol errors
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34000>
2025-04-08 10:30:42 +00:00
Xaver Hugl
cb7726bb2c vulkan/wsi: validate HDR metadata to not cause protocol errors
If it would trigger a protocol error, we must not use it.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34000>
2025-04-08 10:30:42 +00:00
Valentine Burley
0f8753ffb8 ci/container: Drop unnecessary variables for image paths
Some (and not all) MESA_IMAGE_PATH and MESA_BASE_IMAGE entries used
variables set in image-tags.yml, but these weren't too useful.
Drop them for simplicity.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
8339598f07 ci/android: Add build section for uninstalling build software
This was missing compared to the test-gl and test-vk containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
f9b6403d46 ci/container: Move calling strip-rootfs.sh to common scripts
No functional changes with the move, this is a cleanup for consistency.
Also, add the usual image tags to the header.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
427c7f382a ci/container: Remove double build sections in test-* containers
These sections were redundant since the respective scripts already set
them.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
15d94c60cb ci/container: Disable debian/arm32_test-vk container
There are currently no arm32 VK jobs, so disable this build to save some
resources. It can be re-enabled if needed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Georg Lehmann
64cae5c48d aco: form mixed MTBUF/MUBUF clauses
This should be one clause (all of the instructions load from the same vertex buffer)

s_clause 0x2                                                ; bfa10002
tbuffer_load_format_xyzw v[8:11], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] idxen offset:36 ; e9c32024 80010805
tbuffer_load_format_xyzw v[12:15], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] idxen offset:16 ; e9c32010 80010c05
tbuffer_load_format_xyzw v[16:19], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] idxen offset:12 ; e9c3200c 80011005
s_clause 0x2                                                ; bfa10002
buffer_load_dwordx3 v[20:22], v5, s[4:7], 0 idxen           ; e03c2000 80011405
buffer_load_dwordx3 v[23:25], v5, s[4:7], 0 idxen offset:20 ; e03c2014 80011705
buffer_load_dwordx4 v[28:31], v5, s[4:7], 0 idxen offset:48 ; e0382030 80011c05
tbuffer_load_format_xy v[0:1], v5, s[4:7], 0 format:[BUF_FMT_8_8_UNORM] idxen offset:32 ; e8712020 80010005

Foz-DB Navi21:
Totals from 5624 (7.08% of 79395) affected shaders:
MaxWaves: 149894 -> 149898 (+0.00%)
Instrs: 3032697 -> 3034853 (+0.07%); split: -0.05%, +0.12%
CodeSize: 15907852 -> 15915752 (+0.05%); split: -0.05%, +0.10%
VGPRs: 216248 -> 216144 (-0.05%)
Latency: 10955137 -> 11008760 (+0.49%); split: -0.22%, +0.70%
InvThroughput: 2032857 -> 2033916 (+0.05%); split: -0.03%, +0.08%
VClause: 50120 -> 41778 (-16.64%); split: -16.66%, +0.02%
SClause: 62034 -> 62004 (-0.05%); split: -0.33%, +0.29%
Copies: 253836 -> 254505 (+0.26%); split: -0.17%, +0.43%
VALU: 1621606 -> 1622274 (+0.04%); split: -0.03%, +0.07%
SALU: 653251 -> 653252 (+0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34379>
2025-04-08 09:22:04 +00:00
Georg Lehmann
babe7f3e12 aco/gfx10: simpler solution to avoid store instructions in clauses
Foz-DB Navi21 has no changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34379>
2025-04-08 09:22:04 +00:00
Samuel Pitoiset
0ba3a8b3cc radv: add clip rects state bit for emitting discard rectangles
Better match the hw naming.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
08918f0880 radv: regroup emitting all MSAA states in one function
All register writes are optimized out. Also this will allow to use
paired context register writes on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
e8d787e1ef radv: track more MSAA related register writes
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
a327bc677a radv: configure COVERAGE_TO_SHADER_SELECT only if conservative rast is enabled
When conservative rasterization isn't enabled, FullyCoveredEXT is
expected to return 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
6e9782b39c radv: emit conservative raster mode as part of the MSAA state
From the hw perspective, it's more like a MSAA state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
ed744b5c68 radv: move emitting raster and depth/stencil state slightly earlier
To avoid a redundant chekc if no dynamic states are dirtied.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Lars-Ivar Hesselberg Simonsen
37595775a0 panvk: Add barrier for interleaved ZS copy cmds
When executing CopyBufferToImage or CopyImage with multiple regions of
both depth and stencil aspects targeting an interleaved depth stencil
image, we must split the regions into one copy-command for each aspect
and add a barrier between them to avoid a write-after-write race.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 5067921349 ("panvk: Switch to vk_meta")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34384>
2025-04-08 08:08:35 +00:00
Samuel Pitoiset
ef9e7cb3f5 radv: add before/after draw functions for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:15:05 +02:00
Samuel Pitoiset
d2da54e6f3 radv: apply the workaround for buggy HiZ/HiS on GFX12 for DGC
Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:15:04 +02:00
Samuel Pitoiset
6388db03c8 radv: add a workaround for buggy HiZ/HiS on GFX12
HiZ/HiS is buggy and can cause random GPU hangs when stencil is enabled.
There are basically two alternatives but RADV follows RadeonSI and emit
a dummy RELEASE_MEM packet after every draw which should workaround the
issue and maintain performance.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12944
Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:09:13 +02:00
Samuel Pitoiset
11b6d2ba60 radv: determine if HiZ/HiS is enabled earlier on GFX12
To lower CPU overhead of the hardware workaround.

Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:03:11 +02:00
Faith Ekstrand
2ff22de626 nak: Use suld.b on Kepler if we have a format
This works on all GPU generations but we don't actually need it since we
have formatted image loads on everything Maxwell+.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Faith Ekstrand
6aa2c152b8 nak,nir: Add an image_load_raw_nv intrinsic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Faith Ekstrand
e7843720c2 nak: Add support for suld/st.b
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Faith Ekstrand
3d9185f17e nak: Add a ChannelMask type
We use this for tex and image ops instead of a u8.  This lets us assert
some variants up-front as well as pretty print them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Lars-Ivar Hesselberg Simonsen
c2570055d5 vulkan/wsi/wayland: Avoid duplicate colorspace entry
The colorspace SRGB_NONLINEAR could be added twice when querying
available formats, leading to duplicate entries and VulkanCTS WSI test
failures.

Fixes: 789507c99c ("vulkan/wsi: implement the Wayland color management protocol")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34410>
2025-04-07 23:55:25 +00:00
Faith Ekstrand
436f175187 intel/compiler: Use nir_split_conversions()
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34266>
2025-04-07 17:45:21 -05:00
Caio Oliveira
bf9ad36f2d brw: Properly handle cooperative matrices created with constants
Expand constant sources to cover the region read by DPAS, and also
use NULL register as accumulator when possible.

Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34373>
2025-04-07 14:27:43 -07:00
Mel Henning
16e3e0d93b nvk: Support blackwell in max_warps_per_mp_for_sm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34161>
2025-04-07 20:28:48 +00:00
Mel Henning
f2aac0f96a nvk: SET_PS_{REGISTER,WARP}_WATERMARKS
Brings Baldur's Gate 3 from 32 to 35 fps on the character creator. (+9%)
Brings Horizon Zero Dawn from 7098 to 7872 points in its bencmark. (+11%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34161>
2025-04-07 20:28:48 +00:00
Marek Olšák
39d2a1e773 radeonsi: add a VOP3P swizzle requirement for 16-bit packed math
Otherwise ACO fails an assertion.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:23 +00:00
Marek Olšák
15b0198d7f radeonsi: lower load/store bit sizes before load/store vectorization
to match RADV and also to reduce code size by -2.33% in 178 affected shaders.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:23 +00:00
Marek Olšák
5e5b04cb27 radeonsi/ci: don't run GTF tests (they have been removed from glcts)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
5039feb192 radeonsi/ci: update gfx11 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
a4b71e5b2d radeonsi: expose 16-bit NIR types for ALU, MEM, and LDS (no inputs/outputs)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
58f3d6fa20 radeonsi: always use ACO callbacks to scalarize/vectorize 16-bit ALU
This fixes 16-bit ALU with LLVM.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
a82705911e radeonsi: work around a primitive restart bug on gfx10-10.3
Using the GE instead of the VGT register has no effect because it's
the same value. SQ_NON_EVENT is the fix.

Discovered by Samuel Pitoiset.

Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
e4a30b7241 ac/surface: remove 64K_2D modifier with 64B max compressed blocks for gfx12
It has no use and is slower.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
27d5be13c6 ac/nir/cull: always do frustum culling, skip only small prim culling
Only small prim culling uses the viewport state, so only that must be
disabled when there are multiple viewports.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
0f97dc707d ac/nir/cull: rename skip_viewport_culling -> skip_viewport_state_culling
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
bc27ad8064 ac: define physical VGPRs for fake hw overrides
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Alyssa Rosenzweig
e5097a7c9d glsl_to_nir: upcast array indices
array indices need to match the pointer size, otherwise we fail NIR assertions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6075
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
1d5c42528b nir/opt_algebraic: lower 16-bit imul_high & umul_high
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Mike Blumenkrantz
b14c8128bf tu: check for valid descriptor set when binding descriptors
these pointers can be null, and they are checked as null in
pipeline layout creation, but here if the pointer is null it will crash

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34412>
2025-04-07 18:49:10 +00:00
Sergi Blanch Torne
3ef0eac21c Uprev Piglit to ebdf60e0d4b0dc23e79373cb923fdee023eb3b2b
68658566da...ebdf60e0d4

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34378>
2025-04-07 18:16:00 +00:00
Collabora's Gfx CI Team
fcf19bf335 Uprev ANGLE to 3818d37d5e94317f01810053b8f28c1f1e8b98e6
1b34d2a18a...3818d37d5e

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34378>
2025-04-07 18:16:00 +00:00
Ian Romanick
f33faa4648 brw/nir: Allow b2f(not(X)) optimization on Gfx12.5+
Since there are no type conversions, no restrictions are violated.

No shader-db or fossil-db changes on any Gfx12 or older Intel
platforms.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 16956077 -> 16944933 (-0.07%)
instructions in affected programs: 1957573 -> 1946429 (-0.57%)
helped: 4629 / HURT: 35

total cycles in shared programs: 915668518 -> 915684808 (<.01%)
cycles in affected programs: 341925598 -> 341941888 (<.01%)
helped: 3040 / HURT: 1305
helped stats (abs) min: 2 max: 23034 x̄: 205.36 x̃: 16
helped stats (rel) min: <.01% max: 41.21% x̄: 1.28% x̃: 0.48%
HURT stats (abs)   min: 2 max: 68820 x̄: 490.88 x̃: 22
HURT stats (rel)   min: <.01% max: 103.69% x̄: 2.29% x̃: 0.37%
95% mean confidence interval for cycles value: -50.28 57.78
95% mean confidence interval for cycles %-change: -0.35% -0.07%
Inconclusive result (value mean confidence interval includes 0).

LOST:   40
GAINED: 42

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 209828027 -> 209790349 (-0.02%); split: -0.03%, +0.01%
Cycle count: 30504938008 -> 30514045408 (+0.03%); split: -0.06%, +0.09%
Spill count: 512182 -> 512168 (-0.00%)
Fill count: 623432 -> 623426 (-0.00%); split: -0.00%, +0.00%
Max live registers: 65465029 -> 65464959 (-0.00%)

Totals from 57895 (8.19% of 706589) affected shaders:
Instrs: 50144907 -> 50107229 (-0.08%); split: -0.11%, +0.03%
Cycle count: 7549692606 -> 7558800006 (+0.12%); split: -0.25%, +0.37%
Spill count: 58834 -> 58820 (-0.02%)
Fill count: 102324 -> 102318 (-0.01%); split: -0.01%, +0.01%
Max live registers: 9129045 -> 9128975 (-0.00%)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
853ead2073 brw/nir: Optimize b2f(not(X)) using logical operations instead of arithmetic
Funny story... this is how regular b2f was implemented before Curro
implmented the `MOV dst:F -src:D` method 9 years ago (see
3ee2daf23d).

Eliminating the type conversion in the arithmetic operation enables the
next commit.

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

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
3d23496fd9 brw/copy: Copy prop -X into Y&1
This commit prevents code quality regressions in the next
commit. Without this, some fragment shaders in Batman: Arkham Origins
have code like:

    shr(8)          g51<1>UW        g1.28<1,8,0>UB  0x76543210V
    ...
    and(8)          g52<1>UD        ~g51<8,8,1>UW   0x0001UW
    ...
    add(8)          g56<1>D         -g52<8,8,1>D    1D

transformed to

    shr(8)          g51<1>UW        g1.28<1,8,0>UB  0x76543210V
    ...
    and(8)          g52<1>UD        ~g51<8,8,1>UW   0x0001UW
    ...
    mov(8)          g56<1>D         -g52<8,8,1>D
    ...
    and(8)          g57<1>UD        ~g56<8,8,1>D    0x00000001UD

Propagating through the negation allows the added MOV to be deleted.

shader-db:

All Intel platforms had simlar results. (Lunar Lake shown)
total instructions in shared programs: 16968020 -> 16968019 (<.01%)
instructions in affected programs: 281 -> 280 (-0.36%)
helped: 1 / HURT: 0

total cycles in shared programs: 914598850 -> 914598832 (<.01%)
cycles in affected programs: 5398 -> 5380 (-0.33%)
helped: 1 / HURT: 0

A single Blender vertex shader was affected.

fossil-db:

Lunar Lake, Tiger Lake, Ice Lake, and Skylake had similar results. (Lunar Lake shown)
Totals:
Instrs: 209894650 -> 209894651 (+0.00%)
Cycle count: 30545958586 -> 30545952860 (-0.00%)

Totals from 2 (0.00% of 706657) affected shaders:
Instrs: 3582 -> 3583 (+0.03%)
Cycle count: 1875100 -> 1869374 (-0.31%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Subgroup size: 9906400 -> 9906416 (+0.00%)

Totals from 2 (0.00% of 805770) affected shaders:
Subgroup size: 16 -> 32 (+100.00%)

Two compute shaders in Hogwarts Legacy were affected.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
e82464e6e0 brw/copy: Refactor source modifier type checking
This simplifies the next commit.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
dee49f4206 brw/algebraic: Optimize derivative of convergent value
This is mostly defensive. If a convergent value ever ended up as a
source of a DDX or DDY, the eu_emit code will ignore the stride. This
will result in bad code being generated.

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

v2: DDX and DDY will always be float, but brw_imm_for_type only works
with integer types.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Suggested-by: Ken
Fixes: d5d7ae22ae ("brw/nir: Fix up handling of sources that might be convergent vectors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
2025-04-07 17:16:34 +00:00
Ian Romanick
5656682344 brw/nir: Eliminate default parameter to get_nir_src
The vast majority of the callers want channel = 0. During the
development process, using this default parameter value saved a lot of
pain in rebasing. However, it seems to be more trouble than it's worth.

Issue #12464 occurred because LNL was merged while this code was in
review. As a result, one caller of get_nir_src that wanted channel = -1
was not inspected closely, and it got the default channel = 0 instead.

To prevent this happening in the future (with possible branches still
yet to be merged, for example), remove the default parameter. This will
force the inspection of any callers that don't have an explicit channel
parameter. Hopefully that will prevent more problems.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
2025-04-07 17:16:34 +00:00
Ian Romanick
38b58e286f brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset
The source of nir_intrinsic_load_barycentric_at_offset is a vector, so
-1 should be passed to get_nir_src. This is also done for texture
sampling intrinsics.

I skimmed the other user of get_nir_src, and I believe they are
correct. This one was just missed as LNL support landed an many, many
rebases of the original MR occurred.

v2: Fix another get_nir_src call. Suggested by Lionel.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: d5d7ae22ae ("brw/nir: Fix up handling of sources that might be convergent vectors")
Closes: #12464
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
2025-04-07 17:16:34 +00:00
Eric R. Smith
739da17f6e panfrost,lima: use index size in panfrost minmax_cache
Bifrost keeps a cache of information about buffers being
used as indices. Unfortunately, it was not keeping information
about the size of the indices (probably because this rarely
changes). If a program deliberately re-interprets the indices
as a different type (e.g. UNSIGNED_INT instead of UNSIGNED_SHORT)
then we will use incorrect values from the cache. This actually
showed up in a test program we were running.

Fix by saving the index size in the cache key.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34011>
2025-04-07 16:53:22 +00:00
Patrick Lerda
6fab29d37e r600: implement EXT_window_rectangles
This is a backport of 0ca8294ece ("radeonsi:
implement EXT_window_rectangles")

This change was tested and passes the piglit tests (20/20)
on rv770, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34295>
2025-04-07 16:31:21 +00:00
Ashley Smith
c1ce2dcc66 pan/bi: Enable ARB_shader_clock extension support
Introduces GCLK instruction to read the system timer/counter. Currently
only counter is supported.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34342>
2025-04-07 15:58:45 +00:00
Patrick Lerda
f0c0997277 r600: fix textures with swizzles limited to zero and one
This issue seems to be specific to textureGather() which could
fail when processing some surfaces. These surfaces are configured
with non-standard one and zero swizzles. The gpu doesn't support
this very specific setup with all the possible hardware formats.
This change selects a compatible configuration when this is
possible.

This change was tested on palm, barts and cayman. This change
fixes the 216 remaining arb_texture_gather tests:
spec/arb_texture_gather/texturegather/.*-zero-.*: fail pass
spec/arb_texture_gather/texturegather/.*-one-.*: fail pass
spec/arb_texture_gather/texturegatheroffset/.*-zero-.*: fail pass
spec/arb_texture_gather/texturegatheroffset/.*-one-.*: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34293>
2025-04-07 15:38:44 +00:00
Samuel Pitoiset
e3c3fa8b9a radv: add a fuction to emit the VRS surface on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
00354f0a74 radv: do not emit the VRS surface VA when it's not enabled
This shouldn't be necessary because VRS_SURFACE_ENABLE is the toggle
bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
9b11caee40 radv: stop emitting CB_FDCC_CONTROL to zero on GFX11-GFX11.5
It's already emitted by the CLEAR_STATE packet on these GPUs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
17e5fd856f radv: split null framebuffer state emission for GFX12
For consistency with color/ds states emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
c608a601bf radv: split framebuffer depth/stencil state emission for GFX12
It's also really simpler on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
d5eb1f6833 radv: split framebuffer color state emission for GFX12
It's really simpler on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
9dec80d8cf radv: tidy up radv_emit_db_shader_control()
To separate packet construction and emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
4bc6335e3c radv: restore DB_DFSM_CONTROL properly when POPS isn't used
It looks safer to restore this register to its initial value when POPS
isn't used. Only VEGA10 and RAVEN are concerned.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
cb390ca234 radv: tidy up radv_emit_raster_state()
To separate packet construction and emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
62e4b1130a radv: remove useless FDCC_ENABLE bitfield clear on GFX12
This bit doesn't exist.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Sergi Blanch Torne
ba935c6ce6 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit d22fe48a58.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34402>
2025-04-07 14:17:11 +02:00
Patrick Lerda
8c8b178899 r600: fix clear_depth_stencil refcnt imbalance
After ca09c173f6, util_blitter_clear_render_target() requires
a call to util_blitter_save_fragment_constant_buffer_slot().
The r600 implementation was using the same sequence with
util_blitter_clear_depth_stencil() which does not need this
call. This was the cause of the refcnt imbalance.

For instance, this issue is triggered with:
"piglit/bin/ext_clear_texture-stencil -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: ca09c173f6 ("gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34292>
2025-04-07 11:30:05 +00:00
Patrick Lerda
4c2b2c82b0 r600: move stores to the end of shader when required
This change is inspired from 1e0e521a7d ("broadcom/compiler:
move stores to the end of shader") and makes the khr cull_distance
tests which were broken after dae57e184a functionals again.

Fixes: dae57e184a ("glsl,st/mesa: always lower IO for GLSL, unlower IO for drivers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34154>
2025-04-07 11:08:09 +00:00
Juan A. Suarez Romero
8742927d8f v3dv: don't check if DRM device is master
This was added to ensure we can get its resources, but they can be
obtained also from non master.

Fixes: 2af12c5b36 ("v3dv: Check multiple DRM primary nodes before picking the display fd")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12641
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34366>
2025-04-07 10:10:57 +00:00
Georg Lehmann
0cad7b0968 spirv: fix cooperative matrix by value function params
The vtn_ssa_value for a cmat is not backed by a nir_def, but by a nir_variable, so
can't be used directly when calling a function.  In most cases the cmat is used by
reference so code will take the value of deref for it (which is a `nir_def`).

When passing a cooperative matrix to a function by value, let the caller pass the deref
value, and the callee copy to a new local variable from that deref.

Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34364>
2025-04-07 07:53:44 +00:00
Antonio Ospite
864ae91392 meson: pass --no-pager to meson configure command
The `meson configure` command is used in `.gitlab-ci/meson/build.sh` to
show a summary of the build configuration, however when the script is
re-used locally on systems when there is a pager the commands blocks
for user input, which can be annoying.

Pass the `--no-pager` option to `meson configure`, so that it never
blocks for user input.

This does not change the behavior in the CI, it just makes the script run
uninterrupted also on local invocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34289>
2025-04-07 09:22:06 +02:00
Samuel Pitoiset
8b3056343f ac/gpu_info: bump required DRM minor version to 3.42.0 (kernel 5.15+)
Linux 5.15+ (LTS) has been released in October 31 and it's supported
until December 2026. Linux 4.x are very old at this point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34375>
2025-04-07 06:44:23 +00:00
Samuel Pitoiset
042770ceea ac,radv: remove has_scheduled_fence_dependency
This isn't used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34375>
2025-04-07 06:44:22 +00:00
Sergi Blanch Torne
d22fe48a58 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-04-07 07:00 UTC
* End: 2025-04-07 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34149>
2025-04-07 06:01:28 +00:00
Caio Oliveira
6a55581d41 intel/executor: Fix check for open() failure
Fixes: 71ae31dbd8 ("intel/executor: Allow selecting a device to use")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34400>
2025-04-06 19:43:51 -07:00
Marek Olšák
78c73a4aeb st/mesa: don't do nir_remove_dead_variables on in/out twice
It's already done before this.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:53 -04:00
Marek Olšák
3b0a616024 glsl: move code after link_varyings into link_varyings
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
b3f01773ac glsl: always return true at the end of link_varyings
Require that the function returns false before we get to the end if there
is any linker error.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
4fe3ea1427 glsl: remove a deprecated comment about nir_compact_varyings
We don't use nir_compact_varyings anymore.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
74dd799cc2 glsl: stop calling nir_opt_combine_stores (redundant with nir_opt_vectorize_io)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
9ce89f69b0 glsl: return failure from remove_unused_io_vars
to stop linking if we fail here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
063df44e0d glsl: return failure from varying_matches_assign_locations
to stop linking if we fail here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
b2d215ac84 glsl: return failure from gl_nir_validate_first_and_last_interface_explicit_locations
to stop linking if we fail here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Timothy Arceri
d8782db3a4 glsl: fix regression in ubo cloning
Fixes KHR-GL46.layout_binding.block_layout_binding_block_VertexShader
with radeonsi.

Fixes: 2b2132d2ac ("nir: fix uniform cloning helper")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34337>
2025-04-06 19:43:47 +10:00
Caio Oliveira
9845693912 brw: Fix memory leak in EU validation tests
Fixes: 62323a934b ("brw: Add BRW_TYPE_BF validation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34395>
2025-04-06 06:26:03 +00:00
Caio Oliveira
c33ee4adae brw: Fix invalid memory access in scoreboard test
Fixes: 03aca2d248 ("brw: Use new bld/exp style in scoreboard tests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34394>
2025-04-05 22:58:23 -07:00
Valentine Burley
9f9233c033 ci/android: Add section for downloading Android CTS
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34320>
2025-04-05 09:28:21 +00:00
Valentine Burley
9d11a8304e ci/android: Remove platform-tools from test-android container
Cuttlefish comes with the required tools (under /cuttlefish/bin),
downloading platform-tools isn't necessary.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34320>
2025-04-05 09:28:21 +00:00
Guilherme Gallo
70f10dc327 ci/lava: Fetch kernel modules from overlay
LAVA supports overlays in the deploy action, so there is no need to
download them in lava_build.sh and bloat the rootfs file with it.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34352>
2025-04-05 08:42:20 +00:00
Benjamin Lee
2a7c38b48e panfrost: fix libpan_v4 header include
In addition to including the wrong version potentially causing runtime
issues, it can cause intermittent build failures because v4 libpanfrost
does not have a dependency on the libpan_v5.h in meson.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 20970bcd96 ("panfrost: Add base of OpenCL C infrastructure")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34391>
2025-04-05 08:23:08 +00:00
Benjamin Lee
3b66e4a438 panfrost/pps: fix omitting several counters
The cid loop in the previous implementation stopped at n_counters for a
given category, even though cid is a global id that does not start
counting from zero at the beginning of each category. As a result, we
missed most of the counters outside of the first category.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 513d1baaea ("pps: Panfrost pps driver")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34202>
2025-04-05 08:06:00 +00:00
Valentine Burley
b411310b12 radv/ci: Update ANGLE version used for traces
The updated ANGLE version fixed the fog rendering in the minetest trace.

The PIGLIT_REPLAY_ANGLE_ARCH was also changed in the new artifact to
match ANGLE's own naming.

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

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34308>
2025-04-05 09:13:54 +02:00
Valentine Burley
1668feefb4 ci: Make it possible to use ANGLE traces on other architectures
Don't hardcode amd64 architecture, use PIGLIT_REPLAY_ANGLE_ARCH to make
it easier to opt in for ANGLE traces on arm64 in the future.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34308>
2025-04-05 09:13:53 +02:00
Eric Engestrom
3041440bcb zink+tu/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
d49b38059f zink+radv/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
e3a5a181a1 zink+nvk/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
ecaa3392d3 lvp/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
d1922ef7ea nvk/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
90844640a1 freedreno/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
e65d0d2250 radv/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
6a86683ef8 radeonsi/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Caio Oliveira
7ae638c0fe brw: Add brw_builder::uniform()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34355>
2025-04-04 23:07:21 +00:00
Caio Oliveira
f33d93da11 brw: Remove HSW specific code from brw_compile_cs.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34355>
2025-04-04 23:07:21 +00:00
Connor Abbott
536b2b13c8 tu: Implement VK_EXT_fragment_density_map_offset
Implement support for dynamic rendering, including suspending and
resuming render passes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34159>
2025-04-04 22:35:20 +00:00
Connor Abbott
f5ac3c452d vk/runtime: Add common CmdEndRendering
Similar to the common CmdEndRenderPass, add a default implementation for
drivers that implement VK_EXT_fragment_density_map_offset.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34159>
2025-04-04 22:35:19 +00:00
Connor Abbott
4947436da7 vk/runtime: Use vk_command_buffer in renderpass wrappers
The comment is out of date, and all drivers using the runtime use
vk_command_buffer. Let's use it directly.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34159>
2025-04-04 22:35:19 +00:00
Sushma Venkatesh Reddy
8f90b10b63 intel/tools: Improve memory allocation failure handling in aubinator_error_decode_xe
Ensure proper cleanup when memory allocation fails during HWCTX and VMA
parsing in `read_xe_data_file`. This ensures graceful error handling by
preventing potential memory leaks.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34371>
2025-04-04 22:09:27 +00:00
LingMan
9ddc160012 meson: Sync subproject version numbers in packagefiles with their .wrap equivalents
These tell meson which version the `.wrap` file downloads and should therefore always stay in sync.
No dependency is actually being updated here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34368>
2025-04-04 21:22:27 +00:00
LingMan
83bf45b0ce meson: Update pest subproject family
Starting with Rust 1.83 this benign warning is show when compiling the pest dependency:

```
warning: elided lifetime has a name
   --> pest/src/iterators/pairs.rs:330:70
    |
89  | impl<'i, R: RuleType> Pairs<'i, R> {
    |      -- lifetime `'i` declared here
...
330 |     ) -> Filter<FlatPairs<'i, R>, impl FnMut(&Pair<'i, R>) -> bool + '_> {
    |                                                                      ^^ this elided lifetime gets resolved as `'i`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default
```

Meson, at least as of version 1.7.0, unfortunately does not suppress warnings originating in dependencies.
Upstream has resolved the warning in 2.8.0, so update to that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34368>
2025-04-04 21:22:27 +00:00
Caio Oliveira
03aca2d248 brw: Use new bld/exp style in scoreboard tests
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
7ee673c195 brw: Add parser of SWSB annotations to use in tests
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
81dd3e1527 brw: Return actual progress in brw_lower_scoreboard
This will be useful later for tests to be used in conjunction with the
EXPECT_PROGRESS / EXPECT_NO_PROGRESS helpers.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
3e727000dd brw: Stop setting SFID in scoreboard tests
They won't affect the scoreboard, and will get in the
way of a later change.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
bcea076aca brw: Use SIMD16 shaders in scoreboard tests for Xe2+
Some tests changed to avoid unintended overlap between operands which
would change the SWSB assigned.  In some cases also changed the Gfx12
matching test so they remain equal.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:52 +00:00
Caio Oliveira
cd486cda48 brw: Use control flow helpers in scoreboard tests
Also update WHILE to optionally take a predicate (default to NONE).  And
make the predicate in the IF optional (default to NORMAL).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:52 +00:00
Eric Engestrom
7c5389695b ci/fluster: don't overwrite FLUSTER_VECTORS_HOST_PATH to a different meaning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34362>
2025-04-04 19:36:09 +00:00
Eric Engestrom
8ec11893d9 ci/fluster: use http proxy when checking for the vector files
It's done properly when downloading it, but not when checking for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34362>
2025-04-04 19:36:09 +00:00
Konstantin
e7a44de184 nir/tests: Do not rely on __LINE__
__LINE__ can be inconsistent when using different compilers. This patch
changes the test runner to do a simple string find/replace of the test
source file instead of looking for the line where the reference string
starts.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33980>
2025-04-04 19:01:01 +00:00
Danylo Piliaiev
c496774c35 freedreno/a6xx: Implement ARB_shader_clock
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:49 +00:00
Danylo Piliaiev
0e9854a894 tu: Implement VK_KHR_shader_clock
There is a special address defined in kernel from which ALWAYSON
counter could be read.

Blob uses this sequence to read it:
  getone #l15
  mov.s32s32 r2.y, -4096
  mov.s32s32 r2.z, 131071
  (rpt5)nop
  ldg.u32 r2.w, g[r2.y], 1
  ldg.u32 r2.y, g[r2.y+4], 1
  (sy)(ss)mov.s32s32 r48.x, (last)r2.w
  mov.s32s32 r48.y, (last)r2.y
  l15:

Passes:
 dEQP-VK.glsl.shader_clock.*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:49 +00:00
Danylo Piliaiev
4b1b4ee10c freedreno,tu: Read and pass to compiler uche_trap_base
KGSL always exposed uche_trap_base, and MSM only recently
got support for it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:49 +00:00
Danylo Piliaiev
6a448ca08b freedreno: Bump kernel uapi (linux 6.14)
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:48 +00:00
Benjamin Otte
0941af995a lavapipe: Don't advertise support for multiplane drm formats
Fixes: bd4f69a0fe
Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34190>
2025-04-04 17:59:43 +00:00
Robert Mader
8b76f521a0 meson: Bump minimum version to 1.3.0
Builds currently fail on older versions since the commit
below.

Fixes: f35172b6a4 (meson: make CL args common)
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34313>
2025-04-04 17:15:34 +00:00
Mark Collins
e4359cc49c tu/kgsl: Fix KGSL syncobj lifetime in no CB submit
The temporary syncobj created in the fast path of kgsl_queue_submit was
not being destroyed, and potentially being assigned to multiple syncobjs
without being properly duplicated. This could lead to a use-after-free
or double-free since multiple syncobjs could be assigned the same FD.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34328>
2025-04-04 16:54:17 +00:00
Mark Collins
cf4bd2e412 tu/kgsl: Revert "Remove zero CB queue submission fast path"
This reverts commit 0342d34bdb which
introduced a regression in the Turnip's KGSL backend, causing various
sync issues since KGSL doesn't advance the GPU timeline when a submit
without cmdbufs is made. A comment explaining the issue was added to the
code, and the fast path is reintroduced.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34328>
2025-04-04 16:54:17 +00:00
Georg Lehmann
c70dcd1451 aco/gfx9+: use d16 global/scratch/buffer loads
Full register loads are not nessecary and prevent packing optimizations.
Global/Scratch is GFX9+ so D16 loads are always supported.
We already used LDS D16 loads.

Foz-DB Navi31(mostly RA noise):
Totals from 716 (0.90% of 79789) affected shaders:
Instrs: 3854176 -> 3854238 (+0.00%); split: -0.00%, +0.00%
CodeSize: 20034440 -> 20035220 (+0.00%); split: -0.00%, +0.00%
Latency: 24410951 -> 24411120 (+0.00%)
InvThroughput: 5181276 -> 5181301 (+0.00%)
Copies: 320258 -> 320317 (+0.02%)
VALU: 2207307 -> 2207366 (+0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34346>
2025-04-04 16:20:39 +00:00
Juan A. Suarez Romero
f5e36e382f broadcom/compiler: initialize register
This fixes issue detected by static analyzer: passed-by-value struct
argument contains uninitialized data (e.g., field: 'file').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
0e50b09d4a broadcom/compiler: don't use VLA on emit alu
Using constant-size array instead of variable-length array is preferred
due several issues with the latter.

Particularly, for this case using VLA generates several warnings by
static analyzer: passed-by-value struct argument contains uninitialized
data (e.g., field: 'file').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
01151f045f broadcom/compiler: use safe iterator to remove instructions
The current approach has an issue detected by static analyzer: use of
memory after it is freed.

Using a proper iterator makes things safer.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
0b0d6a36f2 vc4: use safe iterator to remove instructions
The current approach has an issue detected by static analyzer: use of
memory after it is freed.

Using a proper iterator makes things safer.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
baa4fefe74 broadcom/cle: assert attribute has a value
This assertions helps to fix several warnings detected by static
analyzer regarding passing null pointers to functions that expects
non-null pointer.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
47f280778e vc4: assert there are sources when emitting texture
This assertion fixes an issue detected by static analyzer:
passed-by-value struct argument contains uninitialized data (e.g.,
field: 'file').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
8f5423820a vc4: add assertion on constant_fold
This fixes an issue detected by static analyzer: the right operand of
'>>' is a garbage value due to array index out of bounds.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
54db7c46fa vc4: initialize register
While this is likely not necessary, it fixes an issue detected by static
analyzer: the left operand of '<=' is a garbage value.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
6d6a3ab679 v3dv: asserts push constants data is valid
When pushing constants.

This fixes an issue detected by static analyzer: null pointer passed to
1st parameter expecting 'nonnull'.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
665df034e7 v3dv: check dynamic offset output
The output variable must be non NULL when descriptor type is dynamic.

This fixes an issue detected by static analyzer: dereference of null
pointer (loaded from variable 'dynamic_offset').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
ede3feb16d v3dv: asserts struct is always non null
This fixes an issue detected by static analyzer: access to field 'pNext'
results in a dereference of a null pointer (loaded from variable
'rs_info').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
2c8411e9d2 vc4: check instruction before setting flags
This fixes an issue detected by static analyzer: access to field 'sf'
results in a dereference of a null pointer (loaded from variable
'last_inst').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Lionel Landwerlin
72bc74f0be anv: add shader-hash debug option
Emits a dummy MI_STORE_DATA_IMM with the shader hash in front of :
   - 3DSTATE_VS
   - 3DSTATE_HS
   - 3DSTATE_DS
   - 3DSTATE_HS
   - 3DSTATE_PS
   - COMPUTE_WALKER / GPGPU_WALKER

Example :

0x00000000:  0x10000002:  MI_STORE_DATA_IMM
0x00000000:  0x10000002 : Dword 0
    DWord Length: 2
    Force Write Completion Check : false
    Store Qword: 0
    Use Global GTT: false
0x00000004:  0xffffe0c0 : Dword 1
    Core Mode Enable: 0
0x00000008:  0x0000effe : Dword 2
    Address: 0xeffeffffe0c0
0x0000000c:  0x126e815a : Dword 3  <------------ shader hash
0x00000010:  0x78100007 : Dword 4
    Immediate Data: 309231962
0x00000000:  0x78100007:  3DSTATE_VS
0x00000000:  0x78100007 : Dword 0
    DWord Length: 7
0x00000004:  0x00000000 : Dword 1
0x00000008:  0x00000000 : Dword 2
    Kernel Start Pointer: 0x00000000
0x0000000c:  0x00040000 : Dword 3
    Software Exception Enable: false
    Accesses UAV: false

It'll correlate with the value emitted in the pipeline stats from fossil replay :

  $ grep -i 126e815a /tmp/stats.csv
  fossilize.aab93c5c3f965151.1.foz,GRAPHICS,de1b925dec8a8083,507378,498283,303434,vertex,8,50,4,0,1826,0,0,0,8,17,0,0x00000000126e815a,15

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
789f13359a anv: consolidate environment variables
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
713cb0fdc1 anv/hasvk: sort out debug options
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
8a51e097af docs: remove unused env variable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
43e0f02391 anv/hasvk: consider timeline semaphore support stable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Vlad Zahorodnii
c57da522fa vulkan/wsi/wayland: Document why wl_surface_damage() code path ignores provided damage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34227>
2025-04-04 14:38:44 +00:00
Vlad Zahorodnii
0c943bbb64 vulkan/wsi/wayland: Damage whole surface using wl_surface_damage_buffer()
Most compositors work with damage in the buffer local coordinate space.
This change spares the compositors some work converting the provided
INT32_MAX x INT32_MAX damage region to the buffer local coordinate
space. It has no significant performance impact, but it'd still be nice
to use wl_surface_damage_buffer() if possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34227>
2025-04-04 14:38:44 +00:00
Vlad Zahorodnii
fd146d04d1 egl/wayland: Damage whole surface using wl_surface_damage_buffer()
Most compositors work with damage in the buffer local coordinate space.
This change spares the compositors some work converting the provided
INT32_MAX x INT32_MAX damage region to the buffer local coordinate
space. It has no significant performance impact, but it'd still be nice
to use wl_surface_damage_buffer() if possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34227>
2025-04-04 14:38:43 +00:00
Job Noorman
78ef51aa04 ir3/opt_preamble: take alias.rt into account for rewrite cost
FS outputs can use const registers in alias.rt without a mov so take
this into account when calculating the rewrite cost of instructions.

Totals:
MaxWaves: 2765084 -> 2765130 (+0.00%); split: +0.00%, -0.00%
Instrs: 56289002 -> 56285073 (-0.01%); split: -0.01%, +0.00%
CodeSize: 118071672 -> 118076808 (+0.00%); split: -0.00%, +0.01%
NOPs: 9491112 -> 9492474 (+0.01%); split: -0.00%, +0.02%
MOVs: 1790085 -> 1786768 (-0.19%); split: -0.19%, +0.00%
Full: 2156693 -> 2156607 (-0.00%); split: -0.00%, +0.00%
(ss): 1329812 -> 1329546 (-0.02%); split: -0.03%, +0.01%
(sy): 686396 -> 686386 (-0.00%); split: -0.00%, +0.00%
(ss)-stall: 4995295 -> 4995185 (-0.00%); split: -0.02%, +0.01%
(sy)-stall: 19828966 -> 19828624 (-0.00%); split: -0.01%, +0.01%
Cat0: 10450369 -> 10451731 (+0.01%); split: -0.00%, +0.02%
Cat1: 2787946 -> 2784566 (-0.12%); split: -0.12%, +0.00%
Cat2: 21265787 -> 21264447 (-0.01%)
Cat3: 16207098 -> 16206536 (-0.00%)
Cat7: 1597849 -> 1597840 (-0.00%); split: -0.00%, +0.00%

Totals from 730 (0.36% of 200220) affected shaders:
MaxWaves: 6308 -> 6354 (+0.73%); split: +0.79%, -0.06%
Instrs: 258235 -> 254306 (-1.52%); split: -1.59%, +0.07%
CodeSize: 698806 -> 703942 (+0.73%); split: -0.28%, +1.02%
NOPs: 21040 -> 22402 (+6.47%); split: -1.85%, +8.33%
MOVs: 9426 -> 6109 (-35.19%); split: -35.52%, +0.33%
Full: 8914 -> 8828 (-0.96%); split: -1.03%, +0.07%
(ss): 5118 -> 4852 (-5.20%); split: -6.58%, +1.39%
(sy): 2118 -> 2108 (-0.47%); split: -1.18%, +0.71%
(ss)-stall: 17360 -> 17250 (-0.63%); split: -4.57%, +3.94%
(sy)-stall: 34921 -> 34579 (-0.98%); split: -5.90%, +4.92%
Cat0: 24734 -> 26096 (+5.51%); split: -1.58%, +7.09%
Cat1: 12311 -> 8931 (-27.46%); split: -27.70%, +0.24%
Cat2: 106329 -> 104989 (-1.26%)
Cat3: 100547 -> 99985 (-0.56%)
Cat7: 3646 -> 3637 (-0.25%); split: -0.91%, +0.66%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34279>
2025-04-04 14:17:10 +00:00
Vignesh Raman
7959250d1e s3_upload: improve url validation and error message
Ensure s3_upload correctly validates the S3 folder url by requiring it
to end with /. This prevents wrong uploads to invalid paths, such as
file urls. Also improve the error message.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34255>
2025-04-04 13:32:45 +00:00
Zan Dobersek
248edb43c3 tu: allow D3D-compatible texture coordinate rounding
When running under DXVK or vkd3d, the texture coordinate rounding behavior
should match D3D expectations. On Adreno, this behavior can be toggled
through the SP_TP_MODE_CNTL register.

A driconf-based option is introduced to help set the relevant register flag
that enables this behavior.

This fixes the cause of test_sampler_rounding test case failure in vkd3d on
Turnip's side, but a small change in vkd3d is also required, so the test
failure expectation isn't removed yet.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33987>
2025-04-04 10:09:47 +00:00
Zan Dobersek
3b1ca55b40 freedreno/registers: add useful A6XX_SP_TP_MODE_CNTL bitfields
Add additional bitfields for the A6XX_SP_TP_MODE_CNTL registers, ones that
we already use and the texcoord rounding mode bitfield that we'll need for
D3D-over-Vulkan implementations.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33987>
2025-04-04 10:09:47 +00:00
Benjamin Lee
e183650aa4 panvk/csf: fix uninitialized read in utrace_clone_init_builder
Previous code assumed that the caller of utrace_clone_init_builder would
fill some parameters of the builder config, but we were not. Instead,
initialize these from the csif props the same as all the other builder
instances.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 3096cf2a5d ("panvk/csf: flush and process trace events for all cmdbufs")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34270>
2025-04-04 09:43:02 +00:00
Hyunjun Ko
2b0df6c564 anv: Use vk_video_derive_h265_scaling_list
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:48 +00:00
MaciejDziuban
f31a33905a radv: Use vk_video_derive_h265_scaling_list
This commit makes radv use vk_video_derive_h265_scaling_list, which properly
applies default scaling lists whenever they're needed. It also simplifies
update_h265_scaling function into a simple memcpy. The firmware interface
struct and Vulkan's StdVideoH265ScalingLists struct both have identical memory
layouts, so it's not neccessary divide it into multiple copies with offsets.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:48 +00:00
MaciejDziuban
4072286f07 vulkan: Add default scaling lists for H265
H265 specification defines default scaling lists to use whenever scaling lists
are not specified in neither sps nor pps. Currently drivers ignore this
requirement and set the lists to zero. This commits adds a helper function
vk_video_derive_h265_scaling_list (similar to its h264 counterpart) that
selects either sps or pps lists and falls back to default values if neither
were specified. The default values were taken from ITU-T H265 specification
(revision 8), section 7.4.5.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:48 +00:00
MaciejDziuban
a1bf7192e5 vulkan: handle use_default_scaling_matrix_mask in h264 decoder
H264 specification defines this field to force usage of the default
scaling lists even if they are specified in ScalingList4x4 and
ScalingList8x8.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:47 +00:00
Ian Romanick
20cce95ce5 brw/opt: Don't call brw_opt_copy_propagation before brw_lower_load_reg
On a 36c/72t Xeon system, performance of replaying
hogwarts_legacy.dx12vk-ultra.foz was improved 1.3% +/- 0.77% (n=10).

I picked MTL for the fossil-db results because it was the most negative.

shader-db:

All Intel platforms had fairly similar results. (Lunar Lake)
total instructions in shared programs: 16964217 -> 16964216 (<.01%)
instructions in affected programs: 51777 -> 51776 (<.01%)
helped: 20 / HURT: 27

total cycles in shared programs: 892934916 -> 893041912 (0.01%)
cycles in affected programs: 51245298 -> 51352294 (0.21%)
helped: 96 /HURT: 78

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 233678547 -> 233678944 (+0.00%); split: -0.00%, +0.00%
Cycle count: 24398049850 -> 24400490877 (+0.01%); split: -0.01%, +0.02%
Max live registers: 42145052 -> 42145038 (-0.00%); split: -0.00%, +0.00%

Totals from 1141 (0.14% of 805934) affected shaders:
Instrs: 1546001 -> 1546398 (+0.03%); split: -0.01%, +0.03%
Cycle count: 1201746062 -> 1204187089 (+0.20%); split: -0.14%, +0.34%
Max live registers: 84247 -> 84233 (-0.02%); split: -0.03%, +0.01%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
991a2f510b brw/sat: Eliminate non-defs saturate propagation
The intervening_saturating_copy test is removed. The defs version of the
pass does not handle this case. It should not occur often in practice
anyway. Copy propagation and brw_nir_opt_fsat should prevent this
scenario from happening.

No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 212677275 -> 212677278 (+0.00%)
Cycle count: 30466062848 -> 30466056040 (-0.00%)

Totals from 1 (0.00% of 706300) affected shaders:
Instrs: 1343 -> 1346 (+0.22%)
Cycle count: 411664 -> 404856 (-1.65%)

v2: Stop counting ip. The non-defs part of the pass was the only thing
that used it.

v3: Also delete "if (block != def->block) continue;" code. I noticed
this while working on some other changes to this function. It's the last
thing in the loop, so it's totally useless. Delete some other spurious
continues too.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
cc5a6a5ae8 brw/sat: Convert tests to use load_reg
This is in prepartion for a commit that removes the non-defs version of
the pass.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
2d13acf9d9 brw: Add passes to generate and lower load_reg
v2: Add support for WE_all instructions... this already just worked, so
I only had to delete the check and the FINISHME comment.

v3: Use logic more like def_analysis::update_for_reads to determine when
to not insert LOAD_REG instructions. Based on a suggestion by Ken.

v4: Eliminate "store" from all the names since STORE_REG does not exist
anymore. Fold insert_load_reg into brw_insert_load_reg. Elminate extra
call to s.def_analysis.require() after progress. Pull a loop-invariant
check out of the inst->srouces loop. Drop call to
brw_opt_split_virtual_grfs after lowering load_reg. All suggested by
Caio.

v5: Assert that LOAD_REG doesn't already exist in
brw_insert_load_reg. Update comment before fully_defines. Both
suggested by Caio.

v6: Don't explicitly special-case SHADER_OPCODE_MEMORY_STORE_LOGICAL.
Move the inst->dst.file != VGRF check earlier to avoid the loop over
sources. Both suggested by Ken. Move the call the brw_insert_load_reg
a little bit later, and explain why it's at that location. Suggested
by Caio.

v7: Many changes to the for-each-source loop in brw_insert_load_reg.
Removes incorrect multiplication of s.alloc.sizes with reg_unit. Adds
checks for matching SIMD size and NoMask in the search for pre-existing
LOAD_REG of same value.

v8: Add some unit tests. Suggested by Caio.

shader-db:

Lunar Lake
total instructions in shared programs: 16923237 -> 16921895 (<.01%)
instructions in affected programs: 450565 -> 449223 (-0.30%)
helped: 251 / HURT: 377

total cycles in shared programs: 910428418 -> 889920590 (-2.25%)
cycles in affected programs: 719248184 -> 698740356 (-2.85%)
helped: 9076 / HURT: 9082

total fills in shared programs: 2242 -> 2218 (-1.07%)
fills in affected programs: 116 -> 92 (-20.69%)
helped: 2 / HURT: 0

total sends in shared programs: 848635 -> 848421 (-0.03%)
sends in affected programs: 810 -> 596 (-26.42%)
helped: 10 / HURT: 0

LOST:   82
GAINED: 78

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19875784 -> 19871694 (-0.02%)
instructions in affected programs: 1050091 -> 1046001 (-0.39%)
helped: 251 / HURT: 2403

total cycles in shared programs: 905328238 -> 882446458 (-2.53%)
cycles in affected programs: 682736344 -> 659854564 (-3.35%)
helped: 7869 / HURT: 7911

total spills in shared programs: 5512 -> 5032 (-8.71%)
spills in affected programs: 1830 -> 1350 (-26.23%)
helped: 8 / HURT: 0

total fills in shared programs: 5648 -> 4782 (-15.33%)
fills in affected programs: 3312 -> 2446 (-26.15%)
helped: 8 / HURT: 0

total sends in shared programs: 1032942 -> 1032722 (-0.02%)
sends in affected programs: 572 -> 352 (-38.46%)
helped: 10 / HURT: 0

LOST:   138
GAINED: 53

Tiger Lake
total instructions in shared programs: 19711930 -> 19715591 (0.02%)
instructions in affected programs: 1040623 -> 1044284 (0.35%)
helped: 317 / HURT: 2474

total cycles in shared programs: 862988990 -> 860573870 (-0.28%)
cycles in affected programs: 612392461 -> 609977341 (-0.39%)
helped: 7447 / HURT: 7686

total sends in shared programs: 1034763 -> 1034555 (-0.02%)
sends in affected programs: 784 -> 576 (-26.53%)
helped: 8 / HURT: 0

LOST:   56
GAINED: 143

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20545461 -> 20545220 (<.01%)
instructions in affected programs: 422405 -> 422164 (-0.06%)
helped: 180 / HURT: 459

total cycles in shared programs: 872697345 -> 866874523 (-0.67%)
cycles in affected programs: 573117917 -> 567295095 (-1.02%)
helped: 6783 / HURT: 6980

total spills in shared programs: 4335 -> 4336 (0.02%)
spills in affected programs: 90 -> 91 (1.11%)
helped: 1 / HURT: 2

total fills in shared programs: 4194 -> 4196 (0.05%)
fills in affected programs: 463 -> 465 (0.43%)
helped: 1 / HURT: 2

total sends in shared programs: 1079446 -> 1079238 (-0.02%)
sends in affected programs: 784 -> 576 (-26.53%)
helped: 8 / HURT: 0

LOST:   117
GAINED: 37

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209708136 -> 209695617 (-0.01%); split: -0.02%, +0.01%
Send messages: 10927753 -> 10927640 (-0.00%)
Cycle count: 30540172048 -> 30427084732 (-0.37%); split: -0.99%, +0.62%
Spill count: 511621 -> 510932 (-0.13%); split: -0.22%, +0.08%
Fill count: 621166 -> 618440 (-0.44%); split: -0.56%, +0.12%
Scratch Memory Size: 35574784 -> 35648512 (+0.21%); split: -0.06%, +0.26%
Max live registers: 65453860 -> 65453140 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 75374990 -> 35195764 (-53.31%)

Totals from 503284 (71.25% of 706391) affected shaders:
Instrs: 180203778 -> 180191259 (-0.01%); split: -0.02%, +0.01%
Send messages: 9699732 -> 9699619 (-0.00%)
Cycle count: 30080349592 -> 29967262276 (-0.38%); split: -1.01%, +0.63%
Spill count: 511584 -> 510895 (-0.13%); split: -0.22%, +0.08%
Fill count: 621120 -> 618394 (-0.44%); split: -0.56%, +0.12%
Scratch Memory Size: 35443712 -> 35517440 (+0.21%); split: -0.06%, +0.27%
Max live registers: 52566092 -> 52565372 (-0.00%); split: -0.01%, +0.00%
Non SSA regs after NIR: 70110949 -> 29931723 (-57.31%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
8b2be206f3 brw/algebraic: Constant folding for BROADCAST and SHUFFLE
This prevents assertion failures in brw_eu_emit in a later commit in
this MR. Even though they have not been previously observed, these
assertion failures could happen even without that commit.

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

Fixes: 04e1783278 ("brw: Call brw_fs_opt_algebraic less often")

v2: Add SHUFFLE. Suggested by Ken. Fixed indentation.

v3: Update BROADCAST exec_size after rebasing on "brw/build: Use SIMD8
temporaries in emit_uniformize".

v4: Explain why munging the exec_size is correct.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
1b997c7bcc brw/coalesce: Prepare brw_opt_register_coalesce for load_reg
v2: Explain the problematic situation a little better in the
comment. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
15637334ce brw/copy: Prepare copy_propagation for load_reg
The changes to try_copy_propagate will be removed later in the series.

v2: Fix up some comments to note that offset != 0 is allowed only when
stride == 0. Apply same offset=0 restriction in try_copy_propagate_def
too. Allow copy propagation if the source is either a def or
UNIFORM. Don't copy prop a load_reg through a non-def value.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
cfc50390fb brw: Add basic infrastructure for load_reg pseudo op
load_reg is something like load_payload except it has a single
source. It copies the entire source to the destination. Its purpose is
to convert a non-SSA VGRF into an SSA value. This copy is marked as
volatile so that it will act as a scheduling barrier.

v2: Fix some typos in the commit message. Eliminate the
brw_builder::LOAD_REG overload that returns a brw_inst*. This is
unlikely to ever be used. Add some checks to brw_validate. All
suggested by Caio.

v3: Force the source and destination types of the LOAD_REG to by
integer. This will (eventually) simplify the creating of unit tests for
the pass that adds LOAD_REG instructions.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
b9656d51c0 brw/opt: Move non-SSA register accounting after first brw_opt_split_virtual_grfs
v2: Move to immediately before the main optimization loop. Most
importantly, this is after the first call to DCE.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Non SSA regs after NIR: 237045283 -> 100183460 (-57.74%); split: -58.12%, +0.39%

Totals from 701423 (99.26% of 706657) affected shaders:
Non SSA regs after NIR: 236868848 -> 100007025 (-57.78%); split: -58.17%, +0.39%

Suggested-by: Ken
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Kenny Levinsen
cd4820d6ac device-select: Support linux-dmabuf feedback
device-select-layer needs to obtain the display server's preferred
display device, and has so far relied on wl_drm for this. wl_drm is
superseded by linux-dmabuf with some Wayland servers having dropped
support for wl_drm entirely.

Implement linux-dmabuf as preferred mechanism for obtaining the main
device, with wl_drm support retained as a fallback for now.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34219>
2025-04-04 06:00:17 +00:00
llyyr
dc90e33ad2 vulkan/wsi/wayland: initialize surface colorspace with PASS_THROUGH_EXT
Starting with sRGB meant we would refcount to -1 if an application
chooses PASS_THROUGH. Instead, just initialize with PASS_THROUGH so the
initial refcount of 0 reflects reality.

Previously, we would segfault if an application chose PASS_THROUGH at
swapchain initialization then switched to a color managed colorspace
later in the runtime, because we would increment refcount from -1 -> 0
and this would result in not creating a new color managed surface.

Fixes: 789507c99c ("vulkan/wsi: implement the Wayland color management protocol")
Signed-off-by: llyyr <llyyr.public@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34353>
2025-04-04 05:10:08 +00:00
David Rosca
1610841f0f egl/x11: Fix swap interval setup
Calling dri2_x11_setup_swap_interval with swap_available = false
sets the min/max/default swap interval values to zero.
EGL_MIN/MAX_SWAP_INTERVAL is always reported as 0 and the interval
value set by eglSwapInterval gets clamped to 0.

Set swap_available to true before calling dri2_x11_setup_swap_interval,
as was done before.

Fixes: c00701c83a ("egl/x11: unify swrast/kopper/dri3 paths a bit")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34235>
2025-04-04 04:15:01 +00:00
Jose Maria Casanova Crespo
efc87e0d6a glapi: import noop_array and public stubs earlier.
After 711fc10ea3 "glapi: merge all shared-glapi source files
into one .c file" the V3D simulator started crashing. After
testing the changes of the merge one by one, it was identified
that previously shared_glapi_mapi_tmp.h was being imported twice
instead of only once as it happens after the merge. Although
the change done in the merge seems to be equivalent it seems
it was breaking the the debug builds.

Here can find an explanation why this problem was affecting debug
builds https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34363#note_2850196

Fixes: 711fc10ea3 ("glapi: merge all shared-glapi source files into one .c file")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12908
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34363>
2025-04-04 00:18:28 +00:00
Mike Blumenkrantz
12b57b34f8 gallium/util: check nr_samples in pipe_surface_equal()
this is otherwise broken

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34367>
2025-04-03 23:41:30 +00:00
Timur Kristóf
a530890e75 nir/print: Fix variable mode for arrayed output load intrinsics.
This helps print the names of varyings correctly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
e258492a8f radv: Remove radv_streamout_info::num_outputs.
This field was never used for determining the number of outputs,
just for determining whether streamout was enabled, which makes
it unnecessary. We can use enabled_stream_buffers_mask for that.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
ce2138d73a radv: Call nir_opt_undef too after nir_opt_varyings.
Shaders may have undefined output stores after nir_opt_varyings.
These must be optimized out, otherwise they hit an assertion.

Fixes: 17f6ab28cc
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
15d0804670 radv: Use buffers_written mask when gathering XFB info.
We need to enable these buffers regardless of whether or not the
shader actually writes any outputs to them, otherwise we break
XFB queries.

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
96d11d0f56 nir/opt_varyings: Fix assertion when deduplicating TCS outputs.
When deduplicating TCS outputs, we may find outputs that aren't
loaded by the shader itself. This previously hit a bad assertion.

Fixes: c66967b5cb
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12410
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
a29b5857f7 nir/xfb: Preserve some xfb information when gathering from intrinsics.
We need to remember which streamout buffers and streams were enabled,
even if the shader doesn't actually write any outputs to them,
because the API requires that we count vertices created by this shader
towards queries against those streams.

That information can be gathered by nir_gather_xfb_info_with_varyings
from the original NIR I/O variables that we get from the frontend,
but it isn't included in any intrinsics so would be otherwise lost here.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Jan Alexander Steffens (heftig)
1deb0536a1 gfxstream: Use proper log format for 32-bit Vulkan
On i686, where VK_USE_64_BIT_PTR_DEFINES is unset and Vulkan handles are
represented as 64-bit integers instead, the code used the wrong format
specifier, causing a build error.

Fixes: 7fb31361f4 ("Handle external fences in vkGetFenceStatus()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34124>
2025-04-03 19:35:20 +00:00
Zan Dobersek
335cc96069 tu: disable logic operations for float and sRGB formats
Per spec, logic operations between fragment values and color attachments
should be disabled when attachments are using float or sRGB formats.
Regardless of attachment's format, enabled logic operations should keep
blending disabled.

Fixes: dEQP-VK.pipeline.*.logic_op_na_formats.*

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34212>
2025-04-03 15:48:19 +00:00
Lucas Stach
d917625226 etnaviv: add context flush sw query
Context flushes can be caused by all kinds of operations that aren't
obvious to a GL API user. As those are quite heavy-weight operations
it is nice to have some insight into how many of those are happening
per frame. Add a sw query to make this information easily accessible.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34350>
2025-04-03 14:27:55 +00:00
Stéphane Cerveau
ee535aa039 radv: video: rework maxActiveReferenceSlot/MaxDpbSlots
For the pReferenceSlots.slotIndex, the max
value should the maxDpbSlots which is
h264: 16 + 1
h265 : 15 + 2
av1: 7+2

Fixing SVA_CL1_E test vector in JVT-AVC_V1
fluster test suite.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33094>
2025-04-03 13:20:45 +00:00
Georg Lehmann
c21a53440f spirv: clamp/sign-extend non 32bit ldexp exponents
GLSL.std.450 allows any integer size here.
OpenCL only allows i32.

Cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34071>
2025-04-03 12:35:59 +00:00
Job Noorman
45a5ccbf07 ir3/ra: create merge sets for splits/collects inserted for shared RA
Since shared RA happens after creating merge sets, newly inserted
splits/collects did not have merge sets created for them. Fix this by
creating merge sets for new instructions after shared RA.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33319>
2025-04-03 12:06:18 +00:00
Job Noorman
0cafd07b0c ir3: add ir3_aggressive_coalesce helper
To allow us to create merge sets outside of ir3_merge_regs.c.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33319>
2025-04-03 12:06:18 +00:00
Job Noorman
a0db2f9737 ir3/ra: assign interval offsets to new defs after shared RA
Shared RA might insert new defs to be handled by regular RA (e.g.,
shared spills). However, their interval offsets were not initialized
which caused their intervals to sometimes be mistakenly matched with
those containing offset 0. Fix this by calling index_merge_sets after
shared RA and modifying that function to only index new defs in that
case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33319>
2025-04-03 12:06:18 +00:00
Eric Engestrom
6331441e24 ci: rename ci-tron priority tag to avoid conflict with the generic fdo runners
Otherwise, ci-tron runners with that tag could pick up jobs meant for the fdo
runners, as happened here:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/73883719

The inverse (fdo runners picking up a job meant for a ci-tron runner) is not
possible though, as ci-tron jobs always include a `farm:$RUNNER_FARM_LOCATION`
tag, so the problem only exists in the other direction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34358>
2025-04-03 11:25:12 +00:00
Eric Engestrom
f84578e308 ci/build: drop LTO from fedora build
It's been broken for a few months by now and nobody has been interested
in fixing it, so let's drop LTO so that we get the rest of the benefits
from having that build at all.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34318>
2025-04-03 10:23:55 +00:00
Samuel Pitoiset
ef3363ef71 radv: rework suspend/resume user conditional rendering
Better to suspend/resume in the top level function.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
2025-04-03 08:54:36 +00:00
Samuel Pitoiset
4bc971a0bd radv: add new helper to suspend/resume user conditional rendering
Instead of duplicating same code everywhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
2025-04-03 08:54:36 +00:00
Samuel Pitoiset
4d1d6d4147 radv: fix ignoring conditional rendering with vkCmdResolveImage()
This command isn't supposed to be affected by conditional rendering.

This fixes new VKCTS coverage
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
2025-04-03 08:54:36 +00:00
Job Noorman
dd1ba74777 ir3: make shpe a terminator
shpe is a bit of a special instruction: it's not really a terminator
(i.e., it does not perform a jump) but it does have to stay at the end
of its block. Up to now, we tried to enforce this by creating const
write barriers on shpe; the assumption being that everything that
happens in the preamble ends in a write to the const file so shpe stays
at the end. Alas, it turns out this is not true: things like sampler
prefetches do not write the const file and nothing was preventing those
from being scheduled after shpe.

Instead of trying to create even more barrier dependencies, fix this by
making shpe a terminator. Both sched and postsched treat terminators
specially to make sure they always stay at the end of their block.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34290>
2025-04-03 08:16:59 +00:00
Danylo Piliaiev
f5019ee0d4 ir3: Fix shaders that write only color classified as empty
Shader may have zero instructions and no prefetches but have inputs
that without modifications are used as output.

Fixed vkd3d test:
 test_depth_bias_behaviour

Fixes: b0a98d3b13
("ir3: Detect empty fragment shaders")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34348>
2025-04-03 06:47:43 +00:00
Connor Abbott
75178c4655 tu: Implement VK_QCOM_fragment_density_map_offset
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
7351f8d587 tu/fdm: Skip some patchpoints when binning
In order to implement FDM offset, we will have to offset the viewport
and scissor in the binning pass. In order to do this, we have to pass a
bin with nonsensical negative offsets to the patchpoint function, which
would result in asserts when patching the load/store sequences. But we
don't really need to patch these anyways as they are unused during
binning, so add the ability to skip them when binning. FS params and
some implementations of CmdClearAttachments (that don't contribute to
visibility) can similarly be skipped.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
df0c17f76e tu: Fix CmdClearAttachments with fragment density map
The clear may be a partial clear, in which case we need to make sure
that the clear rectangle is transformed into GMEM space so that it is
clipped correctly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
0d4eed0e46 tu: Split out part of tiling config to vsc config
For FDM offset, we will need to expand the number of bins by 1, which
can change how pipes are allocated. We don't necessarily know whether
FDM offset will be used when creating the VkFramebuffer, so we'll have
to create two different configs when FDM is enabled. Split out the parts
that are affected by the number of bins into a separate "VSC config"
struct that will be duplicated with FDM offset.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
304af47ba2 tu: Only allow power-of-two fragment areas
Non-power-of-two fragment areas can result in precision loss and missed
fragments, which was seen in an upcoming CTS test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Caleb Callaway
5ad00bae8b intel/compiler: fix lingering i965 references
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34351>
2025-04-03 03:17:25 +00:00
Job Noorman
02ff26be38 ir3: run opt_if after opt_vectorize
nir_opt_vectorize could replace swizzled movs with vectorized movs in a
different block. If this happens with swizzled movs in a then block, it
could leave this block empty. ir3 assumes only the else block can be
empty (e.g., when lowering predicates) so make sure ifs are in that
canonical form again.

This fixes empty predication blocks in some shaders, for example:

predt
predf
...
prede

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34272>
2025-04-03 00:19:31 +00:00
Job Noorman
ee0ee2a317 ir3: don't sync every TCS/GEOM block
TCS/GEOM shaders need (sy)(ss) on their first instruction but we
accidentally set it on the first instruction of every block.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34257>
2025-04-02 23:37:35 +00:00
Connor Abbott
3ba315f205 ir3: Split mad with scalar ALU
At least on all a6xx/a7xx, mad.f32 and mad.f16 are not fused. This means
that when the sources of a NIR ffma are all uniform we can split it in
two to execute it on the scalar ALU. This is important to reduce
register pressure and make more preambles executed early.

On fossil-db the statistics are mostly a wash as expected, but with
early preambles increasing dramatically:

Totals:
MaxWaves: 2249180 -> 2249230 (+0.00%); split: +0.01%, -0.01%
Instrs: 49668884 -> 49662951 (-0.01%); split: -0.12%, +0.11%
CodeSize: 103662656 -> 103831154 (+0.16%); split: -0.22%, +0.38%
NOPs: 8502571 -> 8495568 (-0.08%); split: -0.61%, +0.53%
MOVs: 1554442 -> 1538804 (-1.01%); split: -2.01%, +1.01%
Full: 1820906 -> 1814292 (-0.36%); split: -0.39%, +0.03%
(ss): 1168628 -> 1165868 (-0.24%); split: -1.01%, +0.78%
(sy): 616751 -> 616521 (-0.04%); split: -0.52%, +0.49%
(ss)-stall: 4384397 -> 4361662 (-0.52%); split: -1.44%, +0.93%
(sy)-stall: 17850227 -> 17858949 (+0.05%); split: -0.58%, +0.63%

Early-preamble: 102262 -> 115702 (+13.14%)
Cat0: 9375820 -> 9367978 (-0.08%); split: -0.57%, +0.48%
Cat1: 2470212 -> 2454318 (-0.64%); split: -1.28%, +0.64%
Cat2: 18673655 -> 18707106 (+0.18%)
Cat3: 14227810 -> 14211106 (-0.12%)
Cat5: 1424184 -> 1424150 (-0.00%)
Cat7: 1404718 -> 1405808 (+0.08%); split: -0.39%, +0.47%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34115>
2025-04-02 23:08:39 +00:00
Sviatoslav Peleshko
64980c4f05 vulkan/wsi/headless: Remove unnecessary wsi_configure_image()
wsi_configure_image() with the same info is already called by
configure_image() in wsi_swapchain_init(), so this second call is
unnecessary. Furthermore, calling it the second time caused a memory
leak of queue family indices array.

Fixes: d4a2c0fc ("vulkan/wsi: add a headless swapchain implementation/option")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12811
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34194>
2025-04-02 21:17:30 +00:00
Rob Clark
2b2bcbb96d ci: Re enable fd-farm
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34263>
2025-04-02 20:13:37 +00:00
Dylan Baker
ff4b1b1e43 intel/decoder: free memory in error case
This was handled in other instances in a previous patch, but this
instance remains, as the zlib decompression routine is slightly
different.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34118>
2025-04-02 19:26:55 +00:00
Dylan Baker
da14c0af67 intel/tools: move ascii85_decode to common code
We have 3 copies of this function, so put it in the shared static
library.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34118>
2025-04-02 19:26:55 +00:00
Dylan Baker
7b791cd0b4 intel/tools: deduplicate zlib_inflate function
There are three copies of this function, all of them have the same
memory leak in them. Instead of fixing them one by one, just use a
common implementation for all three, since they already all have a
shared helper lib.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34118>
2025-04-02 19:26:55 +00:00
Eric Engestrom
a1a9c7cda2 docs: add sha sum for 25.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34349>
2025-04-02 19:18:32 +00:00
Eric Engestrom
d9d8a58475 docs: add release notes for 25.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34349>
2025-04-02 19:18:32 +00:00
Eric Engestrom
6f1d502af7 docs: update calendar for 25.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34349>
2025-04-02 19:18:32 +00:00
David Rosca
a5edb9faac radeonsi/vcn: Disable AV1 unidir compound with rate control
It causes significant bitrate overshoot currently.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34237>
2025-04-02 17:55:23 +00:00
Eric Engestrom
2063084903 virgl: fix typo inverting a condition
Fixes: 8513bcbd2f ("virtio: Remove virglrenderer_hw.h entirely")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34340>
2025-04-02 16:28:24 +00:00
Connor Abbott
15660caa90 tu: Fix layer_count with dynamic rendering + multiview
With "classic" renderpasses, the VkFramebuffer's layerCount must be 1 if
multiview is enabled. We accidentally rely on this to not disable GMEM
for multiview, and possibly for other things too. Apparently the dynamic
rendering equivalent, VkRenderingInfo::layerCount, can be anything when
multiview is enabled, and some CTS tests set it to the number of views.
Sanitize it when constructing the internal framebuffer for dynamic
rendering.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34080>
2025-04-02 15:47:47 +00:00
Danylo Piliaiev
c538a9ec6e tu: Use EARLY_Z also for stencil tests
EARLY tests can test and write out stencil values.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33851>
2025-04-02 12:03:30 +00:00
Danylo Piliaiev
534cf4feeb tu/lrz: Improve LRZ around stencil tests and reads_dest cases
We were a bit too conservative and fully disabled LRZ for when stencil
or blending were involved. There is no need to fully disable LRZ
in those cases, only LRZ writes should be disabled.

The final rules are:
 LRZ is DISABLED until depth attachment is cleared when:
   - Depth Write + changing direction of depth test
      e.g. from OP_GREATER to OP_LESS;
   - Depth Write + OP_ALWAYS or OP_NOT_EQUAL;
   - Clearing depth with vkCmdClearAttachments;
   - Depth image is a target of blit commands.
   - (pre-a650) Not clearing depth attachment with LOAD_OP_CLEAR;
   - (pre-a650) Using secondary command buffers;
 LRZ WRITE is DISABLED until depth attachment is cleared when:
   - Depth Write + blending (color blend, logic ops, partial color mask, etc.);
   - Fragment may be killed by stencil;
 LRZ is disabled for CURRENT draw when:
   - Fragment shader side-effects (writing to SSBOs, atomic operations, etc);
   - Fragment shader writes depth or stencil;
 LRZ WRITE is DISABLED (via LATE_Z) for CURRENT draw when:
   - Fragment may be via killed alpha-to-coverage, discard, sample coverage;

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33851>
2025-04-02 12:03:30 +00:00
Juan A. Suarez Romero
0d2ebca39f v3dv: include depth offset on image view creation
When creating the image view in the texel buffer shader copy function,
take in account the region to copy can start in a different Z-offset
than 0.

This fixes several dEQP-VK.image.concurrent_copy.* failing tests.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
2025-04-02 10:31:15 +00:00
Juan A. Suarez Romero
91ee8ab284 v3dv: don't batch regions with different depth offsets
As we will be creating an image view that covers the region to copy,
batch all the regions that share the same depth offset and depth extent.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
2025-04-02 10:31:15 +00:00
Juan A. Suarez Romero
f7de4ad0fb v3dv: remove src_format from blit render pass creation
Source format is not involved at all on creating the blit render pass,
so remove from the function call.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
2025-04-02 10:31:15 +00:00
David Rosca
597f13b244 radv: Add radv_format_description to remap 10/12bit formats to 16bit
Remapping was missing for format description which made these formats
effectively unsupported as zero format features were reported.

Fixes: 0098f8ef35 ("radv: Remap 10 and 12 bit formats to 16 bit formats")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34274>
2025-04-02 08:40:28 +00:00
David Rosca
3ef0ee2241 radv: Use radv_format_to_pipe_format instead of vk_format_to_pipe_format
Fixes: 9af11bf306 ("radv: add initial DCC support on GFX12")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34274>
2025-04-02 08:40:28 +00:00
Samuel Pitoiset
5784a36fd1 Revert "radeonsi/gfx11: program SAMPLE_MASK_TRACKER_WATERMARK optimally for APUs"
This reverts commit 6ce3a95852.

This likely also causes random GPU hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34306>
2025-04-02 07:10:40 +00:00
Samuel Pitoiset
64e6e043b3 Revert "radv: program SAMPLE_MASK_TRACKER_WATERMARK optimally for GFX11 APUs"
This reverts commit 96e9c3fe77.

This actually causes random GPU hangs like on Phoenix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12461
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12426
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12692
Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34306>
2025-04-02 07:10:40 +00:00
Samuel Pitoiset
fac44c0ca0 ac/surface: fix selecting preferred alignments for HiZ/HiS on GFX12
VK_MESA_image_alignment_control is used by vkd3d-proton to set
optimal alignments for images. Though, the preferred alignment was
only applied to the surface (or the stencil aspect) but not to the HiZ
surface due to the NULL check.

This caused rendering issues because swizzle modes didn't match.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12831
Fixes: 079f55d405 ("radv: advertise VK_MESA_image_alignment_control on GFX12")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34322>
2025-04-02 06:47:59 +00:00
Ian Romanick
e210b79ce3 brw/nir: Lower fsign again after last call to brw_nir_optimize
No shader-db or fossil-db changes on any Intel platform.

Fixes: 13332c23 ("intel/brw: Unconditionally run optimizations after nir_opt_uniform_subgroup")
Closes: #12888
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34251>
2025-04-02 01:59:49 +00:00
Ian Romanick
ca95cb8178 brw: Fix typo in comment
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34251>
2025-04-02 01:59:49 +00:00
Erik Faye-Lund
17d254e978 panvk/ci: disable some more slow tests
These tests currently take over 30 seconds, let's disable them to keep
CI performance reasonable.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34315>
2025-04-01 22:44:53 +00:00
Aaron Ruby
8513bcbd2f virtio: Remove virglrenderer_hw.h entirely
Capset definitions replaced by those in virtgpu_drm.h

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34300>
2025-04-01 22:11:10 +00:00
Aaron Ruby
b1ca6a0b43 drm-uapi: Sync virtgpu header
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34300>
2025-04-01 22:11:10 +00:00
Dave Airlie
7a01953a39 nak: Add Ampere and Ada latency information
This adds the latency information provided by NVIDIA.  This is copied
from excel spreadsheets provided to Red Hat.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Dave Airlie
6b8a4e6bb7 nak: Add Turing latency information
This adds the latency information provided by NVIDIA.  This is copied
from excel spreadsheets provided to Red Hat.

This fully passes CTS on Turing TU104 with no regressions.

I'm sure future use of some instructions like IMAD may require some
changes to this, but it should be functionally complete.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Mel Henning
3868855144 nak/instr_sched: Barriers activate after 2 cycles
This mirrors the logic around line 365 of calc_instr_deps.rs

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Dave Airlie
38d2212194 nak: Add an a_has_pred parameter to waw_latency
This affects the HMMA units, among others.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Faith Ekstrand
4914470327 nak: Add an Op::no_scoreboard() helper
Control-flow ops are theoretically variable-latency but we don't
actually want to scoreboard them because of the way NAK dependency
tracking works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Faith Ekstrand
2b569ecdb6 nak: Handle delays > 15
Delays greater than 15 needs to be encoded into a nop following the
instruction.  These delays will start to happen when we add accurate
latency handling and with certain instructions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Faith Ekstrand
348f345238 nak: Put the cycle count assert behind a debug flag
Fixes: c1d64053f2 ("nak: Assert instr_sched matches calc_instr_deps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Dave Airlie
7a55a9afcc nak: add reads after setting writes
Otherwise we schedule this sort of thing wrong,
 r0    = iadd3 r0 c[0x0][0x0] rZ
 r0    = shf.l.w.i32 r0 rZ 0x2
 r0 p0 = iadd3 r0 c[0x1][0x0] rZ

since raw latencies are more important than waw, but we go do a
waw for the first two instructions instead of a raw which is correct.

Fixes: 2d4e445099 ("nak/calc_instr_deps: Rewrite calc_delays() again")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Autumn Ashton
afa254ad68 ci/zink+radv: Add sample locations fails
These fail on Polaris10 too.

Are these tests even valid? Is this a Zink bug?
Vulkan CTS is happy with our implementation.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:37 +01:00
Autumn Ashton
ae6d24c4ef radv: Expose VK_SAMPLE_COUNT_1_BIT for sample position on GFX10+
This works on GFX10+.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:34 +01:00
Autumn Ashton
693e3b47f7 radv: Expose EXT_sample_locations everywhere
This works and passes CTS now!

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:31 +01:00
Autumn Ashton
343c434c50 radv: Enable fragmentShadingRateWithCustomSampleLocations
We need to expose this, as we support it.

Otherwise 1x1 is assumed and we fail some CTS.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:28 +01:00
Autumn Ashton
3d75082c02 radv: Fix compute resolve rounding
When we are using compute resolve, we can get
values the CTS does not expect due to the value
we end up writing for UNORM in
`nir_image_deref_store`.

Make the compute resolve rounding path match with
the output of the fragment shader resolve path,
by going through the same FP16 RTZ conversion as
we do for UNORM/SNORM formats.

This is why VK_EXT_sample_locations CTS was
failing on > GFX9.
On <= GFX9, I am assuming we are falling back to
RESOLVE_FRAGMENT, due to DCC stuff, which is why
it works there.

I tested a handful of images from the Vulkan CTS
for the sample locations and resolve tests for
diff UNORM formats from the qpa file forcing
FRAGMENT and with this change.
With this change, we now match on the compute
resolve path the same sha for the ones I compared
with ImageMagick `identify`.

CTS passes for: *resolve*, *image_clearing* and
*sample_locations* on RX 7900XTX.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:24 +01:00
Lucas Stach
b60d816d6e include: update GL headers from the registry
Taken from OpenGL-Registry commit ca62982097eb
("Remove plural bindings in GL_ARB_shader_texture_image_samples (#637)")

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33356>
2025-04-01 19:08:38 +00:00
Eric Engestrom
66f813ae0f docs: remove the last 24.3 releases
They're not going to happen anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34325>
2025-04-01 18:27:26 +00:00
Alyssa Rosenzweig
bfca178e27 asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
28dbdf2549 asahi: fix depth buffer feedback loops
fixes supertuxkart without the old hack.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
a4677945d2 asahi: fix printf without result buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
1a36d0b5d7 libagx: use common heap allocs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
55046d0293 libagx: assert alignment for copies
would have exposed the bug fixed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
f0ee1b1967 libagx: clean up query copy; bug fix
oops.
-      .partial = flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT,

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
b5367dd797 hk: fix unaligned copies
Fixes regression in Deus Ex: Human Revolution (DX11) via DXVK reported by James
Calligeros.

Pending CTS coverage: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5640

Only the alignment check here is load bearing but I clarified the logic while at
it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
f7e706e325 hk: advertise bufferDeviceAddressCaptureReplayEXT
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
8f2dc51e7f hk: advertise semaphore extensions
works on current kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
c068b34013 agx: fix tg4 offset residency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Tapani Pälli
b93ea155f9 compiler/glsl: check that bias is not used outside fragment stage
This fixes some upcoming CTS tests that attempt bias usage when
it is not valid per spec.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34285>
2025-04-01 16:51:31 +00:00
Marek Olšák
ce716d009f ac/nir/cull: cull small prims using a point-triangle intersection test
This is based on Timur Kristof's code, but there are a lot of differences.
The idea is that it doesn't just compute an intersection between a point
and a triangle. It computes the *distance* between a point and a triangle
and it does so in screen space. It accurately takes the subpixel precision
of the rasterizer into account, so that it works optimally at all
resolutions, all MSAA modes, and all quant modes.

The distance computation is only approximated because it only considers
the infinite lines going through triangle edges. However, it seems to be
more than sufficient in practice because the existing rounding-based small
prim culling compensates for it.

The performance improvement is up to 10% in some geometry-bound tests,
though targeted microbenchmarks can show a lot more than that.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33361>
2025-04-01 16:12:22 +00:00
Valentine Burley
36bf26cf27 panvk/ci: Migrate the G52 VK job to MT8186
Migrate the panfrost-g52-vk job to mt8186-corsola-steelix-sku131072, a
new device in LAVA. This DUT is faster than the Khadas VIM3 device it
replaces, and since more of these devices are available in LAVA, reduce
the DEQP_FRACTION and increase the parallelism for the pre-merge job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33996>
2025-04-01 15:45:28 +00:00
Erik Faye-Lund
eb82d65a20 mesa/main: fix regression in extension-checking
This condition accidentally got inverted when cleaning up code, whoops.

Fixes: 3251f321b8 ("mesa: some cleanups for texparam extension checks")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34248>
2025-04-01 15:18:57 +00:00
Erik Faye-Lund
cbde0ec2dc panvk: expose textureCompressionBC when supported
We can't guarantee that we always support this feature, because support
for each format can be disabled per SoC. But we can check for this, and
expose it when it's supported.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12598
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/34206>
2025-04-01 14:55:46 +00:00
Erik Faye-Lund
e4786cf971 panvk: check for texture-compression support
We currently just assume that textureCompressionETC2 and
textureCompressionASTC_LDR are always supported. And while that's true
for all the G52s, G610s abd G310s we've seen out in the wild, it's not
guaranteed to be true. An SoC vendor might disable support for one of
these formats.

So let's check properly, just for good measure.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34206>
2025-04-01 14:55:46 +00:00
Taras Pisetskyi
04962975fd anv,driconf: Add sampler coordinate precision workaround for EVE Online
Signed-off-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12920

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34316>
2025-04-01 14:16:48 +00:00
Erik Faye-Lund
ac4f8c95a6 panfrost: use real array for panfrost_emit_plane
The panfrost_emit_plane function expects an array, and Coverity
complains about passing a pointer instead. Yeah, that's a bit nit-picky,
but it's easy enough to use an actual array here instead of trying to
fudge it.

This should be a non-functional change.

CID: 1636773, 1636744
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/34156>
2025-04-01 13:46:33 +00:00
Erik Faye-Lund
fe680844f5 panfrost: fix overflow-debugging
We were using an unsigned instead of a size_t for the size calculation,
which would break large allocations. So let's switch to size_t here,
for good measure.

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/34156>
2025-04-01 13:46:33 +00:00
Erik Faye-Lund
1471279203 panfrost: avoid accidental aliasing
We already have a variable call "alignment" here, and aliasing it
breaks things. Whoops, let's rename the variable to page_size to
avoid this.

Fixes: 22985caf3f ("panfrost: sanity-check alignment")
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/34156>
2025-04-01 13:46:33 +00:00
Collabora's Gfx CI Team
1ce0cef6bf Uprev ANGLE to 1b34d2a18af12cc55a3bc74dd679c2937d10cc5c
6abdc11741...1b34d2a18a

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34277>
2025-04-01 12:51:06 +00:00
Daniel Stone
3b6a40af53 ci: Make all job timeouts explicit
Enforce a default job timeout of 1 second, to make jobs which don't
explicitly specify a timeout insta-fail, rather than potentially hanging
around for an hour.

Container builds get the full hour as they can run long and are not run
in pre-merge context, and LAVA jobs also get the full hour as they have
multiple internal timeout mechanisms which aim to fast-fail jobs once
they actually start. However, as they just queue jobs to an external
host (shared with other projects like KernelCI), these timeouts aren't
reflected into the GitLab CI definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
3fee0ef129 ci/microsoft: Add job timeouts and pin Piglit to GSt
quick_shader is for some reason now excruciatingly slow on the Microsoft
runners, but fine on the GStreamer runners. Until we can figure out why
this is happening - 27min runtimes instead of 3min - just keep them over
there.

Dozen is miraculously unaffected.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
370efffe10 ci/docs: Add timeout to doc build
Give these about double the time they usually take to complete.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
1be1af78bf ci/virgl: Add timeout to software jobs
Let's make sure these don't get stuck. They're all good citizens and
turn around in 5min or less, so give them triple that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
3911cb85bf ci/llvmpipe: Add llvmpipe and lavapipe timeouts
These jobs all pretty comfortably complete in 5-7min. Add a timeout for
roughly double that to make sure that jobs don't get stuck.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
cab69e51f3 ci/softpipe: Add timeouts to softpipe jobs
Make sure we don't get stuck somewhere and fail merges.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
afee7921cb ci: Reduce build job timeouts
Most of our build jobs have had a timeout of 1 hour since 6425b6e3d4,
which pushed the timeout as high as possible to allow for LTO building
taking forever. Since then, we've pulled LTO back to only running on the
fedora-release nightly job.

This tries to bring us back to the ideal from 322a83f321, where the
build jobs all have very low timeouts both for the overall job as well
as the build section we run. So if anything goes wrong - apart from
fedora-release - we'll just assume the runner has some environmental
damage, give up, and try again.

Of the build-for-tests jobs, all but the ASan and UBSan jobs regularly
complete in around 5 minutes, apart from debian-testing which is our
critical-path build job for almost all x86-64 testing. This is obviously
not good, but is tracked in mesa#12544.

The build-only jobs not using sanitizers also typically complete in
3-4 minutes, with the exception of debian-clang-release and
debian-x86_32 which are closer to 10 minutes. That's not ideal, but
they're also not currently on the critical path, so we can live with
that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
c793f612fc ci/panfrost: Split inherit definitions into -inc
Follow what everyone else did to have gitlab-ci.yml for concrete job
definitions, and gitlab-ci-inc.yml for things which get inherited.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
777dfb4062 ci/windows: Don't copy non-existent libglapi.dll
It was removed with 44bda7c258.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
a9f87ff0bd ci/amd: Disable radv-fossils
This job is currently broken due to the lack of git in the Vulkan
container; it should really be pulling the fossils from S3 like the
traces anyway.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:00 +00:00
Robert Mader
c0ec35bb42 gallivm: Re-add check for passmgr before disposing it
In can be NULL, but on LLVM >= 15 lp_passmgr_dispose() is
a no-op.

Fixes: 47cd0eee26 (gallivm: create a pass manager wrapper.)

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34312>
2025-04-01 11:37:15 +00:00
Lucas Stach
d738b3ea2b etnaviv: split PIPE_BUFFER resources from other types of resources
Buffer resources are quite special as they are only one dimensional,
always linear, don't have miplevels or array slices, never have a
texture or render compatible sibling, don't ever use TS.

The gallium context interface acknowledges this fact by providing
separate entry points for buffer maps/unmaps/flushes.

Provide a specialized etna_buffer_resource as a much more lightweight
alternative to the fullblown etna_resource and implement buffer
maps/unmaps in the same straight forward, direct map manner that is
hidden inside all the tiling, TS and resource sibling handling in
etna_transfer_map/unmap. It is expected that further map optimizations
can be added on top of this simple implementation much more easily
than in the merged buffer/texture transfer code.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34061>
2025-04-01 10:09:28 +00:00
Lucas Stach
d46a8c32b5 etnaviv: use pipe_resource in etna_resource_status
This aligns the prototype with etna_resource_used and allows to
track different resource specializations in the same datastructure.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34061>
2025-04-01 10:09:28 +00:00
Rebecca Mckeever
69a08fd9b2 panvk: Support shaderImageGatherExtended
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34033>
2025-04-01 08:04:32 +00:00
Rebecca Mckeever
f450807b68 panvk: Remove lower_tg4_broadcom_swizzle from panvk_preprocess_nir()
We are already applying the .bagr swizzle in bifrost_preprocess_nir(), so
remove lower_tg4_broadcom_swizzle from nir_lower_tex_options in
panvk_preprocess_nir to avoid applying the swizzle twice.

Fixes: 4050697a8f ("panvk: So more nir_lower_tex before descriptor lowering")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34033>
2025-04-01 08:04:32 +00:00
Marek Olšák
5e02621a8a amd/addrlib: remove the DCC page fault workaround
It doesn't cause page faults anymore.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34099>
2025-04-01 03:23:22 -04:00
Marek Olšák
f0e6d86f4e amd: update addrlib
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34099>
2025-04-01 03:23:22 -04:00
Samuel Pitoiset
902c76b3be radv/ci: remove all skips for STONEY
Seems fine too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34301>
2025-04-01 06:58:50 +00:00
Samuel Pitoiset
cb1144145a radv/ci: stop skipping one memory test due to timeouts
It seems fine now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34301>
2025-04-01 06:58:50 +00:00
Samuel Pitoiset
71b49aecdc radv: switch back radeon_cmdbuf to use 32-bit counters
This has been tested again with vkoverhead on 4 different CPUs and
using 32-bit counters is the fastest combination overall.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34229>
2025-04-01 06:18:28 +00:00
Samuel Pitoiset
f0b3a6f9d4 radv: rework command buffer emission with begin/end sequences
A begin/end sequence is something like (it's all macros based):

   radeon_begin(cs);
   radeon_emit(PKT3(PKT3_DRAW_INDEX_AUTO, 1, cmd_buffer->state.predicating));
   radeon_emit(vertex_count);
   radeon_emit(V_0287F0_DI_SRC_SEL_AUTO_INDEX | use_opaque);
   radeon_end();

This is loosely based on RadeonSI (see !8653 (a0978fff)) and it seems
indeed faster overall.

The main goal of this rework is to re-use the same logic as RadeonSI
for paired packets on GFX12 (also GFX11 dGPUs) because it's supposed
to be way faster, especially on GFX12 where the CP is slow. The other
goal is to share more cmdbuf emission between both drivers in the near
future.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34229>
2025-04-01 06:18:28 +00:00
Jordan Justen
d3ec467031 intel/dev: Add BMG 0xe211 PCI ID
Backport-to: 25.0
Ref: bspec 68090
Ref: https://patchwork.freedesktop.org/series/146769/
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34249>
2025-04-01 04:11:07 +00:00
Faith Ekstrand
e612e840d2 nak: Use is_volta() instead of sm == 70
This is a bug fix but Volta is currently disabled by default and it only
affects fp64 and fp16.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
77eb070465 nak: Add GPU generation helpers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
e2fccc1488 nak: Move sched_common.rs to reg_tracker.rs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
24a8795946 nak: Move latency information into the per-SM files
This is probably a little more code but we're about to add real data for
Turing+ so it's better to have things contained like this.  Since Volta
and earlier will always remain hacks, we might as well have those hacks
in the per-SM files rather than pretending we have a general thing in
sched_common.rs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
64ff3e8cb8 nak: Move exec_latency into the per-SM files
It's split cleanly along the SM70 boundary anyway so there's no code
duplication happening here.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
ae842b5fe1 nak: Move SM70 encoding and legalize to a separate file
We're about to add instruction latencies which are going to be in their
own files because they're also massive.  This makes things follow a bit
more of a module structure where sm70.rs is the thing that ties it all
together, sm70_encode.rs is the encoder, and smXX_instr_latencies.rs
will be the individual latency files.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
8e2e1e43fa nak: Add latency helpers to ShaderModel and use them
For now, these all just call into sched_common.rs but this gives us the
interface we really want going forward.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
3112fbcc56 nak: Add and use a ShaderModel::needs_scoreboard() helper
For now, this is just !Op::has_fixed_latency() but this is actually the
question the scheduling code is asking.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
d134379631 nak: Move has_fixed_latency to Op
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Dave Airlie
5d6d167a7c gallivm: check for avx512vbmi and tell LLVM the correct answer.
There are some CPUs out there which don't have vbmi and do have
other avx512 and mesa crashes on those with illegal instructions.

This was reported to Red Hat support.

Cc: mesa-stable
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34282>
2025-03-31 21:46:45 +00:00
Lionel Landwerlin
4ac900b5bf anv/genxml: use special genX video pack files
Before:

   30453 ./build/src/intel/genxml/gen125_pack.h

After:

   17026 ./build/src/intel/genxml/gen125_pack.h
   21589 ./build/src/intel/genxml/gen125_video_pack.h

The idea is to have fewer line to parse in each genX_*.c file.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:56 +03:00
Lionel Landwerlin
4fdf5618f9 intel/genxml: add MI_FLUSH_DW to blitter engine
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:53 +03:00
Lionel Landwerlin
79a463e40b intel/genxml: define post-sync operations for MI_FLUSH_DW
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:50 +03:00
Lionel Landwerlin
d4899b0486 intel/genxml: fixup engine filtering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:47 +03:00
Lionel Landwerlin
04b6eeba63 intel/genxml: add more engine tagging on instructions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:42 +03:00
Lionel Landwerlin
891965a471 intel/genxml: remove ISA fields
Those are for the compiler afaict.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:07 +03:00
Caio Oliveira
71ae31dbd8 intel/executor: Allow selecting a device to use
Add a command line option `-d DEVICE` to select
a device either by index or by substring of the
name.

Use `-d list` to print available devices.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34267>
2025-03-31 19:20:10 +00:00
Caio Oliveira
9b2b3255e1 intel/executor: Use getopt for command line arguments
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34267>
2025-03-31 19:20:10 +00:00
Patrick Lerda
1db8825597 radeonsi: fix clear_depth_stencil refcnt imbalance
After ca09c173f6, util_blitter_clear_render_target() requires
a call to util_blitter_save_fragment_constant_buffer_slot().
The radeonsi implementation was using the same sequence with
util_blitter_clear_depth_stencil() which does not need this
call. This was the cause of the refcnt imbalance.

For instance, this issue is triggered with:
"piglit/bin/ext_clear_texture-stencil -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: ca09c173f6 ("gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34291>
2025-03-31 18:42:38 +00:00
Christian Gmeiner
042138093f etnaviv: Add multi-planar YUV support
This enables support for NV12, which are really useful when
dealing with hardware video decoders. This patch makes use
of the integrated YUV tiler to convert multi-planar to YUYV.
The binary blob uses the same method to deal with multi-planar
YUV formats. Other formarts will be added in a follow-up patch.

Tested with kmscube (nv12-1img) and the following gstreamer pipeline:

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! v4l2slh264dec ! video/x-raw,format=NV12 ! glimagesink

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Peter Frühberger
Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3418>
2025-03-31 17:41:04 +00:00
Christian Gmeiner
58f8143da3 mesa/formats: Add MESA_FORMAT_NV12
Needed for st_pipe_format_to_mesa_format() be able to handle the NV12
format directly.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3418>
2025-03-31 17:41:04 +00:00
irql-notlessorequal
5d6b6c376f hasvk: Advertise VK_KHR_maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
b1fe67f118 hasvk: Implement VK calls and formats.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
f08c87e2b0 hasvk: Implement VkPipelineCreateFlags2KHR support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
0d6d23a54f hasvk: Pre-plumbing needed for VK_KHR_maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
255166a349 elk: always write the VUE header
ELK equivalent of !34211, also required to avoid potential rendering errors with hasvk.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
fe7e0fd4f1 elk: ensure VUE header writes in HS/DS/GS stages
ELK equivalent of !34041, required to avoid potential rendering errors with VK_KHR_maintenance5

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
GKraats
865a43ab4e x11: give error messages if Xorg only supports DRI2 and mesa only DRI3
By default mesa now only supports DRI3.

If Xorg is not activating DRI3, it will show an almost empty screen, which is not working.
No error message is given.
This e.g. happens at  Debian package
xserver-xorg-video-intel at the i915 gallium driver.

This commit generates error messages to explain the problem.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33679>
2025-03-31 16:22:41 +00:00
Pierre-Eric Pelloux-Prayer
7e2c3be454 radeonsi: use composed swizzle in cdna_emu_make_image_descriptor
Otherwise the state swizzle is ignored.

Fixes: 139bc6b813 ("radeonsi: use common build buffer descriptor helpers")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
2025-03-31 15:19:30 +02:00
Pierre-Eric Pelloux-Prayer
a4105365e4 radeonsi/video: require has_image_opcodes for full modifier support
If has_image_opcodes is false, then DRM_FORMAT_MOD_LINEAR is the only
possible option.

Fixes: 7f7206f1a9 ("radeonsi/video: Allocate video buffers with modifiers")
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
2025-03-31 15:19:30 +02:00
Pierre-Eric Pelloux-Prayer
785df1b980 ac/nir: fix nir_metadata value of ac_nir_lower_image_opcodes
This pass can insert new blocks so 'nir_metadata_control_flow' is not
preserved.

Fixes: eaf98b1422 ("ac/nir: implement image opcode emulation for CDNA, enable it in radeonsi")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
2025-03-31 15:19:29 +02:00
Samuel Pitoiset
97e8872f1c radv: only enable HTILE for depth/stencil attachment images
It's really only useful for depth/stencil attachments. vkd3d and DXVK
both always use that usage flag for depth/stencil images.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Samuel Pitoiset
ba9988d230 radv: remove useless use of radv_image_use_comp_to_single()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Samuel Pitoiset
5398ec6356 radv: add queue family assertions when doing decompression passes
This is to make sure the previous functions that are supposed to
trigger a decompression pass work as expected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Samuel Pitoiset
086f529bbe radv: do not trigger FCE or FMASK decompress on compute queue
A pipeline barrier which contains an image layout transition like
COLOR_ATTACHMENT_OPTIMAL -> TRANSFER_DST_OPTIMAL on compute queue
would just hang. Such a barrier is useless in practice but it's legal.

Prevent GPU hangs by skipping FCE or FMASK_DECOMPRESS when it's not
on the graphics queue.

Fixes dEQP-VK.synchronization2.layout_transition.compute_transition*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Danylo Piliaiev
be481e6615 tu: Disable FS in certain cases even if FS is not empty
If FS doesn't have side-effects and color write mask is zero.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
71238fb4d8 ir3: Detect FS that write only color without other side effects
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
ace933455c tu/a7xx: Bypass invoking empty FS for D/S-only draw calls
It is important to get D/S only draw calls to bypass invoking
the fragment shader. The public documentation for Adreno states:
  "Hint the driver to engage Fast-Z by using an empty fragment
   shader and disabling frame buffer write masks for renderpasses
   that modify Z values only."
  "The GPU has a special mode that writes Z-only pixels at twice
   the normal rate."

We are promised a big performance improvement in this case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
b0a98d3b13 ir3: Detect empty fragment shaders
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
3d76f307b6 freedreno/regs: Rename BINNING bit to FS_DISABLE in a few regs
In most cases it is used in binning, but it is also used when
FS is empty in order to signal that FS shouldn't be invoked.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Erik Faye-Lund
aa8fec638f panvk: add basic driconf infrastructure
This hooks up some driconfs for WSI, as well as the force_vk_vendor
DRIconf. Nothing panvk specific for now.

Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33895>
2025-03-31 09:24:04 +00:00
Erik Faye-Lund
4fabd37a3c panvk: enable KHR_line_rasterization support
This allows users to toggle between rectangular and bresenham style
rasterization.

The bresenham style rasterization is performed by disabling
multisampling and changing the end-points to be axis-aligned. This is
similar to what we already do in Gallium.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33844>
2025-03-31 09:03:05 +00:00
Georg Lehmann
de45676efd aco/insert_exec: reset exec temporary after combined p_demote + p_end_wqm
Otherwise the next divergent merge block might re-enable demoted invocations.

Fixes: 90faadae72 ("aco/insert_exec_mask: don't disable dead quads on demote in divergent CF")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12898
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12912
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34278>
2025-03-31 06:43:22 +00:00
Hyunjun Ko
ae75376c8f anv: Move rateControlMode to the video session.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34250>
2025-03-31 04:25:14 +00:00
Trigger Huang
f03b385d4b radeonsi: Fix perfcounter start event in si_pc_emit_start
The original typo caused performance counters to send STOP events
instead of START, leading to incorrect profiling data.

Fixes: 1a1138817c ("radeonsi: add a new PM4 helper radeon_event_write")

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34236>
2025-03-31 02:36:48 +00:00
Faith Ekstrand
59b01dc764 nvk: Disable 32k images on Pascal A
While we're here, add a comment about why we have this restriction in
the first place since NVK and the proprietary driver are different here.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
2025-03-30 20:29:13 -05:00
Faith Ekstrand
65d06d91ca nvk: Use max_image_dimension for maxFramebufferWidth/Height
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
2025-03-30 20:29:07 -05:00
Faith Ekstrand
c1674d4dfe nvk: Disable vulkanMemoryModel on Kepler and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
2025-03-30 20:16:25 -05:00
Marek Olšák
b74a6e05bd glapi: fix x86 32-bit asm dispatch regression
shared_glapi_mapi_tmp.h must be included before asm("x86_entry_end:").

Fixes: fae087770a - glapi: simplify codegen macros
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34269>
2025-03-29 22:36:21 +00:00
Eric Engestrom
359f69ba0c ci: add FDO_RUNNER_JOB_PRIORITY_TAG_* to control priority of generic freedesktop runners
This affects:
- generic jobs (sanity, rustfmt, shader-db, docs, etc.)
- linux image builds
- linux mesa builds
- software renderer tests
- android tests
- virgl & venus tests

Marge pipelines get high priority, nightly pipelines get low priority,
and everything else is in between.

(Hardware test farms have their own mechanisms.)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
88f70e48f5 ci: move android's kvm requirement to .use-debian/x86_64_test-android
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
e45f2e6c46 ci: move aarch64 tag to .use-debian/arm64_build
Like we do in the other `.use-debian/arm64_*`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
76a6ce40e1 ci: drop packet.net tag on git archive job
We are no longer on that infrastructure, and we no longer need to
specify which one we are on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34271>
2025-03-29 10:38:03 +00:00
Aaron Ruby
d64df991bb gbm/dri: Match zink autoloading from egl
Essentially, match the Zink autoloading order that was implemented as
part of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25640

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34163>
2025-03-29 09:18:47 +00:00
Mike Blumenkrantz
49aec32f57 zink: block inferred loading for swrast
this should always load llvmpipe

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34163>
2025-03-29 09:18:47 +00:00
Aaron Ruby
9ee435f92a egl: Remove FallbackZink config item entirely
Its effect was negated as part of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29771

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34163>
2025-03-29 09:18:47 +00:00
David Rosca
f9d7d131a4 ac/parse_ib: Parse VCN DYNAMIC_REFLIST_BUFFER
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34262>
2025-03-29 08:50:49 +00:00
David Rosca
5275a88174 ac/parse_ib: Fix parsing output format on VCN5
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34262>
2025-03-29 08:50:49 +00:00
Faith Ekstrand
8d45d3bc3d nak: Disable lea64 and f2fp.pack_ab tests pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34129>
2025-03-29 04:33:10 +00:00
Faith Ekstrand
bb43c665dc nak: Add a QMD heap to hw_runner
This is needed prior to Maxwell B to avoid SKED cache issues.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34129>
2025-03-29 04:33:10 +00:00
Faith Ekstrand
d8fef0a26c nak: Improve WS abstractions in hw_runner
Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34129>
2025-03-29 04:33:10 +00:00
Mel Henning
c1d64053f2 nak: Assert instr_sched matches calc_instr_deps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:05 +00:00
Mel Henning
562504f47c nak: Calc static cycle count in instr_sched
This changes the static cycle count estimate so that it takes into
account estimated variable latency instruction delays. Statistics from
before this commit are not comparable to statistics generated after
this commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:05 +00:00
Mel Henning
79d0f8263d nak: Add a simple postpass instruction scheduler
To get us started, this is designed to be pretty much the simplest thing
possible. It runs post-RA so we don't need to worry about hurting
occupancy and it uses the classic textbook algorithm for local (single
block) scheduling with the usual latency-weighted-depth heuristic.

-14.22% static cycle count on shaderdb

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:05 +00:00
Faith Ekstrand
d06d76a0d4 nak: Box our RegTrackers
RegTracker<T> contains over 300 copies of T.  It's probably best not to
put that on the stack.  We can probably get away with it on Linux but
Windows has small stacks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:04 +00:00
Faith Ekstrand
e9ff848095 nak: Move some calc_instr_deps items to a new file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:04 +00:00
Lorenzo Rossi
0ba5d99a61 nak: Simplify shl64 lowering on Maxwell
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34137>
2025-03-29 03:45:49 +00:00
Lorenzo Rossi
139a9ea526 nak: Fix SM50 rounding-mode encoding edge-case
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34137>
2025-03-29 03:45:49 +00:00
Faith Ekstrand
a3935c7aa2 nak,nir: Generalize nak_nir_split_64bit_conversions and move it to NIR
This pass was originally based on a similar pass from Intel but it's
grown support for some fancy stuff like fp64 -> fp16 conversion
splitting with proper rounding.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
2d75e7dced nak/nir: Use correct rounding for fp64 -> fp16 conversions
For up, down, and round towards zero, the rounding accumulates properly
as long as you use the same rounding mode for both.  For RTNE, however,
we need to insert a two-instruction fixup in order to guarantee correct
rounding.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
d826f82ffe nak: Implement nir_intrinsic_convert_alu_types
We can't support every single form of this instruction but at least it's
plumbed through now.  Before this will be OpenCL-ready, we'll need to
call the NIR lowering pass with an appropriate predicate function.
However, for now it lets us use it in NAK-specific NIR lowerings.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
c05565ce7b compiler/rust: Add more NIR intrinsic getters
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
1355c71943 compiler/rust: Add a nir_alu_type wrapper
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Lionel Landwerlin
47cfc77085 anv: expose VK_KHR_maintenance8 support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:19 +00:00
Lionel Landwerlin
7fca7cc721 anv: wire VkAccessFlagBits3KHR flags in internal helpers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
23de5abcb5 anv: enable non uniform texture offset lowering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
4346210ae6 brw: move texture offset packing to NIR
That way we can deal with upcoming non constant values for
VK_KHR_maintenance8.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
67ae49dede intel: move lower_texture to brw
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
86773b2ba6 brw: don't lower tg4 offsets without LOD
The problem this fixes is currently hidden because of the order in
which we run nir_lower_tex & intel_nir_lower_texture. The issue is
that nir_lower_tex removes the LOD source in some cases and the second
run of nir_lower_tex can add it back.

This is also only needed on Gfx12.5+ if the LOD is present.

Finally move all of the texture lowering to the postprocess phase. No
need to run this multiple times.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
b87dccc64c elk: stop using intel_nir_lower_texture
It's not doing anything.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
772beb0ebf nir: add support for lowering non uniform texture offsets
Intel HW only has support for non-uniform offsets for TG4 operations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Timur Kristóf
64c6930bfc ac/nir/ngg: Remove cleanup_culling_shader_after_dce.
Not needed anymore, now that the new concept is there.

No Fossil DB changes on Navi 21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
243a80be44 ac/nir/ngg: Use deferred info for compacted arguments.
This means we don't have to emit dead code anymore and can only
repack the sysvals that are actually used by the deferred part.

No Fossil DB changes on Navi 21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
0b71293358 ac/nir/ngg: Gather info about what the deferred shader part uses.
Now that the deferred shader part is prepared before emitting
the non-deferred part, we can also gather info about what sysvals
it needs.

No Fossil DB changes on Navi 21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
e4c91c01e3 ac/nir/ngg: Prepare deferred shader part before adding culling code.
The previous concept was to emit the non-deferred shader part
first, including the culling code, and then modify the
non-deferred part accordingly.

This caused some issues because it was really impossible to tell
which sysvals the deferred part needs after DCE, so we had to
run an additional cleanup pass afterwards.

The new concept is to prepare the deferred part first by applying
reusable variables (from the non-deferred part) and run DCE.
This opens the possibility to accurately gather info about what
the deferred part needs.

This idea is further expanded in the next commits.

Fossil DB stats on Navi 21:

Totals from 17 (0.02% of 79377) affected shaders:
Instrs: 18063 -> 18064 (+0.01%)
CodeSize: 93368 -> 93372 (+0.00%)
Latency: 49889 -> 49899 (+0.02%); split: -0.01%, +0.03%
SALU: 2416 -> 2417 (+0.04%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
e9e58fa412 ac/nir/ngg: Remove inputs_needed_by_*
This information will be collected by NIR core better,
no need to do it here. It is also currently unused.

No functional changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
1e7d28a82e ac/nir/ngg: Improve reuse of position value.
Instead of hand-rolled code, use nir_scalar and its
helper functions to reuse the position value.
Results in more copies, which are mitigated by
copy prop from the previous commit.

This helps eliminate some instructions, especially VMEM loads
from the deferred shader part of NGG culling shaders, which
can be reused from the position values calculated by the
non-deferred part.

Fossil DB stats on Navi 21:

Totals from 2472 (3.11% of 79377) affected shaders:
MaxWaves: 78748 -> 78772 (+0.03%)
Instrs: 636342 -> 633739 (-0.41%); split: -0.45%, +0.04%
CodeSize: 3444740 -> 3427172 (-0.51%); split: -0.53%, +0.02%
VGPRs: 62552 -> 62176 (-0.60%)
Latency: 2025711 -> 2019449 (-0.31%); split: -0.73%, +0.42%
InvThroughput: 221140 -> 221946 (+0.36%); split: -0.12%, +0.49%
VClause: 5443 -> 5278 (-3.03%); split: -3.20%, +0.17%
SClause: 8369 -> 8302 (-0.80%); split: -0.82%, +0.02%
Copies: 102435 -> 101652 (-0.76%); split: -0.87%, +0.11%
PreSGPRs: 63714 -> 63533 (-0.28%)
PreVGPRs: 48555 -> 48392 (-0.34%)
VALU: 242165 -> 241457 (-0.29%); split: -0.33%, +0.04%
SALU: 197656 -> 197482 (-0.09%); split: -0.10%, +0.01%
VMEM: 7746 -> 7571 (-2.26%)
SMEM: 10822 -> 10730 (-0.85%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
f7a160d501 ac/nir/ngg: Run copy propagation.
Helps eliminate needless copies caused by reusing variables.
Mitigates negative stats from the next commit.

Fossil DB stats on Navi 21:

Totals from 109 (0.14% of 79377) affected shaders:
Instrs: 124480 -> 124486 (+0.00%); split: -0.00%, +0.01%
CodeSize: 651444 -> 651468 (+0.00%); split: -0.00%, +0.00%
Latency: 754120 -> 754116 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 174384 -> 174383 (-0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Caio Oliveira
63224f64cc brw: Remove adjust_block_ips and brw_inst::remove() with defer
Now that the brw_ip_ranges analysis is being used, there's no
need to track start_ip/end_ips in the blocks as they are mutate.  And
also no need to call adjust_block_ips at the end of some passes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:51 +00:00
Caio Oliveira
8057cfc49d brw: Use brw_ip_ranges in liveness analysis
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:51 +00:00
Caio Oliveira
a6b0783375 brw: Use brw_ip_ranges in scheduling / regalloc
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:51 +00:00
Caio Oliveira
3659d36087 brw: Use brw_ip_ranges in passes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
10660f5adf brw: Add analysis for block IP ranges
Calculate the IP ranges of the shader as an analysis pass.  This will
later replace the existing tracking of start_ip/end_ip as the blocks are
changed (and the defer/adjust scheme to avoid too much churn when that
happen).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
fd6045cca9 brw: Track total_instructions in a shader
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
7224b653b5 brw: Use block's num_instructions in scoreboard tests
Stop using the start_ip / end_ip, these are not really important for
those tests.  What the test care was the number of instructions in the
block to check for changes and ensure we can peek at them by index.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
1139ede508 brw: Track num_instructions in a block
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
abe8d35cb8 brw: Remove brw_cfg::dump()
It was used by the pass tests to verify output with TEST_DEBUG=1,
replace it with brw_print_instructions().

The output is slightly different (not printing IP, not reordering the
blocks), we can add those features as we need, but given the usage was
already very reduced, don't bother with that until need arises.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Faith Ekstrand
e980123293 venus: Set wsi_device::supports_scanout = false
This will cause venus to take the prime blit path if modifiers are not
supported.  This has been an outstanding TODO in venus for a while.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
11ba89097f venus: Only claim modifiers in WSI if the host driver supports it
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
de7cae705d venus: Don't report global priorities if globalPriorityQuery is unsupported
Drivers are expected to ignore unknown structs in pNext chains.  Venus
is a bit weird because we advertise features based on the host driver
and so we have code for all sorts of things which may not be supported
by the host driver.  When globalPriorityQuery is unsupported, we
shouldn't even attempt to return anything.  Currently, we just crash in
this case because vn_physical_device::global_priority_properties is an
uninitialized pointer.  While we're here, initialize it to NULL if it's
invalid.

Fixes: e488b5e45e ("venus: support VK_KHR_global_priority")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
e7bb6df7cb venus: Assume wsi_mem->base_bo != NULL
Now that the WSI code is signaling the correct BO, we don't need this
workaround in venus.

Fixes: a315a64291 ("venus: relax 2 assertions for prime blit path")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
cf23ffcbae vulkan/wsi: Signal buffer memory object when blitting
When we're using the PRIME path and using vkCmdCopyImageToBuffer to copy
to a linear image, the buffer memory is what's shared with the window
system.  For legacy drivers that depend on memory signaling via
wsi_memory_signal_submit_info, we need to tell the driver to signal the
buffer memory, not the image memory or else the window system may wait
on a driver-internal buffer and not wait for the copy to complete.

Cc: mesa-stable
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Natalie Vock
8b0271050a vulkan/bvh: Move first PLOC task_count fetch inside PHASE
Otherwise, the memory fetch is not protected by the global sync and
memory barriers and there is a chance to read a stale (or just wrong)
task count.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
2025-03-28 23:07:17 +00:00
Natalie Vock
c1e1d86bd1 radv/rt: Flush CP writes from the common BVH framework with INV_L2 on GFX12
a1b05991 ("radv/rt: Flush L2 after writing internal node offset on GFX12")
did this for radv-internal CP writes - we also need to do this for PLOC
sync data initialization which is done in the common framework.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
2025-03-28 23:07:17 +00:00
David Rosca
51292976fe frontends/va: Don't ignore rotation and mirror for conversions to RGB
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
David Rosca
962c33cbca gallium/vl: Fix mirror with rotation for compute shaders
The mirror needs to be reversed because the rotation is applied
before the mirroring.

VAAPI docs:
  Mirroring of an image can be performed either along the
  horizontal or vertical axis. It is assumed that the rotation
  operation is always performed before the mirroring operation.

Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
David Rosca
c8a2f0b248 gallium/vl: Fix rotation with scaling for compute shaders
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
Robert Mader
2034c901cc llvmpipe: Free dummy_dmabuf on shutdown
In order to stop ASAN from complaining.

Fixes: d21aa86b54 ("llvmpipe: Implement EGL_ANDROID_native_fence_sync")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34258>
2025-03-28 22:01:29 +00:00
Dave Airlie
737d66379d anv: expose VK_KHR_video_maintenance2
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
dc8e21ce60 radv: expose VK_KHR_video_mainteance2
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
5d61e05e6c vulkan/video: add support for inline session paramters.
This is part of VK_KHR_video_maintenance2

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
af560cd680 anv/video: don't write to params if not set.
This should probably be done different, params should probably be considered immutable,
and this should be moved into the command buffer, also this gets set on decode paths as well
which might not make sense.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
e4981731be anv/video: convert to common parameters retrieval code
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
feef12b2a8 radv/video: convert to using common parameter wrappers.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
03f8425fd4 vulkan/video: add simple parameter retrieval wrappers
These are simple now but maintenance2 adds inline parameter sets,
so I will use them more then.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Samuel Pitoiset
a7d8e5d4ca ac,radv,radeonsi: use PM4 for shadowed registers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34228>
2025-03-28 20:50:22 +00:00
David Rosca
1ba427c4fb radeonsi/video: Allow DCC 256B block size with drm minor >= 63
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34148>
2025-03-28 20:26:39 +00:00
David Rosca
a2b4617c00 radeonsi/vce: Support old VCE firmware
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12866
Fixes: 104f9c6654 ("radeonsi/vce: Remove support for FW 50 and older")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34152>
2025-03-28 20:03:27 +00:00
Samuel Pitoiset
250742519f radv: disable TC-compatible CMASK with {FMASK,DCC}_DECOMPRESS
Because if FMASK_COMPRESS_1FRAG_ONLY is set, the FMASK decompress
operation actually doesn't occur. Note that DCC_DECOMPRESS implicitly
decompresses FMASK.

This fixes an issue on GFX10-GFX10.3 which is uncovered by enabling
VK_EXT_sample_locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
8c96b9e306 radv: make sure to always decompress FMASK before expanding it
This is actually required even for TC-compatible CMASK images.

VKCTS coverage is missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
42b0df447c radv: inline radv_fast_clear_flush_image_inplace()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
09d91837e4 radv: rework radv_handle_color_image_transition()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
7bb3a2363d radv: add radv_fmask_color_expand()
Similar to radv_fmask_decompress()/radv_fast_clear_eliminate() helpers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Samuel Pitoiset
aaf634cc24 radv: rework radv_fast_clear_flush_image_inplace()
FMASK_DECOMPRESS also implies FAST_CLEAR_ELIMINATE, so it can run first.
The only exception is fast-clear for color images that have DCC and
FMASK but without comp-to-single (only GFX10) because FMASK_DECOMPRESS
can't eliminate DCC fast-clears.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Samuel Pitoiset
a452098791 radv: skip FCE for comp-to-single fast clears with DCC MSAA
comp-to-single supports MSAA since a while and it's useless to perform
a fast clear eliminate for these fast color clears.

Only GFX10-GFX10.3 are affected because these are the only GPUs that
support DCC with MSAA with FMASK.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Michael Cheng
169e7acee1 vulkan: add leaves and ir_leaves sizes to encode for utrace.
Expose number of leaves and ir_leaves to the debug marker for encode.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34200>
2025-03-28 18:25:40 +00:00
Antonio Ospite
36aa0bd964 ci/android: strip the artifacts of the debian-android job
The libraries built in the `debian-android` job are not stripped because
the job defines `ARTIFACTS_DEBUG_SYMBOLS: 1`.

However this is not strictly necessary for testing purposes, so stop
defining `ARTIFACTS_DEBUG_SYMBOLS` to reduce the size of the artifacts.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12879
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34234>
2025-03-28 16:35:43 +00:00
Antonio Ospite
ac33831ba4 ci/android: only ship x86_64 artifacts in debian-android build job
Mesa is built twice in the same debian-android job, once for aarch64 and
once for x86_64 to catch as many build regressions as possible.

However the install dir used for the two builds is the same, and this
results in a mix of aarch64 and x86_64 artifacts ending up in
install.tar, because .gitlab-ci/prepare-artifacts.sh is called at the
end of the second build.

Having two separate jobs for aarch64 and x86_64 build would be cleaner
but it would also use more resources.

Since the aarch64 libraries are not used for anything for now, a cheaper
workaround is to build x86_64 first and just call prepare-artifacts.sh
after first build.

This way the aarch64 build will still be done to catch regressions, but
the artifacts won't end up in install.tar which is also more consistent
with the fact that S3_ARTIFACT_NAME only has x86_64 in the name
(mesa-x86_64-android-${BUILDTYPE}).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34234>
2025-03-28 16:35:43 +00:00
Daniel Stone
e3433489f8 ci: Move softpipe issue from fail to flake
Seems to be caused by environmental differences between runners. Keep it
as a flake until Piglit gets properly fixed.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
51c67ad7cf brw: Avoid regioning restrictions for u2u16/i2i16 narrowing conversions
Cuts 0.83% of instructions on Alchemist in affected fossil-db shaders
(nearly all of which are in parallel-rdp).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
86f8b8860e brw: Use a smaller type for masked sub-32-bit shift values
Cuts 0.14% of instructions on Alchemist in affected fossil-db shaders
(all of which are in parallel-rdp).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
2e108afb8c brw: Skip unnecessary UNDEFs for comparisons
For example, SIMD16 W/UW fills an entire REG_SIZE so UNDEF isn't needed.

No change in fossil-db.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
771e65b0db brw: Emit UNDEF as needed in SSA-style builder helpers
Should prevent regressions in a future commit.
fossil-db does show small changes, but it ends up a wash at 0.0%.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
b89e269a46 brw: Make a helper to emit UNDEF for temporaries containing small types
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Eric Engestrom
1b0a358db2 ci: bump apitrace version
This includes the fixes discovered in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30417#note_2810243

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Daniel Stone
f6f085f50a ci: Re-enable trace jobs with updated Piglit
mesa/piglit!996 fixed up Piglit to allow us to do trace downloads again,
so we can now bring these jobs back. The fdno trace jobs hosted at
Google are still disabled whilst we try to fix their nginx.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Daniel Stone
5a2a0ca3c9 ci: Add daniels to restricted-trace users
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Mike Blumenkrantz
5d46e2bf3c zink: implement unsynchronized staging uploads for buffers
similar to images, this comes from unsynchronized texture_subdata
serialization in tc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34186>
2025-03-28 12:35:03 +00:00
Mike Blumenkrantz
c0b1a23e35 zink: block streaming cached uploads on unsynchronized/persistent maps
this is broken

Fixes: e63acdd2b7 ("zink: force cached mem for streaming uploads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34186>
2025-03-28 12:35:03 +00:00
Daniel Stone
d9dffd778a ci/zink: Flake out sparse tests
These were always-crash in CI, had a comment saying they passed locally,
and now seem to be passing in CI. Just hit it as flake until someone
actually looks into it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Daniel Stone
c8c427fb3d ci/amd: Add new radeonsi fail seen in the wild
Unsure how this slipped in, but it sure is failing consistently.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Daniel Stone
9d94e1ed0d etnaviv: Add missing build dependency on generated header
bindings.h pulls in enums.h, so anything using it needs to depend on
enums.h to avoid spurious build failures.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Connor Abbott
8864ee7b0f tu: Fix reported FDM fragment size with multiview
We were never setting has_multiview. It's not actually necessary anyway,
since we can just do the optimization we were trying to do whenever
num_views is 1 instead.

This doesn't affect the actual fragment size, which was already correct,
only gl_FragSizeEXT.

Fixes: 6f2be52487 ("tu, ir3: Handle FDM shader builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
2025-03-28 11:35:22 +00:00
Connor Abbott
122f2c422a tu: Fix size of frag_size_ir3 and frag_offset_ir3 driver params
They are an array, so we have to reserve extra space for extra views.
This bug was being masked by the bug fixed in the next commit.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
2025-03-28 11:35:22 +00:00
Connor Abbott
9775b33d0f tu: Enable GMEM with layered rendering
We accidentally forgot to enable it earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
2025-03-28 11:07:38 +00:00
Connor Abbott
6cadc1baea tu: Fix GMEM offset for multisample layered separate stencil
Fixes a bug uncovered by CTS when enabling GMEM with layered rendering.

Fixes: def56b531c ("tu: Support GMEM with layered rendering and multiview")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
2025-03-28 11:07:38 +00:00
Connor Abbott
b1dcc9a1d7 tu: Fix binning_possible detection with bin merging
When bin merging we maximize instead of minimize the VSC pipe size,
which means that we fail when there are too many pipes instead of when
the pipes are too large. This means that we need to calculate
binning_possible differently, and we need to skip
tu_tiling_config_update_pipes() when binning is impossible because
otherwise we will write out-of-bounds.

Fixes: 3fdaad0948 ("tu: Implement bin merging for fragment density map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34196>
2025-03-28 09:34:06 +00:00
Danylo Piliaiev
abba05e01e tu: Fix NULL deref in trace_end_render_pass
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34238>
2025-03-28 08:14:58 +00:00
Valentine Burley
684c7a61f4 ci: Disable the Google freedreno farm
After a configuration change gone wrong, the farm now returns Error 403.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34254>
2025-03-28 08:11:36 +00:00
Samuel Pitoiset
8032f628ad radv: add a helper to emit PM4 commands to a CS
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
498fc42fa9 radv: add a helper to emit a PKT3_COPY_DATA with an immediate
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
cd08da2f20 radv/video: slightly change radv_vcn_sq_header()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
a2b6b6f1f9 radv: add more helpers to start/stop perfcounters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
6d3ee9d8ad radv: use radv_cs_write_data_imm() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
7affd623c0 radv: slightly change the COND_EXEC for sampling performance counters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
8d12578989 radv: add a helper to emit SPM muxsel
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
f12bf800e3 radv: add a helper to emit indirect buffer for draws/dispatches
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
af5cde7107 radv: apply some cosmetic changes for future begin/end CS sequences
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
391da996ed radv: rework the shader pointer emit as macros
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Yiwei Zhang
9d0e7d8722 docs: update venus driver page
Most implementation defined behaviors have been properly defined via
new maintenance extensions, and the mapping support is the only one
left on the table...in a very unfortunate way for historical reasons.

Meanwhile, update the host driver list for the latest that has been
tested working. Two major KVM improvements have also been documented
along with the setups that rely on those.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34225>
2025-03-28 07:40:03 +00:00
Rohan Garg
c6757cb8f0 isl: enable CPB compression
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10760
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/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
5d2a6b23de anv: separate fast clear handling for compressed CPS
CPS surfaces are marked as stencil compressed internally and
should use the fast clear depth stencil path for clearing when possible

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/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
dadd84f5a8 anv: no need to handle transitions for CPB surfaces
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/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
80f9b61f02 anv: CPB surfaces that are used as color attachments or for stores cannot be compressed
This particular scenario indicates that the CPB will be written to using
a fragment shader, disable compression to ensure the correct data is
read back from the surface later.

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/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
ceba312ebd anv,blorp,isl: handle compressed CPS surfaces through the depth stencil hw
Compressed CPS surfaces operations such as copies and clears need to be
handled through the depth stencil hw to ensure that the aux data is
handled correctly.

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/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
6f4c23100a anv: refactor add_aux_surface_if_supported to use a common variable
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/20741>
2025-03-28 04:38:09 +00:00
Sagar Ghuge
191d1e7345 intel/compiler: Don't lower 64bit data memory access on LSC
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34189>
2025-03-28 03:07:56 +00:00
Jordan Justen
f73132f121 intel/dev: Ignore hwconfig difference due to WA 18040209780
Apparently hwconfig has not implemented this workaround.

This warning was noted on MTL and ADL.

> INTEL_HWCONFIG_TOTAL_GS_THREADS (336) != devinfo->max_gs_threads (312)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
2025-03-27 14:52:59 -07:00
Jordan Justen
cdf95273e1 tools/intel_dev_info: Print hwconfig discrepancies
Previously we were printing this information whenever the driver
started, but that proved to noisy.

For example, if running thousands of tests, this would cause thousands
of warnings messages to be printed. (Assuming the driver was built in
debug mode.)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
2025-03-27 14:52:54 -07:00
Jordan Justen
bc86fd5b1f intel/dev: Stop checking hwconfig values at driver runtime
We will move this check into the `intel_dev_info` tool. Unfortunately,
this means we will be much less likely to notice inconsistencies, but
the current strategy has proven to be far too noisy.

For example, if the driver was built in debug mode, then when test
suites are running thousands of tests, the current approach can lead
to thousands of messages being printed.

Closes: mesa/mesa#12141
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
2025-03-27 14:52:49 -07:00
Daniel Stone
24c86ff345 ci/lava: Fail faster when getting results
Previously we'd burn 4 minutes waiting for curl to bang its head
trying to get results which would never emerge. Change this so we don't
fail on a 404, and also pull the retry down quicker, so we'll spend a
maximum of 2 minutes waiting for a server to come back, and no minutes
when the results aren't there to be fetched.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244>
2025-03-27 20:23:15 +00:00
Daniel Stone
f4de6f503f docs/ci: Fix nginx caching instructions
The new s3-proxy we have on fd.o is just a redirecting agent: it queries
the policy and, if allowed, returns a URL with temporary credentials
where the client can pull the real data from.

This means that nginx would see /fdo-opa/mesa-rootfs/misc?key=foo and
/fdo-opa/mesa-rootfs/misc?key=bar as distinct objects, not knowing that
it could cache only on the base URL.

Strip the query params from the nginx cache key so we can actually do
caching.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244>
2025-03-27 20:23:15 +00:00
Daniel Stone
df97f243e6 ci: Re-enable Collabora CI
Now that all our S3 issues have been resolved, let's start running some
tests again.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244>
2025-03-27 20:23:15 +00:00
Faith Ekstrand
334a4da5c0 nvk: Bump the conformance version to 1.4.1.3
I've run this on most of the hardware and there's no new fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
f8409f1892 nak: hsetp2 and dsetp are slower on Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
c12583fc4b nvk: Mark the push before an indirect push as incomplete
This fixes dEQP-VK.api.command_buffers.many_indirect_draws_on_secondary
on pre-Turing hardware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
0915b3131f nvk/nvkmd: Add a concept of incomplete pushes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
cbf87e82e8 nvk: Use the right sample mask for 8x/4pass on Maxwell A
Fixes: 48898c47bf ("nvk: Rework setup of sample masks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
3354c24169 nouveau/mme/fermi: Don't allow STATE and EMIT on the same op
Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
81986a8523 nvk: Disable sparse buffer binding prior to Maxwell B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
35cd6a1d99 nvk: Don't set filterMinmax properties prior to Maxwell B
We disallow the feature but the CTS still expects the properties to be
false as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
43d35bb63a nvk: Disable VK_EXT_device_generated_commands on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
7939331dde nvk: Allocate QMDs from a heap on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
94787116b1 nvk: Disable VK_EXT_post_depth_coverage on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
79294fb95a nvk: Fix a Volta check
Fixes: e162c2e78e ("nvk: Use VM_BIND for contiguous heaps instead of copying")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
90b2137ac5 nvk: Free owned_gart_mem correctly
Fixes: fbe171638e ("nvk: add gart forced cmd pool side buffer.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Robert Mader
05e7ac6551 llvmpipe: Take offset into account when importing dmabufs
Which is necessary for many common YCbCr formats.

Fixes: d74ea2c117 (llvmpipe: Implement dmabuf handling)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34240>
2025-03-27 18:47:26 +00:00
Faith Ekstrand
1ee884efd7 nvk: Reduce the size of nvk_image_view_capture
RenderDoc has a hard-coded limit of 16B for descriptor captures and
we're currently burning 24B.  Reducing is pretty easy, though, since
storage doesn't support multi-plane.  Any storage image views will use
VK_IMAGE_ASPECT_PLANE_N_BIT.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34128>
2025-03-27 16:02:40 +00:00
Faith Ekstrand
da0156be1f nouveau/headers: Re-use Rust method types when possible
We detect whenever a method hasn't changed from one generation to the
next and just `pub use` the older generation's method struct and any
enum types associated.  This keeps each mthd module independently usable
with all necessary types while reducing the number of unique Rust types
and associated trait implementations generated.  This drops the size of
libnvidia_headers.rlib from 84 MiB to 22 MiB and will hopefully make
Rust code a little less expensive to build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
e58dd75c0f nouveau/headers: Drop double-underscore from Rust names
There are a couple of these in thea headers and they cause Rust to throw
warnings.  Just fix them instead of disabling the Rust warning.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
51da40d0db nouveau/headers: Drop unused Rust constants
The only users of the Rust crate use the structs and Mthd impls.  This
reduces the size of libnouveau_headers.rlib from 99 MiB to 84 MiB.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
5cbf7f5bd7 nouveau/headers: Refactor class_parser
This adds proper Method and Field classes and uses them instead of
the pile of dictionaries we had before.  This is probably faster and
definitely more readable.  I've verified with cl9097.h that this makes
no differenct to the generated C or Rust besides whitespace.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
f26cf5633d nak: Turing starts at SM73
The low-end Turing cards (TU117 for sure) are SM73, not SM75.  These are
the cards on which we have tensor cores but they're so slow as to be
almost useless.  We're not back-porting this because nouveau currently
returns 75 for these cards and because Volta binaries work fine on
Turing so they'll just be a little slower.  We have, however, seen this
advertised by NVRM so we want our handling of shader models to be
correct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
5df68ffac1 nak: Check num_regs(UGPR) instead of SM version
This is more explicit and leaves fewer naked version numbers in the
code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
af9d65e8b8 nak: Fix a SM check for OpPCnt
This doens't really fix anything as we don't have any nir_loops on
Volta+ but the code was wrong so we should fix it.

Fixes: 9bbc692064 ("nak/nir: Rework CRS handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
1d1d79bbaa nak: Always copy sources when handling vec/pack/mov ops
It's possible that the source is uniform but the destination is not.  In
this case, we need to insert a copy or else we might accidentally
propagate a uniform into some place we don't expect it.

This fixes a bunch of fp64 KHR-Single-GL46.subgroups.arithmetic.* tests.

Fixes: d09d3f5246 ("nak/from_nir: Emit uniform instructions when !divergent")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
87af55e075 nak: Don't insert empty OpParCopy in assign_regs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
98677294b9 nak: Insert the annotation in the right spot in assign_regs
Fixes: efc4ac0d27 ("nak/sm50: sprinkle OpAnnotate in optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Martin Krastev
824e1876f0 svga/ci: disable vmware farm
Planned maintenance of the farm host

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34230>
2025-03-27 13:10:04 +00:00
irql-notlessorequal
c0c562cf6e hasvk: Fix non-functioning version override.
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27717 accidentally removed the instance check for the drirc option "hasvk_report_vk_1_3_version", rendering it useless.

Re-add the check and expose Vulkan 1.3 if the user asks.

Fixes: 2d575034f2 ("hasvk: switch to use runtime physical device properties infrastructure")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34232>
2025-03-27 12:48:10 +01:00
Nikolas Zimmermann
1e72fbcfd1 etnaviv: drm: Add DRM_RDWR permissions to drmPrimeHandleToFD() call.
Currently it is not possible to mmap() the exported dma-bufs from etnaviv
for writing, through the GBM APIs, such as gbm_bo_get_fd(). etna_bo_dmabuf()
calls drmPrimeHandleToFD() only with DRM_CLOEXEC flag, omitting DRM_RDWR.

A typical call sequence, ending in etna_bo_dmabuf, for illustration:

gbm_bo_get_fd -> gbm_dri_bo_get_fd -> dri2_query_image ->
dri2_query_image_by_resource_handle -> etna_resource_get_handle
-> etna_bo_dmabuf.

Signed-off-by: Nikolas Zimmermann <nzimmermann@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34213>
2025-03-27 09:49:04 +00:00
Lionel Landwerlin
a88c9ea192 anv: limit implict write with drirc
9f32e1a489 meant to amend 1e80a426c2.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9f32e1a489 ("anv/drirc: Add option to control implicit sync on external BOs")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12629
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33587>
2025-03-27 08:28:20 +00:00
Samuel Pitoiset
09656e3dc4 radv/ci: fix renaming the VKCTS job for tahiti
This one has been missing during the renames.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34226>
2025-03-27 08:00:57 +00:00
Lionel Landwerlin
4db4bd1d04 brw: always write the VUE header
In 35df3925ca ("brw: ensure VUE header writes in HS/DS/GS stages") I
misread the PRMs and thought that the VF would initialize the header.

What actually happens is that the VF does not write valid values in
there and the PRMs explicitly say that the VS shader should overwrite
whatever is in there.

We could avoid writing the header in some cases when no HW is going to
read back the header. For example with rendering disables through
3DSTATE_STREAMOUT::RenderingDisable. But those cases are dynamic and
the compiler is not able to tell. So just always write the header.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 35df3925ca ("brw: ensure VUE header writes in HS/DS/GS stages")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12880
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34211>
2025-03-27 07:42:23 +00:00
Samuel Pitoiset
ae8c0b06a7 radv: add radeon_event_write() macros
Similar to RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
344aa38925 radv: add new helper to emit PKT3_EVENT_WRITE for sampling queries
Everything in one function is easier to share.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
e2e8dca941 radv: rework radeon_set_uconfig_perfctr_reg_seq to use amd_ip_type
To be more generic.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
88df7e709a radv: move the optimized context reg macros with other similar ones
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
30948e63f4 radv: switch all emit helpers to macros
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
74a5266d8f radv: replace radeon_set_reg_seq by a macro
To be more close to RadeonSI, other similar functions will be replaced
by macros in the next commits.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Georg Lehmann
8648d7cf75 ac/nir: set has_mul24_relaxed
This is only used by OpenCL.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:16 +00:00
Georg Lehmann
7c6a2b16e0 ac/llvm: support mul24_relaxed
I didn't find dedicated 24bit intrinsics, but I also haven't looked that hard.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:16 +00:00
Georg Lehmann
7631b10984 aco: implement mul24_relaxed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:16 +00:00
Georg Lehmann
2b1fc1a7fe nir: add option to keep mul24_relaxed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:15 +00:00
Marek Olšák
47d08dbde7 glx: stop exporting EXT_texture_object functions from libGLX_mesa.so
These aliases of the non-EXT functions have a non-aliased indirect GLX
implementation. Remove it since it's not needed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
25d1be00a2 mesa: inline main/meson.build
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
574c1a70d6 mesa: move dispatch.h and marshal_generated.h generation to glapi/gen
This is where most files are generated. It's a prerequisite for
a future change.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
06a720e1ea glapi: remove the option to set the nop handler
Call the only nop handler that's ever set directly.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
a91c541c5b glapi: remove noop_generic callbacks
There are named and generic noop callbacks. The named ones can print
the GL function being called, while the generic ones can't. Remove
the generic ones.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
1f56a1ac37 glapi: rename dispatch stubs to use function names instead of numbers
it's now _dispatch_stub_Uniform2d instead of shared_dispatch_stub_216

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
d8b8259593 glapi: simplify mapi_abi.py
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
4d643d06c8 glapi: simplify headers of generated files
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
168cf334e8 glapi: remove the GLAPI_PREFIX macro, just use gl as the function prefix
GLAPI_PREFIX always adds the gl prefix.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
b928304732 glx: remove the hack that forced exporting GL functions from libGL
GL functions were exported by luck because we incorrectly used
link_with in meson, which exports functions only if the static lib is
used. link_whole guarantees that the functions are always exported
even if the static lib is unused.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
e6da775506 glapi: get the list of public GL functions from libgl-symbols.txt
It's used by the symbols check test, so let's feed the same file into
python to define public GL functions because the lists are identical.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
dcc805469b glx: add a test to verify exported symbols
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
1e0ce9db94 glapi: remove unused _mesa_glapi_Dispatch
Only _mesa_glapi_tls_Dispatch is used.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
711fc10ea3 glapi: merge all shared-glapi source files into one .c file
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
fae087770a glapi: simplify codegen macros
- include the generated header directly instead of including
  MAPI_ABI_HEADER
- remove the MAPI_MODE_BRIDGE macro
- must move code into .c files since we don't have the macros anymore
- clean up #includes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
16ab7bd5a0 glapi: replace mapi_func type with identical _glapi_proc
there's no need to have 2 types for the same thing

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
d134f97e3f glapi: make a separate copy of entry.c for each lib
Using the same .c file in 4 different static/shared libs is difficult to
read. Having them separate will make it possible to simplify the code.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
9e24940bc7 glx: don't generate indirect GLX dispatch for ARB_imaging functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
219b2cde13 radeonsi: remove clover support
Only Rusticl is supported.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34215>
2025-03-27 01:59:19 +00:00
Eric Engestrom
77fb09c8cd rpi5/ci: drop duplicate flakes
Was not noticed until now because the lines had been added all shuffled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34221>
2025-03-27 01:14:45 +00:00
Eric Engestrom
a910246fff rpi5/ci: sort flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34221>
2025-03-27 01:14:45 +00:00
Yiwei Zhang
315d55db79 venus: support VK_EXT_multisampled_render_to_single_sampled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
7155ffe275 venus: refactor format properties cache to be extensible
Now the key consists of format + high order index from different pNext
chain structs. To be noted. we still don't want to cache modifiers to
avoid preparing dynamic length internal storage for per format
modifiers. The good thing is that most of the queries against modifier
support are one-time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
8e173230b6 venus: support VK_KHR_shader_relaxed_extended_instruction
This is missed from earlier batches as it was falsely grouped under 1.3
core exts that have been recently fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
5227398a6c venus: support VK_EXT_buffer_device_address
Need a separate feature struct as the capture/replay bit means different
things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
a19b0ccc31 venus: sync latest protocol
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Gurchetan Singh
8f003dc2e9 gfxstream: follow the semantics desired by distro VK loader
- vkCreateInstance should return VK_SUCCESS absent a few specific
  conditions
- just don't add any physical devices later

Cc: mesa-stable

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34090>
2025-03-27 00:26:17 +00:00
Gurchetan Singh
ef84cd928e gfxstream: refactor device initialization
Don't add unnecessary logspam if virtgpu isn't present.

Cc: mesa-stable
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34090>
2025-03-27 00:26:17 +00:00
Gurchetan Singh
5503d97bf6 gfxstream: check device exists before using it
Segfaults in the error case otherwise.

Cc: mesa-stable
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34090>
2025-03-27 00:26:17 +00:00
José Roberto de Souza
0eab7bfabc intel/dev/xe3: Set max_slices and max_subslices_per_slice using hwconfig
Xe3 different SKUs can have different max_subslices_per_slice and
Xe KMD topology uAPI only provide us the available subslices.
Therefore, to correctly calculate the available slices, we need
max_subslices_per_slice to match the hardware.

This change retrieves this information from hwconfig for Xe3+.
This avoids adding all the PTL intel_device_info variants.
Additionally, the PTL topology values are currently embargoed and
cannot be hard-coded in public source code.

This could be simplified if we decide to apply max_slices and
max_subslices_per_slice to all platforms that hwconfig is required.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33328>
2025-03-26 23:35:14 +00:00
Paulo Zanoni
e72ad49622 drirc/anv: DiggingGame.exe needs force_vk_vendor=-1
Otherwise, it fails with a message:

  "Assertion failed: IsValidIndex(Index)
   [File:D:\\build\\++UE5\\Sync\\Engine\\Source\\Runtime\\Core\\Public\\Containers\\UnrealString.h]
   [Line: 218] \nString index out of bounds: Index 0 from a string with
   a length of 0"

Thanks to the ProtonDB community for having figured this out and
documented it for us.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12695
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/34103>
2025-03-26 22:48:37 +00:00
Valentine Burley
55749a5bbb amd/ci: Rename AMD jobs to follow unified naming convention
All AMD jobs now follow the new naming convention: {driver}-{gpu}-{test}.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Valentine Burley
74ebd5d5b2 radv/ci: Delete obsolete vkcts-stoney-valve job
This job won't be re-enabled, so delete it.
Suggested by @mupuf.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
c168fdcd50 radv/ci: delete empty radv-hawaii-skips.txt
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
a78eccdb9b radv/ci: rename radv-gfx1200 to radv-gfx1201
Also create an empty file for flakes, otherwise deqp-runner complains.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
a6d47aeaa3 radv/ci: drop aco suffix for CI files
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
b89f45c5d8 radv/ci: remove radv-stoney-flakes.txt
This file was never used because GPU_VERSION is radv-stoney-aco.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:26:59 +00:00
Samuel Pitoiset
7233df3d10 radv/ci: remove vkcts-navi21-llvm-valve completely
This is disabled since a very long time and testing LLVM support with
RADV in CI is kind of pointless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:26:59 +00:00
Eric Engestrom
7e16c10415 meson: move special value all out of the middle of the list
And sort the rest while at it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Eric Engestrom
a39090921e meson: drop deprecated swrast alias for softpipe+llvmpipe
We accidentally kept it one more release cycle than we meant to ^^'

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Eric Engestrom
8ee792a381 ci: remove last uses of deprecated swrast alias for softpipe+llvmpipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Eric Engestrom
84b9aebca4 docs: fix last references to gallium-drivers=swrast
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Samuel Pitoiset
d73d570fa7 ci: uprev vkd3d-proton to 078f07f588c849c52fa21c8cfdd1c201465b1932
This contains few more tests as usual.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33941>
2025-03-26 21:16:39 +00:00
Rhys Perry
0619cc45b7 radv/winsys: set has_distributed_tess for null winsys
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33978>
2025-03-26 20:52:53 +00:00
Rhys Perry
ee0be147b9 radv/winsys: set gart_page_size for null winsys
Fixes assertion failure when initializing memory types for devices without
dedicated vram.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33978>
2025-03-26 20:52:53 +00:00
Rhys Perry
4632ca258b radv/winsys: increase gfx12 vgprs for null winsys
LLVM has Feature1_5xVGPRs for both gfx1200 and gfx1201.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33978>
2025-03-26 20:52:53 +00:00
Tapani Pälli
694f2bbeeb isl/iris/anv: setup L1CacheControl based on surface and buffer usage
Patch chooses write through mode with storage surfaces when cache policy
is set via ISL_SURF_USAGE_CACHE_POLICY_WT.

This fixes rendering artifacts seen in:

   Space Engineers 2
   Hogwarts Legacy
   Plague Tale: Requiem

This was tested with some workloads on MTL and all on LNL/BMG. It fixes
Space Engineers 2 rendering artifacts but not the crash which is a
separate issue.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12714
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12750
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/34044>
2025-03-26 20:19:07 +00:00
Tapani Pälli
84510aea8f anv: pass down buffer usage for isl_buffer_fill_state
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/34044>
2025-03-26 20:19:07 +00:00
Tapani Pälli
a57ec756b8 iris: pass down buffer usage for isl_buffer_fill_state
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/34044>
2025-03-26 20:19:07 +00:00
Tapani Pälli
cac132f63d isl: add usage field to isl_buffer_fill_state_info
This makes it possible to choose caching mode based on usage.

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/34044>
2025-03-26 20:19:07 +00:00
Eric Engestrom
e81034c922 ci: document who are the farm admins
I've also included the CI infrastructure used by each farm, in case an
issue is affecting all farms of a kind, like I don't know, a bug in the
http proxy used by lava & baremetal farms :]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34195>
2025-03-26 19:47:09 +00:00
Natalie Vock
d6cb45dbb0 aco/spill: Allow spilling live-through operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Natalie Vock
416a016127 aco: Add RegisterDemand(Temp) constructor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Natalie Vock
ca7ce1fb33 aco/spill: Invert reloads map
So we can quickly look up if an operand was reloaded without having to
check renames.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Natalie Vock
39413ef78f aco: Add get_temp_reg_changes helper
Similar to get_live_changes, but considers live temporary registers
as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Konstantin Seurer
45fd26c943 hk: Fix building without the gallium driver
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Konstantin Seurer
69cd2cb362 asahi: Only require IOKit for tooling
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Alyssa Rosenzweig
c677ac13b9 agx: fix ctz of zero with address calcs
../src/asahi/compiler/agx_nir_lower_address.c:82:30: runtime error: passing zero to ctz(), which is not a valid argument
    #0 0x56175dca5684 in pass ../src/asahi/compiler/agx_nir_lower_address.c:82
    #1 0x56175dca2eda in nir_function_intrinsics_pass ../src/compiler/nir/nir_builder.h:164
    #2 0x56175dca308c in nir_shader_intrinsics_pass ../src/compiler/nir/nir_builder.h:191
    #3 0x56175dca68ae in agx_nir_lower_address ../src/asahi/compiler/agx_nir_lower_address.c:167
    #4 0x56175dc885c0 in agx_optimize_nir ../src/asahi/compiler/agx_compile.c:3063
    #5 0x56175dc9650d in agx_compile_shader_nir ../src/asahi/compiler/agx_compile.c:3827
    #6 0x56175dc52148 in main ../src/asahi/clc/asahi_clc.c:359
    #7 0x7fdf1c343249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7fdf1c343304 in __libc_start_main_impl ../csu/libc-start.c:360
    #9 0x56175dc44760 in _start (/builds/mesa/mesa/_build/src/asahi/clc/asahi_clc+0xbd0760)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Alyssa Rosenzweig
dfae262ca4 asahi: add assert for max variant count
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Alyssa Rosenzweig
dfe995414f libagx: reduce # of variants of unroll restart
33 variants of this stupid kernel is not worth it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Konstantin Seurer
14f2f1226f ci: Do not build hk on alpine
"hk: Fix building without the gallium driver" will make this do
something which uncovers that the build is broken on alpine. Remove it
for now to unblock this MR.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Caio Oliveira
72aefea0a0 brw: Fix disassembler trying to decode 3src_hstride in Gfx9
This field is not encoded for Gfx9, so use the fixed value
that makes sense for that platform.

Fixes: 9dfff2cb14 ("brw: Allow generating destination with stride 2 in 3-src instructions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12881
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34197>
2025-03-26 18:12:46 +00:00
Antonio Ospite
4ee3c302ce ci/android: factor out GLES runtime version retrieval to a function
Different versions of Android might have different ways of getting the
GLES runtime version, so factor this out to a function, so that the
mechanism can be changed in a centralized way.

Also rename MESA_RUNTIME_VERSION to GLES_RUNTIME_VERSION because this is
really what is being retrieved, in the future we might have a similar
check for the vulkan Mesa driver.

While at it remove mentions of SurfaceFlinger in some comments since the
mechanism to retrieve the versions is irrelevant for the purposes of the
checks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
3af15abd68 ci/android: handle ANGLE being installed under /system on Android 15+
The ANGLE library is installed under /system rather than /vendor
starting from Android 15, so handle this difference in the
android-runner.sh script.

See also:
d964482310

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
c953e90e23 ci/android: push also the intel vulkan driver
The intel vulkan driver is always built by the `debian-android` job,
since it may be needed for some future job, push it unconditionally, it
does not hurt to have it in the Android system.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
9ce3d9c933 ci/android: always push ANGLE libraries
Since ANGLE is always built for Android, always push it even if it is
not going to be tested directly.

Besides simplifying the script, this is also because ANGLE is going to
be mandatory anyway starting from Android 15+ and not having it in the
Android system might cause unexpected failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
e346b5786d ci/android: remove old mesa and ANGLE libraries before pushing new ones
Remove old mesa and ANGLE libraries before pushing new ones, and do this
using a trailing wildcard, because some versions of Android might have
versioned libraries like /vendor/lib64/egl/libEGL_mesa.so.1 which should
also be removed to avoid any confusion when loading the freshly pushed
ones.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
12a9e0868c ci/android: check for ANGLE_TAG in android-deqp-runner.sh
Check for ANGLE_TAG instead of USE_ANGLE in android-deqp-runner.sh to be
consistent with what deqp-runner.sh does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
2eaf1818a3 ci/android: remove some unnecessary adb commands from android-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
e774584faa ci/android: factor out a generic android-runner.sh from cuttlefish-runner.sh
Some of the commands in cuttlefish-runner.sh, like updating mesa and
ANGLE, are not specific to cuttlefish, in general they can be executed
on any Android device under test.

So split those commands out of cuttlefish-runner.sh and put them into an
android-runner.sh script.

For example, when testing a physical Android device instead of a virtual
device, a mesa-ci job will call android-runner.sh directly instead of
cuttlefish-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
83b0b07cce ci/android: increase the waiting time to stop the cuttlefish launcher
Increase the timeout of stop_cvd even more, sometimes 20 seconds are not
enough.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
6ef9213524 ci/android: don't set EGL_PLATFORM on the host before launching cuttlefish
Setting EGL_PLATFORM on the host system is not really necessary for
running cuttlefish, this is probably a left-over from previous
experiments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Samuel Pitoiset
c036736e2e radv/video: rework command buffer emission
This is much closer to RadeonSI and could be shared at some point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34150>
2025-03-26 14:59:12 +00:00
Samuel Pitoiset
0e0a393a4a radv/video: use a pointer to write the total task size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34150>
2025-03-26 14:59:12 +00:00
Samuel Pitoiset
2c3b9312cc radv/meta: fix color<->depth/stencil image copies
The color format needs to be compatible with depth or stencil. Also
the depth/stencil format was incorrect when it's the source.

Fixes dEQP-VK.api.ds_color_copy.*
and VKD3D_TEST_FILTER=test_copy_texture.

Fixes: d4ff011b12 ("radv: advertise VK_KHR_maintenance8")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34142>
2025-03-26 13:27:03 +00:00
Erico Nunes
92797683e1 ci: re-enable lima farm
Re-enable after gitlab infrastructure move and caching proxy fix.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34203>
2025-03-26 12:42:50 +00:00
Samuel Pitoiset
ef0a6f59f3 radv: use PM4 for setting specific graphics registers in the preamble
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34172>
2025-03-26 10:14:22 +00:00
Samuel Pitoiset
c5d0764fce radv: remove radv_force_pstate_peak_gfx11_dgpu=true for Helldivers 2
Our QA team extensively tested Helldivers 2 on AMD RX 7800 XT/RX 7600
with many different presents and didn't get any GPU hangs. Few users
also reported the game being very stable without this workaround.

Few other users reported issues with the workaround itself (like
pstate not correctly restored etc), so let's remove it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34164>
2025-03-26 09:33:19 +00:00
Daniel Schürmann
afc605bc9b aco: Remove empty exec skipping after demote
Totals from 858 (1.08% of 79377) affected shaders: (Navi31)

Instrs: 678713 -> 677694 (-0.15%); split: -0.15%, +0.00%
CodeSize: 3732576 -> 3729104 (-0.09%); split: -0.10%, +0.01%
Latency: 4199397 -> 4198632 (-0.02%); split: -0.06%, +0.04%
InvThroughput: 691391 -> 691122 (-0.04%); split: -0.04%, +0.00%
SClause: 14593 -> 14605 (+0.08%)
Copies: 41279 -> 41288 (+0.02%); split: -0.04%, +0.06%
Branches: 13575 -> 13452 (-0.91%)
PreSGPRs: 29069 -> 29039 (-0.10%)
VALU: 426261 -> 426215 (-0.01%); split: -0.01%, +0.00%
SALU: 60458 -> 60471 (+0.02%); split: -0.02%, +0.04%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
90faadae72 aco/insert_exec_mask: don't disable dead quads on demote in divergent CF
Also force-enalbe helpers in case of demote in divergent CF.

Totals from 1305 (1.64% of 79377) affected shaders: (Navi31)

Instrs: 926923 -> 922516 (-0.48%); split: -0.48%, +0.00%
CodeSize: 5045292 -> 5027408 (-0.35%); split: -0.36%, +0.00%
Latency: 6176577 -> 6174708 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 931603 -> 931583 (-0.00%); split: -0.00%, +0.00%
SClause: 22816 -> 22855 (+0.17%); split: -0.17%, +0.34%
Copies: 57347 -> 55170 (-3.80%); split: -3.81%, +0.01%
Branches: 18990 -> 18974 (-0.08%)
PreSGPRs: 42734 -> 43248 (+1.20%)
SALU: 90511 -> 86153 (-4.81%); split: -4.85%, +0.04%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
b872ff6ef2 aco/insert_exec_mask: if applicable, use s_wqm to restore exec after divergent CF
Totals from 4740 (5.97% of 79377) affected shaders: (Navi31)

Instrs: 6273963 -> 6273410 (-0.01%); split: -0.01%, +0.00%
CodeSize: 34306560 -> 34304284 (-0.01%); split: -0.01%, +0.00%
SpillSGPRs: 1793 -> 1797 (+0.22%); split: -0.11%, +0.33%
Latency: 62599300 -> 62598714 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 9117199 -> 9117189 (-0.00%); split: -0.00%, +0.00%
SClause: 223548 -> 223529 (-0.01%); split: -0.02%, +0.01%
Copies: 464248 -> 454711 (-2.05%); split: -2.06%, +0.00%
Branches: 161446 -> 161443 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 226278 -> 225608 (-0.30%)
VALU: 3793235 -> 3793244 (+0.00%); split: -0.00%, +0.00%
SALU: 606184 -> 605759 (-0.07%); split: -0.08%, +0.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
69dcd5be3a aco: don't assume that demote doesn't cause an empty exec mask
Totals from 188 (0.24% of 79377) affected shaders: (Navi31)
Instrs: 209239 -> 209473 (+0.11%); split: -0.01%, +0.12%
CodeSize: 1101124 -> 1101744 (+0.06%); split: -0.02%, +0.07%
Latency: 1672182 -> 1672748 (+0.03%); split: -0.11%, +0.14%
InvThroughput: 237276 -> 237546 (+0.11%); split: -0.00%, +0.12%
SClause: 5694 -> 5690 (-0.07%); split: -0.28%, +0.21%
Copies: 21685 -> 21682 (-0.01%); split: -0.12%, +0.10%
Branches: 5740 -> 5863 (+2.14%)
PreSGPRs: 7004 -> 7034 (+0.43%)
VALU: 123595 -> 123641 (+0.04%); split: -0.00%, +0.04%
SALU: 28418 -> 28411 (-0.02%); split: -0.09%, +0.06%

Fixes: f35e229fae ('aco: skip code if exec is empty')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
c1b124ab6c aco/lower_branches: properly consider exec mask needs of branch targets
No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:11 +00:00
Caleb Callaway
c37ece75ea anv: add INTEL_DEBUG=rt_notrace
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34169>
2025-03-26 00:52:53 +00:00
Yiwei Zhang
8c6a5250ec venus: support VK_KHR_maintenance7
Need to properly fill layered api properties while adjusting query
wrapping based on maint7 feature enablement. Venus has to conditionally
advertise maint7 support only when renderer side vk is 1.2 or supports
VK_KHR_driver_properties.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33960>
2025-03-26 00:26:22 +00:00
Hyunjun Ko
4236ef31ab anv: Add stdSyntaxFlag values for h264/5 encoders
Closes: mesa/mesa#12834

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34094>
2025-03-25 23:54:32 +00:00
Hyunjun Ko
c22a635938 vulkan/video: Do byte-alignment when building a h264 slice header
Fixes: ff8de6190 ("vulkan/video: adds a bitstream writer of h264 slice header")
Closes: mesa/mesa#12835

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34094>
2025-03-25 23:54:31 +00:00
Kenneth Graunke
890c8714fd intel/decoder: Decode compute shaders in EXECUTE_INDIRECT_DISPATCH
This makes the error state decoder (among other tools) print the
compute shaders referenced by EXECUTE_INDIRECT_DISPATCH.  We just
reuse the existing COMPUTE_WALKER handling as it already looks for
a COMPUTE_WALKER_BODY in a larger struct and then
INTERFACE_DESCRIPTOR_DATA within that.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34198>
2025-03-25 23:26:40 +00:00
Mykhailo Skorokhodov
bc0ceb136f drirc/anv: force_vk_vendor=-1 for Drive Beyond Horizons
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34181>
2025-03-25 21:52:51 +00:00
Valentine Burley
b6fb0fff3f ci/android: Temporarily disable building llvmpipe
Due to the driver's size being inflated by the embedded LLVM, and
uploading to S3 currently being slow, disable building llvmpipe for
Android.
This is meant as a temporary workaround until we can do this more
efficiently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
Valentine Burley
cbbcc765d7 ci/android: Update to LLVM 19 for Android
Use LLVM 19 for Android, which matches the LLVM version used in the rest
of CI.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
Valentine Burley
1cb85c9f23 ci/android: Keep the LLVM install when rebuilding
Previously, when rebuilding LLVM for Android, the script would delete the
freshly built LLVM install. This caused the android_build container to
lack LLVM unless the container was rebuilt again, this time without
rebuilding LLVM, and instead just downloading the tarball.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
Valentine Burley
3053d822b2 ci/android: Don't delete ninja after building LLVM
Ninja was already included in the android_build container, so there's no
need to put it in the Ephemeral packages, which only meant that it was
removed at the end of the LLVM build.

Also, add the usual image tag header at the top of
build-android-x86_64-llvm.sh.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
forbiddenlake
a564415c44 ci/alpine: upgrade sphinx and hawkmoth to the latest versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34165>
2025-03-25 20:05:46 +00:00
forbiddenlake
70473a9ae4 docs: Fix HTML build with Sphinx 8.2
Sphinx 8.2 changed the definition of `depart_admonition`, causing build
failures when building with html-docs=enabled as mesa was only
overloading `visit_admonition`. This adds the old `depart_admonition`
definition to mesa's copy, restoring compatibility and fixing the build.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12725
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34165>
2025-03-25 20:05:46 +00:00
Leonard Göhrs
5d20a17040 ci: re-enable pengutronix farm
All the lava & baremetal farms had to be disabled due to a caching proxy
bug. A fix is proposed in mesa/mesa!34174.

The fix has been applied for the pengutronix farm, so it can be reenabled.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34185>
2025-03-25 19:38:01 +00:00
Samuel Pitoiset
4d68875acd radv: cleanup passing the aspect mask for SDMA operations
Less error prone than it used to be.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Samuel Pitoiset
e60cafa533 radv: remove useless parameter to radv_sdma_get_buf_surf()
Same aspect mask is passed through.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Samuel Pitoiset
114fbdc534 radv: fix compresed depth/stencil copies on transfer queue
HTILE is always pipe aligned.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Samuel Pitoiset
7b15e85b95 radv: fix bpe for the stencil aspect of depth/stencil copies on transfer queue
Using the bpe of depth+stencil when copying the stencil aspect only
doesn't work.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Rob Clark
75d6af03d8 freedreno/ci: Disable traces job until piglit is fixed
See https://gitlab.freedesktop.org/mesa/piglit/-/issues/113

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34182>
2025-03-25 18:41:42 +00:00
Rob Clark
916ad5d67d ci: Re enable fd-farm
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34182>
2025-03-25 18:41:42 +00:00
Martin Krastev
dea99727d3 svga/ci: update EXTERNAL_KERNEL_TAG to new kernel
Update EXTERNAL_KERNEL_TAG to new SHA. Still the same linux 6.8, just stop
consuming kernel artifacts from mesa-lava, instead start using mesa-rootfs

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34177>
2025-03-25 18:15:04 +00:00
Martin Krastev
b0a86070db svga/ci: enable vmware farm
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34177>
2025-03-25 18:15:04 +00:00
José Roberto de Souza
aec3a72525 intel/hwconfig: Remove ignored intel_hwconfigs from apply_hwconfig_item()
There is no reason to have it in the switch case.

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/34157>
2025-03-25 17:46:12 +00:00
José Roberto de Souza
512b433172 intel/hwconfig: Sync hwconfig with IGT
intel-gpu-tools have a few more entries in enum intel_hwconfig, so
adding the missing ones to Mesa.

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/34157>
2025-03-25 17:46:12 +00:00
Jose Fonseca
e3741a5731 glapi: Make _GLAPI_EXPORT a no-op on Windows.
DLL import/export annotations unneeded, now that glapi is statically
linked into libgallium_wgl.

However _mesa_glapi_get_proc_address and _mesa_glapi_get_dispatch need
to be explicitly exported for libEGL and libGLESv2.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12573
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33822>
2025-03-25 17:11:07 +00:00
Rhys Perry
80fef30531 aco/ra: fix free register counting when moving variables
info.bounds might be smaller than the bounds available for the moved
variables.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 626aa7b648 ("aco: workaround GFX9 hardware bug for D16 image instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34158>
2025-03-25 15:14:16 +00:00
Ella Stanforth
53484dc64a v3d: Fix fbfetch with discards.
We can't do earlyz_with_discard when using fbfetch as we can have TLB reads
that occur before the discard. This can result in implicit Z writes which make
the setmsf instruction emitted as a result of the discard invalid.

Fixes: 332b313547 ("v3d: enable framebuffer fetch")

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34151>
2025-03-25 14:44:16 +00:00
Eric Engestrom
ab63b92b3c ci: re-enable igalia (rpi) farm
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34174
for the fix for other lava & baremetal farms to apply too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34175>
2025-03-25 13:44:26 +00:00
Eric Engestrom
e1ed2c3e41 rpi/ci: disable traces jobs
Until piglit's trace download is fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34175>
2025-03-25 13:44:26 +00:00
Samuel Pitoiset
51009e4030 docs: update documentation for RADV_PERFTEST=video_decode,video_encode
Starting from VCN 2+ (ie. RDNA1+), video encode/decode extensions are
enabled by default if the firwmares are up-to-date.

GFX6-9 firmwares will probably never be fixed and video extensions will
remain experimental because it won't be possible to pass VKCTS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Samuel Pitoiset
d712c34a62 radv: add a helpers to know whether video decode/encode queues are enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Samuel Pitoiset
2b2423f100 radv: remove meaningless comment when resetting SQTT trace
It's just a NULL check.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Samuel Pitoiset
b1818a3ca9 radv: add a helper to know whether compute queue is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Pavel Ondračka
c39c304e32 r300/ci: update expectations
Compressed formats are still broken, this should make the CI work again
until this is fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34087>
2025-03-25 12:13:39 +00:00
Pavel Ondračka
7a2946711e r300: fix crash when creating surfaces
pipe_surface_width and pipe_surface_height helpers actually need
a pipe surface with a texture attached instead of just passing
directly the pipe_surface we get from the st.

The compressed formats are still broken unfortunatelly, so add them
to CI fails for now.

Partial fix for: 9d359c6d10

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34087>
2025-03-25 12:13:39 +00:00
Samuel Pitoiset
85983e060c radv: add more SDMA emit helpers
All SDMA_PACKET are now isolated to radv_sdma.c. It will be easier
for code sharing with RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34146>
2025-03-25 11:48:05 +00:00
Samuel Pitoiset
54060f6dba radv: use radv_sdma_emit_nop() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34146>
2025-03-25 11:48:05 +00:00
Lionel Landwerlin
25a695552a anv: disable replication when we don't have both VS/FS stages
Enabling this with shaders compiled separately through pipeline
libraries fails because we currently only enable it for VS and the
associated FS stage ends up with a non compatible VUE map.

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/34173>
2025-03-25 11:23:45 +00:00
Christian Gmeiner
722ca57619 etnaviv: Add support for KHR_partial_update
The damage region can be useful to optimize the "resolve" step that we have on
imx6q (GC2000) because there isn't any tiling compatible with both render and
scanout or an any GPU when scanning out a linear buffer since we don't support
linear PE.

This improves fps for e.g `weston-simple-egl` by factor 2 (~30 fps -> ~60 fps).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33226>
2025-03-25 10:59:58 +00:00
Christian Gmeiner
2c3e0b5ac2 etnaviv: rs: Change param etna_get_rs_alignment_mask(..)
This prepares etna_get_rs_alignment_mask(..) for the next commit.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33226>
2025-03-25 10:59:58 +00:00
Christian Gmeiner
98b9cc6d5a etnaviv: rs: Factor out box alignment function
Introduce etna_align_box_for_rs(..) that allows us to apply RS restrictions
to a pipe_box. Switch etna_transfer_map(..) to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33226>
2025-03-25 10:59:58 +00:00
Lionel Landwerlin
6b6a4cb1e2 anv: fix end of pipe timestamp query writes
Currently trying to use PIPE_CONTROL on blitter/video engines.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12833
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34095>
2025-03-25 10:35:19 +00:00
Samuel Pitoiset
29b3d9f0f4 radv: fix creating pipeline binary from the traversal shader
rt_stage_info is NULL.

Fixes: 8802612458 ("radv: advertise VK_KHR_pipeline_binary")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34141>
2025-03-25 10:10:06 +00:00
Job Noorman
84dbd34332 ir3/legalize: take wrmask into account for delay updates
When updating delays, we'd update all dst regs based on reg_elems.
However, when wrmask has gaps, this would update delays for regs that
aren't actually written. Fix this by skipping regs for which the
corresponding wrmask bit is zero.

Note that this wasn't just a performance issue but could result in
illegal code because the delay is reset to zero for tex/sfu
instructions. For example, the following (post-legalization) code was
observed in the wild:

(rpt1)add.f r1.w, (r)r2.w, (r)c3.z
sam.base0 (f32)(w)r2.x, r3.y, s#0, t#1
rcp r2.x, r2.x

Here, the add would result in a required delay for r2.x which would then
be cleared by the sam (even though it doesn't write to it), resulting in
insufficient delay before the rcp.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 61b2bd861f ("ir3: Rewrite nop insertion")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34107>
2025-03-25 09:48:37 +00:00
Job Noorman
fb6d933827 ir3/legalize: fix off-by-one error in kill_sched
kill_sched would consider blocks that start right after the current one
as starting before it due to an off-by-one error. This resulted in
unnecessary branches being inserted.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34110>
2025-03-25 09:19:23 +00:00
Eric Engestrom
8fe25223bd docs: add sha sum for 25.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34097>
2025-03-25 09:12:02 +00:00
Eric Engestrom
a6a68ac0d3 docs: add release notes for 25.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34097>
2025-03-25 09:12:02 +00:00
Eric Engestrom
2bb48af6e6 docs: update calendar for 25.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34097>
2025-03-25 09:12:02 +00:00
Eric Engestrom
e7b2eda39d pick-ui: fix parsing of multiple backport-to: lines
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
f8d07396fa pick-ui: rename s/out/commit_message/ variable to make its contents clearer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
2c9ae634ef pick-ui: add missing field in test expectation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
70665e2df7 pick-ui: fix enum value in test expectation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
9d9e0c9c1b pick-ui: clean up formatting
Makes it easier to see what's what, especially once we have to change
things in the next commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
2769e494c6 meson: do not compile libmesa_util_sse41 unless used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34123>
2025-03-25 08:32:47 +00:00
Eric Engestrom
123627ef65 meson: do not compile libblake3 unless used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34123>
2025-03-25 08:32:47 +00:00
Eric Engestrom
90a84862c6 meson: do not compile libisaspec unless used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34123>
2025-03-25 08:32:47 +00:00
Lionel Landwerlin
32d25075ae anv: relax depth/stencil<->color copy restrictions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:15 +00:00
Lionel Landwerlin
294aa72449 vulkan: add helper for color/depth-stencil capable formats
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:15 +00:00
Lionel Landwerlin
e18431273a blorp: relax depth/stencil<->color copy restriction
Currently blorp assumes that copies of depth/stencil is restricted
to/from depth/stencil formats. We want to allow color<->depth copies.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:15 +00:00
Lionel Landwerlin
fe2f173413 blorp: assert that shaders don't spill
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:14 +00:00
Lionel Landwerlin
4226c50b3f anv: avoid early lower of the fp64 code
Otherwise this will lead to scratch intrinsics for calls/returns.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:14 +00:00
Caio Oliveira
e384ccde28 brw: Expand EU validation for DPAS
Allow BFloat16 types when supported and allow destination/accumulator to
match the other source types in Gfx20+.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34035>
2025-03-25 07:38:08 +00:00
Timothy Arceri
2b2132d2ac nir: fix uniform cloning helper
glsl allows for ubos to have the same name but different bindings.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Fixes: b47b8d16d9 ("nir: expose reusable linking helpers for cloning uniform loads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12852
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34138>
2025-03-25 06:54:53 +00:00
Timothy Arceri
786b8b2d34 mesa: fix potential race condition in with Programs
The call looks up a Program and creates it if it doesn't
already exist. However we weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:52 +00:00
Timothy Arceri
4c1e4d7b49 mesa: fix potential race condition in with ATIShaders
The call looks up an ATIShader and creates it if it doesn't
already exist. However we weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
0e61d31e9d mesa: fix potential race condition in with RenderBuffers
The calls look up a renderbuffer and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
c4ee84f3b6 mesa: fix potential race conditions in with FrameBuffers
The calls look up a framebuffer and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
9bb696588d mesa: fix reuse of deleted sampler object
Deleting a sampler object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c9130 ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
95e87f6a6a mesa: fix potential race condition in with TexObjects
The calls look up a texture object and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c9130 ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
9b85142e40 mesa: fix reuse of deleted texture object
Deleting a texture object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12710
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12722
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12830
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
0f0834275d mesa: fix reuse of deleted buffer object
Deleting a buffer object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12810
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Caio Oliveira
5eb1edcf9d intel/executor: Add small example with bfloat
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
6cec413a78 brw: Add EU assembler support for bfloat16
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
e37b707bd0 brw: Consider bfloat16 in scoreboard
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
62323a934b brw: Add BRW_TYPE_BF validation
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
9916cc1050 brw: Add BRW_TYPE_BF for bfloat16
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
d1f4fb8eee brw: Make some integer check more explicit
Use the positive ("is int?") check when applicable.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
c3d2ba6973 brw: Remove prefix gfx10 from enum types
The values already use BRW, make it consistent.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
9dfff2cb14 brw: Allow generating destination with stride 2 in 3-src instructions
Will be useful for testing BFloat16 in later patches.  No change
expected to the compiler itself.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
676b874ca9 brw: Fix decoding of 3-src destination stride in EU validation
Fixes: f1036da345 ("intel/brw: Add vstride/width/hstride to brw_hw_decoded_inst")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
f78a27eb18 spirv: In SpecConstantOp handling don't adjust convert ops bit_size twice
After 8fa70cfcfd ("spirv: Use the right bit-size for spec constant
ops") the bit-size will already be adjusted based on the sources, and
this will take care of Convert operations too.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34119>
2025-03-25 04:50:09 +00:00
Caio Oliveira
5e25ef16d9 vulkan: Update XML and headers to 1.4.311
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34106>
2025-03-25 04:14:06 +00:00
Timothy Arceri
6808486c1b ci: move llvmpipe fails to flakes
Fixes: 0def5682f9 ("ci: document new llvmpipe & softpipe failures since the migration")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34171>
2025-03-25 03:48:41 +00:00
Caio Oliveira
ca72255114 spirv: Update headers and metadata from latest Khronos commit
This corresponds to 0e710677989b4326ac974fd80c5308191ed80965
("Fix json capabilities for RayTracingOpacityMicromapEXT (#498)")
in https://github.com/KhronosGroup/SPIRV-Headers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34092>
2025-03-25 02:29:26 +00:00
Caio Oliveira
89a87fab66 brw: Remove extra SHADER_OPCODE_FLOW emitted during NIR conversion
The DO() helper already emits a FLOW.

Fixes: d2c39b1779 ("intel/brw: Always have a (non-DO) block after a DO in the CFG")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33954>
2025-03-25 02:05:26 +00:00
Caio Oliveira
c01655370d brw: Add assembler support for DPAS
Allow us to parse instructions in a form we currently generate

```
dpas.8x8(8)     g55<1>F         g47<1,1,0>F     g31<1,1,0>HF    g39<1,1,0>HF { align1 WE_all 1Q $4 };
```

Regions are not really needed, but this will be handled in a later patch
(that will also stop printing the regions).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34031>
2025-03-25 01:40:02 +00:00
Yiwei Zhang
5dcb9f918d panvk: fix memory requirement query for aliased disjoint image
The spec allows to create aliased disjoint image for a specific plane of
a multi-planar image, and the format can be R8. When querying memory
requirement of such image, VkImagePlaneMemoryRequirementsInfo is not
required to be chained although it has the disjoint bit.

This change fixes to look for aspect info from plane memory info only
when that's chained. The implementation can be passive here as the spec
VU has sufficient guarantees for the validity around. See below VU for
details:
- VUID-VkImageMemoryRequirementsInfo2-image-01589
- VUID-VkImageMemoryRequirementsInfo2-image-01590
- VUID-VkImageMemoryRequirementsInfo2-image-02279
- VUID-VkImageMemoryRequirementsInfo2-image-02280

Meanwhile, the existing disjoint check for size info is kept as is for
the special handling of VK_FORMAT_D32_SFLOAT_S8_UINT.

Test: dEQP-VK.ycbcr.plane_view.memory_alias.* pass with venus-on-panvk

Fixes: 412c286331 ("panvk: Enable multiplane images and image views")
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34134>
2025-03-25 00:20:54 +00:00
Aaron Ruby
121d163b21 gfxstream: Move virtgpu_gfxstream_protocols.h to the common location for
house protocols

- Remove some duplicate definitions  (replaced with virgl_hw.h include,
which is also represented in gfxstream host code)
- Also removed the capset_ids from virtgpu_gfxstream_protocol.h. They
aren't needed to build guest-side driver, and are planned to be merged
to virtgpu_drm.h

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34116>
2025-03-24 23:25:10 +00:00
Yiwei Zhang
98a5acf352 panvk/csf: rework cache flush reduction
Per Vulkan spec 7.9. Host Write Ordering Guarantees, queue submission
commands automatically perform a domain operation from host to device
for all writes performed before the command executes. That is to say,
host updates to the mappings can occur after the end of the command
recording and must be flushed implicitly at submission boundary.

Before this change, necessary cache flushes could be missed once the
app starts reusing pre-recorded command buffers. e.g. a simple buffer
copy cmd while the app only updates the source buffer mapping in
different submissions. This changes backs out most of the current
version of cache flush reduction while still assigning LATEST_FLUSH_ID
to at least the final batch itself. This aligns with panfrost_batch
submit behavior on the gallium side.

Test: dEQP-VK.synchronization*.timeline_semaphore.* pass w/o flakiness
      via venus-on-panvk

Fixes: 28e4d22497 ("panvk/csf: Pass a non-zero flush-id to benefit from cache flush reduction")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34093>
2025-03-24 22:21:06 +00:00
Yiwei Zhang
488b2d4d25 virgl/venus/vtest: align capset and protocol with virglrenderer
Virgl and venus capsets along with vtest protocol v3 are all stable now.
This change is to align with:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1311

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
25556de759 venus: enable VK_EXT_debug_utils
After adopting common command buffers, venus can safely enable the
extension leveraging the common implementation.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
63cac09d74 venus: improve image memory requirement cache for image aliasing
We can strip the alias bit as the memory requirements are identical
between the bound image and the aliased image per spec.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
adcb967c5c venus: fix maint4 multi-planar memory requirements
Fixes: ce1bbd241e ("venus: extend image cache to vkGetDeviceImageMemoryRequirements")
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
ea6dc035d8 venus: fix ahb usage caching
Test: dEQP-VK.api.external.memory.android_hardware_buffer.*

Fixes: fde5cebec5 ("venus: fix image format cache miss with AHB usage query")
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
8b2703fe08 venus: fix unexpected ring alive status expire upon owner thread switch
If the last owner thread has just unset the alive status and released
the watchdog, the new owner thread could have acquired to abort
unexpectedly if the ownership transfer occurs right before the next
owner's warn order. So we must set watchdog alive for new owner so that
it can properly check ring alive status in the next warn order.

Cc: mesa-stable
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Aaron Ruby
3fb07c5412 gfxstream: No VIRGL_BIND_LINEAR for ColorBuffers
This was added as a temporary measure when the imageDrmFmtMod emulation
was not yet implemented. Accompanies the host-side change:
https://android-review.googlesource.com/c/platform/hardware/google/gfxstream/+/3558263

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34160>
2025-03-24 21:29:03 +00:00
Eric Engestrom
09778670b4 ci: disable llvmpipe & virgl traces jobs
Until piglit's traces download is fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
6cd7b65ac0 ci: run shader-db & zink-lvp on kvm runners
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
0def5682f9 ci: document new llvmpipe & softpipe failures since the migration
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Valentine Burley
a36379d973 ci: Add missing kvm runner tags
A recent change now requires the kvm runner tag to be explicitly listed
for jobs that need to run on runners with KVM capability.
This ensures the jobs are scheduled on compatible runners.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
89ab8a259c ci: drop placeholder-job tags to allow jobs to run
That tag was supposed to allow these jobs to run faster, but these
runners are currently having disk issues, and the normal runners look
like they're plenty fast enough (at least right now since almost nobody
runs ci jobs ^^).

We might revert this later, but for now let's merge this to unblock CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
e38724bd1c ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
7178425ccf ci: replace broken s3cp command with a simple curl call
The current `s3cp` implementation does not work anymore after the
migration, and instead of fixing it and propagating the fix down to us,
it's simpler to directly use `curl`.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
39d68d12f3 ci: do a regular GET request for /done files, instead of HEAD
The s3 proxy bug that required this commit was fixed [1], but since
these /done files are empty, there's no benefit to using HEAD requests.

[1]: 5acad8b02c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
0a2650b08b ci/baremetal: make sure we can follow redirects on s3 downloads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
d425847793 ci: always abort if the curl download fails
Reported-by: @Valentine
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
213550d2e0 ci/piglit: drop usage of s3cp for a simple download
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
6ee58c19e5 ci/build: no need to list all the files that will go into the uploaded artifact
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
a47b2e3ad7 ci/init-stage2: document that only lava jobs upload results to s3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
3b72dca145 ci/container: fix image tags comment in trampoline script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Yiwei Zhang
d2a7c1c452 docs: demote VK_KHR_shader_relaxed_extended_instruction
It's not part of core 1.3.

Fixes: 8b272c8d8c ("docs: update feature matrix for VK_KHR_shader_relaxed_extended_instruction")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34104>
2025-03-24 20:34:58 +00:00
Eric Engestrom
3c0e0c3d04 ci: document http proxy bug & disable farms relying on it
All the lava & baremetal farms have to be disabled because of this bug,
and until a fix is found and deployed to each of these farms.
2025-03-24 19:54:25 +01:00
Yiwei Zhang
5b11c3ff0a venus: use common cmd pool_link
We only implement the destroy func to leverage the existing link, and we
only give vk_command_buffer the ops but not the pool.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
4c0635ee04 venus: use vk_command_buffer internals
Use common tracking of cmd pool, cmd level and cmd state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
0a324d37da venus: use common vk_command_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
7a3c18fa8e venus: use vk_command_pool internals
No longer need to track allocator, device or queue family.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
58b0d2e234 venus: use common vk_command_pool
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
84b33aa6e1 venus: explicitly get vn_device from vk_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
dfcad90240 venus: rename common vk object base member to vk
This way we avoid the confusing base.base or even base.base.base when
venus uses common objects. This also aligns with the naming of the other
drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:58 +00:00
Eric R. Smith
2ee3bef252 panfrost: consider xfb shader when calculating thread local storage size
Register spilling can cause us to require thread local storage (tls).
However, we were not adjusting the tls stack size space to account for
the tls needed for the extra xfb shader when transform feedback is
needed. We noticed this when testing register allocation in the
OpenGL CTS (for testing we had forced spilling where none happened
before).

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33935>
2025-03-15 15:04:25 +00:00
Lucas Stach
ed72d97d48 etnaviv/ci: remove fragcoord related fails on GC7000
Both GC7000 GPUs have the RA_WRITES_DEPTH feature, which needs a bit
more prodding to have valid fragcoord.zw components present in the
shader. This has been fixed by the previous commit, so we can remove
the related fails from the CI expectation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34081>
2025-03-15 10:56:21 +00:00
Lucas Stach
030af65603 etnaviv: enable forwarding ZW fragcoord components from RA to SH
On GPUs with the RA_WRITE_DEPTH feature, passing Z and/or W values
to SH can be gated. It doesn't have any impact on performance, so
maybe it's just to be able to free those register slots for other,
currently unknown, values. For now simply enable passing both Z and
W to SH unconditionally to make those GPUs behave like the ones
without the RA_WRITE_DEPTH feature.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34081>
2025-03-15 10:56:21 +00:00
Lucas Stach
b5c9748082 etnaviv: Update headers from rnndb
Update to rnndb commit 51dbdbd9b83a
("rnndb: document RA depth W forwarding gate").

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34081>
2025-03-15 10:56:21 +00:00
Bas Nieuwenhuizen
61feea6954 radv: Move support check out of winsys.
To get the right error code. Mostly shouldn't be winsys dependent
anyway, outside of the idea that if we explicitly emulate a device
we should just assume th euser knows what they're doing.

Fixes: c942d957b0 ("radv: fail to initialize when the AMD GPU generation is unsupported")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12792
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33964>
2025-03-14 23:18:13 +00:00
Lionel Landwerlin
5ba7e00d9f anv: Set limit_trig_input_range option for Company of Heroes 3
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12769
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34078>
2025-03-14 22:40:23 +00:00
Connor Abbott
cc09d5443b ir3: Use needs_full_helper_invocations
require_full_quads is incorrect because it isn't actually enabled by
quad operations. Use the newly-introduced needs_quad_helper_invocations
instead.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: 264d8a6766 ("ir3: Set need_full_quad depending on info.fs.require_full_quads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:58 +00:00
Connor Abbott
1621080df7 compiler,nir: Gather needs_full_quad_helper_invocations info
This is needed on Qualcomm, where there are separate fields to enable
just 3 fragments and all 4 fragments.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: 264d8a6766 ("ir3: Set need_full_quad depending on info.fs.require_full_quads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:58 +00:00
Connor Abbott
7a55e13939 nir, compiler: Rename needs_quad_helper_invocations
This currently treats coarse and fine derivatives the same, but Qualcomm
needs to know whether just coarse derivatives are used or fine
derivatives/quad ops are also used. Rename this to
needs_coarse_quad_helper_invocations make clear the difference from the
new field, needs_full_quad_helper_invocations.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Fixes: 264d8a6766 ("ir3: Set need_full_quad depending on info.fs.require_full_quads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:57 +00:00
Connor Abbott
640a5e28fd compiler/shader_info: Better document require_full_quads
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:57 +00:00
Connor Abbott
f244d54953 tu: Expose VK_KHR_maintenance8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
824cc0e933 ir3: Remove ir3_info::data
This isn't useful, and it was getting serialized resulting in garbage in
the blob and tests that check for consistent serialization failing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
9baf5aee1a tu: Handle a pipelineStageCreationFeedbackCount of 0
The spec says this is allowed to be 0.

Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
c3dc4540b5 tu: Handle R8->D24S8 and D24S8->R8 copies
This is now allowed in VK_KHR_maintenance8. Copies that reinterpret
D24S8 as any 32-bit format are also allowed, but they should already
work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
767818d8d9 tu: Handle D32S8 -> R32 and R32 -> D32S8 copies
When we copy the depth aspect of a D32S8 image to or from a R32
image, we don't need to split the copy or modify the aspect mask. Limit
this path to "true" D32S8->D32S8 copies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
12961c2c80 tu: Plumb through VkMemoryBarrierAccessFlags3KHR
We don't use the additional access flags for anything yet, but pass them
through to vk2tu_access in case we will need to for a future extension.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
3800f4c199 tu: Implement VK_KHR_maintenance7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:04 +00:00
Alyssa Rosenzweig
8b39b75308 ail: drop fake modifiers
this just existed so upstream could build.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34075>
2025-03-14 20:51:36 +00:00
Alyssa Rosenzweig
ba8eeaee8c drm-uapi: update drm_fourcc.h
adds Apple modifiers from drm-misc-next:
https://cgit.freedesktop.org/drm-misc/commit/?id=c8619f5402cbcccfe58151b53421029852473e4c

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34075>
2025-03-14 20:51:36 +00:00
Pavel Ondračka
1b63ffc31e r300: remove support for tgsi_texcoord
We no longer need finalize_nir and thus we don't need to support
texcoord as well. This is a nice rs state cleanup.

This effectivelly reverts commits
0ac6801970 and
d4b8e8a481. Also import the previous
location fixup from the state tracker, which was removed when the
unconditional nir_opt_varying pass was introduced.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33961>
2025-03-14 20:23:01 +00:00
Pavel Ondračka
20b51133f3 r300: remove finalize_nir
This was added so we could report compile failures. Since we can
now just do that simply from create_vs/fs_state there is no need
for finalize_nir anymore.

Move the optimization loop to the beginning of create_vs/fs_state.
This could be probably optimized a bit more, but right now there
should be no functional change, we can improve the pass order later.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33961>
2025-03-14 20:23:00 +00:00
Ganesh Belgur Ramachandra
ba80a11b69 amd: use 128B compression for scanout images when drm.minor <63
Fixes: 8328e575 ("ac/surface/gfx12: enable DCC 256B compressed blocks and reorder modifiers")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33702>
2025-03-14 19:07:09 +00:00
Yiwei Zhang
04e9431f4f vulkan: update ALLOWED_ANDROID_VERSION for api level 35
Reviewed-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34030>
2025-03-14 18:39:07 +00:00
Yiwei Zhang
a0ea025314 vulkan: update ALLOWED_ANDROID_VERSION for api level 34
Reviewed-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34030>
2025-03-14 18:39:07 +00:00
Mike Blumenkrantz
f5c66e2d4a zink: fix refcounting of zink_surface objects
this was previously a no-op because the pointers were identical,
leading to an extra unref in check_framebuffer_surface_mutable()

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34077>
2025-03-14 18:12:20 +00:00
Mike Blumenkrantz
9d359c6d10 gallium: delete pipe_surface::width and pipe_surface::height
these fields are misleading and should always be replaced by either:
* the framebuffer width/height
* explicit function params to specify width/height

Co-authored-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33946>
2025-03-14 17:37:32 +00:00
Connor Abbott
e06cfa3e08 freedreno: Misc control registers updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34059>
2025-03-14 16:52:06 +00:00
Connor Abbott
be8a2a0aad freedreno/crashdec: Dump CP_BV_SQE_UCODE_DBG
This has the same format as CP_SQE_UCODE_DBG but for BV.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34059>
2025-03-14 16:52:06 +00:00
Connor Abbott
9d62adc0ac freedreno/crashdec: Fix and extend control reg dumping on a750
Handle the rearrangement of control registers, and dump a new section
with the rest of the control registers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34059>
2025-03-14 16:52:06 +00:00
Connor Abbott
92ceff4dce freedreno/crashdec: Handle hangs where the SQE is in RB
This is by far the most common cause of missing an "ESTIMATED HANG
LOCATION" - the SQE is processing kernel commands, even if the rest of
the GPU isn't.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34063>
2025-03-14 16:30:59 +00:00
Connor Abbott
4667ec043b freedreno/crashdec: Use register for RB rptr
The register is usually a few dwords ahead of the memory value used by
the kernel, which can lead to an inaccurate calculation of where the SQE
is.

To compensate for the more accurate rptr, increase the lookback
slightly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34063>
2025-03-14 16:30:59 +00:00
Connor Abbott
0709e87c94 freedreno/decode: Push hostaddr->gpuaddr conversion into highlight_gpuaddr()
For RB, it's not convenient to use a gpuaddr because of how the GPU
addresses wrap around. Instead pass the host address to the renamed
highlight_addr(), so that we can use it directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34063>
2025-03-14 16:30:59 +00:00
Karol Herbst
6181f52089 vtn: Support the UniformDecoration capability.
This is needed for SPIR-V 1.6 support in OpenCL. This capability enables
the Uniform and UniformId decorations which prior were Shader only.

The CTS ends up using those decorations on function arguments, but we can
just ignore handling them there for now.

Fixes the spirv16_uniformdecoration_uniform and
spirv16_uniformdecoration_uniformid CL CTS test inside test_spirv_new.

Fixes: bb6d371c0e ("rusticl: support SPIR-V 1.5 and 1.6")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34004>
2025-03-14 15:42:24 +00:00
Karol Herbst
3a9954c117 nir/serialize: fix decoding of is_return and is_uniform
Fixes: 3321a56d1d ("nir: Serialize all parameter attributes")
Fixes: 26cbb6b933 ("nir: Add parameter divergence info")

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34052>
2025-03-14 15:01:32 +00:00
Mike Blumenkrantz
c00701c83a egl/x11: unify swrast/kopper/dri3 paths a bit
most of this was duplicated, but there were a couple hard conditionals
that made it less obvious

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
0bb1c5e24b egl/x11: consolidate LIBGL_DRI3_DISABLE use on init
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
4e405af61c egl: delete dri2_egl_driver_fail
before refactoring egl init was more complex, but things are simpler
now and with recent hoisting this can all go away

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
b12a929bbe egl/x11: hoist and document dri3_x11_connect() during init
this was split in the dri3 and swrast paths, which made it somewhat
confusing how/when it could be called and what the intended results
might be

moving it up here enables further simplifications

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
1bc3d4a26a egl/x11: hoist up swrast/zink driver_name setting
this will allow streamlining some code in followup commits

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
cfae30147e egl/x11: simplify a kopper check on init
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
eca51b7978 egl/x11: hoist up dri2_get_xcb_connection call
but not out of dri2 init since that's a new display

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
cea4c94d17 egl: move kopper detection to display creation
this will simplify some checks later

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
323bad6b18 egl/x11: split out dri2 init entirely
this will enable simplifying the remaining codepaths with the expectation
that dri2 will be ripped out entirely after the next release

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
5466ff3a43 egl: hoist dri2 display creation up a level
this is always created for dri2 devices, and it can now be
consolidated in one place instead of duplicated all over

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
c4c07136e6 egl: move _EGLDisplay DriverData association into dri2_display_create
this was duplicated all over

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:39 +00:00
Mike Blumenkrantz
5bcb09d9e7 egl: delete invalidate_available flag
this is unused

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:39 +00:00
Mike Blumenkrantz
8327bca4b1 egl/x11: always expose EXT_swap_buffers_with_damage
this is universally supported now

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:39 +00:00
Georg Lehmann
d1dca26941 aco/ra: disallow vcc definitions for pseudo scalar trans instrs
Foz-DB GFX1201:
Totals from 30 (0.04% of 79600) affected shaders:
Instrs: 58843 -> 58820 (-0.04%); split: -0.10%, +0.06%
CodeSize: 302228 -> 301944 (-0.09%); split: -0.13%, +0.04%
Latency: 204566 -> 204432 (-0.07%); split: -0.09%, +0.02%
InvThroughput: 136918 -> 136919 (+0.00%); split: -0.00%, +0.00%
SClause: 1241 -> 1249 (+0.64%); split: -0.56%, +1.21%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34006>
2025-03-14 13:53:55 +00:00
Georg Lehmann
b386659588 nir/opt_algebraic: create ubfe from (a & mask) >> c
Foz-DB Navi21:
Totals from 917 (1.16% of 79188) affected shaders:
Instrs: 2549482 -> 2544997 (-0.18%); split: -0.18%, +0.00%
CodeSize: 13781648 -> 13763616 (-0.13%); split: -0.13%, +0.00%
Latency: 24832087 -> 24825199 (-0.03%); split: -0.04%, +0.01%
InvThroughput: 5921339 -> 5914799 (-0.11%); split: -0.12%, +0.01%
VClause: 59910 -> 59898 (-0.02%); split: -0.02%, +0.00%
SClause: 62294 -> 62293 (-0.00%)
Copies: 221015 -> 220988 (-0.01%); split: -0.02%, +0.01%
VALU: 1717280 -> 1713332 (-0.23%); split: -0.23%, +0.00%
SALU: 359390 -> 358910 (-0.13%)
VMEM: 101966 -> 101924 (-0.04%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33455>
2025-03-14 11:15:04 +00:00
Samuel Pitoiset
b2a2d197f9 radv: track redundant register writes for PA_SC_HISZ_CONTROL on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34070>
2025-03-14 09:46:58 +00:00
Samuel Pitoiset
1e4cfd9dfa radv: emit a dummy PS state for noop FS on GFX12
It seems the hardware requires a dummy PS state with a noop FS,
otherwise it might just hang. This used to work just fine on older
gens.

Note that RadeonSI refuses to draw if VS or PS is missing and AMDVLK
seems to also always emit this state. So, this might be a bug that AMD
didn't encounter at all.

This fixes a GPU hang during loading with Ghostwire: Tokyo.

Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34070>
2025-03-14 09:46:58 +00:00
Lucas Stach
4608eef0a0 etnaviv: fix ETNA_MESA_DEBUG=no_early_z
This feature bit has inverted polarity from most other feature bits:
if the bit is present the driver should not use early Z. So the bit
must be set when the debug option to disable early Z is enabled.

Fixes: d600b45ccc ("etnaviv: Switch to etna_core APIs")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34064>
2025-03-14 09:08:24 +00:00
Samuel Pitoiset
2a07237b6b radv: enable RGP on GFX12
This should be working now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
3bf2f95a91 ac/sqtt: fix registers programming for GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
13836575e3 ac/rgp: bump instrumentation API version to 1.5
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
6b28cd8e0e ac/rgp: bump version to 1.6
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
0d68ede145 ac/rgp: add GFX12 definitions
Based on PAL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
f99e065e96 ac/rgp: few fixes for GFX11.5
Based on PAL.

Cc mesa-stable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
79c84e4b9c radv/ci: enable RADV_PERFTEST=video_decode,video_encode on TAHITI,HAWAII and POLARIS10
It's been super stable after 25 runs each in a row.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34069>
2025-03-14 08:12:24 +01:00
Yiwei Zhang
a7ba1291d2 panvk: fix dependency for EXT_display_control
VK_EXT_display_control requires VK_EXT_display_surface_counter, which we
can expose here.

Fixes: f6112a26c5 ("panvk: expose EXT_display_control")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34036>
2025-03-13 16:45:47 -07:00
Yiwei Zhang
305925c439 panvk: disable VK_KHR_shader_quad_control
VK_KHR_shader_quad_control requires VK_KHR_vulkan_memory_model or 1.2,
and neither is there yet.

Fixes: 0c40b1653d ("panvk: Enable VK_KHR_shader_quad_control for v10+")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34036>
2025-03-13 16:44:58 -07:00
Mike Blumenkrantz
773f84ccc9 meson: add i915 to 'all' build for gallium-drivers
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34046>
2025-03-13 22:12:56 +00:00
Mike Blumenkrantz
08450138c2 gallium: delete u_cache
unused

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
H*ck-yes-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34048>
2025-03-13 21:36:23 +00:00
Mike Blumenkrantz
33a98544ec util/tests: move u_half_test into half_float_test
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
H*ck-yes-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34048>
2025-03-13 21:36:23 +00:00
Mike Blumenkrantz
185a3f9105 gallium: delete tests
we have CI now

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
H*ck-yes-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34048>
2025-03-13 21:36:22 +00:00
Patrick Lerda
186fb5e73a r600: update the software fp64 support
This change began by fixing an old regression related to the dceil
functionality. This issue affected palm. Now, this change adjusts
the software fp64 support to make it fully operational.

This change was tested on palm and barts. This change fixes 561
"piglit run all" tests. The khr_gl tests are fixed as well (243 tests).
Here is a summary:
spec/arb_gpu_shader_fp64/execution/built-in-functions/*
spec/arb_gpu_shader_fp64/execution/fs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/execution/vs-isnan-dvec: fail pass
spec/glsl-4.00/execution/built-in-functions/*
spec/glsl-4.10/execution/conversion/*
khr-gl4[3-5]/compute_shader/fp64-case1: fail pass
khr-gl4[0-5]/gpu_shader_fp64/builtin/*

Fixes: aed6a39c10 ("glsl: Retire dround lowering.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33708>
2025-03-13 21:10:39 +00:00
Antonino Maniscalco
0ff322d1d9 freedreno/crashdec: Add check for CP_BV_SQE_STAT_ADDR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34057>
2025-03-13 20:48:47 +00:00
Antonino Maniscalco
ed64e62229 freedreno/crashdec: Avoid crashing on some traces
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34057>
2025-03-13 20:48:47 +00:00
Matt Turner
a6c717d006 anv: Remove ignored qualifier
Reported by clang's `-Wignored-qualifiers`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
5a76ce6a6e intel/isl: Remove ignored qualifier
Reported by clang's `-Wignored-qualifiers`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
53be1a5e5f iris: Remove ignored qualifier
Reported by clang's `-Wignored-qualifiers`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
ed42dc56f5 intel/compiler: Use correct enum type
Fixes: ce7208c3ee ("brw: add support for texel address lowering")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
d5dcc6a5c4 intel/compiler: Add missing breaks
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
e5af71478a intel/decoder: Remove assert(!"...") in recoverable condition
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
f160787038 hasvk: Use unreachable instead of assert(!"...")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
d4a2ed8970 anv: Use unreachable instead of assert(!"...")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
72066928bf intel/isl: Use unreachable instead of assert(!"...")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
0a63d629fe intel/compiler: Use unreachable instead of assert(!"...")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
8d6deb4073 glsl: Add missing break
Reported by clang's `-Wimplicit-fallthrough`.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
4953d2a014 glsl: Use FALLTHROUGH
Reported by clang's `-Wimplicit-fallthrough`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
1ab5b4f7db intel/compiler: Use FALLTHROUGH
Reported by clang's `-Wimplicit-fallthrough`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
b05c26f54b iris: Initialize pointer with NULL, not false
Reported by clang's `-Wbool-conversion`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
7534559f2f nir: Return NULL, not false, from functions returning pointers
Reported by clang's `-Wbool-conversion`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
702f554aae gallium: Return NULL, not false, from functions returning pointers
Reported by clang's `-Wbool-conversion`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Adam Jackson
e06b834dfa loader: Stop looking in ${libdir}/tls/
We don't install there, haven't in a long time.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34058>
2025-03-13 19:45:45 +00:00
Connor Abbott
81f73c89de ir3: Fix const allocation when parsing assembly
This fixes computerator.

Fixes: 68ab25e6d4 ("ir3: split immediate state from rest of const state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34055>
2025-03-13 19:15:46 +00:00
Mike Blumenkrantz
4707e9c8b9 aux/trace: set sampler_view_release pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34045>
2025-03-13 18:31:42 +00:00
Mike Blumenkrantz
7e60e1bbec mesa: remove st_sampler_view::private_refcount
no longer used

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34045>
2025-03-13 18:31:42 +00:00
Mike Blumenkrantz
5ad5f1a93c gallium: make pipe_sampler_view::reference non-atomic
this object is per-context with refcounting performed exclusively in-driver,
so there is no longer a danger of false sharing

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34045>
2025-03-13 18:31:41 +00:00
Caio Oliveira
91feef40db brw: Simplify the test code for brw passes
The key change is to use a builder to write the expected shader result
and compare that.  To make this less error prone, a few helper functions
were added

- a way to allocate VGRFs from both shaders in parallel, that way the
  same brw_reg can be used in both of them;
- assertions that a pass will make progress or not, and proper output
  when the unexpected happens;
- use a common brw_shader_pass_test class so to collect some of the helpers;
- make some helpers work directly with builder.

The idea is to improve the signal in tests, so that the disasm comments
are not necessary anymore.  For example

```
TEST_F(saturate_propagation_test, basic)
{
   brw_reg dst1 = bld.vgrf(BRW_TYPE_F);
   brw_reg src0 = bld.vgrf(BRW_TYPE_F);
   brw_reg src1 = bld.vgrf(BRW_TYPE_F);
   brw_reg dst0 = bld.ADD(src0, src1);
   set_saturate(true, bld.MOV(dst1, dst0));

   /* = Before =
    *
    * 0: add(16)       dst0  src0  src1
    * 1: mov.sat(16)   dst1  dst0
    *
    * = After =
    * 0: add.sat(16)   dst0  src0  src1
    * 1: mov(16)       dst1  dst0
    */

   brw_calculate_cfg(*v);
   bblock_t *block0 = v->cfg->blocks[0];

   EXPECT_EQ(0, block0->start_ip);
   EXPECT_EQ(1, block0->end_ip);

   EXPECT_TRUE(saturate_propagation(v));
   EXPECT_EQ(0, block0->start_ip);
   EXPECT_EQ(1, block0->end_ip);
   EXPECT_EQ(BRW_OPCODE_ADD, instruction(block0, 0)->opcode);
   EXPECT_TRUE(instruction(block0, 0)->saturate);
   EXPECT_EQ(BRW_OPCODE_MOV, instruction(block0, 1)->opcode);
   EXPECT_FALSE(instruction(block0, 1)->saturate);
}
```

becomes

```
TEST_F(saturate_propagation_test, basic)
{
   brw_builder bld = make_shader(MESA_SHADER_FRAGMENT, 16);
   brw_builder exp = make_shader(MESA_SHADER_FRAGMENT, 16);

   brw_reg dst0 = vgrf(bld, exp, BRW_TYPE_F);
   brw_reg dst1 = vgrf(bld, exp, BRW_TYPE_F);
   brw_reg src0 = vgrf(bld, exp, BRW_TYPE_F);
   brw_reg src1 = vgrf(bld, exp, BRW_TYPE_F);

   bld.ADD(dst0, src0, src1);
   bld.MOV(dst1, dst0)->saturate = true;

   EXPECT_PROGRESS(brw_opt_saturate_propagation, bld);

   exp.ADD(dst0, src0, src1)->saturate = true;
   exp.MOV(dst1, dst0);

   EXPECT_SHADERS_MATCH(bld, exp);
}
```

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33936>
2025-03-13 17:43:17 +00:00
David Rosca
bdfb478be1 radeonsi/video: Only allow 64K_S swizzle mode for VCN < 2.2
Fixes: 7f7206f1a9 ("radeonsi/video: Allocate video buffers with modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12766
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34007>
2025-03-13 17:16:18 +00:00
Seán de Búrca
4fc4f3425a rusticl: add debug assertions to avoid truncating casts
v2: reorder commits for cherry-picking

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
474d8b6316 rusticl: mark CheckedPtr::write_checked as unsafe
While nullity of the CheckedPtr object is checked, writing to a raw
pointer safely requires that several other invariants be satisfied, so
it should be marked as unsafe to reflect that.

v2: reorder commits for cherry-picking and remove alignment check

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
1164d39c38 rusticl: rename CheckedPtr::copy_checked to match primitive method
v2: reorder commits for cherry-picking and remove alignment check

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
aa9109f0b5 rusticl/mem: use cl_slice::from_raw_parts in place of std::slice
The cl_slice version of this function checks several invariants for us,
providing a slight safety net.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
5e365f1674 rusticl/mem: don't create svm_pointers slice from null raw pointer
std::slice::from_raw_parts requires that the slice pointer be non-null,
even when the slice contains zero elements. Failing this invariant is
undefined behavior.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
faad7a8aad rusticl/mem: don't write more supported image formats than requested
clGetSupportedImageFormats will write as many supported formats as are
discovered at present, regardless of the value of num_image_formats.
This could result in writing out-of-bounds memory.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Lucas Stach
25338cb295 etnaviv/ci: remove dEQP-GLES2.functional.polygon_offset.default_enable fail
This test already passed when executed standalone, but hit a issue triggered
by switching between fast and slow ZS clears when executed together with other
dEQP tests. This issue has been fixed by the previous commit, so we can drop
the fail from the CI expectation now.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34029>
2025-03-13 16:33:36 +00:00
Lucas Stach
fb0f9e6352 etnaviv: rs: fix slow/fast clear transitions
When a slow/fast/slow clear sequence is executed on a surface, the second
slow clear will not regenerate the clear command if the clear value of the
fast clear is the same as the one used for the second slow clear, as the
current stored surface clear value is the same as the new clear value.
The command generated on the first slow clear however may have used a
different clear value, which is now submitted unchanged to the hardware on
the second slow clear.

Fix this by only generating the clear command if there is no valid one
already. If we already have a valid clear command simply update the fill
value in that command with the new clear value. This has some marginal
overhead, but has been chosen over the alternative of adding more state by
remembering the last slow clear value.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34029>
2025-03-13 16:33:36 +00:00
Lionel Landwerlin
35df3925ca brw: ensure VUE header writes in HS/DS/GS stages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12820
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34041>
2025-03-13 16:06:01 +00:00
Lionel Landwerlin
c60180ba63 brw: fix spilling for Xe2+
The problem occurs with a series of instructions build the subgroup
invocation value :

mov(8)          g23<1>UW        0x76543210V
add(8)          g23.8<1>UW      g23<8,8,1>UW    0x0008UW
add(16)         g23.16<1>UW     g23<16,16,1>UW  0x0010UW

Our register spilling code operates on physical registers (64B on
Xe2+) and using the brw_inst::is_partial_write() helper only considers
32B registers. So the spiller doesn't see that the add(16) instruction
is doing a partial write and ends up discarding the previous value.

You can reproduce the issue by running a test like :

INTEL_DEBUG=spill_fs ./deqp-vk -n dEQP-VK.compute.pipeline.cooperative_matrix.khr_a.subgroupscope.constant.uint8_uint8.buffer.rowmajor.linear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: aa494cbacf ("brw: align spilling offsets to physical register sizes")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33642>
2025-03-13 15:29:22 +00:00
Lionel Landwerlin
602843a881 vulkan/runtime: rely on vk_buffer::device_address
With all the RT-enabled driver setting this field, we can now have the
runtime use it instead of calling into the driver's vfunc.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34026>
2025-03-13 14:44:06 +00:00
Lionel Landwerlin
cbb0211c1e lavapipe: fill buffer address
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34026>
2025-03-13 14:44:06 +00:00
Patrick Lerda
085cfc98cc r600: fix cayman main non-deterministic behavior problem
Cayman has a non-deterministic behavior issue which is
visible with the test below (arb_shader_image_size).
The tests fail randomly at the "fragment" test category.
Anyway, if the "compute" category is removed, the same
tests are working flawlessly.

The "compute" part of the driver was interfering with the
graphic pipeline. The culprit is the packet PKT3_DEALLOC_STATE
which puts the gpu in an incorrect state to perform some
graphic operations.

This change fixes this problem by issuing a PKT3_CLEAR_STATE
packet just after the PKT3_SURFACE_SYNC packet. As explained
by d51dbe048a PKT3_DEALLOC_STATE is mandatory on cayman to
avoid a gpu hang at the PKT3_SURFACE_SYNC stage.

This correction makes tests like
"spec@glsl-4.30@execution@built-in-functions@cs-.*" to pass
in an utterly deterministic way without random failures.
This change removes around 500 random failures for a
"piglit run all".

For instance, this issue is triggered on cayman with
"piglit/bin/arb_shader_image_size-builtin -auto -fbo".

Fixes: d51dbe048a ("r600g/compute: Emit DEALLOC_STATE on cayman after dispatching a compute shader.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33973>
2025-03-13 14:20:43 +00:00
David Rosca
6f35d3768d gallium/vl: Return YUV plane order for single plane formats
The order only matters for multi plane formats, but we still need to
return valid value for single plane formats.

Fixes crash reported here: https://github.com/mpv-player/mpv/issues/15992

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33938>
2025-03-13 13:46:36 +00:00
Yiwei Zhang
b346d8acfc venus: support VK_EXT_image_sliced_view_of_3d
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
638341d709 venus: support VK_EXT_pipeline_library_group_handles
This completes the entire series of ray tracing support.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
5894f35c9c venus: sync latest protocol for 2 more extensions
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
79027caf6f venus: support VK_EXT_debug_report
We use common impl here. Supporting debug utils would require lots of
interceptions in venus, so we'd not go that far but would only expose
debug report. Better than nothing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
cebb8e8c95 venus: back out display control
Venus can only enable VK_EXT_display_control after using common vk_sync,
unless we add new layered implementation in common. Like how I replaced
the common android present impl, but no bandwidth at this point.

Fixes: 89ec6c4d8f ("venus: add a few more trivial extensions")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
f1e7fdc2ef venus: properly enable display platform extensions
Fixes: 673a95e5b4 ("venus: align on wsi frontends support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Eric Engestrom
466387ce36 zink+radv/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
d791332858 zink+radv/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
ad601a67d3 radv/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
6f3e83d645 zink+nvk/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
d319aa10a3 zink+nvk/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
e9e34fa7b2 zink+nvk/ci: document new failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
a1f72544c8 nvk/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
a33f6910b7 nvk/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
8bf17d122b freedreno/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
ba097261e9 freedreno/ci: document fixed test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
ad742146c4 lvp/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
025c83ae28 lvp/ci: remove duplicate flakes (noticed after sorting)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
9da78f0778 lvp/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
96b79ec4c3 lvp/ci: skip tests that are timing out (>1 min)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
d2bd6b1b9d lvp/ci: document fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
a0b457aca6 meson: announce that clover is deprecated (slated for removal)
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385;
the timeline is not 100% decided yet, but let's warn users already.

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34021>
2025-03-13 12:20:45 +00:00
Samuel Pitoiset
f46830912e aco: do not apply OMOD/CLAMP for pseudo scalar trans instrs
This optimization seems broken because eg. v_s_log_f32 uses SGPRs
for both the source and destination but applying OMOD seems to require
VGPRs.

This fixes a GPU hang when launching Enshrouded on GFX1201.

No fossils db changes on GFX1201.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34027>
2025-03-13 11:22:10 +00:00
Caio Oliveira
ce71f2badd brw: Move defs analysis back to its place in saturate propagation
The premise of the change was wrong: the case where the defs analysis
was required was rare and requiring the analysis inside just the
case we care was being used for another analysis too.  So for now,
the change doesn't really helps.  I'll revisit this whole pass later on.

This backs out commit 6e19215810.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34039>
2025-03-13 10:59:30 +00:00
Valentine Burley
6a7f174fb3 ci/deqp: Delete more uncompressed caselist files
Remove the mustpass caselist files from the assets folder as well,
reducing the x86_64_test-android container size by 130 MB.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34025>
2025-03-13 10:02:12 +00:00
Samuel Pitoiset
e519e0b9e6 radv: update conformance version
A lot of people (including me) misinterpreted the conformanceVersion
field for so long. The Vulkan spec wasn't very clear either but it's
going to be clarified soon.

VkConformanceVersion is actually unrelated to the official CTS
conformance process in Khronos. It just reports the latest CTS version
that the driver can pass, not more.

For GFX8+, RADV should be passing CTS 1.4.0.0 on all GPUs because we
validated this CTS version recently for Vulkan 1.4.

For GFX6-7, which only suppports Vulkan 1.3, RADV should also be
passing CTS 1.4.0.0, because newer versions of the CTS can be used
to validate a driver against an older version of the spec, so
it's perfectly fine to report a higher CTS version than the Vulkan version.

Newer CTS versions likely can't pass 100% due to a DGC bug that I still
need to fix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12799
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34018>
2025-03-13 09:33:33 +00:00
Eric Engestrom
3ea479c584 ci/deqp: backport fix for dEQP-VK.binding_model.buffer_device_address.*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34028>
2025-03-13 07:05:56 +00:00
Caio Oliveira
6e19215810 brw: Get the reference to brw_def_analysis only once in saturate propagation
Instead of calling `require()` every instruction, call it once per pass.
Even though the defs are cached (i.e. we are not re-calculating them every
instruction), this prevents the extra check and the call to analysis
validation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34010>
2025-03-13 04:52:01 +00:00
Guilherme Gallo
fb224e9016 ci/lava: Fix LAVA lima jobs
lima uses a different version from other farms, where some log output
patches were not delivery yet, so let's use a temporary fix to make
those job traces look as nice as the other ones.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33994>
2025-03-13 00:45:59 -03:00
Guilherme Gallo
0330522e99 ci/lava: Fix LAVA lima jobs
lima uses a different version from other farms, where some log output
patches were not delivery yet, so let's use a temporary fix to make
those job traces look as nice as the other ones.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33994>
2025-03-13 03:31:31 +00:00
Faith Ekstrand
ad90dbabe4 egl/kopper: Update the EGLSurface size after kopperSwapBuffers()
Otherwise, the size of the EGLSurface and the drawable may get out of
sync if kopper needs to re-create the swapchain at a different size.
This can cause problems with things like eglSetDamageRegionKHR() where
the core EGL code clamps them to the size in the EGLSurface.

With Wayland, it's up to the client to choose a size and resize by
creating a new EGLSurface with a different size.  Only on X11 can we
get a resize side-band like this.

Normally, without kopper, this goes the other direction where the X11
EGL code will detect a surface size change in dri2_x11_query_surface()
and it invalidates the drawable if they've changed, forcing
re-allocation.  Kopper, however, works more like the DRI2 path where we
just get handed buffers at some size decided by X11 and have to deal
with them.  In the DRI2 path, the size is unconditionally updated by
dri2_x11_get_buffers().  This is roughly equivalent, updating the size
right after every call to kopperSwapBuffers().

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12797
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34015>
2025-03-13 02:02:19 +00:00
Faith Ekstrand
dc8714c568 egl/x11: Re-order an if statement
Switch on kopper first so it's easier to do other, common things on the
kopper path.

Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34015>
2025-03-13 02:02:19 +00:00
Dave Airlie
2e3b23539e radv/video: don't try and send events on UVD devices.
This should fix some hangs on polaris when decode is forced on.

Fixes: 95a980b61f ("radv/video: add event support for VCN4")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34013>
2025-03-12 23:53:39 +00:00
Caio Oliveira
308f56ef82 brw: Add missing dependency classes to various passes
- brw_lower_3src_null_dest: Allocating a new destination, so include
  INSTRUCTION_DATA_FLOW class.

- brw_lower_alu_restriction: Removing instruction, so include
  INSTRUCTION_IDENTITY.  No details are changed so remove
  INSTRUCTION_DETAIL.

- brw_lower_vgrfs_to_fixed_grfs: Changing source and destination
  numbers, so include INSTRUCTION_DETAIL.

- brw_lower_send_gather: Insert new instructions (scalar register) and
  change sources and other information on existing ones.  So include
  INSTRUCTION_DETAIL and INSTRUCTION_IDENTITY.  Promote to INSTRUCTIONS.

- brw_opt_eliminate_find_live_channel: Can change source, so include
  INSTRUCTION_DATA_FLOW.

- brw_opt_copy_propagation_defs and brw_opt_cse_defs: Both can remove
  instructions, so include INSTRUCTION_IDENTITY.  Promote to
  INSTRUCTIONS.

- brw_opt_saturate_propagation: Instruction can have `sat` modified,
  and operands can have type modified, so include INSTRUCTION_DETAIL.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33993>
2025-03-12 22:44:10 +00:00
Valentine Burley
cff40b1512 zink/ci: Work around recent OOM issues in zink-anv-adl
Lower the concurrency for the zink-anv-adl job to avoid the out-of-memory
issues seen recently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34022>
2025-03-12 20:36:45 +00:00
Guilherme Gallo
b3b1e120a1 ci/update_tag: fix linter errors
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Guilherme Gallo
82073f7be3 ci/bin: update_tag: improve tag load
Replace global path variables with ProjectPaths dataclass
- Add explicit file existence check before loading YAML
- Enhance tag retrieval by checking environment variables first
- Add logging for better debugging of tag selection process
- Remove redundant file existence check in main function
- Improve error handling for missing conditional tags file

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Guilherme Gallo
5798f5d05f Revert "ci: setup-test-env: Prefer functions over aliases"
This reverts commit 1cc2c738bb

We originally changed some aliases into functions so scripts could use
them without needing to be sourced, keeping the environment cleaner.

However, this broke `x_off`, which is supposed to stop debug logs
(xtrace output) from showing in the console. The function version still
triggered xtrace before disabling it, while the alias correctly
redirected the logs to `/dev/null`.

It also fixes the `bin/ci/update_tag.py` script to be able to reuse the
aliases via double sourcing the setup-test-env.sh and the respective
build script.

Reported-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Yiwei Zhang
283866d2fd venus: add a new debug option to revive memory budget support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
3e740211a8 venus: default to passthrough ray tracing support
Already fully tested via cts and multiple real things on a hw impl.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
b2040900d0 venus: support VK_EXT_nested_command_buffer
Venus query records have been properly propagated from nested cmds
already, so no special care is needed here for qfb optimizations.

Test:
- dEQP-VK.api.command_buffers.*nested*
- dEQP-VK.conditional_rendering.*nested*
- dEQP-VK.draw.dynamic_rendering.nested_*
- dEQP-VK.multiview.*nested*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
7b310cb340 venus: support VK_EXT_attachment_feedback_loop_dynamic_state
Test: dEQP-VK.pipeline.*.attachment_feedback_loop_layout.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
edcc7148ba venus: support VK_EXT_depth_clamp_control
Test: dEQP-VK.draw.*clamp_control*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
8914447d9e venus: support VK_EXT_depth_bias_control
Test:
- dEQP-VK.rasterization.depth_bias_control.*
- dEQP-VK.rasterization.depth_bias_control.*_secondary_cmd_buffer_inherit_renderpass
- dEQP-VK.rasterization.depth_bias_control.*_secondary_cmd_buffer_unspecified_fb
- dEQP-VK.pipeline.*.extended_dynamic_state.*depth_bias_repr_info*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
b9207d3ad9 venus: support VK_EXT_legacy_dithering
Test: dEQP-VK.*.dithering.v2.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
cb5fa89bc4 venus: support VK_EXT_filter_cubic
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
89ec6c4d8f venus: add a few more trivial extensions
Below are added:
1. VK_GOOGLE_decorate_string
2. VK_GOOGLE_hlsl_functionality1
3. VK_GOOGLE_user_type
4. VK_EXT_display_control
5. VK_EXT_hdr_metadata

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
9e01731bc9 venus: sync latest protocol for more extension support
This sync also drops redundant vn_call_* helpers.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
e2c5435808 venus: drop vn_call usage on apis without any returns
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Alyssa Rosenzweig
ac0ca63b9d v3dv: use the stats framework
This doesn't "go all the way", ideally we'd plumb stats into the broadcom
compiler and then reuse the generated code for GL. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921 for an
example of that. But this is a step in the right direction by itself.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33922>
2025-03-12 16:49:46 +00:00
John Anthony
8a47ae456c panvk: Avoid division by zero for vkCmdCopyQueryPoolResults
Stride can be zero if there are less than two queries to copy.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 7755c41b3e ("panvk/csf: Rework the occlusion query logic to avoid draw flushes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34020>
2025-03-12 14:22:39 +00:00
David Rosca
43c99d3928 frontends/va: Don't filter supported formats according to config RT format
This matches Intel driver. Chromium always sets RT format to YUV420
which would cause us to not report other formats as supported.
Only check that the RT format is actually supported when creating
config, but don't limit supported surface formats.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34001>
2025-03-12 13:57:54 +00:00
David Rosca
47a9312a5d frontends/va: Use ARGB as default fourcc for RGB32 RT format
This matches Intel driver and is what Chromium expects.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34001>
2025-03-12 13:57:54 +00:00
David Rosca
f87d72152c frontends/va: Support A8R8G8B8 format for processing
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34001>
2025-03-12 13:57:54 +00:00
Ella Stanforth
332b313547 v3d: enable framebuffer fetch
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33766>
2025-03-12 13:28:16 +00:00
Ella Stanforth
6023a46d02 v3d/compiler: Implement load_output
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33766>
2025-03-12 13:28:16 +00:00
Lionel Landwerlin
de2a65ade6 anv: fix non page aligned descriptor bindings on <Gfx12.0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ab7641b8dc ("anv: implement descriptor buffer binding")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33911>
2025-03-12 12:23:24 +00:00
Yiwei Zhang
06369caa40 pan/kmod: set DRM_RDWR for exported dma-bufs
This allows the exported fds to be mapped for writing. This is needed
for virtgpu native ctx support where the fds are mapped rw when the
mappings are added to the guest by kvm. This aligns with other mesa
drivers, and unblocks the extended testing with venus on top.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34017>
2025-03-12 11:54:22 +00:00
Georg Lehmann
cac4287aab aco/validate: fix scalar source validation for DPP and gfx11+ VINTERP
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33969>
2025-03-12 11:31:54 +00:00
Georg Lehmann
3b5e537b09 aco/gfx11.5: remove vinterp ddx/ddy path
While the idea to take advantage of the higher throughput wasn't bad,
the hardware wasn't design with this in mind and doesn't behave like expected
with constant sources.

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33969>
2025-03-12 11:31:54 +00:00
Antonio Ospite
bac77bb30d ci/android: add a job using android-cts instead of deqp-runner
We also want to run Android CTS in the Android jobs.

Since the Android CTS is quite large, download it and strip it down to
only contain the interesting tests, so to reduce the space taken in the
container image.

Eventually we might want to have android-cts be run via deqp-runner
itself, but for now add a proof-of-concept mechanism which calls the
android-cts directly and uses an ad-hoc handling of expectations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
a6a38667f9 ci/android: add an android-deqp-runner.sh script
To run deqp-runner in cuttlefish we do something similar to
deqp-runner.sh but adapted to be used on Android via adb.

Isolate those adapted commands in an android-deqp-runner.sh script so
that in the future it will be easier to compare with deqp-runner.sh and
evaluate if deqp-runner.sh and android-deqp-runner.sh could be possibly
consolidated into a single script.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
e3a941720e ci/android: move all dEQP handling in one place in cuttlefish-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
ef496469bf ci/android: pass -vsock_guest_cid to launch_cvd
This reduces the risk of conflicting ports on the host system.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
074297aea1 ci/android: push /deqp-gles/mustpass/egl-main.txt.zst
Push /deqp-gles/mustpass/egl-main.txt.zst instead of the uncompressed
version which also have a version number in the path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
ae574a08c6 ci/android: use an x86_64_only cuttlefish image
In .gitlab-ci/cuttlefish-runner.sh 32bit libraries were removed but they
were not being replaced with newer ones, however this caused some
problems because by default the x86_64 target in AOSP is still
multi-library and for example the 32bit zygote process ended up crashing
because of the missing 32bit libraries, causing a general system
instability.

Since the CI is only building 64bit libraries for the android target,
use an x86_64_only cuttlefish product which only has components and
libraries built for the 64bit target, this avoids dealing with 32bit
EGL/Vulkan libraries at all, preventing any possible cause of
instability.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
3520ed0f2c ci/android: bump CUTTLEFISH_BUILD_NUMBER
Bump CUTTLEFISH_BUILD_NUMBER to get a newer version that fixes some
issues with the `mesa_swrast_guest_angle` GPU_MODE.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
7b4aa9cf80 ci/android: increase the waiting time to stop the cuttlefish launcher
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
0a267694db ci/android: stop cuttlefish before copying the logs, to log everything
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
6d4ebb3ff4 ci/android: disable modem simulator in cuttlefish, it is not needed
Disable the modem simulator in cuttlefish, it is not needed for testing
the graphics subsystem and avoids opening a few vsock ports which
reduces the chance of collisions in case of multiple instances of
cuttlefish running concurrently.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
e9b98b53b4 ci/android: disable audio in cuttlefish, it is not needed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
a8f98befe3 ci/android: don't set HOME globally in cuttlefish-runner.sh
Having HOME defined globally could mess up other things like adb config
files.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:16 +00:00
Antonio Ospite
f8fc7297cb ci/android: don't do unnecessary cleanup
Cleaning up and stopping cuttlefish before launching it is not strictly
necessary when using gitlab shared runners.

This can be added back later when we have a better justification.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:16 +00:00
Konstantin Seurer
fc12fafb1d radv/meta: Change the return type of get_r32g32b32_format to VkFormat
Gets rid of some compiler warnings.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33983>
2025-03-12 10:07:37 +00:00
Lionel Landwerlin
29865b41fb anv: simplify internal blorp helper
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
900483f13f anv: use addresses for buffer<->image copies
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
02bbe2f9c5 anv: track protection on anv_address
This simplifies the propagation of the protection value, we just set
it on buffer->address at creation time and forget about it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
648d843813 anv: move xfb buffer storage to 64bit address + mocs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
3c0dcfeb0f anv: move vertex buffer storage to 64bit address + mocs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
d254dc4eaf anv: move index buffer entry point out of genX code
Take the opportunity to move to 64bit address + mocs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Samuel Pitoiset
60b2e6f8ac radv/tests: add few tests that verify drirc options
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
8abe6beb3c radv/tests: add a test to verify that pipeline hash matches RGP<->Fossilize
Very useful to get the fossil from one RGP capture.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
3da9d6dac9 radv/tests: add a test to verify that pipelineCacheUUID is invariant
This was recently broken because pipelineCacheUUID was computed using
the physical device cache key. This caused SteamOS precompilation to
not happen for games that have shaders-based drirc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
19e62c7abc radv: add a small framework for RADV specific tests
There are a lot of things that can't be tested outside of the driver,
like drirc workarounds, RADV_DEBUG options and debugging stuff.

Writing RADV specific tests would help to avoid introducing regressions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
b8e3f66328 radv/winsys: enable has_timeline_syncobj for the null winsys
For testing the dedicated sparse queue drirc with the null winsys.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
511d2a9c2e ci: enable build-radv-tests for debian-clang and debian-vulkan
Similar to ACO tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:15 +00:00
Samuel Pitoiset
5fe5fb147e meson: add build-radv-tests option
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:15 +00:00
Valentine Burley
4a4e0c833c ci: Enable Perfetto in debian-no-libdrm for Turnip build testing
This ensures that the Perfetto-enabled Turnip build is tested, helping to
catch potential breakages that would otherwise go unnoticed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33999>
2025-03-12 07:11:06 +00:00
Lionel Landwerlin
4082e22676 anv: fill runtime buffer device_address field
Might be useful if the runtime starts using that field.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33917>
2025-03-12 06:39:10 +00:00
Mike Blumenkrantz
73da0dcddc gallium: eliminate frontend refcounting from samplerviews
A significant CPU performance bottleneck in mesa GL is refcounting atomics:
even with the current pinning attempts, eliminating them can yield huge
performance gains (easily verified by running drawoverhead with return false at the top of pipe_reference_described()).

This is a proof of concept for removing refcounts from gallium objects,
namely sampler views and resources. Sampler views were smaller in scope,
so I started there. This MR alone is not expected to noticeably affect
performance, though if applied to all drivers/frontends,
it would enable a bunch of code deletion for crazy samplerview
refcounting hacks currently used to try circumventing the existing overhead.

Co-authored-by: Karol Herbst <kherbst@redhat.com
Co-authored-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33813>
2025-03-12 01:37:28 +00:00
Mike Blumenkrantz
f47da0caef st/drawpixels: move sv unref out to callers
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33813>
2025-03-12 01:37:28 +00:00
Mel Henning
8d4a3729a3 vulkan: Relax bda assert for zero-size buffers
Fixes: 73da18b956 ("vulkan: Add device address helpers to vk_buffer")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33988>
2025-03-12 01:09:54 +00:00
Tapani Pälli
de367eec07 intel/dev: reduce warning noise from urb settings II
In 4064b5546b, the idea was to have the minimum value as if all
stages are active, however hwconfig does not follow that for the
tessellation control stage. Ignore min values from hwconfig.

Fixes: 4064b5546b ("intel/dev: reduce warning noise from urb settings");
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33554>
2025-03-12 00:29:05 +00:00
Maaz Mombasawala
f04287c0be svga: Check float type when emitting atomic instructions
When translating atomic instructions, the base type of the imageView can be
float only for image_atomic_exchange. If a float type image is used with other
atomic instructions the results are undefined.
Enforce this check in the shader translator and don't emit any instruction if
it fails.
Fixes crash in piglit test arb_shader_image_load_store@invalid.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Maaz Mombasawala
3da0774be1 nir: Add option to preserve double immediates in tgsi shader.
The nir to tgsi translator flattens all constants in the nir shader into uint32
immediates. In the svga driver, the vgpu10 shader translator then packs all
these immediates into a constant buffer, and also optimizes it to prevent
repetitions by only emitting a 32-bit constant once.
This can cause problems with double sized constants, since either the lower or
higher 32-bits of different 64-bit constant can be identical, and in the constant
buffer that repeating 32-bit value will be emitted only once, so a 64-bit
constant gets split into two non-contiguous 32-bit values.
When this 64-bit constant is then invoked by a double instruction live ddiv or
dmul, the source register can now have invalid swizzles like .xz or .xw since
its 32-bit components are not contiguous.
We have seen this happen in the piglit test -
spec@arb_gpu_shader_fp64@execution@glsl-fs-loop-unroll-mul-fp64
which emits invalid swizzle values for double instructions.

To fix this, introduce a new option in nir to tgsi shader translator that
preserves uint64 constants. When a 64-bit immediate is translated into svga
shader code, its 32-bit components are contiguous and aligned in the constant
buffer, so accessing them only emits valid swizzles .xy and .zw.

Other drivers using the nir to tgsi shader translater should not see any change
in the tgsi shader emitted unless they too explicitly invoke the
keep_double_immediates option like svga.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Maaz Mombasawala
882ad3fa3e svga: Add all tgsi double instructions for shader codegen checks
During translation of tgsi shaders to vgpu10 shader code that is sent to
svga device, we may get as input a double instruction with incorrect
swizzles such as xzxz. In this case we have a workaround to move the value
in that register to a temporary register with an xyzw swizzle.

However the functions that check if the instruction has double source or
destination did not check for all instructions, such as DDIV, so if
incorrect swizzles are sent in the shader tgsi code then the same
incorrect swizzle is also emitted in the vgpu10 shader code.

Fix this by adding all the double instructions in double checking
functions.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Charmaine Lee
73f4980dba svga: remove tgsi semantic in shader compiler key
Change shader image return type in shader compiler key to
VGPU10_RESOURCE_RETURN_TYPE.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Faith Ekstrand
dcbf5f08eb loader/nouveau: Fix the comment in nouveau_zink_predicate()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34009>
2025-03-11 23:00:09 +00:00
Samuel Pitoiset
c627097841 radv/amdgpu: fix device deduplication
To correctly deduplicate device inside the winsys, it should use the
fd or amdgpu_device_handle. Using the allocated ac_drm_device as key
is obviously broken.

Not deduplicating devices breaks memory budget and a bunch of games
were broken.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12686
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12775
Fixes: a565f2994f ("amd: move all uses of libdrm_amdgpu to ac_linux_drm")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34005>
2025-03-11 22:35:46 +00:00
Sviatoslav Peleshko
bd45b738b7 drirc: Apply assume_full_subgroups_with_shared_memory to Resident Evil 2
The game uses a compute shader for occlusion culling. This shader lacks
proper groupshared memory sync, and needs 32-wide subgroup to work
correctly.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7595
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23408>
2025-03-11 22:06:26 +00:00
Sviatoslav Peleshko
369aec5704 anv: Add full subgroups workaround for the shaders that use shared memory
This workaround is similar to anv_assume_full_subgroups, but it applies
to the shaders that use shared memory. If they rely on the implicit
synchronization, and we choose a smaller group size than the
(broken) shader expects, it will produce incorrect results.

Cc: mesa-stable
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23408>
2025-03-11 22:06:25 +00:00
Faith Ekstrand
7c47a3d0f7 vtn: Support cooperative matrices in OpConstantNull
Cooperative matrix initializers are a single scalar value that gets
broadcasted to the entire matrix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12679
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33747>
2025-03-11 21:35:22 +00:00
Natalie Vock
0e7c94b2b3 ac/llvm: Don't use getTriple() on LLVM21+
setTargetTriple() takes a Triple now.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33981>
2025-03-11 20:54:34 +00:00
Eric Engestrom
1f93dd7d37 meson: simplify video-codecs option parsing
The extra `all_free` that now remains in the list will be ignored in the
loop below anyway so there is no need to have complex code to try to
remove it.

This also means it becomes possible to set things like
`-D video-codecs=all_free,vc1dec`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33949>
2025-03-11 20:21:57 +00:00
Aaron Ruby
95161bb13d gfxstream: Resolve/clean-up inconsistencies with advertising emulated
extensions

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
2e15763686 gfxstream: Full emulation support for VK_EXT_image_drm_format_modifier
- Fix the checks for emulation (based on presence of the extension
on the host)
- Add flag in gfxstream_vk_physical_device, otherwise the real device
extensions are not properly filtered when communicating with the host.
- The "function" version of the check in ResourceTracker can eventually
just check the flag once mesa and gfxstream objects are combined
- Remove the duplicate getPhysicalDeviceFormatProperties2 impl, this is
covered by the ResourceTracker impl
- Add ResourceTracker impl for getImageDrmFormatModifierPropertiesEXT
- Remove isDmaBufImage flag from VkImage_info, and clean up all the code
associated with this flag. In on_vkCreateImage, all required info is
avaialble from the extMemImageCi::handleType. In on_vkAllocateMemory,
this is all associated with the tiling of the dedicatedImage for the
allocation

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
4197081329 gfxstream: Remove vkGetImageSubresourceLayout ResourceTracker entry
... and the linearPeerImage that was backing emulated drmFmtMod images.

With proper drmFmtMod emulation, the VkImage itself will be
linear-tiled.

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
9447de5dc4 gfxstream: Downgrade log severity when enabling params in LinuxVirtGpu
Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:33 +00:00
Alyssa Rosenzweig
cdd7b36faa tu: use the stats framework
This doesn't "go all the way", ideally we'd plumb stats into ir3
compiler and then reuse the generated code for GL. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921 for an
example of that. But this is a step in the right direction by itself.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33923>
2025-03-11 19:35:50 +00:00
Yiwei Zhang
5badd0d101 venus: sync protocol for accel struct indirect build encoding fix
ppMaxPrimitiveCounts also requires the same nested dynamic array special
treatment.

Fixes: 6bac77b75c ("venus: sync protocol for ray tracing support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33995>
2025-03-11 19:14:23 +00:00
Yiwei Zhang
9fb149d4fe venus: sync protocol support for maint7
make a separate sync mainly to isolate the next fix

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33995>
2025-03-11 19:14:23 +00:00
Maíra Canal
7775c79035 v3dv: don't overwrite the primary fd if it's already set
If a valid primary file descriptor is already set (e.g. from vc4),
don't overwrite it with -1.

This prevents losing a valid primary fd and resolves issues arising
when vc4 is the first node returned by `drmGetDevices2()` and v3d is
the second.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12777
Fixes: 188f1c6cbe ("v3dv: rewrite device identification")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33958>
2025-03-11 18:31:58 +00:00
Dave Airlie
2983ca0d20 loader/nouveau: load zink as the GL driver for turing and above.
If the kernel supports modifiers and the GPU is a Turing+ then
force using zink instead of nvc0.

Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29232>
2025-03-11 17:39:14 +00:00
Samuel Pitoiset
d1a2ba57f9 radv: fix a GPU hang with inherited rendering and HiZ/HiS on GFX1201
With secondary command buffers, inherited rendering can be used but
it's basically impossible to know if the depth/stencil attachment
enabled HiZ/HiS. But it's required to disable WALK_ALIGN8 to avoid
GPU hangs.

This assumes that HiZ/HiS is enabled for inherited rendering as long
as a depth/stencil attachment is used. It's not the most optimal
approach but it's not supposed to hurt either.

This fixes a GPU hang with
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_cmdbuffers
and friends.

GFX1200 isn't affected because it doesn't support HiZ/HiS.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33986>
2025-03-11 14:14:25 +00:00
Erik Faye-Lund
c34c7b1f3b panvk: correct VkPhysicalDeviceProperties::deviceName
We currently report a deviceName as e.g. "Mali-G610 (Panfrost)", but
panfrost has nothing to di with the physical device, and the suffix
doesn't belong there at all.

So let's remove that suffix from PanVK. This results in output like this
from vulkaninfo:

---8<---
VkPhysicalDeviceProperties:
---------------------------
        apiVersion        = 1.1.305 (4198705)
        driverVersion     = 25.0.99 (104857699)
        vendorID          = 0x13b5
        deviceID          = 0xa8670000
        deviceType        = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName        = Mali-G610
        pipelineCacheUUID = <snip>
---8<---

We already sort of namedrop Panfrost in the driver properties:

---8<---
VkPhysicalDeviceDriverPropertiesKHR:
------------------------------------
        driverID        = DRIVER_ID_MESA_PANVK
        driverName      = panvk
        driverInfo      = Mesa 25.1.0-devel (git-136dd9f985)
        conformanceVersion:
                major    = 1
                minor    = 4
                subminor = 1
                patch    = 2
---8<---

While this might techically speaking be a regression, PanVK has been
marked as experimental until Mesa 25.0. But to reduce the risk of people
starting to depend on this behavior, let's also backport this change to
the 25.0 release.

The patch looks a bit funny, because we add the " (Panfrost)"-suffix in
common code, and this moves it to the Gallium driver. But effectively,
this means PanVK is the only driver that sees a change of behavior.

Backport-to: 25.0
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33972>
2025-03-11 13:50:05 +00:00
Daniel Stone
69cc8762f0 ci/panfrost: Move G610 testing to pre-merge
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33431>
2025-03-11 12:59:17 +00:00
Daniel Stone
95799845f2 ci: Update kernel for Panthor scheduling fixes
These should make G610 properly stable now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33431>
2025-03-11 12:59:17 +00:00
Karmjit Mahil
80e90150e9 tu: Fix Perfetto build error with vk_buffer
Fixes: 68bbc87063 ("tu: Switch to device address from vk_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33997>
2025-03-11 12:29:59 +00:00
Erik Faye-Lund
f6112a26c5 panvk: expose EXT_display_control
We have a common implementation for this, let's just use that.

Similar to the previous commit, this is a bit silly. But if we ever get
in a situation where VK_EXT_display actually makes sense, this stuff
should "just work", so let's enable it for good measure.

Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33916>
2025-03-11 11:42:08 +00:00
Erik Faye-Lund
8aae7d153d panvk: expose VK_KHR_display
It seems the common WSI code does all that's really needed here for us
already. Enabling this lets me run vkmark on PanVK.

This is a bit silly, because what actually happens here is that we end
up passing -1 as the display_fd to wsi_device_init(). This in turn leads
us to returning zero usable displays, which renders the extension
somewhat useless. But it is better than not supporting the extension, and
not supporting applications who have a hard depdendency on it fail, like
is the case with vkmark.

Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33916>
2025-03-11 11:42:08 +00:00
Erik Faye-Lund
10cbd4f211 panvk: rework how we deal with extension-reqs
We're currently exposing a bunch of extensions that requiring Vulkan
1.1, and we'll soon enough do the same for Vulkan 1.2. Instead of having
to update each of these extensions separately once we add new Vulkan
version support for some gens, let's use a single variable for this
instead.

And while we *could* query the exposed vulkan version and do this a bit
more "automatically", this makes it easy to leave some needless checks
behind if the baseline version changes. Leaving this as a arch check in
this function should make it a bit more obvious when the check can be
removed.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33971>
2025-03-11 11:20:27 +00:00
Erik Faye-Lund
43799d6dcb panvk: fix extension requirement
This extension requires Vulkan 1.1, which we don't yet expose on Bifrost
GPUs.

Fixes: a9592a0c15 ("panvk: enable subgroupExtendedTypes")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33971>
2025-03-11 11:20:27 +00:00
Georg Lehmann
5bfd1547d2 aco: don't assume that v_interp_mov_f32 flushes denorms
Foz-DB Navi21:
Totals from 3 (0.00% of 79789) affected shaders:
Instrs: 1708 -> 1722 (+0.82%)
CodeSize: 9416 -> 9460 (+0.47%)
Latency: 12094 -> 12371 (+2.29%); split: -0.02%, +2.31%
InvThroughput: 1967 -> 1992 (+1.27%)
Copies: 105 -> 106 (+0.95%)
PreVGPRs: 131 -> 132 (+0.76%)
VALU: 1155 -> 1169 (+1.21%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33974>
2025-03-11 09:51:39 +00:00
Pierre-Eric Pelloux-Prayer
dfa725cede radeonsi: guard perfetto support with ifdef in si_draw
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
2e8232521d radeonsi: add pid/tid to the vk_queue_submit event
Without these it's impossible to know which application generated
the event.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
e6a16adbdb radeonsi: tag perfetto conditions as unlikely
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
6c2edb9762 radeonsi: cache u_trace_perfetto_active value
u_trace_perfetto_active uses an atomic read so avoid doing
it too much in hot path.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
770b5bc757 st/mesa: fix nir_load_per_vertex_input parameter
num_components should be 1 as we're loading an offset value.

Fixes: ec68f0492b ("st/mesa: switch GL_SELECT shader to IO intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12774
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33982>
2025-03-11 07:45:07 +00:00
Valentine Burley
68bbc87063 tu: Switch to device address from vk_buffer
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33965>
2025-03-11 07:12:14 +00:00
Samuel Pitoiset
01f92acf10 radv/winsys: use real info for GFX12 in the null winsys
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33970>
2025-03-11 06:50:49 +00:00
Samuel Pitoiset
dd2e9c11af aco/tests: use GFX1201 instead of GFX1200
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33970>
2025-03-11 06:50:49 +00:00
Kenneth Graunke
cdbedc9eff intel: Move unlit centroid workaround into the elk compiler
This was only needed on Sandybridge.  We can delete the brw code,
and replace the generic devinfo bit with a helper inside the elk
compiler itself.

Thanks to Iván Briano for noticing we still had dead brw code for this.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
1dfed59c49 intel: Use devinfo->urb.min_entries[GS and TCS] for setting URB configs
We were not using the minimum values from devinfo for anything.  For
tessellation control, the minimum value is 0, so we continue taking
MAX2 of that with 1 when tessellation is enabled so we have at least
something guaranteed to be present.  For geometry, the minimum value
is already non-zero (and updated by the previous patch).

This will have the side-effect of raising the minimum number of URB
entries for geometry stages.  This is currently not known to fix
anything, but should be more closely following the documentation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
404ed1d153 intel/dev: Set a higher minimum number of URB entries for GS
We've been programming our minimum number of URB entries for geometry
shaders to 2, but it appears that we should have been setting 8 on
Broadwell and later.  Additionally, there's a workaround on Skylake
and later that requires us to add flushing (which we haven't) or use
a minimum of 16 URB entries.

This alone will not fix anything, as nothing reads this devinfo field
presently (will be fixed in the next commit).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
dc66dee8ad intel/dev: Rework device info macros for Gfx8+
As we added new platforms, the device info macros evolved over time
Most platforms had a "FEATURES" macro, some had a "HW_INFO" macro,
a few had macros for URB entries - some with min entries only, some
with min and max, some including the .urb = { ... } braces, others not.

Thread counts or subslice info was sometimes considered FEATURES,
sometimes HW_INFO, sometimes inserted only in the final structure.

FEATURES macros often inherited from an ancestor platform, but not
necessarily the prior platform - many were based on GFX8_FEATURES.
Many redundantly set the same feature bits as prior platforms.

This patch aims to clean up the situation, so it's a little more
organized, especially if you look at multiple generations.  Macros
are now split into several separate pieces:

1. The FEATURES macro only has architectural features, such as LSC,
   ray tracing support, 64-bit integers, flat CCS, and so on.  Thread
   counts, subslice info, and URB sizes that may vary by SKU are not
   included here.  This makes it easy for one platform to inherit the
   features from the previous, while not pulling in that extra data.

2. THREAD_COUNTS macros contain maximum thread counts from the
   3DSTATE_VS documentation and so on.

3. URB_MIN_MAX_ENTRIES macros contain the entire URB configuration,
   including .urb = { ... }.

4. PAT_ENTRIES macros (on modern platforms) contains our choice of which
   PAT entries to use for various types of resources.

5. CONFIG macros combine all of the above into a tidy bundle for use
   in defining various structures, and may also include the platform
   macro or simulator ID for convenience.

On recent platforms where hwconfig tables exist, items #2-3 could
potentially be dropped and filled in from there instead.  For XEHP+
where we require hwconfig, we instead have a PLACEHOLDER_THREADS_AND_URB
macro that makes it clear that these values are updated from hwconfig.

One nice thing is that the bits that could (or do) come from hwconfig
tables are now cleanly separate from those that do not (i.e. platform
feature support, PAT entry selection, and so on).

This patch does not touch GFX7 or earlier macros.  We could probably
offer a similar treatment there, but they're generally working and not
quite as complex.

To verify that this commit does not have unintentional changes, I
recommend running

   objdump -s build/src/intel/dev/libintel_dev.a.p/intel_device_info.c.o

before and after this commit, and diffing the output.  The devinfo
structures produced are identical.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
20a229bc06 intel/dev: Set max_wm_threads to 0 in the Gfx9+ devinfo structs
intel_device_info_init_common calculates this for Gfx9+ based on
max_threads_per_psd and slice information.  Mark it as zero in the
structures to make clear that the value there isn't useful, and make
it easier to diff binaries for the next commit's refactors.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7ccc786acf intel/dev: Set minimum HS URB entries to 0.
The documentation for 3DSTATE_URB_HS has 0 as the minimum number of HS
URB entries for all platforms.  See BSpecs 32162, 47137, 56271 for
Gfx6-11, Xe, and Xe2-3, respectively.

This should silence warnings about our device info field not matching
the hwconfig tables.

Notably, nothing in our drivers currently uses this value so it cannot
have a functional impact.

Fixes: 4064b5546b ("intel/dev: reduce warning noise from urb settings")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7f6b1dee2c intel: Move devinfo->has_compr4 into the elk compiler
Used in exactly one place in elk.  Off to live there.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
be8ec31e72 intel: Move devinfo->has_negative_rhw_bug into the elk compiler
This is only needed for original 965G/GM clipper code, which only exists
in the legacy compiler.  Send it off to live with the elk.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
0bf779ed31 intel: Delete devinfo->has_surface_tile_offset
This is used in exactly one place in crocus, which already has a comment
indicating that this code is needed for original Gfx4 hardware.  Just
replace that with a verx10 == 40 check.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7f50f1591b intel: Delete devinfo->must_use_separate_stencil
This is used by a single place in ISL only for sanity checking the
decisions it has already made.  The knowledge is already all centralized
in ISL these days, so we don't need a device info bit.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
59c9bfa8f3 isl: Drop compile time "use separate stencil" checks.
This code is a lot of mess for no real benefit.  It's existed since
the dawn of isl, and serves to let you optimize out a single check
in release builds for Ironlake and Sandybridge systems.  All other
uses are for asserts, which already get compiled out in release mode.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
26418817a7 isl: Delete redundant "use separate stencil?" check
This code, since the dawn of time, has had a redundant check for gen5-6
separate stencil in the final else clause:

   } else if (doing separate stencil on gen5-6) {
       return compact
   } else {
       if (doing separate stencil on gen5-6)
          return compact
       ...
   }

We can eliminate that one.  The else clause then has a single if, so it
can be folded into the "else if" ladder alongside the others.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Faith Ekstrand
e029d2b45a nvk,nil: Stop panicing in image creation
If an image gets created with unsupported parameters (which is a pretty
complex thing to check), it's probably better to just return an error
rather than panic, especially since Rust panics happen even in release
builds.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
917cecb3c2 nil: Split linear and tiled image creation
They're so different that sharing the code really wasn't buying us
anything.  It's way easier to read if the two are separated.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
3c11da8aea nil: Relax alignment requirements for linear images
Compositors sometime try to import BOs with lower alignments than 128B.
This seems particularly common in the case of cursor images but it can
also happen on other BOs allocated by the old nouveau GL driver.  As
long as we avoid rendering to them (which NVK will do), the
texture/image hardware is fine as long as they're at least 32B-aligned.
Panicing in this case isn't very nice to compositors.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
e36f9d6909 nvk: Allow rendering to linear images with unaligned strides
We can do this by just enabling the fall-back path whenever we detect
something that's not nicely aligned.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
a18c176093 nouveau/winsys: Stop asserting that imported BOs are aligned
This may not be true if it comes from the nouveau GL driver.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Ivan A. Melnikov
4ad5b8f5bb gallium/radeon: Make sure radeonsi PCI IDs are also included
When importing libdrm_radeon code [1][2] it was somehow missed
that what libdrm has in one r600_pci_ids.h, Mesa has split
into r600_pci_ids.h and radeonsi_pci_ids.h. So, devices
with ids from radeonsi_pci_ids.h were not considered valid for
radeon_surface_manager_new.

This commit changes that, thus fixing radeonsi for these
devices.

[1] commit 1299f5c50a
[2] commit 3aa7497cc0

Fixes: 1299f5c50a
Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33940>
2025-03-10 23:12:54 +00:00
Karol Herbst
d74b3c550b rusticl/mesa: remove Sync from PipeContext
It was never sync and never will be. Luckily we can just remove it now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:14 +00:00
Karol Herbst
7d94fe8c5f rusticl/queue: cache bound CSO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
00e3d75a58 rusticl/queue: make it unncessary to keep QueueContext Send
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
7bbf825b52 rusticl/kernel: rename CSOWrapper to SharedCSOWrapper
Indicate that the CSO can actually be shared across pipe_contexts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
0c0c10a811 rusticl/program: simplify active_kernels check
This removes one loop, also will allow us to cache the device builds in
the queue to optimize binding compute states.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Alyssa Rosenzweig
67598775ad libagx: clean up
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
8d338292dc libagx: use indirect draw struct
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
9c057e57b1 hk: do not dispatch count/pre-GS unless needed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
1a68f7fe37 asahi: do not dispatch count/pre-GS unless needed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
927c95e118 asahi/gs: report whether xfb is needed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
70835ee0c5 asahi/gs: drop unused params
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
dc96093494 libagx,asahi: hoist GS draw generation
for indirect GS, do it in the indirect kernel (not the pre-GS)

for direct, do it on the host (not the pre-GS)

we don't want pre-GS.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
40aa260209 asahi/gs: only prefix sum with XFB
otherwise, an atomic suffices for the count shader.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
184416a5e8 asahi/gs: avoid recalculating
we'd CSE but meh

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
e70544d135 asahi/gs: factor out output info
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
6f47263ad7 asahi/gs: drop non-XFB prefix sums
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
afb53c82bc libagx: do not use prefix sums for GS index buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
4d2ab1d92c asahi: integrate printf/abort support
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
3f2dd0e062 hk: fix cull distance confusion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:03 +00:00
Alyssa Rosenzweig
93b84d0d90 libcl: add u_foreach_bit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:03 +00:00
Alyssa Rosenzweig
76da759635 bin: add list of Mesa contributors
to make it easier for people (especially newcomers to the project) to add review
tags, we need a database mapping gitlab usernames to author names & emails. that
way, if someone just comments "rb" or whatever, there's a direct way to look
that up. this comimt adds a list of current contributors with the following
methodology:

1. first, I grabbed all names + emails of recent authors, with mailmap applied,
   as proxy for active contributors:

   $ git log --since=2025-01-01 --pretty='%aN,%aE,'|sort | uniq

2. then, I scraped usernames via the gitlab api attempting to match by name. I
   don't want to hammer the gitlab api too much which is why I tried to keep the
   list in #1 as small as possible.

   import gitlab
   import subprocess
   import tempfile
   import sys
   import urllib.request
   import csv

   gl = gitlab.Gitlab('https://gitlab.freedesktop.org', private_token=...)
   names = {}
   with open('dump.csv') as csvfile:
       spamreader = csv.reader(csvfile)
       for row in spamreader:
           if len(row) == 3:
               names[row[0]] = row[1]
   for name in names:
       users = gl.users.list(search=name)
       print(', '.join([name, names[name]] + [u.username for u in users]))

3. finally, I fixed up various data issues by hand. there were cases of both
   people with multiple usernames (I tried to pick the one that's actually in
   use), and people whose name on their profile does not match the name in their
   commits (I tried to determine the username from searching gitlab manually,
   but dropped a number of such authors when it was nontrivial to figure out. I
   am a regular reviewer across the tree so if I don't recognize your name
   you're probably not that active, sorry.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33896>
2025-03-10 20:09:40 +00:00
Alyssa Rosenzweig
f365c2d33b bin: add script for applying review trailers
..or "the one where Alyssa gets jealous by b4".

Those of us who have stuck around a while have a habit of just commenting "rb"
or "ab" on MRs. which raises the question for everyone else of what name/email
to use. I've personally built up a collection of 36 (!!) different
shell aliases to apply different people's trailers. I think other people do
similarly.

This calls for better tooling. This patch adds a little script for applying
review trailers given a fuzzy match on the reviewer's name. I recommend
contributors alias it to something like `mrb`, then you can do things like:

   mrb alyssa
   mrb -a faith

to add a review tag for me or an acked-by tag for Faith.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33896>
2025-03-10 20:09:40 +00:00
Caio Oliveira
1744ecc1ce brw: Remove dead code from control flow
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33957>
2025-03-10 19:23:17 +00:00
Caio Oliveira
89f0db0aaa brw: Remove extra interface in brw_cfg types
The C++ one is more used, so let that one remain.  These data structures
are not used from C sources anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33957>
2025-03-10 19:23:17 +00:00
Job Noorman
c58ba21ba8 ir3: keep inputs at start block when creating empty preamble
It is expected that inputs and prefetches are always in the first block.
However, ir3_create_empty_preamble would create blocks before the first
one, leaving inputs after the preamble. This causes issues with
(probably among others) spilling/RA where precolored inputs could
illegally reuse the spill base register.

Fixes RA validation failures on a7xx for
dEQP-VK.ray_query.multiple_ray_queries.vertex_shader

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: f3026b3d3e ("ir3: add some preamble helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33977>
2025-03-10 18:08:02 +00:00
Natalie Vock
a1b0599105 radv/rt: Flush L2 after writing internal node offset on GFX12
Otherwise the encoder can read a stale value and make internal nodes
point into leaf space (if 0 is read).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
2025-03-10 17:42:05 +00:00
Natalie Vock
cdadda2d51 radv/rt: Guard leaf encoding by leaf node count
For empty BVHs we shouldn't emit any leaf nodes, but there is one
invocation to encode the root node. Guard leaf node encoding so that
invocation doesn't try writing any leaves.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
2025-03-10 17:42:05 +00:00
Yiwei Zhang
a315a64291 venus: relax 2 assertions for prime blit path
Prime blit can be used in setups like venus on lavapipe over vtest. It's
native env so Venus relies on renderer side driver to tell about the pci
info, while lavapipe doesn't implement that extension, which ends up
with mismatched gpu thus prime blit.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33956>
2025-03-10 16:48:31 +00:00
Pavel Ondračka
de91b18be4 r300: fix INV and BIAS presubtract on R300/R400
The swizzle check was too strict, we actually don't care about the
swizzle on the constant source at this point, it is only checked
later whether the constant source actually has the correct form.

So this effectively enables INV and BIAS presub on R300/R400.

RV370 stats:
total instructions in shared programs: 85379 -> 84948 (-0.50%)
instructions in affected programs: 15669 -> 15238 (-2.75%)
helped: 336
HURT: 81
total presub in shared programs: 1318 -> 2991 (126.93%)
presub in affected programs: 797 -> 2470 (209.91%)
helped: 0
HURT: 514
total omod in shared programs: 387 -> 384 (-0.78%)
omod in affected programs: 9 -> 6 (-33.33%)
helped: 3
HURT: 0
total temps in shared programs: 13290 -> 13243 (-0.35%)
temps in affected programs: 1388 -> 1341 (-3.39%)
helped: 91
HURT: 52
total consts in shared programs: 81922 -> 81855 (-0.08%)
consts in affected programs: 173 -> 106 (-38.73%)
helped: 67
HURT: 0
total cycles in shared programs: 126746 -> 126560 (-0.15%)
cycles in affected programs: 30752 -> 30566 (-0.60%)
helped: 255
HURT: 124

LOST:   shaders/godot3.4/22-69.shader_test FS
GAINED: shaders/ck2/172.shader_test FS
GAINED: shaders/tesseract/389.shader_test FS
GAINED: shaders/tesseract/393.shader_test FS
GAINED: shaders/unity/64-DeferredPointShadows.shader_test FS

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33915>
2025-03-10 16:09:12 +00:00
Yiwei Zhang
0543c3a886 venus: extend async descriptor set alloc coverage
Previously asynchronous descriptor set allocation is only enabled when
the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT bit is not set.
However, some engine would use that bit but alloc/free with identical
descriptor set layout. So this change extends the async set alloc to
cover that since the spec has guaranteed no fragmentation there.
Besides, a pool before any descriptor set free is also considered w/o
fragmentation. so this change extends to cover here as well. Both
would also help with dEQP run time since all descriptor pools involved
are with that bit set.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33966>
2025-03-10 15:34:42 +00:00
Ashley Smith
14101ff948 panfrost: Reset syncobj after use to avoid kernel warnings
We get a kernel message "You are adding an unorder point to timeline!"
on many CTS runs. This stems from us SIGNALing the queue syncobj then
WAITing but not reseting it. It is assumed by the time we get to
panvk_queue_submit_init_signals() that the value is 0, however it is 1
due to the previous calls.

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 5544d39f ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33943>
2025-03-10 15:02:58 +00:00
Pavel Ondračka
8d63814d7a r300: remove usage of NIR_PASS_V
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33967>
2025-03-10 13:43:23 +00:00
Samuel Pitoiset
964dc76f87 radv/ci: enable RADV_PERFTEST=video_{decode,encode} on few GFX9+ GPUs
VEGA10, RENOIR, NAVI10, RAPHAEL and NAVI31 are covered, they passed
100% of 25 runs each.

NAVI21 and VANGOGH still don't enable video testing in CI because I
got few hangs during my last stress test. Need to be stress tested
again.

Note that the kernel in Mesa CI is too old and doesn't have latest
firmwares that should fix the remaining failures.

GFX6-8 have different issues like GPU hangs on Polaris10, so it's not
yet enabled in CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33968>
2025-03-10 12:15:27 +00:00
Collabora's Gfx CI Team
94d2cc2531 Uprev Piglit to 708a9e365b18fdd881af989f75e1a6c1409cae8c
04d901e49d...708a9e365b

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33831>
2025-03-10 11:47:52 +00:00
Rhys Perry
b69b9b8eb2 amd/drm-shim: add gfx1201
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33953>
2025-03-10 11:21:36 +00:00
David Rosca
e56b906df9 frontends/vdpau: Fix creating deinterlace filter for interleaved buffers
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12755
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
2025-03-10 10:53:59 +00:00
David Rosca
6b91f13d5d Revert "frontends/vdpau: Alloc interlaced surface for interlaced pics"
This is not needed now when deinterlace can handle non-interlaced
buffers. Also this forces the buffer as interlaced which doesn't work
on radeonsi anymore.

This reverts commit 0ee4506c3a.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
2025-03-10 10:53:59 +00:00
David Rosca
244cfac143 gallium/vl: Fix video buffer supported format check
It needs to check all plane formats.

Fixes: c3ceec6cd8 ("vdpau: Refactor query for video surface formats.")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
2025-03-10 10:53:59 +00:00
David Rosca
ab3c863cfb radeonsi/video: Remove mpeg12 shader decoder support
This would only be used for IDCT and MC entrypoints, but va/vdpau
frontends doesn't use those.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33893>
2025-03-10 09:17:23 +00:00
Samuel Pitoiset
0bc9d59c2e ac,radv: add a workaround for a hw bug with primitive restart on GFX10-GFX10.3
At least, NAVI10, NAVI21 and NAVI24 are affected by this what looks
like a hardware bug when primitive restart is changed and no context
registers are written between draws. It seems the hardware doesn't
consider primitive restart at all in this situation.

Adding SQ_NON_EVENT(0) as suggested by Marek seems to fix it reliably
without introducing any overhead. It's basically a NOP packet that adds
a small delay.

Fixes new VKCTS coverage dEQP-VK.transform_feedback.primitive_restart.*.
Also fixes this old vkd3d-proton issue.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7258
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33929>
2025-03-10 08:44:31 +00:00
Mary Guillemard
7819b103fa pan/bi: Add support for IDVS2 on Avalon
IDVS2 uses a new special FAU value shader_output to determine what the
vertex shader is supposed to store as output.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33910>
2025-03-10 09:12:19 +01:00
Mary Guillemard
3bbef647b1 pan/bi: Use shader_output intrinsic for IDVS
This introduce a new pass that wrap store_output to check for
shader_output bitfield.

bifrost_nir_specialize_idvs nows only lower shader_output to a constant
value and removal of store_output is handled by DCE/dead_cf passes.

This is required for Avalon's deferred new ABI.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33910>
2025-03-10 09:03:35 +01:00
Mary Guillemard
e0be93d881 nir: Add Panfrost specific shader_output intrinsic
On Avalon, this is a bitfield that holds information on what
values a vertex shader should output.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33910>
2025-03-10 07:38:16 +01:00
Guilherme Gallo
8fcc52b8d7 ci/lava: Don't print empty lines when changing sections
Make `print_log` section-aware to stop printing newlines whenever a
section changes.
This also caught a bug: the `handle_exception` was sending an exception
type to the `print_log`, now it is fixed.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Guilherme Gallo
422e65557d ci/lava: Tweak timeouts
LAVA actions follow a hierarchical structure, where most subactions have
their timeouts overridden if the parent action supports a retry
mechanism, such as the `depthcharge-retry` action.

The timeout is calculated as: [1]

```
parent action timeout / failure_retry value
```

To adjust a subaction's timeout, we need to modify the nearest parent
action.

[1]
https://gitlab.collabora.com/lava/lava/-/blob/collabora/production/lava_dispatcher/action.py#L149

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Guilherme Gallo
a33c0e1867 ci/lava: Split boot action into deploy and boot
The boot action was wrapping the deploy action, which could cause
timeout misalignment. For example, the boot `GitlabSection` timeout was
shorter than the deploy timeout in LAVA, leading to cases where LAVA
jobs were canceled during their own retry mechanism.

By splitting these actions, we can align the timeouts properly,
preventing interference and unnecessary job cancellations.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Guilherme Gallo
d85af615f9 ci/lava: Remove depthcharge-start timeout
It has no effect, as it is overridden by depthcharge-retry timeout /
failure_retry.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Lionel Landwerlin
1835bf3520 brw: avoid calling lower_indirect_derefs multiple times
Lowering the indirect derefs multiple times leads to very inefficient
shaders because of all the control flow inserted.

In particular on some DGC tests with mesh shaders, the tests can spin
for 1hour on an i7 and still not complete compilation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33809>
2025-03-09 20:52:01 +00:00
Yiwei Zhang
c7bc90eaec venus: fix to ignore dstSet for push descriptor
Per push descriptor spec:

Each element of pDescriptorWrites is interpreted as in
VkWriteDescriptorSet, except the dstSet member is ignored.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33948>
2025-03-09 20:25:21 +00:00
Yiwei Zhang
7b228ef877 venus: use common memory report implementation
Looks to be the same, and there's no regression in the cts group
dEQP-VK.memory.device_memory_report.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33955>
2025-03-09 18:51:41 +00:00
Eric Engestrom
551770ccf8 wsi/x11: drop misleading reference to anv in var names
Fixes: ec0bc14a70 ("anv/wsi: remove all anv references from WSI common code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33950>
2025-03-09 12:00:44 +00:00
Pavel Ondračka
28057971d2 r300/ci: add dEQP job with RADEON_DEBUG=notcl
This forces software vertex processing wia the draw module and should
hopefully test the exact same codepaths that the r300 chipsets without
built-in vertex engines use.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28216>
2025-03-09 08:39:53 +00:00
Faith Ekstrand
76883e0b3c vulkan: Update XML and headers to 1.4.309
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33930>
2025-03-08 19:54:19 +00:00
Faith Ekstrand
57818436f8 spirv: Update the JSON and headers
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33930>
2025-03-08 19:54:19 +00:00
Faith Ekstrand
1cdc420065 spirv: OpAsmTargetINTEL is untyped
We need to handle this in order to bump the JSON in the next commit.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33930>
2025-03-08 19:54:19 +00:00
Leonard Göhrs
240585cc6d etnaviv/ci: add pengutronix LAVA lab with one i.MX8MP device
The device is a MBa8MPxL[1]. Once we have verified that the infrastructure
is set up correctly and is operating reliably more devices can be added.

[1]: https://www.tq-group.com/de/produkte/tq-embedded/arm-architektur/mba8mpxl/

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33759>
2025-03-08 10:18:11 +00:00
Timothy Arceri
25e008c639 util/u_idalloc: fix util_idalloc_sparse_alloc_range()
If the allocation didn't fit within the segment the loop incorrectly
freed ids of a range of different segments due to the loop redeclaring
i.

Fixes: d4085aaf56 ("util: add util_idalloc_sparse, solving the excessive virtual memory usage")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33934>
2025-03-08 09:17:07 +00:00
Alyssa Rosenzweig
0568e57d21 pan/lower_helper_invocation: clean up
drive-by.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Alyssa Rosenzweig
bc6b527b52 nir/lower_helper_writes: fix stores after discard
We need to use nir_is_helper_invocation instead of
nir_load_helper_invocation, to correctly predicate stores after demote.

Identified in a Piglit on AGX a year ago but I forgot to upstream this.

Fixes: 586da7b329 ("nir: Add nir_lower_helper_writes pass")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Alyssa Rosenzweig
e90ccf91a3 pan/mdg: call nir_lower_is_helper_invocation
needed to avoid regression from the next patch.

backported because the next patch is too

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Alyssa Rosenzweig
d92304852a agx: call nir_lower_is_helper_invocation
needed for next patch.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Guilherme Gallo
47659ddf70 ci: Simplify LAVA farm detection
Refactor the LAVA farm detection to use a simpler environment
variable-based approach:
- Remove the complex regex-based farm detection
- Replace LavaFarm enum with a simple string-based farm identification
- Update related tests and job definition logic
- Remove hypothesis testing dependency

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33888>
2025-03-08 02:45:02 +00:00
Guilherme Gallo
4a2717c4bd ci: Specify the FARM variable for DUT jobs
There are some jobs that were missing the FARM variable, which is useful
to lava_job_submitter.py to classify how it should interact with each
LAVA server and how it should assemble the job definition.
Right now, we use a set of regexex with the RUNNER_TAG variable, but
that is error-prone.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33888>
2025-03-08 02:45:02 +00:00
Mel Henning
0dad7857d8 nvk: Add NVK_DEBUG=trash_memory
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33947>
2025-03-08 02:24:18 +00:00
Mel Henning
cab80223fd nvk: Don't zero imported memory
This fixes eg.
dEQP-VK.drm_format_modifiers.export_import_fmt_features2.a8b8g8r8_uint_pack32
with NVK_DEBUG=zero_memory

Fixes: 0399999dec ("nvk: Support dma-buf import")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33947>
2025-03-08 02:24:18 +00:00
Faith Ekstrand
18d206d67c zink: Check queue families when binding image resources
We check for iamge layouts and feedback loops when we bind image
resources but not queue families.  If the resource isn't on the graphics
queue, we need to add it to need_barriers so we can transition it back
to our queue.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
2025-03-08 01:38:00 +00:00
Faith Ekstrand
396ece1ad8 zink: Set needs_barrier after transitioning to QUEUE_FAMILY_FOREIGN
Otherwise, we'll transition to QUEUE_FAMILY_FOREIGN and then forget that
we left it on the foreign queue and never transition back the next time
we use the resource.  This was kind-of okay with Wayland compositors
because they always re-import the BO so it's always fresh and they pick
up on the queue transfer the first time.  X11, on the other hand, does
not re-import BOs so they get stuck in this weird QUEUE_FAMILY_FOREIGN
limbo until something happens to randomly trigger a layout transition
check and then we find it and do the transition.  We should mark them as
needing a barrier the moment we transition to QUEUE_FAMILY_FOREIGN.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
2025-03-08 01:38:00 +00:00
Yiwei Zhang
e538a38017 lavapipe: fix accel struct device query copy
This change:
1. use vulkan flags instead of pipe query flags
2. set the avail bit when requested

Fixes: a26f96ed3d ("lavapipe: Handle accel struct queries in handle_copy_query_pool_results")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
2025-03-08 01:11:44 +00:00
Yiwei Zhang
bc190cab2d lavapipe: set availability bit for accel struct host queries
Fixes: 897ccbd180 ("lavapipe: Implement VK_KHR_acceleration_structure")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
2025-03-08 01:11:44 +00:00
Sagar Ghuge
1bfe2571f5 intel/compiler: Lower sample index into coord for MSRT messages
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/32690>
2025-03-07 23:06:14 +00:00
Sagar Ghuge
bea9d79cb9 intel/compiler: Add support for MSAA typed load/store messages
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/32690>
2025-03-07 23:06:14 +00:00
Yiwei Zhang
2923945020 venus: support VK_KHR_ray_tracing_maintenance1
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
7902d9ee32 venus: support VK_KHR_ray_tracing_position_fetch
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
7cfdd9e8d4 venus: enable VK_KHR_ray_tracing_pipeline
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
e081621dca venus: implement VK_KHR_ray_tracing_pipeline commands
Implement all commands involved. No need to scrub anything in the RT
pipeline info since it has been well validated by the VUs related.

The nature of VkDeferredOperationKHR plays well with venus multi-ring
support. So later we can properly define our own concurrent limits for
RT pipeline creations.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
9547efa6b0 venus: prepare push template for ray tracing pipeline
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
1e526c555b venus: support VK_KHR_ray_query
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
0deef3d037 venus: enable VK_KHR_acceleration_structure
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
4cb0f99379 venus: implement VK_KHR_acceleration_structure - Part III
Add acceleration structure descriptor type support:
- async set alloc
- descriptor update with and w/o template
- push descriptor with and w/o template

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
1075d03228 venus: implement VK_KHR_acceleration_structure - Part II
Add query cmd integrations.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
c0f4d9861d venus: implement VK_KHR_acceleration_structure - Part I
Implement all cmds except query updates.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
eb0ad64e80 venus: add stubs for accel struct host commands
They won't be implemented, and the host cmds feature will always be
disabled in venus.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
3eb554a2b5 venus: support VK_KHR_deferred_host_operations
Details are at:
https://gitlab.freedesktop.org/virgl/venus-protocol/-/merge_requests/97

For venus and vkr, we'll use pure driver side impl. Start with (1) and
move towards (2) later as things evolve. We'd like renderer side to be
simple and passive.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
90f9a1cca5 venus: add a debug option for ray tracing support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
6bac77b75c venus: sync protocol for ray tracing support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
sarbes
a3f827319f lima: add genxml for texture descriptor
This commit adds genxml to Lima, by copying mostly from Asahi. The definition of the texture descriptor has been moved there.

v2:
- remove mipaddress handling, use "shr(6)" modifier
- indent TD parser 8 spaces

v3:
- added copyright
- renamed ushort to unorm16

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33385>
2025-03-07 21:10:20 +00:00
Benjamin Lee
871804a494 panfrost: implement 16-bit pack/unpack intrinsics
This significantly improves codegen for the 16-bit ldexp2 lowering.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33781>
2025-03-07 18:56:33 +00:00
Juan A. Suarez Romero
2662b9b71d v3d/v3dv/vc4: review all expected timeouts
Some of these tests are not valid anymore, others can now be executed
under the time budget.

This commit updates all the expected timeouts.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33913>
2025-03-07 17:37:18 +00:00
Daniel Schürmann
795706f3d6 zink: enable CapabilityDemoteToHelperInvocation and extension only if required
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
efaaaf45d1 zink: clean up HelperInvocation code emission
With SPIR-V 1.6 OpIsHelperInvocationEXT was effectively replaced with
Volatile loads of the HelperInvocation built-in variable.

This patch also drops the distinction between is_helper_invocation and
load_helper_invocation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
dbd41e3ddd nir: set SYSTEM_VALUE_HELPER_INVOCATION read for nir_intrinsic_is_helper_invocation
is_helper_invocation is the volatile access of load_helper_invocation.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
a4cffa91b8 nir: remove nir_lower_discard_if_to_cf option
Since removing nir_intrinsic_discard{_if} it has no purpose anymore.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
276dc751ce zink: lower {demote|terminate}_if to CF after lowering point smooth
This must have slipped somehow.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Erik Faye-Lund
fa91b41f54 docs/features: add VK_EXT_hdr_metadata
This was missed when it was recently added.

Fixes: 4b663d561b ("vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33918>
2025-03-07 15:34:02 +00:00
Erik Faye-Lund
1a1412e66e docs/features: add missing panvk feature
I forgot to document this feature when I added it, whoops!

Fixes: ac05c2a2b8 ("panvk: expose subgroup operations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33918>
2025-03-07 15:34:02 +00:00
Georg Lehmann
55921bd7ef radv/gfx10+: remove null exports if discard isn't used
Foz-DB Navi31:
Totals from 1362 (1.71% of 79789) affected shaders:
Instrs: 9879 -> 8497 (-13.99%)
CodeSize: 52004 -> 41028 (-21.11%)
Latency: 48821 -> 27349 (-43.98%)
InvThroughput: 7475 -> 7474 (-0.01%)
SALU: 274 -> 254 (-7.30%)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
2025-03-07 15:00:37 +00:00
Georg Lehmann
09ff1c28d8 ac/nir/lower_ps_late: consider dcc decompression for null exports
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
2025-03-07 15:00:37 +00:00
Georg Lehmann
ad73af6e68 radv: add dcc_decompress_gfx11 in radv_graphics_state_key
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
2025-03-07 15:00:37 +00:00
Alyssa Rosenzweig
4da7b12000 panfrost: port to common stats framework
this adds full support for executable statistics in panvk.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921>
2025-03-07 13:48:44 +00:00
Georg Lehmann
7b1f1a107e radv: enable invariant geom for DOOM(2016)
Moving alu reordered some fmuls and since we prefer the closest fmul for ffma,
this causes precision to mismatch between depth write and depth test.

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

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33933>
2025-03-07 11:48:38 +00:00
Christian Gmeiner
ae21dd4252 etnaviv/ci: Add missing rev to GC3000
A rebase mistake.

Fixes: 71e2ddcede ("etnaviv/ci: Add gles2 run for GC3000")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33937>
2025-03-07 11:14:19 +01:00
Samuel Pitoiset
82ab58f6c6 radv: add RADV_DEBUG=pso_history
This dumps pipeline hash + shader VA to /tmp/radv_pso_history.log. Can
be very useful when investigating GPU hangs using UMR to get the fossils
back with the PC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33912>
2025-03-07 09:14:18 +01:00
Caio Oliveira
ff59013571 brw: Rework label tracking in assembler
For each label store its offset and two lists of uses (for JIP and UIP).
Because the parser itself already restricts what opcodes can use labels
(and which ones), don't re-validate them.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33522>
2025-03-06 17:06:20 -08:00
Caio Oliveira
7b45d31df0 brw: Add support for GOTO/JOIN in the assembler
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33522>
2025-03-06 17:06:20 -08:00
Caio Oliveira
9df254731e brw: Make assembler strict about JIP and UIP order
The "JIP:" and "UIP:" markers were being ignored, so was possible
to switch their order in the text but the parser would act as the
same.  Just fix the order now and enforce it through the parsing.

Since we are here, remove the "Jump:" and "Pop:" that are not used
for Gfx9+ anymore.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33522>
2025-03-06 17:06:19 -08:00
Caio Oliveira
25875f5e79 brw: Remove bblock_t parameters from various passes
These are either unused or can be trivially replaced by
a block stored in an instruction.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
8e2a7cb42d brw: Embed at_end() inside brw_builder(brw_shader *) constructor
All remaining uses of that constructor would also use at_end(),
and vice-versa.  So just implement that behavior in the constructor
itself.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
6f37e6f104 brw: Add explicit way to get an empty brw_builder
And use brw_builder(brw_shader *) and brw_builder() constructors
where possible.

The way tests are written, it is necessary to initialize an "empty"
builder -- which is later replaced by a proper one.  Default parameter
NULL make that initialization implicit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
32e562ae01 brw: Simplify brw_builder "insert before inst" constructor
Since brw_inst now has the block it belongs and the block can
reach the shader, the only necessary information to create a
builder is the brw_inst itself.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
66307811c3 brw: Remove block parameter from brw_inst::remove()
Use brw_inst::block instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
7924d48bcd brw: Use brw_inst::block in CSE
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
b0b0fa8624 brw: Use brw_inst::block in Combine Constants
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
07d0af763d brw: Use brw_inst::block in Def analysis
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
705d448bc3 brw: Add block pointer in brw_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
b71ec53048 brw: Remove unused function
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Mike Blumenkrantz
7167214cab zink: support crazy CL buffer-to-texture extension
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Mike Blumenkrantz
a6d3078c80 zink: extract some samplerview bind/unbind code
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Mike Blumenkrantz
952ec2ab55 zink: extract some shader image resource binding code
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Mike Blumenkrantz
1f6c97f358 zink: disable reordering on compute contexts
in theory reordering shouldn't do anything here other than promote
everything to the reorder cmdbuf, which is harder to debug

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Samuel Pitoiset
5f177018f7 radv/ci: re-enable ET2C emulation testing on non-native GPUs
This env variable was renamed except for CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33924>
2025-03-06 22:09:49 +00:00
Samuel Pitoiset
54242f8f04 ci/b2c: fix passing B2C_* variables
Broken search&replace regex.

This fixes GPU hang detection on RADV/CI.

Fixes: bad0197300 ("ci/b2c: pass through all the B2C_* variable without renaming them")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33924>
2025-03-06 22:09:49 +00:00
Lakshman Chandu Kondreddy
2cfe070b3b freedreno: Add support for Adreno623 GPU
Add support to enable basic functionality of Adreno623 GPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33525>
2025-03-06 21:48:05 +00:00
Marek Olšák
40aac0681b ac,radeonsi: define all SDMA DCC fields & use them, enable compressed writes
SDMA supports HTILE, but SURF_TYPE must be set correctly.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:54 +00:00
Marek Olšák
ce0d213ac8 radeonsi: don't cull front/back faces in the hw if the shader culls them
This reduces the number of context rolls by not setting
the CULL_FRONT/CULL_BACK register fields.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:54 +00:00
Marek Olšák
bafab3324e radeonsi: reflect blitter VS in si_context::num_vertex_elements
Set it to 0 if the VS doesn't use VBOs. This fixes an assertion failure.

Fixes: 7bf5d2ce75 - radeonsi: add assertion requiring binding vertex elements before vertex_buffers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12698
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:53 +00:00
Marek Olšák
c662fcfa94 radeonsi: lower IO only if io_lowered == false
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:53 +00:00
Marek Olšák
53ae218dcd radeonsi: use the restrict keyword for draw parameters
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:53 +00:00
Marek Olšák
95a9df811a radeonsi: enable Z/S caching in GL2 by default except FurMark
This improves performance for several workloads.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:52 +00:00
Marek Olšák
36ccc300d8 radeonsi: enable NGG culling when the shader writes the viewport index
Only W and face culling is enabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:52 +00:00
Marek Olšák
356f5b2d2e radeonsi: move buffer reallocation to a separate function
to be used later

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:51 +00:00
Marek Olšák
0f9c972453 radeonsi: use si_is_buffer_idle everywhere
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:50 +00:00
Marek Olšák
c96f7a079f winsys/amdgpu: don't use 32-bit address space for IBs
We run out of the 32-bit address space and then we crash.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:50 +00:00
Marek Olšák
e468321bee ac/cmdbuf: rework CB/DB cache controls for better perf
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:49 +00:00
Marek Olšák
73175ec0b6 ac/cmdbuf: split meta_*_policy to dcc and htile variables
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:49 +00:00
Marek Olšák
d2141e6751 ac/nir/ngg: add an option to skip viewport-based culling
We can do W and face culling when we have multiple viewports, but not
frustum and small prim culling because those are dependent on the viewport.
When a shader writes the viewport index, the new option allows skipping
viewport-based culling while keeping W and face culling.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:48 +00:00
Marek Olšák
d429e35169 ac/nir/cull: extract a helper calling accept_func
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:48 +00:00
Marek Olšák
177c9b173e Revert "ac/nir: clamp vertex color outputs in the right place"
This reverts commit b3fc49686e.

It was a rebase failure.

Fixes: b3fc49686e

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:47 +00:00
Marek Olšák
e99efe7164 ac,radeonsi: don't set num_slots/src/dest_type/write_mask when they're set automatically
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:47 +00:00
Marek Olšák
96722aeda3 ac/gpu_info: use max_good_cu_per_sa for computation of max_scratch_waves
every CU should be able to use scratch

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:46 +00:00
Rhys Perry
66130a51d3 radv: don't assume WGP mode in radv_get_max_waves
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33873>
2025-03-06 20:47:20 +00:00
Rhys Perry
17abc5f326 radv: improve radv_get_max_waves for multi-wave workgroups with LDS
LDS isn't divided among SIMDs, and it doesn't make sense to launch a
fraction of a compute workgroup.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33873>
2025-03-06 20:47:20 +00:00
Connor Abbott
076f52285c tu: Remove useless prim_order state merging
We already merged it below, when the library has both fragment output
interface and fragment shader state (which is when we'd compute it
anyway). Setting it twice is probably harmless but also confusing and
useless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33902>
2025-03-06 20:24:22 +00:00
Connor Abbott
413947e2de tu: Fix static blend bandwidth calculation
We were never setting the valid bit, so would never happen. If it did
happen, we forgot to merge in the bandwidth calculation from child
libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33902>
2025-03-06 20:24:22 +00:00
Loïc Minier
c36cd32345 freedreno: check if GPU supported in fd_pipe_new2
fd_pipe_new2 can segfault when trying to set the is_64bit flag on new
pipes. This can happen when the current GPU is not be listed in the
fd_dev_recs table because it's not supported by mesa, but is supported by
the kernel.

Add a helper function to test if the current GPU is in the supported table,
and use it in fd_pipe_new2.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33830>
2025-03-06 20:00:02 +00:00
Mark Collins
0342d34bdb tu/kgsl: Remove zero CB queue submission fast path
The fast path for kgsl_queue_submit when there are no command buffers
and only sync objects led to breakage for two reasons:
* The fast path was not properly handling duplication of the merged sync
  object assigned to signalled `kgsl_syncobj`(s), which could lead to
  multiple `kgsl_syncobj`s owning the same FD and consequently issues
  such as double close of that FD leading to UB. This is fixed by moving
  to the slow path as it always produces a timestamp sync object which
  can be trivially duplicated.
* The Vulkan specification requires that drivers strictly follow the
  order of submission of command buffers and consequently the order of
  semaphore signal/wait operations. Since no submission was being made
  to the kernel, subsequent submissions could be executed without waiting
  for wait/signal operations from previous submissions to complete.

As both of these issues are fixed by moving to the slow path, this patch
removes the fast path in favor of the more correct slow path.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33894>
2025-03-06 19:40:41 +00:00
Pavel Ondračka
87a90a3b38 r300: fix temps counting for shader-db stats
RC_FILE_INPUT is pretty much just a RC_FILE_TEMPORARY with an initial
value in it. So we regalloc it the same way we do normal temps, however
for unknown reasons (probably to have a bit more readable shader dumps)
we still keep the RC_FILE_INPUT type even though its the same as
temporary. This is handled correctly when emitting the machine code,
however, it was not taken into account in shader stats.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33817>
2025-03-06 19:12:24 +00:00
Martin Krastev
15e0e53b4d svga/ci: enable vmware farm
Farm was down due to infra outage.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33919>
2025-03-06 18:47:49 +00:00
Yiwei Zhang
6868212774 venus: fix a memory corruption in query records recycle
The free list must be re-initialized. Found the bug while running:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.device_compability_khr.gpu_built.top
where it invokes VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT to purge
the cmd pool resources, and the next alloc still gets cache hit with the
"empty" list.

Fixes: e2c4bafccc ("venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33908>
2025-03-06 18:25:20 +00:00
Ruijing Dong
a3c859d9f3 radeonsi/vcn: vcn5 roi fix
Compared to vcn4, vcn5's implementation has changed.
It needs to apply the qp_delta directly instead of
dividing by 5.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33886>
2025-03-06 17:59:22 +00:00
Marek Olšák
171ee1797b glapi: remove extension definitions that will likely never be implemented
If somebody needs these in the future, they can add them back, but a lot
of these extensions are very old (SUN, SGI, ...).

No code is added, though git diff is having trouble detecting that.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
0a330b1660 egl: use the current dispatch to execute glFlush instead of get_proc_address
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
8bb7033095 glx: fix build with -Dlegacy-x11=dri2
Fixes: 71bb62e3c9 - glx: stop exporting GL functions from libGLX_mesa.so

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
0cebfb15b5 glapi: remove duplicated generated header glapitable.h
mesa/main/dispatch.h is exactly the same. We generated the same header
twice.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
db7e49d5ff glapi: remove static glapi (it's dead code now)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
fefb1a6fb3 meson: remove with_shared_glapi variable (it's always true)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
fde53ac020 glx/xlib: switch glapi from static to shared (which is also static)
Shared glapi doesn't make GL functions globally available, so we have
to use the dispatch API.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
e5c76088e9 meson: never use static glapi because shared glapi is also static and better
Shared glapi is already statically linked with libmesa (src/mesa),
and some parts are statically linked with loaders.

Static glapi will be removed after this is merged.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
José Roberto de Souza
f0f896ef21 iris: Replace BO_ALLOC_* macros by a enum
This changes makes it strongly typed and gives more context.
No changes in behavior expected here.

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/30723>
2025-03-06 16:25:04 +00:00
José Roberto de Souza
a13a6656dd intel: Add function to check if PXP is supported in Xe KMD
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/30723>
2025-03-06 16:25:04 +00:00
José Roberto de Souza
63861472ff iris: Add support to create protected bo and protected exec_queue in Xe KMD
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/30723>
2025-03-06 16:25:04 +00:00
José Roberto de Souza
e146e573f7 anv: Add support to create protected bo and protected exec_queue in Xe KMD
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/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
a99d90d015 anv: Move code adding protected memory type to common code
Xe KMD now has support for protected memory, so lets move it
to common code.

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/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
187e65002f intel: Sync xe_drm.h
Sync with:
	commit 33e26f3544a558e7476eb221ff33173759b3a116
	Merge: 16893dd23f6d1 b7b68c6e36776
	Author: Dave Airlie <airlied@redhat.com>

	    Merge tag 'drm-xe-next-2025-02-24' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

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/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
4860532f49 anv: Remove protected memory support from compute queue
CCS don't support MI_SET_APPID instruction, that might be the reason
some tests protected memory tests fail on CCS.
Re-enable it if a workaround/solution is found.

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/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
008ac818ba intel/common: Retry GEM_CONTEXT_CREATE when PXP have not finished initialization
If PXP initialization is not completed and application requested a
protected context the GEM_CONTEXT_CREATE will wait up to 250ms for
PXP to finish initialization but if that do not happens it will
return a error and set errno to EIO.
This patch add the missing retry handling.

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/30723>
2025-03-06 16:25:03 +00:00
Karol Herbst
ce60f47e96 rusticl/program: fix building kernels
We ended up with duplicates, but also rebuilt the same kernel over and
over again for multi dev builds.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
57a7e86aa9 rusticl/program: rework build_nirs so it only touches devices we care about
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
241279ac2c rusticl/program: loop over all devices inside Program::build
We want to build the kernels once and atm we are doing it several times
for each device.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
e434ce1559 rusticl/program: pass options by reference
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
b2f3933c8d rusticl/program: implement CL_INVALID_PROGRAM_EXECUTABLE check in clGetProgramInfo
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Rob Clark
ee787b64ed freedreno: Wait for imported syncobj fences to be available
Waiting on a fence created from an imported syncobj needs wait for the
fence_fd to become available

Fixes piglit tests added in https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/992

Fixes the following issue for freedreno: #12650

Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724>
2025-03-06 15:12:31 +00:00
Rob Clark
fac2c4af1b tc: Add missing tc_set_driver_thread()
Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724>
2025-03-06 15:12:31 +00:00
Rebecca Mckeever
6df35783cc panvk: Enable shaderStorageImageExtendedFormats
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33459>
2025-03-06 14:45:17 +00:00
Rebecca Mckeever
27037efcfd panvk: Add STORAGE_IMAGE_BIT feature for formats supporting sampled images
All formats that support sampled images should also be suitable for
storage images.

Fixes: d970fe2e ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33459>
2025-03-06 14:45:16 +00:00
Valentine Burley
90f33b217d panfrost/ci: Pin g610-gl job to 4GB DUTs
Use exclusively the 4GB devices for the panfrost-g610-gl job, to preserve
the 8GB+ devices for the Vulkan jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:36 +00:00
Valentine Burley
dceb9a1a9b panfrost/ci: Shorten Piglit job names
Drop extra gl and gles labels from the job names.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:35 +00:00
Valentine Burley
b310a4a13d panfrost/ci: Add a Piglit job on G57
We have more than enough devices available to add a new Piglit job on the
new mt8195-cherry-tomato-r2 device.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:35 +00:00
Valentine Burley
815295e7bb panforst/ci: Migrate the G57 GL job to MT8195
Migrate the panfrost-g57-gl job to a new device in LAVA,
mt8195-cherry-tomato-r2. This DUT is faster than the
mt8192-asurada-spherion-r0 device it replaces.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:35 +00:00
Vasily Khoruzhick
dd765da872 lima: ppir: try inserting nodes into successor instr for uncond branch
It is safe to attempt inserting a node into the same instruction as
successor if successor is an unconditional branch.
ppir_instr_insert_node() will take care of conflicts with ALU_COMBINE
slot

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
2025-03-06 13:25:40 +00:00
Vasily Khoruzhick
fa9ddbe82b lima: ppir: optimize branches
Implement 2 optimizations for branches:

1) if unconditional branch target is a block that only has
   unconditional branch, propagate the target
2) optimize following contruction:
   block 1:
   ...
   if (cond) block 3
   block 2:
   branch block N
   block 3:
   ...

   into

   block 1:
   ...
   if (!cond) block N
   block 2:
   block 3:
   ...

Note: optimization 1) significantly improves runtime of if ladders, but
it is not visible in shader-db because we do not track shortest/longest
path and it doesn't always create dead code (usually just a single
instruction)

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
2025-03-06 13:25:40 +00:00
Vasily Khoruzhick
69b119bc00 lima: ppir: assign actual index to discard block
Discard block is always added to the block list after translation from NIR,
so we can just assign it an index that equals to block list size.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
2025-03-06 13:25:40 +00:00
Samuel Pitoiset
2a56afed8d radv: switch to device address from vk_buffer
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:01 +00:00
Faith Ekstrand
c99039e189 vulkan/meta: Use vk_buffer.device_address directly
This saves us jumping through an entrypoing just to fetch a uint64_t.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:01 +00:00
Faith Ekstrand
b808277d09 hk: Use the new buffer device address infrastructure
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:01 +00:00
Faith Ekstrand
8ca0531485 panvk: Use the new buffer device address infrastructure
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:00 +00:00
Faith Ekstrand
7900ff5c56 nvk: Use the new buffer device address infrastructure
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:00 +00:00
Faith Ekstrand
73da18b956 vulkan: Add device address helpers to vk_buffer
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:00 +00:00
Job Noorman
c44243099f ir3: lower immediates to const regs in preamble on a7xx
On a7xx, const registers should be loaded via the preamble instead of
uploaded by the driver to the const state. This commit implements this
by adding a new pass that emits the consts created by ir3_cp to a
sequence of stc instructions in the preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
fbe8fc0dae ir3: fix max const size calculation for the binning pass
The binning pass should never exceed the const size of the non-binning
pass.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
434b82469f ir3: make const_imm_index_to_reg helper public
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
68ab25e6d4 ir3: split immediate state from rest of const state
On a7xx, the immediates that get promoted to const registers will be
initialized in the preamble instead of being part of the const state. So
technically, we won't need the immediate state that is part of the const
state anymore on a7xx. However, it is still a convenient place for
ir3_cp to store the immediates that should be promoted to const
registers before they are lowered to the preamble.

This causes one issue: the binning pass isn't allowed to modify the
const state while it's perfectly fine for it to use different immediates
compared to the non-binning pass on a7xx. Even pre-a7xx this is fine as
long as the size of the immediate buffer is the same.

To allow the binning pass to modify its immediate state while keeping
its const state immutable, this commit moves the fields related to
immediates into a new struct. Runtime checks are added to enforce that
the size of the immediate buffer is the same for the binning and
non-binning variant pre-a7xx.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
f9fc0fc8fd ir3/sched: handle dependencies between stc and const reads
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
0f6ec14925 ir3: fix false dependencies of rpt instructions
When merging multiple instructions into one rpt instruction, the false
deps of the rpt instruction should be the union of the false deps of its
parts.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 4c4366179b ("ir3: add post-RA pass to merge repeat groups into rptN instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
62d2069617 ir3: add helper to create STC
Creating STC is complicated since we might need to use a1.x for
addressing. Extract the current code into a helper so that it can be
used elsewhere.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Job Noorman
3186443057 ir3: remove hash table for a1.x
Removing duplicates is now supported by ir3_cse so the hash table is
unnecessary. Removing it will make it easier to create instructions
using a1.x without having access to ir3_context.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Job Noorman
06978e0c0c ir3/cse: add support for mov a0.x/a1.x
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Job Noorman
ac18eccd74 ir3: add ir3_cursor_current_block helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Lorenzo Rossi
69982e6f2f nak: Flatten AttrAccess into instructions
The AttrAccess structure provided inputs for similar instructions, some
inputs were used only in a subset of instructions, needing asserts and
dummy values.
This commit flattens the struct directly in the instructions removing
the unused fields and cleaning up the code.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33899>
2025-03-06 05:29:56 +00:00
Eric Engestrom
2c034470ed docs: add sha sum for 25.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33904>
2025-03-06 04:07:22 +00:00
Eric Engestrom
4fb7c57e29 docs: add release notes for 25.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33904>
2025-03-06 04:07:22 +00:00
Eric Engestrom
487af01696 docs: update calendar for 25.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33904>
2025-03-06 04:07:20 +00:00
Corentin Noël
24dbc278f0 tnn: nir: Don't use deprecated NIR_PASS_V macro anymore
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:21 +00:00
Corentin Noël
acd5f2971a ntt: nir: Don't use deprecated NIR_PASS_V macro anymore
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:20 +00:00
Corentin Noël
eb1274ef08 nir: Add bool return value to nir_legacy_trivialize(..)
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:20 +00:00
Corentin Noël
8eae89f3f0 virgl: nir: Don't use deprecated NIR_PASS_V macro anymore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:20 +00:00
Christian Gmeiner
71e2ddcede etnaviv/ci: Add gles2 run for GC3000
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33838>
2025-03-06 03:09:12 +00:00
Assadian, Navid
9a88afecbd amd/vpelib: More parameters to the segmentation process and introduce validation hook
Generalization for the following:
1. pass in the scaler output alignment requirement to segment number determination function
2. parameter validation hook

Signed-off-by: Navid Assadian <Navid.Assadian@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Zhao, Jiali
37c244998a amd/vpelib: Fix studio output CSC
Fix studio output CSC.

Signed-off-by: Jiali Zhao <Jiali.Zhao@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Visan, Tiberiu
da04cbca66 amd/vpelib: Apply normalization for full range
[WHY]
The full range needs to have the same brightness normalization like the
studio range.

[HOW]
Apply the same normalization.

Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Visan, Tiberiu
b3d43cea08 amd/vpelib: Fix studio range
[WHY]
Studio signal has an offset.

[HOW]
Subtract that offset.

Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Leder, Brendan Steve
69c331e2c0 amd/vpelib: Reformat index variables and update enum
Reformat index variables to indicate loop specifics and update enum to match formatting guide.

Signed-off-by: Brendan Steve Leder <Brendansteve.Leder@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Vasily Khoruzhick
6528ee4228 lima: ppir: reuse load_temp/store_temp nodes if possible
Currently spilling code operates on individual ops rather than on
instructions, and as a result it may create a redundant load_temp op if
an instruction references spilling register several times.

Similarly, it creates multiple stores if there are multiple ops in the
instruction that write different components of the register.

Check whether the instruction already contains a necessary load_temp or
store_temp and reuse it if possible.

shader-db:

total instructions in shared programs: 27718 -> 27673 (-0.16%)
instructions in affected programs: 2786 -> 2741 (-1.62%)
helped: 18
HURT: 0
helped stats (abs) min: 1 max: 8 x̄: 2.50 x̃: 1
helped stats (rel) min: 0.39% max: 5.33% x̄: 2.05% x̃: 0.80%
95% mean confidence interval for instructions value: -3.70 -1.30
95% mean confidence interval for instructions %-change: -3.09% -1.01%
Instructions are helped.

total loops in shared programs: 4 -> 4 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 390 -> 381 (-2.31%)
spills in affected programs: 145 -> 136 (-6.21%)
helped: 9
HURT: 0

total fills in shared programs: 1210 -> 1174 (-2.98%)
fills in affected programs: 149 -> 113 (-24.16%)
helped: 9
HURT: 0

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33753>
2025-03-06 01:48:55 +00:00
Mike Blumenkrantz
7200cf8827 radv: don't unnecessarily flag prolog recalc when binding VBOs
another 25% for vkoverhead@draw_vbo_change_dynamic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
4f71370830 radv: get vbo info directly into dgc upload
don't need this memcpy

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
b78835de13 radv: move non_trivial_format calc to dynamic VI bind
this otherwise gets pointlessly recalculated on every draw when a VBO changes

another 10% for vkoverhead@draw_vbo_change_dynamic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
42db08c275 radv: split out dynamic vertex input descriptor writing
~25% boost to vkoverhead@draw_vbo_change_dynamic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
22434edefc radv: inline some vertex descriptor functions
+5-7% in vkoverhead 16

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
00f51f7215 radv: eliminate a memset in radv_get_vbo_info()
very minor perf cost

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
e2ccd638a8 radv: roll line topology dynamic state changes into existing rast samples flag
this eliminates uploading rast samples whenever prim type changes even
when rast samples will not be changed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
b2123314bd radv: store vertex prolog simple input check to cmdbuf on vs bind
no need to check this again and again

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
881d94a40a radv: store num_attributes to shader info
this eliminates a util_last_bit from the prolog hotpath

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
d40dd4bfb7 radv: rewrite radv_get_line_mode() conditional
this was weirdly hard to parse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Alyssa Rosenzweig
6c24ac7d21 panfrost: clean up CL meson rules
we shouldn't need any of this anymore. I cleared out similar gunk from Asahi, we do the same for Panfrost here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
4d6e37066a meson,clc: set CL standard from meson
this is slightly less weird I think.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
c0022b6603 intel: use common CL args
this contains two behaviour changes:

* NDEBUG no longer set in debug builds (so asserts work in debug, but are still
  stripped out in release as expected).
* macro map set properly for assertions to be reported with proper paths.

together this makes assertions do the right thing on Intel and brings us in
alignment with asahi+panfrost

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
256cc0c927 meson: set NDEBUG appropriately for OpenCL
this strips device-side asserts in release drivers. this is a behaviour change
for asahi/panfrost/nvk, but hopefully a welcome one!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
f35172b6a4 meson: make CL args common
this will let us unify behaviour across drivers a bit more.

no functional change here. (intel is specifically excluded to avoid a functional
change.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Caio Oliveira
54912281a0 brw: Always verify EU compaction in debug mode
There's already code to verify that any compacted instruction
that we produce is equivalent to the original uncompacted
instruction -- including detailed output if it fails.

This patch enables this verification in debug build and will
abort in case it fails.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33821>
2025-03-06 00:14:14 +00:00
Caterina Shablia
a9592a0c15 panvk: enable subgroupExtendedTypes
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
c4941376a9 pan/bi: lower subgroups before lowering int64
nir_lower_int64 doesn't know how to lower 64-bit imul reductions and
scans. Lowering subgroup operations first leaves us with just 64-bit
ballot and read_invocation, which are easily lowered.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
0f520e3d5a pan/bi: lower non-32-bit ballot{,_relaxed}
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
14cecd0621 pan/bi: ensure src bit sizes of ballot{,_relaxed} and read_invocation
* ballot{,_relaxed}'s src[0] must always be a 32-bit value.

 * read_invocation's src[0] must always be at most 32-bit value. While
   the HW instruction always operates on a 32-bit value, it's important
   to remember that it's just a data movement operation, so garbage in
   the high bits of a 32-bit value representing a narrower value don't
   present an issue.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
ca9ff8c8c7 nir: teach nir_lower_bit_size to handle ballot and ballot_relaxed
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/33365>
2025-03-05 22:58:15 +00:00
Samuel Pitoiset
279511bea0 ci: update VKCTS main to ba86fb95004331f2cf571dd9adefe2458290ee11
RADV is the only driver using VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33707>
2025-03-05 22:03:33 +00:00
Alyssa Rosenzweig
386e777cad v3dv: fix clang warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33878>
2025-03-05 21:28:53 +00:00
Alyssa Rosenzweig
8b7389b1a9 asahi: port to common stats framework
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33814>
2025-03-05 20:50:17 +00:00
Alyssa Rosenzweig
722b83434a util: add shader statistic framework
All mature drivers report shader statistics in various places. GL drivers use
util_debug for shader-db's report script. VK drivers use executable statistics
feeding the report fossil script. Many drivers also have a magic env var to
dump the stats to stdout/stderr in addition to these standard forms.
Implementing any of these 3 reports requires doing brittle string processing in
C (GL, stdout) or piles of boilerplate (VK). Additionally, the logic gets
duplicated in every driver and duplicated between GL and VK.

And to add insult to injury, the information is duplicated *again* in the report
fossil script :'(

This commit introduces a new 'shader statistic framework' that aims to unify
statistics reporting across all drivers and across GL&VK. With the new approach,
a common XML file defines all the statistics for the tree. The common code
introduced here then autogenerates from that XML file an appropriate C header.
The header contains a C struct for each ISA, and autogenerated print/report
functions. Minimal driver integration is required: just filling out the stats
struct and calling the appropriate functions.

In this MR, 3 driver families are added as examples. Panfrost/PanVK and
Asahi/Honeykrisp are added as "complete" examples. Neither Vulkan driver
reported nontrivial executable statistics; with these changes, both report all
the same statistics that the GL drivers report. Turnip is also added partially -
it's not plumbed into ir3/gallium yet but just using the XML reduces boilerplate
a ton for Vulkan statistics.

[It is intended for this XML to be consumed also by shader-db's python scripts,
but that's not done here.]

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33814>
2025-03-05 20:50:17 +00:00
Alyssa Rosenzweig
2a44266d57 vulkan: add helpers to work with executable statistics
this is a lot of boilerplate in each driver. add helpers for it instead. the
common framework will use these internally, but drivers that don't want the
framework for whatever reason could use these themselves too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33814>
2025-03-05 20:50:17 +00:00
Samuel Pitoiset
682723c0c4 spirv/tests: add a test for lower_terminate_to_discard
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
40ea8c2edc spirv/tests: add a test for force_tex_non_uniform
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
74e1cebd02 spirv/tests: add a test for force_ssbo_non_uniform
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
2e3e3249b8 spirv/tests: add a test for NonSemantic.DebugBreak
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
c9eb0a2db5 spirv/tests: initialize compiler options in constructor
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
f2eb31b1a2 spirv: move workarounds to an inner struct in spirv_to_nir_options
To be more explicit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Mike Blumenkrantz
2c6837260e zink: only add fb surf refs on unbind
this only applies to cases where a fb state persists across cmdbufs,
but it's consistent with how other resource binds work

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
c32e67e0d9 zink: use VKCTX for vertex buffer binds and delete unused screen local
also fix weird indentation

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
540d35b27f zink: start using ctx->vertex_state_changed again
SetVertexInput is a heavy call.

also move this call outside zink_bind_vertex_buffers() since it doesn't
use any of the same data and was invoking unnecessary loops

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
f136f8ddd7 zink: split set_vertex_buffers to avoid conditionals
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
7909adcef1 zink: delete zink_batch_state::ref_lock
this kills perf when managing lots of objects per batch and can
be trivially replaced by separate buffer lists for unsync usage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
28259584f4 zink: improve precision on changes to depth bias between draws
this cuts calls here from 18k/frame to 18/frame in some synthetic
benchmarks

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Eric Engestrom
ac638928a8 v3d/ci: mark traces humus/AmbientAperture and humus/DynamicBranching3 as flaky
They've prevented a lot of MRs from being merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33882>
2025-03-05 17:56:48 +00:00
Lionel Landwerlin
199a052481 anv: fixup indentation around Wa_16014912113
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
888b2ec7b0 anv: break down Wa_16014912113 in need/apply parts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
93a327c4e6 anv/brw: move INTEL_MSAA_* flag computation to the compiler
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
beaba53010 brw: make intel_shader_enums.h opencl importable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
02eb26de0a genxml: simplify genX_rt_pack.h
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:11 +00:00
Lionel Landwerlin
374d2168ee intel/genxml: add a genX RT include header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:11 +00:00
Lionel Landwerlin
17ba9a19d1 anv/apply_layout: split binding table building into its own function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:11 +00:00
David Rosca
3ea3aa0f90 radeonsi/vcn: Support H264 encode weighted_bipred_idc
Only default (0) and implicit (2) are supported, explicit (1) is not.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33846>
2025-03-05 16:51:32 +00:00
Rhys Perry
0ec174afd5 aco: insert dependency waits in certain situations
This seems to fix some artifacts, but we're not sure why, so it might not
be a correct or optimal solution.

fossil-db (navi31):
Totals from 28424 (35.81% of 79377) affected shaders:
Instrs: 30112910 -> 30348977 (+0.78%); split: -0.00%, +0.78%
CodeSize: 159542980 -> 160485336 (+0.59%); split: -0.00%, +0.59%
Latency: 221438396 -> 221500856 (+0.03%); split: -0.00%, +0.03%
InvThroughput: 38154231 -> 38159984 (+0.02%); split: -0.00%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33853>
2025-03-05 16:22:54 +00:00
Faith Ekstrand
11939a70df zink: Use pipe_box helpers for damage calculations
The old code got the accumulation a bit wrong.  For one thing, it always
accumulates with whatever was there instead of resetting to empty each
time.  For another, it sets with with y and height with x when it writes
back to the resource.  This is also all too complicated because it
converts between pipe_box, u_rect, and VkRect2D on every iteration.

Instead, there are helpers in util/box.h which will do most of this work
for us and they're correct.  Let's just use them to get rid of the bugs
and make everything simpler and more obvious at the same time.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12194
Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
2025-03-05 15:46:23 +00:00
Faith Ekstrand
3346eb55ed iris: Use pipe_box helpers for damage calculations
The old calculations are wrong.  They add width+x and call that a width
the same with y and height.  This is wrong but it's wrong in a way that
only ever increases damage so we never noticed it.  However, util/box.h
has helpers for these operations which don't have this bug.  Let's use
them and make the code simpler, more obvious, and correct.  We also
weren't flipping the damage like we're supposed to and that was most
likely not getting noticed because of the over-damage.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
2025-03-05 15:46:23 +00:00
Faith Ekstrand
8cf921a742 util/box: Add a intersect_2d helper
Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
2025-03-05 15:46:23 +00:00
Danylo Piliaiev
75a85134fa tu: Be more granular in calculating whether blend state reads color
There could be several attachments where none of them are written to.
Happens with pre-2.0 DXVK.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33802>
2025-03-05 15:16:37 +00:00
Michael Cheng
014f376755 anv: Change as_build to show num tlas/blas
As_build now shows the number of tlas/blas that was built.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33720>
2025-03-05 14:19:56 +00:00
Michael Cheng
9ba7005d25 vulkan : Pass in number of tlas/blas being built
Pass the counts for top-level and bottom-level acceleration
structures to the debug_marker.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33720>
2025-03-05 14:19:56 +00:00
Mary Guillemard
2f1ce296d0 pan/bi: Ensure we select b0 with halfswizzle in va_lower_constants
In case of constant lowering with halfswizzle sources, we were selecting
h01 causing an invalid instruction error to be yield later.

This can only be hit by conversion instructions and shouldn't be seen in
the wild (as this should be eliminated before entering the backend).

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d07fb9a67 ("pan/va: Handle 8-bit lane when lowering constants")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
8948b74955 pan/bi: Fix out of range access in bi_instr_replicates
For replicates, we were checking equivalence between two sources on some
instructions but some of them only had one source causing an out of
bound access and check against unrelated data.

Instead we now always return true for those instructions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f7d44a46cd ("pan/bi: Optimize replication")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
01ec34fe57 pan/bi: Lower FREXPE.v2f16 and FREXPM.v2f16 on v11+
This was removed on v11.

Fix dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.*
failures on v11+.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
cbc42abdb3 pan/bi: Run bifrost_nir_lower_algebraic_late while there is progress
With v11 needing specific lowering, we now need to run it multiple time
to ensure every new instructions materialized aren't invalid.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
54ce78c4e1 pan/bi: Run nir_lower_bit_size after algebraic
nir_opt_algebraic can possibly materialize instructions with a bit_size that
need to be lowerd.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Samuel Pitoiset
0da8a6bfd5 docs: adjust NGG culling options description
NGG culling is also enabled by default on GFX10 now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:08 +00:00
Samuel Pitoiset
ab4d2d447a radv: remove redundant radv_instance::drirc::rt_wave64
Use RADV_PERFTEST_RT_WAVE_64 instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:08 +00:00
Samuel Pitoiset
54a62c5c23 radv: use radv_emulate_rt() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:08 +00:00
Samuel Pitoiset
9108c198bb radv: fix trap handler exception options
They are same values.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:07 +00:00
Samuel Pitoiset
df3f2df966 docs: add missing RADV_PERFTEST=video_encode description
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:07 +00:00
Tomeu Vizoso
854bc2ee05 kopper: Explicitly choose zink
If we pass zink=false to pipe_loader_drm_probe_fd, it could happen that
a Gallium driver that had been already discarded because of not
supporting the graphics CAP will be chosen.

To avoid that, explicitly ask pipe_loader_drm_probe_fd to choose the
zink Gallium driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Lucas Stach
7e76c67632 kmsro: look for graphics capable screen as renderonly device
Exposing a rendernode from a supported driver is not a sufficient
matching criteria to qualify as the render part of a renderonly
device, as the rendernode might only expose compute or 2D accel
capabilities.

Look for a screen that actually supports gallium graphics operations
to qualify as a renderonly screen.

v2 (Tomeu): Have pipe-loader return a list of FDs for kmsro to choose
            based on capabilities.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Tomeu Vizoso
cfad6fb037 egl/surfaceless: Only choose drivers that expose the graphics capability
This is to prevent applications to try to render to devices that have no
3D hardware (eg. NPUs).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Corentin Noël
45e771f4fb ci: Update CrosVM and Virglrenderer
Update to their latest version on time

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33796>
2025-03-05 10:16:49 +00:00
Tapani Pälli
288f932b78 iris: restrict TessellationDistributionLevel for Wa_16025857284
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/33864>
2025-03-05 09:55:05 +00:00
Tapani Pälli
1674cb3665 anv: restrict TessellationDistributionLevel for Wa_16025857284
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/33864>
2025-03-05 09:55:05 +00:00
Tapani Pälli
1a5cbbeb47 intel/dev: update mesa_defs.json from internal database
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/33864>
2025-03-05 09:55:05 +00:00
Mike Blumenkrantz
3f7b0c3951 mesa: avoid creating incomplete surfaces when multiview goes out of range
some drivers can't handle this, and it can't be used anyway, so don't bother

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Mike Blumenkrantz
89c2639227 mesa: add error handling for OVR_multiview
there's a lot that were missed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Mike Blumenkrantz
2b37f23314 gallium: fix pipe_framebuffer_state::view_mask
this is the mask of the number of views, not the actual views being
selected

llvmpipe previously had this wrong, though I don't understand how
vkcts didn't cover it

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Mike Blumenkrantz
5ef60aef63 llvmpipe: pass layer count to rast clear
this otherwise passes the fb layer, which is not quite right when
using multiview with view indexing

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Marek Olšák
e19f4c043d gallium/u_blitter: change blitter_attrib from union to struct
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33837>
2025-03-05 08:31:12 +00:00
Marek Olšák
ca09c173f6 gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer
Pass the clear color via a constant buffer instead of a FS input.
This results in less driver code and it could be faster on some GPUs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33837>
2025-03-05 08:31:12 +00:00
Faith Ekstrand
99b5970eb2 egl/wayland: Pass the original wl_surface to kopper
The Vulkan WSI code creates its own proxies so there's no benefit to
passing the proxy in.  It only screws things up.

Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33860>
2025-03-05 07:27:16 +00:00
Faith Ekstrand
fddff0d1b8 egl/dri2: Rework get_wl_surface_proxy()
Instead, just make it a helper for getting the wl_surface from the
wl_egl_window.  We'll want this in the next commit.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33860>
2025-03-05 07:27:16 +00:00
Mike Blumenkrantz
71d949a8c5 svga/ci: disable vmware farm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33872>
2025-03-05 07:15:31 +00:00
Mike Blumenkrantz
534436f863 zink: explicitly check usage in buffer barriers
it's technically possible for a resource to have no usage but for
batch usage to be set; this can occur if a resource is used,
its cmdbuf completes, but the batch state is not reset before the
resource is used again

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Mike Blumenkrantz
c83d459225 zink: alloc bo ids for non-slab bos too
this otherwise breaks perf for buffer lists and triggers full walks
on every lookup

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Mike Blumenkrantz
4d0f79a398 zink: don't reset all batch states when stalling
this makes perf worse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Mike Blumenkrantz
61b0955308 zink: always check submit_count to disambiguate when checking/waiting
this may otherwise erroneously detect usage on a batch state which has
already been reset

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Faith Ekstrand
78a80b9bf1 zink: Revert "zink: enable single-plane modifiers for generic 2D exports"
This reverts commit df1ff3c711.  When
clients allocate BOs via GBM's gbm_bo_create(), they expect those BOs to
work with KMS without modifiers.  Assigning them a modifier and hoping
that they then query that modifier even though they used the legacy API
to create the BO is pretty mean.  In particular, this breaks KWin which
doesn't use modifiers if the KMS device doesn't support atomic.

Fixes: df1ff3c711 ("zink: enable single-plane modifiers for generic 2D exports")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33887>
2025-03-05 05:52:20 +00:00
Erik Faye-Lund
bcff33ff93 panvk: disable shaderFloat16 on bifrost
We're failing a bunch of tests on G52 otherwise. Let's just disable this
feature on older gens for now, until we've gotten this fixed.

Fixes: 55c476efed ("panvk: advertise shaderFloat16")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33881>
2025-03-05 04:01:45 +00:00
Alyssa Rosenzweig
bf4ba66dbb panfrost,panvk: fix clang warnings
note the kernel reg one is a functional change.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33877>
2025-03-05 02:57:24 +00:00
Vasily Khoruzhick
fdeabf4162 lima: ppir: reuse uniform load in instruction if possible
We clone loads for uniforms for each user, which means that each
ppir_node will have its own, however an instruction may have several
nodes that need to load uniforms. Currently, in this case ppir compiler
will place all but one load uniforms nodes into a new instruction and
create an extra mov.

We can optimize that by checking whether load_uniform node in the instruction
is the same as the one we are trying to insert and reuse it. It is safe
to do so, because successors use pipeline register, so regalloc doesn't
care about it.

shader-db:

total instructions in shared programs: 27808 -> 27718 (-0.32%)
instructions in affected programs: 2652 -> 2562 (-3.39%)
helped: 31
HURT: 0
helped stats (abs) min: 1 max: 8 x̄: 2.90 x̃: 2
helped stats (rel) min: 0.56% max: 33.33% x̄: 5.12% x̃: 4.11%
95% mean confidence interval for instructions value: -3.78 -2.03
95% mean confidence interval for instructions %-change: -7.24% -2.99%
Instructions are helped.

total loops in shared programs: 4 -> 4 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 391 -> 390 (-0.26%)
spills in affected programs: 1 -> 0
helped: 1
HURT: 0

total fills in shared programs: 1213 -> 1210 (-0.25%)
fills in affected programs: 3 -> 0
helped: 1
HURT: 0

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33746>
2025-03-04 22:04:11 +00:00
Georg Lehmann
20dd6dfa12 aco/isel: use s_mul_i32 instead of s_cselect_b32 for a ? b : 0
It doesn't require SCC and this is more consistent with b2f.

Foz-DB Navi21:
Totals from 2107 (2.64% of 79789) affected shaders:
Instrs: 6619774 -> 6619280 (-0.01%); split: -0.01%, +0.00%
CodeSize: 36754448 -> 36752396 (-0.01%); split: -0.01%, +0.00%
Latency: 62207779 -> 62206422 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 13090494 -> 13090204 (-0.00%); split: -0.00%, +0.00%
VClause: 171572 -> 171573 (+0.00%)
SClause: 257528 -> 257530 (+0.00%)
Copies: 607680 -> 607204 (-0.08%); split: -0.10%, +0.02%
VALU: 4189422 -> 4189418 (-0.00%)
SALU: 1001750 -> 1001264 (-0.05%); split: -0.07%, +0.02%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
2d68efd9f3 aco/opt_postRA: remove scc == 0 for more opcodes
Convert special case to s_cselect

Foz-DB Navi21:
Totals from 42 (0.05% of 79789) affected shaders:
Instrs: 91826 -> 91690 (-0.15%)
CodeSize: 496304 -> 495680 (-0.13%)
Latency: 1631974 -> 1631948 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 278772 -> 278766 (-0.00%)
SALU: 10627 -> 10491 (-1.28%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
83247ffa30 aco/opt_postRA: remove scc != 0 with multiple uses
These can always be removed.

Foz-DB Navi21:
Totals from 39 (0.05% of 79789) affected shaders:
Instrs: 138352 -> 138299 (-0.04%)
CodeSize: 710424 -> 710272 (-0.02%)
Latency: 468276 -> 468254 (-0.00%); split: -0.01%, +0.00%
InvThroughput: 108970 -> 108973 (+0.00%)
SALU: 18785 -> 18732 (-0.28%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
6445ba0f05 aco/opt_postRA: allow try_optimize_scc_nocompare for all instructions
If the old SCC source worked, the new one will too.

Foz-DB Navi21:
Totals from 106 (0.13% of 79789) affected shaders:
Instrs: 255233 -> 254825 (-0.16%)
CodeSize: 1337308 -> 1335692 (-0.12%)
Latency: 1455208 -> 1454524 (-0.05%); split: -0.05%, +0.00%
InvThroughput: 385624 -> 385612 (-0.00%); split: -0.00%, +0.00%
SALU: 53976 -> 53568 (-0.76%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
3386ea09d4 aco/opt_postRA: split try_optimize_scc_nocompare in two functions
These are two independent steps, no real reason why they should be in the same
function.

No FOZ-DB changes.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
David Rosca
9d020826ca radeonsi/vcn: Add radeon_enc_av1_picture_type
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
2025-03-04 20:42:41 +00:00
David Rosca
d92781508b radeonsi/vcn: Set all pic params for H264 encode references
Fixes encoding B-frames with I-frame as L1 reference.

Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
2025-03-04 20:42:41 +00:00
David Rosca
24cbc4bfcb pipe: Remove PIPE_AV1_ENC_FRAME_TYPE_SHOW_EXISTING
This frame type can't be encoded.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
2025-03-04 20:42:41 +00:00
Karol Herbst
5c1f61d900 nir: Do not eliminate dead writes to shared memory in called functions.
Fixes regressions in rusticl and c11_atomic OpenCL CTS test.

Fixes: e65c1473de ("nir: Eliminate dead writes to shared memory at the end of the program")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33807>
2025-03-04 19:41:13 +00:00
Konstantin Seurer
44110fe004 lavapipe: Enable debug information if GALLIVM_DEBUG=symbols is set
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:49 +00:00
Konstantin Seurer
3b857064b6 gallivm: Run nir_lower_load_const_to_scalar
Vector defs are annoying to look at in the debugger.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:49 +00:00
Konstantin Seurer
83cac4e7e9 gallivm: Add a debug variable for the exec mask
Makes it show up in GDB.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
3f5a576c9e gallivm: Emit debug info for definitions
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
77e84aba5c gallivm: Handle nir_instr_debug_info
Emits llvm source locations using the nir line numbers provided by
nir_instr_debug_info.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
d6ca378f1b llvmpipe: Annotate functions with debug information
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
95a68076a7 gallivm: Create a debug builder and add GALLIVM_DEBUG=symbols
Also defers destroying the execution engine since destroying it early
looses debug information.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
3aeab4ce40 nir/print: Do not print debug information when gathering it
Referencing a shader string with differend debug information is
confusing.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
a04b5ebd3c nir/sweep: Fix handling instructions with debug info
When debug information is present, the nir_instr pointer is not the
start of the allocation.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Guilherme Gallo
fbc55afbdf ci/lava: Properly detect VMWARE farm
This will make the job definition default to the UART format for vmware
jobs, as only Collabora's farm relies on the SSH job definition due to
the unreliable Chromebook UART in LAVA.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33874>
2025-03-04 16:46:17 +00:00
David Rosca
5461ed5808 Revert "radeonsi/vcn: Limit size to target size in AV1 decode"
This is now done in frontend.

This reverts commit 3a6513d7c4.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
2025-03-04 16:18:04 +00:00
David Rosca
c60e4f0004 frontends/vdpau: Set AV1 max_width/height to surface size
Ideally this would be passed in pic params as the values are
in sequence header, but using the surface size also works.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
2025-03-04 16:18:04 +00:00
David Rosca
d0414ef7fb frontends/va: Set AV1 max_width/height to surface size
Ideally this would be passed in pic params as the values are
in sequence header, but using the surface size also works.
Also add sanity checks for frame size.

Fixes decoding av1-1-b8-22-svc-L2T1 and av1-1-b8-22-svc-L2T2.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
2025-03-04 16:18:04 +00:00
Lucas Fryzek
b37bcd01ed anv: Expose VK_EXT_device_memory_report
Also mark VK_EXT_device_memory_report as supported by anv in
docs/features.txt

Co-authored-by: shenghualin <shenghua.lin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767>
2025-03-04 15:24:39 +00:00
Lucas Fryzek
f01ad7c34c anv: Implement VK_EXT_device_memory_report
Report device memory events for:
  - command buffers
  - pipelines
  - descriptor sets and descriptor pools
  - device memory

Co-authored-by: shenghualin <shenghua.lin@intel.com>
Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767>
2025-03-04 15:24:39 +00:00
Lucas Fryzek
cfcc522bf8 vulkan/runtime: Add object type to DMR API
radv: Update DMR usage to make use of object type arg

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767>
2025-03-04 15:24:39 +00:00
Nikita Popov
92638e543b clover: Fix MSVC build
Guard the include of dlfcn.h with HAVE_DLFCN_H. Use the
FALLBACK_CLANG_RESOURCE_DIR if it is not available.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33869>
2025-03-04 14:16:20 +00:00
Patrick Lerda
7cd0ced50d r600: update cayman_convert_border_color()
This change was tested on cayman. This change fixes all the tests fixed by
the evergreen commit, and fixes the 32-bits integer tests as well:
spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled/gl_compressed_rgb_bptc_signed_float, swizzled, border color only: fail pass
spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled/gl_compressed_rgb_bptc_unsigned_float, swizzled, border color only: fail pass
spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled/gl_compressed_rgba_bptc_unorm, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r32i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r32ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg32i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg32ui, swizzled, border color only: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33579>
2025-03-04 13:55:19 +00:00
Patrick Lerda
0551e284bb r600: update evergreen_convert_border_color()
This change implements all the possible swizzle permutations
for one and two channel formats.

Note: The border color on integer 32-bits formats is working
only on cayman.

This change was tested on palm. Here are the tests fixed:
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_r16, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_r8, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_rg16, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_rg8, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_r16f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_r32f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_rg16f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_rg32f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r16i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r16ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r8i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r8ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg16i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg16ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg8i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg8ui, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_red_rgtc1, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_rg_rgtc2, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_signed_red_rgtc1, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_signed_rg_rgtc2, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_r16_snorm, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_r8_snorm, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_rg16_snorm, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_rg8_snorm, swizzled, border color only: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33579>
2025-03-04 13:55:18 +00:00
Patrick Lerda
fd874bdd0c r600: fix emit_image_size() range base compatibility
This change fixes a regression introduced with 8b5d41cacb.
Indeed, lookup_resid was not updated.

This change was tested on palm and cayman. Here are the tests fixed:
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-float: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-int: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-uint: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-float: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-int: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-uint: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-float: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-int: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-uint: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-float: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-int: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-uint: fail pass

Fixes: 8b5d41cacb ("r600/sfn: Use range_base for atomics and images")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33352>
2025-03-04 12:05:46 +00:00
Nikita Popov
e4eb5e80c3 clover: Don't include libclc headers
Per https://github.com/llvm/llvm-project/issues/119967 these
headers are internal implementation details of libclc and were
never supposed to be installed. They are not available anymore
since LLVM 20. Instead opencl-c.h should be used.

There already ise a code path for including opencl-c.h, so always
use it.

This didn't work for me out of the box, because the build system
currently hardcodes the clang resource directory, which is incorrect
for Fedora at least. Fix this by using GetResourcePath +
CLANG_RESOURCE_DIR provided by clang instead. This is basically
the same as what is done in clc_helper.c

I've still retained the old behavior as a fallback just in case
(e.g. if clang is linked statically?)

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33805>
2025-03-04 11:32:22 +00:00
Christian Gmeiner
228b516403 etnaviv/ci: Update flakes for gc7000-r6214
This is the result of 50 deqp runs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33857>
2025-03-04 11:08:59 +00:00
Lars-Ivar Hesselberg Simonsen
fe31e7843d panvk: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.

While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.

Fixes: 2ffc05d8d2 ("panvk: Add support for CmdDispatchIndirect")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
2025-03-04 10:01:26 +01:00
Lars-Ivar Hesselberg Simonsen
6bf9ad2610 panfrost: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.

While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
2025-03-04 10:01:18 +01:00
Ivan Avdeev
7271b8ee49 radv,radeonsi: disable compute queue for BC250
BC250 is known to have non-functional compute queue. Thousands
for Vulkan CTS tests fail, and many games are known to have visual
glitches. RADV_DEBUG=nocompute is the known workaround for all these
issues.

Disable compute queue for this chip in both radv and radeonsi.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33116>
2025-03-04 08:07:31 +00:00
Ivan Avdeev
ff6504d4c0 radv: add experimental support for AMD BC-250 board
AMD BC-250 is a mining board based on an AMD APU with an integrated GPU
that kernel recognizes as Cyan Skillfish.

It is basically RDNA1/GFX10, but with added hardware ray tracing
support. LLVM calls it GFX1013, see
https://llvm.org/docs/AMDGPU/AMDGPUAsmGFX1013.html

Support for this GPU hasn't been extensively tested. Some games are
known to work, some non-trivial ray query compute and ray tracing
pipeline rendering works too. Q2RTX works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33116>
2025-03-04 08:07:31 +00:00
Zan Dobersek
72fe9e3fa3 tu: fix zero-index perfcntr collection for derived counters
Skip the zero-index perfcntr collection only if CP_ALWAYS_COUNT is used,
since we want to collect that at the very end/start of collection. But
don't unwittingly ignore that perfcntr if CP_ALWAYS_COUNT isn't being
collected.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 86456cf0e6 ("tu: support exposing derived counters through VK_KHR_performance_query")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33852>
2025-03-04 06:48:57 +00:00
Tapani Pälli
d0b8d7d46c iris: remove dead code that cannot get hit anymore
As of recent changes, MESA_SHADER_GEOMETRY is handled by the if ladder.

CID: 1643918
Fixes: c33ebf09f5 ("iris: fix handling of GL_*_VERTEX_CONVENTION")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33842>
2025-03-04 06:02:17 +00:00
Patrick Lerda
9aea08e1db r600: fix the indirect draw 8-bits path
This change fixes the indirect draw 8-bits path which does
a conversion to 16-bits. This change is implemented to process
the parameters the same way as the other indirect draw paths.

This change was tested on palm and cayman. Here are the tests fixed:
deqp-gles31/functional/draw_indirect/draw_elements_indirect/indices/index_byte: fail pass
deqp-gles31/functional/draw_indirect/random/35: fail pass
deqp-gles31/functional/draw_indirect/random/45: fail pass
khr-gl40/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl41/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl42/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl43/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl44/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl45/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass

Fixes: d80701df8a ("r600g: Implement GL_ARB_draw_indirect for EG/CM")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32802>
2025-03-04 04:13:42 +00:00
Faith Ekstrand
b92117d9bb zink: Don't present to Wayland surfaces asynchronously
Wayland EGL has a driver invariant which requires that any `wl_surface`
(or wp_linux_drm_syncobj_surface_v1) calls happen inside the client's
call to eglSwapBuffers().  Submitting surface messages after
eglSwapBuffers() returns causes serialization issues with the Wayland
surface protocol and can lead to the compositor booting the app.

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12736
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33859>
2025-03-04 03:42:43 +00:00
Patrick Lerda
3cfcb10d8b r600: implement a conformant gl_VertexID with base offset
As explained by d80701df8a, the r600 hardware doesn't implement
the base vertex offset. This change implements this offset as a
constant buffer entry shared with lds.

This change is inspired from 3511a51be0 ("freedreno/ir3: handle
VTXID_BASE for indirect draws").

Note: this feature requires at least evergreen.

This change was tested on palm and cayman. Here are the tests fixed:
spec/arb_draw_indirect/gl_vertexid used with gldrawarraysindirect: fail pass
spec/arb_draw_indirect/gl_vertexid used with gldrawelementsindirect: fail pass
spec/arb_multi_draw_indirect/gl-3.0-multidrawarrays-vertexid -indirect: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32769>
2025-03-04 01:43:19 +00:00
Patrick Lerda
c016f84805 r600: prepare the lds constant buffer to be shared
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32769>
2025-03-04 01:43:19 +00:00
Guilherme Gallo
1dbebd2619 ci/lava: Add U-Boot action timeout for rockchip DUTs
Add a specific timeout for the U-Boot action in LAVA job definitions for
rockchip devices. This ensures sufficient time for U-Boot to download
the kernel and set up early network, preventing potential job failures
due to timeout constraints.

This behavior started to happen since LAVA 2025.02 version.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Guilherme Gallo
2b9e3e2fff ci/lava: xtrace the lava_job_submitter call
To make easier to debug issues and run locally.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Guilherme Gallo
1169f704d3 ci/lava: Propagate errors in SSH tests
The `lava_ssh_test_case` wrapper was missing the `set -e` shell option,
which made LAVA system interpret the job was succeeding, because the
`container` namespace was exiting normally, even though the `dut`
namespace was failing.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Guilherme Gallo
02a86b3284 ci/lava: Drop the repeating quotes on lava-test-case
LAVA was recently patched [1] with a fix on how parameters are parsed in
`lava-test-case`, so we don't need to repeat quotes to send the
arguments properly to it.

[1] 18c9cf7976

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Sergi Blanch Torne
d74b808a87 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 99a7dc3fc4.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Marek Olšák
027ccd963b Remove osmesa
It's redundant with EGL surfaceless and it doesn't have much use.

It's also available from the amber branch, so distros should get it from
there if they want to continue packaging it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836>
2025-03-04 00:40:39 +00:00
Gurchetan Singh
e8e4022dde lavapipe: use quotes instead of angle bracket
lvp_private.h is in the same directory and lvp_android.c

Other files in the same directory just use
"#include lvp_private.h" too.

Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33854>
2025-03-04 00:18:29 +00:00
Konstantin Seurer
3a69b52d37 nir: Test nir_minimize_call_live_states
Adds a couple of tests for various instructions and controlflow
constructs.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33289>
2025-03-03 23:30:57 +00:00
Marek Olšák
7655826243 mesa: allocate GLmatrix aligned to 16 bytes
The declaration has:

typedef struct {
   alignas(16) GLfloat m[16];   /**< 16 matrix elements (16-byte aligned) */
   alignas(16) GLfloat inv[16]; /**< 16-element inverse (16-byte aligned) */
...
} GLmatrix;

We should honor that.

Fixes: 3175b63a0d - mesa: don't allocate matrices with malloc
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10237

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33856>
2025-03-03 23:08:02 +00:00
Mike Blumenkrantz
1493f88f88 aux/trace: truncate descriptor unbinds
instead of generating the full array of NULLs, just output one

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33858>
2025-03-03 22:42:58 +00:00
Patrick Lerda
c707bb5e8f r600: fix cayman sfn_nir_legalize_image_load_store ssa dominance
After dae57e184a ("glsl,st/mesa: always lower IO for GLSL, unlower
IO for drivers"), the shaders updated by sfn_nir_legalize_image_load_store
on cayman could trigger a segmentation fault. The main issue is that
sfn_nir_legalize_image_load_store does not handle properly the ssa
dominance functionality and this issue is exacerbated by this last
mesa update.

This change makes the ssa dominance functionality operational.

This commit implements pass_flags to avoid an infinite loop.

For instance, this issue is triggered on cayman using this
environment variable NIR_DEBUG=validate_ssa_dominance with:
"piglit/bin/oes_egl_image_external_essl3 -auto -fbo":
NIR validation failed after r600_legalize_image_load_store in ../src/gallium/drivers/r600/sfn/sfn_nir.cpp

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32894>
2025-03-03 22:15:09 +00:00
Marek Olšák
1d5d809818 glapi: remove unused python code
detected by a program called vulture

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
906dcb56e1 glx: make it more obvious what libglapi_bridge is
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
71bb62e3c9 glx: stop exporting GL functions from libGLX_mesa.so
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
628608672c glx: fix hardcoded use of dispatch table index in glAreTexturesResidentEXT
No idea why this exists, and it's dead code with glvnd because it's
exported from libGLX_mesa.so.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
ebf6008434 glx: don't call GL functions directly, use the current dispatch instead
With glvnd, GL functions will not be publicly exported from libGLX_mesa
and we don't even need them privately defined.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
0204609365 glapi: inline entry_current_get()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
fb16a1121b glapi: remove is_static_entry_point wrapper
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
20aadf4f64 glapi: use static_data.libgl_public_functions directly
also filter_entry_points is unused, so remove that

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
72db4a1e50 glapi: disable python escape sequences in strings that use invalid ones
We use invalid escape sequences in a few string.
r'...' disables escape sequences. This fixes validator errors:

/home/marek/dev/mesa/src/mapi/mapi_abi.py:45: SyntaxWarning: invalid escape sequence '\w'
  '^(?P<type>[\w\s*]+?)(?P<name>\w+)(\[(?P<array>\d+)\])?$')
/home/marek/dev/mesa/src/mapi/glapi/gen/api_exec_init.py:43: SyntaxWarning: invalid escape sequence '\p'
  header = """/**
/home/marek/dev/mesa/src/mapi/glapi/gen/gl_enums.py:64: SyntaxWarning: invalid escape sequence '\c'
  print("""

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
1f75715dae glthread: rename scripts to match the names of generated files
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
9a2974019b glthread: handle glFlush with HasExternallySharedImages more efficiently
Doing finish without flush is more efficient because it executes the unflushed
batch immediately.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
2937d8a961 glapi: just use _gloffset_COUNT_ everywhere, which is always the function count
MAPI_TABLE_NUM_STATIC was just duplicated _gloffset_COUNT.
mesa/main no longer needs to specify the table size.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
057c7f0dd2 glapi: verify that aliased functions don't have entries in dispatch tables
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
02d22dd1f3 glapi: move legacy imaging functions to the end of dispatch tables
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
1fde49d50e glapi: remove unused functions from dispatch tables
We also have to remove __indirect_glVertexAttribPointerNV because nothing
uses it after the removal from dispatch tables.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
c0b0ba1b77 glapi: generate static offsets from the list of GL functions automatically
Since glapi is part of libgallium.so, the offsets don't have to be immutable
anymore, but they still have to be fixed values within a build because both
gl_XML.py and genCommon.py use them and they should match AFAIK.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
e3f9848a5c glapi: remove check_table tests
glapi is now statically built into libgallium or libGL and both must come
from the same Mesa version, so backward compatibility of dispatch tables
is no longer required.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
a8b18dce82 glapi: clarify the meaning of static_data.functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
6c39cc1cc3 glapi: use an assertion in SET_by_offset instead of doing nothing
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
49facd7d54 glapi: remove support for dynamically-registered functions
I think this was for when libglapi was older than DRI drivers and didn't
know all functions.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
3fc52ac0e0 glapi: fix build dependencies by putting all xml/py files into a single list
This fixes missing script dependencies that didn't trigger rebuilds when
those files were changed. To keep it simple stupid, all xml and python
files used by python scripts indirectly are now in a single global list.

All variables holding file names are also inlined, so that we use file
paths everywhere.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
11364cd133 mesa: remove a glapi workaround for Mesa 10.5 and older
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
e4830d6e44 glapi: don't export always-private functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
c13a3de924 glapi: inline functions or use equivalent alternatives
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
142202cd00 glapi: remove dead code
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
a22e50e6fe mesa: don't build st_format_test on Windows
this is the easiest way to make it build with the glapi changes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Caio Oliveira
dd1ca1588d brw: Fix size in assembler when compacting
Calculation was wrongly walking uncompacted instructions, even if we had
some compacted in the middle, generating invalid size.  Since we are
here just drop the instruction count, since in practice the caller will
have to walk the instruction stream anyway.

Fixes: 6267585778 ("intel/brw: Also return the size of the assembled shader")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33532>
2025-03-03 20:43:56 +00:00
Lucas Fryzek
08483e9bfa anv: Release correct bo for RT scratch
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33850>
2025-03-03 20:13:38 +00:00
Martin Roukala (né Peres)
8fb80834ed radv/ci: add hawaii to CI
This GPU is located in the same host as Tahiti, and was kindly donated
to the RADV project by Leonardo Frassetto (@DottorLeo).
It's good to finally making use of it, one year after receiving it \o/

On a side now, the skips are removed since they do not appear to be
reducing the chances of hanging once paired with the updated postamble
flushes.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563>
2025-03-03 19:42:21 +00:00
Martin Roukala (né Peres)
f4b1d62f00 radv/ci: reduce the timeout of vkcts-tahiti to a more sensible time
The current runtime is just over 33 minutes, so no need for
multi-hour-long timeouts.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563>
2025-03-03 19:42:21 +00:00
Timur Kristóf
3f3a5d8068 radv: Use flush postamble on GFX7 with different flags.
Flush caches at the end of each submission on GFX7.
This significantly improves stability on Hawaii
when running the CTS on multiple threads.

Keep previous behaviour on GFX6.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563>
2025-03-03 19:42:21 +00:00
Samuel Pitoiset
7f6e28db26 radv: fix re-emitting fragment output state when resetting gfx pipeline state
When switching from pipeline to shader objects.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33840>
2025-03-03 19:19:33 +00:00
Xaver Hugl
779c8d1669 vulkan/wsi: don't use sRGB if the compositor doesn't support it
This could realistically happen if the compositor doesn't support parametric image
descriptions at all, in which case we'd get a protocol error for trying to use it.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33804>
2025-03-03 18:55:29 +00:00
Gert Wollny
6da19eafd5 r600/sfn: gather info and set lowering 64 bit after nir_lower_io
After nir_lower_io we need to gather the info about 64 bit usage
to be up-to-date when deciding whether the remaining 64 bit IO ops
be lowered.

Before 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
the info was eventually updated to include the use of 64 bit values
also if only some IO was using this so that SFN was handling the code
correctly. As it seems with above patch this is not always the case
anymore, and we have to take care of it.

Fixes: 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32774>
2025-03-03 18:35:45 +00:00
Sasha Finkelstein
1601668155 vtn_bindgen2: Fix memory corruption
This sometimes causes memory corruption, specifically on 32-bit x86
where it can result in a build failure

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33847>
2025-03-03 17:25:58 +00:00
Mary Guillemard
7c12df63de pan/bi: Add unit tests for FAU special page 3 and WARP_ID
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843>
2025-03-03 17:04:04 +00:00
Mary Guillemard
ef0c7382c7 pan/bi: Disallow FAU special page 3 and WARP_ID on message instructions
This is a constraint that apply on Valhall and later, instructions
should not use FAU special page 3 or WARP_ID if running
on the message unit.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843>
2025-03-03 17:04:04 +00:00
Rob Clark
6df9591905 tu: Don't emit SP_PS_2D_WINDOW_OFFSET on a6xx
This register isn't there.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33823>
2025-03-03 16:44:24 +00:00
Konstantin Seurer
4348253db5 llvmpipe: Skip draw_mesh if the ms did not write gl_Position
There is nothing to be done and the code will hit "assert(pos != -1);"
otherwise.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12684
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33812>
2025-03-03 15:18:28 +00:00
Patrick Lerda
ee1cb894d6 r600: fix evergreen_emit_vertex_buffers() related cl regression
For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags":
Segmentation fault

Fixes: 81889f4d5c ("r600: ensure that the last vertex is always processed on evergreen")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33351>
2025-03-03 14:54:32 +00:00
Danylo Piliaiev
264d8a6766 ir3: Set need_full_quad depending on info.fs.require_full_quads
The info from NIR is more granular, so that we don't have to
enable full quad for coarse derivatives.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33801>
2025-03-03 13:42:33 +00:00
Konstantin Seurer
6e3fc37d47 radv: Implement multidimensional ray query arrays
This is technically a bug fix, but no sane developer would use this.
It's still nice to implement all corner cases.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32334>
2025-03-03 12:07:47 +00:00
Konstantin Seurer
febc923a46 radv: Lower ray query vars to structs
This is much cleaner than passing an index around it will allow
implementing multidimensional ray query arrays.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32334>
2025-03-03 12:07:47 +00:00
Zan Dobersek
86456cf0e6 tu: support exposing derived counters through VK_KHR_performance_query
Turnip's current VK_KHR_performance_query implementation only exposed raw
perfcounters. These aren't exactly trivial to evaluate on their own.

This mode can still be used with the new TU_DEBUG_PERFCRAW flag. Existing
TU_DEBUG_PERFC now enables performance query mode where Freedreno's derived
counters are exposed instead. These default to using the command scope,
making them usable with RenderDoc's performance counter capture.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
27fd2d1ad1 freedreno: add common implementation of perfcntr-based derived counters
Freedreno's derived counters combine multiple perfcntrs into a more
sensible, human-friendly metric. This change picks up the counters
currently used in Freedreno's Perfetto producer and rolls them into a
more genericallly usable form.

First place of their use will be through VK_KHR_performance_query, but
the Perfetto producer should also be able to use this interface instead
of having the logic duplicated. For now the counters are available only
for a7xx devices.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
b8338dee39 tu/a7xx: disable preemption during performance query measurement
Use CP_SCOPE_CNTL to disable preemption when beginning performance query
and enable it back when that performance query is ended. This way the
collected perfcounter measurements will only cover work that's encompassed
by the query.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
c964a96ab2 tu: performance query result writes must use dedicated union type
When using vkGetQueryPoolResults for performance queries, the result of
each query is the VkPerformanceCounterResultKHR union, and the result of
each query should be written into that union according to the storage type
of the corresponding counter.

This fixes current behavior of using the generic write procedure, where
either 32-bit or 64-bit value is written depending on the specified query
result flags.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
1cf5cf6da3 tu: use query index when retrieving performance query iovas
Query index should be used to calculate the correct iova for various
performance query fields used to store counter values at the beginning
and ending of performance queries.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Emmanuel Gil Peyrot
b4a82110ce panvk: Initialize out array with the correct length
This avoids reading past the buffer’s end in the client afterward, because the
drmFormatModifierCount hasn’t been changed from what the client passed, if it
wasn’t zero at first.

GTK triggers that bug by setting it to the length of the static array (see this
bug[0] though), but other Vulkan programs might have the same issue if they
don’t first query the count before allocating the array.

This has been tested on a Radxa ROCK 5B board running a Mali-G610 GPU.

[0] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8222

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 252ddaf51b ("panvk: fix VkDrmFormatModifierPropertiesListEXT query")
Fixes: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/issues/127
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33657>
2025-03-03 11:09:14 +01:00
Julia Zhang
79bb8e3455 radv: advertise VK_EXT_device_memory_report
Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
f504ed9e73 radv: emit device memory report for device memory events
Emit device memory report when radv create memory or free memory.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
313aa44bf1 radv: add obj_id to radeon_winsys_bo
mem->bo->obj_id will be used by device memory report.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
900be035c8 radv: add import and export handle_type in radv_alloc_memory
The import_handle_type and export_handle_type will be used to set the
memoryObjectId for memory report.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
273e00bffe vulkan: handle device memory report requests
Add memory_report to vk_device and init it when create vk
device to handle device memory report requests.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Job Noorman
c24373d907 ir3/sched: unblock a0.x/a1.x after last use
We currently keep a0.x/a1.x unnecessarily blocked until we have to spill
it, even if all its uses have been scheduled already. This causes
unnecessary spills and potentially schedules address writes later than
we'd like.

Fix this by keeping track of the number of uses that are still
unscheduled, unblocking address writes when it drops to zero.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33816>
2025-03-03 07:48:16 +00:00
Job Noorman
9728b31e65 ir3: clear instruction uses when cloned
Clones do not share the uses of the cloned instruction.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33816>
2025-03-03 07:48:15 +00:00
Sergi Blanch Torne
99a7dc3fc4 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-03-03 08:00 UTC
* End: 2025-03-03 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33595>
2025-03-03 07:25:15 +00:00
Hyunjun Ko
f80e5c2ce5 anv/ci: remove some expected failures of dEQP-VK.video.formats.*
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33784>
2025-03-03 04:36:21 +00:00
Hyunjun Ko
f7ff9b240d anv: Do not support the tiling of DRM modifier if DECODE_DST
Fixes: 04709e4f ("anv: fix video profile lists");

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33784>
2025-03-03 04:36:21 +00:00
Yiwei Zhang
b6b8193534 venus: fix an obsolete protocol sync earlier
luckily it doesn't hurt anything and won't break anything

Fixes: 785f44adc8 ("venus: sync protocol for the passthrough extensions")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33834>
2025-03-02 16:58:21 +00:00
Yiwei Zhang
c35b52638c venus: relax the requirement for sync2
The current requirement for sync is only to support WSI, and it is not
necessarily needed at all per the comment added. Will drop it later.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33829>
2025-03-02 16:40:14 +00:00
Eric Engestrom
cf7fa16f8c ci/b2c: use more readable "long" argument names
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
a3ad54adf0 ci/b2c: set the registry proxy from the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
314e023960 ci/b2c: pass through all the CI_* variables as well
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
bad0197300 ci/b2c: pass through all the B2C_* variable without renaming them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
d41d2874ef ci/b2c: rename IMAGE_UNDER_TEST to B2C_IMAGE_UNDER_TEST
Makes things mildly clearer, but more importantly gets rid of the
last variable used that doesn't start with `B2C_*` or `CI_*`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
6394cdde6c ci/b2c: split B2C_JOB_VOLUME_EXCLUSIONS in the jinja template
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
215dac82c3 ci/b2c: set default value for B2C_KERNEL_CMDLINE_EXTRAS in the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
61c76a3b36 ci/b2c: set default value for B2C_TELEGRAF_IMAGE in the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
ee050d7af3 ci/b2c: set default value for B2C_MACHINE_REGISTRATION_IMAGE in the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
37ab59afce ci/b2c: use B2C_JOB_TEMPLATE directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
1310b75cbf ci/b2c: explain better why we don't clone mesa
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
c0b4b132d3 ci/b2c: fix comment location
I think the `after_script:` was simply inserted in the middle.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Christian Gmeiner
3f95531d39 etnaviv/ci: Start using the revision number for GPU_VERSION
This step is needed to support the same GPU model, but with a
different revision. A good example is the gc7000.

 - imx8mp: model gc7000 with revision 6204 (uses RS)
 - imx8mq: model gc7000 with revision 6214 (uses BLT)

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33811>
2025-03-01 22:14:28 +00:00
Alyssa Rosenzweig
d2edb15454 radv: use VK_COPY_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
aa2f1138e6 v3dv: switch to common VK_COPY/PRINT_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
0b4ccac83e anv,hasvk: switch to common VK_COPY/PRINT_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
0bca84c3a1 hk: switch to common VK_COPY/PRINT_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
e331efd4fe vulkan: add common VK_PRINT_STR/VK_COPY_STR macros
every vk driver wants these macros for executable statistics, so make them
common. there are two variants floating in-tree, a pure copy (radv) and a
formatted print (everyone else). we add both variants and then convert most
prints to copies where formatting isn't actually used. that has the benefit of
cleaning up trivial "%s" format strings in a bunch of places.

I didn't bother cleaning up the formatting in non-automatic-formatted drivers
because it's tedious and I'm planning to delete a lot of this driver code with
upcoming runtime work anyway. This is a step towards those runtime improvements.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
7ce8f1ebb0 asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Georg Lehmann
975be7ac5d ac/nir/mem_access_bit_sizes: split unaligned vec3 lds access to allow more read2/write2
Foz-DB Navi21:
Totals from 77 (0.10% of 79377) affected shaders:
Instrs: 69787 -> 68745 (-1.49%); split: -1.51%, +0.02%
CodeSize: 367256 -> 360060 (-1.96%); split: -1.97%, +0.01%
VGPRs: 3896 -> 3880 (-0.41%)
Latency: 335403 -> 335297 (-0.03%); split: -0.11%, +0.08%
InvThroughput: 102766 -> 102931 (+0.16%); split: -0.09%, +0.25%
VClause: 1645 -> 1643 (-0.12%); split: -0.18%, +0.06%
SClause: 1434 -> 1433 (-0.07%)
Copies: 4280 -> 4283 (+0.07%); split: -0.56%, +0.63%
PreVGPRs: 2408 -> 2421 (+0.54%); split: -0.08%, +0.62%
VALU: 45557 -> 45646 (+0.20%); split: -0.10%, +0.29%
SALU: 6458 -> 6474 (+0.25%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33448>
2025-03-01 18:26:54 +00:00
Georg Lehmann
8b2b3e5704 radv: remove outdated vectorize TODO
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33448>
2025-03-01 18:26:54 +00:00
Valentine Burley
2dfbade2d8 ci: Update kernel to include i.MX8MP dtb
The only change since the previous kernel is that the new one includes
the device tree blob for the NXP i.MX8MP development board.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33800>
2025-03-01 09:19:56 +00:00
Faith Ekstrand
47ca264dc2 nak: Set .NODEP on tex ops based on nir_opt_tex_skip_helpers()
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Faith Ekstrand
a65009e808 nir: Add a nir_opt_tex_skip_helpers optimization
Arm and NVIDIA hardware both have this as a bit you can set on the
texture instruction so we may as well have a shared pass for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Faith Ekstrand
7ac6ec2ceb nir: Add a get_io_index_src() helper
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Faith Ekstrand
61108eb1b5 compiler/rust: Add u_printf_info to the rust bindings
This both adds it to the compiler allowlist and adds it to the user
denylist.  This gets rid of a Rust compiler warning in NAK.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Georg Lehmann
7eb43c3b1c aco/optimizer: delete combine_and_subbrev
This is now done in NIR. No Foz-DB changes on Navi21.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:28 +00:00
Georg Lehmann
d272a6e261 nir/opt_algebraic: optimize d3d a ? b : 0
Foz-DB Navi21:
Totals from 3466 (4.34% of 79789) affected shaders:
MaxWaves: 73163 -> 73161 (-0.00%); split: +0.02%, -0.02%
Instrs: 3993862 -> 3987633 (-0.16%); split: -0.19%, +0.04%
CodeSize: 21747420 -> 21725620 (-0.10%); split: -0.15%, +0.05%
VGPRs: 190736 -> 190728 (-0.00%); split: -0.04%, +0.03%
SpillSGPRs: 489 -> 478 (-2.25%); split: -2.86%, +0.61%
Latency: 48169718 -> 48159068 (-0.02%); split: -0.05%, +0.02%
InvThroughput: 12132999 -> 12128721 (-0.04%); split: -0.05%, +0.01%
VClause: 78063 -> 78052 (-0.01%); split: -0.09%, +0.08%
SClause: 109095 -> 108996 (-0.09%); split: -0.13%, +0.04%
Copies: 265784 -> 264530 (-0.47%); split: -0.72%, +0.25%
Branches: 84533 -> 84553 (+0.02%)
PreSGPRs: 172577 -> 172531 (-0.03%); split: -0.19%, +0.16%
PreVGPRs: 165776 -> 165825 (+0.03%); split: -0.06%, +0.09%
VALU: 2851544 -> 2850426 (-0.04%); split: -0.08%, +0.04%
SALU: 413543 -> 408408 (-1.24%); split: -1.45%, +0.21%
VMEM: 139890 -> 139887 (-0.00%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:28 +00:00
Georg Lehmann
2e7f34af6b nir/opt_algebraic: optimize more ine/ieq(umin(b2i, ), 0)
Foz-DB Navi21:
Totals from 76 (0.10% of 79789) affected shaders:
MaxWaves: 1050 -> 1062 (+1.14%)
Instrs: 113754 -> 113691 (-0.06%); split: -0.11%, +0.06%
CodeSize: 605096 -> 605216 (+0.02%); split: -0.03%, +0.05%
VGPRs: 6024 -> 5976 (-0.80%)
Latency: 1776501 -> 1777519 (+0.06%); split: -0.06%, +0.12%
InvThroughput: 379644 -> 376751 (-0.76%)
SClause: 2132 -> 2134 (+0.09%)
Copies: 4131 -> 4128 (-0.07%); split: -1.77%, +1.69%
PreSGPRs: 4275 -> 4270 (-0.12%)
PreVGPRs: 5568 -> 5526 (-0.75%)
VALU: 86732 -> 86581 (-0.17%); split: -0.24%, +0.07%
SALU: 7112 -> 7198 (+1.21%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:28 +00:00
Georg Lehmann
7bc3062a3b nir/opt_algebraic: push comparisons with constants into bcsel with constant
Foz-DB Navi21:
Totals from 1657 (2.08% of 79789) affected shaders:
MaxWaves: 30275 -> 30261 (-0.05%); split: +0.01%, -0.05%
Instrs: 3316251 -> 3315701 (-0.02%); split: -0.04%, +0.02%
CodeSize: 17831924 -> 17832020 (+0.00%); split: -0.06%, +0.06%
SpillSGPRs: 815 -> 859 (+5.40%)
SpillVGPRs: 3335 -> 3293 (-1.26%)
Scratch: 231424 -> 230400 (-0.44%)
Latency: 33413310 -> 33402751 (-0.03%); split: -0.04%, +0.01%
InvThroughput: 9116062 -> 9112904 (-0.03%); split: -0.04%, +0.00%
VClause: 65587 -> 65560 (-0.04%); split: -0.05%, +0.01%
SClause: 86208 -> 86261 (+0.06%); split: -0.02%, +0.08%
Copies: 356158 -> 356439 (+0.08%); split: -0.07%, +0.15%
PreSGPRs: 101710 -> 101806 (+0.09%); split: -0.01%, +0.11%
PreVGPRs: 89293 -> 89286 (-0.01%); split: -0.04%, +0.04%
VALU: 2220900 -> 2218839 (-0.09%); split: -0.11%, +0.01%
SALU: 472988 -> 474567 (+0.33%); split: -0.08%, +0.42%
VMEM: 118401 -> 118347 (-0.05%)
SMEM: 123597 -> 123592 (-0.00%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Georg Lehmann
3837bc6d16 nir/opt_algebraic: optimize ~a == ~b and ~a == #b
Foz-DB Navi21:
Totals from 2 (0.00% of 79789) affected shaders:
Instrs: 8343 -> 8323 (-0.24%)
CodeSize: 43884 -> 43764 (-0.27%)
Latency: 19390 -> 19363 (-0.14%)
InvThroughput: 3380 -> 3356 (-0.71%)
VALU: 5413 -> 5393 (-0.37%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Georg Lehmann
8759223498 nir/opt_algebraic: optimize b2i/b2f comparision with non 0/1 constants
Foz-DB Navi21:
Totals from 28 (0.04% of 79789) affected shaders:
MaxWaves: 732 -> 728 (-0.55%)
Instrs: 23425 -> 22559 (-3.70%)
CodeSize: 137740 -> 132292 (-3.96%)
VGPRs: 1128 -> 1144 (+1.42%)
Latency: 94604 -> 92423 (-2.31%)
InvThroughput: 19166 -> 18814 (-1.84%); split: -2.38%, +0.54%
VClause: 429 -> 423 (-1.40%)
SClause: 937 -> 926 (-1.17%)
Copies: 1199 -> 914 (-23.77%); split: -24.52%, +0.75%
Branches: 451 -> 421 (-6.65%)
PreSGPRs: 1043 -> 996 (-4.51%)
PreVGPRs: 992 -> 973 (-1.92%); split: -3.53%, +1.61%
VALU: 17566 -> 16865 (-3.99%)
SALU: 1254 -> 1157 (-7.74%)
VMEM: 619 -> 609 (-1.62%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Georg Lehmann
2bfcfef5da nir/opt_algebraic: optimize bcsel of b2f and constants
Foz-DB Navi21:
Totals from 212 (0.27% of 79789) affected shaders:
MaxWaves: 4024 -> 4030 (+0.15%)
Instrs: 1314134 -> 1313894 (-0.02%); split: -0.03%, +0.02%
CodeSize: 7033216 -> 7026888 (-0.09%); split: -0.10%, +0.01%
VGPRs: 14224 -> 14176 (-0.34%)
Latency: 7402062 -> 7399180 (-0.04%); split: -0.06%, +0.02%
InvThroughput: 1724879 -> 1723773 (-0.06%); split: -0.07%, +0.00%
VClause: 37741 -> 37711 (-0.08%); split: -0.11%, +0.03%
SClause: 29266 -> 29268 (+0.01%); split: -0.01%, +0.01%
Copies: 123810 -> 123786 (-0.02%); split: -0.19%, +0.17%
Branches: 42370 -> 42407 (+0.09%); split: -0.03%, +0.11%
PreSGPRs: 13149 -> 13196 (+0.36%); split: -0.05%, +0.40%
PreVGPRs: 12407 -> 12395 (-0.10%)
VALU: 884471 -> 883475 (-0.11%); split: -0.12%, +0.01%
SALU: 177671 -> 178408 (+0.41%); split: -0.03%, +0.45%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Sil Vilerino
4a62f8bc75 d3d12: Cache the texture array cap requirement in encoder creation for calls to d3d12_video_create_dpb_buffer
Previously, the caps were not queried until after the first DPB buffer
was created. That causes the AOT path to be triggered even when the
device does report a requirement for texture array.

Tested-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33824>
2025-02-28 20:35:13 +00:00
Juston Li
7dd81ac9c2 wsi/common: android: disable KHR_present_[wait/id]
Android's Vulkan loader provides KHR_android_surface and intercepts
during instance creation; it does not implement KHR_present_[wait/id]
nor does it pass the enablement of KHR_android_surface to the driver
so this check wasn't actually disabling KHR_present_[wait/id] for
Android.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33677>
2025-02-28 19:49:59 +00:00
Mike Blumenkrantz
6a29d2ed66 anv: support all dimensions of image for LINEAR dmabufs
> Allowing 1D and 3D images, and array images too, with DRM_FORMAT_MOD_LINEAR, is ok
> because VkImageDrmFormatModifierExplicitCreateInfoEXT::pPlaneLayouts is able to fully
> describe the image layout. IF miplevels == 1, which this patch continues to enforce.

Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33668>
2025-02-28 19:04:33 +00:00
Pavel Ondračka
a3504b79fb r300,i915: update CI expectations
spec@glsl-1.10@execution@loops@glsl-fs-loop-shadow-variables now pass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33820>
2025-02-28 18:41:55 +00:00
Georg Lehmann
b90826736d nir/opt_algebraic: optimize bit_count(a) != 0
vkd3d-proton will emit
b = ballot(!gl_HelperInvocation);
(subgroupBallotBitCount(b) != 0u) ? subgroupShuffle(a, subgroupBallotFindLSB(b)) : 0u;

for WaveReadFirstLane(a) in fragment shaders

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33808>
2025-02-28 18:03:04 +00:00
Mike Blumenkrantz
b04eaa8589 zink: clamp UBO sizes instead of asserting
this is a nice idea, but there are apps/games that do not respect
hardware capabilities and yolo-bind fixed size buffers

fixes Ballionaire (2667120) launch on non-desktop drivers

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33819>
2025-02-28 17:42:42 +00:00
Mike Blumenkrantz
df1ff3c711 zink: enable single-plane modifiers for generic 2D exports
this should be fine; multi-plane ones won't work because not all callers
expect to get multiple fds back

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33675>
2025-02-28 16:48:18 +00:00
Natalie Vock
237d8799be radv/rt: Limit monolithic pipelines to 50 stages
Beyond that, monolithic pipelines just bloat to incredible sizes,
destroying compile times for questionable, if any, runtime perf benefit.

Indiana Jones: The Great Circle has more than 100 stages and takes
several minutes to compile its RT pipeline on Deck when using monolithic
compilation, and yet separate shaders still end up faster (probably
because instruction cache coherency in traversal is better).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33818>
2025-02-28 16:22:45 +00:00
Natalie Vock
d5a2666ad9 aco/ra: Assert operands only clear their own id
This is useful for debugging register assignment, as this case would
usually result in RA silently assigning the same register to multiple
temps at the same time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
1967b0f0c4 aco/tests: Add tests for precolored operands in different regs
The first test verifies that, if possible, we don't emit unnecessary
renames/copies for temporaries where it's possible for them to stay
in their current register (if an operand is precolored to the register
the temporary is currently residing in).

The second test verifies that we correctly choose a non-clobbered
operand even if there is one fixed to the temporary's current register.
To minimize copies, we'll want to have the live copy of
%tmp0 in v[2] there, because v[0-1] gets overwritten.

The third test verifies that we add a copy to another free register and
rename if all possible precolored operands are clobbered.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
b8bcc8e5c5 aco/ra: Handle temps fixed to different regs in different operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
7a4775b396 aco/ra: Add option to skip renaming for parallelcopies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
b339bcfa38 aco/ra: Use struct for parallelcopies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
3f182bc1fa aco/ra: Use iterators for linear VGPR copy extraction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Georg Lehmann
ea3c04b535 radv/nir_lower_ray_queries: use nir_foreach_function_impl
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
2025-02-28 14:38:14 +00:00
Georg Lehmann
dec60f3337 radv/nir_apply_pipeline_layout: clean up progress handling
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
2025-02-28 14:38:14 +00:00
Georg Lehmann
f595bcfe78 nir/opt_varyings: clean up nir_progress usage
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
2025-02-28 14:38:14 +00:00
Konstantin Seurer
c8fd0298e4 vulkan: Add utilities for triggering renderdoc captures
This can be useful for adding custom triggers for renderdoc.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31300>
2025-02-28 12:40:43 +01:00
David Rosca
79a3786453 radeonsi/video: Fix crash when creating buffers without modifiers support
Fixes: 7f7206f1a9 ("radeonsi/video: Allocate video buffers with modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12701
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33788>
2025-02-28 10:12:04 +00:00
Valentine Burley
7a3cfb57e5 anv/ci: Append -vk suffix to VKCTS job names
This aligns the naming with VKCTS jobs for other vendors and makes the
purpose of these jobs more explicit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33793>
2025-02-28 09:26:29 +00:00
Valentine Burley
b6dcbef0e2 zink/ci: Add trace testing on Alder Lake
ADL uses the new Xe KMD. Compared to TGL, some traces crash and need to
be skipped.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33793>
2025-02-28 09:26:29 +00:00
Valentine Burley
6b766c1cee zink/ci: Run more traces on Tiger Lake
These traces are now stable enough to start running them again on TGL.

Additionally, add new lines between traces in preparation for adding
ADL coverage, and update zink-anv-tgl-traces-restricted to no longer
inherit rules from zink-anv-tgl-traces.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33793>
2025-02-28 09:26:29 +00:00
Rebecca Mckeever
0c40b1653d panvk: Enable VK_KHR_shader_quad_control for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Rebecca Mckeever
13a3d70258 panvk: Enable VK_KHR_shader_maximal_reconvergence for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Rebecca Mckeever
7d81704640 panvk: Enable VK_KHR_shader_subgroup_uniform_control_flow for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Rebecca Mckeever
80309e53f1 panfrost: Add BI_OPCODE_WMASK to bi_instr_uses_helpers
Helper invocations are needed to support voting subgroup operations in
fragment shaders.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Samuel Pitoiset
3c81961c2e radv: enable DCC fast clears for 8bpp/16bpp on GFX11
This was disabled during GFX11 bringup few years ago to follow RadeonSI,
but this is working just fine and RadeonSI also enabled it recently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33756>
2025-02-28 08:33:39 +00:00
Samuel Pitoiset
aa476f4b52 radv: check HTILE compression for depth/stencil images per level
This might avoid some useless decompression passes/cache levels for
levels that can't be compressed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33665>
2025-02-28 08:05:14 +00:00
Samuel Pitoiset
77913edd99 radv/meta: remove useless assertion in when copy VRS to HTILE
The caller already checks that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33665>
2025-02-28 08:05:13 +00:00
Samuel Pitoiset
0f0d471154 radv/meta: inline radv_meta_get_view_layer()
The comment for 3D is also incorrect now because meta should never
bind a 3D image to the framebuffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Samuel Pitoiset
9c70cee4dc radv: handle OOM error properly when selecting image modifier
Do not need a "dumber solution".

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Samuel Pitoiset
dd7dbbb0c9 radv: remove meaningless TODOs in radv_GetDeviceImageMemoryRequirements()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Samuel Pitoiset
b8d070eeab radv: replace radv_image::shareable by vk_image::external_handle_types
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Job Noorman
2d540b8074 ir3/ra: prevent reusing parent interval of reloaded sources
We would set the `src` flag on the interval of reloaded sources.
However, the interval might be merged with its parent when inserted and
the parent wouldn't have this flag set. This caused the parent interval
to potentially be reused to reload later sources. Fix this by setting
the `src` flag on the top-level interval after insertion.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33810>
2025-02-28 07:09:52 +00:00
Guilherme Gallo
9da1af6eb2 ci/docs: add structured tagging documentation
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
11f8dffec4 ci/angle: remove USE_ANGLE variable
Now that every ANGLE use is covered by tag consistency checks
(structured tagging), we don't need the USE_ANGLE flag anymore, because
if we have ANGLE_TAG set, it means that ANGLE is required in this job.

In detail, it means that the test job has inherited ANGLE_TAG from
`.container-builds-angle`.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
94f5cf901e ci/angle: condense angle variables in one job
Use .test-angle as a full-featured job to be extended to enable angle
usage in the job. Right now, it comes with USE_ANGLE=1 flag and the
respective structural tag.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
3b01d6e900 ci/angle: test-time structured tag checks
Let's setup the CI to enable runner script to check if the ANGLE
binaries from the container/rootfs are matching the intended version.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
74cb5105b4 ci/angle: add structured tag check to ANGLE build time
Now everytime the ANGLE is built, we check if the conditional tag
declared in the .gitlab-ci/conditional-build-image-tags.yml is matching
the current version of the build script and its inputs

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
6827133592 ci: copy structural tag files to rootfs
Enhance the LAVA build script to copy tag files into the rootfs directory.
This allows test jobs to verify they are using the intended version by
having access to the tag files during testing.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
f13b95ad5c ci: add support for structural tagging
Make structural tagging functions available for both test and build
scripts.

Introduces the update_tag.sh helper for listing, checking, and updating
deterministic tags.

Also adds the ci_tag_build_time_check and ci_tag_test_time_check
functions to validate tags during build and test phases, ensuring
consistent component versioning.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
775c2c3254 ci: add _error_msg for internal messaging
So it can be reused in functions that wants to print errors without
dealing with GitLab sections.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
1cc2c738bb ci: setup-test-env: Prefer functions over aliases
Alias are not exportable, in the current situation of the build scripts,
we use alias to deal with sections, but it infers that all build scripts
will be included in a bigger one that has already included
`setup-test-env.sh`.

With the structured tagging, we do a dry run of all build scripts, to
early check if the tagging is valid, before building stuff.

So changing alias to functions will not have an effect on the current
setup, but it also removes the need to reinclude library bash scripts in
some situations, as described above.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
8f20eb849b ci/android: add missing pre/post build scripts
The android_build.sh script was not calling the container_pre_build.sh
and container_post_build.sh, we will need that to make the structural
tagging early checking to work. And also do the same cleanup and
configuration made for other container build jobs.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Faith Ekstrand
7b82e26e3c nak: Don't spill/fill const values
When spilling values, we can detect when a value is known to be constant
and avoid spilling it out to memory and/or GPRs by just re-materializing
the constant value instead of filling.

Shader-db stats:

    Totals:
    CodeSize: 30101168 -> 30052896 (-0.16%); split: -0.19%, +0.03%
    SLM size: 146536 -> 146524 (-0.01%)
    Static cycle count: 6952994 -> 6939532 (-0.19%); split: -0.30%, +0.10%
    Spills to memory: 174139 -> 173625 (-0.30%)
    Fills from memory: 174139 -> 173625 (-0.30%)

    Totals from 555 (8.05% of 6891) affected shaders:
    CodeSize: 18945520 -> 18897248 (-0.25%); split: -0.30%, +0.04%
    SLM size: 128952 -> 128940 (-0.01%)
    Static cycle count: 4344118 -> 4330656 (-0.31%); split: -0.47%, +0.16%
    Spills to memory: 174139 -> 173625 (-0.30%)
    Fills from memory: 174139 -> 173625 (-0.30%)

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
0f4c7e0c0d nak: Add a new ConstTracker struct
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
7180d56118 nak: Handle any->Mem parallel copies
We already handle Mem->Mem and GPR->Mem, this just enables more options
including UGPR, CBuf, and immediates.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
43d2b149ad nak: Fix NAK_DEBUG=spill for large FS outputs
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
07fb0ce238 nvk: Fix capitalization of statistics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
13c77d7cfc nvk/image: Drop some unneeded initializers
Using designated initializers gives us a default of 0 for these which is
also the NIL default for "ignore this, please".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:41 +00:00
Faith Ekstrand
af406dccfd nvk/image: Prefer vk_image values over pCreateInfo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:41 +00:00
Lionel Landwerlin
02341733df anv/iris: add drirc keys to disable VF/TE distribution
This is a request from debug engineers to be able to trace the HW
better when analyzing hangs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33795>
2025-02-27 21:10:59 +00:00
Lionel Landwerlin
37939d3c4c iris: remove duplicate TessellationDistributionMode programming
This is already programmed in the state emission. No need to have it
on the shader too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33795>
2025-02-27 21:10:59 +00:00
Lionel Landwerlin
bbade676f4 anv/iris: centralize TBIMR drirc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33795>
2025-02-27 21:10:59 +00:00
Yiwei Zhang
af1b4f61b5 venus: added passthrough extension support - Part V
Below extensions are added:
1. VK_KHR_fragment_shader_barycentric
2. VK_EXT_legacy_vertex_attributes
3. VK_EXT_ycbcr_image_arrays

Test:
- dEQP-VK.fragment_shading_barycentric.*
- dEQP-VK.pipeline.*.vertex_input.legacy_vertex_attributes.*
- dEQP-VK.ycbcr.format.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:36 +00:00
Yiwei Zhang
b02e8a9f1d venus: added passthrough extension support - Part IV
Below extensions are added:
1. VK_EXT_shader_atomic_float
2. VK_EXT_shader_atomic_float2
3. VK_EXT_shader_image_atomic_int64
4. VK_EXT_shader_replicated_composites

Test:
- dEQP-VK.glsl.atomic_operations.*
- dEQP-VK.image.atomic_operations.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
1fe8be9215 venus: added passthrough extension support - Part III
Below are added:
1. VK_KHR_shader_maximal_reconvergence
2. VK_KHR_shader_subgroup_uniform_control_flow
3. VK_KHR_shader_quad_control
4. VK_EXT_shader_subgroup_vote

Test:
- dEQP-VK.reconvergence.*
- dEQP-VK.subgroups.subgroup_uniform_control_flow.*
- dEQP-VK.subgroups.shader_quad_control.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
f16345b2f6 venus: added passthrough extension support - Part II
Below are added:
1. VK_KHR_compute_shader_derivatives
2. VK_NV_compute_shader_derivatives
3. VK_KHR_workgroup_memory_explicit_layout

Test:
- dEQP-VK.compute.*workgroup_memory_explicit_layout.*
- dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
48b50c77df venus: added passthrough extension support - Part I
Below are added:
1. VK_KHR_depth_clamp_zero_one
2. VK_EXT_depth_clamp_zero_one
3. VK_EXT_depth_range_unrestricted
4. VK_EXT_post_depth_coverage
5. VK_ARM_rasterization_order_attachment_access

Test: dEQP-VK.depth.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
785f44adc8 venus: sync protocol for the passthrough extensions
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Kevin Chuang
87ff7b061f anv/bvh: Fix copy shader handling sparse buffer
Fixes: 692b5fa9f2 ("anv: Add shader to copy acceleration structures")

This commit fixes the future test "sparse_binding_structures" for
"header_bottom_address" for ray tracing pipeline.

Even on 48-bit ray tracing (Xe1/2), the software-defined part
instance_leaf_part1.bvh_ptr has to be in canonical form for copy.comp
to deference a bvh, which means we have to preserve the upper 16bits.
This is especially relevant in cases where the acceleration structure buffer
is located high, such as sparse buffer.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
2025-02-27 20:10:10 +00:00
Kevin Chuang
b9a980ea73 anv/bvh: Fix encoder handling sparse buffer
Fixes: 2fe57947e3 ("anv: Implement encode shader to fit in ANV BVH")

This commit resolves the failures in the future tests
"sparse_binding_structures" for rayquery. Sparse buffers' heaps are
located high, and since it's in canonical form, the higher 16bits are
all set to 1. However, the existing encoder did not expect any non-zero
values at the higher 16bits. As a result, the instance flags got
corrupted, causing most triangle tests to fail.

Thanks for Paulo providing insights about sparse buffer properties.

Co-developed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
2025-02-27 20:10:10 +00:00
Sagar Ghuge
2c8148a76e anv: CPS LOD Compensation Enable is deprecated on Xe2+
On Xe2+, Hardware will always have scale.x and scale.y as 1.0.
This is not fixing any issues.

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/33726>
2025-02-27 19:49:02 +00:00
Job Noorman
739ca77e66 nir/lower_subgroups: use build_cluster_mask for quad mask
build_subgroup_quad_mask can now be written in terms of
build_cluster_mask.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31732>
2025-02-27 18:53:19 +00:00
Jason Macnak
14bc2e2d39 gfxstream: Remove duplicated boxed handle func declarations
... and fix up include paths.

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Jason Macnak
039e64264a gfxstream: Move the handle replay buffer into BoxedHandleManager
... since `BoxedHandleManager` should, well, manager the handles.

This simplifies `VkDecoderGlobalState` a little bit and should also
allow us to remove a bunch of functions that no longer need to
depend on `VkDecoderGlobalState`.

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: cvd snapshot_take --force \
                        --auto_suspend \
                        --snapshot_path=/tmp/snapshot1
Test: cvd reset -y
Test: cvd create --snapshot_path=/tmp/snapshot1

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Jason Macnak
4ddd8bd96e gfxstream: Remove unused handling mappers
Not used.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Serdar Kocdemir
6bf253b8e8 gfxstream: Add VK_KHR_multiview support
Enable the extension to be advertised for the guest.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Serdar Kocdemir
35dd4b4fc2 gfxstream: Track more fence functions on host
Add vkGetFenceStatus and vkWaitForFences functions to the
global state tracking list for the host.
This will allow adding more functionality to the fences
and perform additional operations before waiting for and
signaling them.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Sergii Ushakov
3449c3c98a gfxstream: Emulate DMABUF with OPAQUE_FD
Enables software rendering via swiftshader on host side and angle
on guest when using DMABUF based framebuffers.

TEST=Run internal application successfully

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Jason Macnak
18afdaa168 gfxstream: Move snapshot decoder replay into VkDecoderGlobalState
... to break the recursive behavior of the replay calling into
VkDecoderSnapshot so that locking and thread safety annotations can be
preserved in VkDecoderSnapshot.

Follow up to aosp/3412302.

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: cvd snapshot_take --snapshot_path=<>
Test: cvd create --snapshot_path=<>

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Aditya Kumar
63de837a8b gfxstream: Fix compiling gfxstream for musl libs
musl has the unistd.h in top level.

Test: m USE_HOST_MUSL=true

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Bo Hu
0a0a350499 gfxstream: Adding support for VK_KHR_global_priority extension
According to
https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_global_priority.html

This device extension allows applications to query
the global queue priorities supported by a queue
family, and then set a priority when creating queues

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Benjamin Lee
55c476efed panvk: advertise shaderFloat16
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
252c59602e panfrost: implement 16-bit ldexp
Bifrost LDEXP.v2f16 takes a 16-bit exponent, which requires messy
lowering. The codegen for this is quite bad currently, but would be
improved by implementing unpack_32_2x16_split_*, and by fusing
comparisons with CSEL.

The main alternative is converting to F32, then LDEXP.f32, then
converting back to F16. This has better codegen for dynamic exponents
currently, but worse in the common case with a constant exponent where
all the saturating cast logic can be folded.

Fixes dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec2
when shaderFloat16 is enabled in panvk.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
2a70665df7 panfrost/va: remove swizzle mod from LDEXP
This instruction does not support swizzles. This information is not used
for anything, but will be if we use the instruction tables for
bi_lower_swizzle.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 316486dd9f ("pan/va: Add initial ISA.xml for Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
810351ad03 panfrost: fix condition in bi_nir_is_replicated
The original implementation of this returned false when the src was
replicated, and true when it was not.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 21bdee7bcc ("pan/bi: Switch to lower_bool_to_bitsize")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
fb9583cd53 panfrost: reorder lower_bit_size pass
nir_lower_int64 may generate 16-bit fexp2 instructions, which need to be
lowered.

Fixes dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float16_m1234
when shaderFloat16 is enabled in panvk. I don't believe it's possible to
trigger this with mediump, so it's not a bug without shaderFloat16.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
a33cd3def2 panfrost: fix large int32->float16 conversions
On vulkan, truncating to S/U16 before converting is not valid, because
out-of-range conversions are specified to be correctly rounded. IEEE 754
requires that out-of-range values round to ±inf with RTNE and ±F16_MAX
with RTZ.

On gl, truncating is valid for U16->F16, because out-of-range int->float
conversions are undefined behavior. For S16->F16, it is not valid
because S16_MAX < F16_MAX, so some in-range values will be truncated as
well.

Instead, just handle S/U16->F16 as S/U16->F32->F16.

Fixes dEQP-VK.spirv_assembly.instruction.compute.convertstof.int32_to_float16_*
when shaderFloat16 is enabled in panvk.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: be74b84e6f ("pan/bi: Fill in some more conversions")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Alejandro Piñeiro
142311258d nir: aliasing checks should be also done with index != 0
Right now the aliasing/overlapping checks are only done with index
0. I guess that was done because variables don't get a different
internal location even if you have a different index.

But doing that, the checks would not detect a case like this:
  layout(location = 0, index = 1) out vec4 color;
  layout(location = 0, index = 1) out vec4 factor;

That was used on the following piglit parser test:
spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag

And as the spec included on that test, is a link error case:

" * if more than one varying out variable is bound to the same
    number and index; or"

This commit executes the aliasing checks for index 1 too, and moves
the skip down, to only skip if the current variable and all previous
location-assigned variables has different index and location.

The bad news is that now such assigned variables need to be tracked on
OpenGL-ES. Before that commit that was avoided.

With this commit the mentioned parser test properly fails to link in
any driver.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33093>
2025-02-27 15:10:52 +00:00
Job Noorman
2619d576e7 nir/lower_phis_to_scalar: don't create moves for undef sources
Creating moves out of undefs makes it more difficult for other passes to
detects undefs without having to chase moves. Instead, just create a new
1-component undef.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29889>
2025-02-27 13:18:14 +00:00
Job Noorman
5ae12b6a5a nir/lower_phis_to_scalar: use nir_builder API where possible
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29889>
2025-02-27 13:18:14 +00:00
Job Noorman
66407e3d24 nir/lower_phis_to_scalar: remove unused mem_ctx
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29889>
2025-02-27 13:18:14 +00:00
Job Noorman
9b9ed564c2 ir3: add reformatting commits to .git-blame-ignore-revs
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33714>
2025-02-27 13:10:53 +00:00
Lionel Landwerlin
f8af4b597e vulkan/runtime: store flags on descriptor set layouts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33799>
2025-02-27 13:26:58 +02:00
Peyton Lee
9c97b2bf9b radeonsi/vpe: fix background issue
Fixed the issue where the background color was specified but not displayed.
Fixed the issue where the color would be different from the expected.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33790>
2025-02-27 11:02:19 +00:00
Daniel Schürmann
3c27a9f0e2 aco/tests: add more tests for chained branches
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
2025-02-27 10:40:01 +00:00
Daniel Schürmann
713396ec8e aco/assembler: Don't insert chained branches into otherwise empty blocks
No fossil changes, but keeps block offsets of the empty blocks intact.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
2025-02-27 10:40:01 +00:00
Daniel Schürmann
6659db285a aco/assembler: Fix short jumps over chained branches
If we insert

   <code>
   s_branch 1
   s_branch Target

at the end of some block, and later hide an additional chained branch
after the existing one, then we have to update the 's_branch 1' to
also jump over the newly added branch.

Fixes: cab5639a09 ('aco/assembler: chain branches instead of emitting long jumps')
Closes: #12673
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
2025-02-27 10:40:01 +00:00
Christian Gmeiner
dd896828ba etnaviv/ci: Bring back GC7000
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33768>
2025-02-27 10:18:13 +00:00
Yiwei Zhang
acd5497067 venus: support wsi maintenance1 extensions
Venus has long supported creating swapchain image alias via binding. So
below are exposed without extra work needed:
- VK_EXT_surface_maintenance1
- VK_EXT_swapchain_maintenance1

Test: dEQP-VK.wsi.*.maintenance1.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33782>
2025-02-27 09:53:57 +00:00
Yiwei Zhang
673a95e5b4 venus: align on wsi frontends support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33782>
2025-02-27 09:53:57 +00:00
Job Noorman
1673824908 ir3/opt_prefetch_descriptors: fix crash after nir_progress rewrite
nir_progress was being called on the preamble even if it was NULL.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 9a58a8257e ("treewide: Switch to nir_progress")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33791>
2025-02-27 09:25:06 +00:00
Kenneth Graunke
88309a9818 brw: Rename shared function enums for clarity
Our name for this enum was brw_message_target, but it's better known as
shared function ID or SFID.  Call it brw_sfid to make it easier to find.

Now that brw only supports Gfx9+, we don't particularly care whether
SFIDs were introduced on Gfx4, Gfx6, or Gfx7.5.  Also, the LSC SFIDs
were confusingly tagged "GFX12" but aren't available on Gfx12.0; they
were introduced with Alchemist/Meteorlake.

GFX6_SFID_DATAPORT_SAMPLER_CACHE in particular was confusing.  It sounds
like the SFID to use for the sampler on Gfx6+, however it has nothing to
do with the sampler at all.  BRW_SFID_SAMPLER remains the sampler SFID.
On Haswell, we ran out of messages on the main data cache data port, and
so they introduced two additional ones, for more messages.  The modern
Tigerlake PRMs simply call these DP_DC0, DP_DC1, and DP_DC2.  I think
the "sampler" name came from some idea about reorganizing messages that
never materialized (instead, the LSC came as a much larger cleanup).

Recently we've adopted the term "HDC" for the legacy data cluster, as
opposed to "LSC" for the modern Load/Store Cache.  To make clear which
SFIDs target the legacy HDC dataports, we use BRW_SFID_HDC0/1/2.

We were also citing the G45, Sandybridge, and Ivybridge PRMs for a
compiler that supports none of those platforms.  Cite modern docs.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33650>
2025-02-27 08:49:24 +00:00
Lionel Landwerlin
dcb5cfbfcc vulkan/runtime: add a multialloc vk_shader allocator
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792>
2025-02-27 10:01:17 +02:00
Lionel Landwerlin
009ef67c8d vulkan/runtime: pass robustness state to preprocess vfunc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792>
2025-02-27 10:01:16 +02:00
Lionel Landwerlin
4dba1ad93f vulkan/runtime: ensure robustness state is fully initialized
This is part of the hashing key :

==25753== Uninitialised byte(s) found during client check request
==25753==    at 0x93D29AE: blob_write_bytes (blob.c:164)
==25753==    by 0x93A62C6: vk_pipeline_precomp_shader_serialize (vk_pipeline.c:722)
==25753==    by 0x93AC55E: vk_pipeline_cache_add_object (vk_pipeline_cache.c:433)
==25753==    by 0x93A691B: vk_pipeline_precompile_shader (vk_pipeline.c:875)
==25753==    by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753==    by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)
==25753==  Address 0xf1adf82 is 82 bytes inside a block of size 152 alloc'd
==25753==    at 0x64FA858: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25753==    by 0x99AAC38: vk_default_alloc (vk_alloc.c:26)
==25753==    by 0x93A403B: vk_alloc (vk_alloc.h:48)
==25753==    by 0x93A406B: vk_zalloc (vk_alloc.h:56)
==25753==    by 0x93A60A0: vk_pipeline_precomp_shader_create (vk_pipeline.c:680)
==25753==    by 0x93A689D: vk_pipeline_precompile_shader (vk_pipeline.c:866)
==25753==    by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753==    by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)

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/33792>
2025-02-27 10:01:02 +02:00
Tapani Pälli
78e5157a9c intel/compiler: add a spec note about L1WT types being uncached
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/33755>
2025-02-27 05:38:35 +00:00
Peyton Lee
7c8d58c26c radeonsi/vpe: vpe support hdr input
when an application asks for supported formats
will return HDR formats(2020, explicit) is supported.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731>
2025-02-27 03:15:17 +00:00
Peyton Lee
43ce5b1138 radeonsi/vpe: vpe support tonemapping
if input source is HDR stream, vpe can use gmlib generating tonemapping
table to convert HDR image to SDR image.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731>
2025-02-27 03:15:17 +00:00
Peyton Lee
2e46c41448 amd/gmlib: add gmlib for radeonsi
radeonsi drivers can use gmlib to generate 3dlut used to do tonemapping.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731>
2025-02-27 03:15:16 +00:00
Marek Olšák
2e124dd389 util: remove glthread enablement from app profiles
It's mature, so if you want it, just enable it for your driver by default.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33480>
2025-02-27 02:28:58 +00:00
Faith Ekstrand
8fffcdb18b nak/nir: Re-materialize load_const instructions in use blocks
This is useful both for correctness (to ensure that things we think are
constant stay constant) and it improves performance a bit by reducing
register pressure and avoiding spilling.

Pipeline-db stats:

    CodeSize: 29665072 -> 29437344 (-0.77%); split: -0.92%, +0.16%
    Number of GPRs: 157124 -> 156082 (-0.66%)
    SLM Size: 148900 -> 146436 (-1.65%)
    Static cycle count: 6840286 -> 6805711 (-0.51%); split: -0.98%, +0.47%
    Spills to memory: 177779 -> 173337 (-2.50%)
    Fills from memory: 177779 -> 173337 (-2.50%)
    Spills to reg: 17692 -> 16731 (-5.43%)
    Fills from reg: 12013 -> 11897 (-0.97%)
    Max warps/SM: 309128 -> 309456 (+0.11%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
8de37b142e nvk: Only support compute shader derivatives on Turing+
Fixes: e0e7d8d910 ("nvk: Advertise VK_NV/KHR_compute_shader_derivatives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
bd04fdcb2b nvk: Only support deviceGeneratedCommandsMultiDrawIndirectCount on Turing+
Indirect draws on Maxwell involve patching pushbufs together and doing
that isn't possible with device generated commands.

Fixes: 83b220f833 ("nvk: Advertise VK_EXT_device_generated_commands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
7e12ba8709 nvk: Handle pre-Turing dispatch indirect commands
The QMD layout is a bit different.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
c540e5e2cc nak/qmd: Add a nak_get_qmd_cbuf_desc_layout() helper
Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
755a6884d3 nak/qmd: Drop some unnecessary .try_into().unwrap()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
59f7f76166 nouveau/class_parser: Make strided element functions const
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
0c4be9e0ff nvk: Fix indentation in begin_end_query()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Mel Henning
2a0302967f nak: Add spill/fill statistics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Mel Henning
0480d8294c nak/spill_values: Make Spill take &mut self
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Mel Henning
ae0576a7f8 nak: Add an occupancy statistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Mel Henning
890bab86b4 nak: Add static cycle count statistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Lionel Landwerlin
b72c772f83 spirv: fix racy build
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Ki'sak
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33769>
2025-02-26 23:09:51 +00:00
Dave Airlie
8a64eee4d7 nvk: enable float16 on turing.
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33521>
2025-02-26 22:48:49 +00:00
Dave Airlie
b45feed3b2 nak: adjust latencies on fp16/64 instructions on Turing
These instructions on Turing require longer latencies,

this fixes the float16 tests on Turing.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33521>
2025-02-26 22:48:49 +00:00
Paulo Zanoni
fd10764cff brw: extend the NOP+WHILE workaround
It turns out that we need to add a NOP not only in between two
consecutive WHILE instructions, but also after every control flow
instruction that immediately precedes a WHILE.

v2: Rebase after the renames.

Fixes: 5ca883505e ("brw: add a NOP in between WHILE instructions on LNL")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021>
2025-02-26 22:23:16 +00:00
Paulo Zanoni
3596b4e325 brw: add instructions missing from is_control_flow()
I'm not aware of any workloads that will be impacted by this change,
but let's keep our list of control flow instructions complete. A
shader-db run on MTL tells me nothing changes.

v2: "The scheduler relies on HALT not being considered control flow to
be able to move code past HALT instructions. Doing this would prevent
such optimization from happening and would reduce performance
dramatically in some cases." - Francisco.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021>
2025-02-26 22:23:16 +00:00
Mike Blumenkrantz
0e87acb2f3 dri: delete INVALIDATE extension
this shouldn't be needed anymore since it doesn't do anything

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33774>
2025-02-26 21:46:06 +00:00
Erik Faye-Lund
6ab4a0b5c9 panfrost: respect pipe_rasterizer_state::line_rectangular
The state-tracker already tells us if we should use rectangular ends or
not on our lines, so we don't need to manually infer this from
combination of states.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33382>
2025-02-26 21:11:06 +00:00
Erik Faye-Lund
6bb4971497 pan/genxml: rename field
This field is really about the line-shape, not multisampling or not.

Yeah, in OpenGL, these two concepts are kinda intertwined. But this is
what the state actually does, so let's name it based on that.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33382>
2025-02-26 21:11:06 +00:00
Karol Herbst
dad5ee1039 intel/brw, lp: enable lower_pack_64_4x16
The compiler won't be able to emit pack_64_4x16, so we should prevent
nir_opt_algebraic to optimize to it. This fixes an infinite optimization
loop inside brw_nir_optimize:

nir_copy_prop
    16x4     %77 = @load_global (%80)
    32    %61995 = pack_32_2x16_split %77.x, %77.y
    32    %61998 = pack_32_2x16_split %77.z, %77.w
    64    %61999 = pack_64_2x32_split %61995, %61998
    64       %76 = iadd %100, %79
                   @store_global (%61999, %76)

nir_opt_algebraic
    16x4     %77 = @load_global (%80)
    32    %61995 = pack_32_2x16_split %77.x, %77.y
    32    %61998 = pack_32_2x16_split %77.z, %77.w
    16x4  %62000 = vec4 %77.x, %77.y, %77.z, %77.w
    64    %62001 = pack_64_4x16 %62000
    64       %76 = iadd %100, %79
                   @store_global (%62001, %76)

nir_lower_pack
    16x4     %77 = @load_global (%80)
    16x4  %62000 = vec4 %77.x, %77.y, %77.z, %77.w
    16    %62002 = mov %62000.y
    16    %62003 = mov %62000.x
    32    %62004 = pack_32_2x16_split %62003, %62002
    16    %62005 = mov %62000.w
    16    %62006 = mov %62000.z
    32    %62007 = pack_32_2x16_split %62006, %62005
    64    %62008 = pack_64_2x32_split %62004, %62007
    64       %76 = iadd %100, %79
                   @store_global (%62008, %76)

// brw_nir_optimize loops here

nir_copy_prop
    16x4     %77 = @load_global (%80)
    32    %62004 = pack_32_2x16_split %77.x, %77.y
    32    %62007 = pack_32_2x16_split %77.z, %77.w
    64    %62008 = pack_64_2x32_split %62004, %62007
    64       %76 = iadd %100, %79
                   @store_global (%62008, %76)

llvmpipe has a similar issue inside lp_build_opt_nir

Fixes: b1bc691b0f ("nir/algebraic: add and improve pack/unpack patterns")
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33347>
2025-02-26 20:43:39 +00:00
Mike Blumenkrantz
480d8bea2b zink: put zink_program::reference on separate cacheline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738>
2025-02-26 20:19:50 +00:00
Mike Blumenkrantz
08dc6aa354 zink: use a separate ralloc ctx for zink_program objects
I considered removing ralloc at all here but it was more deeply embedded
than I realized. maybe a project for another time

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738>
2025-02-26 20:19:50 +00:00
Ian Romanick
495812d8e0 brw/print: Don't let SHADER_OPCODE_FLOW affect indentation
In `fossilize-replay --pipeline-hash 375a63e14afa96c4
fossils/fossil-db/steam-dxvk/f1_22_abu_dhabi.dx12vk-ultra.foz`,
`cf_count` would get decremented below zero. This would lead trying to
print `UINT_MAX` levels of indentation just a few lines below. I ran
out of disk space and patience before that finished. 🤣

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33748>
2025-02-26 19:50:30 +00:00
Yiwei Zhang
bef1c23a23 venus: re-enable 1.4 support
Have made core venus protocol update to be able to support host image
copy.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
577fa1793d venus: enable VK_EXT_host_image_copy support
Fill the core features and properties properly, and conditionally pass
through support of the extension based on the renderer venus protocol
spec version.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
f3da8167d6 vulkan/util: clean up copy_property and fix for setter
For setters, e.g. vk_set_physical_device_properties_struct used by venus
to fill all props, the out array storage comes from the driver, so we'd
assign directly. This change also fixes the template indent and drops an
unused arg.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
c13da1c744 venus: implement host image copy commands
The img-2-img and layout transition are trivial passthrough. For
img-2-mem and mem-2-img copies, host pointer has to be sized for proper
protocol encoding and decoding, and we have to either query or calculate
on our own based on VK_HOST_IMAGE_COPY_MEMCPY_EXT flag being used or
not.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
036493f43d venus: extend image format cache for host copy props
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
2eb5a75d51 venus: sync latest protocol v3 support for host copy
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
fde5cebec5 venus: fix image format cache miss with AHB usage query
should skip updating cache key instead of marking as a miss

Fixes: e48645250c ("venus: image format properties cache")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
15777727c9 venus: use sharing_mode from common vk_image
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
f9afd65695 venus: drop unnecessary struct
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
bcb0b8c7f6 venus: suppress a few -Wmaybe-uninitialized
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Mike Blumenkrantz
f9fe08740a zink: always fully unwrap contexts
threaded_context_unwrap_sync() can be called safely on non-threaded
contexts

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33742>
2025-02-26 18:54:25 +00:00
Lionel Landwerlin
d0c980caa7 brw: avoid setting up the sampler header bits when unused
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704>
2025-02-26 17:19:04 +00:00
Lionel Landwerlin
8b4f997168 brw: optimize load payload with immediate headers
Currently the condition to use a single MOV is failing on immediate
values, so we emit 2 MOVs in SIMD8 instead of a single SIMD16.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704>
2025-02-26 17:19:04 +00:00
Rob Clark
513184fa44 tu: Suballoc VkEvent BOs
No need to burn an entire PAGE_SIZE BO for an event.  And in particular
the pattern of allocate + immediate mmap is expensive in a VM.
Suballocating cuts down the # of times we do this in
dEQP-VK.api.command_buffers.execute_large_primary from 10000 to 157,
avoiding problems with the test running up against watchdog timeout.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33721>
2025-02-26 16:51:08 +00:00
Alyssa Rosenzweig
c3cc756cf9 ir3: clean up progress manually
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
266638d10a nir: clean up progress
semantic patch made a few bad choices.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
593308a685 nir: eliminate nir_metadata_preserve
Everybody uses the wrapper now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
24d088104f nir,nak: update comments referencing nir_metadata_preserve
in prep for removing this method.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
ff94b155ab treewide: port remaining nir_metadata_preserve users
apply our semantic patch manually to the remaining users. Coccinelle bailed on
these files for whatever reason, I guess.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
9a58a8257e treewide: Switch to nir_progress
Via the Coccinelle patch at the end of the commit message, followed by

sed -ie 's/progress = progress | /progress |=/g' $(git grep -l 'progress = prog')
ninja -C ~/mesa/build clang-format
cd ~/mesa/src/compiler/nir && clang-format -i *.c
agxfmt

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    -return prog;
    +return nir_progress(prog, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    @@

    -if (prog_expr) {
    -nir_metadata_preserve(impl, metadata);
    -return true;
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -return false;
    -}
    +bool progress = prog_expr;
    +return nir_progress(progress, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, prog ? (metadata) : nir_metadata_all);
    -return prog;
    +return nir_progress(prog, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, prog ? (metadata) : nir_metadata_all);
    +nir_progress(prog, impl, metadata);

    @@
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, metadata);
    -return true;
    +return nir_progress(true, impl, metadata);

    @@
    expression impl;
    @@

    -nir_metadata_preserve(impl, nir_metadata_all);
    -return false;
    +return nir_no_progress(impl);

    @@
    identifier other_prog, prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    -other_prog |= prog;
    +other_prog = other_prog | nir_progress(prog, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +nir_progress(prog, impl, metadata);

    @@
    identifier other_prog, prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -other_prog = true;
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +other_prog = other_prog | nir_progress(prog, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    identifier prog;
    @@

    -if (prog_expr) {
    -nir_metadata_preserve(impl, metadata);
    -prog = true;
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +bool impl_progress = prog_expr;
    +prog = prog | nir_progress(impl_progress, impl, metadata);

    @@
    identifier other_prog, prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -other_prog = true;
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +other_prog = other_prog | nir_progress(prog, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    identifier prog;
    @@

    -if (prog_expr) {
    -prog = true;
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +bool impl_progress = prog_expr;
    +prog = prog | nir_progress(impl_progress, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    @@

    -if (prog_expr) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +bool impl_progress = prog_expr;
    +nir_progress(impl_progress, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, metadata);
    -prog = true;
    +prog = nir_progress(true, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -}
    -return prog;
    +return nir_progress(prog, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -}
    +nir_progress(prog, impl, metadata);

    @@
    expression impl;
    @@

    -nir_metadata_preserve(impl, nir_metadata_all);
    +nir_no_progress(impl);

    @@
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, metadata);
    +nir_progress(true, impl, metadata);

squashme! sed -ie 's/progress = progress | /progress |=/g' $(git grep -l 'progress = prog')

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
91872c9c51 nir: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
298788bfde asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:52 +00:00
Alyssa Rosenzweig
469b8bbf3c nir: add nir_progress/nir_no_progress helpers
These will replace nir_metadata_preserve as more ergonomic replacements that
convey a notion of impl progress instead of simply updating metadata.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:52 +00:00
Corentin Noël
a17d286dc4 lavapipe: Change lvp_cmd_type to anonymous enum
Fixes a build failure when using -Wenum-conversion.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33713>
2025-02-26 14:47:34 +00:00
Corentin Noël
1befb22ebb lavapipe: Remove doubly initialized features
They are now part of Vulkan 1.4

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33713>
2025-02-26 14:47:34 +00:00
Yogesh Mohan Marimuthu
5b02378c6f winsys/amdgpu: userq non imported fence can be ignored for same ip_type
Since there is only one userq per process there is no need to add
glWaitSync to cs->seq_no_dependencies if the fence is not imported
and ip type is same.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
224c0cfbdd winsys/amdgpu: userqueue multi ctx jobs are guaranteed to be in sequence
Jobs from multiple context are submitted to aws->cs_queue are executed in order. Jobs
in aws->cs_queue are directly added to userqueue ring, hence userqueue execution order
between context is guaranteed in case of userqueue.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
659a41293b winsys/amdgpu: same_queue variable should be set if there is only one queue
Fixes: 45fa34284f ("winsys/amdgpu: don't add fence dependency of other queues for userq")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
901f1ea8bd winsys/radeon: struct radeon_cmdbuf is rcs instead of cs for consistency
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
06691b9f39 winsys/amdgpu: amdgpu_cs_context is csc, amdgpu_cs is acs
radeon_cmdbuf is rcs instead of rws, probably earlier renaming of
rws was agressive.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
fc36840c04 winsys/amdgpu: make csc context as array
Instead of csc1 and csc2, make it as an array. Use current_cs_index
to point to csc that will be getting filled with commands.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
eb5bd057a1 winsys/amdgpu: do not use rcs->csc
Use amdgpu_cs(rcs)->csc. This will give more code readability with
next cleanup patches.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:43 +00:00
Valentine Burley
fe4d8d422f anv/ci: Remove fixed test from xfails
This Vulkan Video test was fixed in the commit referenced below.

Fixes: ee52885aec ("anv: Add one more flag of VideoCapability for encoding.")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33765>
2025-02-26 13:32:24 +00:00
David Rosca
0e68a2655f radeonsi/vcn: Rework decode ref handling
The issue with using video buffer associated data is that the data will
not be cleared when the buffer is removed from DPB. This will cause
issues if application tries to reuse such buffer (buffer that was
valid buffer in DPB in the past, but is currently not active in DPB)
as a dummy buffer for missing reference.
With Tier2 this works correctly because we allocate the DPB buffers
internally, but with UDT we use the video buffers directly for
references and so we need to make sure to only use the valid buffer
for a given index.

Instead of storing the buffer index as video buffer associated data,
use the render_pic_list array that we already have for keeping track
of active buffers in DPB.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33641>
2025-02-26 13:07:10 +00:00
David Rosca
fd3f297eb5 radeonsi/vcn: Add UDT support for VCN5
UDT uses decode target buffers directly as references.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33641>
2025-02-26 13:07:10 +00:00
Juan A. Suarez Romero
826acf5dce Revert "v3dv/ci: disable rpi5 job"
This reverts commit 68db5481f4.

Now that we are skipping tests causing OOM, we shouldn't have the
original problems that motivated the disablement.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33763>
2025-02-26 12:39:36 +00:00
Juan A. Suarez Romero
167347212a v3dv/ci: Skip tests causing OOM
There are some tests that reaches out of memory (OOM) on purpose to
cover some fail cases.

But others that shouldn't are actually causing OOM too because we run
multiple tests in parallel, which increases the memory pressure.

This can affects other tests running in parallel, causing an increase of
the flakiness.

It is better to skip all of them

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33763>
2025-02-26 12:39:36 +00:00
David Rosca
7f7206f1a9 radeonsi/video: Allocate video buffers with modifiers
This enables tiling (and DCC on GFX12) for video buffers.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:28 +00:00
David Rosca
58a6be0f1e radeonsi/vcn: Fix chroma pitch for JPEG decode
This used to work fine with linear only, but now we need to use the
actual chroma surface pitch. For JPEG this value is in bytes.
Also swap 64KB_R_X addr mode with 256KB_S_X.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:27 +00:00
David Rosca
6695eeaf42 ac/surface: Allow DCC for multi-plane formats on GFX12
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:27 +00:00
David Rosca
e9341be246 ac/surface: Only allow linear modifier for subsampled 422 formats
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:27 +00:00
Benjamin Lee
094177b9b5 meson: update wayland-protocols source_hash
This was missed when updating to 1.41.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 53b40a40f4 ("increase required wayland-protocols version to 1.41")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33752>
2025-02-26 10:53:25 +00:00
Mary Guillemard
e9d1e2b61e pan/genxml: Use DCD Flags in Draw struct on v9+
The first bits of the Draw struct were moved to DCD flags since v10.
To keep things in sync, we now use DCD flags instead on v10 and define
it on v9 to avoid uneeded PAN_ARCH if/else in preload logics.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
3aa1687829 panfrost: Rename CS ADD_IMMEDIATEXX to ADD_IMMXX
This is required map more closely to newer generation definition and avoid
needless PAN_ARCH blocks.

As the opcode is actually named ADD_IMMEDIATEXX on v12 and lower, this
wasn't changed.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
e970d440a2 panfrost: Fix FLUSH_CACHE2 other definition
This actually use the same format as L2/LSC flush mode.

This change is here to ease new generation definitions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
0eca4b87f0 panfrost: Rename CSF MOVE into MOVE48
We name it move48 on our helpers and new generations renamed it too.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
6603e519c9 panfrost: Avoid hard crash when major arch is unknown
This allows enumerating other Gallium screens.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
9a70754ebd panfrost: Use CSIF info for CSF registers count
Instead of hardcoding 96 everywhere, we can get that information from
the kernel. This is useful for newer generations that increased the
count of registers present.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
90bf48829a panfrost: Switch Gallium driver to use cs_sr_regXX
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
4c2e2eb445 panfrost: Rework cs_sr_regXX to be a macro
This move cs_sr_regXX in cs_builder.h and make usage less verbose.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
bbecaacc3f pan/genxml: Define RUN_FRAGMENT staging registers in an enum
This makes it more clear what is what.

It will also reduce the pain of migration on newer gen.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
c8882d83fd pan/genxml: Define RUN_COMPUTE staging registers in an enum
This makes it more clear what is what.

It will also reduce the pain of migration on newer gen.

RUN_COMPUTE_INDIRECT also use the same SRs so we also map to RUN_COMPUTE
there.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
11beea6242 panfrost: Remove write to TSD_3 in Gallium driver
This was set but never actually used.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
e0696b80d0 pan/genxml: Define RUN_IDVS staging registers in an enum
This makes it more clear what is what.

It will also reduce the pain of migration on newer gen as most values
only moved place.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Juan A. Suarez Romero
6f4af54aac vc4/ci: update expected results
Add new flakes

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33760>
2025-02-26 09:52:51 +00:00
Eric Engestrom
007998db14 ci/build: build-test the dri2 code
To prevent things like https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33669

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33692>
2025-02-26 09:14:39 +00:00
Tapani Pälli
41a7b58214 iris: wait for imported fences to be available in iris_fence_await
This ensures shared fence is available before we submit (and fail)
a batch with it, this fixes following issue on iris driver:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12650

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/33662>
2025-02-26 04:32:29 +00:00
Hyunjun Ko
ee52885aec anv: Add one more flag of VideoCapability for encoding.
Adds VK_VIDEO_ENCODE_H264/5_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR.
This also fixes dEQP-VK.video.capabilities.h265_encode_capabilities_query.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33729>
2025-02-26 01:38:55 +00:00
Rebecca Mckeever
b85c94fc89 panvk: Allow 3-byte formats
We are now using the vk_meta buffer <-> image copy helpers, which do
support 3-byte formats.

Fixes: 50679213 ("panvk: Switch to vk_meta")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33437>
2025-02-26 01:17:51 +00:00
Simon Ser
26d90674c2 vulkan/wsi/x11: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
e4ff98bacb libsync: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
42509180d4 panvk: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
8f9a390f33 venus: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
d951ca056a lavapipe: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
0be6b65f41 iris: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
bbb3069d05 freedreno: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
9859283aa0 pvr: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Sagar Ghuge
6f7a76e9d9 intel/compiler: Zero out the header for texel fetch
It looks like even if we pass the header not present in the sampler descriptor,
it's not helping with the correct behavior of texelFetch.

Experiment on real HW shows that if we just zero out the header and include it
in the message, it helps with the correct behavior. I'm not sure if there is a
valid HW workaround for this one.

We can skip masking the sampler message header bits 4:0 but masking them out
doesn't hurt in this case.

Increasing number of parameter impact sampler performance, For example,
a sample message using 5 parameters will not be able to sustain the same
throughput as a sample message with only 4 valid parameters. We should
look out for any perf impact with respect to texel fetch.

This patch fixes ~3k tests involving texelFetch instruction on Xe3+

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/33562>
2025-02-26 00:23:49 +00:00
Alyssa Rosenzweig
c0beb79145 hk: drop silly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
c8ee0895e3 asahi: drop silly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
1100c2328a asahi: rename wip modifier
this is gpu-tiled, not twiddled.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
42bc9f6400 ail: split compression up
this better describes the hw.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
99e346ef15 ail: rename twiddled -> gpu tiled
got the names flipped >_<

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
9da6e99b99 docs/asahi: clarify twiddled vs GPU-tiled
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Lionel Landwerlin
91f36ba5b6 anv: fix missing 3DSTATE_PS:Kernel0MaximumPolysperThread programming
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 815d2e3e8b ("anv: move 3DSTATE_PS to partial packing")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33712>
2025-02-25 23:42:01 +00:00
Benjamin Lee
3b5d5c072a panfrost: remove NIR_PASS_V usage for noperspective lowering
The rest of the NIR_PASS_V usage in panfrost was dropped in
34beb93635, but this one was added in an
MR that was merged after.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 081438ad39 ("panfrost: add nir pass to lower noperspective varyings")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33728>
2025-02-25 23:17:43 +00:00
Caio Oliveira
a030acd7c3 brw: Reformat brw_gram.y and brw_lex.l
Change to use Mesa space indentation.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33739>
2025-02-25 22:57:51 +00:00
Vasily Khoruzhick
2eb34c86f2 lima: ppir: add compactification pass
If we have a single instruction that uses only combiner unit and previous
instruction doesn't use this unit, two instructions can be safely merged.

Implement compactification pass to do that.

The pass doesn't update instruction dependencies, so it should be run
right before codegen.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33570>
2025-02-25 21:59:18 +00:00
Xaver Hugl
1433955420 vulkan/wsi: handle the compositor not supporting extended target volume better
Instead of unconditionally ignoring the HDR metadata, just attempt to create the image
description, and if it fails, fall back to creating it without HDR metadata.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Xaver Hugl
4b663d561b vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Colin Marc
789507c99c vulkan/wsi: implement the Wayland color management protocol
This allows applications to use color spaces other than sRGB, if the compositor
supports them.

The color management surface is only created if a non-sRGB and non-passthrough
colorspace is set on the surface, so applications can still use the protocol
directly if they prefer.

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Xaver Hugl
53b40a40f4 increase required wayland-protocols version to 1.41
This version contains the color management protocol.

This commit also adjusts the build-wayland script to mention
that the DEBIAN_BASE_TAG also has to be bumped.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Georg Lehmann
9f40d06d2d radv: use nir_opt_phi_to_bool
Foz-DB Navi21:
Totals from 5238 (6.60% of 79377) affected shaders:
MaxWaves: 112653 -> 112805 (+0.13%)
Instrs: 8008658 -> 8008518 (-0.00%); split: -0.18%, +0.18%
CodeSize: 42632748 -> 42650584 (+0.04%); split: -0.16%, +0.20%
VGPRs: 293296 -> 292672 (-0.21%); split: -0.22%, +0.01%
SpillSGPRs: 1958 -> 2066 (+5.52%); split: -0.66%, +6.18%
SpillVGPRs: 2934 -> 2896 (-1.30%)
Latency: 77959669 -> 77957296 (-0.00%); split: -0.10%, +0.10%
InvThroughput: 20650753 -> 20585680 (-0.32%); split: -0.39%, +0.08%
VClause: 164769 -> 164979 (+0.13%); split: -0.14%, +0.27%
SClause: 237718 -> 237731 (+0.01%); split: -0.03%, +0.03%
Copies: 643403 -> 634147 (-1.44%); split: -1.83%, +0.39%
Branches: 234353 -> 233990 (-0.15%); split: -0.30%, +0.15%
PreSGPRs: 291935 -> 293893 (+0.67%); split: -0.01%, +0.68%
PreVGPRs: 245802 -> 245241 (-0.23%); split: -0.23%, +0.00%
VALU: 5145144 -> 5133006 (-0.24%); split: -0.38%, +0.14%
SALU: 1178442 -> 1189578 (+0.94%); split: -0.19%, +1.13%
VMEM: 343288 -> 343994 (+0.21%); split: -0.02%, +0.23%
SMEM: 354275 -> 354273 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
a237a3def8 nir/opt_algebraic: optimize b2i(a) != -b2i(b)
Foz-DB Navi21:
Totals from 4 (0.01% of 79377) affected shaders:
Instrs: 881 -> 861 (-2.27%)
CodeSize: 4968 -> 4836 (-2.66%)
Latency: 6127 -> 6006 (-1.97%)
InvThroughput: 1128 -> 1068 (-5.32%)
VALU: 564 -> 534 (-5.32%)
SALU: 111 -> 121 (+9.01%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
4141043295 nir/opt_algebraic: optimize constant shift of DXBC booleans
Can be combined with further iand.

Foz-DB Navi21:
Totals from 190 (0.24% of 79377) affected shaders:
Instrs: 100628 -> 100225 (-0.40%); split: -0.41%, +0.01%
CodeSize: 567828 -> 565884 (-0.34%); split: -0.35%, +0.00%
Latency: 968415 -> 968052 (-0.04%); split: -0.09%, +0.06%
InvThroughput: 285804 -> 285210 (-0.21%); split: -0.25%, +0.04%
VClause: 1959 -> 1958 (-0.05%)
Copies: 5696 -> 5711 (+0.26%)
PreSGPRs: 7567 -> 7569 (+0.03%)
VALU: 77161 -> 76751 (-0.53%); split: -0.54%, +0.01%
SALU: 7831 -> 7840 (+0.11%); split: -0.09%, +0.20%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
1e522e7d75 nir/opt_algebraic: optimize dxbc boolean not
Foz-DB Navi21:
Totals from 237 (0.30% of 79377) affected shaders:
Instrs: 486690 -> 486146 (-0.11%); split: -0.11%, +0.00%
CodeSize: 2629516 -> 2626052 (-0.13%); split: -0.13%, +0.00%
VGPRs: 18744 -> 18736 (-0.04%)
Latency: 7404763 -> 7399806 (-0.07%); split: -0.07%, +0.01%
InvThroughput: 1800282 -> 1798388 (-0.11%); split: -0.11%, +0.00%
VClause: 12101 -> 12106 (+0.04%); split: -0.01%, +0.05%
Copies: 34225 -> 34170 (-0.16%); split: -0.21%, +0.05%
PreSGPRs: 14634 -> 14639 (+0.03%)
PreVGPRs: 16713 -> 16706 (-0.04%)
VALU: 317523 -> 316693 (-0.26%); split: -0.26%, +0.00%
SALU: 53814 -> 54097 (+0.53%); split: -0.38%, +0.90%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
f9722e35be nir/opt_algebraic: optimize more boolean bcsel with constants
Foz-DB Navi21:
Totals from 667 (0.84% of 79377) affected shaders:
Instrs: 3890980 -> 3886878 (-0.11%); split: -0.11%, +0.00%
CodeSize: 21088576 -> 21065848 (-0.11%); split: -0.11%, +0.00%
SpillSGPRs: 458 -> 446 (-2.62%); split: -3.49%, +0.87%
Latency: 26160728 -> 26162856 (+0.01%); split: -0.02%, +0.02%
InvThroughput: 6999254 -> 7000593 (+0.02%); split: -0.01%, +0.03%
VClause: 103745 -> 103743 (-0.00%)
SClause: 93113 -> 93109 (-0.00%)
Copies: 344097 -> 344794 (+0.20%); split: -0.05%, +0.25%
Branches: 134546 -> 134764 (+0.16%); split: -0.01%, +0.17%
PreSGPRs: 40677 -> 40298 (-0.93%); split: -0.93%, +0.00%
PreVGPRs: 40185 -> 40190 (+0.01%)
VALU: 2584477 -> 2584468 (-0.00%); split: -0.00%, +0.00%
SALU: 573587 -> 569353 (-0.74%); split: -0.75%, +0.01%
SMEM: 124794 -> 124790 (-0.00%)

v2 (idr): Remove a pattern that is made redundant by this commit
combined with the previous commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
9785fa460c nir/opt_algebraic: optimize DXBC boolean bcsel
Foz-DB Navi21:
Totals from 1749 (2.20% of 79377) affected shaders:
Instrs: 1695408 -> 1685149 (-0.61%); split: -0.68%, +0.07%
CodeSize: 9241312 -> 9174180 (-0.73%); split: -0.79%, +0.06%
VGPRs: 90688 -> 90664 (-0.03%); split: -0.04%, +0.01%
SpillSGPRs: 278 -> 298 (+7.19%)
Latency: 9560167 -> 9540386 (-0.21%); split: -0.29%, +0.08%
InvThroughput: 2236022 -> 2220411 (-0.70%); split: -0.72%, +0.02%
VClause: 29910 -> 29917 (+0.02%)
Copies: 146365 -> 145230 (-0.78%); split: -1.03%, +0.25%
Branches: 59545 -> 59560 (+0.03%)
PreSGPRs: 78858 -> 79242 (+0.49%); split: -0.10%, +0.59%
PreVGPRs: 78643 -> 78560 (-0.11%); split: -0.11%, +0.00%
VALU: 1127861 -> 1113990 (-1.23%); split: -1.24%, +0.01%
SALU: 249535 -> 253237 (+1.48%); split: -0.15%, +1.63%

v2 (idr): Remove a pattern that is now redundant.

v3 (idr): Don't undistribute ineg from bcsel. On platforms where ineg
is a free source modifier, this can be harmful.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
674d970861 nir/opt_algebraic: 0 >= a -> 0 == a
Foz-DB Navi21:
Totals from 2179 (2.75% of 79377) affected shaders:
MaxWaves: 40987 -> 40917 (-0.17%); split: +0.00%, -0.18%
Instrs: 5950981 -> 5949310 (-0.03%); split: -0.04%, +0.01%
CodeSize: 32120808 -> 32110328 (-0.03%); split: -0.04%, +0.00%
VGPRs: 141704 -> 141768 (+0.05%); split: -0.01%, +0.05%
SpillSGPRs: 1750 -> 1746 (-0.23%)
Latency: 56667295 -> 56562916 (-0.18%); split: -0.19%, +0.00%
InvThroughput: 13292128 -> 13288691 (-0.03%); split: -0.03%, +0.00%
VClause: 151845 -> 151755 (-0.06%); split: -0.06%, +0.00%
SClause: 172316 -> 172443 (+0.07%); split: -0.02%, +0.09%
Copies: 458724 -> 458951 (+0.05%); split: -0.08%, +0.13%
Branches: 195239 -> 195351 (+0.06%); split: -0.00%, +0.06%
PreSGPRs: 135304 -> 135317 (+0.01%); split: -0.01%, +0.02%
PreVGPRs: 122430 -> 122428 (-0.00%); split: -0.01%, +0.01%
VALU: 3924585 -> 3924062 (-0.01%); split: -0.02%, +0.01%
SALU: 820666 -> 819414 (-0.15%); split: -0.17%, +0.02%
SMEM: 247036 -> 247142 (+0.04%); split: -0.00%, +0.04%

v2 (idr): Remove a pattern that is now redundant. This was originaly
removed in a commit later in the MR.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
000f14f7fd nir/opt_algebraic: optimize ineg(a) == #b
No Foz-DB changes.

v2 (idr): Remove some patterns that are now redundant. These were
originally removed in a commit later in the MR.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:08 +00:00
Georg Lehmann
3e4ac92298 nir/opt_algebraic: optimize ineg(a) == ineg(b)
DXBC boolean cleanup.

Foz-DB Navi21:
Totals from 19 (0.02% of 79188) affected shaders:
Instrs: 9720 -> 9652 (-0.70%)
CodeSize: 54056 -> 53640 (-0.77%)
Latency: 95357 -> 94377 (-1.03%); split: -1.03%, +0.00%
InvThroughput: 17331 -> 16939 (-2.26%)
Copies: 604 -> 605 (+0.17%)
PreSGPRs: 832 -> 838 (+0.72%)
PreVGPRs: 701 -> 699 (-0.29%)
VALU: 6551 -> 6485 (-1.01%)
SALU: 893 -> 891 (-0.22%); split: -1.68%, +1.46%

v2 (idr): Remove a pattern that is now redundant. The version without
ineg already exists much earlier in the file. Search for b2iN.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:08 +00:00
Georg Lehmann
dd1a7f0e8c nir: add a pass to optimize phis to 1bit
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:08 +00:00
Gurchetan Singh
a5f5d26080 gallium: drop const qualifier on return type
Observed the following error with -Werror enabled:

nir_to_tgsi.c:550:8: error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33741>
2025-02-25 19:39:37 +00:00
Dylan Baker
c33ebf09f5 iris: fix handling of GL_*_VERTEX_CONVENTION
By actually setting the state packets according to the program data.
Also ensure that we correctly flag that the program may be dirty when
the geometry shader state changes

Fixes piglit tests: `spec@!opengl 3.2@gl-3.2-adj-prims * pv-first`

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
2025-02-25 19:18:25 +00:00
Dylan Baker
0477ee660f iris: Correctly set NOS for geometry shader state changes
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
2025-02-25 19:18:25 +00:00
Vasily Khoruzhick
aefe6cca8d lima: ci: update deqp CI expectations
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:56 +00:00
Vasily Khoruzhick
9c1a31cb55 lima: ppir: try scheduling root nodes into the same instruction
Root nodes do not have dependencies, so it is safe to attempt scheduling
them into the same instruction

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:56 +00:00
Vasily Khoruzhick
d6987daef9 lima: ppir: introduce an optimizer
Introduce an optimizer for ppir with 3 passes:

1) remove empty blocks: this one currently doesn't have any effect on
   code generation, but it's required by other passes
2) remove redundant mov that is generated for store_output intrinsic when
   possible
3) dead code elimination

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:56 +00:00
Vasily Khoruzhick
0471b438d6 lima: ppir: assign an index for discard block
Discard block is the only block that we generate internally, and it
currently just gets an index of 0 which collides with the very first
block. It is not an issue for compiler, but an eyesore for debug output
for a program with discard_if.

Assign INT_MAX index for it.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:55 +00:00
Vasily Khoruzhick
8905ee3a03 lima: ppir: fix regalloc bugs
Currently regalloc doesn't mark write destinations in the single
instructions as conflicting, as a result regalloc may assign the same
register to a multiple write destinations.

Before we started scheduling multiple root nodes into a single instruction
it was pretty much hidden. Fix it by marking destination registers as
conflicting if instruction has multiple writes.

Also stop handling a special case for output registers in regalloc and just
mark them as live in the last instruction of "stop" block(s)

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:55 +00:00
Samuel Pitoiset
c58655b999 vulkan: filter duplicate pNext struct at device creation
Recently, Indiana Jones and The Great Circle messed up this by adding
duplicates and this was causing the game to crash at launch.

Of course, this was an application bug that VVL was also able to catch
but I think maybe Mesa should ignore those instead of failing to create
the logical device.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33705>
2025-02-25 16:55:03 +00:00
Christian Gmeiner
eb1f163848 zink/ntv: Only emit GeometryStreams cap if multiple streams are used
From the SPIR-V spec:
  GeometryStreams: Uses multiple numbered streams for geometry-stage output.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33723>
2025-02-25 16:20:04 +00:00
Pavel Ondračka
6b7b8738b3 r300: do not include newline in the error messages
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33529>
2025-02-25 15:57:35 +00:00
Pavel Ondračka
62507a2aa7 r300: forward all compile failures to state tracker
Additionally an environment variable RADEON_DEBUG=dummysh is introduced
to force the old behavior, i.e., to just silently use a dummy shader (or
skip the draw altogether) instead.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33529>
2025-02-25 15:57:35 +00:00
Pavel Ondračka
5e0369d8bb r300: stop reporting compile failures in finalize_nir
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33529>
2025-02-25 15:57:35 +00:00
Valentine Burley
b88b7f9294 lavapipe: Update driverVersion
Use vk_get_driver_version instead of hardcoding the driver version to 1.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33730>
2025-02-25 14:14:54 +00:00
Samuel Pitoiset
c3884f7f1e radv: reserve bits explicitly for cache key structs
Having explicit reserved bits for those structs will make compiler
change backports easier and more robust regarding precompiled shaders
on SteamDeck.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33706>
2025-02-25 13:52:18 +00:00
Martin Krastev
a3818adca5 svga/ci: enable vmware farm
Reinstate vmware farm after infrastructure maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33733>
2025-02-25 13:31:14 +00:00
Zan Dobersek
710e74a082 tu: make tu_debug_flags enum 64-bit
Soon tu_debug_flags will overgrow its 32-bit capacity. To avoid issues the
enum is resized to 64 bits and handling of these flag values is adjusted
accordingly.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33663>
2025-02-25 13:05:48 +00:00
Hans-Kristian Arntzen
13a3f9a972 radv: Always set 0 dispatch offset for indirect CS.
Fixes severe glitching in Avowed.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33732>
2025-02-25 12:17:11 +00:00
Erik Faye-Lund
21aa58e9b6 pan/bi: remove unused debug output
There's no more users left of this switch or macro, so let's just get
rid of it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33710>
2025-02-25 11:08:24 +00:00
Erik Faye-Lund
fee6e51c14 pan/bi: use unreachable instead of DBG + assert
This error isn't particularly interesting to be able to toggle at
runtime. Let's just use the unreachable macro instead.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33710>
2025-02-25 11:08:24 +00:00
Samuel Pitoiset
67c150bf9e radv: fix missing SQTT barriers for fbfetch color/depth decompressions
SQTT layout transitions need to be inside SQTT barrier. Otherwise, this
throws an assertion in RADV and might also crash when the capture is
opened with RGP.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12664
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33719>
2025-02-25 10:18:42 +00:00
Marek Olšák
aff6b63d10 radeonsi: print why draws are rejected
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
695cd8f41a radeonsi: simplify bind_vertex_elements due to being before set_vertex_buffers
The unaligned checking is unnecessary because si_bind_vertex_elements
always unbinds all vertex buffers.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
c4414324a1 radeonsi: don't set num_vertex_buffers and don't unbind in set_vertex_buffers
The number of bound vertex buffers is now always equal to the number of
used buffers in the vertex elements state even if some buffers are NULL.

set_vertex_buffers doesn't unbind [count..last_count-1] buffers anymore.
bind_vertex_elements_state does that. It lets us remove code from
si_set_vertex_buffers.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
0f54898583 radeonsi: require that count in set_vertex_buffers matches vertex elements state
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
7bf5d2ce75 radeonsi: add assertion requiring binding vertex elements before vertex_buffers
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
1638d486ff gallium/u_threaded,st/mesa: add a merged set_vertex_elements_and_buffers call
Setting vertex elements before vertex buffers is a new requirement of gallium.

This is the only way to set the vertex elements state after vertex buffers
in st/mesa while setting the state before vertex buffers in tc_batch_execute.

A new TC call is added to set both vertex elements and vertex buffers.
Vertex buffers are filled by st/mesa first, and then the vertex elements
state is set in the same call. When TC calls it, it binds vertex elements
before vertex buffers.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
2606ceacdd cso_context: add cso_get_vertex_elements_for_bind, letting the caller bind it
for st/mesa

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
58b3d24b25 nine: bind exactly the number of vertex buffers as vertex elements need
gallium will require this (radeonsi won't work otherwise).

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
05fa8391b9 nine: remove unused last_vtxbuf_count
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
ecbbbae5c3 nine: always update vertex buffers after updating vertex elements
gallium will require this. (radeonsi won't work otherwise)

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
36d8191176 nine: change the vtxbuf dirty mask to bool
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Samuel Pitoiset
c64b8c8401 radv: stop computing the UUID using the physical device cache key
Otherwise, the UUID changes for games that have shader-based drirc
workarounds and this breaks precompiled shaders on SteamDeck.

Instead, use this pdev cache key to compute the logical device hash
which is common to all pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33717>
2025-02-25 07:59:02 +00:00
Peyton Lee
4fe586f71e radeonsi/vpe: support geometric scaling
When the reduction ratio exceeds the hardware limit,
enable the geometric scaling mechanism.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33528>
2025-02-25 07:29:46 +00:00
Peyton Lee
e85a6b6a63 radeonsi/vpe: check reduction ratio
Check the reduction ratio is within the hardware capablity.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33528>
2025-02-25 07:29:46 +00:00
Faith Ekstrand
c9ba28da55 nak/nir: Don't provide dummy backend2 tex srcs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
ff0a82e785 nak: Handle tex ops with only one source
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
58218c7349 nvk: Do not set INVALIDATE_SKED_CACHES pre-MaxwellB
The other two uses of this are behind guards but we forgot this one.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
c145147871 nvk: Don't bind a fragment shading rate image pre-Turing
Fixes: 75bcb656d9 ("nvk: Add support for binding fragment shading rate images")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
f441ed1f7b nvk/nvkmd: Fix logging of VA bind addresses
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Timothy Arceri
5ad508d743 util/disk_cache: dont create multidisk cache dir if unused
As reported in issue #11825 the code that is meant to clean up old
cache dirs actually ends up creating an empty dir due to reusing
existing code to create the cache path required for the potential
cleanup.

Here we make the code more flexible allowing cache path strings
to be returned by the helpers if the directory already exists
or returning NULL if we don't want to create a new directory.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11825
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33699>
2025-02-25 00:11:03 +00:00
Lorenzo Rossi
4d36528d04 nak: Fold bool-int-bool conversions
As explained in https://gitlab.freedesktop.org/mesa/mesa/-/issues/10204
there are places in the NAK backend where we emit i2b(b2i(x))
conversions that cannot be folded by NIR passes.

This commit adds to the copy propagation pass the ability to track
boolean conversions, folding them whenever possible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10204
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33646>
2025-02-24 23:50:52 +00:00
Caio Oliveira
7311bcfd6a intel/brw: Don't need to repair CFG in brw_opt_combine_constants
Since a previous change ensured that a DO-block is guaranteed to not be
followed by a DO-block, it is sufficient to pick the next block without
requiring to repair the CFG.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33536>
2025-02-24 23:25:06 +00:00
Caio Oliveira
d2c39b1779 intel/brw: Always have a (non-DO) block after a DO in the CFG
Make the "block after DO" more stable so that adding instructions after
a DO doesn't require repairing the CFG.  Use a new SHADER_OPCODE_FLOW
instruction that is a placeholder representing "go to the next block"
and disappears at code generation.

For some context, there are a few facts about how CFG currently works

- Blocks are assumed to not be empty;
- DO is always by itself in a block, i.e. starts and ends a block;
- There are no empty blocks;
- Predicated WHILE and CONTINUE will link to the "block after DO";
- When nesting loops, it is possible that the "block after DO" is
  another "DO".

Reasons and further explanations for those are in the brw_cfg.c comments.

What makes this new change useful is that a pass might want to add
instructions between two DO instructions.  When that happens, a new
block must be created and any predicated WHILE and CONTINUE must be
repaired.

So, instead of requiring a repair (which has proven to be tricky in
the past), this change adds a block that can be "virtually" empty but
allow instructions to be added without further changes.

One alternative design would be allowing empty blocks, that would be
a deeper change since the blocks are currently assumed to be not empty
in various places.  We'll save that for when other changes are made to
the CFG.

The problem described happens in brw_opt_combine_constants, and a
different patch will clean that up.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33536>
2025-02-24 23:25:06 +00:00
Caio Oliveira
d32a5ab0e4 intel/brw: Use the builder DO() function in all places
Shorter and a preparation to add some functionality to DO().

Had to make it const since that's the convention for builder, so
just made all the sibling helpers const too.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33536>
2025-02-24 23:25:06 +00:00
Stéphane Cerveau
5f8f3db475 anv: fix error code in GetPhysicalDeviceVideoFormatProperties
If no video profile format found, we should return
the custom error code
VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33709>
2025-02-24 23:03:43 +00:00
Natalie Vock
14b902c825 radv/rt: Don't allocate the traversal shader in a capture/replay range
We never write the traversal shader address out to shader group handles,
so this is not necessary. On the flipside, it can cause conflicts if the
traversal shader is allocated in a range occupied by a replayed shader.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33711>
2025-02-24 22:41:19 +00:00
Alyssa Rosenzweig
feedd427b3 nvk: rewrite query copy shader in CL C
as previously discussed.

this is using "library CL" instead of kernel CL, which is the older way of doing
things. it works, it just has more boilerplate per-kernel than we'd want
otherwise. but library CL is basically free to integrate into a driver, whereas
kernel CL requires a lot more upfront investment. (I'm working on cleaning that
up but we're not quite there yet.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33362>
2025-02-24 21:15:26 +00:00
Georg Lehmann
c249556bf4 aco/insert_exec: fix continue_or_break on gfx6-7
s_cmp_lg_u64 is gfx8+

Fixes: 115ff5f95b ("aco/insert_exec_mask: don't restore exec in continue_or_break blocks")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33715>
2025-02-24 20:41:17 +00:00
Alyssa Rosenzweig
904760ff8e radv/nir_lower_fs_intrinsics: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
184557932f radv/nir_lower_intrinsics_early: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
a589bae3aa radv/nir_lower_fs_barycentric: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
88587a3839 radv/nir_lower_view_index: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
c025a211f2 radv/nir_lower_viewport_to_zero: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
2504e7951b treewide: use nir_shader_tex_pass
Adapted the Coccinelle rules from the nir_shader_intrinsics_pass commit a while
ago, which was buggy then and buggy now, so then I fixed stuff up manually
(including formatting).

Via Coccinelle patch:

    @def@
    typedef bool;
    typedef nir_builder;
    typedef nir_instr;
    typedef nir_def;
    identifier fn, instr, intr, x, builder, data;
    @@

    static fn(nir_builder* builder,
    -nir_instr *instr,
    +nir_tex_instr *intr,
    ...)
    {
    (
    -   if (instr->type != nir_instr_type_tex)
    -      return false;
    -   nir_tex_instr *intr = nir_instr_as_tex(instr);
    |
    -   nir_tex_instr *intr = nir_instr_as_tex(instr);
    -   if (instr->type != nir_instr_type_tex)
    -      return false;
    )

    <...
    (
    -instr->x
    +intr->instr.x
    |
    -instr
    +&intr->instr
    )
    ...>

    }

    @pass depends on def@
    identifier def.fn;
    expression shader, progress;
    @@

    (
    -nir_shader_instructions_pass(shader, fn,
    +nir_shader_tex_pass(shader, fn,
    ...)
    |
    -NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
    +NIR_PASS_V(shader, nir_shader_tex_pass, fn,
    ...)
    |
    -NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
    +NIR_PASS(progress, shader, nir_shader_tex_pass, fn,
    ...)
    )

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v3d]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Georg Lehmann
940e87f225 nir/opt_remove_phis: use nir_shader_phi_pass
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Georg Lehmann
e4f0de89a5 nir/opt_phi_precision: use nir_shader_phi_pass
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Georg Lehmann
5a0702f351 nir/builder: add nir_shader_phi_pass
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Alyssa Rosenzweig
dda2dadb98 nir/builder: add nir_shader_tex_pass
after the intrinsic and ALU passes. why not?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
David Rosca
367735551d frontends/vdpau: Use extra reference buffer for AV1 film grain
AV1 applies film grain to decode target only, references in DPB must be
stored without film grain.
Fixes film grain decoding on drivers that use decode target buffers
directly for references.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33640>
2025-02-24 19:04:53 +00:00
Georg Lehmann
5da76df4cd nir/search_helpers: check tex source type in is_only_used_as_float
Foz-DB Navi21:
Totals from 164 (0.21% of 79377) affected shaders:
Instrs: 197477 -> 197035 (-0.22%); split: -0.23%, +0.01%
CodeSize: 1052944 -> 1051140 (-0.17%); split: -0.18%, +0.01%
VGPRs: 8104 -> 8080 (-0.30%)
Latency: 1115663 -> 1115567 (-0.01%); split: -0.06%, +0.05%
InvThroughput: 265822 -> 265158 (-0.25%); split: -0.26%, +0.01%
VClause: 3792 -> 3789 (-0.08%); split: -0.11%, +0.03%
SClause: 5738 -> 5744 (+0.10%); split: -0.02%, +0.12%
Copies: 12223 -> 12200 (-0.19%); split: -0.53%, +0.34%
PreVGPRs: 6807 -> 6801 (-0.09%); split: -0.15%, +0.06%
VALU: 139206 -> 138785 (-0.30%); split: -0.31%, +0.01%
SALU: 27852 -> 27853 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33674>
2025-02-24 16:34:53 +00:00
Georg Lehmann
3d8585e4fc nir/search_helpers: look through vecs in is_only_used_as_float
Will be useful with the next commit, or for backends that don't lower
alu to scalar.

No changes on Navi21.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33674>
2025-02-24 16:34:53 +00:00
Georg Lehmann
e0cebac14f nir/opt_algebraic: optimize b2f(a != 0) * a
Just D3D9 things.

Foz-DB Navi21:
Totals from 137 (0.17% of 79377) affected shaders:
MaxWaves: 3366 -> 3370 (+0.12%); split: +0.24%, -0.12%
Instrs: 76462 -> 72091 (-5.72%)
CodeSize: 411584 -> 380792 (-7.48%)
Latency: 279472 -> 275505 (-1.42%); split: -2.01%, +0.59%
InvThroughput: 71311 -> 65369 (-8.33%)
VClause: 1587 -> 1612 (+1.58%); split: -1.01%, +2.58%
SClause: 1111 -> 1105 (-0.54%); split: -1.08%, +0.54%
Copies: 5621 -> 5602 (-0.34%); split: -1.39%, +1.05%
PreSGPRs: 5266 -> 5241 (-0.47%); split: -0.51%, +0.04%
PreVGPRs: 4249 -> 4236 (-0.31%); split: -0.35%, +0.05%
VALU: 50049 -> 45901 (-8.29%)
SALU: 8948 -> 8818 (-1.45%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33674>
2025-02-24 16:34:53 +00:00
Mike Blumenkrantz
e63acdd2b7 zink: force cached mem for streaming uploads
it was previously possible to hit a path where an idle buffer with
non-cached mem could be directly mapped for streaming data uploads,
which kills perf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33678>
2025-02-24 15:55:21 +00:00
Job Noorman
7210054db8 ir3: reformat after previous commit
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33701>
2025-02-24 15:27:12 +00:00
Job Noorman
2fedc82c0c ir3: don't use deprecated NIR_PASS_V anymore
Also replace OPT_V with OPT while we're at it.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33701>
2025-02-24 15:27:12 +00:00
Job Noorman
0f69ada3b5 ir3/lower_tess: make all NIR passes report progress
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33701>
2025-02-24 15:27:11 +00:00
Thomas H.P. Andersen
7276191d59 nvk: use a valid allocation scope
VK_OBJECT_TYPE_DESCRIPTOR_POOL is used in vk_zalloc2 as allocation scope.
This should probably have been object scope.

Fixes: 607686f6bf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33697>
2025-02-24 14:44:33 +00:00
Rhys Perry
2a3dce1b59 ac/nir: fix tess factor optimization when workgroup barriers are reduced
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b49eab68a8 ("ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12632
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33645>
2025-02-24 14:07:40 +00:00
Valentine Burley
5a510aede7 anv/ci: Increase parallelism of zink-anv-adl
With some of the jobs migrated to the new brask and nissa devices, we can
increase zink-on-anv coverage on brya. Reduce the fraction of Piglit
tests and introduce fractional GLESCTS testing.

Also increase the parallelism of the zink nightly job, but lower its
FDO_CI_CONCURRENT variable to avoid OOMkills. To accommodate this,
decrease the parallelism of the anv-adl-full job.

Additionally, drop redundant HWCI_START_WESTON from full runs that
inherit the variable from their pre-merge jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
318bc2ef03 intel/ci: Migrate intel-adl-cl and intel-adl-skqp to nissa
Move the piglit CL and SKQP jobs to the new nissa devices. Nissa is
significantly slower than brya, so increase parallelism and timeout
accordingly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
cb9875ce1b anv/ci: Migrate anv-adl-angle job to brask
Move the ANGLE job to the new brask devices. Brask is significantly
slower than brya, so increase the parallelism accordingly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
2a3c373824 intel/ci: Add brask and nissa
Add two new device types in LAVA, brask and nissa. These ADL devices will
be used to offload some of the jobs from brya.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
85f9088d13 intel/ci: Honor device-specific FDO_CI_CONCURRENT variables
FDO_CI_CONCURRENT was getting overwritten by .intel-common-test
inheriting FDO_CI_CONCURRENT: 6 from .lava-test, so change the order of
these definitions to fix that.

This change unfortunantely means that GPU_VERSION has to be overwritten
in some cases.

Additionally, drop redundant .anv-test where .anv-angle-test is used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
38fc58107a anv/ci: Update expectations from latest nightly
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Daniel Schürmann
ea765162c3 aco/ssa_elimination: create a single parallelcopy instruction for linear and logical phis
Totals from 6651 (8.38% of 79377) affected shaders: (Navi31)

Instrs: 14722896 -> 14722290 (-0.00%); split: -0.01%, +0.00%
CodeSize: 77992072 -> 77989284 (-0.00%); split: -0.01%, +0.00%
Latency: 160542885 -> 160541215 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 24543177 -> 24542710 (-0.00%); split: -0.00%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
0e98388614 aco/ssa_elimination: refactor scratch_sgpr handling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
302678df91 aco/ssa_elimination: insert parallelcopies for p_phi immediately before branch
Totals from 2499 (3.15% of 79377) affected shaders: (Navi31)
Instrs: 6011729 -> 6011761 (+0.00%); split: -0.00%, +0.00%
CodeSize: 31573216 -> 31574236 (+0.00%); split: -0.00%, +0.00%
Latency: 83364734 -> 83365781 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 13545643 -> 13545783 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
794c2b7e2f aco/lower_branches: allow other instructions after s_andn2 in break blocks
We are about to insert parallelcopies from phis there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
115ff5f95b aco/insert_exec_mask: don't restore exec in continue_or_break blocks
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
7f7c1d463a aco/insert_exec_mask: Don't immediately set exec to zero in break/continue blocks
Instead, only indicate that exec should be zero and do
so in the successive helper block. This allows to insert
the parallelcopies from logical phis directly before the
branch in break and continue blocks.

Totals from 56 (0.07% of 79377) affected shaders: (Navi31)
Latency: 2472367 -> 2472422 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 253053 -> 253055 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Karol Herbst
4975ac79ef rusticl/util: add missing comment and assert to char_arr_to_cstr
I forgot to push those changes...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33703>
2025-02-24 12:23:21 +00:00
Lionel Landwerlin
e4f31b8744 intel/ds: rework RT tracepoints
That way we can identify single dispatch within each step.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33684>
2025-02-24 08:08:02 +00:00
Lionel Landwerlin
31c5c386d1 u_trace: pass tracepoint flags to the read_timestamp callback
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33684>
2025-02-24 08:08:02 +00:00
Yiwei Zhang
43c3270c26 venus: temporarily disable 1.4 support
Will implement VK_EXT_host_image_copy via custom venus protocol support
and then re-enable 1.4.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33698>
2025-02-24 00:11:55 +00:00
Yiwei Zhang
ac13146092 venus: limit second queue emulation to android framework
A proper emulation of a second queue requires handling of
wait-before-signal behavior of timeline semaphore. It's doable in Venus
but not that much useful since 1.4 requires a second transfer queue
family if not implementing hostImageCopy. So this change has limited
the second queue emulation as a workaround for android framework on
Android 14 and above.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33698>
2025-02-24 00:11:55 +00:00
Karol Herbst
0fd70ee9de rusticl/platform: advertise all extensions supported by all devices
There is a spec issue about this to clarify this behavior, but the current
wording can be interpreted that the platform always lists all extensions
supported by all drivers.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33667>
2025-02-23 19:39:58 +00:00
Mi, Yanfeng
ed77f67e44 anv: add emulated 64bit integer storage support
By turning a R64 into R32G32

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:51 +00:00
Mi, Yanfeng
723e52cbcc anv: Support putting image base address and image params in surface state
images params including pitch, width, height and tile mode
for image address caculation

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:51 +00:00
Lionel Landwerlin
0a42afb262 anv: add a is_sparse for image format support checks
We'll want to disable some support for software detiled accesses on
sparse 64bit images because we'll pick a single optimized tiling for
shader detiling which is not going to be block shape compliant for
sparse resources.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
5c7397c751 anv: add mapping for VBO formats in format mapping
We're about to introduce R64_(S|U)INT support for some images. This
will use a different HW format than what we want for VBOs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
eda9422cfc anv: rename compressed format emulation helpers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
ce7208c3ee brw: add support for texel address lowering
The expectations are :
  - no MSAA images
  - a single tiling mode is used when not linear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
b25e050ec7 brw: add support for 64bit storage images load/store
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
3bd4c5a166 brw: include UGM fence when TGM + lowered image->global
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
23e14ac41e nir: track lowered image intrinsics to globals
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
38fa9e144c isl: add a helper to report what dimensions a tiling supports
For shader detiling, it's useful to know if we avoid bothering trying
to detile a 1D image.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
cfa1d40be5 isl: add support for R64 storage image lowering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
ba03e6734c isl: select a tiling for shader detiling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
8e1cad8d8f isl: centralize supported tilings in a single function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
f22f53cfe8 isl: add usage for software detiling
Need to ensure miptails are not used in that case.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
50176b83e9 isl: report tiling address swizzles
This will be useful for software detiling.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Eric Engestrom
06391759f0 lavapipe/ci: add vkd3d job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33693>
2025-02-23 14:55:27 +00:00
Yiwei Zhang
ed4e2fac86 venus: fix sample location info validity
Only look for sample location info when MSAA state is valid.

Test: dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics

Fixes: ff64092ff3 ("venus: support VK_EXT_sample_locations")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33696>
2025-02-22 22:29:43 -08:00
Eric Engestrom
dd7bac4e31 vtn_bindgen2: keep the printf blob local to avoid LTO issues
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33442>
2025-02-23 01:25:23 +00:00
Yiwei Zhang
33bb47388f venus: fix 2 entry points from maint6
This is surprisingly not caught by maint6 tests or the entire
binding_model group.

Fixes: 0fa2758103a ("venus: support VK_KHR_maintenance6")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33695>
2025-02-22 16:48:17 -08:00
Eric Engestrom
8364782222 docs: update gitlab docs urls
GitLab finally dropped the split between "docs for paid users" and
"docs for free users", and in the process re-shuffled some things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33694>
2025-02-23 00:31:59 +01:00
Yiwei Zhang
a9da750388 venus: advertise 1.4 support
This change:
- adds the core 1.4 support
- handles partially promoted dynamicRenderingLocalRead feature
- properly scrubs host copy related features and properties if needed

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
e651dc0b2b venus: deprecate a few useless micros
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
b282e49d67 venus: update second queue emulation for 1.4 requirement
Venus picks the option to always advertise an additional queue that
supports transfer.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
d26643c6c2 venus: support VK_KHR_maintenance6
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
e46bb404bd venus: a few tiny naming fixes
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
015dd37931 venus: support VK_KHR_dynamic_rendering_local_read
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Mike Blumenkrantz
ecb107deef egl/x11: delete some dri2 remnants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33669>
2025-02-22 20:38:24 +00:00
Eric Engestrom
a66e227748 ci/build: lower the delay to start build-only jobs
What we need is a way to tell GitLab "queue `build-only` jobs after
`build-for-tests` jobs have started", to make sure that `build-only`
jobs don't start before `build-for-tests` jobs and thus delays test jobs
and the overall pipeline.

The best I had found was "queue `build-only` jobs after *all* the
`build-for-tests` jobs have finished", but this introduces a larger
delay than we want, and causes `build-only` jobs to often be the last
ones to finish in a pipeline, after test jobs that respect the 15min
runtime limit.

Instead, we can tell GitLab "queue `build-only` jobs after the
`build-for-tests` jobs have been queued for X minutes", which is closer
to what we want, and in particular this ensures the correct order of
*starting* jobs as long as the CI is not overwhelmed and doesn't manage
to actually start a queued `build-for-tests` job within 5min, in which
case I'd argue we don't care about job order anymore because we have
bigger problems anyway and likely everything's going to timeout.

This also gets rid of the hard-to-maintain `.build-for-tests-jobs` list
of `needs:`, which also needed to be manually merged in half the jobs.

The trade-off is that we need to make a (shallow) copy of the
`.container+build-rules` list, that replaces all the `when: on_success`
with `when: delayed` + `start_in: 5 minutes`. This means that we'll need
to make sure the two lists of conditions remain identical, but this
seems more manageable; nevertheless, I added a comment to remind us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
38cf205f67 ci/build: add explicit build-for-tests or build-only to all jobs
This prevents mistakes when moving one job and not realising another job
was extending from it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
c20984a5ad ci/build: split meson-build into build-for-tests and build-only
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
d0d28eaa0c ci/build: move .use-debian/x86_64_build out of the generic .meson-build and into the debian/x86_64 jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
b29ba5637e ci/build: remove a couple of unnecessary "override needs: to the same value"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
2c79c1be4a ci: move shader-db test job from build jobs yaml to test jobs yaml
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Jose Maria Casanova Crespo
b474fbe129 v3dv/ci: add new flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33689>
2025-02-22 12:48:47 +00:00
Eric Engestrom
64e68b1ac0 ci/alpine: control wayland & wayland-protocols versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33659>
2025-02-22 09:58:49 +00:00
Eric Engestrom
3695a6d3fe ci/alpine: pin the release to avoid random unexpected changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33659>
2025-02-22 09:58:49 +00:00
Lionel Landwerlin
84f96a0199 anv: switch to use brw's prog_data source_hash
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
2025-02-22 08:30:22 +00:00
Lionel Landwerlin
da098b76a4 brw: store source_hash in prog_data
This is a debug feature that we kind of manage in the driver atm. It's
better that we move this completely to the compiler and can load it
from the cache.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
2025-02-22 08:30:22 +00:00
Lionel Landwerlin
2f156ddb50 brw: factor out base prog_data setting
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
2025-02-22 08:30:22 +00:00
Timur Kristóf
754752865a nvk: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
2540e45e1a nak: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
d74d316f60 glsl: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
2ebb3c3e37 hk: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
91d9dfe123 vulkan/runtime: Don't use deprecated NIR_PASS_V macro.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:23 +01:00
Timur Kristóf
093e68b518 compiler/clc: Stop using deprecated NIR_PASS_V macro.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:23 +01:00
Timur Kristóf
ce8317194c radv: Don't use deprecated NIR_PASS_V macro for AMD common NIR passes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
b8797180e9 ac/nir/ngg: Add bool return value to ac_nir_lower_ngg_mesh.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
cd01e17e81 ac/nir/ngg: Add bool return value to ac_nir_lower_ngg_gs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
25adf353cc ac/nir/ngg: Add bool return value to ac_nir_lower_ngg_nogs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
fad58a99e8 ac/nir: Add bool return value to ac_nir_lower_legacy_gs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
d8ad068968 ac/nir: Add bool return value to ac_nir_lower_legacy_vs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
407aedeff8 ac/nir: Add bool return value to ac_nir_lower_mesh_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
9e7609b0ff ac/nir: Add bool return value to ac_nir_lower_task_outputs_to_mem.
And fixup its NIR counterparts too.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
65645f6841 ac/nir: Add bool return value to ac_nir_lower_gs_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
c593110f5f ac/nir: Add bool return value to ac_nir_lower_es_outputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
6e9ede61c4 ac/nir: Add bool return value to ac_nir_lower_tes_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
6e78aef0e9 ac/nir: Add bool return value to ac_nir_lower_hs_outputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
bb3f33014d ac/nir: Add bool return value to ac_nir_lower_hs_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
0438cc0afb ac/nir: Add bool return value to ac_nir_lower_ls_outputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
65902ded29 radv: Add bool return value to ray tracing NIR lowerings.
And don't use them with the deprecated NIR_PASS_V macro anymore.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
bf1a968a11 radv: Add bool return value to radv_nir_apply_pipeline_layout.
And stop using it with the deprecated NIR_PASS_V macro.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
e3e2ba4eb5 radv: Add bool return value to radv_nir_lower_abi.
And stop using it with the deprecated NIR_PASS_V macro.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
7147559156 radv: Stop using deprecated NIR_PASS_V with core NIR passes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
65139305e2 nir: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
7222bb397d nir: Add bool return value to nir_fixup_deref_types.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
2fa7711a2b nir: Add bool return value to nir_fixup_deref_modes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
4f744998ef nir: Add comment to indicate that NIR_PASS_V is deprecated.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Alyssa Rosenzweig
e34443205f asahi: support sparse in virtgpu
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
175b3bd4b1 agx: handle sparse buffer images
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
3f1082877a hk: ban sparse RGB32
dumb corner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
583978a8ee agx: handle rgb32 residency queries
so silly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
839b01bd2d hk: fake min/max filtering for proton
this gets us to fl12_0.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
383a3065b8 asahi: fix null deref in error path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
580aff179c libagx: use 64-bit multiply for image atomic calculation
lets use the hw address mode. oops!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
5a122768b7 hk: do not clamp txf for copy shaders
save a few instrs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
0a43be6d4f agx: fix botched address fuses
identified in
dEQP-VK.robustness.robustness2.push.notemplate.rgba32f.unroll.nonvolatile.sampled_image.no_fmt_qual.img.samples_1.2d.comp.
owwie.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
b589285468 agx: assert shift bounds
would've saved me a lot of dbg trouble..

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
de424846f0 asahi: drop trivial depends
meson can infer since these are inputs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
5d1f69e250 asahi,libagx,hk: don't set custom_target names
Per meson docs:

   This posarg is optional since 0.60.0. It defaults to the basename of the first output.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
7f5271e42d hk: perf debug sparse binding
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
e84c5b3a07 libagx: vectorize tess level loads
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
5046dd48b6 libagx: fix ia_primitives with tessellation
fixes new CTS

dEQP-VK.query_pool.statistics_query*input_assembly_primitives.*_patch_list_*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
2eb5040ca8 hk: pass cmdbuf to perf_debug
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
debdb26167 hk: accelerate buffer copies with CL
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
be18473d33 hk: assert more
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
dc111c128c hk: pass cmdbuf, not control stream, into precomp dispatch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
29d80221db hk: ensure space with the dispatch
cleaner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
ed7d11e389 agx: fix uniform atomic opts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
6c3d7a2821 asahi: drop cargo culted disk cache disable
we don't have a disk cache to disable with clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
678134add5 hk: implement sparse
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3e7297a297 hk: ban sparse host-image-copy
WTF?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
739807944d agx: implement sparse residency queries
hw matches NIR well - just an extra destination on the texture instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
93bccc0914 asahi: support unbinding VA in agx_va_free
useful for more sparse-y things.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c02235124f asahi: assert page alignment in vm_bind
kernel should check but it's easier to debug on the userspace side.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
d0a7bff906 ail: unit test ail_get_twiddled_block_B
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
b842a7732d ail: add ail_get_twiddled_block_B helper
this is useful for sparse updates.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
78ca483940 ail: add ail_bytes_to_pages helper
this happens a bunch with sparse

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
56cd20ddea ail: expose ail_get_max_tile_size
useful for sparse block size calculation

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
8e20875651 ail: extract a blocksize helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
aebecb2886 ail: move helpers to layout.h for sharing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
7d27fd84d5 ail: report miptail stride
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
2cac211946 ail: report mip_tail_first_lod for sparse
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
09cd1bf000 ail: unit test sparse_table_size_B
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
bc448fe88b ail: model sparse page tables
see the docs previously added for the aux image layout described here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
ca60908bf1 asahi: add sparse block XML
this xml (and the sparse page table structure itself) was r/e'd blackbox since
that was easier than writing tests, lol. but it seems to work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c7f7496da1 asahi: identify image mode enum
this controls sparse.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
2cc88430f1 asahi: rename Null layout
this isn't a Null layout only, it's also used with sparse. update the name to
reduce confusion. Unsure if we have a use case yet but maybe as an optimization
later?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
102bd7127b docs/asahi: describe sparse page tables
some things are better in prose than code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
5acf398b5a docs/asahi: add some section headers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
dfebd94259 docs/asahi: update varying info
These docs are pretty old and we've learned a lot since then.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
7b717805bf hk: enable bufferDeviceAddressCaptureReplay
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
f50edbd696 hk: fix buffer binding
clamp sizes to avoid kernel complaints, and check the return.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
1114fbcdb7 hk: unbind VAs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
1e043ed67d hk: unstub UnmapMemory2KHR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
dc3669a837 hk: reject non-2D modifiers
via nvk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
db7cb681bf asahi: add more alignment asserts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
bffb90f42c libagx: use assert instead of 0xdeadbeef writes
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
479d2ab53e libagx: fix wraparound issue with robust draw kernel
fixes dEQP-VK.robustness.index_access.draw_multi_indexed_2 with hard faults.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
bec073d3ca libagx: fix subgroup id confusion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
4949ae3920 asahi: switch tib lower to intrinsic pass
fixes metadata issue.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
e203d04f43 asahi: use NIR_PASS to validate more
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
290b8da8b6 asahi: perf debug indirect tess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3060b471b5 libagx: add missing null pointer check
fixes KHR-GL46.pipeline_statistics_query_tests_ARB.functional_tess_queries
with hard fault

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c7a8200dcd hk: don't allocate zero sink
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
f0d680437f hk: use zero sink for null index buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
eff6b884cb asahi: use zero sink for vbuf
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c14df405b9 libagx: use zero page
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
04eb91c68b asahi: bind zero-page
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3adbf53ed6 hk: do not incorrectly offset host-image-copy sources
the source is indexed from layer 0, the dest image is indexed from whatever the
base layer is. fixes new CTS dEQP-VK.image.host_image_copy.array.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
4559cdb94b hk: fix increment CS invs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Janne Grunau
27d27e08ea hk: Use rowPitch from VkImageDrmFormatModifierExplicitCreateInfoEXT
Imported linear images may have an arbitrary row pitch. As long as it is
aligned to 16 agx can support. Initialize `.linear_stride_B` from the
supplied parameter and let ail verify it.

Fixes gtk dmabuf based tests with a pitch aligned to 256.

Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
5d9e600ce9 hk: implement calibrated timestamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Janne Grunau
9c704dd759 hk: Replace alloca with malloc in queue_submit
`command_count` is under control of the vulkan application and can
become quite large. At a command count around 30000 the size of the
alloca() allocated buffers exceeds the default stack size of 16MB.

Fixes fixes segfaults in 'gtk:compare vulkan lots-of-offscreens-nogl*'
gtk 4 test cases which end up with a `command_count` around 32768.

Fixes: https://gitlab.freedesktop.org/asahi/mesa/-/issues/47
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3e9f70570a asahi: fix cull distance with GS
no, I don't know how this worked before.

fixes KHR-GL46.cull_distance.functional with nir_opt_varyings changes but
this seemed to be passing just by luck otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
cc04a65828 asahi: fix libwrap.dylib
libwrap.dylib is helpful to trace control streams on macOS. When it was
originally implemented, we..

* supported macOS in our OpenGL driver and needed to actually exercise these
  interfaces
* didn't have Linux support or hypervisor support or anything so needed the
  traces to be utterly thorough
* only had a single macOS version to worry about

The landscape today is very different

* no macOS support in our driver stack
* we can trace registers via the hypervisor - libwrap.dylib is no longer
  "correctness" bearing, it's just a convenience tool
* what counts is the hardware side - tracing all the macOS software structs is
  not actually useful, the hypervisor is the right place to grab control regs
* piles of macOS versions, this code only ever worked properly on 11.x and 12.x,
  but with m4 r/e coming up soon we need a lot more versions working.

So... we keep around libwrap.dylib, but slim it down to only decode the bare
minimum of macOS versioned structures, just enough to grab the control stream
pointer and dump that. This is a loss of functionality around CRs (but we have the
hypervisor as a much better way to grab CRs). In exchange it makes the code much
more manageable and less likely to break every 6 months.

So in exchange for all this deletion we also get things working again, this time
on 13.x. But porting back to 12.x or 11.x would be a very small diffstat given
the reduced focus of the new code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
07a2abd14d asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Paulo Zanoni
1d23cf192b brw: don't mark instructions read from text assembly as compacted
I dumped assembly generated by our driver with INTEL_DEBUG=shaders,
copied and pasted it into a lua file, tried to run it with
src/intel/executor, but the disassembler started telling me some
instructions were invalid.

This happened because we print the "compacted" flag in our assembly
text, so when brw_gram.y parses our assembly flag, it sees the
"compacted" flag and sets it to the instruction by calling
add_instruction_option(). But the executor tool never sets the
BRW_ASSEMBLE_COMPACT flag when it calls brw_assemble(), so when
brw_assemble() calls dump_assembly(), which calls brw_disassbemble(),
the disassembler gets confused and prints misinterpreted instructions
and calls them invalid.

It is not the job of brw_gram.y (our text assembly parser) to mark
instructions as compacted.  Whatever is later assembling the
instruction is the entity that should decide if the instructions are
compacted or not. So in this patch we just ignore this flag.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33614>
2025-02-22 00:38:53 +00:00
Dave Airlie
c49423ca2c vulkan/wsi/x11: don't use update_region for damage if not created
If we don't have a region in the X no MIT-SHM case don't go using
the damage call set region.

Fixes: bbdf7e45b1 ("wsi/x11: Hook up KHR_incremental_present")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33592>
2025-02-21 21:41:58 +00:00
Valentine Burley
b331713f20 ci: Use new kernel that supports more Mediatek devices
The only change since the previous kernel is that the new one includes
the device tree blobs for the mt8195-cherry-tomato-r2 and
mt8186-corsola-steelix-sku131072 devices.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:57 +00:00
Valentine Burley
c45d7dffca intel/ci: Update GuC firmware for ADL-S and ADL-N
Certain ADL devices, like nissa, use the tgl_guc_70.bin firmware.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:56 +00:00
Valentine Burley
eb5bd3bee2 ci: Don't download the kernel image in lava_build.sh
The kernel+rootfs jobs previously downloaded the prebuilt kernel iamge,
but this was unnecessary as LAVA doesn't use them here, and the images
were never uploaded to S3. LAVA acquires the kernel in lava_submit.sh,
and baremetal downloads the required images and dtbs in baremetal_build.sh.

The kernel modules are still required for some devices.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:56 +00:00
Valentine Burley
5b65bbf72c ci: Simplify downloading kernel for crosvm
Directly download the kernel instead of using the
download-prebuilt-kernel.sh script.
Save the kernel to /kernel for clarity, replacing the previous
/lava-files directory.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:56 +00:00
Mike Blumenkrantz
d979cd8d9d zink: support cl_gl_sharing if dmabuf is supported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Mike Blumenkrantz
93cd4ae0c0 zink: verify that adding a dmabuf bind actually chooses a modifier
this at least provides some checking to catch cases where something
stupid happens and it does a fallback to linear

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Mike Blumenkrantz
5176370694 zink: handle buffer import/export
just noping out of some image codepaths

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Mike Blumenkrantz
f7002369fa zink: wait on tc fence before checking for fd semaphore
this forces sync with pending flushes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Daniel Schürmann
df2697c9ab aco/scheduler: remove unused include of unordered_set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
93872270f0 aco/scheduler: keep track of RegisterDemand at DownwardsCursor::insert_idx{_clause}
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
f58654e98f aco/scheduler: keep track of RegisterDemand at UpwardsCursor::insert_idx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
52253da783 aco: unify get_addr_sgpr_from_waves() and get_addr_vgpr_from_waves() into one function
which returns the limit as RegisterDemand.

Also remove the unused get_extra_sgprs() from aco_ir.h.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
6ea9443726 aco/scheduler: stop rounding down the target number of waves on GFX10+
This way, it can make use of uneven wave numbers.

Totals from 4078 (5.14% of 79395) affected shaders: (Navi21)
MaxWaves: 58715 -> 65460 (+11.49%); split: +11.49%, -0.01%
Instrs: 5033684 -> 5048244 (+0.29%); split: -0.09%, +0.38%
CodeSize: 26833884 -> 26898780 (+0.24%); split: -0.07%, +0.32%
VGPRs: 302360 -> 265312 (-12.25%); split: -12.26%, +0.01%
Latency: 34636448 -> 36044242 (+4.06%); split: -0.08%, +4.14%
InvThroughput: 7999403 -> 7662697 (-4.21%); split: -4.55%, +0.34%
VClause: 105403 -> 111996 (+6.26%); split: -0.40%, +6.66%
SClause: 132996 -> 133460 (+0.35%); split: -0.81%, +1.16%
Copies: 297036 -> 308122 (+3.73%); split: -0.64%, +4.37%
Branches: 89376 -> 89390 (+0.02%); split: -0.00%, +0.02%
VALU: 3477621 -> 3488510 (+0.31%); split: -0.05%, +0.36%
SALU: 484211 -> 484191 (-0.00%); split: -0.08%, +0.08%

Totals from 1840 (2.32% of 79395) affected shaders: (Navi31)

MaxWaves: 30714 -> 34182 (+11.29%)
Instrs: 3102955 -> 3131001 (+0.90%); split: -0.05%, +0.95%
CodeSize: 16160564 -> 16273100 (+0.70%); split: -0.04%, +0.74%
VGPRs: 174540 -> 150600 (-13.72%)
Latency: 23521914 -> 24515055 (+4.22%); split: -0.07%, +4.29%
InvThroughput: 4373397 -> 4202912 (-3.90%); split: -4.40%, +0.50%
VClause: 59087 -> 64091 (+8.47%); split: -0.24%, +8.71%
SClause: 74844 -> 75366 (+0.70%); split: -0.53%, +1.22%
Copies: 184396 -> 197747 (+7.24%); split: -0.25%, +7.49%
Branches: 46015 -> 46028 (+0.03%); split: -0.00%, +0.03%
VALU: 1929286 -> 1942709 (+0.70%); split: -0.02%, +0.71%
SALU: 216126 -> 215983 (-0.07%); split: -0.18%, +0.12%
VOPD: 1216 -> 1217 (+0.08%); split: +1.40%, -1.32%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
676b39d31f aco/scheduler: always respect min_waves on GFX10+
It could theoretically happen that for large workgroups,
the scheduler used more registers than allowed.

No fossil changes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:40 +00:00
Collabora's Gfx CI Team
9befbf54a6 Uprev Piglit to 04d901e49de6b650f9dceaf73220371273d87f73
fc8179d319...04d901e49d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33457>
2025-02-21 11:53:36 +00:00
Danylo Piliaiev
763ddd0fd3 nir/nir_lower_multiview: Don't assert if load_deref doesn't have var
If deref chain has nir_deref_type_cast nir_intrinsic_get_var will
return null, which is valid for e.g. shader inputs, since the pass
only care about outputs.

NIR excerpt that caused issues:

```
    32x3    %6 = deref_cast (block *)%5 (ubo block)  (ptr_stride=0, align_mul=0, align_offset=0)
    32x3    %7 = deref_struct &%6->field0 (ubo vec4[4])  // &((block *)%5)->field0
    32      %8 = load_const (0x00000001)
    32x3    %9 = deref_array &(*%7)[1] (ubo vec4)  // &((block *)%5)->field0[1]
    32x4   %10 = @load_deref (%9) (access=none)
```

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33647>
2025-02-21 11:09:22 +00:00
Daniel Stone
4f11b8d950 ci/zink: Expand flake definition on radv
We've seen a few variants of this now, so just mark them all as flaky.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33546>
2025-02-21 09:22:03 +00:00
Erik Faye-Lund
fde6aeb886 mesa/main: wire up glapi bits for EXT_multi_draw_indirect
Turns out we were missing the glapi bits, making it impossible to use get
the function pointers for this extension. Whoops?!

[daniels: Squashed in a618 SkQP fails, presumably caused by these not
          being skipped anymore.]

Fixes: 9f5af68995 ("mesa/main: expose `EXT_multi_draw_indirect`")
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33546>
2025-02-21 09:22:03 +00:00
Emma Anholt
2f57cf0323 egl: Retire NV_post_sub_buffer support.
It's never been ported to DRI3, but nobody seems to care.  Since DRI2 is
untested at this point, just drop the code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Emma Anholt
f6aa27a294 egl: Retire NOK_swap_region support.
It's never been ported to DRI3, but nobody seems to care.  Since DRI2 is
untested at this point, just drop the code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Emma Anholt
58e73e792f egl: Apply autopep8.
My editor does this on save, so let's just apply it to EGL's python for
consistency.  The only exception is that the genCommon import needs the
sys.path.insert, so that part of autopep8 was reverted.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Emma Anholt
34fe896715 docs: Drop some weird unhelpful text about DRI2.
Both instructions for building were the same, and there's not much sense
in calling out just xcb-dri2 out of all the deps there are.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Lorenzo Rossi
a3ddb223e2 nvk, nak: Implement shaderSharedInt64Atomics
Current nvidia devices miss support for 64-bit arithmetic atomics, we
replace them with compare-and-swap loops using nir_lower_atomics.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10330
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33572>
2025-02-21 00:33:17 +00:00
Lorenzo Rossi
26079c1a93 nir: support shared atomics in nir_lower_atomics
Add support to rewrite shared atomics into compare-and-swap loops,
previously the nir_lower_atomics pass only supported global and ssbo
atomics.

Only freedreno irc3 reuses nir_lower_atomics, this change does not
impact their usage since they do not support shared atomics.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33572>
2025-02-21 00:33:16 +00:00
Ian Romanick
15544ed858 nir/algebraic: Undistribute b2i from logic-ops
shader-db:
All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16973309 -> 16973173 (<.01%)
instructions in affected programs: 13780 -> 13644 (-0.99%)
helped: 31 / HURT: 0

total cycles in shared programs: 915620550 -> 915618604 (<.01%)
cycles in affected programs: 185962 -> 184016 (-1.05%)
helped: 30 / HURT: 1

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209748003 -> 209745278 (-0.00%)
Cycle count: 30514920400 -> 30514716506 (-0.00%); split: -0.00%, +0.00%
Max live registers: 65477183 -> 65477584 (+0.00%)
Non SSA regs after NIR: 237334710 -> 237333632 (-0.00%)

Totals from 1257 (0.18% of 706651) affected shaders:
Instrs: 693039 -> 690314 (-0.39%)
Cycle count: 39792504 -> 39588610 (-0.51%); split: -0.97%, +0.46%
Max live registers: 194170 -> 194571 (+0.21%)
Non SSA regs after NIR: 821978 -> 820900 (-0.13%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Ian Romanick
a48a044cf6 nir/algebraic: Simplify equality comparisons of b2T with 1 or 0
Adding the b2i(a) == 1 and b2i(a) != 1 patterns also helps prevent
regressions when spurious negations are removed from integer equality
comparisons, as is done in !33498.

v2: Make all variables part of the iteration instead of calculating some
of them. Suggested by Alyssa.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16973331 -> 16973309 (<.01%)
instructions in affected programs: 266 -> 244 (-8.27%)
helped: 2 / HURT: 0

total cycles in shared programs: 915620774 -> 915620550 (<.01%)
cycles in affected programs: 4360 -> 4136 (-5.14%)
helped: 2 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209748011 -> 209748003 (-0.00%)
Cycle count: 30514920286 -> 30514920400 (+0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 237334726 -> 237334710 (-0.00%)

Totals from 8 (0.00% of 706651) affected shaders:
Instrs: 16956 -> 16948 (-0.05%)
Cycle count: 261052 -> 261166 (+0.04%); split: -0.92%, +0.96%
Non SSA regs after NIR: 20000 -> 19984 (-0.08%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Ian Romanick
3f39d8f4ff nir/algebraic: Optimize zero comparisons of umax or umin
I observered some of the existing patterns stopped being applied after
some of the ult-to-ieq optimizations in !33498. It turns out that these
patterns occur even without those changes.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16973339 -> 16973331 (<.01%)
instructions in affected programs: 7977 -> 7969 (-0.10%)
helped: 2 / HURT: 0

total cycles in shared programs: 915620938 -> 915620774 (<.01%)
cycles in affected programs: 136022 -> 135858 (-0.12%)
helped: 2 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 209748173 -> 209748011 (-0.00%); split: -0.00%, +0.00%
Cycle count: 30514361348 -> 30514920286 (+0.00%); split: -0.00%, +0.00%
Spill count: 511813 -> 511808 (-0.00%)
Fill count: 622537 -> 622533 (-0.00%)
Max live registers: 65477033 -> 65477183 (+0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 237334728 -> 237334726 (-0.00%); split: -0.00%, +0.00%

Totals from 26 (0.00% of 706651) affected shaders:
Instrs: 332073 -> 331911 (-0.05%); split: -0.05%, +0.00%
Cycle count: 959758560 -> 960317498 (+0.06%); split: -0.03%, +0.09%
Spill count: 10293 -> 10288 (-0.05%)
Fill count: 23784 -> 23780 (-0.02%)
Max live registers: 9682 -> 9832 (+1.55%); split: -0.08%, +1.63%
Non SSA regs after NIR: 232135 -> 232133 (-0.00%); split: -0.03%, +0.03%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 233538532 -> 233536113 (-0.00%); split: -0.00%, +0.00%
Cycle count: 24428142259 -> 24426705655 (-0.01%); split: -0.01%, +0.00%
Spill count: 513128 -> 512923 (-0.04%)
Fill count: 557329 -> 557108 (-0.04%)
Max live registers: 42129806 -> 42129881 (+0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 256711720 -> 256711718 (-0.00%); split: -0.00%, +0.00%

Totals from 26 (0.00% of 805759) affected shaders:
Instrs: 325629 -> 323210 (-0.74%); split: -0.74%, +0.00%
Cycle count: 893896782 -> 892460178 (-0.16%); split: -0.21%, +0.05%
Spill count: 10467 -> 10262 (-1.96%)
Fill count: 24291 -> 24070 (-0.91%)
Max live registers: 4946 -> 5021 (+1.52%); split: -0.08%, +1.60%
Non SSA regs after NIR: 232980 -> 232978 (-0.00%); split: -0.03%, +0.03%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 237289818 -> 237289714 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22959586058 -> 22960049302 (+0.00%); split: -0.00%, +0.00%
Max live registers: 42182257 -> 42182337 (+0.00%)
Non SSA regs after NIR: 255579974 -> 255579970 (-0.00%); split: -0.00%, +0.00%

Totals from 23 (0.00% of 802019) affected shaders:
Instrs: 27051 -> 26947 (-0.38%); split: -0.39%, +0.01%
Cycle count: 10545917 -> 11009161 (+4.39%); split: -0.09%, +4.49%
Max live registers: 2198 -> 2278 (+3.64%)
Non SSA regs after NIR: 31741 -> 31737 (-0.01%); split: -0.20%, +0.19%

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Ian Romanick
4311121e73 nir/algebraic: More (a == 0 || a == 1 || ...) patterns
At least some Total War: Warhammer3 vertex shaders associate the
comparisons differntly, so the existing patterns were not triggered.

No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209748654 -> 209748173 (-0.00%)
Cycle count: 30514333964 -> 30514361348 (+0.00%); split: -0.00%, +0.00%
Fill count: 622688 -> 622537 (-0.02%)
Max live registers: 65477039 -> 65477033 (-0.00%)
Non SSA regs after NIR: 237334768 -> 237334728 (-0.00%)

Totals from 512 (0.07% of 706651) affected shaders:
Instrs: 1000693 -> 1000212 (-0.05%)
Cycle count: 42174312 -> 42201696 (+0.06%); split: -0.15%, +0.21%
Fill count: 11456 -> 11305 (-1.32%)
Max live registers: 121599 -> 121593 (-0.00%)
Non SSA regs after NIR: 1253445 -> 1253405 (-0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Eric R. Smith
414dba9f5c panfrost: use an accessor function to read from bi_opcode_props
Use an accessor function to read opcode properties or to change the
opcode. This would allow for different instruction descriptions to
be used for different architectures. Not necessary now, but may
be useful groundwork.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29765>
2025-02-20 23:33:00 +00:00
Faith Ekstrand
651864151f zink: Use persistent semaphores for PIPE_FD_TYPE_SYNCOBJ
These are persistant objects that you can use to signal and wait over.
We need to import without VK_SEMAPHORE_IMPORT_TEMPORARY_BIT and we can't
throw away the Vulkan semaphore after each submit.

Fixes: 32597e116d ("zink: implement GL semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33549>
2025-02-20 23:09:00 +00:00
Faith Ekstrand
1ffa782227 zink: Use the correct array size for signal_values[]
When the size of the signals[] array was changed to 3, the
signal_values[] array was not updated accordingly.  If we have a
signal_semaphore and are presenting at the same time, this can lead to
an array overflow and the driver will read some random stack value as
the signal value.  This is causing chromium to lock up when running
WebGL.

Fixes: 7f56fd9655 ("zink: it's kopperin' time")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33549>
2025-02-20 23:09:00 +00:00
Casey Bowman
111faf2158 vulkan/screenshot-layer: Correct queueFamilyIndex source
From the Vulkan documentation, the queueFamilyIndex value will be
created with VkDeviceQueueCreateInfo. So let's avoid counting the
index value and just refer to the already-created value.

This will resolve crashes on some GPUs for various workloads.

v2: Needed to use GetDeviceQueue() in order to map the queueFamilyIndex
values. These values can be different when obtaining the queue used
for presentation, so we need to ensure we update the mapped
queueFamilyIndex value for the associated queue_data struct.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33487>
2025-02-20 22:36:44 +00:00
Georg Lehmann
67d03033e4 radv: remove separate discard peephole select
This allows removing control flow with a mix of alu and discard.

Foz-DB Navi21 (ignore throughput/latency because of single iteration loops):
Totals from 1251 (1.58% of 79377) affected shaders:
Instrs: 1459317 -> 1457751 (-0.11%); split: -0.14%, +0.04%
CodeSize: 8350856 -> 8352408 (+0.02%); split: -0.03%, +0.05%
VGPRs: 53056 -> 53328 (+0.51%)
SpillSGPRs: 66 -> 62 (-6.06%)
Latency: 19784315 -> 15649290 (-20.90%); split: -21.26%, +0.36%
InvThroughput: 4080229 -> 3122717 (-23.47%); split: -23.56%, +0.09%
VClause: 29293 -> 29294 (+0.00%); split: -0.01%, +0.01%
SClause: 56060 -> 55941 (-0.21%); split: -0.23%, +0.02%
Copies: 129794 -> 127880 (-1.47%); split: -1.51%, +0.04%
Branches: 52039 -> 51275 (-1.47%); split: -1.47%, +0.01%
PreSGPRs: 50221 -> 50024 (-0.39%); split: -0.64%, +0.25%
PreVGPRs: 44058 -> 44053 (-0.01%); split: -0.02%, +0.00%
VALU: 984915 -> 984993 (+0.01%); split: -0.01%, +0.02%
SALU: 177126 -> 177184 (+0.03%); split: -0.62%, +0.65%
SMEM: 79565 -> 79525 (-0.05%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:18 +00:00
Georg Lehmann
f26069fdd9 nir: replace nir_opt_conditional_discard with nir_opt_peephole_select
Foz-DB Navi21:
Totals from 118 (0.15% of 79377) affected shaders:
Instrs: 208001 -> 207355 (-0.31%); split: -0.33%, +0.01%
CodeSize: 1080428 -> 1078432 (-0.18%); split: -0.20%, +0.02%
SpillSGPRs: 202 -> 211 (+4.46%)
Latency: 1923508 -> 1919093 (-0.23%); split: -0.62%, +0.39%
InvThroughput: 407475 -> 407081 (-0.10%); split: -0.12%, +0.02%
SClause: 7050 -> 7033 (-0.24%); split: -0.31%, +0.07%
Copies: 12156 -> 11821 (-2.76%); split: -3.04%, +0.28%
PreSGPRs: 8198 -> 8331 (+1.62%); split: -0.02%, +1.65%
PreVGPRs: 7628 -> 7528 (-1.31%)
VALU: 155747 -> 155657 (-0.06%); split: -0.06%, +0.00%
SALU: 18295 -> 17782 (-2.80%); split: -2.98%, +0.18%
SMEM: 10521 -> 10519 (-0.02%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:17 +00:00
Georg Lehmann
8251a5b846 nir/peephole_select: don't completely ignore ifs with dont_flatten
Apps are misusing this for cases where the if-else are empty (except for phis)
or for conditional discard which will become relevant in the next commit.

Foz-DB Navi21:
Totals from 173 (0.22% of 79188) affected shaders:
Instrs: 1465214 -> 1464987 (-0.02%); split: -0.04%, +0.03%
CodeSize: 7960472 -> 7965188 (+0.06%); split: -0.01%, +0.07%
Latency: 10001176 -> 10012782 (+0.12%); split: -0.01%, +0.12%
InvThroughput: 2336017 -> 2338979 (+0.13%); split: -0.00%, +0.13%
Copies: 140105 -> 138225 (-1.34%)
Branches: 49746 -> 49732 (-0.03%)
VALU: 975632 -> 976322 (+0.07%); split: -0.01%, +0.08%
SALU: 201369 -> 200688 (-0.34%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:16 +00:00
Georg Lehmann
cfee9e1d9f nir/peephole_select: add option to allow discard without ~0 limit
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:16 +00:00
Georg Lehmann
ca8147edbe nir/peephole_select: add options struct
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:16 +00:00
Georg Lehmann
edd82bd03a nir/peephole_select: don't include nir_search_helpers.h
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Georg Lehmann
c31fadd25e nir/peephole_select: don't special case nir_opt_collapse_if + limit = ~0
Not sure if this was intentionally left when block_check_for_allowed_instrs's
param was changed from bool to int, but it certainly was broken without the
previous commit for discards. Now those should work, so the (unintentional?)
special case can be removed.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Georg Lehmann
40f96460ee nir/peephole_select: handle demote and terminate in nir_opt_collapse_if
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Georg Lehmann
58d6243f62 nir/peephole_select: support demote for non CF HW
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Karol Herbst
e0b62d7e2e rusticl/mem: set num_samples and num_mip_levels to 0 when importing from GL
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33653>
2025-02-20 21:37:56 +00:00
Mike Blumenkrantz
d1d2afa3ac zink: apply layer/depth to clear handling
this can avoid flushing/discarding some unnecessary clears

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33355>
2025-02-20 20:01:19 +00:00
Faith Ekstrand
2b1a97b742 nak: Use MemScope::GPU instead of MemScop::System
MemScope::System has to synchronize with everything in the system,
including across PCIe so it's horribly slow.  MemScope::GPU, on the
other hand, only has to synchronize within the GPU.  This is way faster
and still satisfies all of Vulkan's requirements because Vulkan never
allows CPU<->GPU access without full semaphores and barriers.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33649>
2025-02-20 19:32:24 +00:00
Faith Ekstrand
13f7ea7b3d nak: Only use suld.constant on Ampere+
Turing doesn't support it so we'll use suld.weak instead.  While we're
here, get rid of an accidental copy+paste condition.

Fixes: ffdc0d8e98 ("nak: Use suld.constant when ACCESS_CAN_REORDER is set")
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33649>
2025-02-20 19:32:24 +00:00
Roland Scheidegger
61911b6a4b llvmpipe: Fix alpha-to-coverage without dithering
Implementing alpha-to-coverage dithering broke the non-dithering case.
(Discovered by accident, not really a big deal since it's almost always
enabled and can only be disabled by using a Nvidia GL extension, and
can't be disabled with Vulkan.)

Fixes: ad4635d6ef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33586>
2025-02-20 18:59:21 +00:00
Adam Jackson
244c9cc45e mapi/glx: Remove FASTCALL/PURE
This isn't worth the complexity.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
32a10ccbdd glx: Remove (almost) all usage of _X_HIDDEN / _X_INTERNAL
It's redundant at this point. The one exception is for GLX_PUBLIC when
building for glvnd, because then we really do want the GLX API to be
hidden.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
43fb26f8ea mapi/glx: Remove xserver code generation
This hasn't been hooked up to the build since we deleted autotools back
in 2019. It's effectively dead code anyway, as GLX is not a moving
target, and at this point is it easier to modify the generated code
directly than to modify the generator. xserver is encouraged to copy
the generators from 2019 into its own build if it wants, or -
preferably, in this GLX greybeard's opinion - find a prettier codegen
solution in the process of finishing GL 3.0 support.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
09bbf71e68 glx: Make #undef GLX_INDIRECT_RENDERING do something
Not that meson lets you reach this state yet, but if you did, you'd
still build all of the indirect code but the linker would gc most of it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Daniel Schürmann
259b73a3ae nir/print: print phi sources sorted by predecessor blocks
We already print the predecessors sorted. Just do the same with
phi sources.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33574>
2025-02-20 14:22:14 +00:00
Juan A. Suarez Romero
2d91798561 broadcom/simulator: use string copy instead of memcpy
Using memcpy with the max size generates a global-buffer-overflow, as
the performance counter strings are smaller than the max size.

Instead, use a string copy function to get a copy.

This was detected with address sanitizer enabled and running vulkaninfo.

Fixes: 3e8b2fe053 ("broadcom/simulator: Add DRM_IOCTL_V3D_GET_COUNTER to simulator")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33627>
2025-02-20 13:15:01 +00:00
Juan A. Suarez Romero
351bf1e524 vc4/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33627>
2025-02-20 13:15:01 +00:00
Juan A. Suarez Romero
eb8017ca68 v3dv: duplicate key for texel_buffer cache
We can't use the local variable key to insert in the hashtable, as the
key needs to be persistent for future searches.

This makes a copy of the key in the pipeline, which is kept persistent
in the hashtable.

This fixes a stack-buffer-overflow.

Backport-to: 25.0
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33630>
2025-02-20 08:56:55 +00:00
Pierre-Eric Pelloux-Prayer
5980d60cf1 tc: flag closed batches
When tc_add_call_end is called the batch should never receive
new commands until it's executed.
Add a new assert to validate this expectation to help detect
failures.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
2025-02-20 08:25:42 +00:00
Pierre-Eric Pelloux-Prayer
f062c83f3a mesa/st: call _mesa_glthread_finish before _mesa_make_current
_mesa_make_current will use st_flush(ctx) to execute pending
commands before switching to the new context.

Since we can't have multiple threads using a pipe_context at
the same time, we must finish glthread to avoid having the
unmarshalling thread executing at the same time.

It's fixing random crashes where a thread would do:
  st_destroy_context ->
      _mesa_make_current ->
          st_glFlush(save_ctx) ->
            tc_execute_batch
While there's a glthread unmarshalling thread that's still
adding commands to TC.

Fixes: 08d97aadd1 ("st/mesa: fix texture deletion context mix-up issues (v2)")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
2025-02-20 08:25:42 +00:00
Pierre-Eric Pelloux-Prayer
a893a87625 tc: add missing TC_SENTINEL for TC_END_BATCH
Fixes: c2983d93da ("gallium/u_threaded: use TC_END_BATCH to terminate the loop")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
2025-02-20 08:25:41 +00:00
Samuel Pitoiset
5ba10cc57f radv/video: fix adding the query pool BO to the cmdbuf list
Video queries work differently but the BO still need to be added to the
cmdbuf list.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33620>
2025-02-20 07:51:33 +00:00
David Rosca
d8b91b72b9 winsys/amdgpu: Add assert for secure submissions on compute ring
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33601>
2025-02-20 07:28:46 +00:00
David Rosca
57228c12d5 radeonsi: Use gfx for TMZ buffer clears
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33601>
2025-02-20 07:28:46 +00:00
Mohamed Ahmed
dfd5e3da7b nvk: Implement VK_MESA_image_alignment_control
This is needed by VKD3D in order to satisfy D3D12's image alignment
requirements.  Otherwise, it has to pad things out weirdly in order to
re-align images behind the app's back.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12637
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33633>
2025-02-20 05:31:08 +00:00
Mohamed Ahmed
bb310ff457 nil: Add an API to clamp max image alignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33633>
2025-02-20 05:31:08 +00:00
Faith Ekstrand
63e3bce602 ci: Remove some NVK vkd3d fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33633>
2025-02-20 05:31:08 +00:00
Sagar Ghuge
536ef0b546 anv: Exclude non-standard block shapes on Xe2+
Xe2 and Xe3 are using the same TILE64 format. So reject the non-standard
MSAA shapes on Xe3 as well.

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/33565>
2025-02-20 02:18:19 +00:00
Natalie Vock
91075d823d mailmap: Update my name
Egg-crAcked-By: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33631>
2025-02-19 21:57:26 +00:00
Christian Gmeiner
662e901165 etnaviv: nir: Don't use deprecated NIR_PASS_V macro anymore.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
131e30d8b9 etnaviv: nir: Return progress for etna_lower_io(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
0c30468c78 etnaviv: nir: Return progress for etna_lower_alu(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
09fa418b7d nir: Add bool return value to nir_lower_texcoord_replace(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
13e750aabe nir: Add bool return value to nir_lower_clip_halfz(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Eric Engestrom
1686cef3a2 docs/release-calendar: add 25.1 branchpoint & rc dates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
918291b039 docs/releasing: fix "release schedule" subsections nesting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
73376e62cc docs: add release calendar for 25.0.x cycle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
98ac066601 docs: update calendar for 25.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
40999edb96 docs: add sha sum for 25.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
577260dfcc docs: add release notes for 25.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:22 +00:00
Corentin Noël
b6917cd62a ci: Update CrosVM and Virglrenderer
Update to their latest version on time

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33617>
2025-02-19 20:35:02 +00:00
Mary Guillemard
4f989c2cc3 pan/bi: Properly extract primitive facing on v11+
Since v11, the primitive flags preloaded register define more data.
This changes load_front_face lowering to only use the first bit for
primitive facing.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:21 +00:00
Mary Guillemard
20d7c93368 pan/bi: Handle LD_VAR_BUF_IMM encoding changes on v11+
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:20 +00:00
Mary Guillemard
be64a5ae27 pan/bi: Lower hadd on v11+
HADD is not present on v11 and later.
This lower hadd in NIR options and add asserts around hadd NIR opcodes
to ensure those are properly lowered.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:20 +00:00
Mary Guillemard
207b4af0ce pan/bi: Lower FROUND.v2s16 in nir_lower_bit_size on v11+
FROUND.v2s16 is gone since v11.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
d79a31bf81 pan/bi: Lower removed instructions in algebraic on v11+
This lower all instructions that were removed on v11 to
equivalents in algebraic and assert in BIR emission to ensure
they are never rematerialize.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
be011e8675 pan/bi: Stop using V2F16_TO_V2S16 for barycentric_at_offset on v11+
This was removed on v11.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
60b2920575 pan/bi: Stop using S16_TO_F32 in nir_texop_lod computation on v11+
This was removed on v11.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
1481b14fcb pan/bi: Lower SWZ.v4i8 to multiple MKVEC.v2i8 on v11+
IADD.v4u8 was removed on v11, as a result we now need to lower SWZ.v4i8
to multiple MKVEC.v2i8 to reproduce this behaviour.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
b63ef74e73 pan/bi: Stop using V2F32_TO_V2F16 on Valhall
On v11+, V2F32_TO_V2F16 doesn't exist anymore.

This commit ensure we stop using it on every codepath except when a
vectored conversion is prefered. (v9-v10)

Instead, we use FADD.F32 to handle data conversion thanks to the
swizzle defined for the destination.

This also work on older Valhall gens, so let's follow that
logic when we only have one component used.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
947264e18a pan/bi: Add round mode modifier to FADD
This is a modifier that is allowed on FADD, we are going to need it for
F16 convertions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Mary Guillemard
7b81312c23 pan/bi: Disallow dst swizzle optimization in case of conversion
Some instructions like FADD do a conversion when the swizzle is
specified while their immediate counterpart do not.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Mary Guillemard
cabd9a0a33 pan/bi: Do not run bi_fuse_small_int_to_f32 on v11+
Those instructions are gone now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Mary Guillemard
5d393ff20b pan/bi: Document removed instructions on v11
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Iago Toral Quiroga
e504825813 pan/va: fix FAU validation
Validation was checking that if an instruction was accessing FAU RAM,
only one 64-bit slot was accessed, and if it was accessing a FAU special
value, only one was accessed, however it was not checking if both  RAM
and special were used, which is only allowed in messaging instructions
except ATEST and BLEND.

Fixes Piglit:
spec/ati_fragment_shader/ati_fragment_shader-render-ops/mov c0.r

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Lorenzo Rossi
bce9e851c6 nvk: Fix MSAA sparse residency lowering crash
Previously deqp tests with *.multisampled_image_sparse_residency.* would
crash with "Unknown image intrinsic" because
nir_intrinsic_bindless_image_sparse_load was not handled in the lowring
code.

This commits handles MSAA sparse residency lowering as with other cases.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Fixes: 7604697ec6 ("nvk: Implement shaderStorageImageMultisample")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33625>
2025-02-19 19:46:14 +00:00
James Hogan
be106bd6c6 mesa: Handle getting GL_MAX_VIEWS_OVR
Add support for GL_OVR_multiview's GL_MAX_VIEWS_OVR which can be
accessed with glGetIntegerv().

MaxViews is accessed via the hash table set up by get_hash_params.py as
a constant (MAX_VIEWS_OVR) using GL_MAX_VIEWS_OVR.

v2: Add this patch (thanks to Mike's guidance)
v3: Drop unnecessary enum size element in OVR_multiview.XML
v4: Switch to CONST(MAX_VIEWS_OVR) instead of gl_constants::MaxViews
    (Marek's suggestion)

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
a282a130fb mesa: OVR_multiview framebuffer attachment parameters
Implement the OVR_multiview framebuffer attachment parameters in
get_framebuffer_attachment_parameter():
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: This reads the
  attachment's NumViews.
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: This reads the
  attachment's Zoffset, but only if NumViews is non-zero.

This allows apitrace (PR 937[1]) to show the correct layers for
multiview framebuffer attachment surfaces, as well as to show this
information in the framebuffer attachments state.

[1]: https://github.com/apitrace/apitrace/pull/937

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
60509e187f mesa: Check views don't exceed GL_MAX_ARRAY_TEXTURE_LAYERS
The OVR_multiview spec specifies the INVALID_VALUE error to be generated
by FramebufferTextureMultiviewOVR if:
"- <texture> is a two-dimensional array texture and <baseViewIndex> +
   <numViews> is larger than the value of MAX_ARRAY_TEXTURE_LAYERS."

Implement this in check_multiview_texture_target(), similar to the test
in check_layer().

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
7819d322c4 mesa: Handle GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR
The OVR_multiview spec adds the following condition for framebuffer
completeness:
  "The number of views is the same for all populated attachments.
  { FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR }"

So add a condition to _mesa_test_framebuffer_completeness to check that
all attachments have identical NumViews. This avoids an infinite
recursion between zink_clear() and zink_clear_depth_stencil() in the
event of an incomplete FBO.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
65f18c4787 mesa: Consider NumViews to reuse FBO attachments
NumViews needs considering along with the other attachment data when
reusing a multiview framebuffer texture attachment (i.e. shared depth
and stencil texture).

The depth and stencil attachments should match in all respects including
NumViews before reusing the existing one, and NumViews should also be
copied when reusing.

This avoids an infinite recursion between zink_clear() and
zink_clear_depth_stencil() in the case of reuse of a multiview
depth/stencil attachment.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
Lionel Landwerlin
e22ab01dc7 nir: add options to lower only some image atomics to global
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33616>
2025-02-19 18:41:05 +00:00
Alyssa Rosenzweig
656422df8a nir: default-initialize next_stage
this avoids printing `next_stage: VERTEX` for internal compute shaders which is
all kinds of silly!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33605>
2025-02-19 18:08:07 +00:00
Faith Ekstrand
8536760016 nvk: Constify instance and pdev pointers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33624>
2025-02-19 17:36:37 +00:00
Pavel Ondračka
32b20a3f38 nine: set pipe_shader_state.report_compile_errors
Just set it explicitly to false to keep the old behavior before
the recent core changes in dc1b719e1f.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33545>
2025-02-19 15:44:43 +00:00
Pavel Ondračka
9b06b5db70 mesa: properly signal report_compile_error to drivers
This was already done in the fp paths, but was missed here.
With this in place drivers can report compile failures also from other
shader stages besides fragment shaders.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33545>
2025-02-19 15:44:42 +00:00
Pierre-Eric Pelloux-Prayer
6b20b06584 radeonsi: disable dcc when external shader stores are used
See comment.

Fixes: 666a6eb871 ("radeonsi/gfx12: disable display dcc for front buffer rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12552
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33469>
2025-02-19 12:35:37 +00:00
Juan A. Suarez Romero
18c3b296a6 vulkan: don't leak debug utils label name
Label names are duplicated, so free them before resetting or deleting
the cmdbuffer/queue.

Fixes leaks when testing dEQP-VK.api.debug_utils.long_labels.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33611>
2025-02-19 11:03:39 +00:00
Samuel Pitoiset
7c4a919f19 radv/meta: rename image<->buffer copies helpers
They operate on VAs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
89ea983df9 radv/meta: inline radv_copy_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
0323ed1022 radv: use radv_copy_memory() for accel structure updates
VK_KHR_acceleration_structure requires the BDA feature to be enabled
and this enables the global BO list.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
a659771e68 radv/meta: use radv_copy_memory() for the FMASK copy
The BOs are already added in radv_CmdCopyImage2KHR().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
361a598b4c radv: use radv_CmdDispatchIndirect() in the accel struct path
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
a03e391aa3 vulkan: constify vk_acceleration_structure_get_va()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Konstantin Seurer
e93592dc62 lavapipe: Remove uniform inlining
This broke with the descriptor rework and it will never work because
uniform buffers are bindless now.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
00e98d74b1 gallivm/nir/soa: Properly skip empty else branches
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
08b972781a gallivm/nir/soa: Skip bounds checking for in-bounds access
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
bd88edcf81 gallivm: Only guard tex/image ops if the exec mask can be zero
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
d9db40208d lavapipe: Lower push constants in NIR
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
a57e8b2e97 gallivm/nir/soa: Use divergence analysis
Emitting scalar instructions reduces compile time.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
8225ad3c89 nir/divergence_analysis: Handle load_const_buf_base_addr_lvp
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
b5a3caf17c gallivm/nir/soa: Do not lower vectors to llvm arrays
There are no dynamic swizzles so it is enough to apply them during
translation. This also gets rid of the extract/insertvalue spam.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
a576e7ca9c lavapipe: Optimize buffer robustness
Annotating access that does not need bounds checking allows the backend
to omit bounds checking which results in code that compiles and runs
faster.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
c60b39d8ac nir: Do not emit amul if it is unsupported
The driver woiuld have to run nir_opt_algebraic before instruction
selection.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
7905029629 nir: Rename in-bounds-agx to in-bounds
This will be used by lavapipe for skipping bounds checking when
robustness is disabled.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
92083fc70d llvmpipe: Do not use coroutines when they are unnecessary
Speeds up compilation and it should also run faster.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
28c594701e lavapipe: Initialize the compiler options of the noop fs
Crashes divergence analysis.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
cc6e43c049 lavapipe: Lower descriptor sets in NIR
This moves lowering vulkan resource indices out of gallivm into
lavapipe where it should be.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
66b3879618 lavapipe: Move nir passes to a new directory
The number of lavapipe nir passes keeps growing so it's a good idea to
add some separation before it becomes a mess.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
2208379628 gallivm/nir/soa: Select more IO to gather/scatter intrinsics
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
29a4886cc8 gallivm/nir/soa: Implement robusst uniform loads without controlflow
Loading from a "zero" address instead speeds up compilation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
178e91956c gallivm/nir/soa: Lower bools to i1
Lowering them to 32 bit integers increases compile time by a lot because
llvm will optimize them to i1.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
ce0d8b7038 gallivm/nir/soa: Remove the dependency on lp_bld_nir.c
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
e88190a09f gallivm/nir/aos: Remove the dependency on lp_bld_nir.c
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
daad0f8a91 gallivm: Split nir prepasses into aos/soa
The soa backend will work on very different looking NIR in the future.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Samuel Pitoiset
efa23ef664 radv: fix adding the BO for unaligned SDMA copies to the cmdbuf list
It shouldn't be only added at creation time.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33600>
2025-02-19 07:29:27 +00:00
Guilherme Gallo
8af7f8b7fe ci: Remove cargo symlink workaround
Symlinking $CARGO_HOME to /usr/local/bin made rustup uninstaller delete
the entire folder, causing mysterious build errors, so let's do the
traditional .cargo/env sourcing to make rustup available to the rest of
the build scripts.

Also make sure that required scripts run the shell's rcfile to be able
to setup the PATH correctly.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33519>
2025-02-19 05:08:53 +00:00
Guilherme Gallo
a663f97d2d ci: Properly clean up rustup
Use `rustup self uninstall -y` instead of manually removing folders to
ensure a proper cleanup of the rustup installation, including cargo and
init command injections in shell rc files.

Failing to do so can cause issues, such as bash failing to run in a `set
-e` environment due to a missing `$HOME/.cargo/env`, for example.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33519>
2025-02-19 05:08:53 +00:00
Yiwei Zhang
e488b5e45e venus: support VK_KHR_global_priority
as well as the prior versions promoted from.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:58 +00:00
Yiwei Zhang
696ee859ef venus: support VK_KHR_map_memory2
This is purely on the driver side.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:58 +00:00
Yiwei Zhang
f69a0201da venus: support VK_EXT_pipeline_robustness
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:57 +00:00
Yiwei Zhang
e027f2afc1 venus: support VK_EXT_pipeline_protected_access
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:57 +00:00
Yiwei Zhang
ea8a396b91 venus: support VK_KHR_shader_float_controls2
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:56 +00:00
Yiwei Zhang
82408f81b4 venus: support VK_KHR_shader_subgroup_rotate
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:56 +00:00
Faith Ekstrand
eb27cbf25a nvk: Use suld.constant for EDB uniform texel buffers
In 2183bc73a6 ("nvk: Use suld for EDB uniform texel buffers"), we
started using suld instead of tld for EDB uniform texel buffers because
we needed it for correctness.  However, it's slow as mud.  Using
suld.constant seems to fix the performance regression.  I don't know if
it's quite tld performance, but it's close.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33612>
2025-02-18 19:53:52 -06:00
Faith Ekstrand
ffdc0d8e98 nak: Use suld.constant when ACCESS_CAN_REORDER is set
This is way faster than suld.sys, which is what we're using today.  So
far I haven't seen it matter for anything but texel buffers but it
likely helps some app somewhere.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33612>
2025-02-18 19:47:00 -06:00
Faith Ekstrand
5762586c6d nvk: Align UBO/SSBO addresses down rather than up
This should never happen as the client should always give us aligned
addresses.  However, in the off chance that it does, aligning down is
probably safer than aligning up as it won't cause the top end of the
range increase and potentially fault.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
2183bc73a6 nvk: Use suld for EDB uniform texel buffers
The tricks we play for texel buffers with VK_EXT_descriptor_buffer don't
work with tld with very large buffers.  suld, on the other hand, doesn't
seem to have these limitations.

Fixes: 3b94c5c22a ("nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
1c7a4c4f38 nak: Handle sparse texops with unused color destinations
Fixes: b17f139281 ("nak: Wire up sparse residency for texture ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
0ec760af66 nvk: Allow sparse loads on EDB buffers
Fixes: 3b94c5c22a ("nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
ca06a57702 nvk: Handle shader==NULL in nvk_cmd_upload_qmd()
We can theoretically hit this if CmdProcessGeneratedCommandsEXT is
called with a state command buffer that doesn't have compute shader set
if execute commands bind a shader.  We do, however, need to still call
nvk_cmd_upload_qmd() because it also uploads push constants and we need
those regardless of whether or not there's a shader bound.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
39ae06e153 nvk: Pull shaders from the state command buffer in nvk_cmd_process_cmds()
Found by the VKD3D test suite.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Paulo Zanoni
55bdae03cc brw: don't always set cond_modifier on parsed assembly instructions
For the instructions we parse with brw_gram.y, don't unconditionally
call brw_eu_inst_set_cond_modifier(). Do it like we do in
brw_generator::generate_code() and only call it if we have a
cond_modifier to set.

Why? Because for ONE_SRC instructions, CondCtrl (bits 95:92) only
exists if Src.IsImm is false. If Src.Imm is true, then bits 95:64 are
actually Src0.ImmValue[63:32]. If we unconditionally call
brw_eu_inst_set_cond_modifier(), we'll end up zeroing bits 95:92 for
ONE_SRC instructions with 64bit immediates. See BSpec page
Structure_EU_INSTRUCTION_BASIC_ONE_SRC (56880).

This issue can be reproduced with src/intel/executor if you try to
have the following instruction:

    mov(16)         g10<1>Q          0xfedcba9876543210:Q             { align1 WE_all 1H };

our parser will end up zeroing the top bits, so the value of the
immediate will be 0x0edcba9876543210.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33559>
2025-02-18 23:44:32 +00:00
lcagustini
fb51252953 panvk: Advertise support for VK_EXT_border_color_swizzle
Advertise support for border color swizzle as we support it just fine
Passes all dEQP-VK*border_swizzle*

v2: Added feature to features.txt and vk_features struct

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33232>
2025-02-18 22:13:44 +00:00
Georg Lehmann
56aac9fdec nir/opt_algebraic: optimize ffract(ffract(a))
Foz-DB Navi21:
Totals from 163 (0.21% of 79377) affected shaders:
Instrs: 233933 -> 233685 (-0.11%)
CodeSize: 1252492 -> 1251500 (-0.08%); split: -0.08%, +0.00%
Latency: 1227625 -> 1227405 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 266954 -> 266668 (-0.11%)
VClause: 4193 -> 4191 (-0.05%)
Copies: 20935 -> 20932 (-0.01%); split: -0.02%, +0.01%
PreSGPRs: 10395 -> 10391 (-0.04%)
VALU: 163725 -> 163475 (-0.15%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:57 +00:00
Georg Lehmann
317d07484e nir: improve fsqrt range analysis
Foz-DB Navi21:
Totals from 3 (0.00% of 79377) affected shaders:
MaxWaves: 88 -> 96 (+9.09%)
Instrs: 1058 -> 951 (-10.11%)
CodeSize: 5964 -> 5368 (-9.99%)
VGPRs: 104 -> 96 (-7.69%)
Latency: 15283 -> 14099 (-7.75%); split: -8.37%, +0.62%
InvThroughput: 4951 -> 4238 (-14.40%)
Copies: 81 -> 76 (-6.17%)
PreVGPRs: 93 -> 84 (-9.68%)
VALU: 820 -> 737 (-10.12%)
SALU: 115 -> 91 (-20.87%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:57 +00:00
Georg Lehmann
81b4629636 nir: fix frsq range analysis
Foz-DB Navi21:
Totals from 98 (0.12% of 79377) affected shaders:
Instrs: 157311 -> 157675 (+0.23%); split: -0.03%, +0.26%
CodeSize: 844296 -> 846648 (+0.28%); split: -0.00%, +0.28%
Latency: 1275467 -> 1276259 (+0.06%); split: -0.00%, +0.06%
InvThroughput: 266980 -> 267098 (+0.04%); split: -0.03%, +0.07%
Copies: 11094 -> 11093 (-0.01%)
PreVGPRs: 5945 -> 5977 (+0.54%)
VALU: 110585 -> 110953 (+0.33%); split: -0.04%, +0.38%
SALU: 18481 -> 18476 (-0.03%)

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:56 +00:00
Georg Lehmann
25300ac18a nir: fix range analysis for frcp
Foz-DB Navi21:
Totals from 448 (0.56% of 79377) affected shaders:
Instrs: 669306 -> 669318 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3736580 -> 3738840 (+0.06%); split: -0.00%, +0.06%
Latency: 5860916 -> 5860961 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 1344094 -> 1344135 (+0.00%); split: -0.00%, +0.00%
VClause: 13878 -> 13879 (+0.01%)
Copies: 58538 -> 58532 (-0.01%)
VALU: 479807 -> 479820 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:56 +00:00
Georg Lehmann
1f3494b886 nir: range analysis for ffract
Foz-DB Navi21:
Totals from 75 (0.09% of 79377) affected shaders:
Instrs: 69239 -> 68383 (-1.24%)
CodeSize: 385088 -> 379532 (-1.44%)
Latency: 427188 -> 421729 (-1.28%); split: -1.28%, +0.00%
InvThroughput: 103086 -> 101926 (-1.13%)
VClause: 785 -> 753 (-4.08%)
SClause: 1624 -> 1598 (-1.60%)
Copies: 5679 -> 5671 (-0.14%); split: -0.72%, +0.58%
PreSGPRs: 3961 -> 3937 (-0.61%)
VALU: 51107 -> 50457 (-1.27%)
SALU: 9034 -> 8950 (-0.93%)
VMEM: 1123 -> 1091 (-2.85%)
SMEM: 2862 -> 2830 (-1.12%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:56 +00:00
Aaron Ruby
030c8b57b0 gfxstream: Add reference counting for GEM handles in LinuxVirtGpuBlob
It's entirely possible that the same GEM handle is referenced across
different Vulkan object instances. As per the warnings in xf86drm.h,
the caller is responsible for reference counting.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33451>
2025-02-18 20:03:28 +00:00
Aaron Ruby
a630efb645 gfxstream: Fix precedence and ownership issues on Linux for imported FD
and the VirtGpuResource

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33451>
2025-02-18 20:03:27 +00:00
Paulo Zanoni
927d7b322b brw: increase brw_reg::subnr size to 6 bits
Since Xe2, the registers are bigger and even the instruction
structures got updated to have 6 bits.

The way I detected this issue was when I tried to use
src/intel/executor to add the following instruction:

    add(8)          g6.8<1>UD      g4<8,8,1>UD    0x00000008UD    { align1 WE_all 1Q I@1 };

Executor would read this and end up emitting an add with dst being
g6<1>UD instead of what we wanted. It turns out that inside
brw_gram.y, at dstoperand and dstoperandex we do:

    $$.subnr = $$.subnr * brw_type_size_bytes($4);

which would overflow subnr back to 0.

The overflow doesn't seem to be a problem with code we emit directly
(unlike the code we parse, like above) due to the fact that we seem to
treat Xe2 registers as smaller all the way until we call phys_nr() and
phys_subnr() during code generation. The phys_subnr() function can
generate a value that would overflow reg.subnr, but this value is
never written back to reg.subnr, it's just returned as an unsigned
int.

Fixes: e9f63df2f2 ("intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33539>
2025-02-18 19:38:46 +00:00
Lionel Landwerlin
cf3a343800 anv: fixup compute walker storage length
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9aef4ceb13 ("anv: hold a prepacked COMPUTE_WALKER instruction on CS pipelines")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33593>
2025-02-18 18:34:51 +00:00
Lionel Landwerlin
66bbb79df9 anv/ci/adl: update fail expectation for video
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33593>
2025-02-18 18:34:51 +00:00
Tapani Pälli
765f3b78d5 anv: apply cache flushes on pipeline select with gfx20
This fixes rendering artifacts seen with Hogwarts Legacy and Black
Myth Wukong. Assumption is that we can get rid of these flushes once
RESOURCE_BARRIER work lands but until then we need them.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12540
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12489
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/33397>
2025-02-18 18:04:45 +00:00
Lionel Landwerlin
252cac1e5c anv: avoid memory type changes with INTEL_DEBUG=noccs
Otherwise replay of renderdoc captures don't work.

Instead avoid passing the flag down the allocator.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33583>
2025-02-18 17:35:44 +00:00
Job Noorman
891132c3ec ir3/legalize: use (sy) for ray_intersection WAR hazards
It seems like (ss) is not enough to resolve WAR hazards for
ray_intersection.

Fixes CTS tests:
- dEQP-VK.ray_query.stress.fragment_shader.aabbs
- dEQP-VK.ray_query.stress.fragment_shader.triangles

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33597>
2025-02-18 17:13:33 +00:00
Job Noorman
3f0894df8d ir3: don't create SRC2 for isam without .v
We would create an immed 0 SRC2 for, for example, load_uav. Even though
this src would be dismissed in the final assembly, it would still waste
a register or alias.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33596>
2025-02-18 16:13:53 +00:00
Connor Abbott
f39679199b tu: Fix vertical tile merging check
The intent here was to check if the tile we're trying to merge
vertically (prev_y_tile) has already been merged horizontally into a
neighboring tile, but I used the slot_mask which also contains the tiles
that have been merged into the prev_y_tile, so the check was too
conservative and would fail even if another tile had been merged into
prev_y_tile. This meant that we would fail to ever create 2x2 regions of
tiles. Fix this by just testing prev_y_tile's bit in the mask.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33534>
2025-02-18 14:41:56 +00:00
Connor Abbott
928a857496 tu: Make sure tiles being merged are adjacent
Even though we always try to merge a horizontally or vertically adjacent
tile, when we try to merge a vertically adjacent tile it may not
actually be adjacent because it was merged horizontally and the current
tile wasn't or vice versa. We have to detect this and reject merging it.

Fixes: 3fdaad0948 ("tu: Implement bin merging for fragment density map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33534>
2025-02-18 14:41:56 +00:00
Natalie Vock
f01623ea75 radv/bvh: Add custom leaf node builder
This custom builder implements fine-grained instance node bounds
calculation by looking at all AABBs at tree depth 2.

Shaves off 0.3ms in the start scene for Indiana Jones: The Great Circle
on Deck (roughly 29.1ms->28.7ms).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:53 +00:00
Natalie Vock
90c3450621 radv/bvh: Prefix RADV-specific node functions with radv_
Avoids naming conflicts when including both the common leaf shader and
RADV's build_helpers.h.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:53 +00:00
Natalie Vock
444bd02255 radv/bvh: Remove unused build_instance helper
This is in common code now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:53 +00:00
Natalie Vock
b1f6d3b6b7 radv/bvh, vulkan/bvh: Move AccelerationStructureInstance to vk_build_helpers
Remove duplications.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Natalie Vock
28ed283e81 vulkan/bvh: Add optional fine-grained instance node bounds calculation
This allows drivers to inject custom functions to calculate the bounds
of instance nodes. For example, this can be used to determine instance
bounds by transforming the AABBs of all child nodes at some level in the
BVH. When instance transforms contain rotations of close to 45°, this
can yield a tighter AABB than just taking the instance's top-level AABB
and rotating it.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Natalie Vock
e39994088a vulkan/bvh: Add option to override leaf builder SPIR-Vs
With this, drivers can compile and use custom leaf builder versions
instead of the generic common shader.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Natalie Vock
40b0ad0f45 vulkan/bvh: Move leaf builder code to header
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Rhys Perry
d2907d271e ac/nir: set higher alignment for some swizzled store_buffer_amd
No fossil-db changes (navi31, navi21, polaris10).

fossil-db (vega10):
Totals from 37 (0.06% of 62962) affected shaders:
MaxWaves: 189 -> 180 (-4.76%)
Instrs: 45607 -> 45616 (+0.02%); split: -0.16%, +0.18%
CodeSize: 241980 -> 234908 (-2.92%)
VGPRs: 2524 -> 2784 (+10.30%)
Latency: 152476 -> 151948 (-0.35%); split: -0.38%, +0.03%
InvThroughput: 74441 -> 78360 (+5.26%); split: -0.21%, +5.47%
VClause: 902 -> 1044 (+15.74%); split: -1.55%, +17.29%
Copies: 4989 -> 6745 (+35.20%)
PreVGPRs: 2044 -> 2334 (+14.19%)
VALU: 31634 -> 33389 (+5.55%)
SALU: 2601 -> 2602 (+0.04%)
VMEM: 5774 -> 3991 (-30.88%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33531>
2025-02-18 12:31:19 +00:00
Rhys Perry
8fd862499a ac/nir: don't cross swizzle elements when vectorizing buffer_amd intrinsic
This can happen for mesh shader outputs.

No fossil-db changes (navi31, navi21, polaris10).

fossil-db (vega10):
Totals from 37 (0.06% of 62962) affected shaders:
MaxWaves: 183 -> 189 (+3.28%)
Instrs: 45037 -> 45607 (+1.27%); split: -0.09%, +1.36%
CodeSize: 231472 -> 241980 (+4.54%)
VGPRs: 2656 -> 2524 (-4.97%)
Latency: 151199 -> 152476 (+0.84%); split: -0.02%, +0.87%
InvThroughput: 75148 -> 74441 (-0.94%); split: -1.44%, +0.50%
VClause: 882 -> 902 (+2.27%); split: -4.31%, +6.58%
Copies: 6465 -> 4989 (-22.83%)
PreVGPRs: 2265 -> 2044 (-9.76%)
VALU: 33109 -> 31634 (-4.45%)
SALU: 2602 -> 2601 (-0.04%)
VMEM: 3711 -> 5774 (+55.59%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: c3d27906d8 ("radv: vectorize lowered shader IO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33531>
2025-02-18 12:31:19 +00:00
David Rosca
ebd8893710 radv/video: Move IB header from begin/end to encode_video
For decode this is also done in decode_video.

This breaks if app doesn't call vkCmdEncodeVideoKHR before end, eg:

  vkCmdBeginVideoCodingKHR
  vkCmdControlVideoCodingKHR
  vkCmdEndVideoCodingKHR

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33582>
2025-02-18 11:12:22 +00:00
David Rosca
77ff18aa3b radv/video: Fix setting balanced preset for HEVC encode with SAO enabled
FW disables SAO in speed preset, so we need to switch to balanced.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12615
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33582>
2025-02-18 11:12:22 +00:00
Danylo Piliaiev
49191f46e6 tu/a6xx: Emit VSC addresses for each bin to restore after preemption
KGSL unconditionally supports preemption so we cannot ignore it.

On a6xx, we have to emit VSC addresses per-bin or make the amble include
these registers, because CP_SET_BIN_DATA5_OFFSET will use the
register instead of the pseudo register and its value won't survive
across preemptions. The blob seems to take the second approach and
emits the preamble lazily. We chose the per-bin approach but blob's
should be a better one.

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

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33580>
2025-02-18 10:23:09 +00:00
Samuel Pitoiset
9427df23b4 radv: use radv_image::bindings::addr more
Also remove radv_image::bindings::offset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:49:14 +01:00
Samuel Pitoiset
066467cf98 radv: compute radv_image::bindings::addr at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:24 +01:00
Samuel Pitoiset
f234099d6d radv: rename radv_image::bindings::bo_va to addr
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:24 +01:00
Samuel Pitoiset
0f8b3bf489 radv: remove redundant zero initialization when creating images
The struct is already zero-allocated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:24 +01:00
Samuel Pitoiset
63b5bce396 radv: stop using image binding offset when exporting BO metadata
The offset must be zero for dedicated allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:23 +01:00
Samuel Pitoiset
50851f17d1 radv/meta: remove the buffer dependency for image copy operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
ae5d2bfd36 radv/meta: use radv_copy_memory() instead of radv_copy_buffer()
To remove the buffer dependency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
70bd4fe621 radv/meta: pass the buffer addr to SDMA image buffer copy operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
6e2da49e92 radv/meta: add BOs to cmdbuf list earlier for image copy operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
e0070bc68b radv: fix adding the VRS image BO to the cmdbuf list on GFX11
This might cause random faults.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33584>
2025-02-18 07:13:07 +00:00
Tapani Pälli
d8381415a6 anv: tighten condition for changing barrier layouts
Assertion (or attempting the layout change) is causing crash when
launching Steel Rats. Tighten the condition for change so that it should
affect only when runtime has made changes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12602
Fixes: eed788213b ("anv: ensure consistent layout transitions in render passes")
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/33523>
2025-02-18 06:30:14 +00:00
Vasily Khoruzhick
b6fba15bd7 lima: ppir: duplicate fneg and fabs if its source is an intrinsic
fneg and fabs are folded later in ppir, but having them in nir as a
separate instructions prevents duplicate_intrinsics pass from duplicating
load_input and load_uniform. Duplicate fneg and fabs, so subsequent
duplicate_intrinsic pass can duplicate the loads

shader-db:

total instructions in shared programs: 27698 -> 27675 (-0.08%)
instructions in affected programs: 2752 -> 2729 (-0.84%)
helped: 21
HURT: 2
helped stats (abs) min: 1 max: 4 x̄: 1.19 x̃: 1
helped stats (rel) min: 0.38% max: 6.67% x̄: 2.75% x̃: 0.75%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 1.89% max: 1.89% x̄: 1.89% x̃: 1.89%
95% mean confidence interval for instructions value: -1.39 -0.61
95% mean confidence interval for instructions %-change: -3.67% -1.03%
Instructions are helped.

total loops in shared programs: 2 -> 2 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 372 -> 368 (-1.08%)
spills in affected programs: 27 -> 23 (-14.81%)
helped: 4
HURT: 0

total fills in shared programs: 1224 -> 1205 (-1.55%)
fills in affected programs: 81 -> 62 (-23.46%)
helped: 4
HURT: 0

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33569>
2025-02-18 02:38:26 +00:00
Faith Ekstrand
86e217e7df nvk: Implement descriptorBufferPushDescriptors
The only thing we really need to do here is to make sure we don't try
to use the EDB path for push descriptors since those aren't really
descriptor buffers.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33589>
2025-02-17 23:38:17 +00:00
José Roberto de Souza
7d4c91efef intel/dev: Call intel_device_info_update_after_hwconfig() from common code
Avoid backends duplication.

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/33585>
2025-02-17 20:52:31 +00:00
José Roberto de Souza
e170252d97 intel/dev: Improve max_cs_threads documentation
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/33585>
2025-02-17 20:52:31 +00:00
Vasily Khoruzhick
dde084d688 lima: ppir: use combiner unit for mul
Combiner unit runs after fmul/smul/fadd/sadd units and it can consume
the results that previous units wrote to the registers. So prefer
placing scalar mul into combiner unit and predecessors (if any)
into other units

shader-db:

total instructions in shared programs: 29072 -> 27698 (-4.73%)
instructions in affected programs: 11237 -> 9863 (-12.23%)
helped: 163
HURT: 0
helped stats (abs) min: 1 max: 42 x̄: 8.43 x̃: 4
helped stats (rel) min: 0.64% max: 30.00% x̄: 13.03% x̃: 11.76%
95% mean confidence interval for instructions value: -9.89 -6.96
95% mean confidence interval for instructions %-change: -14.09% -11.97%
Instructions are helped.

total loops in shared programs: 2 -> 2 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 367 -> 372 (1.36%)
spills in affected programs: 16 -> 21 (31.25%)
helped: 1
HURT: 2

total fills in shared programs: 1208 -> 1224 (1.32%)
fills in affected programs: 51 -> 67 (31.37%)
helped: 2
HURT: 2

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33568>
2025-02-17 12:25:01 -08:00
Vasily Khoruzhick
bc9fca2fb1 lima: ppir: add codegen for mov and mul on combiner unit
Combiner unit support scalar by vector multiplication and scalar mov.
Implement it for codegen

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33568>
2025-02-17 12:25:01 -08:00
Vasily Khoruzhick
5937d12d29 lima: ppir: assert on unexpected pipeline dest for fmul and vmul
Assert on unexpected pipeline dest for fmul and vmul to catch scheduler
bugs early

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
c6c37b516d lima: ppir: fix diassembling atan and combiner codegen definition
Fix multiple issues with atan in disassembler:

- arg1_en field in combiner unit actually seems to be a bit indicating
  that one of sources is vector (e.g. for atan_pt2, or multiplication)
- atan2 has 2 arguments, not one
- properly handle all instruction variants

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
f90df9a39e lima: ppir: print index of the node that breaks node_to_instr
Print index of the node that breaks node_to_instr to make debugging
easier

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
7621f9beda lima: ppir: fixup src node when replacing src for select and load_reg
Fixup src node when replacing src for select and load_reg

It doesn't affect compiler functionality, but affects printing ppir
representation.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
2ea27f41e3 lima: ppir: improve readability of ppir represantation dump
Improve readability of ppir representation dump

- adopt "dest = op src1[, srcN]"
- use symbolic names of pipeline registers
- print destination writemask
- print destination modifier (if any)
- print source(s) swizzle
- print constants
- print load node base index
- print branch condition(s)

With these modifications it's actually possible to follow the program

-------block   0-------
 $0008 = mov ^texture ($0005) // NIR: new
  ($0005) ^texture = ld_tex ^discard ($0006).xyzx, $0004.xxxx // NIR: ssa4
    ($0006) ^discard = ld_coords_reg $0002.xyzx // NIR: new
       $0004.x = ld_var 0 // NIR: ssa6
       $0002.xyz = mov $0001.yzwx // NIR: ssa5
         $0001 = ld_var 0 // NIR: ssa7

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Eric Engestrom
8771762bcd llvmpipe/ci: drop fraction for asan tests that takes 1.5 min without fraction
The fraction was making it run for only 10-12 seconds, which is wasteful
considering the huge overhead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33581>
2025-02-17 19:10:57 +00:00
Lionel Landwerlin
2361ed27f3 runtime: sort push constant layouts
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33548>
2025-02-17 18:39:53 +00:00
Danylo Piliaiev
97f851e7c5 tu: Handle mismatched mutability when resolving from GMEM
Apparently fast path cannot handle mismatched mutability and we
should use CP_BLIT which has SP_PS_2D_SRC_INFO.MUTABLEEN to signal
src mutability. Previously it was partially handled by
tu_attachment_store_mismatched_swap.

Fixes: a104a7ca1a
("tu: Handle non-identity GMEM swaps when resolving")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
2025-02-17 17:56:17 +00:00
Danylo Piliaiev
4c918603e0 freedreno/fdl: Log mutability when dumping layout
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
2025-02-17 17:56:17 +00:00
Danylo Piliaiev
bdf0f61d4a tu: Get correct src view when storing gmem attachment
Fixes: a104a7ca1a
("tu: Handle non-identity GMEM swaps when resolving")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
2025-02-17 17:56:17 +00:00
Samuel Pitoiset
7b5efb4c0b radv: remove radv_buffer_view_{init,finish}() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 16:53:28 +01:00
Samuel Pitoiset
3c98a336cf radv: remove radv_buffer_{init,finish}() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 16:53:08 +01:00
Samuel Pitoiset
84ba15eb05 radv/meta: switch to descriptor buffers
The main advantage is to use BDA for texel buffer descriptors.
It might also be slightly faster on the CPU.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 16:52:49 +01:00
Samuel Pitoiset
bb7f86a9e4 vulkan: add descriptor buffer support to compute astc decoder
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 15:03:43 +01:00
Kenneth Graunke
e65c1473de nir: Eliminate dead writes to shared memory at the end of the program
If the program writes to shared variables after all reads, in the last
block of the program, no one will ever read the value we write.  We can
just eliminate these dead writes.

(Thanks to Faith Ekstrand for improving the ends_program() conditions.)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33452>
2025-02-17 12:46:07 +00:00
Samuel Pitoiset
9af11bf306 radv: add initial DCC support on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255>
2025-02-17 12:03:09 +00:00
Samuel Pitoiset
827cef7f7f ac/gpu_info: add gfx12_supports_dcc_write_compress_disable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255>
2025-02-17 12:03:09 +00:00
Valentine Burley
53c1b15f53 anv/ci: Don't start X11 for ANGLE
This is no longer required.

Also document a flake seen recently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33578>
2025-02-17 11:31:01 +00:00
Valentine Burley
72b8ba4851 radv/ci: Don't start X11 for ANGLE
This is no longer required.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33578>
2025-02-17 11:31:01 +00:00
Yiwei Zhang
0b908bb27e venus: updated to use core types for promoted extensions
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33567>
2025-02-17 10:46:35 +00:00
Yiwei Zhang
207c9ec65a venus: sync protocol for v1.4.307 release and update promoted entries
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33567>
2025-02-17 10:46:35 +00:00
Yiwei Zhang
ae2830e520 venus: drop unused codes
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33567>
2025-02-17 10:46:34 +00:00
Konstantin Seurer
af375c6756 radv: Optimize fs builtins using static gfx state
The values of some builtins are known at compile time when the
application creates pipelines with static state.

Stats for graphics pipelines:

Totals from 568 (0.71% of 80536) affected shaders:
MaxWaves: 12364 -> 12502 (+1.12%); split: +1.26%, -0.15%
Instrs: 515696 -> 501182 (-2.81%); split: -2.85%, +0.04%
CodeSize: 2815736 -> 2741464 (-2.64%); split: -2.69%, +0.05%
VGPRs: 29528 -> 29160 (-1.25%); split: -1.71%, +0.46%
SpillSGPRs: 212 -> 215 (+1.42%)
Latency: 5515421 -> 5409125 (-1.93%); split: -2.05%, +0.13%
InvThroughput: 1293512 -> 1277913 (-1.21%); split: -1.27%, +0.06%
VClause: 10570 -> 10295 (-2.60%); split: -2.74%, +0.14%
SClause: 19040 -> 18531 (-2.67%); split: -2.83%, +0.16%
Copies: 37189 -> 35431 (-4.73%); split: -5.31%, +0.58%
Branches: 11391 -> 11070 (-2.82%); split: -2.92%, +0.11%
PreSGPRs: 27848 -> 27313 (-1.92%); split: -1.95%, +0.03%
PreVGPRs: 24847 -> 24106 (-2.98%); split: -3.00%, +0.02%
VALU: 359356 -> 348779 (-2.94%); split: -2.97%, +0.03%
SALU: 59135 -> 57448 (-2.85%); split: -3.11%, +0.26%
VMEM: 14674 -> 14313 (-2.46%)
SMEM: 30901 -> 30342 (-1.81%); split: -1.84%, +0.03%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32793>
2025-02-17 09:45:15 +00:00
Valentine Burley
bbfbd16580 turnip/ci: Add a nightly ANGLE job on a750
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Valentine Burley
bd2563eb02 turnip/ci: Rename valve-freedreno-turnip-manual-rules
The valve-freedreno-turnip-manual-rules naming would suggest
freedreno + turnip rules, but in fact this rule is meant to only
impact turnip.
Change the name to match .google-turnip-manual-rules and
.collabora-turnip-manual-rules.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Valentine Burley
612f56cb5e ci/container: Include ANGLE in the arm64 test-gl container
Build ANGLE in the arm64 test-gl containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Valentine Burley
45fe200222 turnip/ci: Add nightly ANGLE jobs on a618 and a660
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Samuel Pitoiset
f828695e46 radv: stop relying on VkBuffer for VBO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33543>
2025-02-17 07:37:50 +00:00
Samuel Pitoiset
06e47e8776 radv: compute VBO addr at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33543>
2025-02-17 07:37:49 +00:00
Valentine Burley
464c97b588 ci: Update expectations from latest nightly
Update expectations from https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1364513.
Created with ci-collate.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33547>
2025-02-17 06:56:30 +00:00
Qiang Yu
d2348daf55 llvmpipe/ci: change for oes_egl_image_external_essl3
Subtest name is not used anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
42068643e9 dri,egl,glx: remove redundant usage of HAVE_X11_DRM
These files are build or used only when drm platform is
available, no need to check this macro inside them.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
a52d4876d9 kopper: remove unused function definition
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
2a1ae6d94b glx/egl/x11: fix x11_dri3_check_multibuffer
glx/egl "multibuffers" denotes if server side support DRI3
multi plane and modifiers which is version >= 1.2. But now
it returns true just when DRI3 version >= 1.

This causes problem when xserver with amdgpu DDX which only
support DRI3 1.0, so "multibuffers" gets set unexpectedly,
and client send DRI3 >= 1.2 request to server which gets
unimplemented error.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
746381f870 dri: dmabuf cap does not rely on winsys multibuffer support
dmabuf cap is client side cap, should not rely on whether window
system support multibuffer (i.e. DRI2 multi plane with modifier).

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
354dc800d2 egl: decouple dmabuf import/export cap from xserver support
multibuffers_available denotes xserver side support for
DRI3 and Present protocols which should not affect client
side support for dmabuf import/export.

This is for xserver with amdgpu DDX in which case
multibuffers_available will be false, but dmabuf import/export
should be enabled to support applications like mpv which use
dmabuf import for vaapi decoded buffer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Faith Ekstrand
607686f6bf nvk: Respect VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT
This is part of VK_EXT_mutable_descriptor_type but we never did anything
with it.  Since we use local memory for descriptor sets, copying from
them means reading VRAM through a WC map and it's pretty expensive.
Using malloc() for HOST_ONLY should be a nice perf boost for things
which give us the hint.

This massively improves the performance Dragon Age: The Veilguard,
taking it from 7 FPS to 25 FPS on an RTX 4060.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12622
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33571>
2025-02-17 00:41:36 +00:00
Faith Ekstrand
b8508726f0 nvk: Rename nvk_descriptor_set::mapped_ptr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33571>
2025-02-17 00:41:36 +00:00
Yiwei Zhang
8741be3365 venus: fix maintenance5 props init and create flags2
More are found missed from prior maint5 support. This change has
properly initialized the maint5 props as well as fixing its new
VkPipelineCreateFlags2CreateInfo integrations.

Verified with dEQP-VK.*maintenance5*

Fixes: be6fece6e1 ("venus: enable VK_KHR_maintenance5")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33566>
2025-02-15 22:55:55 -08:00
Yiwei Zhang
dfd2af5da1 Support 5 more promoted extensions
VK_KHR_calibrated_timestamps
VK_KHR_index_type_uint8
VK_KHR_line_rasterization
VK_KHR_load_store_op_none
VK_KHR_vertex_attribute_divisor

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33561>
2025-02-16 00:23:48 +00:00
Yiwei Zhang
5603b78779 venus: sync protocol to v1.3.302
and update extensions being promoted

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33561>
2025-02-16 00:23:48 +00:00
Yiwei Zhang
2026e4a262 venus: fix sampler locations feats and props scrub
Fixes: ff64092ff3 ("venus: support VK_EXT_sample_locations")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33561>
2025-02-16 00:23:48 +00:00
Matt Turner
06d8afff64 vulkan: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
da6971f865 mapi: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
49bc323866 intel: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
388e9e6b33 glx: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
a9139e0f97 glsl: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
ec9c7a1ef8 gallium: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Lionel Landwerlin
d75849aaea anv: make compute state flush helper visible
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:24 +02:00
Lionel Landwerlin
ed18353e2a anv: make gfx state flushing available externally
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:21 +02:00
Lionel Landwerlin
9aef4ceb13 anv: hold a prepacked COMPUTE_WALKER instruction on CS pipelines
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:18 +02:00
Lionel Landwerlin
82b6a6f0b9 anv: move reg_mask push constant field to gfx
This is used only for gfx stages as those are the only ones that can
promote UBOs to push constants.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:14 +02:00
Lionel Landwerlin
456d691310 anv: move RT stage bits to main header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:12 +02:00
Martin Roukala (né Peres)
71050f6314 r300g/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:29:19 +02:00
Martin Roukala (né Peres)
9a491a2c3f i915g/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:29:19 +02:00
Martin Roukala (né Peres)
88377ed295 freedreno/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:28:54 +02:00
Martin Roukala (né Peres)
3ebe512f1f nvk/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:28:45 +02:00
Martin Roukala (né Peres)
a5b5942276 etnaviv/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
0a3a2f278e radv/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
06b5aa9965 ci/b2c: allow jobs to opt-in into the new mars setup command
This machine registration command makes it possible to check for the
specified list of machine tags rather than just doing a full comparison
of tags between the expected state and the current state.

This is beneficial for multiple reasons:

 * It enables having more than one GPU in a host, and we let the machine
   registration container unbind the unwanted GPU before Mesa CI even
   executes anything

 * It makes it possible to alter the boot process so as to use a kernel
   with a different architecture than the default kernel of CI-Tron uses

 * Adding or modifying tags which are unused by a job won't fail the
   first job after the new machine registration container lands.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
81d55e0866 zink/ci: document more NVK GA106 flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
c6d40205e6 zink/ci: document more RADV flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:12:12 +02:00
Martin Roukala (né Peres)
e9bb49732e radv/ci: mark a whole subset of tests as flaky on tahiti
Let's stop this game of whack-a-mole, and just mark the whole subset
of tests as flacky.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:12:12 +02:00
Martin Roukala (né Peres)
94b8430e8e zink/ci: increase the a750 job's timeout to 18 minutes
The DUT boots more reliably now that we are using the latest kernel,
so no need to allocate 5 minutes to multiple boot attempts.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:12:12 +02:00
Mel Henning
8621d036c1 nouveau/mme: Print ip in mme_tu104_dump
This matches mme_tu104_print

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33560>
2025-02-15 11:20:09 +00:00
Konstantin Seurer
0ff66fe1be lavapipe: Use the common BVH framework
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
2f823a54ea lavapipe: Implement some functions required by the common BVH framework
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
ac0f643d4b gallivm: Remove loop limiting
This is not conformant and it can cause hard to debug issues or hide
existing bugs. Getting rid of this limit will allow lavapipe to use the
common bvh building framework since the ploc build shader has a loop
that waits to start the next phase.

cc: mesa-stable

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
d6244049a1 vulkan/radix_sort: Stop force-unrolling loops
This is really bad for compile times in lavapipe. Compiling a shader
with all loops unrolled can take 2 seconds. nir and llvm should be smart
enough to unroll thos themselves if it's beneficial.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
c387699c7b vulkan/cmd_queue: Add VK_CMD_TYPE_COUNT
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
5543272ceb vulkan/cmd_queue: Simplify freeing cmd_queue entries
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Rebecca Mckeever
55f4da7bbf panvk: Use vk_image_can_be_aliased_to_yuv_plane() helper
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33460>
2025-02-15 05:39:33 +00:00
Rebecca Mckeever
f419a0bc4e vk/image: Add vk_image_can_be_aliased_to_yuv_plane() helper
vk_image_can_be_aliased_to_yuv_plane() checks whether an image has a
format that is compatible with a plane of a multiplane image and can be
aliased to it.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33460>
2025-02-15 05:39:33 +00:00
Roland Scheidegger
24076eb3f9 llvmpipe: Fix overflow issues calculating loop iterations for aniso
iceil can return bogus (negative) values in case there's an overflow
(or a NaN). This would then take forever to run due to a couple billion
loop iterations.
Use unsigned minimum instead which will clamp iterations to max aniso
(not sure if that makes more sense than clamping negative values to 0,
probably doesn't really matter).

Fixes: 350a0fe632 ("llvmpipe: Use a simpler and faster AF implementation")

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33537>
2025-02-15 04:08:02 +00:00
Lorenzo Rossi
cc30e35306 nvk: fix preprocess buffer alignment
Previously DGC alignment requirements declared by
getGeneratedCommandsMemoryRequirementsExt were not also reported by
getDeviceBufferMemoryRequirements for preprocess buffers.

This fixes 1554 dEQP-VK failures related to device-generated commands
that previously failed with "DGC alignment requirement larger than
preprocess buffer alignment requirement".

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33555>
2025-02-14 22:56:59 +00:00
Lionel Landwerlin
a9b6a54a8c brw: fix component packing starting index
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6845dede59 ("brw: add support for no VF input slot compaction")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33553>
2025-02-14 20:17:54 +00:00
Caterina Shablia
94093f58fb panvk: enable uniformBufferStandardLayout
We already implement scalarBlockLayout, which is more general than
uniformBufferStandardLayout, so this is a trivial enable for us.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33291>
2025-02-14 18:06:44 +00:00
Caterina Shablia
7a7f01bda0 panvk: enable imagelessFramebuffer
This is handled by mesa vk runtime so is a trivial enable for us.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33291>
2025-02-14 18:06:44 +00:00
Simon Ser
5a19323d0e gbm: fix get_back_bo() failure with gbm_surface and implicit modifiers
Before 361f362258 ("dri: Unify createImage and
createImageWithModifiers"), gbm_surface_create_with_modifiers() would
fail with ENOSYS on drivers missing explicit modifiers support. After
that commit, it succeeds and fails later when it tries to allocate a
new back buffer.

Restore the previous behavior.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 105fcb9cfd ("dri: revert INVALID modifier special-casing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12283
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32726>
2025-02-14 16:41:07 +00:00
Aaron Ruby
d926704183 gfxstream: Clean up the gfxstream_vk device and instance init
Reviewed-by: Serdar Kocdemir <kocdemir@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33449>
2025-02-14 15:38:35 +00:00
David Rosca
4e4cfa682d frontends/va: Use transfer stride and offset in DeriveImage
This should use the stride and offset from transfer, because
the values from resource_get_info may not match the mapped
memory if the driver uses staging texture for transfer.
This also gives us data size and we don't need to calculate
it for each format.

Unfortunately we only know the values when mapping the buffer,
but VAAPI requires the values when creating the image and at
that point we don't know the usage yet (read/write).
Do a dummy map of all planes first time DeriveImage is called
for each surface and cache the values for subsequent calls.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32326>
2025-02-14 15:20:52 +00:00
Erik Faye-Lund
63c6f3e0f0 panvk: rename helper
This function is no longer the only concept we have of "Vulkan version",
so let's rename it to reflect that it's only about the API-versin. We
don't really need to specify that it's about Vulkan versions, that seems
pretty obvious here.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33254>
2025-02-14 15:13:09 +01:00
Erik Faye-Lund
2653a3988f panvk: report passing the VK CTS
This will be needed in order to check off passing the VK CTS properly.

Please note, this does *not* mean that we are formally conformant, only
that we have passed the VK CTS at least once. Those are not the same
thing.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33254>
2025-02-14 15:13:04 +01:00
David Rosca
56b2742814 ci/amd: Remove VAAPI skips
Not needed anymore.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33544>
2025-02-14 13:47:45 +00:00
Konstantin Seurer
3ded0051b5 lavapipe: Fix maintainance7 descriptor set limits
Fixes dEQP-VK.api.maintenance7.total_dynamic_buffers_properties.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31749>
2025-02-14 13:16:12 +00:00
Michael Cheng
9ad427c000 Revert "anv: Fix missing Perfetto trace for as build"
When collecting Perfetto traces on ANV, we should always be
running with MESA_GPU_TRACES=perfetto, and not rely on dynamic
enablement via pps-producer.

This reverts commit 873ad6b6d5.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33530>
2025-02-14 08:10:11 +00:00
Hyunjun Ko
9f9e95e9d5 anv: fix maxDpbSlots and maxActiveReferencePictures for AV1 decoding.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33535>
2025-02-14 07:47:05 +00:00
Emma Anholt
98efca9207 ci/anv: Enable testing with Vulkan video encode/decode.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25384>
2025-02-14 01:21:20 +00:00
Emma Anholt
d62610778a mesa/ffvs: Skip doing redundant stores of .xyz when doing lighting calculation.
Previously, we stored the full color output before lighting, then compute
lighting and store just the .xyz of the result to .xyz.

We can save followup optimization work to clean up the unused .w
calculations during lighting, and DCEing the first .xyz store if we just
store .w when it's done, and only do lighting on .xyz.  Some of that
redundant store work may not have been happening on all backends.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33501>
2025-02-13 22:23:02 +00:00
Eric R. Smith
18a14c4522 panfrost: fix backward propagation of values in loops
bi_opt_mod_prop_backward tries to propagate values backwards, but
stops checking for uses when it reaches the SSA definition. For
ordinary blocks that's fine, but for loops the definition can come
after a PHI that uses the value. This causes incorrect code to be
generated in shaderdb test `shaders/skia/2134.shader_test`. Fix this
by special casing PHI instructions, in a manner similar to done in
asahi/compiler/agx_optimizer.c.

This bug has been present a long time, so we want it back-ported to
stable.

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33483>
2025-02-13 21:48:43 +00:00
Mel Henning
11b8c8b8e6 nak,nir: Add 64-bit lea_nv
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Mel Henning
c92a92e72b nak: Add OpLeaX
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Mel Henning
0470643047 nak,nir: Add 32-bit nir_op_lea_nv and use it
Changes code size by -0.80% on shaderdb.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Mel Henning
54fcc63d3e nak: Add OpLea
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Yiwei Zhang
ff64092ff3 venus: support VK_EXT_sample_locations
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
ae3bc10d58 venus: refactor to share more codes between pipeline state fillings
A lot of codes can be shared for filling states of fragment shader and
fragment output interface.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
7c28f614a4 venus: support VK_EXT_blend_operation_advanced
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
a7fccbbf85 venus: fix to handle pipeline flags2 from maint5
Fixes: be6fece6e1 ("venus: enable VK_KHR_maintenance5")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
a7adf8db67 venus: group private data together with other 1.3 exts
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
f656ca6a13 venus: sync venus protocol for below extensions
VK_EXT_blend_operation_advanced
VK_EXT_sample_locations

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Andrew Wolfers
92370f63ab vulkan: Add BGRA format support
This change adds handling to convert between the VULKAN and
AHARDWAREBUFFER enum values for the BGRA_8888 buffer format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33485>
2025-02-13 16:10:57 +00:00
Mohamed Ahmed
8a71b21c2e nvk: Set NIL_IMAGE_USAGE_VIDEO_BIT for images meant for video usage
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
7d21d17b01 nil: Force smallest block size for images meant for Vulkan Video
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
54fed0536d nil: Use multiplanar init_info during image creation
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
b2ca04ec78 nvk: Add NVK_MAX_SAMPLER_PLANES for samplers
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
8c70c8f60f nvk: Add NVK_MAX_IMAGE_PLANES for images
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Lionel Landwerlin
db53e53bf6 brw: add documentation about slot compaction & component packing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
6845dede59 brw: add support for no VF input slot compaction
Normally the driver & compiler work together to use as few
3DSTATE_VERTEX_ELEMENTS/VERTEX_BUFFER_ELEMENT data as possible.

The compiler ignores unused bits and driver avoids emitting the
corresponding elements in 3DSTATE_VERTEX_ELEMENTS.

For device generated commands, we want an 3DSTATE_VERTEX_ELEMENTS
programming that is independent from the shader so that we can
implement indirect pipeline binding without complicating the
generation shader as well as emitting fewer generated commands.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
f19c5f4fcc brw: use meaningful io locations for system values
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
6b99bf76ca anv: ensure Wa_16012775297 interacts correctly with Wa_18020335297
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dddd765553 ("anv: implement VF_STATISTICS emit for Wa_16012775297")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
a85717f313 anv: enable vertex fetching component packing
DG2 a/b testing:
   Borderlands3	 -0.55%
   Cyberpunk     +0.38%
   Superposition -0.67%

The shader stats mostly don't look like an improvement :

DG2 shader stats:

  Blackops 3:
  Totals from 265 (16.44% of 1612) affected shaders:
  Instrs: 109055 -> 109080 (+0.02%); split: -0.01%, +0.04%
  Cycle count: 6166549 -> 6021371 (-2.35%); split: -2.53%, +0.17%

  Cyberpunk 2077:
  Totals from 297 (23.50% of 1264) affected shaders:
  Instrs: 197305 -> 197297 (-0.00%); split: -0.03%, +0.02%
  Cycle count: 3374325 -> 3356562 (-0.53%); split: -1.23%, +0.70%

  Fortnite:
  Totals from 2090 (27.97% of 7471) affected shaders:
  Instrs: 1777944 -> 1781070 (+0.18%); split: -0.01%, +0.18%
  Cycle count: 25188758 -> 25162910 (-0.10%); split: -0.86%, +0.76%
  Spill count: 1439 -> 1729 (+20.15%); split: -0.69%, +20.85%
  Fill count: 1226 -> 1395 (+13.78%); split: -0.82%, +14.60%
  Scratch Memory Size: 122880 -> 138240 (+12.50%); split: -1.67%, +14.17%

  Hitman 3:
  Totals from 490 (9.09% of 5392) affected shaders:
  Instrs: 407489 -> 407486 (-0.00%); split: -0.00%, +0.00%
  Cycle count: 1831149 -> 1831890 (+0.04%); split: -0.33%, +0.38%

  Metro Exodus:
  Totals from 4169 (9.68% of 43076) affected shaders:
  Instrs: 817730 -> 817726 (-0.00%); split: -0.00%, +0.00%
  Cycle count: 4646954 -> 4641559 (-0.12%); split: -0.61%, +0.50%

Xe2 shader stats :

  Blackops 3:
  Totals from 283 (19.46% of 1454) affected shaders:
  Cycle count: 7662980 -> 7916316 (+3.31%); split: -0.38%, +3.69%

  Cyberpunk 2077:
  Totals from 329 (26.79% of 1228) affected shaders:
  Instrs: 203312 -> 203327 (+0.01%); split: -0.01%, +0.02%
  Cycle count: 4415812 -> 4434906 (+0.43%); split: -0.69%, +1.12%

  Fortnite:
  Totals from 1981 (30.18% of 6565) affected shaders:
  Instrs: 1709583 -> 1711379 (+0.11%); split: -0.00%, +0.11%
  Cycle count: 26882682 -> 26914014 (+0.12%); split: -0.66%, +0.78%
  Spill count: 863 -> 1020 (+18.19%)
  Fill count: 1195 -> 1271 (+6.36%)
  Scratch Memory Size: 116736 -> 122880 (+5.26%)

  Hitman 3:
  Totals from 540 (10.56% of 5115) affected shaders:
  Instrs: 478993 -> 478994 (+0.00%)
  Cycle count: 3198740 -> 3198416 (-0.01%); split: -0.27%, +0.26%

  Metro Exodus:
  Totals from 4554 (12.28% of 37071) affected shaders:
  Cycle count: 6460340 -> 6475666 (+0.24%); split: -0.38%, +0.62%

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
462d8e3fab anv: disable VF statistics for memcpy
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
ca66f22e90 blorp: emit 3DSTATE_VF
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
4f892ae4f7 brw: enable vertex fetching component packing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
9b8d75c95c brw: add a max HW vertices attribute limit
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
fae8d325a7 brw: update vulkan max attribute limit
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
bae9344baf brw: port vs input to lower_64bit_to_32_new
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
e9e4aa0f29 brw: remove nr_attribute_slots from vs_prog_data
It's not used outside of the compiler.

We add a new nr_attribute_regs which now seems useless but will be
useful in a later change.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
c00830083e brw: fix indentation
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
2a8dddb519 genxml: add convenience dwords for packing components
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
e40f47abd3 genxml: make component packing an array
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Eric R. Smith
c7fed8b053 panfrost: fix YUV center information for 422
It turns out that the change from CENTER_Y to CENTER_X for
422 YUV didn't actually happen until generation 14 of the
hardware, not generation 10 as some documents claimed. This
fixes the failing piglit tests ext_image_dma_buf_import-sample_yuv
associated with 422 formats (which apparently we aren't running on CI).

Fixes: 23aa784c
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33516>
2025-02-13 14:06:59 +00:00
Valentine Burley
2e48bcf064 ci/angle: Uprev ANGLE
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33513>
2025-02-13 13:21:10 +00:00
Valentine Burley
5eea8f6fe8 intel/ci: Fix manual rules for ANGLE jobs
Disable auto-retry for .intel-manual-rules to prevent unnecessary reruns
and switch ANGLE jobs from this rule to .anv-manual-rules, as there’s no
point in running anv-on-angle jobs on iris changes.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33513>
2025-02-13 13:21:09 +00:00
Valentine Burley
93569f3a8f ci/angle: Use lld-19 for linking ANGLE
This fixes the linking issues on newer ANGLE versions.

Fixes: 9707746b2d ("ci/lava: Build ANGLE for arm64")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33513>
2025-02-13 13:21:09 +00:00
Samuel Pitoiset
e977c6968f radv/meta: add radv_{copy,fill,update}_memory() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:48:09 +01:00
Samuel Pitoiset
7aa4c81744 radv: rename fill/copy memory helpers
memory seems more appropriate than buffer because they operate on VAs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:47:14 +01:00
Samuel Pitoiset
69bf2a13f8 radv/meta: inline copy_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:43:30 +01:00
Samuel Pitoiset
5684c1687c radv/meta: disable conditional rendering for fill/update buffer operations
These commands shouldn't be affected by conditional rendering, similar
to the copy buffer operation.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:43:30 +01:00
Samuel Pitoiset
5d6e4d3b25 radv/meta: remove the heuristic that prefers CP DMA for GTT BOs
This is actually slower on my side. Tested the copy_buffer/fill_buffer
benchmarks from crucible on NAVI31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:43:30 +01:00
Mary Guillemard
7881e48321 panvk: Switch JM clear queries to CLC
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32721>
2025-02-13 11:50:06 +00:00
Mary Guillemard
3ed5557baf panvk: Switch JM copy queries to CLC
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32721>
2025-02-13 11:50:06 +00:00
Alyssa Rosenzweig
c51a2e85d8 libcl/vk: add common query copy write routine
every VK driver ends up wanting this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32721>
2025-02-13 11:50:06 +00:00
Maíra Canal
db4d7a3032 v3dv: VK_EXT_acquire_drm_display doesn't require a DRM master fd
When using VK_EXT_acquire_drm_display, the Vulkan API user must provide
the DRM master fd that will be used. This operation is performed through
`vkAcquireDrmDisplayEXT()` in which `drmFd` will be assigned to
`wsi->fd` and will be used for privileged operations.

This means that, when we are creating the physical device, we need to
open a DRM primary node (as the specification states that "The provided
drmFd must correspond to the one owned by the physicalDevice."), but it
doesn't need to be the DRM master.

Therefore, when using VK_EXT_acquire_drm_display, keep the primary fd
open and don't check if the fd is the DRM master.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33096>
2025-02-13 11:28:42 +00:00
Daniel Schürmann
6395c6d6d1 nir/validate: validate divergence metadata
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:44 +00:00
Daniel Schürmann
bc810e98d4 nir/serialize: don't serialize divergence information
We don't serialize metadata.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:44 +00:00
Daniel Schürmann
63a656797b nir: only print divergence information if metadata is valid
This disables printing of vertex divergence as well as outdated
divergence information. Also remove info::divergence_analysis_run
and use nir_metadata_divergence instead.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:44 +00:00
Daniel Schürmann
1d6082bf56 nouveau: switch to nir_metadata_divergence
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
175c06e5cd intel: switch to nir_metadata_divergence
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
067478358f amd: switch to nir_metadata_divergence
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
86fd673ade nir: require nir_metadata_divergence if needed
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
01f2d494d0 nir: make divergence information metadata
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Rhys Perry
de4320d45d radeonsi: fix invalidation of metadata in si_nir_lower_abi
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Christian Gmeiner
e1cc8ffd5f etnaviv: isa: Add swizzle instruction
Based on observations of the generated assembly, this instruction appears to:
 - Swizzle the 8/16 component vector in src0 according to the pattern defined in src1.
 - Apply a enable mask from src2 to selectively modify elements.

I encountered this instruction while experimenting with _viv_asm and
packed types.

Here is one exmaple kernel:

kernel void k(global int* out, int a, int b) {
  _viv_char2_packed s;

  _viv_asm(MOV, s.x, s, a);
  _viv_asm(MOV, s.y, s, b);

  out[0] = s.x + s.y;
}

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33474>
2025-02-13 09:23:49 +00:00
Job Noorman
96887a5ec1 ir3/isa: fix (dis)asm of ldg.a/stg.a on a6xx
We currently assume the implicit offset shift is always 2. However, this
shift is actually based on the type, making sure the offset fields are
in units of the type size. The full offset calculation is as follows:

    ((SRC2<<SRC2_SHIFT) + OFF)<<TYPE_SHIFT

Where SRC2, SRC2_SHIFT, and OFF are instruction fields while TYPE_SHIFT
is implicit and derived from the TYPE field.

This commit implements (dis)assembly support for this, adopting the
syntax used by the blob.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33503>
2025-02-13 08:01:58 +00:00
Job Noorman
5a8193e657 ir3/parser: add helper to generate syntax errors based on gen
The assembly syntax of certain instructions differs significantly
between generations (e.g., ldg.a/stg.a) so it's useful to be able to
generate syntax error based on the generation we are assembling for.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33503>
2025-02-13 08:01:58 +00:00
Samuel Pitoiset
605f94520f radv: simplify determining VBO size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33506>
2025-02-13 08:35:21 +01:00
Timur Kristóf
89cc4d9807 nir: Remove struct keyword from nir.h where possible.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 23:20:15 +01:00
Timur Kristóf
99054350ec nir: Don't include u_format.h in nir.h, it's not actually used.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 23:20:15 +01:00
Timur Kristóf
76061b7fa3 nir: Don't include u_printf.h in nir.h, only where necessary.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 23:20:12 +01:00
Timur Kristóf
05df30f95a nir: Don't include bitscan.h in nir.h, it's not actually used.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
e75eeaf2bd nir: Don't include xxhash.h in nir.h, only where it is used.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
8260de6170 nvk: Don't include full nir.h in nvk_shader.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
64887de2af nak: Don't include full nir.h in nak.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
5fd809b195 ttn: Don't include full nir.h where not necessary.
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
e0107f4ffb zink: Don't include full nir.h where not necessary.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
b412e29027 hk: Don't include full nir.h in hk_shader.h
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/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
666f10c174 radv: Add missing includes and remove unnecessary NIR includes.
RADV won't compile without the added includes after we
stop including the full nir.h from the VK common functions.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
a91f105e5b ac: Don't include full nir.h anymore.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
147e17e999 aco: Don't include nir.h in aco_interface.h anymore.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
91c28f67e6 ac/nir: Move surface related NIR functions to separate file.
This is to stop including nir related stuff in places that
actually don't need that.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
305944def9 ac/nir: Don't include nir.h in headers anymore.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
480c7100d8 glsl: Don't include full nir.h where not necessary.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f0966f7ac8 vk: Don't include full nir.h in headers.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
23222346f3 spirv: Don't include full nir.h in nir_spirv.h
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
94996d546c nir: Don't include the full nir.h when not necessary.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
1ebe06f8f0 nir: Don't include full nir.h in nir_xfb_info.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
2385ac06fc nir: Move nir_shader_compiler_options to separate file.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
cccd3aa45c nir: Move nir_tcs_info to separate file.
The nir_tcs_info struct is like nir_xfb_info in the sense that
it's very specialized and not often used, so it deserves its own
header too.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
a6247319e7 nir: Move some enums and structs to nir_defines.h
These are necessary if we want to stop including the full nir.h
in most places accross the code base.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f699ceecc7 nir: Add forward declarations of relevant structs to nir_defines.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f1292bd03e nir: Add missing extern "C" to nir_defines.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f4c80b419f nir: Add struct names where they were missing.
This will allow forward declaring these in a subsequent commit.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
c58c9e0359 util/enum_operators: Don't define anything for OpenCL
This file is going to be included in some headers that are shared
between normal C++ and OpenCL. And sadly OpenCL can't handle this.

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/33439>
2025-02-12 22:33:06 +01:00
Connor Abbott
a724e1571f tu: Implement "absolute" bin mask on a750
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
faafcdf0be freedreno: Add a750+ "absolute" VSC bin mask
This will let us avoid some corner cases where bin merging isn't
possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
3fdaad0948 tu: Implement bin merging for fragment density map
This will let us merge compatible bins with a larger-than-1 fragment
area, reducing tile load/store overhead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
ab79e0de82 freedreno: Add VSC mask parameter to CP_SET_BIN_DATA5
This was added on a730, and specifies a mask of extra bins to include.
It's used to implement bin merging, creating larger bins out of
compatible smaller bins.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
b1756665a6 tu: Refactor fragment density map sampling
For bin merging, we will have to first sample all bins in the pipe, then
determine which bins can be merged, then iterate over bins. Combine all
of the information required to render a bin into a tu_tile_config struct
and pass it down to tu6_emit_tile_select(). This will let us more
flexibly construct a list of bins later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
469ba3a07b tu: Constify frag_areas argument of tu_fdm_bin_apply_t
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:33 +00:00
Eric Engestrom
e41438275e ci: debian-testing-ubsan is used by tests
Fixes: 37ee035e42 ("ci/build: add ubsan build jobs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33509>
2025-02-12 17:19:45 +00:00
Martin Roukala (né Peres)
dc7660d852 zink/ci: document more GA106 flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
3c370aa572 zink/ci: document more radv flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
c70a2526de radv/ci: document more flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
8097c002d1 radv/ci: set a tight timeout on vkcts-navi31
These jobs need to run in pre-merge, so let's make sure their execution
time remains in check so as not to block merges due to non-merge
pipelines.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
7f75ad546d radv/ci: reduce Renoir concurrency in vkcts
Deqp randomly dies at the beginning of VKCTS, which fails most
pipelines.

Reducing the job concurrency fixes the issue, so let's roll with that
until I go buy more RAM for this machine.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
82a41bb8e3 radv/ci: add testing on RAPHAEL
This is the RDNA2 iGPU integrated in all the 7000 series of AMD CPU.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Eric Engestrom
c56835e470 docs: update calendar for 25.0.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33515>
2025-02-12 16:39:27 +00:00
Mary Guillemard
154c7b0d23 pan/bi: Fix scratch access optimization
This was causing a crash on
"dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp" where the
test was trying to allocate ~6GB of TLS.

Considering we were already doing something identical before those changes,
we can just add nir_lower_scratch_to_var before nir_lower_vars_to_scratch
to get the expected behavior (Cleaning LLVM spilling mess around pan_pack)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 1619fc596a ("bi: Optimize scratch access")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33510>
2025-02-12 17:02:32 +01:00
Eric Engestrom
55bd96d038 ci: rename generate-env.sh to export-gitlab-job-env-for-dut.sh
This makes it clearer what this script does.

Reviewed-by: Vignesh Raman <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33037>
2025-02-12 14:25:30 +00:00
Eric Engestrom
49a04bb41e ci: finish sorting vars
A few stragglers were slightly out of place, and a couple (S3 & LVP)
were completely off.

Reviewed-by: Vignesh Raman <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33037>
2025-02-12 14:25:30 +00:00
Eric Engestrom
7b018945e8 ci/yaml-toml-shell-py-test: run on direct push pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33412>
2025-02-12 13:36:13 +00:00
Eric Engestrom
c8ad134d46 ci/yaml-toml-shell-py-test: don't run on post-merge pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33412>
2025-02-12 13:36:13 +00:00
Iago Toral Quiroga
45f9208cca v3dv: improve handling of trailing barriers
When a command buffer ends with pending barriers we were emitting a
serialized noop job, but this only works to ensure serialization of
follow-up CL jobs, it won't do what we want if the barrier was
intended for compute or TFU transfers for example. Fix this by
merging the barrier state into follow-up jobs in the same queue
submission.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33507>
2025-02-12 13:15:12 +00:00
Iago Toral Quiroga
c6264c641d v3dv: make cmd_buffer_serialize_job_if_needed take a barrier state
Instead of the cmd_buffer. Also, rename it to drop the cmd_buffer
reference, make it a public helper, make it accumulate the
barrier state instead of overwriting it and make it return whether
it actually applies a barrier into the job.

We will use this new public helper in a follow-up change from the
queue to better handle barriers at the end of a command buffer.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33507>
2025-02-12 13:15:12 +00:00
Iago Toral Quiroga
71b711ad82 v3dv: rename v3dv_cmd_buffer_merge_barrier_state
This helper doesn't use a command buffer, so drop that from the name.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33507>
2025-02-12 13:15:12 +00:00
Timur Kristóf
df0798a40c radv: Add missing copyright info to radv_meta_buffer.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
6b57cc2fbf radv: Rename get_global_ids to radv_meta_nir_get_global_ids.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
09db738c9a radv: Move NIR specific function declarations to radv_meta_nir.h
Also rename some functions for consistency with other functions,
and slightly change the includes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
f6a02d034b radv: Move NIR helpers from radv_meta.c to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
c093b03213 radv: Move resolve NIR fs to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
b360474821 radv: Move resolve NIR fragment shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
16f6123c1e radv: Move resolve NIR compute shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
538c391022 radv: Move FMASK expand NIR shader to radv_nir_meta.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
dccf698e1b radv: Move FMASK copy NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
6ceafe2afa radv: Move DCC decompress NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
b6eb2f52ce radv: Move expand depth stencil NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
4837d1c457 radv: Move DCC retile NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
113c8d0e77 radv: Move VRS HTILE copy NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
ea182f797a radv: Move clear NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
59517d9aa6 radv: Move buffer-image copy and clear NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
1c3585021c radv: Move blit2d NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
f599a2e435 radv: Move blit NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
c8842d19ed radv: Move buffer related NIR meta shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Danylo Piliaiev
85b5eec159 tu: Add info about debug options to command buffer tracepoint
That way it's much easier to understand which debug options
are applied to specific process.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:31 +00:00
Danylo Piliaiev
d9f054320a tu: Add gmem disable reason to renderpass tracepoint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:31 +00:00
Danylo Piliaiev
5c87616d96 util: Add dump_debug_control_string to dump debug_control
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:30 +00:00
Danylo Piliaiev
0886eda4f1 util: Make debug_dump_flags thread safe
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:30 +00:00
Zan Dobersek
30a3d567c8 tu/a750: invalidate vertex state before CP_DRAW_INDIRECT_MULTI
For devices that load shader consts through preamble, HLSQ_INVALIDATE_CMD
should be used to invalidate VS state before CP_DRAW_INDIRECT_MULTI. This
avoids previous consts loaded through CP_LOAD_STATE6_GEOM for non-indirect
draws to affect the consts needed for the current indirect draw.

Fixes two failing vkd3d-proton test cases on a750:
  test_vertex_id_dxbc
  test_vertex_id_dxil

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32924>
2025-02-12 10:30:50 +00:00
Mel Henning
f887ae2f3c driconf: force_vk_vendor on Deep Rock Galactic+NVK
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33502>
2025-02-12 09:54:29 +00:00
Valentine Burley
ffdfb0539b ci/android: Add build section for Cuttlefish
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Valentine Burley
9707746b2d ci/lava: Build ANGLE for arm64
We're going to introduce arm64 ANGLE jobs shortly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Valentine Burley
05021a1786 ci/angle: Rework building ANGLE (again)
Make setting the ANGLE_ARCH variable optional by providing a default
based on DEBIAN_ARCH, while keeping it possible to override it, which is
expected to be necessary for the Android-arm64 build.

Exclude unnecessary third party dependencies in the .gclient file, which
allows us to delete our first local patch. Thanks to Yuly Novikov for the
suggestion.

Use -no-history for gclient sync, which is equivalent to git's --depth=1
argument. This greatly speeds up the process of fetching sources.

Thanks to this speedup fetching third_party/catapult is no longer an
issue, allowing us to remove our second local patch.

Since we're no longer applying local patches, use ANGLE_REV and
/angle/version as the base for our version check on Android.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Daniel Stone
f535d5d591 ci/angle: Use native toolchain for builds
ANGLE really wants to use its own toolchain and sysroot by default.
Unfortunately, for AArch64, that toolchain is actually a cross-compiling
toolchain designed to be hosted on x64, which is ... not what we want.

Use the system toolchain, and since we're not using the bundled
compiler, also don't use LLVM's libc++ and abseil, since those don't
always work with the system toolchain.

v2 (Valentine)
 * Only use native toolchain on linux
 * Contain clang-19 environment variables within a subshell

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Samuel Pitoiset
4306831a4a radv: use BDA for the uploaded parameters with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33493>
2025-02-12 08:02:30 +00:00
Samuel Pitoiset
990244f7e2 radv/meta: use BDA for copying VRS rates to HTILE
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33493>
2025-02-12 08:02:30 +00:00
Samuel Pitoiset
e3cd101c17 radv/meta: use BDA for clear HTILE mask
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33493>
2025-02-12 08:02:30 +00:00
Samuel Pitoiset
13e987669c radv/video: fix missing image offset when computing VA
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33496>
2025-02-12 07:38:29 +00:00
Eric Engestrom
b08f9a2dbd ci: run containers builds on staging branches
Fixes: 7152f343d6 ("ci: only trigger the CI for release managers when pushing to staging branch")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33468>
2025-02-12 07:06:02 +00:00
Job Noorman
c6a932d4b3 ir3/ra: handle phis with preferred regs first
Handle phis in two groups: first those which already have a preferred
reg set and then those without. The second group should be rare but by
handling them last, they don't accidentally occupy a preferred reg of
another phi, preventing excessive copying in some cases.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33489>
2025-02-12 06:38:30 +00:00
Job Noorman
922bfe4b6e ir3: add braces around complex if/else block
Will need to add code to one of the blocks in the next commit.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33489>
2025-02-12 06:38:30 +00:00
Sagar Ghuge
2e0d5ccd91 intel/compiler: Drop primitive leaf desc load code
Looks like we are not using the primitive leaf desc loading code part at
all. Let's just drop it.

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/33497>
2025-02-12 05:23:05 +00:00
Mike Blumenkrantz
52dfe1e955 zink: never try to oom flush during unsync texture upload
this is very broken

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33484>
2025-02-12 02:35:45 +00:00
Mike Blumenkrantz
2304078261 zink: only enable unsynchronized_texture_subdata with HIC
this is otherwise useless

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33484>
2025-02-12 02:35:45 +00:00
Michael Cheng
873ad6b6d5 anv: Fix missing Perfetto trace for as build
The as_build and related functions only appear when MESA_GPU_TRACES=
perfetto is set. By default, when running an RT workload for profiling,
these traces should be recorded alongside other trace points. This
commit ensures that acceleration structure build events are properly
captured when running an RT workload.

v2(Michael Cheng): Move this logic up to anv_device_init_accel_struct_build_state

v3(Michael Cheng): Set emit_markers = true and let the generated
functions handle the check for u_trace_enable and intel_gpu_tracepoint

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33461>
2025-02-12 00:13:39 +00:00
David Rosca
441252e9e1 radeonsi/uvd: Set correct chroma format for H264 decode
Fixes decoding monochrome (chroma_format_idc = 0).

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
2025-02-11 23:38:26 +00:00
David Rosca
110d406302 radeonsi/vcn: Set correct chroma format for H264 decode
Fixes decoding monochrome (chroma_format_idc = 0).

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
2025-02-11 23:38:26 +00:00
David Rosca
c28702c35a frontends/vdpau: Set H264 chroma_format_idc
We don't get the actual value from VDPAU, so hardcode to 4:2:0.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
2025-02-11 23:38:26 +00:00
Rhys Perry
d946a753e3 aco/ra: unconditionally call undo_renames
There's no real reason to not do this more.

fossil-db (navi21):
Totals from 2615 (3.29% of 79377) affected shaders:
Instrs: 4729505 -> 4729484 (-0.00%); split: -0.00%, +0.00%
CodeSize: 25210992 -> 25210036 (-0.00%); split: -0.00%, +0.00%
Latency: 31572966 -> 31572435 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 6918552 -> 6918560 (+0.00%); split: -0.00%, +0.00%
VClause: 132152 -> 132116 (-0.03%); split: -0.03%, +0.00%
SClause: 98595 -> 98575 (-0.02%); split: -0.04%, +0.02%

fossil-db (polaris10):
Totals from 1039 (1.68% of 61794) affected shaders:
Instrs: 708761 -> 708766 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3588772 -> 3588792 (+0.00%); split: -0.00%, +0.00%
Latency: 7458892 -> 7459513 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 3494669 -> 3494722 (+0.00%); split: -0.00%, +0.00%
VClause: 16754 -> 16737 (-0.10%)
SClause: 18190 -> 18156 (-0.19%); split: -0.49%, +0.31%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33444>
2025-02-11 23:10:37 +00:00
Rhys Perry
b94b4188a6 aco/ra: reverse renaming of operands outside update_renames
This lets us remove some special casing from update_renames and make it
simpler. Doing this in update_renames was also fragile, since the
parallelcopies vector is not final when update_renames is called, so it
might not have been safe to do so in the end.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33444>
2025-02-11 23:10:37 +00:00
Rhys Perry
ebc7355962 aco: validate operands fixed to definitions
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33444>
2025-02-11 23:10:37 +00:00
Lionel Landwerlin
4864c0a5fc anv,driconf: Add sampler coordinate precision workaround for Dynasty Warriors
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12584
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33488>
2025-02-11 22:33:24 +00:00
Lionel Landwerlin
57efd752fb anv: support protected surfaces with display platform
Because our buffer are flagged as protected at the GEM level, we can
just passed them to the display driver and it'll do the right thing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
2025-02-11 22:03:09 +00:00
Lionel Landwerlin
53762e75e8 vulkan: allow support for protected surfaces
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
2025-02-11 22:03:09 +00:00
Lionel Landwerlin
e722665d65 vulkan/wsi: propagate protected swapchain to images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
2025-02-11 22:03:09 +00:00
Christian Gmeiner
513ba040fc docs: Add perfetto driver specifics for V3D
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33348>
2025-02-11 21:01:40 +00:00
Christian Gmeiner
9b6525809e docs: Update the list of drivers with CPU tracepoints
Turnip has supported this feature for some time, and v3dv recently added support.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33348>
2025-02-11 21:01:40 +00:00
Christian Gmeiner
5880a4bb55 docs: Update perfetto with the latest status
v3dv supports PPS counters.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33348>
2025-02-11 21:01:40 +00:00
Juan A. Suarez Romero
68db5481f4 v3dv/ci: disable rpi5 job
It seems we have some issue with the driver, due the high number of
(random) flakes that appear in different jobs, and that eventually are
causing issues with Marge.

While we don't identify where is the problem, let's disable the job to
avoid interferences with Marge.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33490>
2025-02-11 18:54:05 +00:00
Boris Brezillon
4ae12cc6ff panvk: Initialize device virtual address space after the VM creation
Make sure we're not lacking a lock/heap destroy when we fail to
create the VM.

Fixes: 53fb1d99ca ("panvk: Transition to explicit VA assignment on v10+")
Reported-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33471>
2025-02-11 18:26:31 +00:00
Boris Brezillon
5f3c6a0f27 panvk/csf: Don't free the resources twice when init_render_desc_ringbuf() fails
init_queue() calls cleanup_queue() if anything fails in the middle, which
means finish_render_desc_ringbuf() will be automatically called if
init_render_desc_ringbuf() failed. Get rid of the the error path and
return directly instead. The one exception we have is the dev_addr
allocation, which needs to be explicitly freed if an error occurs between
util_vma_heap_alloc() and pan_kmod_vm_bind().

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33471>
2025-02-11 18:26:31 +00:00
Faith Ekstrand
a4f3ec207d nak/repair_ssa: Use a worklist for get_ssa_or_phi()
Between Rust's love of the stack, the size of Rust objects, and the
number of parameters we have to pass in order to sort out lifetime
issues, Rust recursion can be quite expensive.  Combine that witn
Windows' tiny stack sizes and this call is blowing out the stack on
games running on DXVK and VKD3D-Proton.  This gets rid of this bit of
recursion and replaces it with a loop and a worklist.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33472>
2025-02-11 18:06:03 +00:00
Faith Ekstrand
dc82d7edff nvk: Fix a typo in a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33478>
2025-02-11 17:35:29 +00:00
Faith Ekstrand
6f64962f27 nvk: Fix scissor bounds
This code is old, copied from the old nouveau GL driver.  As of Pascal,
we have have 32k images so we need 32k scissors as well.  Use the
max_image_dimension() helper instead of hard-coding it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33478>
2025-02-11 17:35:29 +00:00
David Rosca
18f0807408 radeonsi/video: Fix creating video buffers with AMD_DEBUG=tmz
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:21 +00:00
David Rosca
b241a24724 radeonsi/vcn: Use texture instead of video buffer for DPB buffers
Video buffer would be allocated encrypted with AMD_DEBUG=tmz.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:21 +00:00
David Rosca
fcec81363e frontends/va: Switch to graphics context when creating protected surface
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:20 +00:00
David Rosca
62919ef9d0 frontends/va: Require protected context for VAProtectedSliceDataBuffer
Instead of switching the protected playback flag on when processing
first VAProtectedSliceDataBuffer, require the context to be created as
protected.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:20 +00:00
David Rosca
33c47da3fe frontends/va: Add CreateContext flag to enable protected context
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:19 +00:00
David Rosca
f83faf83e7 frontends/va: Don't try to switch to protected buffer in EndPicture
It doesn't work because the buffer was already allocated in BeginPicture.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:19 +00:00
David Rosca
fdf747af3a radeonsi/video: Avoid stream handle duplicates in PID namespace
Add current time when generating the stream handle initial value.

When running inside PID namespace there can be multiple processes
in the system that will share the same PID and with current code
this could result in the same stream handle being used at the same
time from different processes.

This can easily happen with Flatpak when running two instances of the
same application - both processes will have the same PID and we
will use the same stream handles.

For older UVDs kernel will reject the CS if we use duplicated handles.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12575
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33374>
2025-02-11 15:34:33 +00:00
Samuel Pitoiset
8df1ffaa78 radv: use radv_buffer::addr more
And remove radv_buffer:offset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
d92153e998 radv: compute radv_buffer::addr at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
e7e43f1437 radv: rename radv_buffer::bo_va to addr
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
f70af40c5d radv: pass addr to radv_copy_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
228903aeaf radv/rmv: pass addr to log_resource_bind_locked()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
1d58343b43 radv/video: pass addr to send_cmd()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
4987926e61 radv: remove unused device memory init/finish helpers
Also zero-allocate the vulkan object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
06ac711b06 radv/meta: simplify creating buffers for R32G32B32 operations
Not necessary to allocate things.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
1130478e5d radv/meta: compute the destination addr earlier for query resolves
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
230affd52b radv/meta: use BDA for query resolves
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Dmitry Baryshkov
6f3062dffa meson: add freedreno (turnip) Vulkan to arm64 defaults
On Aarch64 enable freedreno Vulkan driver (turnip) by default. It is
stable enough to be enabled by default on the relevant platform.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33462>
2025-02-11 14:35:16 +00:00
Georg Lehmann
f921b42c8c nir/print: print large floats as mantissa + exponent
This is silly:
con 64    %18698 = load_const (0xf0f0f0f0f0f0f0f0 = -107730874267432137203343331820822035577514310242782965586097631855966576162301880634213986293205127792322062538351156704152182839736964151026851280176102232488321269248467172131803507875122376996725092200401040958124190100858265776685056.000000 = -1085102592571150096 = 17361641481138401520)

This is better:
con 64    %18698 = load_const (0xf0f0f0f0f0f0f0f0 = -1.077309e+236 = -1085102592571150096 = 17361641481138401520)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33456>
2025-02-11 13:49:05 +00:00
Valentine Burley
6b0ba1109a zink/ci: Rename a618 suite and expectation files
Match the other zink files, including zink-tu-a630 and zink-tu-a750.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33466>
2025-02-11 13:12:33 +00:00
Valentine Burley
b90f5f305a freedreno/ci: Unify naming for a306 jobs
The a306 jobs were using files named a307 due to Qualcomm's confusing
naming scheme. While the GPUId for this GPU is 307, its marketing name
is Adreno 306.

To avoid confusion, align CI job naming with the marketing name rather
than the GPUId.

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

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33466>
2025-02-11 13:12:33 +00:00
Mary Guillemard
98ea66eca8 ci: Enable mesa-clc and precomp-compiler on debian-arm32
panfrost requires those options.

Because we have LLVM on the host, we can build their requirement there
and source them from the system in the cross compilation part.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
63ede11492 ci: Transition to precomp-compiler
Panfrost now requires this options.
We set it on everything that does cross compilation except debian-x86_32
and debian-android (those don't have libdrm on the host side)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Daniel Stone
09c38c14ef ci: Build libdrm for Android host builds
Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
6438b3e2bd panfrost,panvk: Wire printf and abort support
Those are quite useful for debugging and having sanity checks in place.
It is also quite tidious to get ride of all asserts in every headers we
would ever want to use, lets just accept those now.

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/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
8adede1d44 panfrost: Implement precomp dispatch on Gallium
This handle JM and CSF but exclude Midgard.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
cc02c5deb4 panvk: Implement precomp dispatch
Implement dispatching of precompilled OpenCL C shaders in panvk.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
ab03752c4f panvk: Expose calculate_task_axis_and_increment on CSF
Going to be used by precomp.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
005703e5b5 panvk: Move TLS preparation logic to cmd_dispatch_prepare_tls
This will be reused for precomp.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
3d2cc01f8a panvk: Add create_shader_from_binary
This allows creation of a panvk_shader from raw binary.
This will be used by precomp shaders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
e67b146b03 panfrost: Integrate libpan in gallium driver
This allows to call libpan OpenCL C functions inside NIR builders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
f200747d13 panvk: Integrate libpan
This allows to call libpan OpenCL C functions inside NIR builders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
1619fc596a bi: Optimize scratch access
Follow AGX on this, LLVM cause quite a mess with pan_pack and create
uneeded spilling.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
20970bcd96 panfrost: Add base of OpenCL C infrastructure
This allows compiling CL shaders into a single SPIR-V library per arch,
NIR call bindings for each functions and precompilled binaries for each
entrypoints.

We are only going to support Bifrost and Valhall for this.

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/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
410e5a36ec pan/genxml: Rework gen_pack.py to support OpenCL
This changes the codegen to make it compatible with CL C.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
97abab160b pan/genxml: Stop using "constant" for struct fields in xml defs
This conflict with OpenCL keyword "constant".

Thankfully we only have two occurance of this on each xml so this is a
small change.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Danylo Piliaiev
21ec1cdea9 u_trace: print tracepoint params in csv output
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30589>
2025-02-11 12:00:18 +00:00
Caio Oliveira
ace5daabbd intel/compiler: Use -Werror=vla
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32965>
2025-02-11 11:25:48 +00:00
Patrick Lerda
bb44052ee9 r600: fix r600_init_shader_caps() has_atomics issue
Indeed, has_atomics is not yet initialized at the time of the
call of r600_init_shader_caps(). This change fixes this issue.

For instance, this issue is triggered with
"piglit/bin/clearbuffer-depth-cs-probe -auto -fbo":
clearbuffer-depth-cs-probe: ../src/gallium/drivers/r600/evergreen_state.c:5039: evergreen_emit_atomic_buffer_setup: Assertion `resource' failed.
Aborted

Fixes: 7cd606f01b ("r600: add r600_init_screen_caps")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33438>
2025-02-11 10:56:22 +00:00
liuqiang
c317778c67 intel/brw: Remove redundant condition in components_read()
DATA1 will be handled by the case reached in the fallthrough.

Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31782>
2025-02-11 10:33:42 +00:00
Caio Oliveira
ff44f4d278 intel/brw: Update outdated comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
5c55b29d1a intel/brw: Rename a few remaining functions to remove fs prefix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
c83ddaaa26 intel/brw: Rename fs_copy_prop_dataflow to brw_copy_prop_dataflow
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
cf3bb77224 intel/brw: Rename fs_visitor to brw_shader
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
352a63122f intel/brw: Rename files brw_fs.cpp/h to brw_shader.cpp/h
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
6b471e4e26 intel/brw: Merge brw_fs_visitor.cpp into brw_fs.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
f8a979466b intel/brw: Rename and move thread_payload types to own header
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Ian Romanick
1d485cc84f brw/copy: Allow constant propagation of some 64-bit integers
ADD, ASR, SHL, and SHR can mix D or UD sources with Q or UQ sources on
Gfx20. If the constant will fit in 32-bits, the type is changed so the
propagation can occur.

No shader-db changes on any Intel platform. No fossil-db changes on
any Intel platform other than Lunar Lake.

Lunar Lake
Totals:
Instrs: 210778940 -> 209472782 (-0.62%); split: -0.63%, +0.01%
Subgroup size: 14226752 -> 14227232 (+0.00%)
Cycle count: 30614834794 -> 30573250444 (-0.14%); split: -0.26%, +0.12%
Spill count: 507788 -> 504153 (-0.72%); split: -1.17%, +0.45%
Fill count: 622824 -> 613848 (-1.44%); split: -1.96%, +0.52%
Scratch Memory Size: 35826688 -> 35309568 (-1.44%); split: -1.67%, +0.23%
Max live registers: 65506213 -> 65434861 (-0.11%)

Totals from 126699 (17.93% of 706470) affected shaders:
Instrs: 63615321 -> 62309163 (-2.05%); split: -2.09%, +0.04%
Subgroup size: 2618160 -> 2618640 (+0.02%)
Cycle count: 3141888676 -> 3100304326 (-1.32%); split: -2.52%, +1.19%
Spill count: 454315 -> 450680 (-0.80%); split: -1.31%, +0.51%
Fill count: 533584 -> 524608 (-1.68%); split: -2.29%, +0.61%
Scratch Memory Size: 32182272 -> 31665152 (-1.61%); split: -1.86%, +0.26%
Max live registers: 14773917 -> 14702565 (-0.48%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
2025-02-11 08:44:33 +00:00
Ian Romanick
6d594196a6 brw/copy: Use extract_imm in try_constant_propagate_value
This is just a small refactor.

Originally there was an extra commit on top of this. That commit didn't
help generated code quality, so it was dropped.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
2025-02-11 08:44:33 +00:00
Ian Romanick
ac4b93571c brw/copy: Fix handling of offset in extract_imm
The offset is measured in bytes. Some of the code here acted as though
it were measured in src.type units. Also modify the assertion to check
that all extracted bits come from data in the immediate value.

Fixes: 580e1c592d ("intel/brw: Introduce a new SSA-based copy propagation pass")
Fixes: da395e6985 ("intel/brw: Fix extract_imm for subregion reads of 64-bit immediates")

Yes, I missed this error *twice* in code review.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
2025-02-11 08:44:33 +00:00
Saroj Kumar
57d47f717a mesa: Add GL_EXT_protected_textures support
Add support for GL_EXT_protected_textures to create protected
texture in OpenGL ES 3.2. This enables allocating standard
GL textures as protected surfaces. This allows use-cases such
as depth, stencil, or mipmapped textures to be supported as
destinations for rendering within a protected context.

Signed-off-by: Saroj Kumar <saroj.kumar@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33358>
2025-02-11 08:14:03 +00:00
Alyssa Rosenzweig
124a2b612d nir: mark a few more subgroup ops
this is a behaviour change, but should be either a no-op or a bug fix.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
cbd234e724 nir/opt_move_discards_to_top: use semantic
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
edb0164623 nir/gather_info: use subgroup/quadgroup flags
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
b9ce851b6c nir: mark subgroup/quadgroup ops
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
7168f9a4f3 nir: switch intrinsic semantics to BIT
Timur suggested.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
09510ec910 nir: add nir_intrinsic_has_semantic helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Yiwei Zhang
d0e02df3a6 venus: emulate a second graphics queue on Android
Starting from Android 14 (Android U), framework HWUI has required a
second graphics queue to avoid racing between webview and skiavk. For
non-Android, we leave the second queue emulation behind a debug option.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30985>
2025-02-11 06:07:24 +00:00
Yiwei Zhang
d92f9c3d51 venus: use dedicated allocation for ANB image memory import
On most platforms, deidcated allocation is preferred for the dma-buf
import done by Venus. In special cases, this is required but missed so
far.

Cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33434>
2025-02-11 05:52:35 +00:00
Yiwei Zhang
1d668233ba venus: enable VK_EXT_external_memory_acquire_unmodified if needed
When used internally, we have to conditionally enable it behind the app.

Fixes: 969cb02de7 ("venus: chain VkExternalMemoryAcquireUnmodifiedEXT for wsi ownership transfers")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33419>
2025-02-11 05:38:08 +00:00
Giovanni Mascellani
6b2b74a894 lvp: Remove some dead code.
It seems that last reference to that helper was removed in
97ebe52ee3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33465>
2025-02-10 17:43:38 +00:00
Rhys Perry
3a1d79bdec nir/validate: assert that if condition dominates use
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
b4c5403413 nir: add NIR_DEBUG=invalidate_metadata
This invalidates metadata before passes to try and find passes which don't
properly require metadata that they use.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
e04c0025ef nir: add NIR_DEBUG=extended_validation
This runs validation even if the pass makes no progress. It also requires
all kinds of metadata before the pass to test whether it correctly
preserves or invalidates them.

It's disabled by default because it can be extremely slow.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
ecd122ddb8 radv/rt: correctly preserve metadata in move_rt_instructions
This should invalidate nir_metadata_live_defs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
0a04200ba7 nir/linking_helpers: invalidate metadata in nir_link_opt_varyings
nir_instr_insert and nir_def_init invalidate nir_metadata_instr_index and
nir_metadata_live_defs, but not nir_metadata_loop_analysis

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
ebf8e072b4 nir/find_array_copies: invalidate nir_metadata_instr_index
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
422e3e1249 nir/lower_io_arrays_to_elements: invalidate metadata
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
b5a9ab90d2 nir/opt_move: invalidate nir_metadata_instr_index
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
f42b72a08f nir/use_dominance: invalidate nir_metadata_instr_index
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Juan A. Suarez Romero
8720894494 v3dv: take into account GS when enabling line smooth
Line smoothing should only be enabled for line primitives.

So far we were only checking the pipeline topology, but this is not
enough if there is a geometry shader, as it can change the primitive
from line to anything else, or the other way around.

This fixes several failures in
dEQP-VK.draw.renderpass.non_line_with_params.*.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33395>
2025-02-10 13:27:42 +00:00
Iago Toral Quiroga
daa48cbaef v3dv: fix crash on 32-bit builds
Command buffer private object destroy callbacks receive a 64-integer so their
signature should respect that to avoid alignment issues when passing pointers.
This is the same we were already doing for color pipelines, but now for D/S
pipelines too.

Fixes crash on 32-bit build with:
dEQP-VK.synchronization2.op.single_queue.fence.write_clear_attachments_read_copy_image_to_buffer.image_128x128_d16_unorm

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33463>
2025-02-10 12:42:54 +00:00
Tapani Pälli
c5cad407f8 anv: handle non-wsi images in anv_layout_to_aux_state
Transition to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR with non-wsi image was
seen with gfxrecon-replay case that ends up hitting weird assertions
later.

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/33027>
2025-02-10 10:31:33 +00:00
Qiang Yu
ee9edd4625 radeonsi: fix GravityMark corruption when use aco
aco may use smem load for ssbo when possible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12518
Cc: mesa-stable
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
2025-02-10 02:06:56 +00:00
Qiang Yu
cc62a75a17 radeonsi,util: add more usage for AMD_FORCE_SHADER_USE_ACO
To be able to change a bunch of shaders to use aco. Used to
find problem shader when use aco quickly instead of one by
one when too many shaders.

Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
2025-02-10 02:06:55 +00:00
Qiang Yu
c805ea6792 radeonsi: fix has_non_uniform_tex_access info
Fixes: f859436b55 ("radeonsi: add has_non_uniform_tex_access shader info")
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
2025-02-10 02:06:55 +00:00
Patrick Nicolas
9ef01a0f98 radv/video: Add low latency encoding
When VkVideoEncodeUsageInfoKHR has a tuningMode of
VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR or
VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR, request low latency
mode for the encoder.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11958
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32862>
2025-02-09 21:57:33 +00:00
Erik Faye-Lund
6652eb0ec3 meson: rename meson_options.txt
The proper name for the meson options changed to meson.options in Meson
1.1. Since we don't support older versions of Meson anyway, let's just
rename the options-file to the new name.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33445>
2025-02-09 08:13:27 +00:00
Georg Lehmann
fd77cc7c32 ac/nir/lower_ps: move exports after packing alu
If ACO's wqm section ends just before the first export, this mixing alu and
exports means the alu in question can't be reordered as much by the ILP
scheduler.

Foz-DB Navi31:
Totals from 8959 (11.31% of 79188) affected shaders:
Instrs: 5977212 -> 5978494 (+0.02%); split: -0.02%, +0.04%
CodeSize: 32982732 -> 32987876 (+0.02%); split: -0.01%, +0.03%
Latency: 35218073 -> 35216277 (-0.01%); split: -0.02%, +0.02%
InvThroughput: 5149751 -> 5149696 (-0.00%); split: -0.00%, +0.00%
SClause: 220552 -> 220551 (-0.00%); split: -0.01%, +0.01%
PreVGPRs: 313203 -> 313069 (-0.04%); split: -0.06%, +0.01%

Foz-DB Navi21:
Totals from 8895 (11.21% of 79377) affected shaders:
MaxWaves: 219280 -> 219272 (-0.00%); split: +0.00%, -0.01%
Instrs: 5393330 -> 5393366 (+0.00%); split: -0.00%, +0.00%
CodeSize: 29921900 -> 29922024 (+0.00%); split: -0.00%, +0.00%
VGPRs: 406664 -> 406688 (+0.01%); split: -0.00%, +0.01%
Latency: 35653975 -> 35652220 (-0.00%); split: -0.02%, +0.02%
InvThroughput: 7992134 -> 7992032 (-0.00%); split: -0.00%, +0.00%
SClause: 223784 -> 223786 (+0.00%)
Copies: 370984 -> 370983 (-0.00%)
PreVGPRs: 314323 -> 314330 (+0.00%); split: -0.01%, +0.01%
VALU: 3800023 -> 3800022 (-0.00%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33417>
2025-02-08 17:31:18 +00:00
Georg Lehmann
0bc1bffe9a nir/opt_move: don't move into critical sections
Foz-DB Navi31:
Totals from 6694 (8.43% of 79377) affected shaders:
Instrs: 4125152 -> 4119037 (-0.15%); split: -0.16%, +0.01%
CodeSize: 22786832 -> 22761612 (-0.11%); split: -0.12%, +0.01%
Latency: 23343080 -> 23270421 (-0.31%); split: -0.32%, +0.01%
InvThroughput: 3449821 -> 3449859 (+0.00%); split: -0.00%, +0.00%
SClause: 176624 -> 176219 (-0.23%); split: -0.23%, +0.00%
Copies: 256709 -> 255739 (-0.38%)
PreVGPRs: 240038 -> 240251 (+0.09%)
SALU: 336732 -> 334794 (-0.58%)

Foz-DB Navi21:
Totals from 11227 (14.14% of 79377) affected shaders:
MaxWaves: 279804 -> 279796 (-0.00%)
Instrs: 6652332 -> 6650912 (-0.02%); split: -0.02%, +0.00%
CodeSize: 35974500 -> 35968152 (-0.02%); split: -0.02%, +0.00%
VGPRs: 491440 -> 491512 (+0.01%); split: -0.00%, +0.02%
Latency: 34291475 -> 34247972 (-0.13%); split: -0.15%, +0.02%
InvThroughput: 7603701 -> 7603724 (+0.00%); split: -0.00%, +0.00%
VClause: 132041 -> 132068 (+0.02%); split: -0.00%, +0.02%
SClause: 239880 -> 239438 (-0.18%); split: -0.20%, +0.01%
Copies: 530000 -> 529986 (-0.00%); split: -0.00%, +0.00%
PreVGPRs: 393471 -> 394170 (+0.18%); split: -0.00%, +0.18%
VALU: 4274980 -> 4274966 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33417>
2025-02-08 17:31:18 +00:00
Pavel Ondračka
4d4a3a6d6b i915: rework shader compile failures reporting
Report compile errors from create_fs_state instead of finalize_nir.
The current way is broken, since nir_to_tgsi is called in finalize_nir,
however it can't handle lowered IO.

Fixes: dae57e184a
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12373
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
2025-02-08 15:32:01 +00:00
Marek Olšák
dc1b719e1f gallium,st/mesa: allow reporting compile failures from create_vs/fs/.._state
This adds a proper interface for reporting shader compile failures.
They are propagated to the GLSL linker.

Reporting errors from finalize_nir will be deprecated.

Fixes: dae57e184a
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
2025-02-08 15:32:01 +00:00
Pavel Ondračka
fbffe0ecbe i915/ci: update expectations
Most of those were likely fixed by the unconditional nir_opt_varyings,
since we are less likely to run out of input/output slots.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
2025-02-08 15:32:01 +00:00
Michel Dänzer
e4d189f26f egl/glx/sw: Check xcb_query_extension_reply return value for MIT-SHM
For consistency with other xcb_query_extension_reply callers.

v2:
* Now with less use-after-free. (Eric Engestrom)

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33400>
2025-02-08 13:50:15 +00:00
Martin Roukala (né Peres)
3d6c5dc790 zink/ci: document more RADV flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
0ef08b8ccd zink/ci: mark query-rgba-signed-components as fixed on more platforms
Fixes: 886d720c19 ("mesa: fix RGBA_SIGNED_COMPONENTS for lowered signed luminance")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
f3b1f5ba2c turnip/ci: re-introduce the multiviewport flakes
This is a partial revert of 5f3cad0026, as the commit did not
actually fix the flakes it claimed to do.

Fixes: 5f3cad0026 ("tu: Add missing assignment to shared_viewport")
Suggested-by: @Valentine (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446#note_2770035)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
8aa22e834a radv/ci: document more Tahiti VKCTS flakes
Now that we have a more powerful host, we started getting new flakes.
Let's document them!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
c63041c0ed ci/b2c: fix the S3 artifact for amd64 manual vk/gl
Fixes: 5b291c7ce6 ("ci: Move r300/nine/nvk builds out of critical path")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Pavel Ondračka
63afd265a6 ci: disable LTO for nightly debian-build-testing
Other CI jobs are actually depending on debian-build-testing now
and there doesn't seem to be much interested in fixing LTO, so just
disable it.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: David Heidelberg <david@ixit.cz>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12574
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Mel Henning
48edb9cec2 nak/opt_copy_prop: Force alu src for IAdd2X/IAdd3X
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
2025-02-08 08:38:12 +00:00
Mel Henning
2fa557d29d nak/opt_copy_prop: Add force_alu_src_type
This is just a code cleanup - it shouldn't change any shaders.

Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
2025-02-08 08:38:12 +00:00
Mel Henning
a5b267980a nak/opt_copy_prop: Fix IAdd3 overflow check
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
2025-02-08 08:38:12 +00:00
Rebecca Mckeever
e8c6e22e14 panvk: Enable YCbCr support for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
a9759dd0e4 panvk: Report formats not supported by HW as unsupported
3-plane YUV 444 and 16-bit 3-plane YUV are not supported natively by
the HW. Report these formats as unsupported since we may want to switch
to native YUV support in the future.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
755953d337 panvk: Split get_format_properties into format features helper functions
This will make it easier to get the feature flags per plane for
multiplane formats.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
e0f4801438 panvk: Add YCbCr sampler NIR lowering pass
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
2ddd021bae panvk: Fix assertion in is_disjoint()
We were not correctly following VUID-VkImageCreateInfo-format-01577:

If format is not a multi-planar format, and flags does not
include VK_IMAGE_CREATE_ALIAS_BIT, flags must not contain
VK_IMAGE_CREATE_DISJOINT_BIT.

Fixes: 412c2863 ("panvk: Enable multiplane images and image views")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
cdf24f067e panvk: Use multiple sampler planes and one texture descriptor per plane
Multiple sampler planes (one for luma, one for chroma) are needed to
support CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT.

Multiple texture descriptors (one per plane) are needed for the
downsampling in nir_vk_lower_ycbcr_tex() to work in panvk.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
45657fb70f panvk: Move mali_texture_packed structs in panvk_image_view to a union
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
ddbbc1d217 panvk: Update panvk_get_desc_stride prototype
This will help set things up for multiplane samplers and textures.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
9e5b6370c0 panvk: Create helper function for sampler descriptor emission
This will help set things up for multiplane samplers.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
339c58f21f panvk: Change immutable_samplers to panvk_sampler **
We will need vk_sampler for colorspace conversion.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
53df2c2260 panvk: Move single-plane views of multiplane formats to pview.planes[0]
Place the view plane at index 0 for single-plane views of multiplane
formats. Does not apply to YCbCr views of multiplane images since
view->vk.aspects for those will contain the full set of plane aspects.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
9c4b530c49 panvk: Allow a 32-bit binding value in desc id key and use 64-bit keys
Since the binding value can be any 32-bit number, we cannot assume that
it is <= 27 bits. We need 64-bit keys to accommodate a 32-bit binding.

This will also provide more bits to store the subdesc id, which will be
needed for multiplane texture and sampler descriptors.

Fixes: 7bea6f86 ("panvk: Overhaul the Bifrost descriptor set implementation")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
1d0f44739d util/hash_table: Add _mesa_hash_table_u64_replace()
This function updates the data of a u64 hash_table entry and is safe to
use inside a hash_table_u64_foreach() loop.

Fixes: 7bea6f86 ("panvk: Overhaul the Bifrost descriptor set implementation")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
3b5114a34b vk/meta: Extend copy/fill/update helpers to support YCbCr
Since copies happen one plane at a time, we can handle multiplanar copies
like color copies. The user gets to decide the format to use for each
plane, but the pipeline type and the optimal tile size applies to the
whole image.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Kenneth Graunke
d06c3e21ac brw: Drop unnecessary mlen/header_size on virtual GET_BUFFER_SIZE op
The logical send lowering code sets these, and is the code which
-should- set these.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
37a6278c9f brw: Drop INTERPOLATE_AT mlen handling from size_read()
FS_OPCODE_INTERPOLATE_AT_{SAMPLE,SHARED_OFFSET} never have a mlen set.
They are lowered to SHADER_OPCODE_SEND in logical send lowering, at
which point they acquire an mlen, but cease to be those opcodes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
ae60338142 brw: Lower MEMORY_FENCE and INTERLOCK in lower_logical_sends
We teach lower_logical_sends to lower these to SHADER_OPCODE_SEND
and drop all the corresponding generator and eu_emit code.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
7b4e31b243 brw: Add latencies for HDC/RC memory fences
We're about to start lowering these in the IR, at which point the
scheduler will see SEND instructions with fence messages.  Previously,
we handled those in the generator, and didn't handle the virtual opcodes
here, letting them fall through to the default case of 14 cycles.

These new numbers are completely fabricated, matching the times we have
for atomic operations.  This is basically what we did for LSC atomics.
While it may not be accurate, it's at least better than 14 cycles.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
b9de19f917 brw: Eliminate the BTI source from MEMORY_FENCE/INTERLOCK opcodes
Memory fences do not refer to an element of a binding table.  Rather,
the reason we had "BTI" in these opcodes was to distinguish what in
modern terms are called UGM (untyped memory data cache) vs. SLM
(cross-thread shared local memory) fences.

Icelake and older platforms used the "data cache" SFID for both
purposes, distinguishing them by having a special binding table
index, 254, meaning "this is actually SLM access".  This is where
the notion that fences had BTIs came in.  (In fact, prior to Icelake,
separate SLM fences were not a thing, so BTI wasn't used there either.)

To avoid confusion about BTI being involved, we choose a simpler lie: we
have Icelake SLM fences target GFX12_SFID_SLM (like modern platforms
would), even though it didn't really exist back then.  Later lowering
code sets it back to the correct Data Cache SFID with magic SLM binding
table index.  This eliminates BTI everywhere and an unnecessary source.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
43d0ac9eb4 brw: Change destination of memory fences to UD type
For some reason, we were using UW type for the destination of memory
fences at the generator level, while in the IR we selected UD.

There are some comments in the documentation for the message about it
writing the notification register to the destination, which is 32-bit.
Prior to Xe2, bits 31:16 were Reserved/MBZ.  But on Xe2, all 32 bits
are populated with actual data.

I don't know whether this will fix anything in practice, but it seems
like a better plan to use UD.  Often we used UW types to avoid having
the destination region of sends span too many registers, but we're in
SIMD1 here, so it shouldn't matter.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
c0a32af125 brw: Use correct builder size for MEMORY_FENCE/INTERLOCK virtual opcodes
brw_memory_fence() overrides the instructions generated by the
MEMORY_FENCE or INTERLOCK opcodes to be force_writemask_all with
exec_size == 1.  But the IR was emitting it in SIMD8 (regardless
of dispatch width).  Instead, just emit the IR as SIMD1/NoMask so
the IR matches what we actually generate.  Have size_written indicate
that the entire destination is written, however, as it is ultimately
going to be a SEND that writes a whole register.

We were also using a UD register for the source of
FS_OPCODE_SCHEDULING_FENCE when the generator overrides it to UW,
so just specify UW in the IR as well so that they line up.

Also add validation for MEMORY_FENCE/INTERLOCK that we've done the
exec_size and masking right in the IR.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
accef5e8f5 brw: Replace fs_inst::target field with logical FB read/write sources
We can just specify this as a source to the logical FB read/write
opcodes.  Notably FB reads had no sources before; now they have one.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
32dd722ff3 brw: Replace fs_inst::last_rt with a logical control source
Rather than using a bit in the generic fs_inst data structure, we can
simply set a source on our logical FB write messages.  (We already do
so for many other cases.)

In the repclear shader, setting this wasn't actually having an effect,
as we were setting it on a SHADER_OPCODE_SEND message which ignored it.
(We had already correctly set the bit in the message descriptor.)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
fce01b8461 brw: Drop FB_WRITE_LOGICAL_SRC_DST_DEPTH source
This was used for legacy depth passthrough on older hardware.  Gfx9+
doesn't actually have dst depth as part of the message, which is the
only hardware brw supports these days.

It sure looks like we were setting it though...

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
7390d6189c brw: Replace fs_inst::pi_noperspective with a logical control source
We already have logical pixel interpolator messages that get lowered
to send messages.  We can just add an extra boolean source to those
opcodes rather than sticking a opcode-specific boolean in the generic
fs_inst data structure.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
168ac07ffd brw: Eliminate fs_inst::shadow_compare
brw_lower_logical_sends can just check for the TEX_LOGICAL_SRC_SHADOW_C
source; we don't need a generic instruction bit for this.  We used to
have one because this was handled in the generator for older hardware
before the advent of logical opcode lowering.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
df836ee895 brw: Drop unused defines
Nothing uses these.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Ian Romanick
9c133fe638 crocus: Use nir_shader_intrinsics_pass in crocus_lower_storage_image_derefs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Ian Romanick
d2458f964f iris: Use nir_shader_intrinsics_pass in iris_lower_storage_image_derefs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Ian Romanick
40948b9715 crocus: Add missing nir_metadata_preserve in crocus_lower_storage_image_derefs
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Closes: #12589
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Ian Romanick
f2a01be57e iris: Add missing nir_metadata_preserve in iris_lower_storage_image_derefs
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 26a54ae4b2 ("iris: lower storage image derefs")
Closes: #12589
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Benjamin Lee
08cd331cc0 panvk: implement VK_EXT_separate_stencil_usage
Needed for Vulkan 1.2.

The only real improvement from this is that in some situations we can
skip creating texture descriptors for image views that have a more
restrictive usage for either the depth or stencil aspect.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33392>
2025-02-07 12:54:33 -08:00
Aaron Ruby
2553d60d47 gfxstream: Add common interfaces in the VirtGpuDevice to query DrmInfo
and PciBusInfo

- Advertise the availability of these extensions, fully implemented as
guestOnly features

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33363>
2025-02-07 17:08:34 +00:00
Aaron Ruby
94f8244ac8 gfxstream: Change "mesaOnly" nomenclature to be "guestOnly"
This refers to extensions that are fully implemented by the guest driver

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33363>
2025-02-07 17:08:34 +00:00
Aaron Ruby
5d2c0cc526 gfxstream: Make the virtgpu device discovery for LinuxVirtGpu more robust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33363>
2025-02-07 17:08:34 +00:00
Eric R. Smith
e550a3cab0 panfrost: avoid potential divide by 0 calculating timer_resolution
On armhf integer divide by 0 can raise SIGFPE, whereas on aarch64
it just returns 0. This has become an issue because the recently
added panfrost_init_screen_caps always calls pan_gpu_time_to_ns to
calculate caps->timer_resolution, whereas before we only called it
when PIPE_CAP_TIMER_RESOLUTION was queried, and only OpenCL
does that (and not always).

Fixes: 205669e3a9 ("panfrost: add panfrost_init_screen_caps")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33435>
2025-02-07 14:51:57 +00:00
Erik Faye-Lund
2ae97a4eb6 panvk: correct number of read bytes for dynamic buffers
This function takes the number of bytes, not number of entries. This
should hopefully fix start-up issues on Citra.

While we're at it, fixup the alignment of the line that writes the
bytes.

Fixes: 27beadcbdb ("panvk: Extend the shader logic to support Valhall")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12539
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33429>
2025-02-07 14:34:11 +00:00
Rhys Perry
c3d27906d8 radv: vectorize lowered shader IO
fossil-db (navi31):
Totals from 2329 (2.93% of 79377) affected shaders:
MaxWaves: 72152 -> 72102 (-0.07%)
Instrs: 1048791 -> 1041920 (-0.66%); split: -0.72%, +0.07%
CodeSize: 5331832 -> 5285572 (-0.87%); split: -0.90%, +0.03%
VGPRs: 113844 -> 113820 (-0.02%); split: -0.14%, +0.12%
Latency: 4349524 -> 4346374 (-0.07%); split: -0.35%, +0.28%
InvThroughput: 609449 -> 609235 (-0.04%); split: -0.27%, +0.24%
VClause: 22613 -> 22451 (-0.72%); split: -1.03%, +0.31%
SClause: 21197 -> 21177 (-0.09%); split: -0.45%, +0.35%
Copies: 81900 -> 82446 (+0.67%); split: -1.51%, +2.18%
PreSGPRs: 94697 -> 93596 (-1.16%); split: -1.23%, +0.07%
PreVGPRs: 69962 -> 70080 (+0.17%); split: -0.01%, +0.18%
VALU: 625247 -> 625390 (+0.02%); split: -0.23%, +0.25%
SALU: 101692 -> 101555 (-0.13%); split: -0.24%, +0.11%
VMEM: 46459 -> 44845 (-3.47%)

fossil-db (navi21):
Totals from 17522 (22.07% of 79377) affected shaders:
MaxWaves: 425698 -> 425460 (-0.06%); split: +0.00%, -0.06%
Instrs: 11444215 -> 11428321 (-0.14%); split: -0.14%, +0.00%
CodeSize: 59227492 -> 59019376 (-0.35%); split: -0.35%, +0.00%
VGPRs: 780920 -> 781208 (+0.04%); split: -0.00%, +0.04%
Latency: 44965072 -> 44926529 (-0.09%); split: -0.12%, +0.03%
InvThroughput: 9718148 -> 9728793 (+0.11%); split: -0.01%, +0.12%
VClause: 225732 -> 225605 (-0.06%); split: -0.10%, +0.04%
SClause: 217196 -> 217160 (-0.02%); split: -0.03%, +0.01%
Copies: 1050351 -> 1065263 (+1.42%); split: -0.03%, +1.45%
PreSGPRs: 747538 -> 747223 (-0.04%); split: -0.05%, +0.01%
PreVGPRs: 626702 -> 626748 (+0.01%); split: -0.00%, +0.01%
VALU: 6629403 -> 6643822 (+0.22%); split: -0.01%, +0.23%
SALU: 1898492 -> 1898452 (-0.00%); split: -0.00%, +0.00%
VMEM: 529942 -> 528361 (-0.30%)

fossil-db (vega10):
Totals from 1791 (2.84% of 62962) affected shaders:
MaxWaves: 12270 -> 12253 (-0.14%); split: +0.01%, -0.15%
Instrs: 602026 -> 597473 (-0.76%); split: -0.83%, +0.08%
CodeSize: 3109872 -> 3071664 (-1.23%); split: -1.26%, +0.03%
SGPRs: 137826 -> 137938 (+0.08%); split: -0.10%, +0.19%
VGPRs: 70364 -> 70520 (+0.22%); split: -0.03%, +0.26%
Latency: 4757850 -> 4781905 (+0.51%); split: -0.35%, +0.86%
InvThroughput: 2296941 -> 2310685 (+0.60%); split: -0.14%, +0.74%
VClause: 14161 -> 14050 (-0.78%); split: -1.23%, +0.44%
SClause: 14058 -> 14077 (+0.14%); split: -0.57%, +0.70%
Copies: 40954 -> 42191 (+3.02%); split: -1.69%, +4.71%
PreSGPRs: 64314 -> 63214 (-1.71%); split: -1.81%, +0.10%
PreVGPRs: 53558 -> 53894 (+0.63%); split: -0.01%, +0.64%
VALU: 449920 -> 450830 (+0.20%); split: -0.19%, +0.39%
SALU: 32973 -> 32839 (-0.41%); split: -0.76%, +0.35%
VMEM: 28796 -> 25151 (-12.66%)

fossil-db (polaris10):
Totals from 1769 (2.86% of 61794) affected shaders:
MaxWaves: 12024 -> 12021 (-0.02%)
Instrs: 474761 -> 470760 (-0.84%); split: -0.94%, +0.10%
CodeSize: 2447964 -> 2420712 (-1.11%); split: -1.15%, +0.04%
SGPRs: 129664 -> 129728 (+0.05%); split: -0.14%, +0.19%
VGPRs: 65216 -> 65560 (+0.53%); split: -0.05%, +0.58%
Latency: 4304734 -> 4318319 (+0.32%); split: -0.41%, +0.72%
InvThroughput: 2114950 -> 2122580 (+0.36%); split: -0.18%, +0.54%
VClause: 10933 -> 10808 (-1.14%); split: -1.42%, +0.27%
SClause: 11430 -> 11446 (+0.14%); split: -0.70%, +0.84%
Copies: 32290 -> 31891 (-1.24%); split: -2.80%, +1.56%
PreSGPRs: 58184 -> 57096 (-1.87%); split: -1.98%, +0.11%
PreVGPRs: 48757 -> 48874 (+0.24%); split: -0.02%, +0.26%
VALU: 359097 -> 358582 (-0.14%); split: -0.25%, +0.11%
SALU: 26279 -> 25934 (-1.31%); split: -1.75%, +0.43%
VMEM: 18825 -> 17247 (-8.38%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
953faac23e radv: vectorize descriptor loads
fossil-db (navi31):
Totals from 49237 (62.03% of 79377) affected shaders:
MaxWaves: 1497901 -> 1497851 (-0.00%); split: +0.00%, -0.00%
Instrs: 25766029 -> 25595468 (-0.66%); split: -0.68%, +0.02%
CodeSize: 133811412 -> 132616356 (-0.89%); split: -0.90%, +0.01%
VGPRs: 2318068 -> 2318200 (+0.01%); split: -0.00%, +0.01%
SpillSGPRs: 4512 -> 4507 (-0.11%); split: -0.64%, +0.53%
Latency: 164086813 -> 163869930 (-0.13%); split: -0.22%, +0.09%
InvThroughput: 24811220 -> 24802709 (-0.03%); split: -0.05%, +0.02%
VClause: 553717 -> 557194 (+0.63%); split: -0.30%, +0.93%
SClause: 723038 -> 710431 (-1.74%); split: -2.69%, +0.95%
Copies: 1709226 -> 1711030 (+0.11%); split: -0.48%, +0.59%
Branches: 465169 -> 465164 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 1775360 -> 1961282 (+10.47%); split: -0.01%, +10.48%
VALU: 15418039 -> 15417896 (-0.00%); split: -0.02%, +0.02%
SALU: 2424519 -> 2416263 (-0.34%); split: -0.61%, +0.26%
SMEM: 1245273 -> 1121006 (-9.98%)
VOPD: 3882 -> 3885 (+0.08%); split: +0.18%, -0.10%

fossil-db (navi21):
Totals from 48539 (61.15% of 79377) affected shaders:
MaxWaves: 1262958 -> 1262912 (-0.00%); split: +0.00%, -0.01%
Instrs: 30334013 -> 30154279 (-0.59%); split: -0.60%, +0.01%
CodeSize: 161298192 -> 160027616 (-0.79%); split: -0.80%, +0.01%
VGPRs: 1979248 -> 1979192 (-0.00%); split: -0.01%, +0.01%
SpillSGPRs: 3751 -> 3776 (+0.67%); split: -0.75%, +1.41%
Latency: 185665578 -> 185429672 (-0.13%); split: -0.23%, +0.10%
InvThroughput: 41413438 -> 41406558 (-0.02%); split: -0.03%, +0.02%
VClause: 624116 -> 626703 (+0.41%); split: -0.30%, +0.71%
SClause: 775094 -> 764569 (-1.36%); split: -2.73%, +1.38%
Copies: 2437041 -> 2441758 (+0.19%); split: -0.23%, +0.42%
Branches: 770540 -> 770552 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1919117 -> 2021093 (+5.31%); split: -0.01%, +5.32%
VALU: 18926346 -> 18926269 (-0.00%); split: -0.01%, +0.01%
SALU: 4316722 -> 4310066 (-0.15%); split: -0.33%, +0.17%
SMEM: 1350230 -> 1216865 (-9.88%)

fossil-db (vega10):
Totals from 41793 (66.38% of 62962) affected shaders:
MaxWaves: 306797 -> 306685 (-0.04%); split: +0.02%, -0.06%
Instrs: 16251398 -> 16140153 (-0.68%); split: -0.71%, +0.02%
CodeSize: 83407848 -> 82543596 (-1.04%); split: -1.05%, +0.01%
SGPRs: 2787936 -> 2854864 (+2.40%); split: -0.73%, +3.13%
VGPRs: 1585644 -> 1586156 (+0.03%); split: -0.01%, +0.05%
SpillSGPRs: 3856 -> 3843 (-0.34%); split: -1.50%, +1.17%
SpillVGPRs: 560 -> 562 (+0.36%)
Latency: 167478607 -> 166829429 (-0.39%); split: -0.50%, +0.12%
InvThroughput: 76378642 -> 76353650 (-0.03%); split: -0.06%, +0.03%
VClause: 361639 -> 362694 (+0.29%); split: -0.31%, +0.60%
SClause: 546919 -> 535879 (-2.02%); split: -2.98%, +0.96%
Copies: 1388817 -> 1396020 (+0.52%); split: -0.37%, +0.89%
Branches: 227697 -> 227705 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1384316 -> 1532654 (+10.72%); split: -0.01%, +10.73%
VALU: 11896315 -> 11896547 (+0.00%); split: -0.01%, +0.01%
SALU: 1371452 -> 1370143 (-0.10%); split: -0.83%, +0.73%
VMEM: 628506 -> 628510 (+0.00%)
SMEM: 984495 -> 882129 (-10.40%)

fossil-db (polaris10):
Totals from 41057 (66.44% of 61794) affected shaders:
MaxWaves: 270307 -> 270311 (+0.00%); split: +0.02%, -0.01%
Instrs: 16082187 -> 15972163 (-0.68%); split: -0.71%, +0.02%
CodeSize: 82199592 -> 81341176 (-1.04%); split: -1.05%, +0.01%
SGPRs: 2894960 -> 2970720 (+2.62%); split: -0.67%, +3.29%
VGPRs: 1620132 -> 1620352 (+0.01%); split: -0.01%, +0.02%
SpillSGPRs: 3885 -> 3868 (-0.44%); split: -1.47%, +1.03%
SpillVGPRs: 617 -> 619 (+0.32%)
Latency: 166722696 -> 166066137 (-0.39%); split: -0.52%, +0.13%
InvThroughput: 76887856 -> 76862349 (-0.03%); split: -0.08%, +0.04%
VClause: 353499 -> 354709 (+0.34%); split: -0.28%, +0.62%
SClause: 544073 -> 533053 (-2.03%); split: -2.97%, +0.95%
Copies: 1398025 -> 1405848 (+0.56%); split: -0.30%, +0.86%
Branches: 224038 -> 224041 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1362781 -> 1509495 (+10.77%); split: -0.01%, +10.77%
VALU: 11771997 -> 11772271 (+0.00%); split: -0.01%, +0.01%
SALU: 1416410 -> 1415708 (-0.05%); split: -0.72%, +0.68%
VMEM: 616867 -> 616871 (+0.00%)
SMEM: 970539 -> 869729 (-10.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
3c5bcc5f7f nir/algebraic: optimize ishl(iadd(iadd(a, #b), c), #d)
fossil-db (navi31):
Totals from 671 (0.85% of 79377) affected shaders:
MaxWaves: 17048 -> 17052 (+0.02%); split: +0.04%, -0.01%
Instrs: 786643 -> 785459 (-0.15%); split: -0.20%, +0.05%
CodeSize: 4074988 -> 4069304 (-0.14%); split: -0.18%, +0.04%
VGPRs: 43896 -> 43860 (-0.08%); split: -0.11%, +0.03%
SpillSGPRs: 753 -> 748 (-0.66%)
Latency: 8187731 -> 8186707 (-0.01%); split: -0.11%, +0.10%
InvThroughput: 1274564 -> 1274582 (+0.00%); split: -0.11%, +0.11%
VClause: 14292 -> 14183 (-0.76%); split: -0.98%, +0.22%
SClause: 21527 -> 21426 (-0.47%); split: -0.53%, +0.06%
Copies: 59381 -> 59299 (-0.14%); split: -0.67%, +0.53%
PreSGPRs: 29358 -> 29349 (-0.03%)
PreVGPRs: 36595 -> 36368 (-0.62%); split: -0.70%, +0.08%
VALU: 482669 -> 481927 (-0.15%); split: -0.21%, +0.06%
SALU: 70019 -> 70009 (-0.01%); split: -0.06%, +0.05%
VOPD: 142 -> 139 (-2.11%)

fossil-db (navi21):
Totals from 671 (0.85% of 79377) affected shaders:
MaxWaves: 11536 -> 11516 (-0.17%); split: +0.03%, -0.21%
Instrs: 773615 -> 772476 (-0.15%); split: -0.18%, +0.03%
CodeSize: 4092564 -> 4086688 (-0.14%); split: -0.17%, +0.03%
VGPRs: 43424 -> 43448 (+0.06%); split: -0.04%, +0.09%
SpillSGPRs: 565 -> 560 (-0.88%)
Latency: 8650893 -> 8633993 (-0.20%); split: -0.31%, +0.11%
InvThroughput: 1920741 -> 1920368 (-0.02%); split: -0.10%, +0.08%
VClause: 15830 -> 15774 (-0.35%); split: -0.76%, +0.40%
SClause: 21025 -> 21009 (-0.08%); split: -0.11%, +0.03%
Copies: 65425 -> 65460 (+0.05%); split: -0.37%, +0.43%
Branches: 21845 -> 21848 (+0.01%)
PreSGPRs: 29457 -> 29448 (-0.03%)
PreVGPRs: 37296 -> 37066 (-0.62%); split: -0.69%, +0.08%
VALU: 516908 -> 516056 (-0.16%); split: -0.20%, +0.04%
SALU: 91545 -> 91531 (-0.02%); split: -0.05%, +0.03%

fossil-db (vega10):
Totals from 497 (0.79% of 62962) affected shaders:
MaxWaves: 2325 -> 2328 (+0.13%); split: +0.17%, -0.04%
Instrs: 298230 -> 297284 (-0.32%); split: -0.35%, +0.03%
CodeSize: 1535212 -> 1530636 (-0.30%); split: -0.34%, +0.04%
SGPRs: 36464 -> 36480 (+0.04%)
VGPRs: 29412 -> 29396 (-0.05%); split: -0.07%, +0.01%
SpillSGPRs: 164 -> 159 (-3.05%)
Latency: 3957230 -> 3948919 (-0.21%); split: -0.51%, +0.30%
InvThroughput: 1680680 -> 1679105 (-0.09%); split: -0.17%, +0.08%
VClause: 6175 -> 6102 (-1.18%); split: -1.55%, +0.37%
SClause: 9503 -> 9510 (+0.07%); split: -0.15%, +0.22%
Copies: 20992 -> 20892 (-0.48%); split: -0.97%, +0.50%
PreSGPRs: 17803 -> 17795 (-0.04%)
PreVGPRs: 23072 -> 22823 (-1.08%); split: -1.11%, +0.03%
VALU: 225322 -> 224587 (-0.33%); split: -0.36%, +0.04%
SALU: 21029 -> 21011 (-0.09%); split: -0.22%, +0.13%

fossil-db (polaris10):
Totals from 489 (0.79% of 61794) affected shaders:
Instrs: 299330 -> 298308 (-0.34%); split: -0.40%, +0.06%
CodeSize: 1529316 -> 1525440 (-0.25%); split: -0.32%, +0.07%
SpillSGPRs: 159 -> 149 (-6.29%)
Latency: 3924819 -> 3898471 (-0.67%); split: -0.93%, +0.25%
InvThroughput: 1687167 -> 1684956 (-0.13%); split: -0.22%, +0.09%
VClause: 6248 -> 6067 (-2.90%); split: -3.28%, +0.38%
SClause: 9519 -> 9492 (-0.28%); split: -0.72%, +0.44%
Copies: 21673 -> 21637 (-0.17%); split: -0.90%, +0.73%
PreSGPRs: 17611 -> 17603 (-0.05%)
PreVGPRs: 22873 -> 22625 (-1.08%)
VALU: 226805 -> 225928 (-0.39%); split: -0.45%, +0.06%
SALU: 21419 -> 21413 (-0.03%); split: -0.28%, +0.25%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
150305bbb8 nir/load_store_vectorize: fix sorting of vectors in add_to_entry_key
fossil-db (navi31):
Totals from 13 (0.02% of 79377) affected shaders:
Instrs: 2997 -> 2990 (-0.23%); split: -0.77%, +0.53%
CodeSize: 16552 -> 16504 (-0.29%); split: -0.85%, +0.56%
Latency: 75923 -> 75744 (-0.24%); split: -0.30%, +0.06%
InvThroughput: 12741 -> 12754 (+0.10%); split: -0.14%, +0.24%
PreVGPRs: 225 -> 230 (+2.22%)
VALU: 1565 -> 1569 (+0.26%); split: -0.77%, +1.02%

fossil-db (navi21):
Totals from 13 (0.02% of 79377) affected shaders:
Instrs: 2522 -> 2518 (-0.16%); split: -0.75%, +0.59%
CodeSize: 14660 -> 14620 (-0.27%); split: -0.85%, +0.57%
Latency: 77878 -> 77634 (-0.31%); split: -0.36%, +0.05%
InvThroughput: 15512 -> 15518 (+0.04%); split: -0.15%, +0.19%
Copies: 230 -> 231 (+0.43%); split: -0.87%, +1.30%
PreVGPRs: 225 -> 230 (+2.22%)
VALU: 1536 -> 1541 (+0.33%); split: -0.91%, +1.24%

fossil-db (vega10):
Totals from 13 (0.02% of 62962) affected shaders:
Instrs: 2684 -> 2674 (-0.37%); split: -0.75%, +0.37%
CodeSize: 14784 -> 14752 (-0.22%); split: -0.65%, +0.43%
Latency: 118228 -> 118215 (-0.01%); split: -0.06%, +0.05%
InvThroughput: 42893 -> 42892 (-0.00%); split: -0.11%, +0.11%
SClause: 63 -> 62 (-1.59%)
PreVGPRs: 236 -> 241 (+2.12%)
VALU: 1665 -> 1666 (+0.06%); split: -0.72%, +0.78%

fossil-db (polaris10):
Totals from 9 (0.01% of 61794) affected shaders:
Instrs: 1872 -> 1885 (+0.69%); split: -0.16%, +0.85%
CodeSize: 9980 -> 10012 (+0.32%); split: -0.20%, +0.52%
Latency: 82331 -> 82382 (+0.06%); split: -0.01%, +0.07%
InvThroughput: 30603 -> 30686 (+0.27%)
SClause: 44 -> 45 (+2.27%)
Copies: 252 -> 256 (+1.59%)
PreVGPRs: 169 -> 173 (+2.37%)
VALU: 1100 -> 1117 (+1.55%); split: -0.27%, +1.82%
SALU: 430 -> 434 (+0.93%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
5fe0012670 radv: DCE before nir_opt_shrink_vectors
fossil-db (navi31):
Totals from 941 (1.19% of 79377) affected shaders:
MaxWaves: 28422 -> 28502 (+0.28%)
Instrs: 645374 -> 642031 (-0.52%); split: -0.55%, +0.03%
CodeSize: 3264460 -> 3244488 (-0.61%); split: -0.63%, +0.02%
VGPRs: 48392 -> 48044 (-0.72%)
SpillVGPRs: 7 -> 0 (-inf%)
Scratch: 1792 -> 0 (-inf%)
Latency: 2596896 -> 2536952 (-2.31%); split: -2.33%, +0.02%
InvThroughput: 528726 -> 500139 (-5.41%); split: -5.42%, +0.01%
VClause: 14566 -> 14539 (-0.19%)
Copies: 53022 -> 51296 (-3.26%); split: -3.37%, +0.12%
PreSGPRs: 29369 -> 29367 (-0.01%)
PreVGPRs: 29710 -> 29694 (-0.05%)
VALU: 366134 -> 364245 (-0.52%); split: -0.53%, +0.02%
SALU: 74017 -> 73891 (-0.17%)
VMEM: 25240 -> 25208 (-0.13%)

fossil-db (navi21):
Totals from 941 (1.19% of 79377) affected shaders:
MaxWaves: 22018 -> 22058 (+0.18%); split: +0.28%, -0.10%
Instrs: 521053 -> 518898 (-0.41%); split: -0.43%, +0.02%
CodeSize: 2750628 -> 2734996 (-0.57%); split: -0.58%, +0.01%
VGPRs: 41152 -> 41024 (-0.31%); split: -0.41%, +0.10%
SpillVGPRs: 5 -> 0 (-inf%)
Scratch: 2048 -> 0 (-inf%)
Latency: 2655941 -> 2607022 (-1.84%); split: -1.86%, +0.02%
InvThroughput: 711733 -> 690032 (-3.05%); split: -3.07%, +0.02%
VClause: 16388 -> 16363 (-0.15%)
Copies: 35152 -> 33485 (-4.74%); split: -4.98%, +0.24%
PreSGPRs: 28486 -> 28484 (-0.01%)
PreVGPRs: 30317 -> 30301 (-0.05%)
VALU: 348423 -> 346614 (-0.52%); split: -0.54%, +0.02%
SALU: 44020 -> 43869 (-0.34%)
VMEM: 25216 -> 25195 (-0.08%)

fossil-db (vega10):
Totals from 416 (0.66% of 62962) affected shaders:
MaxWaves: 2687 -> 2696 (+0.33%); split: +0.37%, -0.04%
Instrs: 245634 -> 243501 (-0.87%); split: -0.88%, +0.01%
CodeSize: 1312836 -> 1297248 (-1.19%); split: -1.19%, +0.01%
VGPRs: 17684 -> 17692 (+0.05%); split: -0.43%, +0.48%
SpillVGPRs: 5 -> 0 (-inf%)
Scratch: 2048 -> 0 (-inf%)
Latency: 1928393 -> 1881346 (-2.44%); split: -2.44%, +0.00%
InvThroughput: 1163915 -> 1117096 (-4.02%); split: -4.03%, +0.00%
VClause: 7070 -> 7053 (-0.24%)
Copies: 22577 -> 20834 (-7.72%); split: -7.78%, +0.06%
Branches: 4328 -> 4320 (-0.18%)
PreSGPRs: 13993 -> 13991 (-0.01%)
PreVGPRs: 13452 -> 13436 (-0.12%)
VALU: 165253 -> 163366 (-1.14%); split: -1.15%, +0.01%
SALU: 26258 -> 26111 (-0.56%)
VMEM: 11736 -> 11715 (-0.18%)

fossil-db (polaris10):
Totals from 355 (0.57% of 61794) affected shaders:
Instrs: 108639 -> 108682 (+0.04%); split: -0.03%, +0.07%
CodeSize: 583804 -> 583936 (+0.02%); split: -0.03%, +0.06%
SGPRs: 17712 -> 17728 (+0.09%)
Latency: 735332 -> 734777 (-0.08%); split: -0.08%, +0.01%
InvThroughput: 443975 -> 444045 (+0.02%); split: -0.03%, +0.04%
VClause: 2552 -> 2558 (+0.24%)
SClause: 2394 -> 2393 (-0.04%)
Copies: 11433 -> 11464 (+0.27%); split: -0.15%, +0.42%
PreVGPRs: 7365 -> 7364 (-0.01%)
VALU: 69385 -> 69416 (+0.04%); split: -0.02%, +0.07%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
d04e1ea02d radv: move nir_opt_shrink_vectors later
This seems to be helpful with shaders which use NGG culling.

fossil-db (navi21):
Totals from 3529 (4.45% of 79377) affected shaders:
MaxWaves: 81490 -> 82066 (+0.71%)
Instrs: 2868872 -> 2863476 (-0.19%); split: -0.22%, +0.04%
CodeSize: 14949540 -> 14927580 (-0.15%); split: -0.18%, +0.03%
VGPRs: 165440 -> 164144 (-0.78%)
SpillSGPRs: 578 -> 405 (-29.93%)
Latency: 15388119 -> 15151882 (-1.54%); split: -1.74%, +0.20%
InvThroughput: 2935873 -> 2929736 (-0.21%); split: -0.25%, +0.04%
VClause: 70192 -> 68904 (-1.83%); split: -2.17%, +0.33%
SClause: 67678 -> 67679 (+0.00%); split: -0.10%, +0.10%
Copies: 265824 -> 261458 (-1.64%); split: -1.96%, +0.32%
Branches: 75084 -> 75088 (+0.01%); split: -0.02%, +0.02%
PreSGPRs: 165962 -> 165716 (-0.15%)
PreVGPRs: 135122 -> 134724 (-0.29%)
VALU: 1681747 -> 1677134 (-0.27%); split: -0.32%, +0.05%
SALU: 436003 -> 435915 (-0.02%); split: -0.03%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
f034aa9cd3 radv: don't use bit_sizes_int to skip nir_lower_bit_size
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
19394f44df ac/nir: set memory_modes for lowered TES input loads
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
0a699e16f9 nir/load_store_vectorize: handle load_buffer_amd/store_buffer_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
1fca72ddc8 ac/nir/ngg: update bit_sizes_int
This is used for RADV's bit size lowering.

fossil-db (navi21):
Totals from 4520 (5.69% of 79377) affected shaders:
(no stat changes)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
cfa217ee04 nir/opt_offsets: don't check NUW for unswizzled buffer_amd
This isn't necessary.

fossil-db (navi21):
Totals from 13 (0.02% of 79377) affected shaders:
Instrs: 18070 -> 18042 (-0.15%); split: -0.17%, +0.01%
CodeSize: 98336 -> 98012 (-0.33%)
Latency: 72735 -> 72992 (+0.35%); split: -0.02%, +0.38%
InvThroughput: 13157 -> 13105 (-0.40%)
VClause: 334 -> 324 (-2.99%)
SClause: 563 -> 564 (+0.18%)
Copies: 1194 -> 1197 (+0.25%)
VALU: 12330 -> 12297 (-0.27%)

fossil-db (polaris10):
Totals from 10 (0.02% of 61794) affected shaders:
Instrs: 4543 -> 4441 (-2.25%)
CodeSize: 30196 -> 29388 (-2.68%)
Latency: 64290 -> 64272 (-0.03%); split: -0.05%, +0.02%
InvThroughput: 20371 -> 20362 (-0.04%); split: -0.08%, +0.04%
VClause: 195 -> 135 (-30.77%)
Copies: 97 -> 100 (+3.09%)
PreSGPRs: 178 -> 177 (-0.56%)
VALU: 1765 -> 1666 (-5.61%)
VMEM: 2448 -> 2445 (-0.12%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
539f9b4ba6 nir,aco,radv: add align_mul/offset to buffer_amd intrinsics
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
David Rosca
62b0f84981 ac/vcn_dec: Fix AV1 film grain on VCN5
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33376>
2025-02-07 13:13:45 +00:00
Juan A. Suarez Romero
f3de2134dd broadcom/ci: add new failures/flakes
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33443>
2025-02-07 12:44:12 +00:00
Samuel Pitoiset
76dcac9d47 radv: advertise VK_KHR_cooperative_matrix on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Samuel Pitoiset
b05a112d92 radv/nir: add cooperative matrix lowering for GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Samuel Pitoiset
ad611adeb7 radv/nir: add a struct for parameters to cooperative matrix lowering
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Samuel Pitoiset
baa09cb94a nir: adjust number of components for cmat_muladd_amd
On GFX12, A&B matrices can be vectors of 4 or 8 elements.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Karol Herbst
7c51ffe560 rusticl/mem: accelerate Buffer::write_rect
similar to the copy_rect change

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
b76784e655 rusticl/mem: accelerate Buffer::copy_rect
It's doing a bunch of copies, but at least they are done on the GPU, not
the CPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
c4dc97b29b rusticl/mem: Image::write layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
c43b460b0f rusticl/mem: Image::copy_to_image layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
8459e55fe3 rusticl/mem: Image::copy_to_buffer layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
4f7a6bf2bd rusticl/mem: Buffer::copy_to_image layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
16623f654f rusticl/mesa: add buffer and texture variant for resource_copy_region
We'll add mipmap parameters to it, so it's better to split it up, so it's
easier to use the interface.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
a2a3be3baa rusticl/mem: do not apply offset with in copy_image_to_buffer
The offset already gets applied when mapping the destination buffer, so we
ended up applying it twice.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Samuel Pitoiset
dbb7e3cf88 radv: do not keep track of the streamout binding buffer
More like BDA style. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 10:53:37 +01:00
Samuel Pitoiset
03cacc1406 radv: rework passing draw info via radv_draw_info
More like BDA style. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 10:53:37 +01:00
Samuel Pitoiset
6f34be88d9 radv: rework passing dispatch info via radv_dispatch_info
More like BDA style. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 09:30:22 +01:00
Samuel Pitoiset
b5740d5819 radv: use radv_indirect_dispatch() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 09:30:22 +01:00
Samuel Pitoiset
ef7e28e7a8 radv: remove redundant drawCount == 0 for indirect mesh/task draws
This is already handled in radv_before_taskmesh_draw().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 09:30:22 +01:00
Samuel Pitoiset
8625decbcc radv: fix fetching draw vertex data from counter buffers with transform feedback
counterOffset was just ignored and nobody noticed (missing VKCTS
coverage).

VGT_STRMOUT_DRAW_OPAQUE_OFFSET will do the computation in hw for us.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33407>
2025-02-07 07:59:39 +00:00
Lionel Landwerlin
4f73689d9a anv: add source hashes for BVH building shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33432>
2025-02-07 07:27:54 +00:00
Dudemanguy
1aa21c27d4 treewide: remove unneeded executable bit in non-scripting files
Noticed one by chance and searched for any others with find that were
clearly not meant to be executable.

For the curious:

33aa039acf changed texstore.c to
executable.
ed176e2c71 introduced si_vpc.c and
si_vpc.h which have always been executable.
d0e5203855 changed lava-gitlab-ci.yml to
executable.
328c29d600 introduced OVR_multiview.xml as
executable.
ac912b3754 introduced
OVR_multiview_multisampled_render_to_texture.xml as exectuable.

Signed-off-by: Dudemanguy <random342@airmail.cc>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33436>
2025-02-06 16:51:15 -06:00
Benjamin ROBIN
023db569e8 docs: Update MESA_SHADER_CACHE_DIR env variable behavior
Update documentation to match implementation of
disk_cache_generate_cache_dir().

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
2025-02-06 22:14:11 +00:00
Benjamin ROBIN
622f7407d7 util/disk_cache: Do not try to delete old cache if cache is disabled
Prevent following warning if not running as a normal user:
Failed to create /home for shader cache (Permission denied)---disabling

disk_cache_delete_old_cache() is going to create first the cache directory
using disk_cache_generate_cache_dir(). From mkdir_if_needed(), the stat()
of "/home" is failing with "Permission denied" under some circumstances
when using Firefox.

Fixes: #12168
Fixes: c3bc6991d2 ("util/disk_cache: Delete the old multifile cache if using the default.")

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
2025-02-06 22:14:11 +00:00
Eric Engestrom
7152f343d6 ci: only trigger the CI for release managers when pushing to staging branch
The release branch contains only what was on the staging branch first,
so testing it again is a waste of resources.

To do this, we split the rule into specifically "default branch" and
"staging branch", and "release branch" gets dropped by virtue of no
longer being caught by any rule.

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
2025-02-06 21:38:42 +00:00
Eric Engestrom
271bc0727c ci: drop redundant condition
"marge-bot push" is already caught by the `post-merge pipeline` rule above.

Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
2025-02-06 21:38:42 +00:00
Eric Engestrom
31f0a9be3f ci: don't run on tag pipelines
It's too late to run all the tests by then, the release has been made
based on the staging pipelines results

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33409>
2025-02-06 21:01:35 +00:00
Eric Engestrom
e4551ac69e llvmpipe/tests: include math.h for INFINITY
This might be the cause of #12557, but we should do this regardless.

Fixes: d366520e85 ("gallivm: fix rsqrt failures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33424>
2025-02-06 20:33:30 +00:00
Benjamin Cheng
b9e9cb4684 d3d12/video_enc: Fix AV1 tile_info() coding
Previously this used the {Min,Max}Tile{Rows,Cols} as returned by the
driver capabilities. Those parameters should be used to determine
implementation supported tile configurations for a specific resolution.

In the case of header coding, the {min,max}Log2Tile{Rows,Cols} should be
derived exactly as the AV1 spec defines it.

Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Sil Vilerino <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32762>
2025-02-06 19:20:47 +00:00
Mel Henning
548b5e37ae nvk: Use hw support for instancing on PASCAL_B+
This may be faster than having the MME loop over instances.

Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33105>
2025-02-06 18:52:42 +00:00
Faith Ekstrand
bc67f95ae2 nak: Add MemEvictionPriorities to tex ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
ac50208783 nak: Print .dc for OpTld4::z_cmpr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
3c843b6933 nak: Add more MemEvictionPriorities
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
0d19468924 nak: Rename MemEvictionPriority::Unchanged to LastUse
The .lu modifier, which is what 3 maps to, stands for LastUse.  We
aren't actually setting it anywhere, though, so this isn't a functional
change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
a92155d7f8 nak: Stop setting .EF on tex ops
Do this first because we might want to back-port this patch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Mike Blumenkrantz
7a890a7583 driconf: add GL_EXT_shader_image_load_store for viewperf to fix crashing
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33430>
2025-02-06 17:28:46 +00:00
Mike Blumenkrantz
7fc85dbc6f driconf: move a glthread viewperf option to global
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33430>
2025-02-06 17:28:46 +00:00
Caio Oliveira
b50c925bd6 intel/brw: Fold simple_allocator into the shader
This was originally turned into a separate struct for reuse between vec4
and fs backends, that's not needed anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
f82bcd56fc intel/brw: Add functions to allocate VGRF space
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
5c717e68ce intel/brw: Pass fs_visitor around instead of the simple_allocator
In preparation for getting rid of the simple_allocator.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
75b77382b8 intel/brw: Remove offsets and total_size from VGRF allocator
Information was used for vec4 backend, not used here anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
ea87bab4ce intel/brw: Remove 'using namespace brw' directives
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33418>
2025-02-06 07:58:55 -08:00
Sergi Blanch Torne
21cbe00094 ci: typo in debian-android in .build-for-tests-jobs
I didn't catch this typo in !33377 until it got merged. Correctness in this
list is necessary for the job in the build-only stage.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33428>
2025-02-06 14:43:45 +00:00
Hans-Kristian Arntzen
1fcb494054 radv: Repurpose radv_legacy_sparse_binding drirc
Rename the drirc and call it radv_disable_dedicated_sparse_queue instead,
since normal queues support sparse now anyway.
Keep the workaround for existing known games, since they might not
expect a separate SPARSE queue to pop up.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33166>
2025-02-06 14:07:20 +00:00
Hans-Kristian Arntzen
f58630f07c radv: Always allow sparse on normal GFX/COMPUTE/DMA queues.
Forcing a dedicated sparse queue is problematic in real-world scenarios.

In the current implicit sync world for sparse updates, we can rely on
submission order.

For use cases where an application can take advantage of the separate
sparse queue to do "async" updates, the existing implementation works
well, but problems arise when trying to implement D3D-style submission
ordering. E.g., when a game does sparse on a graphics or compute queue,
we need to guarantee that previous submissions, sparse update and future
submissions are properly ordered.
The Vulkan way of implementing this is to:

- Signal graphics queue to timeline N (i.e. last submission made)
- Wait on timeline N on the sparse queue
- Do sparse updates
- Signal timeline N + 1 on sparse queue
- Wait for timeline N + 1 on graphics queue (can be deferred until next
  graphics submit)

This causes an unavoidable bubble in GPU execution, since the
existing sparse queue ends up doing:

- Wait pending signal. The implication here is that all previous GPU
  work must have been submitted.
- Do VM operations on CPU timeline
- Wait for semaphores to signal (this is required for signal ordering)
- ... GPU is meanwhile stalling in a bubble due to GPU -> CPU -> GPU roundtrip.
- Signal semaphore on CPU (unblocks GPU work)

Letting the GPU go idle here is not great, and we can be screwed over by bad thread scheduling.

Another knock-on effect is that the graphics queue is now forced into
using a thread for submissions. This is because when the graphics queue
wants to wait for timeline N + 1, the sparse queue may not have
signalled the timeline yet on CPU, so effectively, we have created a
wait-before-signal situation internally in RADV. Throwing another thread
under the bus is not great either.

Just letting the queue in question support sparse binding solves all
these issues and I don't see a path forward where the D3D use case can
be solved in a separate queue world.

It is also friendlier to the ecosystem at large. RADV is the only driver
I know of that insists on separate sparse queues and multiple games
assume that graphics queue can support sparse.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33166>
2025-02-06 14:07:20 +00:00
Erik Faye-Lund
4209f8ebf6 pan/ci: add a couple of common flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33425>
2025-02-06 13:42:44 +00:00
Erik Faye-Lund
a6e0492da1 pan/ci: add fail from llvm 19 upgrade
This was missed while testing the LLVM 19 upgrade, because the
panfrost-t860-cl:arm64 job doesn't run pre-merge.

Fixes: 101065642d ("ci/debian: Upgrade Debian images to LLVM 19")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33425>
2025-02-06 13:42:44 +00:00
Antonio Ospite
fb8bfd1f0e ci/android: add an android-angle-lavapipe job
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
218c403dee ci: Move debian-android up to the build-for-tests stage
We're about to enable our first Android test job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
2aab9ef3fd ci/android: Check ANGLE version
Save the current git hash to /angle/hash after applying local patches,
and use it to verify that we're using our own ANGLE build in
Cuttlefish.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
0fc4aef848 ci/android: Build and use ANGLE
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
cc2bb73369 ci: Allow building ANGLE for multiple platforms
Prepare for building ANGLE for Android, which requires applying a
patch to fix building with minimal dependencies.

Rework the existing script by allowing passing the ANGLE_TARGET and
ANGLE_ARCH environmental variables to specify the target platform,
Android or Linux, and also allow building for arm64 in addtition to
x64 by setting ANGLE_ARCH.

Also build the GLESv1 compatibility mode library (libGLESv1_CM),
which is required for EGL testing on Android.

Based on work by Antonio Ospite.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Antonio Ospite
ba970a9de2 ci/android: fix building deqp on Android
After commit 83d1553391 (ci: Don't build Vulkan for GL dEQP, 2025-01-29) deqp
does not build cleanly anymore for the Android target.

Fix that by updating the
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch patch.

Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
17966a6a80 ci/lava: Don't build VK-main for arm64
Only amd64 needs the VK-main build, as it's only used by Raven and
Stoney on RADV.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
e0f0be6fc8 ci/android: Don't build desktop GL CTS
Android officially only supports GLES, and we don't need the desktop
GL CTS in CI.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
89994ec65a amd/ci: Fix fraction for radv-stoney-angle-full
The radv-stoney-angle-full was unintentionally inheriting the fraction
from the pre-merge job.
Also use the correct manual rules definition while we're here, and use
consistent naming for the restricted rules.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Karmjit Mahil
54928d643e loader/wayland: Fix missing timespec.h include
`loader_wayland_dispatch()` also makes use of `timespec` so we
need `timespec.h`. Otherwise it fails to build due to
`timespec_sub_saturate()` missing.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Fixes: 90effcceab ("wsi/wayland: refactor wayland dispatch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12580
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33423>
2025-02-06 10:39:25 +01:00
Lionel Landwerlin
fdaf7c7b96 nir: add a high precision conversion unorm->float
We'll use this for D32->D24X8 conversion on Intel on Gfx11/Gfx12.0/DG2
(where HW doesn't have fp64 support).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33422>
2025-02-06 08:20:21 +00:00
Samuel Pitoiset
9b827556f5 radv: fix adding the BO to cmdbuf list when starting conditional rendering
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33403>
2025-02-06 07:13:29 +00:00
Sagar Ghuge
76bd7f9265 blorp: Enable SimpleFloatBlendEnable on Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Sagar Ghuge
0b462c8b9e iris: Enable simpleFloatBlendEnable on Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Sagar Ghuge
046b8717af anv: Enable simpleFloatBlendEnable on Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Sagar Ghuge
efeeae3926 intel/genxml: Update BLEND_STATE_ENTRY structure
This change adds the SimpleFloatBlendEnable field to the structure.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Martin Roukala (né Peres)
d1237cf6f7 freedreno/ci: update expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
562bc5697f radv/ci: update expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
b432f03c8a radv/ci: bump tahiti's cpu cores
You may thank @Venemo for his generous donation to our CI :)

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
66d0498872 zink/ci: update the radv expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
a55613ce8d zink/ci: use the debian-built-testing for nvk
Fixes: 5b291c7ce6 ("ci: Move r300/nine/nvk builds out of critical path")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Mike Blumenkrantz
30b616244c radv: print stringname for VkExternalMemoryHandleTypeFlagBits error
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Mike Blumenkrantz
20013a1774 radv: stop blocking non-2D import/export ops
these work fine

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Mike Blumenkrantz
ca8a740e3b radv: fix error reporting for VkExternalMemoryTypeFlagBitsKHR
wrong type name is confusing

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Mike Blumenkrantz
602f19bad8 ac/surface: always allow LINEAR modifier for color formats
this is always supported

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Caio Oliveira
1ade9a05d8 intel/brw: Use brw prefix instead of namespace for analysis implementations
Also drop the 'fs' prefix when applicable.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:07 +00:00
Caio Oliveira
2b92eb0b2c intel/brw: Use brw prefix instead of namespace for dep analysis enum
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:07 +00:00
Caio Oliveira
e2f354587d intel/brw: Merge brw_ir_analysis.h into brw_analysis.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:07 +00:00
Caio Oliveira
c943fb0c20 intel/brw: Move analysis passes without own file to brw_analysis.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
0f7eb96af8 intel/brw: Move idom_tree declaration to brw_analysis.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
0ebb75743d intel/brw: Use brw_analysis prefix for performance analysis files
Move declaration to the common header and rename definition file.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
6a23749332 intel/brw: Use brw_analysis prefix for def analysis file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
e0614e8ea1 intel/brw: Use brw_analysis prefix for liveness analysis files
Move declaration to the common header and rename definition file.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
e5369540ea intel/brw: Add brw_analysis.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Alyssa Rosenzweig
bf48eae1f9 nir: drop printf_base_identifier
superseded.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
e3bc6eafc8 nir/lower_printf: hash format strings in nir_printf_fmt
Lionel added a neat debugging tool. Let's make it work with the new-style
hashing approach too, since nir_printf_fmt is a lot more convenient than needing
to define a dedicated CL function to access printf (although that works too).

We remove the old non-hashed path, because it has no more functional users --
hashing is a hard requirement with vtn_bindgen2, which Intel has now switched
to.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
41eabbadfa intel: port to u_printf context + singleton
this is required with vtn_bindgen2. fixes printf there.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
9429d001b9 intel/nir_lower_printf: modernize nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
03ff5b2c03 intel: drop nir_lower_printf calls
this is now handled in vtn_bindgen2 for vtn path code. this does drop support
from printf from GRL but that seems appropriate at this point.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
07ccaa3118 Revert "hk: Stop using strings or common key types for meta keys"
This reverts commit 32e0e8c8c5, which broke the
build on Honeykrisp (and then the obvious build fix causes CTS to blow up with
explosions).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33406>
2025-02-05 20:01:35 +00:00
Eric Engestrom
cb53c83a5e docs: update calendar for 25.0.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33408>
2025-02-05 19:49:46 +00:00
Eric Engestrom
93a720f81a gfxstream: mark unused variables as such
It's unclear to me whether this is dead code that should be removed or
dead code that should be used, so I just marked it as unused to remove
a few thousand warnings when compiling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
b2b37cb1de gfxstream: use range variable for its intended purpose
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
96c183c759 gfxstream: drop dead variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
74d0a8cdd6 gfxstream: fix signedness of shifts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
58938f7348 gfxstream: drop unnecessary semi-colons
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:41 +00:00
Eric Engestrom
5f54beb307 ci/cuttlefish: drop rm libglapi.so now that it's no longer loaded
Fixes: 44bda7c258 ("dri: put shared-glapi into libgallium.*.so")
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33388>
2025-02-05 18:47:32 +00:00
Eric Engestrom
4bbbbb96be docs/android: drop libglapi.so now that it's gone
Fixes: 44bda7c258 ("dri: put shared-glapi into libgallium.*.so")
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33388>
2025-02-05 18:47:32 +00:00
Alyssa Rosenzweig
0ce0b7c7b0 hk: advertise EXT_image_view_min_lod
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
157ffa5b43 hk: emulate EXT_image_view_min_lod
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
8e1ce5331b hk: rearrange sampler image desc
pack nicer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
7ed6aa68ad hk: pack has_border with clamp_0_sampler_index
this is cheaper to decode (shorter preambles!).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
6e29a2c8d5 agx: switch to nir_tex_src_lod_bias_min_agx
saves moves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
932d8a68eb agx: lower min LOD for txf
to match the robustness semantic the spec wants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
780b814354 nir: add lod_bias_min_agx tex src
this lets nir_opt_preamble Just Do The Right thing, so model in NIR

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
c5de33e48e nir: add image_min_lod_agx
for EXT_image_view_min_lod emulation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Samuel Pitoiset
4fc856af98 radv: fix caching on-demand meta shaders
This switches to disk_cache instead of our own mechanism which only
stored meta shaders when the logical was destroyed.

Meta shaders are still stored separately from the application shaders
because they are common to all applications on a given GPU/Mesa version.
The default cache is 32MiB which should be large enough.

This fixes massive stuttering in FF7 Rebirth but all apps are
technically affected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33370>
2025-02-05 16:30:27 +00:00
Samuel Pitoiset
9d03c1afe0 vulkan/runtime: allow to use a different disk cache
Instead of using the default one provided by the physical device.
This will be used by RADV to store meta shaders to a separate single
cache file.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33370>
2025-02-05 16:30:27 +00:00
Samuel Pitoiset
30961b2bfe util/disk_cache: add a new helper to create a disk cache
This will be used by RADV to store the meta shaders to a separate
cache directory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33370>
2025-02-05 16:30:27 +00:00
Job Noorman
8404e7428b ir3: fix emitting descriptor prefetches at end of preamble
The fix in e7ac1094f6 to emit preamble defs in the correct block would
move the cursor of the builder that is later used to insert descriptor
prefetches, emitting them at the wrong place. Fix this by resetting the
cursor before emitting the prefetches.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: e7ac1094f6 ("ir3: rematerialize preamble defs in block dominated by sources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33399>
2025-02-05 14:58:38 +00:00
Valentine Burley
e192d7d615 intel/ci: Update expectations for Xe
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
12ddff54ba intel/ci: Use INTEL_XE_IGNORE_EXPERIMENTAL_WARNING to reduce warnings
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
0d1fa0f1a3 intel/dev: Provide a toggle to avoid warnings about unsupported devices
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
fcd5d25888 intel/ci: Load Xe instead of i915 on ADL
Xe doesn't probe on ADL without being explicitly forced through cmdline
arguments.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
93c5abd32b intel/ci: Add newer i915/ADL-P firmware to rootfs
Add updated Alder Lake P firmware directly to the rootfs, as it is newer
than the version available in the Debian package. This is required for
the Xe kernel driver and is recommended for i915.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
f736f19642 intel/ci: Drop redundant BOOT_METHOD variables
The BOOT_METHOD is defined in .intel-common-test, which every Intel
job inherits, including the zink jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
b2105fe162 ci/lava: Allow passing extra cmdline arguments
The LAVA_CMDLINE variable is appended to extra_nfsroot_args.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
9950dfcd80 ci: Use new kernel with Intel Xe driver
The only change since the previous kernel is the enabling of
CONFIG_DRM_XE.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
8a54823db9 ci/intel-gpu-freq: Add Xe support
Intel switched to exclusively using per-tile sysfs interfaces in Xe.
The locations and names of the sysfs attributes also changed compared
to i915, so update the intel-gpu-freq.sh script to work with both KMDs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Mary Guillemard
e3b8d1da6d panvk: Disallow unknown GPU models early in physical device init
We rely on the panfrost_model details around the codebase, if it's not
known this is a problem.

As a result, we will now disallow anything that isn't known like what
we do on Gallium.

Fixes: c95ef9e323 ("panvk: Fix NULL deref on model name when device isn't supported")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Suggested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
0e7ac7d65f panfrost: Properly name CSF instruction UMIN32 source 0
Was named source 2, but it's actually source 0.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
7bb6ebe938 pan/decode: Fix indirect branch calculation for 64-bit
THe enum variant for u64 was actually 32-bit making all 64-bit operation
wrong.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d0dc3d30c ("pan/decode: Add a helper to print CS binaries without interpreting them")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
135aeddc9b pan/bi: Use 2D dimension with TEX_FETCH with CUBE on Valhall
TEX_FETCH doesn't have the CUBE dimension, this was working on v9 and
v10 but this fails on Avalon.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: ce52b6d359 ("pan/bi: Rework indices for tex on Valhall")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
c36326d3af pan/bi: Remove b3210 from valid swizzle
This was removed on v11, we currently don't use it so to ensure no one
start using it, let's just mark it as reserved.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
b00c09b920 pan/bi: Fix invalid CLPER encoding
This src1 expect lanes, isn't widen and have a size of 8-bit (5-bit on
Valhall, 4-bit on Avalon)

We also now disallow swizzle lowering on it. (even on Bifrost)

Fixes: 316486dd9f ("pan/va: Add initial ISA.xml for Valhall")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
637cb0a993 pan/bi: Remove shift lanes invalid encodings
We were wrongly defining values that select more than one byte.

The swizzle used for H01 was working fine for v9 and v10, but this
generate an invalid encoding on Avalon.

This fixes this by using B00 variant as we are only using 8-bit sources.

Fixes: f45654af59 ("pan/va: Add packing routines")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
fbd5d58e36 pan/bi: Properly encode LEA_BUF_IMM
We were hardcoding table 61 and index 0 for IDVS based usage and this
could have been misused.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f45654af59 ("pan/va: Add packing routines")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
38a3cd8c76 panfrost: Fix PROGRESS_LOAD destination register
The offset of dest should be 40, not 48.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
05c2abcfea panfrost: Fix group priorities in drm-shim
Those were supposed to use BITFIELD_BIT.

Fixes: 2237cff1af ("panfrost: Report default value for GROUP_PRIORITIES_INFO in drm-shim")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Faith Ekstrand
555b8580ae nak: Fix cbuf textures
Somewhere between writing c1510ad72e ("nak: Optimize bindless to cbuf
textures on Volta+") and me rebasing it a year later, we switched to
using the NV-specific ldc_nv intrinsic for cbuf loads.  It's basically
the same as load_ubo but we're detecting the wrong intrinsic so the
optimization does nothing.

Fixes: c1510ad72e ("nak: Optimize bindless to cbuf textures on Volta+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33398>
2025-02-05 13:02:46 +00:00
Erik Faye-Lund
4d86a1c928 pan/ci: add flaky tests to the flake-list
These have been switching between failing and passing recently. Not
really sure what's going on here, but we don't want the CI to flip
randomly between failing and passing, so let's mark them as flakes.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33381>
2025-02-05 12:38:16 +00:00
Erik Faye-Lund
6f70425ef5 panvk/ci: add back incorrectly removed crash
Turns out, this was only fixed on G610, not on G52.

Fixes: f93a48e4e3 ("panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33381>
2025-02-05 12:38:16 +00:00
Georg Lehmann
ed675272f4 nir/lower_poly_line_smooth: use intrinsics_pass
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
998e2299f7 nir/lower_poly_line_smooth: don't reject fp16
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
ff225dee67 radv: inline radv_nir_lower_poly_line_smooth
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
b588b56078 radv: remove radv_should_lower_poly_line_smooth
I think this was broken as there might be a store_output with
less than 4 components to a location that shouldn't be smoothed
anyway (i.e. not the first one).

nir_lower_poly_line_smooth now handles the case where the first location
doesn't have 4 components.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
359ba65903 nir/lower_poly_line_smooth: support partial store_output
RADV needs this to skip if there is no alpha component

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
6c410456d9 nir/lower_poly_line_smooth: only smooth first color target
The VK spec says:
coverage value is multiplied into the color location 0’s
alpha value after fragment shading

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:34 +00:00
Georg Lehmann
534c2ceac8 nir/lower_poly_line_smooth: don't emit control flow
The if is really short so it should really use a conditional select,
but this pass is called too late go through all the usual lowerings
and opts.

Foz-DB Navi21:
Totals from 1128 (1.42% of 79377) affected shaders:
MaxWaves: 29358 -> 29342 (-0.05%)
Instrs: 552306 -> 549668 (-0.48%); split: -0.58%, +0.10%
CodeSize: 2796392 -> 2782360 (-0.50%); split: -0.59%, +0.08%
Latency: 2574361 -> 2566482 (-0.31%); split: -0.47%, +0.16%
InvThroughput: 644047 -> 647500 (+0.54%); split: -0.18%, +0.72%
Copies: 37521 -> 36460 (-2.83%); split: -2.92%, +0.09%
Branches: 12009 -> 10157 (-15.42%)
VALU: 350886 -> 349199 (-0.48%); split: -0.64%, +0.16%
SALU: 104459 -> 105415 (+0.92%); split: -0.00%, +0.92%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:34 +00:00
Daniel Schürmann
1a8a643bbd aco/isel: track control flow divergence in loops more accurately
We introduce two new variables, cf_context::in_divergent_cf and
cf_context::parent_loop.has_divergent_break, in order to determine
whether there is any other invocations on a different CF path.

Totals from 1305 (1.64% of 79395) affected shaders: (Navi31)

Instrs: 659211 -> 657815 (-0.21%); split: -0.22%, +0.01%
CodeSize: 3483228 -> 3477960 (-0.15%); split: -0.16%, +0.01%
VGPRs: 68820 -> 48048 (-30.18%)
Latency: 14197750 -> 14170767 (-0.19%); split: -0.26%, +0.07%
InvThroughput: 1619103 -> 1619826 (+0.04%); split: -0.02%, +0.07%
VClause: 12384 -> 12350 (-0.27%)
SClause: 26693 -> 26844 (+0.57%); split: -0.01%, +0.57%
Copies: 44994 -> 43535 (-3.24%); split: -3.26%, +0.02%
PreSGPRs: 49007 -> 48907 (-0.20%)
PreVGPRs: 32171 -> 32121 (-0.16%)
VALU: 349984 -> 349857 (-0.04%); split: -0.04%, +0.00%
SALU: 84252 -> 83988 (-0.31%); split: -0.32%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
583c3586fe aco/isel: remove loop nest information from exec_info
Since we never enter loops with an empty exec mask, and the
control flow is structured, we don't need to consider the
loop nest depth.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
a77258346c aco/isel: fix assumptions about potential empty exec mask in nested control flow
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
44216e035f aco/isel: add and use exec_info::empty() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
8e8398832c aco/isel: use cf_context in loop_context to restore cf information
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
8b9c9fb904 aco/isel: use cf_context in if_context to restore cf information
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
c2bfc05d71 aco/isel: rename cf_context::has_divergent_branch
Make it more consistent with cf_context::has_branch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
0c5a91b9f2 aco/isel: move cf_info into separate struct cf_context
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
61fa007e48 aco/isel: fix empty exec tracking for uniform branches
Totals from 5 (0.01% of 79395) affected shaders: (Navi31)

Instrs: 54730 -> 54715 (-0.03%)
CodeSize: 276928 -> 276852 (-0.03%)
Latency: 215212 -> 214874 (-0.16%)
InvThroughput: 40154 -> 40150 (-0.01%)
Copies: 6824 -> 6821 (-0.04%); split: -0.06%, +0.01%
Branches: 1625 -> 1615 (-0.62%)
SALU: 5682 -> 5678 (-0.07%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Benjamin Lee
bd32129c1a panvk: document missed extensions in new_features
This should have been included in the commits that introduced the
extensions.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 00fb0f5ec2 ("panvk: enable KHR_separate_depth_stencil_layouts")
Fixes: 935cadbc2e ("panvk: enable VK_KHR_depth_stencil_resolve")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33394>
2025-02-05 10:46:48 +00:00
Valentine Burley
a4b8131255 zink/ci: Make zink-venus-lvp-full a nightly job
The zink-venus-lvp-full job was intended to be a nightly job, but it
was missing the proper manual rules for that.

Fixes: 7bf4d6a4db ("zink/ci: Add a fraction for zink-venus-lvp")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Martin Roukala <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33393>
2025-02-05 10:25:01 +00:00
Lionel Landwerlin
a8b84e1898 anv: use A64 messages for push constants loads on Gfx12.5+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:04 +00:00
Lionel Landwerlin
5c17299084 brw: enable A64 pulling of push constants
This will be useful for pulling constants in device bound shaders. A64
allows us to put the constants anywhere.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:04 +00:00
Lionel Landwerlin
0808125914 brw/anv: rework push constants for mesh/task shaders
Now using the same model as the compute shader.

As a result we temporarily disable the use of the Inline register for
providing push constants on Task & Mesh shaders. Since that register
is also available on the compute shader we'll try to find a way to use
the same mechanism for all 3 shaders in another MR and bring back that
optimization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:04 +00:00
Lionel Landwerlin
a77e532248 anv: add a helper for getting gfx push constant addresses
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
26347b4876 anv: use heap size to program generate state heap
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
ddf64a7d95 anv: track the first 2MB of unused VA
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
48e41c87b0 anv: increase general state pool
We'll start store more push constants in there.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
75e09c4ff3 anv: reuse helper for compute push constants
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
c08b437db7 brw: fixup scoreboarding for find_live_channels
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Qiang Yu
09b5de379c gallium/ddebug: add missing modifier callback
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33391>
2025-02-05 09:26:22 +00:00
Qiang Yu
da023a5a19 ac/surface: fix radv import dmabuf from radeonsi
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33391>
2025-02-05 09:26:22 +00:00
Samuel Pitoiset
f095aaf819 radv/meta: stop using string keys also for DGC and query objects
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33379>
2025-02-05 08:25:00 +00:00
Iago Toral Quiroga
886d720c19 mesa: fix RGBA_SIGNED_COMPONENTS for lowered signed luminance
Some drivers implement luminance as RGBA. Since the code checks the
renderbuffer format instead of the internal format this can cause the
query to incorrectly return "signed" on the Alpha component for signed
luminance formats.

Fixes the following Piglit test for various drivers (at least Panfrost
and V3D):
spec/ext_packed_float/query-rgba-signed-components

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33372>
2025-02-05 07:41:51 +00:00
Iago Toral Quiroga
a6dc8fa426 v3dv: fix missing access bit flag when checking for texel buffer reads
VK_ACCESS_2_SHADER_READ_BIT matches all types of reads from shaders,
texel buffers too.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33367>
2025-02-05 07:04:35 +00:00
Martin Roukala (né Peres)
5adf305fe6 ci: re-enable austriancoder's farm
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
183ffe86b7 etnaviv/ci: convert from baremetal to CI-Tron
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
f72ee5e587 ci/b2c: de-duplicate the download of install.tar
By having the DUTs download and extract from a CI-Tron artifact, we
deduplicate the downloading of the build artifact across all DUTs from
a CI farm, leading to quicker and more reliable jobs, and lower
bandwidth usage on both FD.o and the CI gateway.

Inside the CI-Tron infra, this should also drastically reduce the job
submission time by removing needless copies (executorctl -> executor,
executor -> S3, S3 -> B2C, and even B2C -> NBD when applicable).

As an additional bonus, the size of install.tar is reduced by virtue of
zstd providing better compression than zip/deflate.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
ab3c0c4fa3 ci/b2c: add support for diskless DUTs
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
9ae0b1c467 ci/image-tags: bump the debian base tag
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
596cfbbed1 ci/debian/test-vk: trim down the container on a per-arch basis
Not every architectures has jobs requiring every features provided by
the VK test container, so let's trim it down a bit by disabling the
features that are not needed.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
39969409f6 ci/debian/test-vk: remove software-properties-common
This is not needed anymore (as of 85dace1c0b) and it tries to
pull systemd which breaks the build.

Fixes: 85dace1c0b ("gitlab-ci: remove software-properties-common")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
d24c68f11f ci/test: add arm32 b2c jobs
They will be used by etnaviv jobs in the following commits.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
9c5f0de7ac ci: Add debian/arm32_test-* images
Same as arm64, but with fewer bits.

v2 (Martin Roukala):
 - Dropped some LAVA-specific changes
 - Use FDO_DISTRIBUTION_PLATFORM to select the platform

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
2cc807b418 ci/build-deqp: delegate the deqp main commit check to github
Rather than downloading the full history of deqp just to check a merge
base, let's ask github for this information directly.

This fixes the deqp build on arm32 platforms which do not have enough
address space to run git fetch on such a large repo.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
cd7ec5403d ci-templates: update to the latest upstream version
This version brings support for cross-compiling containers, which will
important to build arm32 containers on arm64.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
175b6d02ea ci: Move apitrace to test-base container
Instead of building apitrace in each of test-gl and test-vk, just build
it straight into test-base.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
3be9d71537 ci: Move common testing packages to test-base
Both test-gl and test-vk install a bunch of stuff which is required to
just run tests. Instead of copy and pasting a bunch of random stuff into
derived containers, just keep it in the base container. Technically this
makes both containers very slightly larger, but the additions here pale
into comparison with 700MB of mostly-unused Proton, 400MB of deqp-vk
mustpass, etc.

v2 (Martin Roukala):
  * Move spirv-tools to the list of dependencies as it is needed by
    python3-renderdoc

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
930b4009e1 ci/vvl: Use appropriate level of parallelism
The whack-a-mole continues ...

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
3e05307bee ci/test/b2c: do not download the debian/*_test-(gl|vk) artifacts
There are no artifacts there that we need, so let's not waste time
making requests to GitLab.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
d450d9c70b ci: be explicit about the fact HW jobs do not need linter artifacts
Not sure if it will change anything, but better be safe than sorry.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
978c0989eb ci: fix the artifact name
This has probably no incidence on anything else but human-visible names
but let's fix it anyway.

Fixes: ef3091736c ("ci: use CI_PROJECT_NAME for artifacts name")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Dave Airlie
44b88c1034 radv/video: add h264 b frame encoding support.
This is supported on VCN 3 and newer.

Acked-by: David Rosca <nowrep@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31104>
2025-02-05 04:11:38 +00:00
Dave Airlie
717c85d08a radv/video: calculate colloc buffer size for h264 B frames.
This adds the overheads for the colloc buffer needed when
B frames are enabled.

Acked-by: David Rosca <nowrep@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31104>
2025-02-05 04:11:38 +00:00
Dave Airlie
19b27c77bd radv/video: move encoder to using a buffer instead of an image
For the encoder DPB just allocate a buffer of storage, this should
align memory usage more with what radeonsi does.

Acked-by: David Rosca <nowrep@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31104>
2025-02-05 04:11:38 +00:00
Qiang Yu
adc51bea28 doc,src: replace doc and comments for shader and compute cap
Use command:
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_SHADER_CAP_\([A-Za-z0-9_]*\)/pipe_shader_caps.\L\1/g' {} +
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_COMPUTE_CAP_\([A-Za-z0-9_]*\)/pipe_compute_caps.\L\1/g' {} +

Also remove value type in pipe_compute_caps doc because they
are explicit in struct now.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
f020ab18e1 gallium: remove screen shader and compute get param callback
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
cb251ff3d0 gallium/aux: remove aux shader param get function
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
4e0f722fc1 zink: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
aaf865cdf2 virgl: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
27c4ac1c10 vc4: remove shader get param
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
e51b32e7e9 v3d: remove shader and compute get param
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
b3ae0e6054 tegra: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
d353965473 svga: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
b2c981183c softpipe: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
7ca3618c01 radeonsi: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
ba2e6ae8f8 r600: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
809b5728a2 r300: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
bdd59c1cd5 panfrost: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
5667133413 nouveau/nvc0: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
98529b9b65 nouveau/nv50: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
8d9890c0e0 nouveau/nv30: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
d32c928038 llvmpipe: remove shader and compute get param
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
5de8258303 lima: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
0f9f7152f7 iris: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
5a3ac70015 i915: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
02ca28b5ca freedreno: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
a5b58b8c88 etnaviv: remove shader get param
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
e1010edbc0 d3d12: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
aa12b9bb83 crocus: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
5b251ed5d0 asahi: remove shader and compute get param
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
c46aacc216 rusticl: replace get_compute_param with pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
e08664cf85 rusticl: replace get_shader_param with pipe_shader_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
0911b13d70 gallium,mesa: replace get_compute_param with pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
961a9c3a43 clover: replace get_compute_param with pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
1cc42f1493 gallium,mesa: replace get_shader_param with pipe_shader_caps access
Use command:
  find . -type d -path "./.git" -prune -o -type f -exec sed -i -E ':a;N;$!ba;s/->get_shader_param\(([[:space:]]*[^,]*),([[:space:]]*)([^,]*),([[:space:]]*)PIPE_SHADER_CAP_([A-Za-z0-9_]+)\)/->shader_caps[\3].\L\5/g' {} +

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
916bdf0892 lavapipe: change min shader param to use pipe_shader_caps
MSVC does not support GCC ({}) macro extension, so have to
use offsetof().

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
12f420ceba nine: GET_SHADER_CAP use pipe_shader_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
3ffa83cc6a zink: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:46 +08:00
Qiang Yu
a18cf7cac3 virgl: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
c78018c552 vc4: init shader caps
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
0a1d1e47c9 v3d: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
c312ca70bc tegra: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
69f38859f3 svga: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
bae9812092 softpipe: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
42d6c1245d radeonsi: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
390854e523 r600: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
61a0a4ee67 r300: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
5b782f5570 panfrost: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
2d194637c5 nouveau/nvc0: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
b2e1fcbe01 nouveau/nv50: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
a242c6ee3c nouveau/nv30: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
a65b74af51 llvmpipe: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
3450274f78 lima: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
36534ec18d iris: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
29d0b4ccde i915: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
a0a6b70666 freedreno: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
99605fb3a8 etnaviv: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
332502d9a2 d3d12: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
9a9a61a143 crocus: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
1b348d3a3e agx: init shader and compute caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
87cc79126d draw: add draw_init_shader_caps
Mapped from draw_get_shader_param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
02903e150e gallivm: add gallivm_init_shader_caps
Mapped from gallivm_get_shader_param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
19240e0fea tgsi: add tgsi_exec_init_shader_caps
Mapped from tgsi_exec_get_shader_param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
379b3a782d gallium: copy shader and compute caps for ddebug/noop/trace
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
7b838218eb gallium: add pipe_shader_caps and pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
0a5c8853ab gallium,mesa: remove ir_type param when get_compute_param
We are going to convert compute cap query to struct access,
so remove this param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
55be769f6d radeonsi: init compute caps without ir_type param
Only PIPE_COMPUTE_CAP_*_CLOVER are queried with PIPE_SHADER_IR_NATIVE,
other caps will be always queried with PIPE_SHADER_IR_NIR.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
a1e039dd35 r600: init compute caps without ir_type param
Only clover caps use different value.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
8a6eb7041e gallium,clover: add compute caps used by clover only
To remove ir_type param when get_compute_param. These caps depend
on IR type and used by clover only (only clover query with
PIPE_SHADER_IR_NATIVE, others query with PIPE_SHADER_IR_NIR).
Only r600 and radeonsi support PIPE_SHADER_IR_NATIVE.

These caps can be removed when clover is deprecated.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
2af8172b62 gallium: fix ddebug and noop screen caps init
Fixes: a036231c09 ("gallium: add u_init_pipe_screen_caps")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
0f656756ec lavapipe: fix min_vertex_pipeline_param
Fixes: d91a549b67 ("lavapipe: check all vertex-stages")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Benjamin Lee
00fb0f5ec2 panvk: enable KHR_separate_depth_stencil_layouts
Panvk doesn't use image layouts for anything, so we don't need any
changes to support this.

New fails in g52 CI expectations are *_separate_layouts variants of
existing failing tests, that were previously skipped.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33179>
2025-02-04 22:51:53 +00:00
Benjamin Lee
935cadbc2e panvk: enable VK_KHR_depth_stencil_resolve
This has been supported since baf8570b28,
where depth/stencil resolve was added at the same time as color resolve.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33179>
2025-02-04 22:51:53 +00:00
Yiwei Zhang
1885ff8a39 venus: refactor more to image format props sanitization
The external memory properties fix can be done once and cached. To be
noted, VkAndroidHardwareBufferUsageANDROID is a driver side struct so
will stay outside the cache.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33389>
2025-02-04 22:29:49 +00:00
Yiwei Zhang
5d440a7d97 venus: further sanitize image props for rgba10x6
ycbcr sampler conversion requires VK_SAMPLE_COUNT_1_BIT. This is needed
before we support VK_EXT_rgba10x6_formats.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33389>
2025-02-04 22:29:49 +00:00
Jung-uk Kim
f9fc7392fa FreeBSD: Disable support for "-mtls-dialect" for FreeBSD
Clang 19 supports "-mtls-dialect=" but FreeBSD does not support "-mtls-dialect=gnu2".
Skip auto-detection for FreeBSD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31931>
2025-02-04 19:18:44 +00:00
Erik Faye-Lund
e49df902b4 panvk: report strictLines as true
We are implementing the line rasterization as per the spec, so we should
report strictLines as true. This matches what the DDK does as well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33373>
2025-02-04 18:55:29 +00:00
Erik Faye-Lund
1d64095410 panvk: fix line-rasterization of bifrost
Vulkan defines the line rasterization to *always* use perpendicular
rather than aligned line ends (unless otherwise specified by
VK_EXT_line_rasterization). So let's remove the code that conditionally
sets the bit, we always want the default value (0) here.

It might seem confusing because we kinda named this field wrong. It's
really about perpendicular vs aligned line ends. That's a cleanup we
might want to deal with later, but deleting the assignment is sufficient
to fix this issue. This is also what we do for v10.

This was probably just copied from the Gallium-driver, where this logic
is more or less correct.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33373>
2025-02-04 18:55:29 +00:00
Aaron Ruby
4ea4b6c98b gfxstream: Replace pre-processor (LINUX && !ANDROID) checks with LINUX_GUEST_BUILD
My understanding is that (Linux && !Android) is practically what is meant by
LINUX_GUEST_BUILD. Let's be consistent about this.

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33364>
2025-02-04 17:37:15 +00:00
Karol Herbst
bb6d371c0e rusticl: support SPIR-V 1.5 and 1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
2025-02-04 15:49:58 +00:00
Karol Herbst
2f4931353f rusticl/kernel: call nir_lower_variable_initializers earlier
Fixes spirv_new spirv14_nonwriteable_decoration

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
2025-02-04 15:49:58 +00:00
Karol Herbst
48f93e7313 clc: bump SPIR-V target to 1.6
We depend on a new enough SPIRV-Tools, so we can bump this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
2025-02-04 15:49:58 +00:00
James Hogan
7f493b45ae mesa: Fix FramebufferTextureMultiviewOVR num_views check
The check in check_multiview_texture_target() whether numViews <= 0 (as
required by the OVR_multiview spec) is never triggered since it is only
called by frame_buffer_texture() when numviews > 1, as numviews of 0 is
passed in by non multiview FramebufferTexture functions. Such cases are
incorrectly treated as non-multiview attachments.

Tweak frame_buffer_texture() to take an extra bool argument "multiview"
to distinguish between a multiview call with numviews=0, and a
non-multiview call.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
2025-02-04 15:12:53 +00:00
James Hogan
39491da1b6 mesa: Fix multiview attachment completeness check
Fix the FBO attachment completeness test to ensure that multiview
attachments have all views referring to layers in range of the
underlying texture.

The OVR_multiview spec states:
  Add the following to the list of conditions required for framebuffer
  attachment completeness in section 9.4.1 (Framebuffer Attachment
  Completeness):

  "If <image> is a two-dimensional array and the attachment
  is multiview, all the selected layers, [<baseViewIndex>,
  <baseViewIndex> + <numViews>), are less than the layer count of the
  texture."

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
2025-02-04 15:12:53 +00:00
James Hogan
b774b615d2 glsl: Expose gl_ViewID_OVR back to GLSL 1.30
OVR_multiview requires OpenGL 3.0, so expose gl_ViewID_OVR builtin back
to GLSL 1.30 on OpenGL.

v2: Minor whitespace fix

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
2025-02-04 15:12:53 +00:00
Hyunjun Ko
bf88b9b324 kopper: implement to get sync values.
v1. Makes special_event a member of struct dri_drawable to be re-used.
(Michel Dänzer @daenzer)

v2. Guard with VK_USE_PLATFORM_XCB_KHR and clean-up.
(Mike Blumenkrantz @zmike)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474>
2025-02-04 14:36:05 +00:00
Hyunjun Ko
e8d335d496 dri: fix a build error
Fixes error:
`struct pipe_context' declared inside parameter list will not be visible outside of this definition or declaration`

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474>
2025-02-04 14:36:05 +00:00
Martin Krastev
cf36476961 svga/ci: disable vmware farm
Take down vmware farm for maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: Jose Fonseca <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33375>
2025-02-04 15:27:07 +02:00
Tapani Pälli
4a41564619 intel/common: fix mi_builder_test issue
Fixes intel_gfx20_mi_builder_test failures on LNL.

Fixes: bb31287d24 ("intel: Initialize upper 32bits of drm_xe_sync.handle")
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/33366>
2025-02-04 12:57:19 +00:00
Faith Ekstrand
c1510ad72e nak: Optimize bindless to cbuf textures on Volta+
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Faith Ekstrand
272e8ec461 nak: Add support for bound and cbuf textures
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Faith Ekstrand
16b6ea415f nvk: Only pass sampler handles when needed
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Faith Ekstrand
2be01df8df nvk,nak: Only use u64 texture handles with codegen
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Pavel Ondračka
60e1bc55bf ci: fix debian-build-testing BUILDTYPE
Fixes: 5b291c7ce6
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33368>
2025-02-04 09:33:09 +00:00
Tapani Pälli
4064b5546b intel/dev: reduce warning noise from urb settings
This sets up the min value as if stage was active, later on
we set this to zero if such is not the case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12141
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/33353>
2025-02-04 09:07:48 +00:00
Tapani Pälli
4e80045ae0 intel/genxml/anv: fix the layout of call stack handler struct
Patch adds new CALL_STACK_HANDLER struct which has offset to
start and end of RegistersPerThread field, this spec changes is
described in Wa_22019854901 (see HSD 22019967134).

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/33342>
2025-02-04 08:44:04 +00:00
Samuel Pitoiset
5b856a741d radv: advertise computeDerivativeGroupQuads on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303>
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
bd8575ebd3 radv: implement derivative group quads on GFX12
It's natively supported by the hw.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303>
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
5fb23f29fe radv/nir: update radv_nir_opt_tid for derivative group quads
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303>
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
7d3062470f radv/meta: add missing pipeline lookups
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33360>
2025-02-04 07:52:01 +00:00
Giovanni Mascellani
08777e5ba9 llvmpipe: Remove an outdated comment about subclassing pipe_screen.
It seems that llvmpipe_screen very much exists and is indeed a
subclass of pipe_screen.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33343>
2025-02-04 07:00:08 +00:00
Benjamin Lee
effa913d16 panvk: advertise storagePushConstant16 and storageInputOutput16
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
3497069a04 panfrost: support 16-bit varyings
This is complicated by two things: mediump varyings, and the lack of u16
regfmt support in LD_VAR.

With mediump, a load(_interpolated)_input with a 16-bit dest size may
either be an explicit 16-bit type or a mediump type lowered by
nir_lower_mediump_io. With explicit 16-bit types, we write 16-bit values
in the VS, but with mediump we write 32-bit in the VS (for messy
reasons). bi_emit_load_vary needs to distinguish these cases by checking
for a mediump type, and set the appropriate source_format to convert the
type on the LD_VAR_BUF path. Types like 'mediump uint16' are luckily not
allowed.

The missing u16 regfmt for LD_VAR means that we take the obvious
approach for 16-bit int varyings of emitting 16-bit int formats in the
attribute descriptor and loading them to u16. Instead, we just
write/read all 16-bit varyings as f16 regardless of type. Unlike with
mediump, we don't need to do any 32bit->16bit conversion when loading in
the FS, so as long as we use the same type between the attribute
descriptor and LD_VAR, the conversion is a no-op and the mismatch
doesn't matter.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
1b359f3e59 panfrost: support 16-bit vertex attributes
There is no auto32 equivalent for 16-bit types, we need to select
specific register formats.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
02dc105a36 panfrost: move handling for bifrost mediump lowering to pan_collect_varyings
For Bifrost and newer, we always write mediump varyings from a 32-bit
source in the VS. This is needed because the FS does not unconditionally
lower mediump to 16-bit.

Previously we worked around this in panvk by replacing 16-bit formats
with 32-bit in emit_varying_descs, but once we support
storageInputOutput16, we will need to preserve 16-bit formats for
explicit 16-bit varyings.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
26ba20be51 panfrost: minor refactors in preparation for panvk 16-bit IO
Neither of these changes are a behavior difference. The change to
emitting uint16 formats from pan_collect_varyings for PSIZ is
inconsequential because neither panvk nor the gallium driver emit
attribute descriptors for special varyings.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Rebecca Mckeever
58bd1356cc pan/texture: Only use plane_chroma_2p for chroma planes
In a 3-plane uncompressed YUV surface, only the chroma planes should use
MALI_PLANE_TYPE_CHROMA_2P plane_type or set secondary_pointer.

Fixes: 144f9324a3 ("panfrost: prepare v9+ to support YUV sampling")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
2025-02-04 01:29:39 +00:00
Rebecca Mckeever
23aa784c05 pan/format: Use HW version to determine siting for YUV 422 formats
On v10, only YUV 420 formats support center_y or center siting.

On previous HW versions, YUV 422 formats support center_y siting but not
center_x or center siting.

Fixes: 83c76cceaf ("panfrost: advertise YUV formats for valhall")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
2025-02-04 01:29:39 +00:00
Casey Bowman
1da221427e vulkan/screenshot-layer: Add RGBA surface format support
The mesa screenshot layer attempts to use VK_FORMAT_R8G8B8_UNORM by
default. Using this, we can directly & efficiently write out to a
PNG file without further modifications. However, some GPUs don't
support the given format, so for those that don't, we'll attempt to
use VK_FORMAT_R8G8B8A8_UNORM, which will require some work to ensure
the alpha values are set to opaque to make RGB comparisons easier.

If both surface formats fail, a more descriptive failure
will be shown.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33295>
2025-02-04 00:51:35 +00:00
Caio Oliveira
96de531b5a anv: Add statistic for 'GRF registers' for Xe3+
For Xe3+ the registers are tightly packed to make better use of GRF
space, so add a statistic to keep track of how many registers were used.
For previous versions this is not useful since the code is spreading
the registers among the whole space.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33311>
2025-02-04 00:33:46 +00:00
Dylan Baker
07787f3208 intel: output a depfile with mesa_clc
This helps Ninja to more accurately rebuild when secondary inputs
changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33309>
2025-02-04 00:10:01 +00:00
Caio Oliveira
92085e7bab intel/brw: Remove 'fs' prefix from brw_from_nir functions
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33330>
2025-02-03 23:08:11 +00:00
Caio Oliveira
1332d84500 intel/brw: Rename file brw_fs_nir.cpp to brw_from_nir.cpp
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33330>
2025-02-03 23:08:11 +00:00
Adam Jackson
25707b57bc lvp: set subgroupQuadOperationsInAllStages to true
This enables them for task and mesh shaders, which for lvp are just
fancy compute shaders, and it's not like gallivm has any real awareness
of the stage it's emitting code for anyway.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32632>
2025-02-03 22:41:16 +00:00
Pavel Ondračka
c031a53a78 r300: copy propagate constant swizzles
For example:
SIN temp[1].x, temp[0].x___;
MOV temp[1].y, none._1__;
ADD temp[2].xyz, temp[1].xy__, const[0].ww__;

could be transformed into

SIN temp[1].x, temp[0].x___;
ADD temp[0].xyz, temp[1].x1__, const[0].ww__;

Shader-db RV410:
total instructions in shared programs: 112613 -> 112451 (-0.14%)
instructions in affected programs: 15613 -> 15451 (-1.04%)
helped: 148
HURT: 1
total temps in shared programs: 18149 -> 18129 (-0.11%)
temps in affected programs: 297 -> 277 (-6.73%)
helped: 21
HURT: 2
total cycles in shared programs: 169432 -> 169273 (-0.09%)
cycles in affected programs: 17779 -> 17620 (-0.89%)
helped: 145
HURT: 4

RV530:
total instructions in shared programs: 128650 -> 128443 (-0.16%)
instructions in affected programs: 21647 -> 21440 (-0.96%)
helped: 206
HURT: 4
total temps in shared programs: 17014 -> 17010 (-0.02%)
temps in affected programs: 216 -> 212 (-1.85%)
helped: 11
HURT: 6
total cycles in shared programs: 190719 -> 190523 (-0.10%)
cycles in affected programs: 28892 -> 28696 (-0.68%)
helped: 203
HURT: 8

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275>
2025-02-03 22:13:32 +00:00
Pavel Ondračka
9835a2df83 r300: do not limit maximum TEX group for R300/R400
We do not have the TEX semaphore there anyway so the benefits are not as
high as with R500 and the chances of running out of TEX indirections are
just too high.

This will increase the register pressure in some shaders, but I believe
the gained shaders are worth it and there is also some cycles reduction
in some cases. I'm not sure how to optimize this further without
actually clonning the shader before the pair shceduling and than doing a
trial and error to see if there is some compromise where we can just hit
the indirection limit to not group it too much...

Shader-db RV410:
total instructions in shared programs: 112800 -> 112825 (0.02%)
instructions in affected programs: 5024 -> 5049 (0.50%)
helped: 23
HURT: 19
total temps in shared programs: 18170 -> 18244 (0.41%)
temps in affected programs: 1365 -> 1439 (5.42%)
helped: 39
HURT: 34
total cycles in shared programs: 169535 -> 166806 (-1.61%)
cycles in affected programs: 14229 -> 11500 (-19.18%)
helped: 84
HURT: 4

LOST:   0
GAINED: 8

GAINED: shaders/godot3.4/34-59.shader_test FS
GAINED: shaders/lightsmark/25.shader_test FS
GAINED: shaders/lightsmark/28.shader_test FS
GAINED: shaders/lightsmark/34.shader_test FS
GAINED: shaders/this-war-of-mine/144.shader_test FS
GAINED: shaders/this-war-of-mine/145.shader_test FS
GAINED: shaders/tropics/432.shader_test FS
GAINED: shaders/tropics/462.shader_test FS

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275>
2025-02-03 22:13:32 +00:00
Pavel Ondračka
b3bd769957 r300: remove some dead code in redeon_program_alu
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275>
2025-02-03 22:13:32 +00:00
Samuel Pitoiset
9993f3dd6a ac,radv,radeonsi: add new GFX12_DCC_WRITE_COMPRESS_DISABLE tiling flag
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33301>
2025-02-03 21:12:07 +00:00
Mike Blumenkrantz
3064bfc312 zink: guard rebar check against fallback heap detection
if there is no heap with device-local and host-visible, then
rebar cannot exist. the previous detection did not account for
the rebar heap using the device-local fallback, which of course
would have the same size as the device-local heap and pass the threshold
check

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33359>
2025-02-03 20:42:26 +00:00
Roland Scheidegger
8aae760144 llvmpipe: don't assert on exceeding if_stack size
Rather than assert (and otherwise write past the array size), guard against
this (and miscompile the shader), to make the code more robust.
This mimics the behavior of exceeding the cond_stack size (and other similar
stacks) - the if_stack is only used together with the cond_stack, the behavior
should be the same.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33338>
2025-02-03 19:58:45 +00:00
Jon Hunter
9cc0b497b3 freedreno/registers: Fix gen_header.py for older python3 versions
The gen_header.py script is failing for older versions of python3 such
as python 3.5. Two issues observed with python 3.5 are ...

 1. Python 3 versions prior to 3.6 do not support the f-string format.
 2. Early python 3 versions do not support the 'required' argument for
    the argparse add_subparsers().

Fix both of the above so that older versions of python 3 still work.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28780>
2025-02-03 19:26:35 +00:00
Dmitry Baryshkov
84e93daa26 freedreno/registers: allow skipping the validation
We don't need to run the validation of the XML files if we are just
compiling the kernel. Skip the validation unless the user enables
corresponding Kconfig option. This removes a warning from gen_header.py
about lxml being not installed.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28780>
2025-02-03 19:26:35 +00:00
Rob Clark
9540139f43 freedreno+tu: Add new virtgpu caps
Avoid some extra round-trips at startup if the host is new enough.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33339>
2025-02-03 18:56:37 +00:00
Juan A. Suarez Romero
0ee5015da4 Revert "st/mesa: move VS & TES output stores to the end before unlowering IO"
This reverts commit 3290222a1a, which was
introduced to fix a regression that only happens in v3d.

As this was moved to the v3d driver, it does not makes any sense more to
do it here.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33310>
2025-02-03 17:10:48 +00:00
Juan A. Suarez Romero
1e0e521a7d broadcom/compiler: move stores to the end of shader
It is possible that shader comes with output stores executed before
loading inputs. As the memory to read the inputs and store the outputs
is the same, this mean it could be overwriting the inputs before reading
them.

This move avoids this situation.

This partially improves
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33310>
2025-02-03 17:10:47 +00:00
Jordan Justen
0e648a238e intel/dev: Add BMG PCI IDs (0xe210, 0xe215, 0xe216)
Backport-to: 24.3
Backport-to: 25.0
Ref: https://patchwork.freedesktop.org/patch/msgid/20250128162015.3288675-1-shekhar.chauhan@intel.com
Ref: bspec 68090
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33335>
2025-02-03 08:15:01 -08:00
Konstantin Seurer
3ab55b3c51 radv/meta: Stop using strings for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
32e0e8c8c5 hk: Stop using strings or common key types for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
db4277adf8 vulkan/meta: Stop using strings for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
1bba4cf21b vulkan/meta: Remove object types from vk_meta_object_key_type
Most values are used for multiple object types. It also is not
necessary, because the object type is already included in the key.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
3319e496f7 vulkan: Stop using strings for BVH build pipeline keys
The intended use is to pass a keys struct with vk_meta_object_key_type
as its first member.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Iago Toral Quiroga
5572e274e2 v3dv: serialize jobs after any barrier when debug sync is set
This will ensure we always generate a new job after a barrier and
that the new job is setup to be serialized against all previous jobs.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33350>
2025-02-03 13:06:59 +00:00
Iago Toral Quiroga
8d9f5dfd1d v3dv: implement sync debug option
This makes it so all jobs submitted to the queue are automatically serialized
against all other jobs.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33350>
2025-02-03 13:06:59 +00:00
Sergi Blanch Torne
d36e97c774 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 5b04337ba0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33349>
2025-02-03 12:24:07 +00:00
Sil Vilerino
5c26f165ba d3d12: Enable warnings C4056, C4305, C4351, C4756, C4800, C4291, C4020, C4624, C4309, C5105, C4024, C4189
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
15b2486a09 d3d12: Fix warning C4800 forcing value to bool 'true' or 'false'
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
d67980140c u_thread.h: Fix warning C4800 forcing value to bool 'true' or 'false'
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
1e869b3750 nir.h: Fix warning C4800 forcing value to bool 'true' or 'false'
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
e272c98f5d d3d12: Fix warning 4305 truncation from type1 to type2
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Valentine Burley
a5765d7659 khronos-update: Update ANDROID guards in vk_android_native_buffer.h
This file was modified in commit bcc1950886 ("vulkan: fix glibc AOSP build")
without realizing it is imported code.

Update it to prevent the need to revert this modification after every
header update.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33272>
2025-02-03 10:21:23 +00:00
Sergi Blanch Torne
5b04337ba0 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-02-03 08:00 UTC
* End: 2025-02-03 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33095>
2025-02-03 08:38:59 +01:00
José Roberto de Souza
bb31287d24 intel: Initialize upper 32bits of drm_xe_sync.handle
Some compiles don't initialize the upper 32bits of the union that has
u64 addr and u32 handle.
Similar to previous patches but doing that for code in intel/misc.

Cc: stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Juston Li
d3adc33175 iris: xe: fully initialize drm_xe_sync addr/handle union
Make sure the upper 32 bits of the addr/handle union are initialized
as that behavior is compiler-specific.

See the previous anv patch for more details.

Cc: stable
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Juston Li
9afe29153d anv: xe: fully initialize drm_xe_sync addr/handle union
The handle and addr fields of drm_xe_sync is defined as the union:

union {
   __u32 handle;
   __u64 addr;
};

When initialized on the stack on certain implementations, setting
.handle will leave the upper bits of .addr/the overall union
uninitialized causing exec calls to fail with:

[drm:xe_sync_entry_parse [xe]] Ioctl argument check failed at drivers/gpu/drm/xe/xe_sync.c:136: upper_32_bits(sync_in.addr)

Somewhat awkward but init .addr first to 0 and then set the handle after
the struct init.

Cc: stable
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Pavel Ondračka
f7e5daaedd i915/ci: use debian-build-testing instead of debian-testing
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33345>
2025-02-02 18:01:41 +01:00
Tim Keller
4ecd183c56 dril: Check for null config in dril_target.c
fixes: 06d417af

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33336>
2025-02-01 23:33:26 +00:00
Ernst Persson
c64871accc intel/vulkan: Add bvh build dependency
Fixes: 41baeb3810 ("anv: Implement acceleration structure API")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12558
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33333>
2025-02-01 20:11:28 +01:00
Lionel Landwerlin
98ddfd040a spirv: remove spirv_library_to_nir_builder
Now unused

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
41aa22a6b5 intel_clc: remove NIR output support
Now unused

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
6d5375017a compiler: drop vtn_bindgen
Now unused

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
4f9eace864 intel: move internal shader compile to vtn_bindgen2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
fdeb05c907 anv: fixup missing compiler dependency on tests
Pull in anv_deps to solve this.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Marek Olšák
e621bafa9a ci/debian-ppc64el: don't build AMD drivers due to having only LLVM 15
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33211>
2025-02-01 04:22:30 +00:00
Marek Olšák
82047fa82f amd: drop support for LLVM 15, 16, 17
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33211>
2025-02-01 04:22:30 +00:00
Caio Oliveira
5ca23eff0b intel/brw: Remove brw_gs_compile struct
There were 4 fields:

- key: now will be passed explicitly, so we can reuse the existing
  more general fs_visitor constructor;

- input_vue_map: used only by the client code brw_compile_gs, so
  create it separatedly as a local variable;

- two unsigned parameters: just put them inside a nested struct in the
  shader.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33228>
2025-02-01 02:44:29 +00:00
Vasily Khoruzhick
3983e88c27 lima: ppir: handle ffma in the backend
ppir doesn't do a good job in fusing ffma, so allow nir to do it and
handle ffma in backend.

shader-db:

total instructions in shared programs: 29485 -> 29066 (-1.42%)
instructions in affected programs: 10362 -> 9943 (-4.04%)
helped: 114
HURT: 5
helped stats (abs) min: 1 max: 30 x̄: 3.72 x̃: 2
helped stats (rel) min: 0.78% max: 20.00% x̄: 5.66% x̃: 4.31%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.52% max: 1.09% x̄: 0.85% x̃: 0.98%
95% mean confidence interval for instructions value: -4.37 -2.67
95% mean confidence interval for instructions %-change: -6.10% -4.68%
Instructions are helped.

total loops in shared programs: 2 -> 2 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 369 -> 367 (-0.54%)
spills in affected programs: 199 -> 197 (-1.01%)
helped: 8
HURT: 9

total fills in shared programs: 1265 -> 1208 (-4.51%)
fills in affected programs: 758 -> 701 (-7.52%)
helped: 11
HURT: 9

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33313>
2025-02-01 02:21:19 +00:00
Jesse Natalie
a4b1924b22 CI/Windows: Update container deps
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33294>
2025-02-01 01:20:52 +00:00
Jesse Natalie
049015a7b8 meson: Enable /Zc:preprocessor for MSVC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33294>
2025-02-01 01:20:52 +00:00
Karol Herbst
3129fd8dcf rusticl/queue: check device error status
If the underlying GPU context hit any execution errors (e.g. it times out
or something) we want to report it to the application as well.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32929>
2025-02-01 00:17:03 +00:00
Karol Herbst
2c52ddd1a6 rusticl/mesa: add PipeContext::device_reset_status
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32929>
2025-02-01 00:17:03 +00:00
Karol Herbst
46454f01d3 rusticl/mem: set bind flags for gl imports
We have to tell the driver how we want to use the resource.

Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33325>
2025-01-31 23:38:21 +00:00
Sil Vilerino
0e94a14900 d3d12: Fix array of texture DPB cap detection
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
b68ddd98d8 d3d12: Increase DPB video texture array pool size for async queue depth
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
d9f9129210 d3d12: Add some missing members initialization for d3d12_video_buffer
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
fcbadd77a8 d3d12: Add NULL initialization for d3d12_video_enc::m_pVideoTexArrayDPBPool
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
123374c1d7 d3d12: Add support for Y210, Y410, YUY2 and HEVC 422 8/10b, HEVC 444 10b profiles
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
df27e09267 pipe: Add profiles for HEVC 422 8/10b and 444 10b
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
a1e15f561f d3d12: Fix HEVC range extension pic params validation
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
81869c70f0 d3d12: use log2_max_pic_order_cnt_lsb_minus4 from upper layer for h264
This workaround is no longer necessary since now the frontends
manage the DPB and the params such as log2_max_pic_order_cnt_lsb_minus4
are passed by the app/pipe interface to the gallium drivers

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
5b834e1666 d3d12: use log2_max_pic_order_cnt_lsb_minus from upper layer
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
7cd9de460b d3d12: fix d3d12_video_nalu_writer_h264::write_slice_svc_prefix
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
bf7edb9a2d d3d12: fix start code prevention in write_sei_nalu()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
e8499f69a4 d3d12: initialize ReconstructedPicTexture
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
0fcef5168b d3d12: log all the field of dpb buffer for better diagnostic, cosmetic space removal
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
ad66315a67 d3d12: fix incorrect IsRefUsedByCurrentPic marking for P Frame
- On P Frame, we were looking at L1 list to determine IsRefUsedByCurrentPic.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:16 +00:00
Collabora's Gfx CI Team
e026f40b5f Uprev Piglit to fc8179d319046f45346bcbcc5aaeabebdf151f03
631b72944f...fc8179d319

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33151>
2025-01-31 20:36:33 +00:00
Job Noorman
1d3b6aa8d6 freedreno/drm-shim: enable raytracing
Just enable it unconditionally, the ir3 compiler info will disable it
when not supported.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33320>
2025-01-31 20:19:24 +00:00
Boris Brezillon
438652654b pan/decode: Fix the blend_count mask
The blend count field is 4 bits not 3 bits.

Fixes: f2740ac69c ("pan/decode: Add support for decoding CSF")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33321>
2025-01-31 19:08:23 +00:00
Boris Brezillon
127af6f38a panvk: Don't clobber registers if the render pass was suspended
Commit 2d3c50d484 ("panvk: Fix barriers in secondary cmdbufs w/o rp's")
started resetting the render flags we were relying on to decide to
clobber registers or not. Introduce a new field to restore that check.

Fixes: 2d3c50d484 ("panvk: Fix barriers in secondary cmdbufs w/o rp's")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33321>
2025-01-31 19:08:23 +00:00
Mike Blumenkrantz
c41b29f450 zink: delete some old DGC remnants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33326>
2025-01-31 18:35:40 +00:00
Mike Blumenkrantz
41296aab47 zink: also refcount needs_present from frontbuffer flush
Fixes: 4b0f2d1a2b ("zink: refcount needs_present resource")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33324>
2025-01-31 18:06:27 +00:00
Mike Blumenkrantz
50dbcb1d00 rusticl: stop clearing shader images after every dispatch
this causes thrashing when the same images are used in successive kernels

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33322>
2025-01-31 17:20:32 +00:00
Mike Blumenkrantz
72849ffbcd gallium: add a pipe_tex2d_from_buf struct
this is more convenient for reuse

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33322>
2025-01-31 17:20:32 +00:00
Mike Blumenkrantz
8d0d83c629 aux/trace: trace tex2d_from_buf for samplers/images
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33322>
2025-01-31 17:20:32 +00:00
Alyssa Rosenzweig
2a1524a089 libcl: add unreachable() macro
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
72bd3a6004 nir: include __LINE__ in NIR_PASS validation results
useful when validation blows up in a file containing many intrinsic
passes, to figure out which one is borked.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
3b1d8796fb asahi: port to vtn_bindgen2
this gets rid of all our linking gunk, which is a nice cleanup.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
0dd788298f libagx: port to glsl-style compute builtins
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
6a958f6997 libcl: define GLSL-style compute built-ins
OpenCL C defines work-item functions to return a scalar for a particular
dimension. This is a really annoying papercut, and is not what you want for
either 1D or 3D dispatches.  In both cases, it's nicer to get vectors. For
syntax, we opt to define uint3 "magic globals" for each work-item vector.  This
matches the GLSL convention, although retaining OpenCL names. For example,
`gl_GlobalInvocationID.xy` is expressed here as `cl_global_id.xy`.  That is much
nicer than standard OpenCL C's syntax `(uint2)(get_global_id(0),
get_global_id(1))`.

We define the obvious mappings for each relevant function in "Work-Item
Functions" in the OpenCL C specification.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
5ab16b340e libcl: add MIN3/MAX3 macros like on the host
useful for lvp

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
b7447a94c8 vtn: add vtn_bindgen2 tool
This is a rewrite of vtn_bindgen. For now the two tools live in parallel, to
give Intel time to migrate off v1.

For a refresher, the classic vtn_bindgen reads a SPIR-V and generates a .h
containing nir_builder stubs for each exported function. The stub inserts an
unimplemented nir_function with the proper signature into the shader, and adds a
"call" to that function. The driver is responsible for linking with the library
later, which is annoying.

vtn_bindgen2 instead generates a .c/.h pair. The header are just prototypes with
identical signatures to what we have now. The .c implementations, however, are
very different. Instead of generating unimplemented nir_function, the
implementations contain the actual code (as serialized NIR, deserialized
on-the-fly). There is no linking step, nor a library nir_shader that the driver
has to keep around.

The programming model here is that this is "just" nir_builder ... just a
massively more competent way of using nir_builder.

Additionally, the whole SPIR-V -> optimized lowered serialized NIR step is now
all common code. There's no longer anything target-specific, and it's
disentangled from the nir_precomp infrastructure.

That means drivers can use CL with zero integration, except a few meson.build
rules. This gives a very gentle on-ramp to CL for drivers. (Note: that applies
only for library-style CL. For precompiled kernel-style CL, that still requires
significant driver integration. I do have plans there, though. Also,
printf/abort support requires a minimal amount of driver code.)

Furthermore, this unblocks the use of CL library functions in common code. That
makes this an important step towards common code geom/tess or maybe saner
raytracing.

For drivers already using classic vtn_bindgen, porting to vtn_bindgen2 should
just be deleting all your linking/deserializing code. The .cl's are unchanged,
as are the function prototypes exposed.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
e6b22e2309 nir: add nir_call_serialized helper
this will be used internally in vtn_bindgen2.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
0727b7a079 nir: introduce bindgen_return
with vtn_bindgen2, we'll want return values without derefs. this needs some
special handholding.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
d4ec0fc381 nir/serialize: add specialized function serialization
with vtn_bindgen2 we only care about a single function at a time, not a whole
nir_shader, and it would be quite wasteful to serialize all the shader info
every time. add a specialized serialize just for 1 function.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
646903ed7a nir/print: extract nir_print_function_body
this will be used for more concise prints in vtn_bindgen2.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
7e467daac4 nir/lower_scratch_to_var: handle multi-function shaders
It's not at all clear how this pass should work with real function calls (if at
all), but at least this is enough to handle collections of self-contained
functions which vtn_bindgen2 wants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
50428f3c8a nir/lower_scratch_to_var: handle KERNELs
need 64-bit indices or else we blow up.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
63c94cf755 nir: add nir_function_intrinsics_pass
we already have

* nir_shader_instructions_pass
* nir_shader_intrinsics_pass
* nir_function_instructions_pass

add the missing fourth, it's useful too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
3b1166da8c meson: factor out with_driver_using_cl
adding a new bindgen-using driver should not require touching 4 different meson
files! factor out the expression, since it's a pain otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:58 +00:00
Karol Herbst
41c163138d mesa_clc: drop spirv version workaround
Not needed anymore as of the previous commit.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
2025-01-31 14:32:27 +00:00
Karol Herbst
fe8a0d3548 clc: use SetUseHighestVersion when linking spirvs
This allows us to link spirvs with different versions.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
2025-01-31 14:32:27 +00:00
Karol Herbst
6d306f7415 ci/windows: Bump Vulkan SDK for SPIRV-Tools
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
2025-01-31 14:32:27 +00:00
David Tobolik
457b159383 rusticl/feat: LinkOnce ODR
Reviewed-by: Karol Herbst <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33133>
2025-01-31 13:46:41 +00:00
Valentine Burley
7bf4d6a4db zink/ci: Add a fraction for zink-venus-lvp
With newly added features, especially since KHR_shader_subgroup the base
runtime has crept above the 15 minute timeout. Introduce a fraction to
keep the runtime in check and add a nightly full run to cover the gaps.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12548
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Martin Roukala <None>
Reviewed-by: Karol Herbst <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33318>
2025-01-31 12:35:46 +00:00
Lucas Stach
3800ecc029 etnaviv: allow larger shaders with unified instruction memory
When the core supports unified instruction memory, don't clamp individual
shader sizes to 256 instructions. Allow shaders to make full use of the
state instruction memory, as long as both VS and FS fit into the memory
region.

Allows to run the shaders from glmark2 terrain from state instruction
memory, so we don't need to use icache mode on GC3000 and makes the app
work on GC2000, which doesn't have icache but unified instruction memory.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:35 +00:00
Lucas Stach
bc83e0b90f etnaviv: place FS right behind VS in unified instruction memory
Currently we statically partition the unified intsruction memory range
into a VS and a FS range, with each of the shader types getting half
of the memory. Change this to place the FS instructions right behind
the VS instructions, which potentially allows larger shaders to be
executed from the instruction memory states when VS are FS are
unbalanced in size, which is quite common.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:35 +00:00
Lucas Stach
f1fe4d5961 etnaviv: replace open-coded shifts in shader range registers with macros
Use the generated macros from the HW headers to do the shifting,
which makes it more clear what is being done to those states.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:35 +00:00
Lucas Stach
ece07d5d9f etnaviv: correct and rename shader range register check
According to _InitializeContextBuffer() in the downstream kernel driver
all GPUs claiming to support more than 256 shader instructions have unified
instruction memory and the shader range registers to partition usage of
this unified memory region.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
70b44a6762 etnaviv: emit PS start and end PC states only on shader changes
There is no reason to emit those states on framebuffer changes. While the
framebuffer format change might change the fragment shader due to R/B
swapping in the shader, this triggers compilation of a new shader variant
which will dirty the shader state as needed.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
3b8d0f5dd7 etnaviv: split large multi-state updates into multiple batches
A single LOAD_STATE command can only load a maximum of 1023 32bit states,
limited by the range of the count parameter in the header.
Split the state update into multiple LOAD_STATE commands if necessary.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
bfab2ae821 etnaviv: drop double masking in etna_emit_load_state
The VIV_FE_LOAD_STATE_HEADER_COUNT marco already includes the masking
operation, so there is no need to apply the same mask again.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
992e9d07c5 etnaviv: drm: fix instruction limit for cores with instruction cache
Some cores with the the instruction cache feature, such as the GC3000 found
on the i.MX6QP, have a wrong instruction limit encoded in hardware. The HWDB
entry for this core has the correct number (512). Fixup all cores with the
instruction cache feature to report at least 512 instructions, which was
already assumed when configuring the VS/FS instruction state memory split in
other parts of the driver.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Valentine Burley
5c44d70684 amd/ci: Revert to 6.6 kernel on Raven
There's been a high number of GPU resets on Raven that amdgpu couldn't
recover from, leading to jobs timing out.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33317>
2025-01-31 09:19:38 +00:00
Lars-Ivar Hesselberg Simonsen
375116a3a0 panvk: Set missing shader_modifies_coverage flag
The shader_modifies_coverage-flag is currently not set for PanVK. This
might lead to issues down the line, so ensure it's set correctly.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Lars-Ivar Hesselberg Simonsen
2c855c1f4c Revert "panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload"
This reverts commit f93a48e4e3.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Lars-Ivar Hesselberg Simonsen
41cb2e73c2 Revert "panfrost: remove is_blit flag"
This reverts commit 6d6a43518a.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Lars-Ivar Hesselberg Simonsen
46256f3e39 panfrost: Do not evaluate_per_sample for non-MSAA
Enabling evaluate_per_sample in non-MSAA cases might cause issues and
hangs for subsequent ZS cases.

Therefore, only enable the flag when MSAA is active.

Fixes: 26d339ef8a ("panfrost: Generate Valhall Malloc IDVS jobs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Hyunjun Ko
959403cd87 anv/video: clean-up duplicated code.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33316>
2025-01-31 08:40:32 +00:00
Hyunjun Ko
52d9edbf05 anv: Fix to set CDEF flter flag correctly for AV1 decoding
and relevant tiny clean-up.

Fixes: 8432b8b282 ("anv: add initial support for AV1 decoding")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33316>
2025-01-31 08:40:32 +00:00
Pierre-Eric Pelloux-Prayer
2b8c3a12c6 winsys/amdgpu: treat cs overflow as context lost
The existing code relies on assert to identify when a cs overlow
occurs. On builds without asserts, a cs overflow won't be detected
and it will likely lead to a hang.

Reporting a preemptively a PIPE_UNKNOWN_CONTEXT_RESET error seems
ok as the context is lost anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33288>
2025-01-31 08:13:34 +00:00
Pierre-Eric Pelloux-Prayer
b3f2435994 radeonsi: update si_need_gfx_cs_space upper bound
radeon_emit_alt_hiz_logic can add 8 extra dw per draw.

Fixes: cdecbee922 ("radeonsi/gfx12: adjust HiZ/HiS logic")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33288>
2025-01-31 08:13:34 +00:00
Caio Oliveira
6c98f006f4 intel/brw: Move some larger functions from brw_inst.h to brw_inst.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:21 +00:00
Caio Oliveira
f7b0c12945 intel/brw: Rename fs_inst_box to brw_inst_box
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:21 +00:00
Caio Oliveira
d59bd421a2 intel/brw: Rename fs_inst to brw_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:21 +00:00
Caio Oliveira
9b0d359737 intel/brw: Move fs_inst implementation code together
Move them to brw_inst.h/cpp.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:20 +00:00
Corentin Noël
dc2b6dfd16 venus/ci: Skip flaky test due to intermittent timeouts
This test has been intermittently timing out for a while now.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33307>
2025-01-31 00:11:31 +00:00
Eric Engestrom
4c46a93593 docs: update calendar for 25.0.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33308>
2025-01-31 00:03:58 +00:00
Yiwei Zhang
d73642d9ff venus: scrub disallowed ycbcr features for rgba10x6
This is needed before we passthrough VK_EXT_rgba10x6_formats on
supported platforms.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33296>
2025-01-30 22:30:36 +00:00
Adam Jackson
6f5c227e2c zink: Enable KHR_shader_subgroup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
2025-01-30 20:59:04 +00:00
Mike Blumenkrantz
cee77ba6ec zink: implement ops for KHR_shader_subgroup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
2025-01-30 20:59:04 +00:00
Mike Blumenkrantz
b4f3136fea zink: emit SpvCapabilityDemoteToHelperInvocation for IsHelperInvocation
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
2025-01-30 20:59:04 +00:00
Konstantin Seurer
00d17f3dbe nir/lower_vars_to_ssa: Annotate defs with variable names
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Konstantin Seurer
ce0f30b230 nir: Add variable debug info to instructions
Allows for annotating defs with variable names.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Konstantin Seurer
ec89f88722 spirv: Handle NonSemantic.Shader.DebugInfo.100
New versions of glslangValidator seem to emit those instructions for
debug info instead of OpLine.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Konstantin Seurer
60a20bcf3d nir: Stop using instructions for debug info
Annotating ssa defs without affecting compilation is impossible with
debug info instructions since referencing a nir_def from the debug info
instr will add uses.

The old approach also stops worrking if passes reorder instructions.

This patch proposes a solution which should not regress performance just
like the old approach. The difference is that this one allocates a bit
more space for debug info instead of adding a new instruction for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Iván Briano
e73c4ce7c5 anv: handle REMAINING_LAYERS in host image copy cases
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33293>
2025-01-30 19:24:47 +00:00
Eric Engestrom
ea519cc230 docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33304>
2025-01-30 19:02:37 +00:00
Eric Engestrom
8b61e9a701 VERSION: bump to 25.1
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33304>
2025-01-30 19:02:37 +00:00
2926 changed files with 211614 additions and 95885 deletions

View File

@@ -31,7 +31,7 @@ indent_size = 3
[*.patch]
trim_trailing_whitespace = false
[{meson.build,meson_options.txt}]
[{meson.build,meson.options}]
indent_style = space
indent_size = 2

View File

@@ -68,3 +68,9 @@ c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
# ir3: reformat after refactoring in previous commit
8ae5b27ee0331a739d14b42e67586784d6840388
# ir3: don't use deprecated NIR_PASS_V anymore
2fedc82c0cc9d3fb2e54707b57941b79553b640c
# ir3: reformat after previous commit
7210054db8cfb445a8ccdeacfdcfecccf44fa266

View File

@@ -30,11 +30,18 @@ workflow:
# do not duplicate pipelines on merge pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
# tag pipelines are disabled as it's too late to run all the tests by
# then, the release has been made based on the staging pipelines results
- if: $CI_COMMIT_TAG
when: never
# merge pipeline
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
MESA_CI_PERFORMANCE_ENABLED: 1
VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
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
CI_TRON_JOB_PRIORITY_TAG: "" # Empty tags are ignored by gitlab
JOB_PRIORITY: 75
# fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes
DEQP_RUNNER_MAX_FAILS: 40
@@ -47,20 +54,27 @@ workflow:
# nightly pipeline
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
variables:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:low-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:low-aarch64
JOB_PRIORITY: 45
# (some) nightly builds perform LTO, so they take much longer than the
# short timeout allowed in other pipelines.
# Note: 0 = infinity = gitlab's job `timeout:` applies, which is 1h
BUILD_JOB_TIMEOUT_OVERRIDE: 0
# pipeline for direct pushes that bypassed the CI
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $GITLAB_USER_LOGIN != "marge-bot"
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
JOB_PRIORITY: 70
# pipeline for direct pushes from release maintainer
- if: &is-staging-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
variables:
JOB_PRIORITY: 70
variables:
FDO_UPSTREAM_REPO: mesa/mesa
MESA_TEMPLATES_COMMIT: &ci-templates-commit e195d80f35b45cc73668be3767b923fd76c70ed5
MESA_TEMPLATES_COMMIT: &ci-templates-commit 48e4b6c9a2015f969fbe648999d16d5fb3eef6c4
CI_PRE_CLONE_SCRIPT: |-
set -o xtrace
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
@@ -102,11 +116,15 @@ variables:
# Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job log, hiding away useful output
MESA_SPIRV_LOG_LEVEL: error
# Default priority for non-merge pipelines
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64
CI_TRON_JOB_PRIORITY_TAG: ci-tron:priority:low
JOB_PRIORITY: 50
DATA_STORAGE_PATH: data_storage
default:
timeout: 1m # catch any jobs which don't specify a timeout
id_tokens:
S3_JWT:
aud: https://s3.freedesktop.org
@@ -202,6 +220,8 @@ include:
when: never
# Note: make sure the branches in this list are the same as in
# `.build-only-delayed-rules` below.
.container+build-rules:
rules:
- !reference [.common-rules, rules]
@@ -248,6 +268,9 @@ include:
# Build everything after someone bypassed the CI
- if: *is-direct-push
when: on_success
# Build everything when pushing to staging branches
- if: *is-staging-push
when: on_success
# Build everything in scheduled pipelines
- if: *is-scheduled-pipeline
when: on_success
@@ -255,10 +278,53 @@ include:
# manually triggered
- when: manual
# Repeat of the above but with `when: on_success` replaced with
# `when: delayed` + `start_in:`, for build-only jobs.
# Note: make sure the branches in this list are the same as in
# `.container+build-rules` above.
.build-only-delayed-rules:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
- !reference [.disable-farm-mr-rules, rules]
# Never run immediately after merging, as we just ran everything
- !reference [.never-post-merge-rules, rules]
# Build everything in merge pipelines, if any files affecting the pipeline
# were changed
- if: *is-merge-attempt
changes: *all_paths
when: delayed
start_in: &build-delay 5 minutes
# Same as above, but for pre-merge pipelines
- if: *is-pre-merge
changes: *all_paths
when: manual
# Skip everything for pre-merge and merge pipelines which don't change
# anything in the build
- if: *is-merge-attempt
when: never
- if: *is-pre-merge
when: never
# Build everything after someone bypassed the CI
- if: *is-direct-push
when: delayed
start_in: *build-delay
# Build everything when pushing to staging branches
- if: *is-staging-push
when: delayed
start_in: *build-delay
# Build everything in scheduled pipelines
- if: *is-scheduled-pipeline
when: delayed
start_in: *build-delay
# Allow building everything in fork pipelines, but build nothing unless
# manually triggered
- when: manual
.ci-deqp-artifacts:
artifacts:
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
untracked: false
paths:
@@ -277,24 +343,23 @@ make git archive:
stage: git-archive
rules:
- !reference [.scheduled_pipeline-rules, rules]
# ensure we are running on packet
tags:
- packet.net
script:
# Compactify the .git directory
- git gc --aggressive
# Download & cache the perfetto subproject as well.
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
# 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:
extends:
- .fdo.ci-fairy
stage: sanity
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
rules:
- if: *is-pre-merge
when: on_success
@@ -335,14 +400,14 @@ sanity:
when: on_failure
reports:
junit: check-*.xml
tags:
- placeholder-job
mr-label-maker-test:
extends:
- .fdo.ci-fairy
stage: sanity
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
rules:
- !reference [.mr-label-maker-rules, rules]
variables:
@@ -360,5 +425,7 @@ mr-label-maker-test:
needs:
- job: rustfmt
optional: true
artifacts: false
- job: yaml-toml-shell-py-test
optional: true
artifacts: false

View File

@@ -85,3 +85,31 @@ wayland-dEQP-EGL.functional.render.multi_thread.gles2_gles3.other
# Vulkan loader in Debian is too old
dEQP-VK.api.get_device_proc_addr.non_enabled
dEQP-VK.api.version_check.unavailable_entry_points
# These tests are flaking too much recently on almost all drivers, so better skip them until the cause is identified
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT
# These tests attempt to read from the front buffer after a swap. They are skipped
# on both X11 and gbm, but for different reasons:
#
# On X11: Given that we run piglit tests in parallel in Mesa CI, and don't have a
# compositor running, the frontbuffer reads may end up with undefined results from
# windows overlapping us.
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
# marked as single-threaded and run after the rayon loop if we want to support
# them.
# Other front-buffer access tests like fbo-sys-blit, fbo-sys-sub-blit, or
# fcc-front-buffer-distraction don't appear here, because the DRI3 fake-front
# handling should be holding the pixels drawn by the test even if we happen to fail
# GL's window system pixel occlusion test.
# Note that glx skips don't appear here, they're in all-skips.txt (in case someone
# sets PIGLIT_PLATFORM=gbm to mostly use gbm, but still has an X server running).
#
# On gbm: gbm does not support reading the front buffer after a swapbuffers, and
# that's intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
# but don't swap.
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
spec@!opengl 1.1@read-front

View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
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
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 -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 -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-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
$EXCLUDE_FILTERS \
$INCLUDE_FILTERS
[ "$(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=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
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,96 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
# deqp
$ADB shell mkdir -p /data/deqp
$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
$ADB push /deqp-gles/mustpass/egl-main.txt.zst /data/deqp
$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
$ADB push /deqp-tools/* /data/deqp
$ADB push /deqp-runner/deqp-runner /data/deqp
$ADB push "$INSTALL/all-skips.txt" /data/deqp
$ADB push "$INSTALL/angle-skips.txt" /data/deqp
if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-fails.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-skips.txt" /data/deqp
fi
$ADB push "$INSTALL/deqp-$DEQP_SUITE.toml" /data/deqp
BASELINE=""
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
BASELINE="--baseline /data/deqp/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
fi
if [ -n "$ANGLE_TAG" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
fi
AOSP_RESULTS=/data/deqp/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
set +e
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
XDG_CACHE_HOME=/data/local/tmp \
./deqp-runner \
suite \
--suite /data/deqp/deqp-$DEQP_SUITE.toml \
--output $AOSP_RESULTS \
--skips /data/deqp/all-skips.txt $DEQP_SKIPS \
--flakes /data/deqp/$GPU_VERSION-flakes.txt \
--testlog-to-xml /data/deqp/testlog-to-xml \
--shader-cache-dir /data/local/tmp \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$BASELINE \
${DEQP_RUNNER_MAX_FAILS:+--max-fails \"$DEQP_RUNNER_MAX_FAILS\"} \
"
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
$ADB pull "$AOSP_RESULTS/." "$RESULTS_DIR"
# Remove all but the first 50 individual XML files uploaded as artifacts, to
# save fd.o space when you break everything.
find $RESULTS_DIR -name \*.xml | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
$ADB shell "cd ${AOSP_RESULTS}/..; \
./deqp-runner junit \
--testsuite dEQP \
--results $AOSP_RESULTS/failures.csv \
--output $AOSP_RESULTS/junit.xml \
--limit 50 \
--template \"See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml\""
$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
section_end cuttlefish_results

118
.gitlab-ci/android-runner.sh Executable file
View File

@@ -0,0 +1,118 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
# Set default ADB command if not set already
: "${ADB:=adb}"
$ADB wait-for-device root
sleep 1
# overlay
REMOUNT_PATHS="/vendor"
if [ "$ANDROID_VERSION" -ge 15 ]; then
REMOUNT_PATHS="$REMOUNT_PATHS /system"
fi
OV_TMPFS="/data/overlay-remount"
$ADB shell mkdir -p "$OV_TMPFS"
$ADB shell mount -t tmpfs none "$OV_TMPFS"
for path in $REMOUNT_PATHS; do
$ADB shell mkdir -p "${OV_TMPFS}${path}-upper"
$ADB shell mkdir -p "${OV_TMPFS}${path}-work"
opts="lowerdir=${path},upperdir=${OV_TMPFS}${path}-upper,workdir=${OV_TMPFS}${path}-work"
$ADB shell mount -t overlay -o "$opts" none ${path}
done
$ADB shell setenforce 0
# download Android Mesa from S3
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
mkdir /mesa-android
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" &
INSTALL="/mesa-android/install"
# replace libraries
$ADB shell rm -f /vendor/lib64/libgallium_dri.so*
$ADB shell rm -f /vendor/lib64/egl/libEGL_mesa.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_mesa.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_mesa.so*
$ADB push "$INSTALL/lib/libgallium_dri.so" /vendor/lib64/libgallium_dri.so
$ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
$ADB shell rm -f /vendor/lib64/hw/vulkan.lvp.so*
$ADB shell rm -f /vendor/lib64/hw/vulkan.virtio.so*
$ADB shell rm -f /vendor/lib64/hw/vulkan.intel.so*
$ADB push "$INSTALL/lib/libvulkan_lvp.so" /vendor/lib64/hw/vulkan.lvp.so
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
$ADB push "$INSTALL/lib/libvulkan_intel.so" /vendor/lib64/hw/vulkan.intel.so
$ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so*
ANGLE_DEST_PATH=/vendor/lib64/egl
if [ "$ANDROID_VERSION" -ge 15 ]; then
ANGLE_DEST_PATH=/system/lib64
fi
$ADB shell rm -f "$ANGLE_DEST_PATH/libEGL_angle.so"*
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"*
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv2_angle.so"*
$ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
$ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
get_gles_runtime_version() {
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
$ADB shell dumpsys SurfaceFlinger | grep GLES
}
# Check what GLES implementation is used before loading the new libraries
get_gles_runtime_version
# restart Android shell, so that services use the new libraries
$ADB shell stop
$ADB shell start
# Check what GLES implementation is used after loading the new libraries
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
if [ -n "$ANGLE_TAG" ]; then
# Note: we are injecting the ANGLE libs too, so we need to check if the
# ANGLE libs are being used after the shell restart.
ANGLE_HASH=$(head -c 12 /angle/version)
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then
echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2
exit 1
fi
else
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${MESA_BUILD_VERSION}$"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2
exit 1
fi
fi
if [ -n "$USE_ANDROID_CTS" ]; then
# The script sets EXIT_CODE
. "$(dirname "$0")/android-cts-runner.sh"
else
# The script sets EXIT_CODE
. "$(dirname "$0")/android-deqp-runner.sh"
fi
exit $EXIT_CODE

View File

@@ -2,67 +2,67 @@ version: 1
# Rules to match for a machine to qualify
target:
id: '{{ ci_runner_description }}'
id: '{{ CI_RUNNER_DESCRIPTION }}'
timeouts:
first_console_activity: # This limits the time it can take to receive the first console log
minutes: {{ timeout_first_console_activity_minutes | default(0, true) }}
seconds: {{ timeout_first_console_activity_seconds | default(0, true) }}
retries: {{ timeout_first_console_activity_retries }}
minutes: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_RETRIES }}
console_activity: # Reset every time we receive a message from the logs
minutes: {{ timeout_console_activity_minutes | default(0, true) }}
seconds: {{ timeout_console_activity_seconds | default(0, true) }}
retries: {{ timeout_console_activity_retries }}
minutes: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_RETRIES }}
boot_cycle:
minutes: {{ timeout_boot_minutes | default(0, true) }}
seconds: {{ timeout_boot_seconds | default(0, true) }}
retries: {{ timeout_boot_retries }}
minutes: {{ B2C_TIMEOUT_BOOT_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_BOOT_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_BOOT_RETRIES }}
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
minutes: {{ timeout_overall_minutes | default(0, true) }}
seconds: {{ timeout_overall_seconds | default(0, true) }}
minutes: {{ B2C_TIMEOUT_OVERALL_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_OVERALL_SECONDS | default(0, true) }}
retries: 0
# no retries possible here
watchdogs:
boot:
minutes: {{ timeout_boot_wd_minutes | default(0, true) }}
seconds: {{ timeout_boot_wd_seconds | default(0, true) }}
retries: {{ timeout_boot_wd_retries | default(0, true) }}
minutes: {{ B2C_TIMEOUT_BOOT_WD_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_BOOT_WD_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_BOOT_WD_RETRIES | default(0, true) }}
console_patterns:
session_end:
regex: >-
{{ session_end_regex }}
{% if session_reboot_regex %}
{{ B2C_SESSION_END_REGEX }}
{% if B2C_SESSION_REBOOT_REGEX %}
session_reboot:
regex: >-
{{ session_reboot_regex }}
{{ B2C_SESSION_REBOOT_REGEX }}
{% endif %}
job_success:
regex: >-
{{ job_success_regex }}
{% if job_warn_regex %}
{{ B2C_JOB_SUCCESS_REGEX }}
{% if B2C_JOB_WARN_REGEX %}
job_warn:
regex: >-
{{ job_warn_regex }}
{{ B2C_JOB_WARN_REGEX }}
{% endif %}
{% if boot_wd_start_regex and boot_wd_stop_regex %}
{% if B2C_BOOT_WD_START_REGEX and B2C_BOOT_WD_STOP_REGEX %}
watchdogs:
boot:
start:
regex: >-
{{ boot_wd_start_regex }}
{{ B2C_BOOT_WD_START_REGEX }}
reset:
regex: >-
{{ boot_wd_reset_regex | default(boot_wd_start_regex, true) }}
{{ B2C_BOOT_WD_RESET_REGEX | default(B2C_BOOT_WD_START_REGEX, true) }}
stop:
regex: >-
{{ boot_wd_stop_regex }}
{{ B2C_BOOT_WD_STOP_REGEX }}
{% endif %}
# Environment to deploy
@@ -70,21 +70,49 @@ deployment:
# Initial boot
start:
storage:
{% if B2C_IMAGESTORE_PLATFORM %}
imagestore:
public:
# List of images that should be pulled into the image store ahead of execution
images:
mars:
name: "{{ B2C_MACHINE_REGISTRATION_IMAGE }}"
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
tls_verify: false
{% set machine_registration_image="{% raw %}{{ job.imagestore.public.mars.image_id }}{% endraw %}" %}
telegraf:
name: "{{ B2C_TELEGRAF_IMAGE }}"
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
tls_verify: false
{% set telegraf_image="{% raw %}{{ job.imagestore.public.telegraf.image_id }}{% endraw %}" %}
image_under_test:
name: "{{ B2C_IMAGE_UNDER_TEST }}"
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
tls_verify: false
{% set image_under_test="{% raw %}{{ job.imagestore.public.image_under_test.image_id }}{% endraw %}" %}
nbd:
storage:
max_connections: 5
size: 10G
{% endif %}
http:
- path: "/install.tar.zst"
url: "{{ B2C_INSTALL_TARBALL_URL }}"
- path: "/b2c-extra-args"
data: >
b2c.pipefail b2c.poweroff_delay={{ poweroff_delay }}
b2c.pipefail b2c.poweroff_delay={{ B2C_POWEROFF_DELAY }}
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in job_volume_exclusions %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
{% for volume in volumes %}
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in B2C_JOB_VOLUME_EXCLUSIONS.split(',') %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
{% for volume in B2C_VOLUMES %}
b2c.volume={{ volume }}
{% endfor %}
b2c.run_service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/telegraf:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.run="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/machine-registration:latest check"
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd | replace('"', '\\\"') }}"
b2c.run_service="--privileged --tls-verify=false --pid=host {{ B2C_TELEGRAF_IMAGE }}" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.run="-ti --tls-verify=false {{ B2C_MACHINE_REGISTRATION_IMAGE }} {% if B2C_MARS_SETUP_TAGS %}setup --tags {{ B2C_MARS_SETUP_TAGS }}{% else %}check{% endif %}"
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ CI_PROJECT_DIR }} -w {{ CI_PROJECT_DIR }} {% for mount_volume in B2C_MOUNT_VOLUMES %} -v {{ mount_volume }}{% endfor %} --tls-verify=false --entrypoint bash {{ B2C_IMAGE_UNDER_TEST }} -euc 'curl --fail -q {{ '{{' }} job.http.url }}/install.tar.zst | tar --zstd -x; {{ B2C_CONTAINER_CMD }}'"
kernel:
{% if kernel_url %}
url: '{{ kernel_url }}'
{% if B2C_KERNEL_URL %}
url: '{{ B2C_KERNEL_URL }}'
{% endif %}
# NOTE: b2c.cache_device should not be here, but this works around
@@ -92,28 +120,36 @@ deployment:
cmdline: >
SALAD.machine_id={{ '{{' }} machine_id }}
console={{ '{{' }} local_tty_device }},115200
b2c.cache_device=auto b2c.ntp_peer=10.42.0.1
b2c.ntp_peer=10.42.0.1
b2c.extra_args_url={{ '{{' }} job.http.url }}/b2c-extra-args
{% if kernel_cmdline_extras is defined %}
{{ kernel_cmdline_extras }}
{% if B2C_IMAGESTORE_PLATFORM is defined %}
{{ '{{' }} imagestore.mount("public").nfs.to_b2c_filesystem("publicimgstore") }}
b2c.storage="additionalimagestores=publicimgstore"
b2c.nbd=/dev/nbd0,host=ci-gateway,port={% raw %}{{ '{{' }} job.nbd.storage.tcp_port }}{% endraw %},connections=5
b2c.cache_device=/dev/nbd0
{% else %}
b2c.cache_device=auto
{% endif %}
{% if B2C_KERNEL_CMDLINE_EXTRAS is defined %}
{{ B2C_KERNEL_CMDLINE_EXTRAS }}
{% endif %}
{% if initramfs_url or firmware_url %}
{% if B2C_INITRAMFS_URL or B2C_FIRMWARE_URL %}
initramfs:
{% if firmware_url %}
- url: '{{ firmware_url }}'
{% if B2C_FIRMWARE_URL %}
- url: '{{ B2C_FIRMWARE_URL }}'
{% endif %}
{% if initramfs_url %}
- url: '{{ initramfs_url }}'
{% if B2C_INITRAMFS_URL %}
- url: '{{ B2C_INITRAMFS_URL }}'
{% endif %}
{% endif %}
{% if dtb_url %}
{% if B2C_DTB_URL %}
dtb:
url: '{{ dtb_url }}'
{% if dtb_match %}
url: '{{ B2C_DTB_URL }}'
{% if B2C_DTB_MATCH %}
format:
archive:
match: "{{ dtb_match }}"
match: "{{ B2C_DTB_MATCH }}"
{% endif %}
{% endif %}

View File

@@ -25,31 +25,16 @@ from jinja2 import Environment, FileSystemLoader
from os import environ, path
# Pass all the environment variables prefixed by B2C_
# Pass through all the CI and B2C environment variables
values = {
key.removeprefix("B2C_").lower(): environ[key]
for key in environ if key.startswith("B2C_")
key: environ[key]
for key in environ if key.startswith("B2C_") or key.startswith("CI_")
}
env = Environment(loader=FileSystemLoader(path.dirname(values['job_template'])),
env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE'])),
trim_blocks=True, lstrip_blocks=True)
template = env.get_template(path.basename(values['job_template']))
template = env.get_template(path.basename(environ['B2C_JOB_TEMPLATE']))
values['ci_job_id'] = environ['CI_JOB_ID']
values['ci_runner_description'] = environ['CI_RUNNER_DESCRIPTION']
values['job_volume_exclusions'] = [excl for excl in values['job_volume_exclusions'].split(",") if excl]
values['working_dir'] = environ['CI_PROJECT_DIR']
# Use the gateway's pull-through registry caches to reduce load on fd.o.
values['local_container'] = environ['IMAGE_UNDER_TEST']
values['local_container'] = values['local_container'].replace(
'registry.freedesktop.org',
'{{ fdo_proxy_registry }}'
)
if 'kernel_cmdline_extras' not in values:
values['kernel_cmdline_extras'] = ''
with open(path.splitext(path.basename(values['job_template']))[0], "w") as f:
with open(path.splitext(path.basename(environ['B2C_JOB_TEMPLATE']))[0], "w") as f:
f.write(template.render(values))

View File

@@ -82,11 +82,7 @@ else
# Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
# these devices use it and it would take up space in the initrd.
if [ -n "$PIGLIT_PROFILES" ]; then
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
else
EXCLUDE_FILTER="piglit|python"
fi
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
pushd rootfs
find -H . | \

View File

@@ -23,7 +23,7 @@ set +x
# Pass through relevant env vars from the gitlab job to the baremetal init script
echo "Variables passed through:"
"$CI_COMMON"/generate-env.sh | tee $rootfs_dst/set-job-env-vars.sh
"$CI_COMMON"/export-gitlab-job-env-for-dut.sh | tee $rootfs_dst/set-job-env-vars.sh
set -x

View File

@@ -4,19 +4,21 @@
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
variables:
# Build jobs don't take more than 1-3 minutes. 5-8 min max on a fresh runner
# without a populated ccache.
# These jobs are never slow, either they finish within reasonable time or
# something has gone wrong and the job will never terminate, so we should
# instead timeout so that the retry mechanism can kick in.
# A few exception are made, see overrides in the rest of this file.
BUILD_JOB_TIMEOUT: 15m
# Build jobs are typically taking between 5-12 minutes, depending on how
# much they build and how many new Rust compilers we have to build twice.
# Allow 25 minutes as a reasonable margin: beyond this point, something
# has gone badly wrong, and we should try again to see if we can get
# something from it.
#
# Some jobs not in the critical path use a higher timeout, particularly
# when building with ASan or UBSan.
BUILD_JOB_TIMEOUT: 12m
RUN_MESON_TESTS: "true"
timeout: 1h
timeout: 16m
# We don't want to download any previous job's artifacts
dependencies: []
artifacts:
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
paths:
- _build/meson-logs/*.txt
@@ -24,6 +26,12 @@
- _build/.ninja_log
- artifacts
.build-run-long:
variables:
BUILD_JOB_TIMEOUT: 18m
timeout: 25m
# Just Linux
.build-linux:
extends: .build-common
@@ -55,48 +63,30 @@
paths:
- subprojects/packagecache
.meson-build:
.meson-build-for-tests:
extends:
- .build-linux
- .use-debian/x86_64_build
stage: build-for-tests
script:
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} bash --login .gitlab-ci/meson/build.sh
- .gitlab-ci/prepare-artifacts.sh
.meson-build-only:
extends:
- .meson-build-for-tests
- .build-only-delayed-rules
stage: build-only
script:
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} .gitlab-ci/meson/build.sh
# Make sure this list stays the same as all the jobs with
# `stage: build-for-tests`, except for the windows job as
# explained below.
.build-for-tests-jobs:
- job: debian-testing
optional: true
- job: debian-testing-asan
optional: true
- job: debian-build-testing
optional: true
- job: debian-arm32
optional: true
- job: debian-arm32-asan
optional: true
- job: debian-arm64
optional: true
- job: debian-arm64-asan
optional: true
# Windows runners don't have more than one build right now, so there is
# no need to wait on the "first one" to be done.
# - job: windows-msvc
# optional: true
- job: python-artifacts
optional: true
- *meson-build
debian-testing:
extends:
- .meson-build
- .meson-build-for-tests
- .use-debian/x86_64_build
- .build-run-long # but it really shouldn't! tracked in mesa#12544
- .ci-deqp-artifacts
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
UNWIND: "enabled"
DRI_LOADERS: >
-D egl=enabled
@@ -118,9 +108,6 @@ debian-testing:
-D valgrind=disabled
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
RUN_MESON_TESTS: "false" # debian-build-testing already runs these
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
artifacts:
reports:
junit: artifacts/ci_scripts_report.xml
@@ -128,9 +115,9 @@ debian-testing:
debian-testing-asan:
extends:
- debian-testing
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "swrast"
GALLIUM_DRIVERS: "llvmpipe,softpipe"
C_ARGS: >
@@ -167,14 +154,15 @@ debian-testing-msan:
# msan cannot fully work until it's used together with msan libc
extends:
- debian-clang
# `needs:` inherited from debian-clang
- .meson-build-only
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
# l_undef is incompatible with msan
EXTRA_OPTION:
-D b_sanitize=memory
-D b_lundef=false
-D mesa-clc=system
-D precomp-compiler=system
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Don't run all the tests yet:
@@ -184,7 +172,7 @@ debian-testing-msan:
GALLIUM_DRIVERS: "freedreno,iris,nouveau,r300,r600,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
VULKAN_DRIVERS: intel,amd,broadcom,virtio
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc (msan complains about uninitialized
# Do a host build for mesa-clc and precomp-compiler (msan complains about uninitialized
# values in the LLVM libs)
HOST_BUILD_OPTIONS: >
-D build-tests=false
@@ -197,20 +185,22 @@ debian-testing-msan:
-D platforms=
-D mesa-clc=enabled
-D install-mesa-clc=true
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
debian-testing-ubsan:
extends:
- debian-testing
stage: build-for-tests
timeout: 40m
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
CPP_ARGS: >
-Wno-error=array-bounds
GALLIUM_DRIVERS: "swrast"
GALLIUM_DRIVERS: "llvmpipe,softpipe"
VULKAN_DRIVERS: "swrast"
EXTRA_OPTION: >
-D b_sanitize=undefined
@@ -235,10 +225,10 @@ debian-testing-ubsan:
-D install-mesa-clc=true
debian-build-testing:
extends: .meson-build
stage: build-for-tests
extends:
- .meson-build-for-tests
- .use-debian/x86_64_build
variables:
BUILDTYPE: debug
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
@@ -246,6 +236,7 @@ debian-build-testing:
-D egl=enabled
-D glvnd=disabled
-D platforms=x11,wayland
-D legacy-x11=dri2
GALLIUM_ST: >
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
@@ -255,55 +246,18 @@ debian-build-testing:
-D gallium-rusticl=false
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: "intel_hasvk,imagination-experimental,microsoft-experimental,nouveau,swrast"
BUILD_TYPE: "debugoptimized"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D spirv-to-dxil=true
-D osmesa=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
-D perfetto=true
S3_ARTIFACT_NAME: debian-build-testing
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
shader-db:
stage: code-validation
extends:
- .use-debian/x86_64_build
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.core-rules, rules]
# Keep this list in sync with the drivers tested in run-shader-db.sh
- !reference [.freedreno-common-rules, rules]
- !reference [.intel-common-rules, rules]
- !reference [.lima-rules, rules]
- !reference [.v3d-rules, rules]
- !reference [.vc4-rules, rules]
- !reference [.nouveau-rules, rules]
- !reference [.r300-rules, rules]
# Also run if this job's own config or script changes
- changes:
- .gitlab-ci/build/gitlab-ci.yml
- .gitlab-ci/run-shader-db.sh
needs:
- debian-build-testing
variables:
S3_ARTIFACT_NAME: debian-build-testing
before_script:
- !reference [.download_s3, before_script]
script: |
.gitlab-ci/run-shader-db.sh
artifacts:
paths:
- shader-db
timeout: 15m
# Test a release build with -Werror so new warnings don't sneak in.
debian-release:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
extends:
- .meson-build-only
- .use-debian/x86_64_build
variables:
UNWIND: "enabled"
C_ARGS: >
@@ -326,9 +280,9 @@ debian-release:
VULKAN_DRIVERS: "swrast,intel_hasvk,imagination-experimental,microsoft-experimental"
EXTRA_OPTION: >
-D spirv-to-dxil=true
-D osmesa=true
-D tools=all
-D mesa-clc=enabled
-D precomp-compiler=enabled
-D intel-rt=enabled
-D imagination-srv=true
BUILDTYPE: "release"
@@ -339,19 +293,16 @@ debian-release:
alpine-build-testing:
extends:
- .meson-build
- .meson-build-only
- .use-alpine/x86_64_build
needs:
- !reference [.use-alpine/x86_64_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: "release"
C_ARGS: >
-Wno-error=cpp
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=misleading-indentation
DRI_LOADERS: >
-D glx=disabled
-D gbm=enabled
@@ -373,15 +324,16 @@ alpine-build-testing:
-D microsoft-clc=disabled
-D shared-llvm=enabled
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,intel,imagination-experimental"
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental"
fedora-release:
extends:
- .meson-build
- .meson-build-only
- .use-fedora/x86_64_build
needs:
- !reference [.use-fedora/x86_64_build, needs]
- !reference [.build-for-tests-jobs]
- .build-run-long
# LTO builds can be really very slow, and we have no way to specify different
# timeouts for pre-merge and nightly jobs
timeout: 1h
variables:
BUILDTYPE: "release"
# array-bounds are pure non-LTO gcc buggy warning
@@ -402,7 +354,6 @@ fedora-release:
-D glvnd=enabled
-D platforms=x11,wayland
EXTRA_OPTION: >
-D osmesa=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
-D vulkan-layers=device-select,overlay
-D intel-rt=enabled
@@ -430,9 +381,7 @@ debian-android:
- .meson-cross
- .use-debian/android_build
- .ci-deqp-artifacts
needs:
- !reference [.use-debian/android_build, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-for-tests
variables:
BUILDTYPE: debug
UNWIND: "disabled"
@@ -461,6 +410,7 @@ debian-android:
-D valgrind=disabled
-D android-libbacktrace=disabled
-D mesa-clc=system
-D precomp-compiler=system
GALLIUM_ST: >
-D gallium-vdpau=disabled
-D gallium-va=disabled
@@ -479,26 +429,35 @@ debian-android:
-D platforms=
-D mesa-clc=enabled
-D install-mesa-clc=true
ARTIFACTS_DEBUG_SYMBOLS: 1
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
script:
- export CROSS=aarch64-linux-android
- export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d
- export VULKAN_DRIVERS=freedreno,broadcom,virtio
- *meson-build
# x86_64 build:
# Can't do AMD drivers because they require LLVM, which is currently
# problematic in our Android builds.
- export CROSS=x86_64-linux-android
- export GALLIUM_DRIVERS=iris,virgl,zink,softpipe,llvmpipe,swrast
- export GALLIUM_DRIVERS=iris,virgl,zink,softpipe
- export VULKAN_DRIVERS=intel,virtio,swrast
- .gitlab-ci/create-llvm-meson-wrap-file.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
# remove all the files created by the previous build before the next build
- git clean -dxf .
# aarch64 build:
# build-only, to catch compilation regressions
# without calling .gitlab-ci/prepare-artifacts.sh so that the
# artifacts are not shipped in mesa-x86_64-android-${BUILDTYPE}
- export CROSS=aarch64-linux-android
- export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d
- export VULKAN_DRIVERS=freedreno,broadcom,virtio
- *meson-build
.meson-cross:
extends:
- .meson-build
- .meson-build-only
- .use-debian/x86_64_build
variables:
UNWIND: "disabled"
DRI_LOADERS: >
@@ -506,7 +465,6 @@ debian-android:
-D gbm=enabled
-D egl=enabled
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
-D gallium-vdpau=disabled
-D gallium-va=disabled
@@ -517,20 +475,16 @@ debian-android:
extends:
- .meson-cross
- .use-debian/arm64_build
needs:
- debian/arm64_build
variables:
VULKAN_DRIVERS: "asahi,broadcom,freedreno"
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,llvmpipe,softpipe,tegra,v3d,vc4,zink"
BUILDTYPE: "debugoptimized"
tags:
- aarch64
debian-arm32:
extends:
- .meson-arm
- .ci-deqp-artifacts
stage: build-for-tests
- .meson-build-for-tests
variables:
CROSS: armhf
DRI_LOADERS:
@@ -542,20 +496,33 @@ debian-arm32:
-D llvm=disabled
-D valgrind=disabled
-D gallium-rusticl=false
-D mesa-clc=system
-D precomp-compiler=system
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=
-D glx=disabled
-D platforms=
-D mesa-clc=enabled
-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.
ARTIFACTS_DEBUG_SYMBOLS: 1
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
debian-arm32-asan:
extends:
- debian-arm32
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
GALLIUM_DRIVERS: "etnaviv"
VULKAN_DRIVERS: ""
DRI_LOADERS:
@@ -574,7 +541,7 @@ debian-arm64:
extends:
- .meson-arm
- .ci-deqp-artifacts
stage: build-for-tests
- .meson-build-for-tests
variables:
C_ARGS: >
-Wno-error=array-bounds
@@ -592,16 +559,13 @@ debian-arm64:
-D gallium-rusticl=true
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
debian-arm64-asan:
extends:
- debian-arm64
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "broadcom,freedreno"
GALLIUM_DRIVERS: "freedreno,vc4,v3d"
DRI_LOADERS:
@@ -618,9 +582,9 @@ debian-arm64-asan:
debian-arm64-ubsan:
extends:
- debian-arm64
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "broadcom"
GALLIUM_DRIVERS: "v3d,vc4"
C_ARGS: >
@@ -643,9 +607,7 @@ debian-arm64-build-test:
extends:
- .meson-arm
- .ci-deqp-artifacts
needs:
- !reference [.meson-arm, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
variables:
VULKAN_DRIVERS: "amd,asahi,imagination-experimental,nouveau"
DRI_LOADERS:
@@ -657,10 +619,7 @@ debian-arm64-build-test:
debian-arm64-release:
extends:
- debian-arm64
stage: build-only
needs:
- !reference [debian-arm64, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
variables:
BUILDTYPE: release
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
@@ -675,10 +634,7 @@ debian-arm64-release:
debian-no-libdrm:
extends:
- .meson-arm
stage: build-only
needs:
- !reference [.meson-arm, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
variables:
VULKAN_DRIVERS: freedreno
GALLIUM_DRIVERS: "zink,llvmpipe"
@@ -692,12 +648,12 @@ debian-no-libdrm:
-D glx=disabled
-D gbm=disabled
-D egl=disabled
-D perfetto=true
debian-clang:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
extends:
- .meson-build-only
- .use-debian/x86_64_build
variables:
BUILDTYPE: debug
UNWIND: "enabled"
@@ -730,17 +686,17 @@ debian-clang:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D shared-glapi=enabled
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio,swrast,panfrost,imagination-experimental,microsoft-experimental,nouveau
EXTRA_OPTION:
-D spirv-to-dxil=true
-D osmesa=true
-D imagination-srv=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi,imagination
-D vulkan-layers=device-select,overlay
-D build-radv-tests=true
-D build-aco-tests=true
-D mesa-clc=enabled
-D precomp-compiler=enabled
-D intel-rt=enabled
-D imagination-srv=true
-D teflon=true
@@ -748,10 +704,11 @@ debian-clang:
CXX: clang++-${LLVM_VERSION}
debian-clang-release:
extends: debian-clang
# `needs:` inherited from debian-clang
extends:
- debian-clang
- .meson-build-only
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: "release"
DRI_LOADERS: >
-D glx=xlib
@@ -767,7 +724,6 @@ debian-clang-release:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D shared-glapi=disabled
windows-msvc:
extends:
@@ -783,12 +739,10 @@ windows-msvc:
- _install/
debian-vulkan:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
extends:
- .meson-build-only
- .use-debian/x86_64_build
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: debug
UNWIND: "disabled"
DRI_LOADERS: >
@@ -800,7 +754,6 @@ debian-vulkan:
-D gles2=disabled
-D glvnd=disabled
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
-D gallium-vdpau=disabled
-D gallium-va=disabled
@@ -814,6 +767,7 @@ debian-vulkan:
VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination-experimental,microsoft-experimental,nouveau
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D build-radv-tests=true
-D build-aco-tests=true
-D intel-rt=disabled
-D imagination-srv=true
@@ -822,9 +776,8 @@ debian-x86_32:
extends:
- .meson-cross
- .use-debian/x86_32_build
needs:
- !reference [.use-debian/x86_32_build, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
- .build-run-long # it's not clear why this runs long, but it also doesn't matter much
variables:
BUILDTYPE: debug
CROSS: i386
@@ -858,11 +811,9 @@ debian-s390x:
extends:
- .meson-cross
- .use-debian/s390x_build
needs:
- !reference [.use-debian/s390x_build, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
tags:
- kvm
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
variables:
BUILDTYPE: debug
CROSS: s390x
@@ -875,14 +826,12 @@ debian-ppc64el:
extends:
- .meson-cross
- .use-debian/ppc64el_build
needs:
- !reference [.use-debian/ppc64el_build, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
variables:
BUILDTYPE: debug
CROSS: ppc64el
GALLIUM_DRIVERS: "nouveau,radeonsi,llvmpipe,softpipe,virgl,zink"
VULKAN_DRIVERS: "amd,swrast"
GALLIUM_DRIVERS: "nouveau,llvmpipe,softpipe,virgl,zink"
VULKAN_DRIVERS: "swrast"
DRI_LOADERS:
-D glvnd=disabled
@@ -893,11 +842,10 @@ python-artifacts:
extends:
- .use-debian/x86_64_pyutils
- .build-common
- .meson-build-for-tests
variables:
GIT_STRATEGY: fetch
S3_ARTIFACT_NAME: mesa-python-ci-artifacts
timeout: 10m
script:
- .gitlab-ci/prepare-artifacts-python.sh
tags:
- placeholder-job

View File

@@ -2,6 +2,9 @@
VARS=(
ACO_DEBUG
ANGLE_TAG
ANGLE_TRACE_FILES_TAG
ANV_DEBUG
ARTIFACTS_BASE_URL
ASAN_OPTIONS
BASE_SYSTEM_FORK_HOST_PREFIX
@@ -10,9 +13,8 @@ VARS=(
CI_COMMIT_REF_NAME
CI_COMMIT_TITLE
CI_JOB_ID
S3_JWT_FILE
CI_JOB_STARTED_AT
CI_JOB_NAME
CI_JOB_STARTED_AT
CI_JOB_URL
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
CI_MERGE_REQUEST_TITLE
@@ -64,6 +66,7 @@ VARS=(
HWCI_START_XORG
HWCI_TEST_ARGS
HWCI_TEST_SCRIPT
INTEL_XE_IGNORE_EXPERIMENTAL_WARNING
IR3_SHADER_DEBUG
JOB_ARTIFACTS_BASE
JOB_RESULTS_PATH
@@ -73,6 +76,7 @@ VARS=(
LD_LIBRARY_PATH
LIBGL_ALWAYS_SOFTWARE
LP_NUM_THREADS
LVP_POISON_MEMORY
MESA_BASE_TAG
MESA_BUILD_PATH
MESA_DEBUG
@@ -87,18 +91,15 @@ VARS=(
MESA_TEMPLATES_COMMIT
MESA_VK_ABORT_ON_DEVICE_LOSS
MESA_VK_IGNORE_CONFORMANCE_WARNING
S3_HOST
S3_RESULTS_UPLOAD
NIR_DEBUG
PANVK_DEBUG
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER
PAN_MESA_DEBUG
PANVK_DEBUG
PIGLIT_FRACTION
PIGLIT_NO_WINDOW
PIGLIT_OPTIONS
PIGLIT_PLATFORM
PIGLIT_PROFILES
PIGLIT_REPLAY_ANGLE_TAG
PIGLIT_REPLAY_ANGLE_ARCH
PIGLIT_REPLAY_ARTIFACTS_BASE_URL
PIGLIT_REPLAY_DEVICE_NAME
PIGLIT_REPLAY_EXTRA_ARGS
@@ -112,20 +113,22 @@ VARS=(
PIPELINE_ARTIFACTS_BASE
RADEON_DEBUG
RADV_DEBUG
radv_enable_float16_gfx8
RADV_PERFTEST
S3_HOST
S3_JWT_FILE
S3_RESULTS_UPLOAD
SKQP_ASSETS_DIR
SKQP_BACKENDS
STORAGE_FORK_HOST_PATH
STORAGE_MAINLINE_HOST_PATH
TU_DEBUG
USE_ANGLE
VIRGL_HOST_API
VIRGL_RENDER_SERVER
WAFFLE_PLATFORM
VK_DRIVER
ZINK_DESCRIPTORS
WAFFLE_PLATFORM
ZINK_DEBUG
LVP_POISON_MEMORY
ZINK_DESCRIPTORS
# Dead code within Mesa CI, but required by virglrender CI
# (because they include our files in their CI)

View File

@@ -92,9 +92,9 @@ if [ "$HWCI_KVM" = "true" ]; then
} || \
modprobe ${KVM_KERNEL_MODULE}
mkdir -p /lava-files
mkdir -p /kernel
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${KERNEL_IMAGE_NAME}" \
-o "/kernel/${KERNEL_IMAGE_NAME}" \
"${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}"
fi
@@ -227,10 +227,10 @@ set -x
# kill the job.
cleanup
# upload artifacts
# 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

@@ -35,6 +35,27 @@
# - gt_act_freq_mhz (the actual GPU freq)
# - gt_cur_freq_mhz (the last requested freq)
#
# Intel later switched to per-tile sysfs interfaces, which is what the Xe DRM
# driver exlusively uses, and the capabilites are now located under the
# following directory for the first tile:
#
# /sys/class/drm/card<n>/device/tile0/gt0/freq0/<freq_info>
#
# Where <n> is the DRM card index and <freq_info> one of the following:
#
# - max_freq (enforced maximum freq)
# - min_freq (enforced minimum freq)
#
# The hardware capabilities can be accessed via:
#
# - rp0_freq (supported maximum freq)
# - rpn_freq (supported minimum freq)
# - rpe_freq (most efficient freq)
#
# The current frequency can be read from:
# - act_freq (the actual GPU freq)
# - cur_freq (the last requested freq)
#
# Also note that in addition to GPU management, the script offers the
# possibility to adjust CPU operating frequencies. However, this is currently
# limited to just setting the maximum scaling frequency as percentage of the
@@ -50,10 +71,25 @@
# Constants
#
# Check if any /sys/class/drm/cardX/device/tile0 directory exists to detect Xe
USE_XE=0
for i in $(seq 0 15); do
if [ -d "/sys/class/drm/card$i/device/tile0" ]; then
USE_XE=1
break
fi
done
# GPU
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
ENF_FREQ_INFO="max min boost"
CAP_FREQ_INFO="RP0 RPn RP1"
if [ "$USE_XE" -eq 1 ]; then
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/device/tile0/gt0/freq0/%s_freq"
ENF_FREQ_INFO="max min"
CAP_FREQ_INFO="rp0 rpn rpe"
else
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
ENF_FREQ_INFO="max min boost"
CAP_FREQ_INFO="RP0 RPn RP1"
fi
ACT_FREQ_INFO="act cur"
THROTT_DETECT_SLEEP_SEC=2
THROTT_DETECT_PID_FILE_PATH=/tmp/thrott-detect.pid
@@ -112,7 +148,11 @@ identify_intel_gpu() {
}
path=$(print_freq_sysfs_path "" ${i})
path=${path%/*}/device/vendor
if [ "$USE_XE" -eq 1 ]; then
path=${path%/*/*/*/*/*}/device/vendor
else
path=${path%/*}/device/vendor
fi
[ -r "${path}" ] && read vendor < "${path}" && \
[ "${vendor}" = "0x8086" ] && INTEL_DRM_CARD_INDEX=$i && return 0
@@ -197,13 +237,13 @@ compute_freq_set() {
case "$1" in
+)
val=${FREQ_RP0}
val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") # FREQ_rp0 or FREQ_RP0
;;
-)
val=${FREQ_RPn}
val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") # FREQ_rpn or FREQ_RPn
;;
*%)
val=$((${1%?} * FREQ_RP0 / 100))
val=$((${1%?} * $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") / 100))
# Adjust freq to comply with 50 MHz increments
val=$((val / 50 * 50))
;;
@@ -232,15 +272,17 @@ set_freq_max() {
read_freq_info n min || return $?
[ ${SET_MAX_FREQ} -gt ${FREQ_RP0} ] && {
# FREQ_rp0 or FREQ_RP0
[ ${SET_MAX_FREQ} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") ] && {
log ERROR "Cannot set GPU max freq (%s) to be greater than hw max freq (%s)" \
"${SET_MAX_FREQ}" "${FREQ_RP0}"
"${SET_MAX_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}")"
return 1
}
[ ${SET_MAX_FREQ} -lt ${FREQ_RPn} ] && {
# FREQ_rpn or FREQ_RPn
[ ${SET_MAX_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
log ERROR "Cannot set GPU max freq (%s) to be less than hw min freq (%s)" \
"${SET_MIN_FREQ}" "${FREQ_RPn}"
"${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
return 1
}
@@ -252,12 +294,21 @@ set_freq_max() {
[ -z "${DRY_RUN}" ] || return 0
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
$(print_freq_sysfs_path boost) > /dev/null;
# Write to max freq path
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) > /dev/null;
then
log ERROR "Failed to set GPU max frequency"
return 1
fi
# Only write to boost if the sysfs file exists, as it's removed in Xe
if [ -e "$(print_freq_sysfs_path boost)" ]; then
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path boost) > /dev/null;
then
log ERROR "Failed to set GPU boost frequency"
return 1
fi
fi
}
#
@@ -274,9 +325,9 @@ set_freq_min() {
return 1
}
[ ${SET_MIN_FREQ} -lt ${FREQ_RPn} ] && {
[ ${SET_MIN_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
log ERROR "Cannot set GPU min freq (%s) to be less than hw min freq (%s)" \
"${SET_MIN_FREQ}" "${FREQ_RPn}"
"${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
return 1
}
@@ -294,7 +345,7 @@ set_freq_min() {
#
set_freq() {
# Get hw max & min frequencies
read_freq_info n RP0 RPn || return $?
read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f1,2) || return $? # RP0 RPn
[ -z "${SET_MAX_FREQ}" ] || {
SET_MAX_FREQ=$(compute_freq_set "${SET_MAX_FREQ}")
@@ -397,7 +448,7 @@ detect_throttling() {
}
(
read_freq_info n RPn || exit $?
read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f2) || return $? # RPn
while true; do
sleep ${THROTT_DETECT_SLEEP_SEC}
@@ -406,13 +457,13 @@ detect_throttling() {
#
# The throttling seems to occur when act freq goes below min.
# However, it's necessary to exclude the idle states, where
# act freq normally reaches RPn and cur goes below min.
# act freq normally reaches rpn and cur goes below min.
#
[ ${FREQ_act} -lt ${FREQ_min} ] && \
[ ${FREQ_act} -gt ${FREQ_RPn} ] && \
[ ${FREQ_act} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && \
[ ${FREQ_cur} -ge ${FREQ_min} ] && \
printf "GPU throttling detected: act=%s min=%s cur=%s RPn=%s\n" \
${FREQ_act} ${FREQ_min} ${FREQ_cur} ${FREQ_RPn}
printf "GPU throttling detected: act=%s min=%s cur=%s rpn=%s\n" \
${FREQ_act} ${FREQ_min} ${FREQ_cur} $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")
done
) &

View File

@@ -0,0 +1,2 @@
variables:
CONDITIONAL_BUILD_ANGLE_TAG: ab19bccfd3858c539ba8cb8d9b52a003

View File

@@ -56,16 +56,16 @@ DEPS=(
spirv-tools-dev
spirv-llvm-translator-dev
util-macros
wayland-dev
wayland-protocols
)
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages sphinx===5.1.1 hawkmoth===0.16.0
pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
. .gitlab-ci/container/container_pre_build.sh
EXTRA_MESON_ARGS='--prefix=/usr' \
. .gitlab-ci/container/build-wayland.sh
############### Uninstall the build software

View File

@@ -7,7 +7,7 @@ set -o xtrace
# network transfer, disk usage, and runtime on test jobs)
# shellcheck disable=SC2154 # arch is assigned in previous scripts
if curl -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
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="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"

View File

@@ -1,5 +1,10 @@
#!/usr/bin/env bash
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml and .gitlab-ci/container/gitlab-ci.yml tags:
# DEBIAN_BUILD_TAG
# ANDROID_LLVM_ARTIFACT_NAME
set -exu
# If CI vars are not set, assign an empty value, this prevents -u to fail
@@ -34,9 +39,8 @@ if curl -s -o /dev/null -I -L -f --retry 4 --retry-delay 15 "https://${S3_HOST}/
exit
fi
# Install some dependencies needed to build LLVM
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
ninja-build
unzip
)
@@ -110,10 +114,8 @@ 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
rm -rf "$LLVM_INSTALL_PREFIX"
apt-get purge -y "${EPHEMERAL[@]}"

135
.gitlab-ci/container/build-angle.sh Normal file → Executable file
View File

@@ -2,15 +2,26 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# KERNEL_ROOTFS_TAG
set -uex
uncollapsed_section_start angle "Building angle"
uncollapsed_section_start angle "Building ANGLE"
ANGLE_REV="76025caa1a059f464a2b0e8f879dbd4746f092b9"
SCRIPTS_DIR="$(pwd)/.gitlab-ci"
ANGLE_PATCH_DIR="${SCRIPTS_DIR}/container/patches"
# 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="a3f2545f6bb3e8d27827dceb2b4e901673995ad1"
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
if [[ -z "${ANGLE_ARCH:-}" ]]; then
case "$DEBIAN_ARCH" in
amd64) ANGLE_ARCH=x64;;
arm64) ANGLE_ARCH=arm64;;
esac
fi
# DEPOT tools
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot-tools
@@ -25,37 +36,39 @@ git remote add origin https://chromium.googlesource.com/angle/angle.git
git fetch --depth 1 origin "$ANGLE_REV"
git checkout FETCH_HEAD
angle_patch_files=(
build-angle_deps_Make-more-sources-conditional.patch
)
for patch in "${angle_patch_files[@]}"; do
echo "Apply patch to ANGLE from ${patch}"
GIT_COMMITTER_DATE="$(LC_TIME=C date -d@0)" git am < "${ANGLE_PATCH_DIR}/${patch}"
done
echo "$ANGLE_REV" > /angle/version
{
echo "ANGLE base version $ANGLE_REV"
echo "The following local patches are applied on top:"
git log --reverse --oneline $ANGLE_REV.. --format='- %s'
} > /angle/version
GCLIENT_CUSTOM_VARS=()
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl=False')
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_cl_testing=False')
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_vulkan_validation_layers=False')
GCLIENT_CUSTOM_VARS+=('--custom-var=angle_enable_wgpu=False')
GCLIENT_CUSTOM_VARS+=('--custom-var=build_angle_deqp_tests=False')
GCLIENT_CUSTOM_VARS+=('--custom-var=build_angle_perftests=False')
if [[ "$ANGLE_TARGET" == "android" ]]; then
GCLIENT_CUSTOM_VARS+=('--custom-var=checkout_android=True')
fi
# source preparation
gclient config --name REPLACE-WITH-A-DOT --unmanaged \
--custom-var='angle_enable_cl=False' \
--custom-var='angle_enable_cl_testing=False' \
--custom-var='angle_enable_vulkan_validation_layers=False' \
--custom-var='angle_enable_wgpu=False' \
--custom-var='build_allow_regenerate=False' \
--custom-var='build_angle_deqp_tests=False' \
--custom-var='build_angle_perftests=False' \
--custom-var='build_with_catapult=False' \
--custom-var='build_with_swiftshader=False' \
"${GCLIENT_CUSTOM_VARS[@]}" \
https://chromium.googlesource.com/angle/angle.git
sed -e 's/REPLACE-WITH-A-DOT/./;' -i .gclient
gclient sync -j"${FDO_CI_CONCURRENT:-4}"
sed -e 's|"custom_deps" : {|"custom_deps" : {\
"third_party/clspv/src": None,\
"third_party/dawn": None,\
"third_party/glmark2/src": None,\
"third_party/libjpeg_turbo": None,\
"third_party/llvm/src": None,\
"third_party/OpenCL-CTS/src": None,\
"third_party/SwiftShader": None,\
"third_party/VK-GL-CTS/src": None,\
"third_party/vulkan-validation-layers/src": None,|' -i .gclient
gclient sync --no-history -j"${FDO_CI_CONCURRENT:-4}"
mkdir -p out/Release
echo '
cat > out/Release/args.gn <<EOF
angle_assert_always_on=false
angle_build_all=false
angle_build_tests=false
angle_enable_cl=false
@@ -71,28 +84,76 @@ angle_enable_vulkan_api_dump_layer=false
angle_enable_vulkan_validation_layers=false
angle_has_frame_capture=false
angle_has_histograms=false
angle_has_rapidjson=false
angle_use_custom_libvulkan=false
angle_egl_extension="so.1"
angle_glesv2_extension="so.2"
build_angle_deqp_tests=false
dcheck_always_on=true
enable_expensive_dchecks=false
is_component_build=false
is_debug=false
' > out/Release/args.gn
target_cpu="${ANGLE_ARCH}"
target_os="${ANGLE_TARGET}"
treat_warnings_as_errors=false
EOF
case "$ANGLE_TARGET" in
linux) cat >> out/Release/args.gn <<EOF
angle_egl_extension="so.1"
angle_glesv2_extension="so.2"
use_custom_libcxx=false
custom_toolchain="//build/toolchain/linux/unbundle:default"
host_toolchain="//build/toolchain/linux/unbundle:default"
EOF
;;
android) cat >> out/Release/args.gn <<EOF
android_ndk_version="${ANDROID_NDK_VERSION}"
android64_ndk_api_level=${ANDROID_SDK_VERSION}
android32_ndk_api_level=${ANDROID_SDK_VERSION}
use_custom_libcxx=true
EOF
;;
*) echo "Unexpected ANGLE_TARGET value: $ANGLE_TARGET"; exit 1;;
esac
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
# We need to get an AArch64 sysroot - because ANGLE isn't great friends with
# system dependencies - but use the default system toolchain, because the
# 'arm64' toolchain you get from Google infrastructure is a cross-compiler
# from x86-64
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
fi
gn gen out/Release
# depot_tools overrides ninja with a version that doesn't work. We want
# ninja with FDO_CI_CONCURRENT anyway.
/usr/local/bin/ninja -C out/Release/ libEGL libGLESv2
(
# The 'unbundled' toolchain configuration requires clang, and it also needs to
# be configured via environment variables.
export CC="clang-${LLVM_VERSION}"
export HOST_CC="$CC"
export CFLAGS="-Wno-unknown-warning-option"
export HOST_CFLAGS="$CFLAGS"
export CXX="clang++-${LLVM_VERSION}"
export HOST_CXX="$CXX"
export CXXFLAGS="-Wno-unknown-warning-option"
export HOST_CXXFLAGS="$CXXFLAGS"
export AR="ar"
export HOST_AR="$AR"
export NM="nm"
export HOST_NM="$NM"
export LDFLAGS="-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
export HOST_LDFLAGS="$LDFLAGS"
rm -f out/Release/libvulkan.so* out/Release/*.so.TOC
gn gen out/Release
# depot_tools overrides ninja with a version that doesn't work. We want
# ninja with FDO_CI_CONCURRENT anyway.
/usr/local/bin/ninja -C out/Release/ libEGL libGLESv1_CM libGLESv2
)
rm -f out/Release/libvulkan.so* out/Release/*.so*.TOC
cp out/Release/lib*.so* /angle/
ln -s libEGL.so.1 /angle/libEGL.so
ln -s libGLESv2.so.2 /angle/libGLESv2.so
if [[ "$ANGLE_TARGET" == "linux" ]]; then
ln -s libEGL.so.1 /angle/libEGL.so
ln -s libGLESv2.so.2 /angle/libGLESv2.so
fi
rm -rf out

View File

@@ -11,7 +11,7 @@ set -uex
uncollapsed_section_start apitrace "Building apitrace"
APITRACE_VERSION="0a6506433e1f9f7b69757b4e5730326970c4321a"
APITRACE_VERSION="952bad1469ea747012bdc48c48993bd5f13eec04"
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
pushd /apitrace

View File

@@ -15,13 +15,13 @@ uncollapsed_section_start crosvm "Building crosvm"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
CROSVM_VERSION=2118fbb57ca26b495a9aa407845c7729d697a24b
CROSVM_VERSION=e27efaf8f4bdc4a47d1e99cc44d2b6908b6f36bd
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
pushd /platform/crosvm
git checkout "$CROSVM_VERSION"
git submodule update --init
VIRGLRENDERER_VERSION=57a2b82e0958f08d02ade8400786e1ca0935c9b1
VIRGLRENDERER_VERSION=7570167549358ce77b8d4774041b4a77c72a021c
rm -rf third_party/virglrenderer
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
pushd third_party/virglrenderer
@@ -30,14 +30,14 @@ meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true $
meson install -C build
popd
cargo update -p pkg-config@0.3.26 --precise 0.3.27
rm rust-toolchain
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
bindgen-cli \
--locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local \
--version 0.65.1 \
--version 0.71.1 \
${EXTRA_CARGO_ARGS:-}
CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \

View File

@@ -24,7 +24,7 @@ set -x
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_MAIN_COMMIT=a9988483c0864d7190e5e6264ccead95423dfd00
DEQP_MAIN_COMMIT=76c1572eaba42d7ddd9bb8eb5788e52dd932068e
DEQP_VK_VERSION=1.4.1.1
DEQP_GL_VERSION=4.6.5.0
DEQP_GLES_VERSION=3.2.11.0
@@ -47,6 +47,8 @@ main_cts_patch_files=(
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Stop querying device address from unbound buffers
046343f46f7d39d53b47842d7fd8ed3279528046
)
# shellcheck disable=SC2034
@@ -67,13 +69,6 @@ gl_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
)
if [ "${DEQP_TARGET}" = 'android' ]; then
gl_cts_patch_files+=(
build-deqp-gl_Allow-running-on-Android-from-the-command-line.patch
build-deqp-gl_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
# shellcheck disable=SC2034
# GLES builds also EGL
gles_cts_commits_to_backport=(
@@ -124,8 +119,8 @@ git checkout FETCH_HEAD
DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
git fetch origin main
if ! git merge-base --is-ancestor "$DEQP_MAIN_COMMIT" origin/main; then
merge_base="$(curl --fail -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
exit 1
fi
@@ -173,6 +168,14 @@ done
# always goes through ssh or https.
python3 external/fetch_sources.py --insecure
case "${DEQP_API}" in
VK-main)
# Video tests rely on external files
python3 external/fetch_video_decode_samples.py
python3 external/fetch_video_encode_samples.py
;;
esac
if [[ "$DEQP_API" = tools ]]; then
# Save the testlog stylesheets:
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp-$deqp_api
@@ -297,6 +300,7 @@ if [ "$DEQP_API" = tools ]; then
fi
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
rm -rf assets/**/mustpass/
rm -rf external/**/mustpass/
rm -rf external/vulkancts/modules/vulkan/vk-main*
rm -rf external/vulkancts/modules/vulkan/vk-default

View File

@@ -25,11 +25,10 @@ if [ "${SKIP_UPDATE_FLUSTER_VECTORS}" != 1 ]; then
# 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
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done "https://${S3_PATH_FLUSTER}/done"
s3_upload /lava-files/done "https://${S3_PATH_FLUSTER}/"
# Don't include the vectors in the rootfs
rm -fr fluster/resources/*

View File

@@ -10,7 +10,7 @@ uncollapsed_section_start piglit "Building piglit"
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
REV="631b72944f56e688f56a08d26c8a9f3988801a08"
REV="0ecdebb0f5927728ddeeb851639a559b0f7d6590"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit

View File

@@ -7,12 +7,6 @@ set -ex
uncollapsed_section_start rust "Building Rust toolchain"
# cargo (and rustup) wants to store stuff in $HOME/.cargo, and binaries in
# $HOME/.cargo/bin. Make bin a link to a public bin directory so the commands
# are just available to all build jobs.
mkdir -p "$HOME"/.cargo
ln -s /usr/local/bin "$HOME"/.cargo/bin
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
RUST_VERSION=1.78.0-2024-05-02
@@ -25,11 +19,15 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
--profile minimal \
-y
# Make rustup tools available in the PATH environment variable
# shellcheck disable=SC1091
. "$HOME/.cargo/env"
rustup component add clippy rustfmt
# Set up a config script for cross compiling -- cargo needs your system cc for
# linking in cross builds, but doesn't know what you want to use for system cc.
cat > /root/.cargo/config <<EOF
cat > "$HOME/.cargo/config" <<EOF
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

View File

@@ -19,7 +19,7 @@ git clone \
pushd /va-utils
# Too old libva in Debian 11. TODO: when this PR gets in, refer to the patch.
curl -L https://github.com/intel/libva-utils/pull/329.patch | git am
curl --fail -L https://github.com/intel/libva-utils/pull/329.patch | git am
meson setup build -D tests=true -Dprefix=/va ${EXTRA_MESON_ARGS:-}
meson install -C build

View File

@@ -3,12 +3,11 @@
# 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
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
VKD3D_PROTON_COMMIT="b121e6d746341e0aaba7663e3d85f3194e8e20e1"
VKD3D_PROTON_COMMIT="078f07f588c849c52fa21c8cfdd1c201465b1932"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"

View File

@@ -9,7 +9,7 @@ set -uex
uncollapsed_section_start vulkan-validation "Building Vulkan validation layers"
VALIDATION_TAG="snapshot-2024wk39"
VALIDATION_TAG="snapshot-2025wk15"
git clone -b "$VALIDATION_TAG" --single-branch --depth 1 https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
pushd Vulkan-ValidationLayers
@@ -17,7 +17,7 @@ pushd Vulkan-ValidationLayers
sed -i scripts/known_good.json -e 's/SPIRV_SKIP_EXECUTABLES=OFF/SPIRV_SKIP_EXECUTABLES=ON/'
python3 scripts/update_deps.py --dir external --config release --generator Ninja --optional tests
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DBUILD_WERROR=OFF -C external/helper.cmake -S . -B build
ninja -C build
ninja -C build -j"${FDO_CI_CONCURRENT:-4}"
cmake --install build --strip
popd
rm -rf Vulkan-ValidationLayers

View File

@@ -7,6 +7,8 @@ uncollapsed_section_start wayland "Building Wayland"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# ALPINE_X86_64_BUILD_TAG
# DEBIAN_BASE_TAG
# DEBIAN_BUILD_TAG
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
@@ -15,7 +17,7 @@ uncollapsed_section_start wayland "Building Wayland"
# KERNEL_ROOTFS_TAG
export LIBWAYLAND_VERSION="1.21.0"
export WAYLAND_PROTOCOLS_VERSION="1.38"
export WAYLAND_PROTOCOLS_VERSION="1.41"
git clone https://gitlab.freedesktop.org/wayland/wayland
cd wayland

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# When changing this file, check if the *_BUIL_TAG tags in
# When changing this file, all the linux tags in
# .gitlab-ci/image-tags.yml need updating.
set -eu

View File

@@ -6,8 +6,6 @@ fi
# Clean up any build cache
rm -rf /root/.cache
rm -rf /root/.cargo
rm -rf /.cargo
if test -x /usr/bin/ccache; then
ccache --show-stats

View File

@@ -1,4 +1,7 @@
#!/bin/sh
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
if test -x /usr/bin/ccache; then
if test -f /etc/debian_version; then
@@ -42,3 +45,30 @@ echo -e "retry_connrefused = on\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
# shellcheck disable=SC1090
source "$CARGO_ENV_FILE"
fi
ci_tag_early_checks() {
# Runs the first part of the build script to perform the tag check only
uncollapsed_section_switch "ci_tag_early_checks" "Ensuring component versions match declared tags in CI builds"
echo "[Structured Tagging] Checking components: ${CI_BUILD_COMPONENTS}"
# shellcheck disable=SC2086
for component in ${CI_BUILD_COMPONENTS}; do
bin/ci/update_tag.py --check ${component} || exit 1
done
echo "[Structured Tagging] Components check done"
section_end "ci_tag_early_checks"
}
# Check if each declared tag component is up to date before building
if [ -n "${CI_BUILD_COMPONENTS:-}" ]; then
# Remove any duplicates by splitting on whitespace, sorting, then joining back
CI_BUILD_COMPONENTS="$(echo "${CI_BUILD_COMPONENTS}" | xargs -n1 | sort -u | xargs)"
ci_tag_early_checks
fi

View File

@@ -19,6 +19,8 @@ EPHEMERAL=(
apt-get install -y --no-remove "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_pre_build.sh
# 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 \
@@ -38,6 +40,12 @@ sh .gitlab-ci/container/create-android-cross-file.sh /$ndk i686-linux-android x8
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk aarch64-linux-android aarch64 armv8 $ANDROID_SDK_VERSION
sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi arm armv7hl $ANDROID_SDK_VERSION armv7a-linux-androideabi
# Build libdrm for the host (Debian) environment, so it's available for
# binaries we'll run as part of the build process
. .gitlab-ci/container/build-libdrm.sh
# Build libdrm for the NDK environment, so it's available when building for
# the Android target
for arch in \
x86_64-linux-android \
i686-linux-android \
@@ -106,3 +114,5 @@ rm -rf $LIBELF_VERSION
bash .gitlab-ci/container/build-android-x86_64-llvm.sh
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH=armhf \
. .gitlab-ci/container/debian/test-base.sh

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="armhf" \
. .gitlab-ci/container/debian/test-gl.sh

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="armhf" \
. .gitlab-ci/container/debian/test-vk.sh

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="arm64" \
. .gitlab-ci/container/debian/test-gl.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="arm64" \
. .gitlab-ci/container/debian/test-vk.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -12,7 +12,7 @@ case "${FDO_DISTRIBUTION_VERSION%-*},${LLVM_VERSION}" in
esac
if [ "$NEED_LLVM_REPO" = "true" ]; then
curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
curl --fail -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
export LLVM_APT_REPO="deb [trusted=yes] https://apt.llvm.org/${FDO_DISTRIBUTION_VERSION%-*}/ llvm-toolchain-${FDO_DISTRIBUTION_VERSION%-*}-${LLVM_VERSION} main"
echo "$LLVM_APT_REPO" | tee /etc/apt/sources.list.d/llvm.list
fi

View File

@@ -47,13 +47,27 @@ EPHEMERAL=(
libegl-dev
libelf-dev
libepoxy-dev
libexpat1-dev
libgbm-dev
libgles2-mesa-dev
liblz4-dev
libpciaccess-dev
libssl-dev
libvulkan-dev
libudev-dev
libwaffle-dev
libwayland-dev
libx11-xcb-dev
libxcb-dri2-0-dev
libxcb-dri3-dev
libxcb-present-dev
libxfixes-dev
libxcb-ewmh-dev
libxext-dev
libxkbcommon-dev
libxrandr-dev
libxrender-dev
libzstd-dev
"llvm-${LLVM_VERSION}-dev"
make
meson
@@ -65,22 +79,29 @@ EPHEMERAL=(
python3-pip
python3-setuptools
python3-wheel
spirv-tools
wayland-protocols
xz-utils
)
DEPS=(
apt-utils
clinfo
curl
git
git-lfs
inetutils-syslogd
iptables
jq
kmod
libasan8
libcap2
libdrm2
libegl1
libepoxy0
libexpat1
libfdt1
"libclang-common-${LLVM_VERSION}-dev"
"libclang-cpp${LLVM_VERSION}"
"libllvm${LLVM_VERSION}"
liblz4-1
libpng16-16
@@ -91,20 +112,33 @@ DEPS=(
libwayland-server0
libxcb-ewmh2
libxcb-randr0
libxcb-shm0
libxcb-xfixes0
libxkbcommon0
libxrandr2
libxrender1
ocl-icd-libopencl1
pciutils
python3-lxml
python3-mako
python3-numpy
python3-packaging
python3-pil
python3-renderdoc
python3-requests
python3-simplejson
python3-six
python3-yaml
socat
spirv-tools
sysvinit-core
vulkan-tools
waffle-utils
weston
xwayland
xinit
xserver-xorg-video-amdgpu
xserver-xorg-video-ati
xauth
xvfb
zlib1g
@@ -135,10 +169,12 @@ section_end debian_setup
############### Download prebuilt kernel
if [ "$DEBIAN_ARCH" = amd64 ]; then
uncollapsed_section_start kernel "Downloading kernel"
uncollapsed_section_start kernel "Downloading kernel for crosvm"
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /lava-files/
. .gitlab-ci/container/download-prebuilt-kernel.sh
mkdir -p /kernel
# shellcheck disable=SC2153 # KERNEL_IMAGE_BASE is set in the root .gitlab-ci.yml file
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/kernel/${KERNEL_IMAGE_NAME}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${KERNEL_IMAGE_NAME}"
section_end kernel
fi
@@ -164,19 +200,27 @@ fi
############### Build Crosvm
. .gitlab-ci/container/build-crosvm.sh
# crosvm build fails on ARMv7 due to Xlib type-size issues
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-crosvm.sh
fi
############### Build dEQP runner
. .gitlab-ci/container/build-deqp-runner.sh
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
############### Uninstall the build software
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
rm -rf /root/.rustup
# Properly uninstall rustup including cargo and init scripts on shells
rustup self uninstall -y
. .gitlab-ci/container/container_post_build.sh

View File

@@ -44,6 +44,7 @@ EPHEMERAL=(
libxrandr-dev
libxrender-dev
"llvm-${LLVM_VERSION}-dev"
"lld-${LLVM_VERSION}"
make
meson
ocl-icd-opencl-dev
@@ -54,24 +55,6 @@ EPHEMERAL=(
)
DEPS=(
clinfo
iptables
kmod
"libclang-common-${LLVM_VERSION}-dev"
"libclang-cpp${LLVM_VERSION}"
libcap2
libegl1
libepoxy0
libfdt1
libxcb-shm0
ocl-icd-libopencl1
python3-lxml
python3-renderdoc
python3-simplejson
spirv-tools
sysvinit-core
weston
xwayland
)
apt-get update
@@ -84,6 +67,13 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
section_end debian_setup
############### Build ANGLE
if [ "$DEBIAN_ARCH" == "arm64" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
fi
############### Build piglit
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
@@ -118,10 +108,6 @@ DEQP_TARGET=surfaceless \
rm -rf /VK-GL-CTS
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
############### Build validation layer for zink
. .gitlab-ci/container/build-vulkan-validation.sh
@@ -139,3 +125,7 @@ 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

@@ -13,8 +13,6 @@ uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y libelogind0 # this interfere with systemd deps, install separately
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
ccache
@@ -49,32 +47,29 @@ EPHEMERAL=(
python3-pip
python3-setuptools
python3-wheel
software-properties-common
wine64-tools
xz-utils
)
DEPS=(
curl
libepoxy0
libxcb-shm0
pciutils
python3-lxml
python3-simplejson
sysvinit-core
weston
xwayland
libfontconfig1
libglu1-mesa
)
if [ "$DEBIAN_ARCH" != "armhf" ]; then
# Wine isn't available on 32-bit ARM
EPHEMERAL+=(
wine64-tools
)
DEPS+=(
wine
wine64
xinit
xserver-xorg-video-amdgpu
xserver-xorg-video-ati
)
)
fi
apt-get update
apt-get install -y --no-remove --no-install-recommends \
"${DEPS[@]}" "${EPHEMERAL[@]}"
"${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
############### Building ...
@@ -84,23 +79,25 @@ section_end debian_setup
############### Build piglit replayer
# We don't run any _piglit_ Vulkan tests in the containers.
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=OFF
-DPIGLIT_USE_WAYLAND=OFF
-DPIGLIT_USE_X11=OFF
-DPIGLIT_BUILD_GLX_TESTS=OFF
-DPIGLIT_BUILD_EGL_TESTS=OFF
-DPIGLIT_BUILD_WGL_TESTS=OFF
-DPIGLIT_BUILD_GL_TESTS=OFF
-DPIGLIT_BUILD_GLES1_TESTS=OFF
-DPIGLIT_BUILD_GLES2_TESTS=OFF
-DPIGLIT_BUILD_GLES3_TESTS=OFF
-DPIGLIT_BUILD_CL_TESTS=OFF
-DPIGLIT_BUILD_VK_TESTS=OFF
-DPIGLIT_BUILD_DMA_BUF_TESTS=OFF" \
if [ "$DEBIAN_ARCH" != "armhf" ]; then
# We don't run any _piglit_ Vulkan tests in the containers.
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=OFF
-DPIGLIT_USE_WAYLAND=OFF
-DPIGLIT_USE_X11=OFF
-DPIGLIT_BUILD_GLX_TESTS=OFF
-DPIGLIT_BUILD_EGL_TESTS=OFF
-DPIGLIT_BUILD_WGL_TESTS=OFF
-DPIGLIT_BUILD_GL_TESTS=OFF
-DPIGLIT_BUILD_GLES1_TESTS=OFF
-DPIGLIT_BUILD_GLES2_TESTS=OFF
-DPIGLIT_BUILD_GLES3_TESTS=OFF
-DPIGLIT_BUILD_CL_TESTS=OFF
-DPIGLIT_BUILD_VK_TESTS=OFF
-DPIGLIT_BUILD_DMA_BUF_TESTS=OFF" \
PIGLIT_BUILD_TARGETS="piglit_replayer" \
. .gitlab-ci/container/build-piglit.sh
fi
############### Build dEQP VK
@@ -108,9 +105,11 @@ DEQP_API=tools \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK-main \
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
DEQP_API=VK \
DEQP_TARGET=default \
@@ -118,23 +117,27 @@ DEQP_TARGET=default \
rm -rf /VK-GL-CTS
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
############### Build Fossilize
. .gitlab-ci/container/build-fossilize.sh
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-fossilize.sh
fi
############### Build gfxreconstruct
. .gitlab-ci/container/build-gfxreconstruct.sh
# gfxreconstruct thinks that ARMv7-on-AArch64 is cross-compilation
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-gfxreconstruct.sh
fi
############### Build VKD3D-Proton
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
. .gitlab-ci/container/build-vkd3d-proton.sh
# Wine isn't available on 32-bit ARM
if [ "$DEBIAN_ARCH" != "armhf" ]; then
uncollapsed_section_switch proton "Installing Proton (Wine/D3DVK emulation)"
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
. .gitlab-ci/container/build-vkd3d-proton.sh
fi
############### Uninstall the build software
@@ -145,3 +148,7 @@ 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

@@ -46,6 +46,12 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
unzip -d / "$ndk.zip"
rm "$ndk.zip"
############### Build ANGLE
ANGLE_TARGET=android \
DEBIAN_ARCH=amd64 \
. .gitlab-ci/container/build-angle.sh
############### Build dEQP runner
export ANDROID_NDK_HOME=/$ndk
@@ -53,21 +59,16 @@ export RUST_TARGET=x86_64-linux-android
. .gitlab-ci/container/build-rust.sh
. .gitlab-ci/container/build-deqp-runner.sh
rm -rf /root/.cargo
rm -rf /root/.rustup
# Properly uninstall rustup including cargo and init scripts on shells
rustup self uninstall -y
############### Build dEQP GL
############### Build dEQP
DEQP_API=tools \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
@@ -82,18 +83,20 @@ rm -rf /VK-GL-CTS
############### Downloading Cuttlefish resources ...
uncollapsed_section_start cuttlefish "Downloading, building and installing Cuttlefish"
CUTTLEFISH_PROJECT_PATH=ao2/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS=mesa-venus
CUTTLEFISH_BUILD_NUMBER=20250115.001
CUTTLEFISH_BUILD_NUMBER=20250215.001
mkdir /cuttlefish
pushd /cuttlefish
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip"
-o aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip"
unzip aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
rm aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
unzip aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
rm aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
ls -lhS ./*
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
@@ -133,8 +136,43 @@ rm -rf android-cuttlefish
addgroup --system kvm
usermod -a -G kvm,cvdnetwork root
section_end cuttlefish
############### Downloading Android CTS tools
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 "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
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
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
rm -rf "/${ndk:?}"
export SUDO_FORCE_REMOVE=yes
@@ -142,4 +180,8 @@ 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,5 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="amd64" \
. .gitlab-ci/container/debian/test-gl.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="amd64" \
. .gitlab-ci/container/debian/test-vk.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC2153
set -uex
mkdir -p kernel
pushd kernel
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
KERNEL_IMAGE_NAME+=" cheza-kernel"
fi
for image in ${KERNEL_IMAGE_NAME:-}; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${image}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${image}"
done
for dtb in ${DEVICE_TREES:-}; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${dtb}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${dtb}"
done
mkdir -p "/lava-files/rootfs-${DEBIAN_ARCH}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst"
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "/lava-files/rootfs-${DEBIAN_ARCH}/"
popd
rm -rf kernel

View File

@@ -52,15 +52,44 @@
.container:
stage: container
timeout: 1h
extends:
- .container+build-rules
- .incorporate-templates-commit
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
variables:
FDO_REPO_SUFFIX: $CI_JOB_NAME
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
# no need to pull the whole repo to build the container image
GIT_STRATEGY: none
.container-builds-angle:
variables:
ANGLE_TAG: "${CONDITIONAL_BUILD_ANGLE_TAG}"
.container-builds-android:
extends:
- .container-builds-angle
variables:
# CI_BUILD_COMPONENTS is a space-separated list of components used during early tag checks
# If this job inherits from multiple .container-builds-*, it needs to combine them
# e.g: inherits from .container-builds-angle and .container-builds-piglit
# should make CI_BUILD_COMPONENTS="angle piglit"
CI_BUILD_COMPONENTS: "angle"
.container-builds-x86_64:
extends:
- .container-builds-angle
variables:
CI_BUILD_COMPONENTS: "angle"
.container-builds-arm64:
extends:
- .container-builds-angle
variables:
CI_BUILD_COMPONENTS: "angle"
.use-base-image:
extends:
- .container
@@ -75,12 +104,14 @@ debian/x86_64_build-base:
LLVM_VERSION: &debian-x86_64-llvm 19
.use-debian/x86_64_build-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: ${DEBIAN_X86_64_BUILD_BASE_IMAGE}
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
@@ -96,11 +127,13 @@ debian/x86_64_build:
LLVM_VERSION: *debian-x86_64-llvm
.use-debian/x86_64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: ${DEBIAN_X86_64_BUILD_IMAGE_PATH}
MESA_IMAGE_PATH: "debian/x86_64_build"
MESA_IMAGE_TAG: *debian-x86_64_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
@@ -114,6 +147,8 @@ debian/x86_32_build:
MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
.use-debian/x86_32_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
@@ -133,6 +168,8 @@ debian/ppc64el_build:
LLVM_VERSION: &debian-ppc64el-llvm 15 # no LLVM packages for PPC
.use-debian/ppc64el_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
@@ -152,6 +189,8 @@ debian/s390x_build:
LLVM_VERSION: &debian-s390x-llvm 19
.use-debian/s390x_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
@@ -164,11 +203,16 @@ 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
ANDROID_LLVM_VERSION: llvmorg-18.1.8
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250103
# Space-separated list of interesting CTS modules
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
# used (LLVM 19 in our Debian system), but ANDROID_LLVM_VERSION refers to
# the cross-compiling LLVM toolchain used to build for the Android system.
@@ -177,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}
@@ -185,6 +230,8 @@ debian/android_build:
extends:
- .android-variables
- .set-image-base-tag
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/android_build"
@@ -199,7 +246,7 @@ debian/arm64_build:
- .container
- .debian-container-version
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
variables:
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-arm64-llvm 19
@@ -207,6 +254,8 @@ debian/arm64_build:
.use-debian/arm64_build:
extends:
- .set-image
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
variables:
MESA_IMAGE_PATH: "debian/arm64_build"
MESA_IMAGE_TAG: *debian-arm64_build
@@ -221,7 +270,7 @@ debian/arm64_build:
- .fdo.container-build@alpine
- .container
variables:
FDO_DISTRIBUTION_VERSION: "edge" # switch to 3.20 when gets released
FDO_DISTRIBUTION_VERSION: "3.21"
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
# Alpine based x86_64 build image
@@ -233,14 +282,16 @@ alpine/x86_64_build:
LLVM_VERSION: &alpine-llvm_version 19
rules:
# Note: the next three lines must remain in that order, so that the rules
# in `linkcheck-docs` catch nightly pipelines before the rules in `pages`
# in `linkcheck-docs` catch nightly pipelines before the rules in `deploy-docs`
# exclude them.
- !reference [linkcheck-docs, rules]
- !reference [pages, rules]
- !reference [deploy-docs, rules]
- !reference [test-docs, rules]
- !reference [.container, rules]
.use-alpine/x86_64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image
variables:
@@ -268,6 +319,8 @@ fedora/x86_64_build:
LLVM_VERSION: &fedora-x86_64-llvm 19
.use-fedora/x86_64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image
variables:
@@ -286,21 +339,50 @@ debian/x86_64_test-base:
LLVM_VERSION: *debian-x86_64-llvm
.use-debian/x86_64_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: ${DEBIAN_X86_64_TEST_BASE_IMAGE}
MESA_BASE_IMAGE: "debian/x86_64_test-base"
MESA_BASE_TAG: *debian-x86_64_test-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_test-base
# Debian based ARMv7/armhf test image base
debian/arm32_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .debian-container
- .firmware_arm32
variables:
MESA_IMAGE_TAG: &debian-arm32_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: *debian-arm64-llvm
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
.use-debian/arm32_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: "debian/arm32_test-base"
MESA_BASE_TAG: *debian-arm32_test-base
LLVM_VERSION: *debian-arm64-llvm
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
needs:
- debian/arm32_test-base
# Debian based aarch64 test image base
debian/arm64_test-base:
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .debian-container
variables:
@@ -309,13 +391,13 @@ debian/arm64_test-base:
.use-debian/arm64_test-base:
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: ${DEBIAN_ARM64_TEST_BASE_IMAGE}
MESA_BASE_IMAGE: "debian/arm64_test-base"
MESA_BASE_TAG: *debian-arm64_test-base
LLVM_VERSION: *debian-arm64-llvm
needs:
@@ -328,11 +410,13 @@ debian/x86_64_test-gl:
MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/x86_64_test-gl:
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_IMAGE_GL_PATH}
MESA_IMAGE_PATH: "debian/x86_64_test-gl"
MESA_IMAGE_TAG: *debian-x86_64_test-gl
needs:
- debian/x86_64_test-gl
@@ -344,17 +428,19 @@ debian/x86_64_test-vk:
MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/x86_64_test-vk:
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_IMAGE_VK_PATH}
MESA_IMAGE_PATH: "debian/x86_64_test-vk"
MESA_IMAGE_TAG: *debian-x86_64_test-vk
needs:
- debian/x86_64_test-vk
# Debian based x86_64 test image for Android
.debian/x86_64_test-android:
debian/x86_64_test-android:
extends:
- .android-variables
- .use-debian/x86_64_test-base
@@ -362,11 +448,14 @@ debian/x86_64_test-vk:
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
.use-debian/x86_64_test-android:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
extends:
- .android-variables
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_test-base
MESA_IMAGE_PATH: ${DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH}
MESA_IMAGE_PATH: "debian/x86_64_test-android"
MESA_IMAGE_TAG: *debian-x86_64_test-android
needs:
- debian/x86_64_test-android
@@ -379,32 +468,78 @@ debian/x86_64_pyutils:
MESA_IMAGE_TAG: &debian-x86_64_pyutils "${DEBIAN_PYUTILS_TAG}"
.use-debian/x86_64_pyutils:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .set-image
variables:
MESA_IMAGE_PATH: ${DEBIAN_PYUTILS_IMAGE}
MESA_IMAGE_PATH: "debian/x86_64_pyutils"
MESA_IMAGE_TAG: *debian-x86_64_pyutils
needs:
- debian/x86_64_pyutils
# Debian based ARMv7/armhf test image for GL
debian/arm32_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm32_test-base
variables:
MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/arm32_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm32_test-base
MESA_IMAGE_PATH: "debian/arm32_test-gl"
MESA_IMAGE_TAG: *debian-arm32_test-gl
needs:
- debian/arm32_test-gl
# Debian based ARMv7/armhf test image for VK
debian/arm32_test-vk:
rules:
- when: never # There are currently no arm32 VK jobs
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm32_test-base
variables:
MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/arm32_test-vk:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm32_test-base
MESA_IMAGE_PATH: "debian/arm32_test-vk"
MESA_IMAGE_TAG: *debian-arm32_test-vk
needs:
- debian/arm32_test-vk
# Debian based aarch64 test image for GL
debian/arm64_test-gl:
tags:
- aarch64
extends: .use-debian/arm64_test-base
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm64_test-base
- .container-builds-arm64
variables:
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/arm64_test-gl:
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm64_test-base
MESA_IMAGE_PATH: ${DEBIAN_ARM64_TEST_IMAGE_GL_PATH}
MESA_IMAGE_PATH: "debian/arm64_test-gl"
MESA_IMAGE_TAG: *debian-arm64_test-gl
needs:
- debian/arm64_test-gl
@@ -412,19 +547,19 @@ debian/arm64_test-gl:
# Debian based aarch64 test image for VK
debian/arm64_test-vk:
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm64_test-base
variables:
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/arm64_test-vk:
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm64_test-base
MESA_IMAGE_PATH: ${DEBIAN_ARM64_TEST_IMAGE_VK_PATH}
MESA_IMAGE_PATH: "debian/arm64_test-vk"
MESA_IMAGE_TAG: *debian-arm64_test-vk
needs:
- debian/arm64_test-vk
@@ -435,6 +570,7 @@ debian/arm64_test-vk:
.firmware_x86_64:
variables:
FIRMWARE_FILES: |
.gitlab-ci/firmware/i915/adl-fw.json
.gitlab-ci/firmware/i915/mtl-fw.json
.firmware_arm64:
@@ -464,6 +600,7 @@ kernel+rootfs_x86_64:
- .use-debian/x86_64_build-base
- .kernel+rootfs
- .firmware_x86_64
- .container-builds-x86_64
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
@@ -475,8 +612,7 @@ kernel+rootfs_arm64:
- .use-debian/arm64_build
- .kernel+rootfs
- .firmware_arm64
tags:
- aarch64
- .container-builds-arm64
variables:
DEBIAN_ARCH: "arm64"
LLVM_VERSION: *debian-arm64-llvm
@@ -597,7 +733,7 @@ windows_msvc:
extends:
- .windows_container_build
variables:
MESA_IMAGE_PATH: &windows_msvc_image_path ${WINDOWS_X64_MSVC_PATH}
MESA_IMAGE_PATH: &windows_msvc_image_path "windows/x86_64_msvc"
MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
DOCKERFILE: Dockerfile_msvc
MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
@@ -612,7 +748,7 @@ windows_build_msvc:
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
MESA_IMAGE_PATH: &windows_build_image_path ${WINDOWS_X64_BUILD_PATH}
MESA_IMAGE_PATH: &windows_build_image_path "windows/x86_64_build"
MESA_IMAGE_TAG: &windows_build_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_BUILD_TAG}
DOCKERFILE: Dockerfile_build
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
@@ -631,7 +767,7 @@ windows_test_msvc:
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
MESA_IMAGE_PATH: &windows_test_image_path ${WINDOWS_X64_TEST_PATH}
MESA_IMAGE_PATH: &windows_test_image_path "windows/x86_64_test"
MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_TEST_TAG}
DOCKERFILE: Dockerfile_test
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path

View File

@@ -25,7 +25,7 @@ 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 -X HEAD \
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
@@ -35,7 +35,7 @@ check_minio()
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 -X HEAD \
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
@@ -58,34 +58,12 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
BUILD_VK="ON"
GCC_ARCH="aarch64-linux-gnu"
KERNEL_ARCH="arm64"
DEFCONFIG="arch/arm64/configs/defconfig"
DEVICE_TREES="rk3399-gru-kevin.dtb"
DEVICE_TREES+=" meson-g12b-a311d-khadas-vim3.dtb"
DEVICE_TREES+=" meson-gxl-s805x-libretech-ac.dtb"
DEVICE_TREES+=" meson-gxm-khadas-vim2.dtb"
DEVICE_TREES+=" sun50i-h6-pine-h64.dtb"
DEVICE_TREES+=" imx8mq-nitrogen.dtb"
DEVICE_TREES+=" mt8192-asurada-spherion-r0.dtb"
DEVICE_TREES+=" mt8183-kukui-jacuzzi-juniper-sku16.dtb"
DEVICE_TREES+=" tegra210-p3450-0000.dtb"
DEVICE_TREES+=" apq8016-sbc-usb-host.dtb"
DEVICE_TREES+=" apq8096-db820c.dtb"
DEVICE_TREES+=" sc7180-trogdor-lazor-limozeen-nots-r5.dtb"
DEVICE_TREES+=" sc7180-trogdor-kingoftown.dtb"
DEVICE_TREES+=" sm8350-hdk.dtb"
KERNEL_IMAGE_NAME="Image"
elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
BUILD_CL="OFF"
BUILD_VK="OFF"
GCC_ARCH="arm-linux-gnueabihf"
KERNEL_ARCH="arm"
DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
DEVICE_TREES="rk3288-veyron-jaq.dtb"
DEVICE_TREES+=" sun8i-h3-libretech-all-h3-cc.dtb"
DEVICE_TREES+=" imx6q-cubox-i.dtb"
DEVICE_TREES+=" tegra124-jetson-tk1.dtb"
KERNEL_IMAGE_NAME="zImage"
. .gitlab-ci/container/create-cross-file.sh armhf
CONTAINER_ARCH_PACKAGES=(
libegl1-mesa-dev:armhf
@@ -105,9 +83,6 @@ else
BUILD_VK="ON"
GCC_ARCH="x86_64-linux-gnu"
KERNEL_ARCH="x86_64"
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
DEVICE_TREES=""
KERNEL_IMAGE_NAME="bzImage"
CONTAINER_ARCH_PACKAGES=(
libasound2-dev libcap-dev libfdt-dev libva-dev p7zip wine
)
@@ -161,6 +136,7 @@ CONTAINER_EPHEMERAL=(
libxcb-dri2-0-dev
libxkbcommon-dev
libwayland-dev
"lld-${LLVM_VERSION}"
ninja-build
openssh-server
patch
@@ -304,7 +280,8 @@ mv /apitrace/build $ROOTFS/apitrace
rm -rf /apitrace
############### Build ANGLE
if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
if [ "$DEBIAN_ARCH" != "armhf" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
mv /angle $ROOTFS/.
rm -rf /angle
@@ -335,9 +312,11 @@ if [ "$BUILD_VK" == "ON" ]; then
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK-main \
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
@@ -403,10 +382,6 @@ if [[ -e ".gitlab-ci/local/build-rootfs.sh" ]]; then
. .gitlab-ci/local/build-rootfs.sh
fi
############### Download prebuilt kernel
. .gitlab-ci/container/download-prebuilt-kernel.sh
############### Delete rust, since the tests won't be compiling anything.
rm -rf /root/.cargo
rm -rf /root/.rustup
@@ -429,11 +404,14 @@ 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
# Make a gzipped copy of the Image for db410c.
gzip -k /lava-files/Image
KERNEL_IMAGE_NAME+=" Image.gz"
fi
ROOTFSTAR="lava-rootfs.tar.zst"
@@ -444,8 +422,7 @@ popd
. .gitlab-ci/container/container_post_build.sh
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/"${ROOTFSTAR}" \
https://${S3_PATH}/"${ROOTFSTAR}"
s3_upload /lava-files/"${ROOTFSTAR}" "https://${S3_PATH}/"
touch /lava-files/done
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done https://${S3_PATH}/done
s3_upload /lava-files/done "https://${S3_PATH}/"

View File

@@ -1,144 +0,0 @@
From 2f4a38ecfde470abcd5d3c0ae7337bf780343469 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Tue, 15 Oct 2024 16:02:26 +0100
Subject: [PATCH] deps: Make more sources conditional
Fetching all the dependent sources - including at least one copy of LLVM
- can take a surprising amount of time. Mesa needs to build ANGLE as
part of CI, and the cost of downloading all the sources all of the time
is not OK for the number of dependencies we don't need during the build.
---
DEPS | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Submitted upstream at:
https://chromium-review.googlesource.com/c/angle/angle/+/5937820
diff --git a/DEPS b/DEPS
index 61263fb7af..0cff8c3126 100644
--- a/DEPS
+++ b/DEPS
@@ -17,6 +17,17 @@ gclient_gn_args = [
]
vars = {
+ 'angle_enable_cl': True,
+ 'angle_enable_cl_testing': False,
+ 'angle_enable_vulkan': True,
+ 'angle_enable_vulkan_validation_layers': True,
+ 'angle_enable_wgpu': True,
+ 'build_angle_deqp_tests': True,
+ 'build_angle_perftests': True,
+ 'build_with_swiftshader': True,
+ 'use_custom_libcxx': True,
+ 'export_libcxxapi_from_executables': True,
+
'android_git': 'https://android.googlesource.com',
'chromium_git': 'https://chromium.googlesource.com',
'chrome_internal_git': 'https://chrome-internal.googlesource.com',
@@ -673,7 +684,7 @@ deps = {
'third_party/catapult': {
'url': Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_with_catapult and not build_with_chromium',
},
# Cherry is a dEQP/VK-GL-CTS management GUI written in Go. We use it for viewing test results.
@@ -689,7 +700,7 @@ deps = {
'third_party/clspv/src': {
'url': Var('chromium_git') + '/external/github.com/google/clspv@a173c052455434a422bcfe5c12ffe44d574fd6e1',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_cl and angle_enable_vulkan and not build_with_chromium',
},
'third_party/cpu_features/src': {
@@ -700,7 +711,7 @@ deps = {
'third_party/dawn': {
'url': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'),
- 'condition': 'not build_with_chromium'
+ 'condition': 'angle_enable_wgpu and not build_with_chromium'
},
'third_party/depot_tools': {
@@ -745,6 +756,7 @@ deps = {
# glmark2 is a GPL3-licensed OpenGL ES 2.0 benchmark. We use it for testing.
'third_party/glmark2/src': {
'url': Var('chromium_git') + '/external/github.com/glmark2/glmark2@ca8de51fedb70bace5351c6b002eb952c747e889',
+ 'condition': 'build_angle_perftests',
},
'third_party/googletest': {
@@ -777,7 +789,7 @@ deps = {
# libjpeg_turbo is used by glmark2.
'third_party/libjpeg_turbo': {
'url': Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git@927aabfcd26897abb9776ecf2a6c38ea5bb52ab6',
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_angle_perftests and not build_with_chromium',
},
'third_party/libpng/src': {
@@ -787,7 +799,7 @@ deps = {
'third_party/llvm/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project@d222fa4521531cc4ac14b8e157d231c108c003be',
- 'condition': 'not build_with_chromium',
+ 'condition': '(build_with_swiftshader or (angle_enable_cl and angle_enable_vulkan)) and not build_with_chromium',
},
'third_party/jdk': {
@@ -824,12 +836,12 @@ deps = {
'third_party/libc++/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git@6a68fd412b9aecd515a20a7cf84d11b598bfaf96',
- 'condition': 'not build_with_chromium',
+ 'condition': 'use_custom_libcxx and not build_with_chromium',
},
'third_party/libc++abi/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git@9a1d90c3b412d5ebeb97a6e33d98e1d0dd923221',
- 'condition': 'not build_with_chromium',
+ 'condition': 'export_libcxxapi_from_executables and not build_with_chromium',
},
'third_party/libunwind/src': {
@@ -872,7 +884,7 @@ deps = {
'third_party/OpenCL-CTS/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenCL-CTS@e0a31a03fc8f816d59fd8b3051ac6a61d3fa50c6',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_cl_testing and not build_with_chromium',
},
'third_party/OpenCL-Docs/src': {
@@ -968,7 +980,7 @@ deps = {
'third_party/SwiftShader': {
'url': Var('swiftshader_git') + '/SwiftShader@7a9a492a38b7c701f7c96a15a76046aed8f8c0c3',
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_with_swiftshader and not build_with_chromium',
},
'third_party/turbine/cipd': {
@@ -984,6 +996,7 @@ deps = {
'third_party/VK-GL-CTS/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/VK-GL-CTS' + '@' + Var('vk_gl_cts_revision'),
+ 'condition': 'build_angle_deqp_tests',
},
'third_party/vulkan-deps': {
@@ -1038,7 +1051,7 @@ deps = {
'third_party/vulkan-validation-layers/src': {
'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@b63e9bd51fbd7bf8fea161a4f7c06994abc24b75',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_vulkan_validation_layers and not build_with_chromium',
},
'third_party/vulkan_memory_allocator': {
--
2.46.2

View File

@@ -1,182 +0,0 @@
From 6250d347d15502e3b45769edba57ae244e20fb92 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Fri, 26 Aug 2022 18:24:27 +0200
Subject: [PATCH 1/2] Allow running on Android from the command line
For testing the Android EGL platform without having to go via the
Android activity manager, build deqp-egl.
Tests that render to native windows are unsupported, as command line
programs cannot create windows on Android.
$ cmake -S . -B build/ -DDEQP_TARGET=android -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DANDROID_NDK_PATH=./android-ndk-r21d -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28 -DGLCTS_GTF_TARGET=gles32 -G Ninja
$ ninja -C build modules/egl/deqp-egl
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
CMakeLists.txt | 38 ++-----------------
.../android/tcuAndroidNativeActivity.cpp | 36 +++++++++---------
.../platform/android/tcuAndroidPlatform.cpp | 12 +++++-
3 files changed, 34 insertions(+), 52 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 309bdda18..7c833751f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -275,7 +275,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
-if (DE_OS_IS_ANDROID OR DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -319,7 +319,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -341,7 +341,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
add_library("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" STATIC ${SRCS})
target_link_libraries("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" ${LIBS})
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -393,37 +393,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
-if (DE_OS_IS_ANDROID)
- include_directories(executor)
- include_directories(${PROJECT_BINARY_DIR}/external/vulkancts/framework/vulkan)
-
- set(DEQP_SRCS
- framework/platform/android/tcuAndroidMain.cpp
- framework/platform/android/tcuAndroidJNI.cpp
- framework/platform/android/tcuAndroidPlatformCapabilityQueryJNI.cpp
- framework/platform/android/tcuTestLogParserJNI.cpp
- ${DEQP_MODULE_ENTRY_POINTS}
- )
-
- set(DEQP_LIBS
- tcutil-platform
- xecore
- ${DEQP_MODULE_LIBRARIES}
- )
-
- add_library(deqp SHARED ${DEQP_SRCS})
- target_link_libraries(deqp ${DEQP_LIBS})
-
- # Separate out the debug information because it's enormous
- add_custom_command(TARGET deqp POST_BUILD
- COMMAND ${CMAKE_STRIP} --only-keep-debug -o $<TARGET_FILE:deqp>.debug $<TARGET_FILE:deqp>
- COMMAND ${CMAKE_STRIP} -g $<TARGET_FILE:deqp>)
-
- # Needed by OpenGL CTS that defines its own activity but depends on
- # common Android support code.
- target_include_directories(deqp PRIVATE framework/platform/android)
-
-elseif (DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# Code sign identity
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
index 82a9ab699..4eab14a39 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -115,23 +115,25 @@ namespace Android
NativeActivity::NativeActivity(ANativeActivity *activity) : m_activity(activity)
{
- activity->instance = (void *)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void *)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
}
NativeActivity::~NativeActivity(void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index 0472fa615..ff8929409 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
*//*--------------------------------------------------------------------*/
#include "tcuAndroidPlatform.hpp"
+#include "tcuAndroidNativeActivity.hpp"
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -198,7 +199,7 @@ eglu::NativeWindow *NativeWindowFactory::createWindow(const eglu::WindowParams &
Window *window = m_windowRegistry.tryAcquireWindow();
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -319,6 +320,9 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
+
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -416,3 +420,9 @@ bool Platform::hasDisplay(vk::wsi::Type wsiType) const
} // namespace Android
} // namespace tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.45.2

View File

@@ -1,26 +0,0 @@
From a602822c53e22e985f942f843ccadbfb64613212 Mon Sep 17 00:00:00 2001
From: Helen Koike <helen.koike@collabora.com>
Date: Tue, 27 Sep 2022 12:35:22 -0300
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
framework/qphelper/qpDebugOut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
index 6579e9f48..c200c6f6b 100644
--- a/framework/qphelper/qpDebugOut.c
+++ b/framework/qphelper/qpDebugOut.c
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
}
/* print() implementation. */
-#if (DE_OS == DE_OS_ANDROID)
+#if (0)
#include <android/log.h>
--
2.42.0

View File

@@ -1,4 +1,4 @@
From 4f53bcbb597a91bab715bc8d555cfd6c81263ac1 Mon Sep 17 00:00:00 2001
From bcb1110cc00398dfb501aac83eddbd66d8fae425 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Wed, 29 Jan 2025 12:50:33 +0000
Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
@@ -7,10 +7,11 @@ Change-Id: Ie412f914bb6264ffbd502deea57d80cc11a9948e
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
framework/platform/CMakeLists.txt | 9 --
.../platform/android/tcuAndroidPlatform.cpp | 118 ------------------
.../platform/android/tcuAndroidPlatform.cpp | 126 +-----------------
.../platform/android/tcuAndroidPlatform.hpp | 14 +-
framework/platform/lnx/tcuLnxPlatform.cpp | 9 +-
.../surfaceless/tcuSurfacelessPlatform.cpp | 54 --------
4 files changed, 1 insertion(+), 189 deletions(-)
5 files changed, 3 insertions(+), 209 deletions(-)
diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
index ec1deb5c2..49fe412a7 100644
@@ -54,7 +55,7 @@ index ec1deb5c2..49fe412a7 100644
# Always link to glutil as some platforms such as Win32 always support GL
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index 0472fa615..87033ad56 100644
index 0472fa615..40f523ee2 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -31,7 +31,6 @@
@@ -168,7 +169,17 @@ index 0472fa615..87033ad56 100644
static size_t getTotalSystemMemory(ANativeActivity *activity)
{
const size_t MiB = (size_t)(1 << 20);
@@ -355,11 +258,6 @@ bool Platform::processEvents(void)
@@ -338,8 +241,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
// Platform
Platform::Platform(NativeActivity &activity)
- : m_activity(activity)
- , m_totalSystemMemory(getTotalSystemMemory(activity.getNativeActivity()))
+ : m_totalSystemMemory(getTotalSystemMemory(activity.getNativeActivity()))
{
m_nativeDisplayFactoryRegistry.registerFactory(new NativeDisplayFactory(m_windowRegistry));
m_contextFactoryRegistry.registerFactory(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
@@ -355,16 +257,6 @@ bool Platform::processEvents(void)
return true;
}
@@ -177,10 +188,15 @@ index 0472fa615..87033ad56 100644
- return new VulkanLibrary(libraryPath);
-}
-
void Platform::describePlatform(std::ostream &dst) const
-void Platform::describePlatform(std::ostream &dst) const
-{
- tcu::Android::describePlatform(m_activity.getNativeActivity(), dst);
-}
-
void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
{
tcu::Android::describePlatform(m_activity.getNativeActivity(), dst);
@@ -398,21 +296,5 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
// Worst-case estimates
@@ -398,21 +290,5 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
limits.devicePageTableHierarchyLevels = 3;
}
@@ -202,6 +218,53 @@ index 0472fa615..87033ad56 100644
-
} // namespace Android
} // namespace tcu
diff --git a/framework/platform/android/tcuAndroidPlatform.hpp b/framework/platform/android/tcuAndroidPlatform.hpp
index 32cc9068c..3c3f02d98 100644
--- a/framework/platform/android/tcuAndroidPlatform.hpp
+++ b/framework/platform/android/tcuAndroidPlatform.hpp
@@ -27,7 +27,6 @@
#include "tcuPlatform.hpp"
#include "egluPlatform.hpp"
#include "gluPlatform.hpp"
-#include "vkPlatform.hpp"
#include "tcuAndroidWindow.hpp"
#include "tcuAndroidNativeActivity.hpp"
@@ -36,7 +35,7 @@ namespace tcu
namespace Android
{
-class Platform : public tcu::Platform, private eglu::Platform, private glu::Platform, private vk::Platform
+class Platform : public tcu::Platform, private eglu::Platform, private glu::Platform
{
public:
Platform(NativeActivity &activity);
@@ -52,10 +51,6 @@ public:
{
return static_cast<const eglu::Platform &>(*this);
}
- virtual const vk::Platform &getVulkanPlatform(void) const
- {
- return static_cast<const vk::Platform &>(*this);
- }
virtual void getMemoryLimits(tcu::PlatformMemoryLimits &limits) const;
WindowRegistry &getWindowRegistry(void)
@@ -63,14 +58,7 @@ public:
return m_windowRegistry;
}
- // Vulkan Platform API
- vk::Library *createLibrary(const char *libraryPath) const;
- void describePlatform(std::ostream &dst) const;
- vk::wsi::Display *createWsiDisplay(vk::wsi::Type wsiType) const;
- bool hasDisplay(vk::wsi::Type wsiType) const;
-
private:
- NativeActivity &m_activity;
WindowRegistry m_windowRegistry;
const size_t m_totalSystemMemory;
};
diff --git a/framework/platform/lnx/tcuLnxPlatform.cpp b/framework/platform/lnx/tcuLnxPlatform.cpp
index 8c0a3ef06..6b1a4985a 100644
--- a/framework/platform/lnx/tcuLnxPlatform.cpp
@@ -324,5 +387,5 @@ index 1cea9dd97..3d5bd8b62 100644
class ContextFactory : public glu::ContextFactory
--
2.48.1
2.47.2

View File

@@ -2,6 +2,9 @@
# Strip the image to a small minimal system.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex

View File

@@ -76,7 +76,7 @@ set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
# Securely pass the current variables to the crosvm environment
echo "Variables passed through:"
SCRIPTS_DIR=$(readlink -en "${0%/*}")
${SCRIPTS_DIR}/common/generate-env.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
${SCRIPTS_DIR}/common/export-gitlab-job-env-for-dut.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
cp ${SCRIPTS_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
# Set the crosvm-script as the arguments of the current script
@@ -124,7 +124,7 @@ crosvm --no-syslog run \
--net "host-ip=192.168.30.1,netmask=255.255.255.0,mac=AA:BB:CC:00:00:12" \
-s $VM_SOCKET \
--cid ${VSOCK_CID} -p "${CROSVM_KERN_ARGS}" \
/lava-files/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1
/kernel/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1
CROSVM_RET=$?

View File

@@ -7,10 +7,14 @@
section_start cuttlefish_setup "cuttlefish: setup"
set -xe
export HOME=/cuttlefish
# Structured tagging check for angle
if [ -n "$ANGLE_TAG" ]; then
# Bail out if the ANGLE_TAG differs from what is offered in the system
ci_tag_test_time_check "ANGLE_TAG"
fi
export PATH=/cuttlefish/bin:$PATH
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:$LD_LIBRARY_PATH
export EGL_PLATFORM=surfaceless
# Pick up a vulkan driver
ARCH=$(uname -m)
@@ -25,16 +29,15 @@ pushd /cuttlefish
# Add a function to perform some tasks when exiting the script
function my_atexit()
{
# shellcheck disable=SC2317
HOME=/cuttlefish stop_cvd -wait_for_launcher=40
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR || true
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR || true
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR || true
# shellcheck disable=SC2317
/cuttlefish/bin/stop_cvd -wait_for_launcher=10
}
# stop cuttlefish if the script ends prematurely or is interrupted
@@ -43,193 +46,33 @@ trap 'exit 2' HUP INT PIPE TERM
ulimit -S -n 32768
# Clean up state of previous run
rm -rf /cuttlefish/cuttlefish
rm -rf /cuttlefish/.cache
rm -rf /cuttlefish/.cuttlefish_config.json
VSOCK_BASE=10000 # greater than all the default vsock ports
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
launch_cvd \
HOME=/cuttlefish launch_cvd \
-daemon \
-verbosity=VERBOSE \
-file_verbosity=VERBOSE \
-use_overlay=false \
-vsock_guest_cid=$VSOCK_CID \
-enable_audio=false \
-enable_bootanimation=false \
-enable_minimal_mode=true \
-enable_modem_simulator=false \
-guest_enforce_security=false \
-report_anonymous_usage_stats=no \
-gpu_mode="$ANDROID_GPU_MODE" \
-cpus=${FDO_CI_CONCURRENT:-4} \
-memory_mb 8192 \
-kernel_path="$HOME/bzImage" \
-initramfs_path="$HOME/initramfs.img"
-kernel_path="/cuttlefish/bzImage" \
-initramfs_path="/cuttlefish/initramfs.img"
sleep 1
popd
# shellcheck disable=SC2034 # used externally
ADB=adb
$ADB wait-for-device root
sleep 1
$ADB shell echo Hi from Android
# shellcheck disable=SC2035
$ADB logcat dEQP:D *:S &
# overlay vendor
OV_TMPFS="/data/overlay-remount"
$ADB shell mkdir -p "$OV_TMPFS"
$ADB shell mount -t tmpfs none "$OV_TMPFS"
$ADB shell mkdir -p "$OV_TMPFS/vendor-upper"
$ADB shell mkdir -p "$OV_TMPFS/vendor-work"
opts="lowerdir=/vendor,upperdir=$OV_TMPFS/vendor-upper,workdir=$OV_TMPFS/vendor-work"
$ADB shell mount -t overlay -o "$opts" none /vendor
$ADB shell setenforce 0
# deqp
$ADB shell mkdir -p /data/deqp
$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
$ADB push /deqp-gles/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt /data/deqp
$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
$ADB push /deqp-tools/* /data/deqp
$ADB push /deqp-runner/deqp-runner /data/deqp
# download Android Mesa from S3
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
mkdir /mesa-android
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" &
INSTALL="/mesa-android/install"
$ADB push "$INSTALL/all-skips.txt" /data/deqp
$ADB push "$INSTALL/angle-skips.txt" /data/deqp
if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-fails.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-skips.txt" /data/deqp
fi
$ADB push "$INSTALL/deqp-$DEQP_SUITE.toml" /data/deqp
# remove 32 bits libs from /vendor/lib
$ADB shell rm -f /vendor/lib/libglapi.so
$ADB shell rm -f /vendor/lib/egl/libGLES_mesa.so
$ADB shell rm -f /vendor/lib/egl/libEGL_angle.so
$ADB shell rm -f /vendor/lib/egl/libEGL_emulation.so
$ADB shell rm -f /vendor/lib/egl/libGLESv1_CM_angle.so
$ADB shell rm -f /vendor/lib/egl/libGLESv1_CM_emulation.so
$ADB shell rm -f /vendor/lib/egl/libGLESv2_angle.so
$ADB shell rm -f /vendor/lib/egl/libGLESv2_emulation.so
$ADB shell rm -f /vendor/lib/hw/vulkan.*
# replace on /vendor/lib64
$ADB push "$INSTALL/lib/libgallium_dri.so" /vendor/lib64/libgallium_dri.so
$ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
$ADB push "$INSTALL/lib/libvulkan_lvp.so" /vendor/lib64/hw/vulkan.lvp.so
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
$ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so
# Check what GLES implementation Surfaceflinger is using before copying the new mesa libraries
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
$ADB shell dumpsys SurfaceFlinger | grep GLES
# restart Android shell, so that surfaceflinger uses the new libraries
$ADB shell stop
$ADB shell start
# Check what GLES implementation Surfaceflinger is using after copying the new mesa libraries
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
MESA_RUNTIME_VERSION="$($ADB shell dumpsys SurfaceFlinger | grep GLES:)"
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
if ! printf "%s" "$MESA_RUNTIME_VERSION" | grep "${MESA_BUILD_VERSION}$"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D libs: ${MESA_RUNTIME_VERSION}" 1>&2
exit 1
fi
BASELINE=""
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
BASELINE="--baseline /data/deqp/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
fi
if [ -n "$USE_ANGLE" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
fi
AOSP_RESULTS=/data/deqp/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
set +e
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
XDG_CACHE_HOME=/data/local/tmp \
./deqp-runner \
suite \
--suite /data/deqp/deqp-$DEQP_SUITE.toml \
--output $AOSP_RESULTS \
--skips /data/deqp/all-skips.txt $DEQP_SKIPS \
--flakes /data/deqp/$GPU_VERSION-flakes.txt \
--testlog-to-xml /data/deqp/testlog-to-xml \
--shader-cache-dir /data/local/tmp \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$BASELINE \
${DEQP_RUNNER_MAX_FAILS:+--max-fails \"$DEQP_RUNNER_MAX_FAILS\"} \
"
EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
$ADB pull "$AOSP_RESULTS/." "$RESULTS_DIR"
# Remove all but the first 50 individual XML files uploaded as artifacts, to
# save fd.o space when you break everything.
find $RESULTS_DIR -name \*.xml | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
$ADB shell "cd ${AOSP_RESULTS}/..; \
./deqp-runner junit \
--testsuite dEQP \
--results $AOSP_RESULTS/failures.csv \
--output $AOSP_RESULTS/junit.xml \
--limit 50 \
--template \"See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml\""
$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
section_end cuttlefish_results
exit $EXIT_CODE
# The script exits with the appropriate exit code
. "$(dirname "$0")/android-runner.sh"

View File

@@ -25,7 +25,9 @@ ARCH=$(uname -m)
export VK_DRIVER_FILES="$PWD"/install/share/vulkan/icd.d/"$VK_DRIVER"_icd."$ARCH".json
export OCL_ICD_VENDORS="$PWD"/install/etc/OpenCL/vendors/
if [ -n "$USE_ANGLE" ]; then
if [ -n "$ANGLE_TAG" ]; then
# Are we using the right angle version?
ci_tag_test_time_check "ANGLE_TAG"
export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
fi
@@ -67,15 +69,7 @@ if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-slow-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" != "gbm" ] ; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/x11-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" = "gbm" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/gbm-skips.txt"
fi
if [ -n "$USE_ANGLE" ]; then
if [ -n "$ANGLE_TAG" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/angle-skips.txt"
fi

View File

@@ -28,6 +28,22 @@
# that are used by a driver. See the various `.$DRIVER-rules` in the
# corresponding `src/**/ci/gitlab-ci.yml`.
# In case of issues with a farm, here are the people to contact:
# farm name | ci infrastructure used | admin(s)
# -----------------|----------------------------------|---------
# anholt | baremetal/poe-powered | @anholt
# austriancoder | ci-tron | @austriancoder
# collabora | lava | @daniels, @sergi
# google-freedreno | baremetal/{fastboot,cros-servo} | @robclark
# igalia | baremetal/poe-powered | @jasuarez, @chema
# lima | lava | @enunes
# microsoft | custom | @jenatali, @alatiera
# ondracka | ci-tron | @ondracka
# pengutronix | lava | @hnez, @lynxeye
# valve-kws | ci-tron | @mupuf, @eric
# valve-mupuf | ci-tron | @mupuf, @eric
# vmware | lava | @blu
.microsoft-farm-rules:
rules:
- exists: [ .ci-farms-disabled/microsoft ] # 1. Is disabled, never run
@@ -278,6 +294,27 @@
- !reference [.ondracka-farm-rules, rules]
.pengutronix-farm-rules:
rules:
- exists: [ .ci-farms-disabled/pengutronix ]
when: never
- if: '$CI_PIPELINE_SOURCE != "schedule"'
changes: [ .ci-farms-disabled/pengutronix ]
when: on_success
- if: '$CI_PIPELINE_SOURCE != "schedule"'
changes: [ .ci-farms-disabled/* ]
when: never
.pengutronix-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/pengutronix ]
when: never
- if: '$CI_PIPELINE_SOURCE != "schedule"'
changes: [ .ci-farms-disabled/pengutronix ]
when: never
- !reference [.pengutronix-farm-rules, rules]
# Skip container & build jobs when disabling any farm, and run them if any
# farm gets re-enabled.
# Only apply these rules in MR context, because otherwise we get a false
@@ -334,6 +371,10 @@
changes: [ .ci-farms-disabled/vmware ]
exists: [ .ci-farms-disabled/vmware ]
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/pengutronix ]
exists: [ .ci-farms-disabled/pengutronix ]
when: never
# Any other change to ci-farms/* means some farm is getting re-enabled.
# Run jobs in Marge pipelines (and let it fallback to manual otherwise)
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"'

View File

@@ -0,0 +1,10 @@
{
"src": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/",
"git_hash": "36d0c64694dcee6cf49654f430ab70c22dd647d8",
"files": [
"adlp_dmc.bin",
"adlp_guc_70.bin",
"tgl_guc_70.bin"
],
"dst": "/lib/firmware/i915/"
}

View File

@@ -16,7 +16,7 @@ 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 -X HEAD -L --retry 4 -f --retry-delay 60 "https://${FLUSTER_VECTORS_HOST_PATH}/done"; 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
@@ -24,9 +24,7 @@ if [ "$CI_PROJECT_PATH" != "$FDO_UPSTREAM_REPO" ]; then
fi
fi
FLUSTER_VECTORS_HOST_PATH="${FDO_HTTP_CACHE_URI:-}https://${FLUSTER_VECTORS_HOST_PATH}/vectors.tar.zst"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FLUSTER_VECTORS_HOST_PATH} | tar --zstd -x -C /usr/local/
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"

View File

@@ -1,7 +0,0 @@
# gbm does not support reading the front buffer after a swapbuffers, and that's
# intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
#
# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
# but don't swap.
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
spec@!opengl 1.1@read-front

View File

@@ -11,45 +11,37 @@
# cannot parse input: "$image:$tag": invalid reference format
# check the length of $tag; if it's > 128 chars you need to shorten your tag.
include:
# Include the conditional build image tags used for structured tagging runtime checks that happens
# during both build and test jobs
# It can be auto-generated by bin/ci/update_tag.py script, so to keep the script's serde simple,
# let's keep the component tags in a separate file
- .gitlab-ci/conditional-build-image-tags.yml
variables:
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "20250130-vvless"
DEBIAN_BASE_TAG: "20250408-virgl"
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "20250128-llvm19-up"
DEBIAN_BUILD_TAG: "20250324-android"
DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
DEBIAN_ARM64_TEST_BASE_IMAGE: "debian/arm64_test-base"
DEBIAN_TEST_ANDROID_TAG: "20250415-anglit"
DEBIAN_TEST_GL_TAG: "20250415-anglit"
DEBIAN_TEST_VK_TAG: "20250416-vkvideo"
KERNEL_ROOTFS_TAG: "20250415-anglit"
DEBIAN_X86_64_TEST_IMAGE_GL_PATH: "debian/x86_64_test-gl"
DEBIAN_ARM64_TEST_IMAGE_GL_PATH: "debian/arm64_test-gl"
DEBIAN_X86_64_TEST_IMAGE_VK_PATH: "debian/x86_64_test-vk"
DEBIAN_ARM64_TEST_IMAGE_VK_PATH: "debian/arm64_test-vk"
DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH: "debian/x86_64_test-android"
DEBIAN_PYUTILS_TAG: "20250321-s3cp-fix5"
DEBIAN_TEST_ANDROID_TAG: "20250130-vvless"
DEBIAN_TEST_GL_TAG: "20250130-vvless"
DEBIAN_TEST_VK_TAG: "20250130-vvless"
KERNEL_ROOTFS_TAG: "20250130-vvless"
ALPINE_X86_64_BUILD_TAG: "20250324-sphinx"
ALPINE_X86_64_LAVA_SSH_TAG: "20250321-s3cp-fix5"
FEDORA_X86_64_BUILD_TAG: "20250321-s3cp-fix5"
DEBIAN_PYUTILS_IMAGE: "debian/x86_64_pyutils"
DEBIAN_PYUTILS_TAG: "20250129-lavacli"
KERNEL_TAG: "v6.14-mesa-0bdd"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "95bf62c"
ALPINE_X86_64_BUILD_TAG: "20250128-llversionm"
ALPINE_X86_64_LAVA_SSH_TAG: "20250124-spirv-tools"
FEDORA_X86_64_BUILD_TAG: "20250128-llversionm"
FLUSTER_VECTORS_VERSION: "5"
KERNEL_TAG: "v6.13-rc4-mesa-5e77"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "95bf62c"
WINDOWS_X64_MSVC_TAG: "20250129-llvm19"
FLUSTER_VECTORS_VERSION: "5"
WINDOWS_X64_BUILD_TAG: "20250129-llvm19"
WINDOWS_X64_MSVC_PATH: "windows/x86_64_msvc"
WINDOWS_X64_MSVC_TAG: "20240827-v143"
WINDOWS_X64_BUILD_PATH: "windows/x86_64_build"
WINDOWS_X64_BUILD_TAG: "20241107-setup"
WINDOWS_X64_TEST_PATH: "windows/x86_64_test"
WINDOWS_X64_TEST_TAG: "20241107-setup"
WINDOWS_X64_TEST_TAG: "20250129-llvm19"

34
.gitlab-ci/lava/lava-gitlab-ci.yml Executable file → Normal file
View File

@@ -5,6 +5,19 @@ variables:
.lava-test:
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
# The jobs themselves shouldn't actually run for an hour, of course.
# Jobs are picked up greedily by a GitLab CI runner which is deliberately
# overprovisioned compared to the number of available devices. They are
# submitted to the LAVA co-ordinator with a job priority which gives
# pre-merge priority over everyone else. User-submitted and nightly jobs
# can thus spend ages just waiting around in a queue to be run at some
# point as they get pre-empted by other things.
# Non-queue time has strict timeouts for each stage, e.g. for downloading
# the artifacts, booting the device, device setup, running the tests, etc,
# which is handled by LAVA itself.
# So the only reason we should see anyone bouncing off this timeout is due
# to a lack of available devices to run the jobs.
timeout: 1h
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
FDO_CI_CONCURRENT: 6 # should be replaced by per-machine definitions
@@ -41,7 +54,7 @@ variables:
tags:
- $RUNNER_TAG
after_script:
- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s "https://${JOB_RESULTS_PATH}" | tar --warning=no-timestamp --zstd -x
- curl -L --retry 4 -f --retry-connrefused --retry-delay 30 -s "https://${JOB_RESULTS_PATH}" | tar --warning=no-timestamp --zstd -x
needs:
- !reference [.required-for-hardware-jobs, needs]
- job: alpine/x86_64_lava_ssh_client
@@ -126,38 +139,31 @@ variables:
extends:
- .lava-test:x86_64
.lava-traces-base:
.lava-piglit-traces:
variables:
HWCI_TEST_SCRIPT: "/install/piglit/piglit-traces.sh"
# until we overcome Infrastructure issues, give traces extra 5 min before timeout
DEVICE_HANGING_TIMEOUT_SEC: 600
PIGLIT_REPLAY_DEVICE_NAME: "gl-${GPU_VERSION}"
PIGLIT_RESULTS: "${GPU_VERSION}-replay"
artifacts:
reports:
junit: results/junit.xml
.lava-piglit:
variables:
PIGLIT_REPLAY_DEVICE_NAME: "gl-${GPU_VERSION}"
PIGLIT_RESULTS: "${GPU_VERSION}-${PIGLIT_PROFILES}"
HWCI_TEST_SCRIPT: "/install/piglit/piglit-runner.sh"
.lava-piglit-traces:x86_64:
extends:
- .lava-test:x86_64
- .lava-piglit
- .lava-traces-base
- .lava-piglit-traces
.lava-piglit-traces:arm32:
extends:
- .lava-test:arm32
- .lava-piglit
- .lava-traces-base
- .lava-piglit-traces
.lava-piglit-traces:arm64:
extends:
- .lava-test:arm64
- .lava-piglit
- .lava-traces-base
- .lava-piglit-traces
.lava-fluster:
variables:

View File

@@ -47,12 +47,12 @@ ROOTFS_URL="$(get_path_to_artifact lava-rootfs.tar.zst)"
rm -rf results
mkdir -p results/job-rootfs-overlay/
artifacts/ci-common/generate-env.sh > results/job-rootfs-overlay/set-job-env-vars.sh
artifacts/ci-common/export-gitlab-job-env-for-dut.sh > results/job-rootfs-overlay/set-job-env-vars.sh
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:"
@@ -62,6 +62,9 @@ section_switch lava_submit "Submitting job for scheduling"
touch results/lava.log
tail -f results/lava.log &
# Ensure that we are printing the commands that are being executed,
# making it easier to debug the job in case it fails.
set -x
PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
--farm "${FARM}" \
--device-type "${DEVICE_TYPE}" \
@@ -97,5 +100,11 @@ PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
--compression=gz \
--path="/" \
--format=tar \
- append-overlay \
--name=extra-modules \
--url="${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" \
--compression=zstd \
--path="/" \
--format=tar \
- submit \
>> results/lava.log

View File

@@ -225,12 +225,12 @@ 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_boot",
header="Booting hardware device",
type=LogSectionType.LAVA_BOOT,
id="dut_deploy",
header=f"Running LAVA deploy action - Timeout: {deploy_timeout}",
type=LogSectionType.LAVA_DEPLOY,
start_collapsed=True,
suppress_end=True, # init-stage2 prints the end for us
timestamp_relative_to=timestamp_relative_to,
)
print(start_section.start())

View File

@@ -1,7 +1,10 @@
from os import getenv
# How many attempts should be made when a timeout happen during LAVA device boot.
NUMBER_OF_ATTEMPTS_LAVA_BOOT = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_BOOT", 3))
NUMBER_OF_ATTEMPTS_LAVA_BOOT = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_BOOT", 2))
# The deploy involves downloading and decompressing the kernel, modules, dtb and the overlays.
# We should retry, to overcome network issues.
NUMBER_OF_ATTEMPTS_LAVA_DEPLOY = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_DEPLOY", 2))
# Supports any integers in [0, 100].

View File

@@ -83,11 +83,13 @@ class GitlabSection:
)
def __enter__(self):
print(self.start())
if start_log_line := self.start():
print(start_log_line)
return self
def __exit__(self, exc_type, exc_val, exc_tb):
print(self.end())
if end_log_line := self.end():
print(end_log_line)
def start(self) -> str:
assert not self.has_finished, "Starting an already finished section"

View File

@@ -1,35 +1,16 @@
import logging
import os
import re
from enum import Enum
class LavaFarm(Enum):
"""Enum class representing the different LAVA farms."""
LIMA = 1
COLLABORA = 2
UNKNOWN = 3
LAVA_FARM_RUNNER_PATTERNS: dict[LavaFarm, str] = {
# Lima pattern comes first, since it has the same prefix as the
# Collabora pattern.
LavaFarm.LIMA: r"^mesa-ci-[\x01-\x7F]+-lava-lima$",
LavaFarm.COLLABORA: r"^mesa-ci-[\x01-\x7F]+-lava-[\x01-\x7F]+$",
LavaFarm.UNKNOWN: r"^[\x01-\x7F]+",
}
def get_lava_farm() -> LavaFarm:
def get_lava_farm() -> str:
"""
Returns the LAVA farm based on the RUNNER_TAG environment variable.
Returns the LAVA farm based on the FARM environment variable.
:return: The LAVA farm
"""
runner_tag: str = os.getenv("RUNNER_TAG", "unknown")
farm: str = os.getenv("FARM", "unknown")
for farm, pattern in LAVA_FARM_RUNNER_PATTERNS.items():
if re.match(pattern, runner_tag):
return farm
if farm == "unknown":
logging.warning("FARM environment variable is not set, using unknown")
raise ValueError(f"Unknown LAVA runner tag: {runner_tag}")
return farm.lower()

View File

@@ -182,7 +182,8 @@ class LAVAJob:
return lava_lines[:last_line]
def handle_exception(self, exception: Exception):
print_log(exception)
# Print the exception type and message
print_log(f"{type(exception).__name__}: {str(exception)}")
self.cancel()
self.exception = exception

View File

@@ -3,7 +3,10 @@ from typing import TYPE_CHECKING, Any
from ruamel.yaml import YAML
from lava.utils.lava_farm import LavaFarm, get_lava_farm
from os import getenv
from lava.utils.lava_farm import get_lava_farm
from lava.utils.log_section import LAVA_DEPLOY_TIMEOUT
from lava.utils.ssh_job_definition import (
generate_docker_test,
generate_dut_test,
@@ -23,7 +26,12 @@ from lava.utils.uart_job_definition import (
if TYPE_CHECKING:
from lava.lava_job_submitter import LAVAJobSubmitter
from .constants import FORCE_UART, JOB_PRIORITY, NUMBER_OF_ATTEMPTS_LAVA_BOOT
from .constants import (
FORCE_UART,
JOB_PRIORITY,
NUMBER_OF_ATTEMPTS_LAVA_BOOT,
NUMBER_OF_ATTEMPTS_LAVA_DEPLOY,
)
class LAVAJobDefinition:
@@ -38,6 +46,9 @@ class LAVAJobDefinition:
self.lava_nfs_args: str = "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard,v3 ip=dhcp"
# extra_nfsroot_args appends to cmdline
self.extra_nfsroot_args: str = " init=/init rootwait usbcore.quirks=0bda:8153:k"
# Append LAVA_CMDLINE to extra_nfsroot_args
if lava_cmdline := getenv('LAVA_CMDLINE'):
self.extra_nfsroot_args += f" {lava_cmdline}"
def has_ssh_support(self) -> bool:
if FORCE_UART:
@@ -47,7 +58,7 @@ class LAVAJobDefinition:
# which is required to follow the job in a SSH section
current_farm = get_lava_farm()
return current_farm == LavaFarm.COLLABORA
return current_farm == "collabora"
def generate_lava_yaml_payload(self) -> dict[str, Any]:
"""
@@ -149,18 +160,26 @@ class LAVAJobDefinition:
"job": {"minutes": self.job_submitter.job_timeout_min},
"actions": {
"depthcharge-retry": {
# Could take between 1 and 1.5 min in slower boots
"minutes": 4
},
"depthcharge-start": {
# Should take less than 1 min.
"minutes": 1,
# Setting higher values here, to affect the subactions, namely
# `bootloader-commands` and `login-action`
# So this value can be higher than `depthcharge-action` timeout.
"minutes": 3 * NUMBER_OF_ATTEMPTS_LAVA_DEPLOY
},
"depthcharge-action": {
# This timeout englobes the entire depthcharge timing,
# including retries
"minutes": 5
* NUMBER_OF_ATTEMPTS_LAVA_BOOT,
"minutes": LAVA_DEPLOY_TIMEOUT
},
"uboot-action": {
# For rockchip DUTs, U-Boot auto-login action downloads the kernel and
# setup early network. This takes 72 seconds on average.
# The LAVA action that wraps it is `uboot-commands`, but we can't set a
# timeout for it directly, it is overridden by one third of `uboot-action`
# timeout.
# So actually, this timeout is here to enforce that `uboot-action`
# timeout to be 100 seconds (uboot-action timeout /
# NUMBER_OF_ATTEMPTS_LAVA_BOOT), which is more than enough.
"seconds": 100 * NUMBER_OF_ATTEMPTS_LAVA_BOOT
},
},
},

View File

@@ -20,7 +20,7 @@ from typing import Optional, Union
from lava.exceptions import MesaCITimeoutError
from lava.utils.console_format import CONSOLE_LOG
from lava.utils.gitlab_section import GitlabSection
from lava.utils.lava_farm import LavaFarm, get_lava_farm
from lava.utils.lava_farm import get_lava_farm
from lava.utils.lava_log_hints import LAVALogHints
from lava.utils.log_section import (
DEFAULT_GITLAB_SECTION_TIMEOUTS,
@@ -43,7 +43,7 @@ class LogFollower:
fallback_timeout: timedelta = FALLBACK_GITLAB_SECTION_TIMEOUT
_buffer: list[str] = field(default_factory=list, init=False)
log_hints: LAVALogHints = field(init=False)
lava_farm: LavaFarm = field(init=False, default=get_lava_farm())
lava_farm: str = field(init=False, default=get_lava_farm())
_merge_next_line: str = field(default_factory=str, init=False)
def __post_init__(self):
@@ -261,7 +261,9 @@ class LogFollower:
elif line["lvl"] == "input":
prefix = "$ "
suffix = ""
elif line["lvl"] == "target" and self.lava_farm != LavaFarm.COLLABORA:
elif line["lvl"] == "target" and self.lava_farm != "collabora":
if self.lava_farm == "lima":
fix_lava_color_log(line)
# gl_section_fix_gen will output the stored line if it can't find a
# match for the first split line
# So we can recover it and put it back to the buffer
@@ -270,6 +272,31 @@ class LogFollower:
return f'{prefix}{line["msg"]}{suffix}'
def fix_lava_color_log(line):
"""This function is a temporary solution for the color escape codes mangling problem. There is
some problem in message passing between the LAVA dispatcher and the device under test (DUT).
Here \x1b or \\e character is missing before `[:digit::digit:?m` ANSI TTY color codes.
When this problem is fixed on the LAVA side, one should remove this function.
For example, instead of receiving "\x1b[31m" (red text), we receive "[31m".
The function fixes three types of mangled ANSI sequences:
1. Standard color codes like [31m → \x1b[31m
2. Line erase codes [0K → \x1b[0K
3. Specific color formatting codes with carriage return [0;3xm → \r\x1b[0;3xm
Note: most LAVA farms don't have this problem, except for Lima, which uses
an older version of LAVA.
"""
# Fix standard ANSI color codes (e.g., [31m → \x1b[31m)
line["msg"] = re.sub(r"(\[\d{1,2}m)", "\x1b" + r"\1", line["msg"])
# Fix ANSI line erase codes (e.g., [0K → \x1b[0K)
line["msg"] = re.sub(r"(\[0K)", "\x1b" + r"\1", line["msg"])
# Fix ANSI color codes with formatting and carriage return (e.g., [0;31m → \r\x1b[0;31m)
line["msg"] = re.sub(r"(\[0;3\d{1,2}m)", "\r\x1b" + r"\1", line["msg"])
def fix_lava_gitlab_section_log():
"""This function is a temporary solution for the Gitlab section markers
splitting problem. Gitlab parses the following lines to define a collapsible
@@ -305,8 +332,12 @@ def fix_lava_gitlab_section_log():
yield first_line
def print_log(msg: str, *args) -> None:
is_section_header = msg.startswith("\x1b[0Ksection_")
if is_section_header:
print(msg, *args)
return
# Reset color from timestamp, since `msg` can tint the terminal color
ts = datetime.now(tz=UTC)
ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}"

View File

@@ -12,6 +12,7 @@ class LogSectionType(Enum):
UNKNOWN = auto()
LAVA_SUBMIT = auto()
LAVA_QUEUE = auto()
LAVA_DEPLOY = auto()
LAVA_BOOT = auto()
TEST_DUT_SUITE = auto()
TEST_SUITE = auto()
@@ -27,13 +28,17 @@ LAVA_SUBMIT_TIMEOUT = int(getenv("LAVA_SUBMIT_TIMEOUT", 5))
# aggressively for pre-merge.
LAVA_QUEUE_TIMEOUT = int(getenv("LAVA_QUEUE_TIMEOUT", 60))
# Empirically, successful device boot in LAVA time takes less than 3
# minutes.
# LAVA itself is configured to attempt thrice to boot the device,
# summing up to 9 minutes.
# How long should we wait for a device to be deployed?
# The deploy involves downloading and decompressing the kernel, modules, dtb and the overlays.
# We should retry, to overcome network issues.
LAVA_DEPLOY_TIMEOUT = int(getenv("LAVA_DEPLOY_TIMEOUT", 5))
# Empirically, successful device deploy+boot in LAVA time takes less than 3 minutes.
# LAVA itself is configured to attempt `failure_retry` times (NUMBER_OF_ATTEMPTS_LAVA_BOOT) to boot
# the device.
# It is better to retry the boot than cancel the job and re-submit to avoid
# the enqueue delay.
LAVA_BOOT_TIMEOUT = int(getenv("LAVA_BOOT_TIMEOUT", 9))
LAVA_BOOT_TIMEOUT = int(getenv("LAVA_BOOT_TIMEOUT", 5))
# Estimated overhead in minutes for a job from GitLab to reach the test phase,
# including LAVA scheduling and boot duration
@@ -59,6 +64,7 @@ FALLBACK_GITLAB_SECTION_TIMEOUT = timedelta(minutes=10)
DEFAULT_GITLAB_SECTION_TIMEOUTS = {
LogSectionType.LAVA_SUBMIT: timedelta(minutes=LAVA_SUBMIT_TIMEOUT),
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),
@@ -102,6 +108,14 @@ class LogSection:
LOG_SECTIONS = (
LogSection(
regex=re.compile(r"start: 2 (\S+) \(timeout ([^)]+)\).*"),
levels=("info"),
section_id="{}",
section_header="Booting via {}",
section_type=LogSectionType.LAVA_BOOT,
collapsed=True,
),
LogSection(
regex=re.compile(r"<?STARTTC>? ([^>]*)"),
levels=("target", "debug"),

View File

@@ -68,7 +68,7 @@ EOF
ping -c 5 -w 60 $(lava-target-ip)
lava_ssh_test_case() {
set -x
set -ex
local test_case="${1}"
shift
lava-test-case \"${test_case}\" --shell \\
@@ -170,7 +170,7 @@ def generate_docker_test(
# maintainers with monitoring
f"lava_ssh_test_case '{args.project_name}_{args.mesa_job_name}' "
# Changing directory to /, as the HWCI_SCRIPT expects that
"'\"cd / && /init-stage2.sh\"'",
"'cd / && /init-stage2.sh'",
]
return init_stages_test

View File

@@ -83,7 +83,7 @@ if [ -n "$HOST_BUILD_OPTIONS" ]; then
section_switch meson-host-build "meson: host build"
meson configure
meson configure --no-pager
ninja
ninja install
popd
@@ -120,8 +120,8 @@ case $CI_PIPELINE_SOURCE in
# /tmp/ccWlDCPV.s:15250880: Error: operand out of range (0xfffffffffdd4e688 is not between 0xfffffffffe000000 and 0x1fffffc)
LTO=false
# enable one by one for now
elif [ "$CI_JOB_NAME" == "fedora-release" ] || [ "$CI_JOB_NAME" == "debian-build-testing" ]; then
LTO=true
elif [ "$CI_JOB_NAME" == "fedora-release" ]; then
LTO=false
else
LTO=false
fi
@@ -186,7 +186,7 @@ meson setup _build \
-D backend_max_links=${MAX_LD} \
${EXTRA_OPTION}
cd _build
meson configure
meson configure --no-pager
uncollapsed_section_switch meson-build "meson: build"

View File

@@ -1,136 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
set -ex
if [ -z "$GPU_VERSION" ]; then
echo 'GPU_VERSION must be set to something like "llvmpipe" or "freedreno-a630" (the name used in your ci/gpu-version-*.txt)'
exit 1
fi
INSTALL="$PWD/install"
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL/lib/"
export EGL_PLATFORM=surfaceless
ARCH=$(uname -m)
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
# 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}
findmnt -n tmpfs ${SHADER_CACHE_HOME} || findmnt -n tmpfs ${SHADER_CACHE_DIR} || {
mkdir -p ${SHADER_CACHE_DIR}
mount -t tmpfs -o nosuid,nodev,size=2G,mode=1755 tmpfs ${SHADER_CACHE_DIR}
}
if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
# deqp is to use virpipe, and virgl_test_server llvmpipe
export GALLIUM_DRIVER="$GALLIUM_DRIVER"
VTEST_ARGS="--use-egl-surfaceless"
if [ "$VIRGL_HOST_API" = "GLES" ]; then
VTEST_ARGS="$VTEST_ARGS --use-gles"
fi
GALLIUM_DRIVER=llvmpipe \
GALLIVM_PERF="nopt" \
virgl_test_server $VTEST_ARGS >$RESULTS_DIR/vtest-log.txt 2>&1 &
sleep 1
fi
if [ -n "$PIGLIT_FRACTION" ] || [ -n "$CI_NODE_INDEX" ]; then
FRACTION=$((${PIGLIT_FRACTION:-1} * ${CI_NODE_TOTAL:-1}))
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --fraction $FRACTION"
fi
# If the job is parallel at the gitab job level, take the corresponding fraction
# of the caselist.
if [ -n "$CI_NODE_INDEX" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --fraction-start ${CI_NODE_INDEX}"
fi
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
PIGLIT_RUNNER_OPTIONS="$PIGLIT_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
touch $INSTALL/$GPU_VERSION-flakes.txt
if [ -n "$VK_DRIVER" ] && [ -e "$INSTALL/$VK_DRIVER-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$VK_DRIVER-skips.txt"
fi
if [ -n "$GALLIUM_DRIVER" ] && [ -e "$INSTALL/$GALLIUM_DRIVER-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GALLIUM_DRIVER-skips.txt"
fi
if [ -n "$DRIVER_NAME" ] && [ -e "$INSTALL/$DRIVER_NAME-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$DRIVER_NAME-skips.txt"
fi
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
fi
if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GPU_VERSION-slow-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" != "gbm" ] ; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/x11-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" = "gbm" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/gbm-skips.txt"
fi
set +e
piglit-runner \
run \
--piglit-folder /piglit \
--output $RESULTS_DIR \
--jobs ${FDO_CI_CONCURRENT:-4} \
--skips $INSTALL/all-skips.txt $PIGLIT_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--profile $PIGLIT_PROFILES \
--process-isolation \
$PIGLIT_RUNNER_OPTIONS \
-v -v
PIGLIT_EXITCODE=$?
deqp-runner junit \
--testsuite $PIGLIT_PROFILES \
--results $RESULTS_DIR/failures.csv \
--output $RESULTS_DIR/junit.xml \
--limit 50 \
--template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
# Report the flakes to the IRC channel for monitoring (if configured):
if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS_DIR/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
--job "$CI_JOB_ID" \
--url "$CI_JOB_URL" \
--branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \
--branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}" || true
fi
# Compress results.csv to save on bandwidth during the upload of artifacts to
# GitLab. This reduces a full piglit run to 550 KB, down from 6 MB, and takes
# 55ms on my Ryzen 5950X (with or without parallelism).
zstd --quiet --rm --threads ${FDO_CI_CONCURRENT:-0} -8 $RESULTS_DIR/results.csv -o $RESULTS_DIR/results.csv.zst
exit $PIGLIT_EXITCODE

View File

@@ -13,7 +13,6 @@ set -ex
export PAGER=cat # FIXME: export everywhere
INSTALL=$(realpath -s "$PWD"/install)
S3_ARGS="--token-file ${S3_JWT_FILE}"
export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"
@@ -120,7 +119,7 @@ replay_s3_upload_images() {
fi
__S3_PATH="$PIGLIT_REPLAY_REFERENCE_IMAGES_BASE"
__DESTINATION_FILE_PATH="${line##*-}"
if curl -L -s -I "https://${__S3_PATH}/${__DESTINATION_FILE_PATH}" | grep -q "content-type: application/octet-stream" 2>/dev/null; then
if curl --fail -L -s -I "https://${__S3_PATH}/${__DESTINATION_FILE_PATH}" | grep -q "content-type: application/octet-stream" 2>/dev/null; then
continue
fi
else
@@ -128,8 +127,7 @@ replay_s3_upload_images() {
__DESTINATION_FILE_PATH="$__S3_TRACES_PREFIX/${line##*-}"
fi
ci-fairy s3cp $S3_ARGS "$RESULTS_DIR/$__PREFIX/$line" \
"https://${__S3_PATH}/${__DESTINATION_FILE_PATH}"
s3_upload "$RESULTS_DIR/$__PREFIX/$line" "https://${__S3_PATH}/${__DESTINATION_FILE_PATH%/*}/"
done
}
@@ -166,10 +164,11 @@ RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD &&
rm -rf replayer-db
# ANGLE: download compiled ANGLE runtime and the compiled restricted traces (all-in-one package)
if [ -n "$PIGLIT_REPLAY_ANGLE_TAG" ]; then
ARCH="amd64"
FILE="angle-bin-${ARCH}-${PIGLIT_REPLAY_ANGLE_TAG}.tar.zst"
ci-fairy s3cp $S3_ARGS "https://s3.freedesktop.org/mesa-tracie-private/${FILE}" "${FILE}"
if [ -n "$PIGLIT_REPLAY_ANGLE_ARCH" ]; then
FILE="angle-bin-${PIGLIT_REPLAY_ANGLE_ARCH}-${ANGLE_TRACE_FILES_TAG}.tar.zst"
curl --location --fail --retry-all-errors --retry 4 --retry-delay 60 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
"https://s3.freedesktop.org/mesa-tracie-private/${FILE}" --output "${FILE}"
mkdir -p replayer-db/angle
tar --zstd -xf ${FILE} -C replayer-db/angle/
fi

View File

@@ -52,8 +52,8 @@ 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 cv artifacts/ | zstd -o "${S3_ARTIFACT_TAR}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_TAR}"
tar c artifacts/ | zstd -o "${S3_ARTIFACT_TAR}"
s3_upload "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/"
rm "${S3_ARTIFACT_TAR}"
fi

View File

@@ -84,7 +84,7 @@ if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_NAME="$S3_ARTIFACT_NAME.tar.zst"
zstd --quiet --threads ${FDO_CI_CONCURRENT:-0} artifacts/install.tar -o ${S3_ARTIFACT_NAME}
ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}
s3_upload "${S3_ARTIFACT_NAME}" "https://${PIPELINE_ARTIFACTS_BASE}/"
fi
section_end prepare-artifacts

View File

@@ -26,6 +26,13 @@ function _x_restore {
}
alias x_restore='{ _x_restore; } >/dev/null 2>/dev/null'
function _error_msg() (
x_off
RED="\e[0;31m"
ENDCOLOR="\e[0m"
echo -e "${RED}$*${ENDCOLOR}"
)
export JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
function get_current_minsec {
@@ -106,6 +113,7 @@ export -f _build_section_end
export -f _section_end
export -f _section_switch
export -f _uncollapsed_section_switch
export -f _error_msg
# Freedesktop requirement (needed for Wayland)
[ -n "${XDG_RUNTIME_DIR:-}" ] || export XDG_RUNTIME_DIR="$(mktemp -p "$PWD" -d xdg-runtime-XXXXXX)"
@@ -119,8 +127,6 @@ if [ -z "${RESULTS_DIR:-}" ]; then
fi
function error {
RED="\e[0;31m"
ENDCOLOR="\e[0m"
# we force the following to be not in a section
if [ -n "${CURRENT_SECTION:-}" ]; then
section_end $CURRENT_SECTION
@@ -128,7 +134,8 @@ function error {
fi
CURR_MINSEC=$(get_current_minsec)
echo -e "\n${RED}[${CURR_MINSEC}] ERROR: $*${ENDCOLOR}\n"
echo -e "\n"
_error_msg "[$CURR_MINSEC] ERROR: $*"
x_restore
}
@@ -137,6 +144,166 @@ function trap_err {
error ${CURRENT_SECTION:-'unknown-section'}: ret code: $*
}
# ------ Structured tagging
export _CI_TAG_CHECK_DIR="/mesa-ci-build-tag"
_ci_tag_from_name_to_var() {
# Transforms MY_COMPONENT_TAG to my-component
echo "${1%_TAG}" | tr '[:upper:]' '[:lower:]' | tr '_' '-'
}
_ci_tag_check() (
x_off
_declared_name="${1}"
declare -n _declared="${_declared_name}"
_calculated="${2}"
local component_lower=$(_ci_tag_from_name_to_var "${_declared_name}")
if [ -z "${_declared:-}" ]; then
# Close the section
error "Fatal error"
_error_msg "Structured tag is not set: ${_declared_name}"
_error_msg ""
echo "If you are adding a new component, please run:"
echo "bin/ci/update_tag.py --include ${component_lower}"
echo "This will automatically update the YAML file for you."
echo "Or manually edit .gitlab-ci/conditional-build-image-tags.yml to add the new"
echo "component."
error ""
exit 2
fi
if [ "${_declared}" != "${_calculated}" ]; then
# Close the section
error "Fatal error"
_error_msg "Mismatch in declared and calculated tags:"
_error_msg " ${_declared_name} from the YAML is \"${_declared}\""
_error_msg " ... but I think it should be \"${_calculated}\""
_error_msg ""
echo "Usually this happens when you change what you want to be built without also"
echo "changing the YAML declaration. For example, you've bumped SKQP to version"
echo "1.2.3, but you still have 'SKQP_VER: 1.2.2' in"
echo ".gitlab-ci/conditional-build-image-tags.yml."
echo ""
echo "If you meant to change the component I'm talking about, please change the"
echo "tag and resubmit. You can also run:"
echo "bin/ci/update_tag.py --include ${component_lower}"
echo "to update the tag automatically."
echo ""
echo "If you didn't mean to change the component, please ping @mesa/ci-helpers and we"
echo "can help you figure out what's gone wrong."
echo ""
echo "But for now, I've got to fail this build. Sorry."
exit 2
fi
x_restore
)
_ci_tag_check_build() {
x_off
if [ -n "${NEW_TAG_DRY_RUN:-}" ]; then
echo "${2}"
exit 0
fi
_ci_tag_check "${1}" "${2}"
if [ -n "${CI_NOT_BUILDING_ANYTHING:-}" ]; then
exit 0
fi
x_restore
}
get_tag_file() {
x_off
# If no tag name is provided, return the directory
echo "${_CI_TAG_CHECK_DIR}/${1:-}"
x_restore
}
_ci_tag_write() (
set +x
local tag_name="${1}"
local tag_value="${2}"
mkdir -p "${_CI_TAG_CHECK_DIR}"
echo -n "${tag_value}" > "$(get_tag_file "${tag_name}")"
)
_ci_calculate_tag() {
x_off
# the args are files that can affect the build output
mapfile -t extra_files < <(printf '%s\n' "$@")
(
for extra_file in "${extra_files[@]}"; do
if [ ! -f "${extra_file}" ]; then
error "File '${extra_file}' does not exist"
exit 1
fi
cat "${extra_file}"
done
) | md5sum | cut -d' ' -f1
x_restore
}
ci_tag_build_time_check() {
# Get the caller script and hash its contents plus the extra files
x_off
local tag_name="${1}"
local build_script_file="build-$(_ci_tag_from_name_to_var "${tag_name}").sh"
local build_script=".gitlab-ci/container/${build_script_file}"
shift
# now $@ has the extra files
local calculated_tag=$(_ci_calculate_tag "${build_script}" "$@")
_ci_tag_check_build "${tag_name}" "${calculated_tag}"
_ci_tag_write "${tag_name}" "${calculated_tag}"
x_restore
}
ci_tag_test_time_check() {
x_off
local tag_file=$(get_tag_file "${1}")
if [ ! -f "${tag_file}" ]; then
_error_msg "Structured tag file ${tag_file} does not exist"
_error_msg "Please run the ci_tag_build_time_check first and rebuild the image/rootfs"
exit 2
fi
_ci_tag_check "${1}" "$(cat "${tag_file}")"
x_restore
}
# Export all functions
export -f _ci_calculate_tag
export -f _ci_tag_check
export -f _ci_tag_check_build
export -f _ci_tag_from_name_to_var
export -f _ci_tag_write
export -f ci_tag_build_time_check
export -f ci_tag_test_time_check
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

@@ -40,7 +40,7 @@
.restricted-rules:
rules:
# If the triggerer has access to the restricted traces and if it is pre-merge
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman|Valentine)$/") &&
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman|Valentine|daniels)$/") &&
($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)'
when: never
@@ -55,7 +55,7 @@
- .gitlab-ci/**/*
- include/**/*
- meson.build
- meson_options.txt
- meson.options
- build-support/**/*
- subprojects/**/*
- .gitattributes
@@ -155,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

@@ -31,8 +31,6 @@
timeout: 10m
script:
- git diff --color=always --exit-code # Fails if there are diffs
tags:
- placeholder-job
rustfmt:
extends:
@@ -40,9 +38,45 @@ rustfmt:
- .lint-rustfmt-rules
before_script:
- shopt -s globstar
- source "$HOME/.cargo/env"
- rustfmt --version
- rustfmt --verbose src/**/lib.rs
shader-db:
stage: code-validation
extends:
- .use-debian/x86_64_build
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.core-rules, rules]
# Keep this list in sync with the drivers tested in run-shader-db.sh
- !reference [.freedreno-common-rules, rules]
- !reference [.intel-common-rules, rules]
- !reference [.lima-rules, rules]
- !reference [.v3d-rules, rules]
- !reference [.vc4-rules, rules]
- !reference [.nouveau-rules, rules]
- !reference [.r300-rules, rules]
# Also run if this job's own config or script changes
- changes:
- .gitlab-ci/build/gitlab-ci.yml
- .gitlab-ci/run-shader-db.sh
needs:
- debian-build-testing
variables:
S3_ARTIFACT_NAME: debian-build-testing
before_script:
- !reference [.download_s3, before_script]
script: |
.gitlab-ci/run-shader-db.sh
artifacts:
paths:
- shader-db
timeout: 15m
tags:
# FIXME: kvm is a hack, should not be needed
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM
yaml-toml-shell-py-test:
extends:
- .use-debian/x86_64_pyutils
@@ -64,7 +98,8 @@ yaml-toml-shell-py-test:
- !reference [.disable-farm-mr-rules, rules]
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- if: $GITLAB_USER_LOGIN == "marge-bot"
# merge pipeline
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
changes: &lint_files
- .gitlab-ci/test/gitlab-ci.yml
- .gitlab-ci/**/*.sh
@@ -74,10 +109,16 @@ yaml-toml-shell-py-test:
- .gitlab-ci/tests/**/*
- bin/ci/**/*
when: on_success
# direct pushes that bypassed the CI
- if: $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes: *lint_files
when: on_success
# direct pushes from release manager
- if: $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
changes: *lint_files
when: on_success
- changes: *lint_files
when: manual
tags:
- placeholder-job
.test-gl:
extends:
@@ -136,6 +177,10 @@ yaml-toml-shell-py-test:
paths:
- results/
.test-angle:
variables:
ANGLE_TAG: ${CONDITIONAL_BUILD_ANGLE_TAG}
.b2c-vkd3d-proton-test:
variables:
HWCI_TEST_SCRIPT: install/vkd3d-runner.sh
@@ -143,7 +188,7 @@ yaml-toml-shell-py-test:
.piglit-traces-test:
artifacts:
when: on_failure
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
reports:
junit: results/junit.xml
paths:
@@ -155,10 +200,10 @@ yaml-toml-shell-py-test:
DEVICE_HANGING_TIMEOUT_SEC: 600
PIGLIT_REPLAY_EXTRA_ARGS: --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_bucket=${S3_TRACIE_PUBLIC_BUCKET} --jwt-file=${S3_JWT_FILE}
PIGLIT_NO_WINDOW: 1
HWCI_TEST_SCRIPT: "/install/piglit/piglit-runner.sh"
HWCI_TEST_SCRIPT: "/install/piglit/piglit-traces.sh"
script:
- section_start variables "Variables passed through:"
- install/common/generate-env.sh
- install/common/export-gitlab-job-env-for-dut.sh
- section_end variables
- install/piglit/piglit-traces.sh
@@ -177,7 +222,7 @@ yaml-toml-shell-py-test:
- ./install/fossilize-runner.sh
artifacts:
when: on_failure
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results/
@@ -205,7 +250,7 @@ yaml-toml-shell-py-test:
BM_ROOTFS: /rootfs-${DEBIAN_ARCH}
artifacts:
when: always
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results/
- serial*.txt
@@ -295,7 +340,8 @@ yaml-toml-shell-py-test:
image: registry.freedesktop.org/gfx-ci/ci-tron/mesa-trigger:2024-01-05.1
timeout: 1h 40m
variables:
# No need by default to pull the whole repo
# No need to pull the whole git repo, the artifacts from python-artifacts
# contain everything we need.
GIT_STRATEGY: none
# boot2container initrd configuration parameters.
B2C_VERSION: v0.9.14
@@ -312,20 +358,29 @@ yaml-toml-shell-py-test:
B2C_TIMEOUT_OVERALL_MINUTES: 90
B2C_TIMEOUT_CONSOLE_ACTIVITY_RETRIES: 0
B2C_JOB_VOLUME_EXCLUSIONS: "*.shader_cache,install/*,*/install/*,*/vkd3d-proton.cache*,vkd3d-proton.cache*,*.qpa"
B2C_MACHINE_REGISTRATION_IMAGE: "registry.freedesktop.org/gfx-ci/ci-tron/machine-registration:latest"
B2C_TELEGRAF_IMAGE: "registry.freedesktop.org/gfx-ci/ci-tron/telegraf:latest"
B2C_KERNEL_CMDLINE_EXTRAS: ""
# As noted in the top description, we make a distinction between the
# container used by gitlab-runner to queue the work, and the container
# used by the DUTs/test machines. To make this distinction quite clear,
# we rename the MESA_IMAGE variable into IMAGE_UNDER_TEST.
IMAGE_UNDER_TEST: "$MESA_IMAGE"
# we rename the variable.
B2C_IMAGE_UNDER_TEST: "$MESA_IMAGE"
B2C_INSTALL_TARBALL_URL: "https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst"
B2C_CONTAINER_CMD: "./install/common/init-stage2.sh"
INSTALL_TARBALL_NAME: "install.tar"
INSTALL_TARBALL: "./artifacts/${INSTALL_TARBALL_NAME}"
CI_B2C_ARTIFACTS: "./artifacts/b2c"
CI_COMMON_SCRIPTS: "./artifacts/ci-common"
B2C_JOB_TEMPLATE: "${CI_B2C_ARTIFACTS}/b2c.yml.jinja2.jinja2"
JOB_FOLDER: "job_folder"
needs:
- job: python-artifacts
artifacts: true
- !reference [.required-for-hardware-jobs, needs]
before_script:
# We don't want the tarball unpacking of .test, but will take the JWT bits.
- !reference [default, before_script]
@@ -350,11 +405,13 @@ yaml-toml-shell-py-test:
fi
fi
[ -s "$INSTALL_TARBALL" ] || exit 1
[ -d "$CI_B2C_ARTIFACTS" ] || exit 1
[ -d "$CI_COMMON_SCRIPTS" ] || exit 1
export B2C_CONTAINER_CMD="bash -euc 'tar xf ${INSTALL_TARBALL_NAME}; ./install/common/init-stage2.sh'"
# Pull all our images through our proxy registry
B2C_IMAGE_UNDER_TEST=${B2C_IMAGE_UNDER_TEST//registry.freedesktop.org/{{ fdo_proxy_registry \}\}}
B2C_MACHINE_REGISTRATION_IMAGE=${B2C_MACHINE_REGISTRATION_IMAGE//registry.freedesktop.org/{{ fdo_proxy_registry \}\}}
B2C_TELEGRAF_IMAGE=${B2C_TELEGRAF_IMAGE//registry.freedesktop.org/{{ fdo_proxy_registry \}\}}
# The Valve CI gateway receives jobs in a YAML format. Create a
# job description from the CI environment.
@@ -368,15 +425,12 @@ yaml-toml-shell-py-test:
# Create a script to regenerate the CI environment when this job
# begins running on the remote DUT.
set +x
"$CI_COMMON_SCRIPTS"/generate-env.sh > ${JOB_FOLDER}/set-job-env-vars.sh
"$CI_COMMON_SCRIPTS"/export-gitlab-job-env-for-dut.sh > ${JOB_FOLDER}/set-job-env-vars.sh
echo "export SCRIPTS_DIR=./install" >> ${JOB_FOLDER}/set-job-env-vars.sh
echo "Variables passed through:"
cat ${JOB_FOLDER}/set-job-env-vars.sh
set -x
# Copy the mesa install tarball to the job folder, for later extraction
mv "${INSTALL_TARBALL}" "${JOB_FOLDER}"
script: |
slugify () {
echo "$1" | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
@@ -384,22 +438,27 @@ yaml-toml-shell-py-test:
# Submit the job to Valve's CI gateway service with the CI
# provisioned job_folder.
env PYTHONUNBUFFERED=1 executorctl \
run -w b2c.yml.jinja2 -j $(slugify "$CI_JOB_NAME") -s ${JOB_FOLDER} -i "$CI_RUNNER_DESCRIPTION"
PYTHONUNBUFFERED=1 \
executorctl run \
--machine-id "$CI_RUNNER_DESCRIPTION" \
--job-id $(slugify "$CI_JOB_NAME") \
--share-directory "$JOB_FOLDER" \
--wait \
b2c.yml.jinja2
# Anything our job places in results/ will be collected by the
# Gitlab coordinator for status presentation. results/junit.xml
# will be parsed by the UI for more detailed explanations of
# test execution.
after_script:
# Keep the results path the same as baremetal and LAVA
- mkdir -p "${JOB_FOLDER}"/results
- mv "${JOB_FOLDER}"/results ./
- !reference [default, after_script]
# Anything our job places in results/ will be collected by the
# Gitlab coordinator for status presentation. results/junit.xml
# will be parsed by the UI for more detailed explanations of
# test execution.
artifacts:
when: always
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results
reports:
@@ -411,42 +470,55 @@ yaml-toml-shell-py-test:
variables:
B2C_KERNEL_URL: 'https://gitlab.freedesktop.org/gfx-ci/ci-tron/-/package_files/519/download' # Linux 6.1
B2C_INITRAMFS_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/initramfs.linux_amd64.cpio.xz'
S3_ARTIFACT_NAME: "mesa-x86_64-default-debugoptimized"
.b2c-x86_64-test-vk:
extends:
- .use-debian/x86_64_test-vk
- .b2c-x86_64-test
needs:
- debian/x86_64_test-vk
- debian-testing
- !reference [.required-for-hardware-jobs, needs]
- job: debian/x86_64_test-vk
artifacts: false
- job: debian-testing
artifacts: false
- !reference [.b2c-test, needs]
.b2c-x86_64-test-vk-manual:
extends:
- .use-debian/x86_64_test-vk
- .b2c-x86_64-test
variables:
S3_ARTIFACT_NAME: "debian-build-testing"
needs:
- debian/x86_64_test-vk
- debian-build-testing
- !reference [.required-for-hardware-jobs, needs]
- job: debian/x86_64_test-vk
artifacts: false
- job: debian-build-testing
artifacts: false
- !reference [.b2c-test, needs]
.b2c-x86_64-test-gl:
extends:
- .use-debian/x86_64_test-gl
- .b2c-x86_64-test
needs:
- debian/x86_64_test-gl
- debian-testing
- !reference [.required-for-hardware-jobs, needs]
- job: debian/x86_64_test-gl
artifacts: false
- job: debian-testing
artifacts: false
- !reference [.b2c-test, needs]
.b2c-x86_64-test-gl-manual:
extends:
- .use-debian/x86_64_test-gl
- .b2c-x86_64-test
variables:
S3_ARTIFACT_NAME: "debian-build-testing"
needs:
- debian/x86_64_test-gl
- debian-build-testing
- !reference [.required-for-hardware-jobs, needs]
- job: debian/x86_64_test-gl
artifacts: false
- job: debian-build-testing
artifacts: false
- !reference [.b2c-test, needs]
.b2c-arm64-test:
extends:
@@ -454,21 +526,70 @@ yaml-toml-shell-py-test:
variables:
B2C_INITRAMFS_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/initramfs.linux_arm64.cpio.xz'
B2C_KERNEL_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/linux-arm64'
S3_ARTIFACT_NAME: "mesa-arm64-default-debugoptimized"
.b2c-arm64-test-vk:
extends:
- .use-debian/arm64_test-vk
- .b2c-arm64-test
needs:
- debian/arm64_test-vk
- debian-arm64
- !reference [.required-for-hardware-jobs, needs]
- job: debian/arm64_test-vk
artifacts: false
- job: debian-arm64
artifacts: false
- !reference [.b2c-test, needs]
.b2c-arm64-test-gl:
extends:
- .use-debian/arm64_test-gl
- .b2c-arm64-test
needs:
- debian/arm64_test-gl
- debian-arm64
- !reference [.required-for-hardware-jobs, needs]
- job: debian/arm64_test-gl
artifacts: false
- job: debian-arm64
artifacts: false
- !reference [.b2c-test, needs]
.b2c-arm32-test:
extends:
- .b2c-test
variables:
B2C_INITRAMFS_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/initramfs.linux_arm.cpio.xz'
B2C_KERNEL_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/linux-arm'
S3_ARTIFACT_NAME: "mesa-arm32-default-debugoptimized"
.b2c-arm32-test-vk:
extends:
- .use-debian/arm32_test-vk
- .b2c-arm32-test
needs:
- job: debian/arm32_test-vk
artifacts: false
- job: debian-arm32
artifacts: false
- !reference [.b2c-test, needs]
.b2c-arm32-test-gl:
extends:
- .use-debian/arm32_test-gl
- .b2c-arm32-test
needs:
- job: debian/arm32_test-gl
artifacts: false
- job: debian-arm32
artifacts: false
- !reference [.b2c-test, needs]
.b2c-arm32-test-asan-gl:
extends:
- .use-debian/arm32_test-gl
- .b2c-arm32-test
variables:
S3_ARTIFACT_NAME: "mesa-arm32-asan-debugoptimized"
DEQP_FORCE_ASAN: 1
needs:
- job: debian/arm32_test-gl
artifacts: false
- job: debian-arm32-asan
artifacts: false
- !reference [.b2c-test, needs]

View File

@@ -4,12 +4,9 @@ from unittest.mock import MagicMock, patch
import pytest
import yaml
from freezegun import freeze_time
from hypothesis import settings
from .lava.helpers import generate_testsuite_result, jobs_logs_response
settings.register_profile("ci", max_examples=1000, derandomize=True)
settings.load_profile("ci")
def pytest_configure(config):
config.addinivalue_line(

View File

@@ -11,11 +11,11 @@ timeouts:
minutes: 10
actions:
depthcharge-retry:
minutes: 4
depthcharge-start:
minutes: 1
minutes: 6
depthcharge-action:
minutes: 15
minutes: 5
uboot-action:
seconds: 200
actions:
- deploy:
timeout:
@@ -43,7 +43,8 @@ actions:
steps:
- cat Image.gz my_dtb_filename.dtb > Image.gz+dtb
- mkbootimg --kernel Image.gz+dtb --cmdline "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard,v3
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096 --base 0x80000000 -o boot.img
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096
--base 0x80000000 -o boot.img
namespace: dut
- deploy:
timeout:
@@ -55,13 +56,13 @@ actions:
boot:
url: downloads://boot.img
namespace: dut
failure_retry: 3
failure_retry: 2
- boot:
timeout:
minutes: 2
docker:
image: registry.gitlab.collabora.com/lava/health-check-docker
failure_retry: 3
failure_retry: 2
method: fastboot
prompts:
- 'lava-shell:'
@@ -118,7 +119,7 @@ actions:
ping -c 5 -w 60 $(lava-target-ip)
lava_ssh_test_case() {
set -x
set -ex
local test_case="${1}"
shift
lava-test-case "${test_case}" --shell \
@@ -137,6 +138,6 @@ actions:
sed -i '/S3_RESULTS_UPLOAD/d' /set-job-env-vars.sh
EOF
- export SSH_PTY_ARGS=-tt
- lava_ssh_test_case 'test-project_dut' '"cd / && /init-stage2.sh"'
- lava_ssh_test_case 'test-project_dut' 'cd / && /init-stage2.sh'
docker:
image:

View File

@@ -11,11 +11,11 @@ timeouts:
minutes: 10
actions:
depthcharge-retry:
minutes: 4
depthcharge-start:
minutes: 1
minutes: 6
depthcharge-action:
minutes: 15
minutes: 5
uboot-action:
seconds: 200
actions:
- deploy:
timeout:
@@ -42,7 +42,8 @@ actions:
steps:
- cat Image.gz my_dtb_filename.dtb > Image.gz+dtb
- mkbootimg --kernel Image.gz+dtb --cmdline "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard,v3
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096 --base 0x80000000 -o boot.img
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096
--base 0x80000000 -o boot.img
- deploy:
timeout:
minutes: 2
@@ -57,7 +58,7 @@ actions:
minutes: 2
docker:
image: registry.gitlab.collabora.com/lava/health-check-docker
failure_retry: 3
failure_retry: 2
method: fastboot
prompts:
- 'lava-shell:'

View File

@@ -11,11 +11,11 @@ timeouts:
minutes: 10
actions:
depthcharge-retry:
minutes: 4
depthcharge-start:
minutes: 1
minutes: 6
depthcharge-action:
minutes: 15
minutes: 5
uboot-action:
seconds: 200
actions:
- deploy:
timeout:
@@ -32,9 +32,9 @@ actions:
dtb:
url: None/my_dtb_filename.dtb
namespace: dut
failure_retry: 3
failure_retry: 2
- boot:
failure_retry: 3
failure_retry: 2
method: u-boot
prompts:
- 'lava-shell:'
@@ -90,7 +90,7 @@ actions:
ping -c 5 -w 60 $(lava-target-ip)
lava_ssh_test_case() {
set -x
set -ex
local test_case="${1}"
shift
lava-test-case "${test_case}" --shell \
@@ -109,6 +109,6 @@ actions:
sed -i '/S3_RESULTS_UPLOAD/d' /set-job-env-vars.sh
EOF
- export SSH_PTY_ARGS=-tt
- lava_ssh_test_case 'test-project_dut' '"cd / && /init-stage2.sh"'
- lava_ssh_test_case 'test-project_dut' 'cd / && /init-stage2.sh'
docker:
image:

View File

@@ -11,11 +11,11 @@ timeouts:
minutes: 10
actions:
depthcharge-retry:
minutes: 4
depthcharge-start:
minutes: 1
minutes: 6
depthcharge-action:
minutes: 15
minutes: 5
uboot-action:
seconds: 200
actions:
- deploy:
timeout:
@@ -32,7 +32,7 @@ actions:
dtb:
url: None/my_dtb_filename.dtb
- boot:
failure_retry: 3
failure_retry: 2
method: u-boot
prompts:
- 'lava-shell:'

View File

@@ -1,41 +1,6 @@
import re
import pytest
from hypothesis import given
from hypothesis import strategies as st
from lava.utils.lava_farm import LAVA_FARM_RUNNER_PATTERNS, LavaFarm, get_lava_farm
@given(
runner_tag=st.text(
alphabet=st.characters(
min_codepoint=1, max_codepoint=127, blacklist_categories=("C",)
),
min_size=1,
)
)
def test_get_lava_farm_invalid_tags(runner_tag):
with pytest.MonkeyPatch().context() as mp:
mp.setenv("RUNNER_TAG", runner_tag)
assert get_lava_farm() == LavaFarm.UNKNOWN
from lava.utils.lava_farm import get_lava_farm
def test_get_lava_farm_no_tag(monkeypatch):
monkeypatch.delenv("RUNNER_TAG", raising=False)
assert get_lava_farm() == LavaFarm.UNKNOWN
@given(
st.fixed_dictionaries(
{k: st.from_regex(v) for k, v in LAVA_FARM_RUNNER_PATTERNS.items()}
)
)
def test_get_lava_farm_valid_tags(runner_farm_tag: dict):
with pytest.MonkeyPatch().context() as mp:
for farm, tag in runner_farm_tag.items():
try:
mp.setenv("RUNNER_TAG", tag)
except ValueError:
# hypothesis may generate null bytes in the string
continue
assert get_lava_farm() == farm
monkeypatch.delenv("FARM", raising=False)
assert get_lava_farm() == "unknown"

View File

@@ -83,7 +83,7 @@ def clear_env_vars(autouse=True):
@pytest.fixture
def mock_collabora_farm(clear_env_vars, monkeypatch):
# Mock a Collabora farm-like device runner tag to enable SSH execution
monkeypatch.setenv("RUNNER_TAG", "mesa-ci-1234-lava-collabora")
monkeypatch.setenv("FARM", "collabora")
@pytest.mark.parametrize("force_uart", [True, False], ids=["SSH", "UART"])
@@ -211,7 +211,7 @@ def test_lava_job_definition(
job_dict = yaml.load(job_definition)
# Uncomment the following to update the expected YAML files
# yaml.dump(job_dict, Path(f"../../data/{mode}_force_uart={force_uart}_job_definition.yaml"))
# yaml.dump(job_dict, load_data_file(f"{mode}_force_uart={force_uart}_job_definition.yaml"))
# Check that the generated job definition matches the expected one
assert job_dict == expected_job_dict

View File

@@ -48,10 +48,9 @@ meson setup `
-Dllvm=enabled `
-Dshared-llvm=disabled `
-Dvulkan-drivers="swrast,amd,microsoft-experimental" `
-Dgallium-drivers="swrast,d3d12,zink" `
-Dgallium-drivers="llvmpipe,softpipe,d3d12,zink" `
-Dgallium-va=enabled `
-Dvideo-codecs="all" `
-Dshared-glapi=enabled `
-Dgles1=enabled `
-Dgles2=enabled `
-Dgallium-opencl=icd `

View File

@@ -57,7 +57,7 @@ if (!$buildstatus) {
Get-Date
Write-Host "Cloning LLVM release/15.x"
git clone -b release/15.x --depth=1 https://github.com/llvm/llvm-project deps/llvm-project
git clone -b llvmorg-19.1.6 --depth=1 https://github.com/llvm/llvm-project deps/llvm-project
if (!$?) {
Write-Host "Failed to clone LLVM repository"
Exit 1
@@ -65,7 +65,7 @@ if (!$?) {
Get-Date
Write-Host "Cloning SPIRV-LLVM-Translator"
git clone -b llvm_release_150 https://github.com/KhronosGroup/SPIRV-LLVM-Translator deps/llvm-project/llvm/projects/SPIRV-LLVM-Translator
git clone -b v19.1.3 https://github.com/KhronosGroup/SPIRV-LLVM-Translator deps/llvm-project/llvm/projects/SPIRV-LLVM-Translator
if (!$?) {
Write-Host "Failed to clone SPIRV-LLVM-Translator repository"
Exit 1
@@ -79,7 +79,7 @@ Write-Host "Compiling LLVM and Clang"
cmake ../llvm `
-GNinja `
-DCMAKE_BUILD_TYPE=Release `
-DLLVM_USE_CRT_RELEASE=MT `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_PREFIX_PATH="$depsInstallPath" `
-DCMAKE_INSTALL_PREFIX="$depsInstallPath" `
-DLLVM_ENABLE_PROJECTS="clang" `

View File

@@ -63,6 +63,8 @@ Update-SessionEnvironment
Start-Process -NoNewWindow -Wait git -ArgumentList 'config --global core.autocrlf false'
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Write-Host "Upgrading pip at:"
Get-Date
python -m pip install --upgrade pip --progress-bar off

View File

@@ -2,7 +2,7 @@
# Touch this file needs update both WINDOWS_X64_BUILD_TAG WINDOWS_X64_TEST_TAG
# This file needs run in administrator mode
$env:VULKAN_SDK_VERSION="1.3.275.0"
$env:VULKAN_SDK_VERSION="1.4.304.0"
$ProgressPreference = "SilentlyContinue"
@@ -22,18 +22,5 @@ if (!$?) {
}
Remove-Item "${env:TMP}\vulkan_sdk.exe" -Force
$VULKAN_RUNTIME_URL="https://sdk.lunarg.com/sdk/download/$env:VULKAN_SDK_VERSION/windows/VulkanRT-$env:VULKAN_SDK_VERSION-Installer.exe"
Write-Host "Downloading Vulkan-Runtime $VULKAN_RUNTIME_URL at:"
Get-Date
Invoke-WebRequest -Uri "$VULKAN_RUNTIME_URL" -OutFile "${env:TMP}\vulkan-runtime.exe" | Out-Null
Write-Host "Installing Vulkan-Runtime at:"
Get-Date
Start-Process -NoNewWindow -Wait "${env:TMP}\vulkan-runtime.exe" -ArgumentList '/S'
if (!$?) {
Write-Host "Failed to install Vulkan-Runtime"
Exit 1
}
Remove-Item "${env:TMP}\vulkan-runtime.exe" -Force
Write-Host "Installing Vulkan-Runtime finished at:"
Get-Date

View File

@@ -3,7 +3,6 @@ $env:PIGLIT_SPIRV_AS_BINARY = "C:\VulkanSDK\$env:VULKAN_SDK_VERSION\Bin\spirv-as
Copy-Item -Path _install\bin\opengl32.dll -Destination C:\Piglit\bin\opengl32.dll
Copy-Item -Path _install\bin\libgallium_wgl.dll -Destination C:\Piglit\bin\libgallium_wgl.dll
Copy-Item -Path _install\bin\libglapi.dll -Destination C:\Piglit\bin\libglapi.dll
$jobs = ""
if ($null -ne $env:FDO_CI_CONCURRENT) {

View File

@@ -1,19 +0,0 @@
# These tests all read from the front buffer after a swap. Given that we
# run piglit tests in parallel in Mesa CI, and don't have a compositor
# running, the frontbuffer reads may end up with undefined results from
# windows overlapping us.
#
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
# marked as single-threaded and run after the rayon loop if we want to support
# them.
#
# Other front-buffer access tests like fbo-sys-blit, fbo-sys-sub-blit, or
# fcc-front-buffer-distraction don't appear here, because the DRI3 fake-front
# handling should be holding the pixels drawn by the test even if we happen to fail
# GL's window system pixel occlusion test.
#
# Note that glx skips don't appear here, they're in all-skips.txt (in case someone
# sets PIGLIT_PLATFORM=gbm to mostly use gbm, but still has an X server running).
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
spec@!opengl 1.1@read-front

View File

@@ -2,7 +2,7 @@
- Check if a new version of Mesa is available which might have fixed the problem.
- If you can, check if the latest development version (git main) works better.
- Check if your bug has already been reported here.
- For any logs, backtraces, etc - use [code blocks](https://docs.gitlab.com/ee/user/markdown.html#code-spans-and-blocks), GitLab removes line breaks without this.
- For any logs, backtraces, etc - use [code blocks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks), GitLab removes line breaks without this.
- Do not paste long logs directly into the description. Use https://gitlab.freedesktop.org/-/snippets/new, attachments, or a pastebin with a long expiration instead.
- As examples of good bug reports you may review one of these - #2598, #2615, #2608
@@ -44,7 +44,7 @@ Example:
### System information
Please post `inxi -GSC -xx` output ([fenced with triple backticks](https://docs.gitlab.com/ee/user/markdown.html#code-spans-and-blocks)) OR fill information below manually
Please post `inxi -GSC -xx` output ([fenced with triple backticks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks)) OR fill information below manually
- OS: (`cat /etc/os-release | grep "NAME"`)

View File

@@ -2,7 +2,7 @@
- Check if a new version of Mesa is available which might have fixed the problem.
- If you can, check if the latest development version (git main) works better.
- Check if your bug has already been reported here.
- For any logs, backtraces, etc - use [code blocks](https://docs.gitlab.com/ee/user/markdown.html#code-spans-and-blocks), GitLab removes line breaks without this.
- For any logs, backtraces, etc - use [code blocks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks), GitLab removes line breaks without this.
- Do not paste long logs directly into the description. Use https://gitlab.freedesktop.org/-/snippets/new, attachments, or a pastebin with a long expiration instead.
- As examples of good bug reports you may review one of these - #2598, #2615, #2608
@@ -16,7 +16,7 @@ The title should effectively distinguish this bug report from others and be spec
### System information
Please post `inxi -GSC -xx` output ([fenced with triple backticks](https://docs.gitlab.com/ee/user/markdown.html#code-spans-and-blocks)) OR fill information below manually
Please post `inxi -GSC -xx` output ([fenced with triple backticks](https://docs.gitlab.com/user/markdown/#code-spans-and-blocks)) OR fill information below manually
- OS: (`cat /etc/os-release | grep "NAME"`)

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