Compare commits

...

6914 Commits

Author SHA1 Message Date
Dylan Baker
85d95009f5 meson: use the wayland module
This module has existed, unchanged, since Meson 0.64, and is now marked
as API stable in 1.8. It provides a number of helpers that reduce the
amount of code we need (including fiddly code about finding
wayland-scanner) by a bit, as well as some nice helpers for finding
external XML files.
2025-07-02 15:32:17 -07:00
Chia-I Wu
356f08aeab panvk: propagate CS error in barrier sync wait
We don't want barriers to hide CS errors.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35606>
2025-07-02 22:13:57 +00:00
Chia-I Wu
7868a551ff panvk: remove debug_syncobjs
We can rely on panvk_per_arch(queue_check_status) to detect device lost.

Because we no longer emit cs_sync32_add from finish_cs to increment
debug syncobj, if an instr between the last draw/dispatch and
end-of-stream causes a CS error, the CS error is ignored.  This is fine
because the instr should have no side effect and the kernel emits
ERROR_BARRIER to recover from the CS error.

If that is undesirable, we can restore the old behavior by emitting
cs_sync64_add from finish_cs to increment regular syncobj (and fix
cs_progress_seqno_reg) when PANVK_DEBUG is set.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35606>
2025-07-02 22:13:57 +00:00
Chia-I Wu
6f21c4a549 panvk: check for CS error
If panvk_cs_sync64::error is non-zero at the end of a primary cmdbuf,
copy the error to panvk_cs_subqueue_context::last_error.

Update panvk_per_arch(queue_check_status) to check the last_error and
treat it as device lost if non-zero.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35606>
2025-07-02 22:13:56 +00:00
Faith Ekstrand
d433f4e8bf nak: Encode ureg handle sources for surface ops on Blackwell
At least I assume this is a handle.  It shows up on SM120 and it looks
very much like the texture thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35895>
2025-07-02 21:57:35 +00:00
Faith Ekstrand
19bee26056 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>
2025-07-02 21:57:34 +00:00
Karol Herbst
c1ba062a30 rusticl: use image_copy_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35809>
2025-07-02 21:42:28 +00:00
Alejandro Piñeiro
0003e16fc6 nir/lower_clip: update comment
As the lowering mentioned there got renamed twice:

  commit b085016f94
  Author: Rob Clark <robclark@freedesktop.org>
  Date:   Fri Mar 25 13:52:26 2016 -0400

    nir: rename lower_outputs_to_temporaries -> lower_io_to_temporaries

    Since it will gain support to lower inputs, give it a more generic name.

  commit 1754507d49
  Author: Marek Ol¨ák <maraeo@gmail.com>
  Date:   Wed Jun 25 19:05:19 2025 -0400

    nir: rename nir_lower_io_to_temporaries -> nir_lower_io_vars_to_temporaries

    Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>

Reviewed-by: Marek Ol¨ák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35855>
2025-07-02 20:56:53 +00:00
Marek Olšák
028591aead ac/nir: remove kill_pointsize and kill_layer options from lowering passes
The outputs are removed by a separate pass.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:46 +00:00
Marek Olšák
42ad7543b8 ac/nir: switch legacy GS lowering to ac_nir_prerast_out completely
This changes legacy GS outputs to use the same logic as NGG GS.
It enables the same optimizations that NGG has such as forwarding
constant GS output components to the GS copy shader at compile time.

ac_nir_gs_output_info is removed.

GS output info is no longer passed to ac_nir_lower_legacy_gs and
ac_nir_create_gs_copy_shader separately.

ac_nir_lower_legacy_gs now gathers ac_nir_prerast_out, generates GSVS ring
stores, and also generates the GS copy shader with GSVS ring loads.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:45 +00:00
Marek Olšák
723ce13f90 ac/nir: move gs_output_component_mask_with_stream to prerast utils
Legacy GS will use it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:45 +00:00
Marek Olšák
2c64cdc047 ac/nir: return the GS copy shader from ac_nir_lower_legacy_gs
This way we won't have to pass output info between the two functions.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:44 +00:00
Marek Olšák
98f3fc494e ac/nir: remove no-op loop from ac_nir_create_gs_copy_shader
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:43 +00:00
Marek Olšák
098d33766a ac: add legacy GS subgroup size computation from radeonsi
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:43 +00:00
Marek Olšák
fa8db1ccd3 ac: add NGG subgroup size computation from radeonsi
RADV will use it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:42 +00:00
Marek Olšák
4263b49778 ac/nir: remove ngg_scratch LDS ABI, allocate it in the lowering pass
This is a cleanup.

Old gs LDS layout: [es outputs][gs outputs][scratch]
Old nogs LDS layout: [xfb/cull][scratch]

New gs LDS layout: [es outputs][scratch|gs outputs]
New nogs LDS layout: [scratch|xfb/cull]

The LDS scratch is moved to the beginning of the preceding buffer in LDS,
while the addresses in that LDS buffer are offset by the scratch size.
It effectively merges the LDS scratch with the preceding buffer in LDS.
Thanks to that, we no longer need the ngg_scratch ABI and the offset
in a user SGPR.

The lowering passes now return the LDS scratch size, which is used
by the drivers to determine the final LDS size.

The ngg_lds_layout SGPR is now unused without GS in RADV.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:41 +00:00
Marek Olšák
b1b581f855 ac/nir/lower_ngg: add an option not to export cull distances if the shader culls them
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Marek Olšák
8c04a91d12 ac/nir: rename clip_cull_mask parameter to clearer export_clipdist_mask
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Marek Olšák
ed0f393607 ac/nir/lower_ngg: rename clip_cull_dist_mask and use it correctly
We incorrectly used it to determine whether the shader should cull, which
luckily had no effect because it wasn't used everywhere.

cull_clipdist_mask should be used instead, which also reflects whether
clip planes are enabled in GL.

clip_cull_dist_mask is renamed to export_clipdist_mask to make it clear.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Marek Olšák
f6af3c0e17 ac/nir/lower_ngg: forward constant GS & XFB output components from stores to loads for LDS
This removes LDS space and loads/stores for constant GS & XFB output
components. Constant output components skip LDS stores, and LDS loads
are replaced with the gathered constants.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Marek Olšák
0ba4e3ae83 ac/nir/lower_ngg: add & use new scalar helpers for XFB loads/stores
This simplifies the code and scalarizes the loads/stores.
Scalar loads/stores will allow forwarding constant output components
from stores to loads easily.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Marek Olšák
4b6ae11207 ac/nir/lower_ngg: add & use new scalar helpers for GS loads/stores
This simplifies the code and scalarizes the loads/stores.
Scalar loads/stores will allow forwarding constant output components
from stores to loads easily.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Marek Olšák
f407129b7f ac/nir/lower_ngg_gs: cull against clip/cull distances & clip planes in GS
This is finally implemented.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35352>
2025-07-02 20:27:40 +00:00
Matt Turner
7da88c76db intel: Add support for BFloat16 as cooperative matrix accumulator
The number of passing tests in ./deqp-vk -n '*cooperative_matrix.khr*'
on PTL increases from 914 -> 1030.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35320>
2025-07-02 20:06:59 +00:00
Matt Turner
e6242fb958 brw: Handle bfloat16 dest and src0 operands for DPAS
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35320>
2025-07-02 20:06:59 +00:00
Caio Oliveira
c006bee22d brw: Don't use simd_select for BS shaders
Since there's only one possible SIMD, don't need to use
the helpers to decide which one to compile.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35799>
2025-07-02 19:48:04 +00:00
Eric Engestrom
4be493862d 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>
2025-07-02 19:21:25 +00:00
Eric Engestrom
f350803fb3 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>
2025-07-02 19:21:25 +00:00
Eric Engestrom
f06fff8148 bin/symbols-check: sort platform symbols
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
2025-07-02 19:21:25 +00:00
Eric Engestrom
3d9b76db8e bin/symbols-check: ignore version of platform symbols
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
2025-07-02 19:21:25 +00:00
Eric Engestrom
5672230c19 bin/symbols-check: ignore nm lines that don't have a symbol name
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
2025-07-02 19:21:24 +00:00
Eric Engestrom
e626636e90 bin/symbols-check: fix fields length condition before accessing fields
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
2025-07-02 19:21:24 +00:00
Eric Engestrom
f28cda029c bin/symbols-check: add missing newline before function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891>
2025-07-02 19:21:23 +00:00
Adam Jackson
6a28d6707d meson: Require LLVM 8 or newer
This isn't a huge cleanup on its own, but it lets us start assuming
coroutine support, and I would like to unify graphics shader dispatch
to work the same way as compute shader dispatch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35374>
2025-07-02 18:49:22 +00:00
Mike Blumenkrantz
c459be3795 zink: loosen heuristic for buf2img texture upload barriers
assume that any non-reordered texture upload should prepare it
for use in sampling

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:05 +00:00
Mike Blumenkrantz
403a455ae9 tc: replace gpu util_copy_box with single image_copy_buffer call
much nicer

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:05 +00:00
Mike Blumenkrantz
52216557e1 tc: use image_copy_buffer for subdata uploads instead of resource_copy_region
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:05 +00:00
Mike Blumenkrantz
da16c9ad90 zink: implement image_copy_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:04 +00:00
Mike Blumenkrantz
c25e31392a zink: rework zink_copy_image_buffer()
this now takes less confusing params

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:04 +00:00
Mike Blumenkrantz
8b8a06f6c3 gallium: add pipe_context::image_copy_buffer
this is a more explicit version of the copying used in resource_copy_region
which also provides stride info

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35769>
2025-07-02 18:20:03 +00:00
Mike Blumenkrantz
f946167e30 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>
2025-07-02 18:20:02 +00:00
Charlotte Pabst
be6b49449c 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>
2025-07-02 17:42:35 +00:00
Samuel Pitoiset
10ef9c6a80 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>
2025-07-02 17:21:58 +00:00
Samuel Pitoiset
7017b25d6a 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>
2025-07-02 17:21:58 +00:00
Eric Engestrom
834389dbde docs: add sha sum for 25.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35890>
2025-07-02 17:17:34 +00:00
Eric Engestrom
40cb317c11 docs: add release notes for 25.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35890>
2025-07-02 17:17:34 +00:00
Eric Engestrom
3387beff79 docs: update calendar for 25.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35890>
2025-07-02 17:17:34 +00:00
David Neto
673f684ddd nir: Support printing cmat constants
A cooperative matrix can only be constructed from a single
scalar value. Print that value, wrapped by a function call that
looks like a type-constructor.

This adds a test case that will otherwise assert out in spirv2nir.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35757>
2025-07-02 16:48:51 +00:00
Faith Ekstrand
bb3274f0d8 nvk: Pass the pipe_format to copy_remap_format()
This changed in 76c6157902f1 ("nil/copy: Base swizzling on the per-plane
pipe_format") but I missed the case for linear render targets.

Fixes: 76c6157902f1 ("nil/copy: Base swizzling on the per-plane pipe_format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35887>
2025-07-02 16:31:43 +00:00
Caio Oliveira
c733f07378 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>
2025-07-02 15:32:23 +00:00
Sergi Blanch-Torne
8911437038 ci: crnm: review argument metavar and type
Check the arguments to have a consistent definition of metavars to control the
string shown, and have them all lowercase. Also define the types expected on
those arguments.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35828>
2025-07-02 15:13:55 +00:00
Sergi Blanch-Torne
c3f4b1a7db ci: crnm: rev argument for tags and branches
The --rev argument mentions that it accepts a git revision. I think it would
be practical to describe that it accepts a commit id, as well as a tag or
branch name.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35828>
2025-07-02 15:13:55 +00:00
Rob Clark
4ecd9ec268 dri: Remove plane info for RGB formats
This is only used for YUV formats, so simplify the format table.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:27 +00:00
Rob Clark
092bafe2ec dri: Don't iterate the planes for non-YUV
Don't iterate the planes in dri2_format_mapping if the format is RGB.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:26 +00:00
Daniel Stone
4aaf431a11 dri: Garbage-collect old DRI interfaces
We don't use these in the tree, so declaring them only adds to
misdirection and annoyance.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:26 +00:00
Rob Clark
82a6f19fdb dri: Remove unused prototype
Fixes: 3a51865faa ("dri: use plane format directly")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:26 +00:00
Daniel Stone
4d61e281ea dri2: Remove format components mapping
This was only used to answer the DRI components attrib request, which
was made unused as of the previous commit to move knowledge of the enum
to wayland-drm server-side code.

In theory, this makes the format mapping a little less flexible, however
in practice wayland-drm was neither extensible nor extended, and has
been deprecated in favour of explicit user awareness of format
properties.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:25 +00:00
Daniel Stone
2bf50a2b31 egl/wayland: Move EGL components to wayland-drm
wayland-drm is the bit of EGL which implements
EGL_WL_bind_wayland_display, used as a legacy path by pre-dmabuf Wayland
compositors to handle buffer exchange with clients. This allows the
client (platform_wayland) and server (wayland-drm) sides to negotiate
buffer exchange behind the scenes.

In this model, the server is unaware of what the format means and how it
should be bound to an image, so we have to query how the image should be
set up, bound to textures, and sampled. To do this, they have to query
the EGL implementation to find out.

We had a bunch of generic DRI infrastructure to support this, but now
that the DRI interface is no longer a hard one, and wl_drm is deprecated
in favour of dmabuf anyway, we can get rid of a lot of this
pseudo-generic support code.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:25 +00:00
Daniel Stone
87f81dc8b0 egl/wayland: Remove unnecessary plane validity check
dri2_from_planar() already checks the number of planes for us.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35856>
2025-07-02 14:35:25 +00:00
Sergi Blanch-Torne
e99236bad4 ci: crnm: extend it to work with other instances
ci-run_n_monitor tool can work with more projects than Mesa. It would be split
to its own repo with transparent access from the scripts in Mesa. But
meanwhile, this simple change allows using more GitLab instances than the
default gl.fd.o.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35826>
2025-07-02 14:11:45 +00:00
Eric Engestrom
e4c7a4b6a5 ci-tron: add ci-tron-arm64-test-{asan,ubsan}-{gl,vk} job templates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35883>
2025-07-02 14:42:40 +02:00
Eric Engestrom
8d0edd4be5 broadcom/ci: move job timeout definitions to jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35883>
2025-07-02 14:42:40 +02:00
Mike Blumenkrantz
b61e6b9748 zink: enable ioopt by default
cts is fixed, so this should be fine

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31935>
2025-07-02 11:22:58 +00:00
Connor Abbott
0c37d9abdf tu: Remove now-redundant tu_trace_render_pass_start()
It's now called at tu_cmd_render() time, so we don't need any special
handling for merged render passes. I missed this call when rewriting it.

Fixes: 630380349b ("tu: Give renderpass events a separate trace buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35868>
2025-07-02 10:30:49 +00:00
Rhys Perry
dce1d4ad4c 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>
2025-07-02 09:26:04 +00:00
Erik Faye-Lund
e2a2663638 panfrost: disable 16x MSAA on t760 before r1p0
Versions prior to the r1p0 revision of Mali-T760 has a bug that prevents
16x MSAA from working properly. Let's detect this GPU, and disable the
functionality for it.

It's a bit awkward that we can't easily do this as part of the pan_model
infrastructure, but we'd otherwise have to introduce a new quirk that
depends on the GPU revision, which isn't something the current pan_model
infrastructure is prepared for. So let's just do it in get_max_msaa()
instead.

And while we're at it, let's also make the max_4x_msaa quirk do the
MIN2() properly. This can currently only happen on V4 GPUs when the
pan_allow_128bit_rts_v4 driconf is enabled, but it should be fixed in
either case.

Fixes: 423f3fd485 ("panfrost: enable 8x and 16x msaa modes when supported")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35871>
2025-07-02 09:05:39 +00:00
Lionel Landwerlin
343f3dd3c1 brw: fix non constant BTI accesses with offsets
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e103afe7be ("brw: run the nir_opt_offsets pass and set the maximum offset size")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35822>
2025-07-02 01:04:06 +03:00
Iván Briano
5b58b838fe 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>
2025-07-01 21:40:44 +00:00
Sagar Ghuge
5f31e6b286 anv: Drop unused anv_rt_bvh_build_method enum
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35848>
2025-07-01 20:00:35 +00:00
Rob Clark
6bc47e65d7 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>
2025-07-01 18:55:01 +00:00
Rob Clark
c417b83f19 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>
2025-07-01 18:55:01 +00:00
Yiwei Zhang
83ae6393e5 virtio/ci: update AHardwareBufferNativeTests expectations
The Blob_BlobTest_* tests should have been fixed by the updated CF
image in 5ac532bfc7.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35865>
2025-07-01 18:28:58 +00:00
Dylan Baker
2e2826d121 meson: use .enable_if for intel tools dependency on expat
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35840>
2025-07-01 17:40:03 +00:00
Dylan Baker
66a30385fe meson: change RadV dependency on LLVM to an ACO tests dependency
RadV itself doesn't require LLVM, only the ACO tests do. So stop
requiring LLVM for ACO without its tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35840>
2025-07-01 17:40:03 +00:00
Dylan Baker
39ccd7899c meson: use feature options for LLVM
This allows us to get better error messages in cases where LLVM has been
explicitly disabled but not found, as well making use of the feature
object for the required argument to dependency. This in turn can give
better error messages when the object is used incorrectly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35840>
2025-07-01 17:40:03 +00:00
Eric Engestrom
ec97eadc9f ci: fix yamllint warnings about whitespace
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35857>
2025-07-01 16:17:13 +00:00
Eric Engestrom
e149cba160 ci: make sure that sanity job must pass before running other jobs
An unintended consequence of !35203 is that when container jobs are not
there, nothing depends on the `sanity` job anymore.

Fix this by making all the jobs using a container image we generate also
depend on `sanity` through the `.use-$distro/$variant` templates.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35857>
2025-07-01 16:17:12 +00:00
Yiwei Zhang
a5762997da venus: support AHB storage image format
R8 + GPU_DATA_BUFFER has been added to support AHB backed storage image
for compute use cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35845>
2025-07-01 15:34:10 +00:00
Valentine Burley
5ac532bfc7 ci/android: Update Cuttlefish image
Main changes:
- Use hwcomposer=drm for venus_guest_angle instead of ranchu
- Cherry pick an upstream change in external/minigbm
  https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6691931

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35786>
2025-07-01 14:50:55 +00:00
Valentine Burley
26bd1df9bf virtio/ci: Run additional VKCTS tests on Cuttlefish with Venus+ANV
Extend the deqp-runner suite to run a fractional set of VKCTS tests
on Cuttlefish with Venus on ANV. This involved:

- Introducing a skip list for tests incompatible with this setup
- Increasing the parallelism of the pre-merge job on CML

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35786>
2025-07-01 14:50:54 +00:00
Rhys Perry
21c4400278 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>
2025-07-01 14:31:11 +00:00
Job Noorman
329d47421b ir3/isa: ignore bit 54 in alias encoding
Recent versions of the blob started generating alias instructions with
bit 54 unset. The blob's disassembler doesn't seem to care about this
bit so let's ignore it as well.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35827>
2025-07-01 14:07:59 +00:00
Feng Jiang
7cffd3818f mesa/st: Fix potential array out-of-bounds in st_bind_hw_atomic_buffers()
The value of MaxAtomicBufferBindings comes from the driver
and may exceed PIPE_MAX_HW_ATOMIC_BUFFERS, causing an array
out-of-bounds issue.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35730>
2025-07-01 13:47:09 +00:00
Feng Jiang
ac6dddb850 virgl: Make max_hw_atomic_counter_buffers less than PIPE_MAX_HW_ATOMIC_BUFFERS
The values of gl_constants.MaxAtomicBufferBindings and
gl_program_constants.MaxAtomicBuffers are derived from
pipe_shader_caps.max_hw_atomic_counter_buffers, which is
synchronized with the host's GL_MAX_*_ATOMIC_COUNTER_BUFFERS.

Based on the definition of struct virgl_context and other
factors, the current virgl driver can only support a maximum
of 32 atomic buffers. If no restrictions are imposed on
pipe_shader_caps.max_hw_atomic_counter_buffers, an error like
the following will occur in the vm when the host's
GL_MAX_*_ATOMIC_COUNTER_BUFFERS exceeds 32.

  Thread 1 "glmark2-drm" received signal SIGABRT, Aborted.
  Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
  warning: 44	./nptl/pthread_kill.c: No such file or directory
  #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
  #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
  #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
  #3  0x00007ffff784527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
  #4  0x00007ffff78288ff in __GI_abort () at ./stdlib/abort.c:79
  #5  0x00007ffff782881b in __assert_fail_base (fmt=0x7ffff79d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
  assertion=assertion@entry=0x7ffff63f686a "start + count <= 32", file=file@entry=0x7ffff63f6854 "../src/util/
  bitscan.h", line=line@entry=306, function=function@entry=0x7ffff6d4c020 <__PRETTY_FUNCTION__.16> "u_bit_cons
  ecutive") at ./assert/assert.c:96
  #6  0x00007ffff783b517 in __assert_fail (assertion=assertion@entry=0x7ffff63f686a "start + count <= 32", file
  =file@entry=0x7ffff63f6854 "../src/util/bitscan.h", line=line@entry=306, function=function@entry=0x7ffff6d4c020
  <__PRETTY_FUNCTION__.16> "u_bit_consecutive") at ./assert/assert.c:105
  #7  0x00007ffff5250ef5 in u_bit_consecutive (count=48, start=0) at ../src/util/bitscan.h:306
  #8  0x00007ffff5252337 in u_bit_consecutive (count=48, start=0) at ../src/gallium/auxiliary/util/u_inlines.h:75
  #9  virgl_set_hw_atomic_buffers (ctx=<optimized out>, start_slot=0, count=48, buffers=0x7fffffffd9b0) at ../src/
  gallium/drivers/virgl/virgl_context.c:1351
  #10 0x00007ffff4a58faf in st_bind_hw_atomic_buffers (st=<optimized out>) at ../src/mesa/state_tracker/st_atom_
  atomicbuf.c:168
  #11 0x0000000000000000 in ?? ()

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35730>
2025-07-01 13:47:09 +00:00
Christoph Pillmayer
c7cb7b7dc3 panvk: Advertise VK_KHR_calibrated_timestamps
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35510>
2025-07-01 12:52:41 +00:00
Christoph Pillmayer
4d5f0f6ee2 panvk: Implement VK_KHR_calibrated_timestamps
Add entrypoints for calibrated timestamps.

Co-authored-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/35510>
2025-07-01 12:52:41 +00:00
Christoph Pillmayer
fb38f10240 panvk: Handle IUBs in decoder
When we encode inline uniform data into the descriptor table, we should
skip the descriptors that are actually data instead of real descriptors.
Let's do that and also print the inlined data for convenience.

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/35831>
2025-07-01 12:34:41 +00:00
Valentine Burley
54c967cb76 ci: Fix location of conditional build tags
This allows the components to be found again after the move in
d5c63dd292 ("ci: split long containers build yaml").

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35851>
2025-07-01 10:41:14 +00:00
Jose Maria Casanova Crespo
0f8c681c5c 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>
2025-07-01 09:18:31 +00:00
Christoph Pillmayer
7bf7d8c884 panvk: Advertise timestamp support
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:48 +00:00
Christoph Pillmayer
369b3826fd panvk: Add timestamp copy
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:29 +00:00
Christoph Pillmayer
92c4dfe6ea panvk: Add timestamp write and reset
Timestamps are made up of multiple results from the different subqueues,
decided by the target stage for the timestamp. Afterwards, when the
timestamp query is copied, those individual results will be combined
into the final result.
For the computation of the final result, each timestamp query also has
a separate info field, containing the info required to perform the copy.

Timestamps inside a renderpass which cover the fragment subqueue need
to be deferred until after the RUN_FRAGMENT job. This happens via a linked
list of timestamps in the subqueue context.

Once in each primary command buffer, the syncobjs of the queries completed
so far are signalled. The list of those queries is part of the subqueue
context as well.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:29 +00:00
Christoph Pillmayer
a472dd8518 panvk: Move get_subqueue_stages to header
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:29 +00:00
Christoph Pillmayer
0be3958159 panvk: Add conditional wait in emit_barrier
This makes it possible to choose, at runtime, to skip the wait in the
dst subqueue of the barrier.
This is needed to remove unnecessary dependencies between subqueues when
no timestamp queries are used.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:29 +00:00
Christoph Pillmayer
658550bcc6 panvk: Rename reset_oq_batch
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:29 +00:00
Christoph Pillmayer
eb6f591fd6 panvk: Pull CSF barrier logic into separate function
This makes it easier to implement internal syncs between subqueues later
in this MR.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
2025-07-01 08:27:29 +00:00
Erico Nunes
ccff24ba09 lima: drop lima_surface
With the previous refactors, lima_surface no longer contains
driver-specific info. And with recent refactors in mesa,
lima_surface_create is also no longer needed.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35749>
2025-07-01 08:03:03 +00:00
Erico Nunes
cfbb2b590b lima: drop util_framebuffer_init usage
It is marked deprecated together with PIPE_FB_SURFACES.
This refactors the code so that it is not needed.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35749>
2025-07-01 08:03:03 +00:00
Erico Nunes
972da604dc lima: move reload flags from surface to resource
This is in preparation to remove lima_surface.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35749>
2025-07-01 08:03:03 +00:00
Erico Nunes
87e990ec56 lima: handle luminance and intensity pixel formats
These need to be handled when passing formats from pipe_resource
instead of pipe_surface.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35749>
2025-07-01 08:03:03 +00:00
Erico Nunes
bae978d3eb lima: drop tiled_w and tiled_h from lima_surface
These were written but not used anywhere.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35749>
2025-07-01 08:03:03 +00:00
Erico Nunes
4b80ae8c8d lima: drop unused fields from lima_context_framebuffer
These are duplicated in lima_job_fb_info and not used from
lima_context_framebuffer at all, so can just be dropped.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35749>
2025-07-01 08:03:02 +00:00
Yiwei Zhang
09eda329a2 venus: filter out vulkan video feature bits on common video formats
Tested with ANV_DEBUG=video-decode,video-encode:
- dEQP-VK.api.info.format_properties.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35842>
2025-07-01 07:25:58 +00:00
Samuel Pitoiset
71397a8162 radv/meta: stop allocating sampler for blit operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35790>
2025-07-01 08:58:03 +02:00
Samuel Pitoiset
ba8bd13a14 radv: rework initializing/finishing samplers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35790>
2025-07-01 08:58:02 +02:00
Samuel Pitoiset
b4ea1c37ad vulkan/runtime: add vk_sampler_{init,finish}() helpers
RADV will use them to initialize samplers with no allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35790>
2025-07-01 08:54:04 +02:00
Wenfeng Gao
d81e5c5aa3 mediafoundation: Modify the helper function MFAttachPipeResourceAsSampleExtension to tell MF that the attached IMFMediaBuffer is ready to use.
With this change, application can use Lock() to get the buffer.

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35836>
2025-06-30 23:37:30 +00:00
Timothy Arceri
2ca46c7a7a 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>
2025-06-30 23:04:57 +00:00
Timothy Arceri
94032b2298 dri: add missing field to dri2_dup_image()
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35814>
2025-06-30 23:04:57 +00:00
Timothy Arceri
3a51865faa dri: use plane format directly
Since 7e10601786 we not longer need the table we can just use
the formats directly.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35814>
2025-06-30 23:04:57 +00:00
Faith Ekstrand
3853f72f52 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>
2025-06-30 21:00:22 +00:00
Faith Ekstrand
2feedeeecb nak: Don't se .yld or .reuse_mask on Blackwell+
These appear to be gone and everything works without setting them so
let's just treat them like missing bits for now.  According to the CUDA
12.8 disassembler, they still do something but it's not the same thing
they did before and I don't have docs to tell me what they really do.
Best to just not set them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
2025-06-30 21:00:21 +00:00
Dave Airlie
1f990187ca nvk: add support for separate depth/stencil for blackwell
Blackwell uses separate ds storage on blackwell for d32s8,
optionally for d24s8, but I've used it here because I could make it
work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
2025-06-30 21:00:19 +00:00
Faith Ekstrand
baffad9077 nvk: Allocate separate planes for depth and stencil on Blackwell+
Blackwell adds separate depth/stencil support (finally!) and interleaved
depth/stencil no longer seems to work.  We employ the same trick as ANV
and several other drivers and put stencil in nil_image::planes[1].

Co-authored-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
2025-06-30 21:00:19 +00:00
Faith Ekstrand
d396544fe1 nvk: Allow sparse binding of YCbCr images
We support sparse binding, just not sparse residency.  While we're here,
we change the check to plane_count > 1, which is the real requirement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
2025-06-30 21:00:19 +00:00
Faith Ekstrand
13afd66d78 nvk: Use util_format_stencil_only()
There's no reason to roll our own since the util helpers already have
exactly that function.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
2025-06-30 21:00:19 +00:00
Faith Ekstrand
db80cb3a04 nil/copy: Base swizzling on the per-plane pipe_format
Among other things, this actually descriptive of the in-memory layout
whereas the VkFormat can sometimes map to multiple pipe_formats.  Also
fix a couple harmless typos while we're here and add some unreachable
cases so packed depth/stencil formats don't fall through to the default
case if we support them in future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35843>
2025-06-30 21:00:19 +00:00
Alyssa Rosenzweig
3c2f46fcac treewide: use nir_break_if with named if
Via Coccinelle patch:

    @@
    expression builder, condition;
    identifier nif;
    @@

    -nir_if *nif = nir_push_if(builder, condition);
    -{
    -nir_jump(builder, nir_jump_break);
    -}
    -nir_pop_if(builder, nif);
    +nir_break_if(builder, condition);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35794>
2025-06-30 14:51:54 -04:00
Alyssa Rosenzweig
67237b6f1b treewide: use nir_break_if
Via Coccinelle patch:

    @@
    expression builder, condition;
    @@

    -nir_push_if(builder, condition);
    -{
    -nir_jump(builder, nir_jump_break);
    -}
    -nir_pop_if(builder, NULL);
    +nir_break_if(builder, condition);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35794>
2025-06-30 14:51:24 -04:00
Karol Herbst
9c47461889 rusticl/formats: support cl_ext_image_unorm_int_2_101010
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35469>
2025-06-30 18:04:59 +00:00
Karol Herbst
54b11069d1 rusticl/formats: support CL_UNORM_INT_101010_2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35469>
2025-06-30 18:04:59 +00:00
Karol Herbst
b3c245ecf2 clc: add support for cl_ext_image_unorm_int_2_101010
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35469>
2025-06-30 18:04:59 +00:00
Alyssa Rosenzweig
7fd7b18b38 nir: rename AGX geom/tess intrinsics
to the new common code name.

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/35802>
2025-06-30 16:24:10 +00:00
Alyssa Rosenzweig
d13b321201 nir/lower_gs_intrinsics: drop stuff added for AGX
AGX now vendors a significantly different version of this pass, so the common
one doesn't need the stuff added for AGX.

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/35802>
2025-06-30 16:24:10 +00:00
Alyssa Rosenzweig
debd619555 hk: optimize point size writes with GS/TS
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/35802>
2025-06-30 16:24:07 +00:00
Alyssa Rosenzweig
279b7c028b hk: advertise more GS features
new impl handles 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/35802>
2025-06-30 16:24:07 +00:00
Alyssa Rosenzweig
1f7fe678e7 asahi,hk: significantly rework GS
get rid of the rasterizer discard variants, by pushing XFB into the hardware VS
and letting everything cascade down from there. that then means hardware VS runs
for all streams, which means we get dynamic rasterization stream selection.

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/35802>
2025-06-30 16:24:07 +00:00
Alyssa Rosenzweig
03a5b7f25c 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>
2025-06-30 16:24:07 +00:00
Alyssa Rosenzweig
933b50b806 asahi: clang-format
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/35802>
2025-06-30 16:24:06 +00:00
Alyssa Rosenzweig
700ee568e0 libagx: add agx_vdm_barrier
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/35802>
2025-06-30 16:24:06 +00:00
Alyssa Rosenzweig
16b53d356a nir: add rasterization_stream sysval
for plumbing transformFeedbackRasterizationStreamSelect (in turn for exercising
more CTS and proving out my design).

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/35802>
2025-06-30 16:24:06 +00:00
Alyssa Rosenzweig
805ef6cc17 nir: add intrinsics for geometry shader lowering
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/35802>
2025-06-30 16:24:05 +00:00
Alyssa Rosenzweig
4f7cae5e61 nir/opt_algebraic: add trichotomy identity
In https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35802 we will
significantly rework geometry shaders & transform feedback. In the new approach,
transform feedback is executed as part of the hardware vertex shader, meaning
the vertex shader needs to write out all the "copies" of the same value into
different parts of the XFB buffer. In the general case of a GS writing triangle
strips, we get 0-3 copies. This is good and lets us parallelize XFB better with
GS.

In the case of a VS alone with XFB, we insert a passthrough GS. In that case
special case, we can only get at most 1 copy, so if we can prove the length of
the output strip is 3 we can delete 2/3 of the shader.

Anyway, the only thing preventing NIR from doing that optimization is failing to
see through some conditionals, fixed by optimizing with the law of trichotomy.

We could add other variants of this pattern (signed vs unsigned, iand vs
ior/ixor) if we expect anything else to hit this other than my boutique use
case.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35802>
2025-06-30 16:24:04 +00:00
Yiwei Zhang
153857fb64 vulkan/wsi: amend barriers for blit dst buffer going to foreign queue
The prime blit dst buffer can be backed by external memory, no matter
host ptr shm or dma-buf export alloc. Whether the external path is taken
is only decided upon blit ctx creation time, so we have to track whether
external in the wsi_image. When the external path is taken, we have to
explicitly handle queue family ownership transfer from internal to
foreign. To be noted, no explicit foreign to internal ownership transfer
is needed since the blit dst content can be left undefined.

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35034>
2025-06-30 16:03:26 +00:00
Yiwei Zhang
f6bf5d9a3e vulkan/wsi: amend barriers for blit dst buffer
For non-external blit dst buffer, it's bliting the wsi image to a buffer
with mapping populated by vkMapMemory, and it's shared via xcb_put_image
for x11 or memcpy into a shared wl_buffer backed by shm. So we need
additional host stage and host access bit to ensure proper cache flush.
There's no queue family ownership transfer needed.

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35034>
2025-06-30 16:03:24 +00:00
Jesse Natalie
7f4ae75903 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>
2025-06-30 15:13:54 +00:00
Karol Herbst
4b43780bbd rusticl/queue: fix wrong_self_convention and needless_borrow clippy warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35834>
2025-06-30 14:17:33 +00:00
Mike Blumenkrantz
9482ad212d tc: don't reuse first rp info on batch if there is work pending
this otherwise causes a mismatch if drivers try to access previous info
during a set_framebuffer_state call (e.g., to flush clears)

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35777>
2025-06-30 13:51:42 +00:00
Sergi Blanch-Torne
f0c58518cc ci: reduce the root .gitlab-ci file
Following the idea to distribute in a tree of files to include and split
between the files with or without hidden job definitions, some jobs in the
root file can be moved to files made specific to describe build or test jobs.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35427>
2025-06-30 12:32:30 +00:00
Valentine Burley
6508c6038f ci: Use placeholder-job for mr-label-maker-test
This is a quick job using the .fdo.ci-fairy image.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35427>
2025-06-30 12:32:30 +00:00
Sergi Blanch-Torne
396074c59d ci: split hidden job definition for bare-metal and ci-tron
The job definitions for lava-related jobs are encapsulated in a directory,
while the other two farm managers were in the generic test directory. Having a
directory for ci-tron places it side by side with other farm managers. For
bare-metal, it has another advantage, as this encapsulates elements related to
this farm manager in a single place.

To maintain simplicity and consistency in file naming, the gitlab-ci file in
the lava directory is renamed as it has a prefix that corresponds with the
directory hosting it. The other farm equivalent files don't include this
duplication as a prefix, and there isn't such a prefix in any other case of
the CI.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Acked-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35427>
2025-06-30 12:32:30 +00:00
Sergi Blanch-Torne
d5c63dd292 ci: split long containers build yaml
The yaml file for the definitions for container build on different systems can
have a split between systems before split between hidden and build jobs.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Acked-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35427>
2025-06-30 12:32:29 +00:00
Sergi Blanch-Torne
6ba1b61395 ci: separate hidden jobs to -inc yml files
Almost all the gitlab-ci.yml files in Mesa have their hidden jobs defined in
an include file. This may have started with !25238 with the idea to simplify
the re-use of hidden jobs by other projects. But we missed the .gitlab-ci
directory.

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Acked-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35427>
2025-06-30 12:32:29 +00:00
Eric Engestrom
ff6925c34b ci/build: use !reference to build scripts instead of yaml anchors
Needed for the next commit

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35427>
2025-06-30 12:32:29 +00:00
Robert Mader
a166d7609f gles: Add support for 10/12/16 bit SW decoder YCbCr formats
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Co-Authored-by: Daniel Stone <daniels@collabora.com>
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/34303>
2025-06-30 11:56:23 +00:00
Robert Mader
76095b2cb0 mesa/formats: Add support for 10 and 12 bit SW decoder YCbCr formats
Matching e.g. I420_10LE in Gstreamer / yuv420p10 in ffmpeg. The formats
are notably used for HDR10 videos by software decoders like dav1d, libav,
libaom and libvpx.

Use-cases include video players and editors that can allocate DMA buffers
- e.g. via udmabuf, dma-heaps, VA-API, V4L2, etc. - allowing them to avoid
unnecessary copies. Testing HDR10 playback on CI might also become easier.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
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/34303>
2025-06-30 11:56:23 +00:00
Robert Mader
df09c3b0e7 drm-uapi: update drm_fourcc.h to latest version
Taken from commit e252e3f3488 of the drm-misc-next kernel tree,
including the new 10/12/16bit software decoder YCbCr formats.

These have also been pulled into the libdrm 2.4.125 release.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
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/34303>
2025-06-30 11:56:23 +00:00
David Rosca
25a2c9116c radeonsi/vcn: Stop forcing OBU frame for first frame on VCN4
This has effect only for first frame, for every other frame it will
be overwritten by application preference, which we should honor.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35712>
2025-06-30 11:17:55 +00:00
Rhys Perry
7b291a33d4 nir/search: fix dumping of conversions
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/35770>
2025-06-30 10:41:39 +00:00
Rhys Perry
08859cbe50 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>
2025-06-30 10:41:39 +00:00
Valentine Burley
9a25d6c00f ci/android: Add link to Android CTS results
The Android CTS results are saved as an HTML page in the CI artifacts.
Add a direct link to make them easier to access.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35792>
2025-06-30 10:15:15 +00:00
Valentine Burley
f56be74be6 ci/android: Add separate log section for Android CTS
The Android CTS logs were previously buried under the `cuttlefish: setup`
section. Add an uncollapsed section to improve visibility.

Also remove the `gathering the results` section, which was empty in the logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35792>
2025-06-30 10:15:15 +00:00
Valentine Burley
6203846120 ci/android: Move sourcing setup-test-env.sh before set -uex
This prevents printing the various aliases and exports, and cleans up the
job logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35792>
2025-06-30 10:15:15 +00:00
Christoph Pillmayer
a611ab7895 panvk: Propagate occ query state from secondary to primary
When we ExecuteCommands, we can have the following situation:

secondary {
   beginQuery
   endQuery
}

primary {
   beginRendering
   executeCommands(secondary)
   endRendering
}

See dEQP-VK.query_pool.concurrent_queries.secondary_command_buffer.

For the logic in EndRendering to correctly detect that an occlusion
query has ended inside this render pass, the oq state has to be
propagated back to the primary from the secondary.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35738>
2025-06-30 09:51:52 +00:00
Christoph Pillmayer
5cf456a028 panvk: Handle occlusion queries + multiview
If an occlusion query is started inside a renderpass with multiview, we
need to signal as many queries as there are bits set in the view mask.

It is enough to signal them, we don't have to change how we write the
occlusion query. All but the first of the n queries will return 0.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35738>
2025-06-30 09:51:52 +00:00
Alejandro Piñeiro
0f830c5572 v3d/compiler: properly handle the RA debug option
RA is intended to dump the vir when register allocation fails, so it
should be checked when we set c->compilation_result to
FAILED_REGISTER_ALLOCATION.

But it seems that this option was forgotten when on some of the
refactorings around compilation_result, as was let on an old condition
that reported register allocation failures.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35823>
2025-06-30 09:36:04 +00:00
Corentin Noël
c5b42a2ae4 virgl: Add more Gallium formats to the list
Include the recently added formats.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35741>
2025-06-30 09:04:43 +00:00
Samuel Pitoiset
68708cd4da radv/ci: uprev kernel to 6.15.3
NAVI21/NAVI31 still uses 6.6 for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35765>
2025-06-30 08:10:47 +02:00
Lionel Landwerlin
89f3ee4cb2 brw: remove debug printf
Fixes: fcf4401824 ("brw: handle wa_18019110168 with independent shader compilation")
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/35815>
2025-06-29 12:39:03 +03:00
Yiwei Zhang
3f1d40d230 venus: wsi workaround for gamescope
Gamescope relies on legacy scanout support when explicit modifier isn't
available and it chains the mesa wsi hint requesting such. Venus doesn't
support legacy scanout with optimal tiling on its own, so venus disables
legacy scanout in favor of prime buffer blit for optimal performance. As
a workaround here, venus can once again force linear tiling when legacy
scanout is requested outside of common wsi.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35811>
2025-06-28 17:52:40 -07:00
Yiwei Zhang
c5d1392a10 venus: share code for AHB image subres query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35810>
2025-06-28 23:16:58 +00:00
Yiwei Zhang
d45b76c3cc venus: drop tiling_override tracking
It used to serve 2 purposes:
1. aliased swapchain image
2. faked legacy scanout support

...and now can be cleaned up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35810>
2025-06-28 23:16:58 +00:00
Yiwei Zhang
a96d7cdbc0 venus: drop drm_format_modifier tracking
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35810>
2025-06-28 23:16:58 +00:00
Yiwei Zhang
0db7818b87 venus: use wsi_common_create_swapchain_image
We no longer need to do our own since the chain has the info stored for
the common helper.

Test:
- dEQP-VK.wsi.*.swapchain.create.*
- dEQP-VK.wsi.*.maintenance1.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35810>
2025-06-28 23:16:57 +00:00
Calder Young
646977348b 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>
2025-06-28 20:39:18 +00:00
Yiwei Zhang
cb54338f65 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>
2025-06-28 20:25:23 +00:00
Mel Henning
8795006994 nir/opt_uniform_subgroup: Handle vote_feq
Brings the vertex shader in
dEQP-VK.subgroups.vote.framebuffer.subgroupallequal_dvec4_vertex
from 234 to 169 instructions on NAK.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
2025-06-28 16:10:50 +00:00
Mel Henning
70fccc59fc nir/opt_uniform_subgroup: Handle vote_ieq
No shader-db changes here, but it does improve some cts shaders, eg. the
vertex shader in
dEQP-VK.subgroups.vote.framebuffer.subgroupallequal_i64vec4_vertex
goes from 80 to 56 instructions with NAK

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
2025-06-28 16:10:50 +00:00
Mel Henning
ff0a69efd7 nak: Call nir_opt_uniform_subgroup
Totals:
CodeSize: 4534711024 -> 4436632608 (-2.16%); split: -2.16%, +0.00%
Number of GPRs: 10963687 -> 10964035 (+0.00%); split: -0.00%, +0.00%
Static cycle count: 1097514100 -> 1057410000 (-3.65%)
Spills to reg: 242139 -> 242168 (+0.01%); split: -0.01%, +0.02%
Fills from reg: 222030 -> 222061 (+0.01%); split: -0.00%, +0.01%
Max warps/SM: 7245564 -> 7245484 (-0.00%); split: +0.00%, -0.00%

Totals from 52240 (26.58% of 196502) affected shaders:
CodeSize: 1982406064 -> 1884327648 (-4.95%); split: -4.95%, +0.00%
Number of GPRs: 3861735 -> 3862083 (+0.01%); split: -0.00%, +0.01%
Static cycle count: 484309374 -> 444205274 (-8.28%)
Spills to reg: 24327 -> 24356 (+0.12%); split: -0.07%, +0.18%
Fills from reg: 12675 -> 12706 (+0.24%); split: -0.02%, +0.26%
Max warps/SM: 1417372 -> 1417292 (-0.01%); split: +0.00%, -0.01%

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
2025-06-28 16:10:50 +00:00
Mel Henning
694523e2b9 nak: Implement nir_intrinsic_vote_ieq with OpMatch
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
2025-06-28 16:10:50 +00:00
Mel Henning
10acb44c64 nir: Split lower_vote_eq into int/float versions
Recent nvidia hardware has a native instruction for
nir_intrinsic_vote_ieq but not for nir_intrinsic_vote_feq. So, split
this boolean into two so we can contol the lowering separately for each
instruction.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
2025-06-28 16:10:50 +00:00
Mel Henning
00fe8e45a0 nak: Add OpMatch
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35778>
2025-06-28 16:10:49 +00:00
Valentine Burley
ef6273c43c ci: Fix artifact name for jobs with parallel indices
GitLab mangled artifact filenames when `CI_JOB_NAME` contained a slash
(e.g. 1/4), resulting in broken names like `4.zip`.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13424
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35796>
2025-06-28 14:59:58 +00:00
Natalie Vock
e236a731e4 radv/rt: Enable pointer flags on GFX11+
Allows hardware to do some of the culling work, as well as early-cull
box nodes with CullOpaque/CullNonOpaque ray masks when all children are
(not) opaque.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32417>
2025-06-28 10:31:38 +00:00
Natalie Vock
e82717a5cf radv: Use common helper to set BLAS node pointer flags on gfx11+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32417>
2025-06-28 10:31:38 +00:00
Natalie Vock
06a06bbe09 radv: Encode child opaqueness information in box nodes
Also, use one reserved field from the header to store the root node's
opaqueness flags. This is used to propagate opaqueness info across the
BLAS/TLAS boundary.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32417>
2025-06-28 10:31:37 +00:00
Natalie Vock
3b1f94d00d radv: Encode child opaqueness information in triangle nodes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32417>
2025-06-28 10:31:37 +00:00
Natalie Vock
7301e92d49 vulkan/runtime/bvh: Propagate opaqueness information through the BVH
AMD hardware can early-cull box nodes if all leaves are either opaque or
not and the ray flags are set to discard (non-)opaque geometries. This
works even across TLAS/BLAS boundaries.

Propagate info on whether all child nodes are opaque or not through the
BVH to allow RADV to set these flags per box node.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32417>
2025-06-28 10:31:37 +00:00
Marek Olšák
6afa638b18 ac/nir/lower_ngg: rename user_clip_plane_enable_mask -> cull_clipdist_mask
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
814990684d ac/nir/lower_ngg: pack GS outputs and XFB outputs in LDS optimally
This switches the code to the new slot offsets from ac_nir_prerast_out
instead of using a prefix bitmask over outputs_written.

The LDS layout no longer includes these:
- GS: output components that are not written by GS
- VS/TES+XFB: output components that are not written by XFB
- VS/TES+XFB: slots that are not written by XFB (this could be significant)

This is also a cleanup because it unduplicates the bitcounts.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
75b1602c14 ac/nir/lower_ngg_gs: return LDS size from the pass
instead of computing it separately. This is better because
ac_nir_lower_ngg_gs knows the final LDS size anyway, and it will be
easier to modify the size calculation this way.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
d79f28e9b3 ac/nir/lower_ngg: return LDS size for NGG VS and TES from the pass
instead of computing it separately. This is better because
ac_nir_lower_ngg_nogs knows the final LDS size anyway, and it will be
easier to modify the size calculation this way.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
7fe603ad82 radv: call gfx10_get_ngg_info after NIR lowering
It will receive LDS vertex and scratch sizes from NIR lowering passes,
so it can't be before them.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
42e98f115a radv: always use the ngg_lds_layout SGPR
This is a prerequisite for NGG lowering passes to return LDS vertex and
scratch sizes, which will lead to further simplifications. That will
require calling gfx10_get_ngg_info after radv_postprocess_nir, which means
LDS offsets are unknown when the passes are called.

This makes the 2 values no longer compile-time constants.

A later commit will remove NGG_LDS_LAYOUT_SCRATCH_BASE (the passes will
determine it), so only NGG_LDS_LAYOUT_GS_OUT_VERTEX_BASE will come from
an SGPR, though that could be removed too (non-trivially) or handled as
a relocation.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
8346469ec0 ac/nir/lower_ngg_gs: split lower_ngg_gs_intrinsic into gathering and lowering
We need to gather outputs before lowering because lowering requires that we
know the LDS vertex stride, so that we can lower output stores to LDS
stores.

The pass will determine the LDS vertex stride, not drivers.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
84e8e899cd ac/nir: add an option not to gather values in ac_nir_gather_prerast_store_output_info
This will be needed in the next commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:26 +00:00
Marek Olšák
ebdd97a993 ac/nir: add LDS layout info for GSVS and XFB to ac_nir_prerast_per_output_info
This will be used to reduce the NGG LDS size for uncompacted GS and XFB
outputs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Marek Olšák
39a9dce5fc ac/nir: add an option to pack clip/cull distance components to remove holes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Marek Olšák
6cd813810e ac/nir: add an option write_pos_to_clip_vertex to clip against POS
This enables emulating clip planes without ClipVertex via clip distances
(max 8) instead of the fixed-func hw (max 6 planes).

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Marek Olšák
3dd3f2f889 ac/nir/lower_ngg_gs: build streamout after lowering intrinsics
Streamout will require prerast info, which is gathered by
lower_ngg_gs_intrinsics.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Marek Olšák
83dc5917fe ac/nir: lower ClipVertex before all position exports
just code reordering (position exports should be at the end for perf)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Marek Olšák
c9b6a95038 ac/nir: remove the done parameter from ac_nir_export_position
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Marek Olšák
7c3760201d ac/nir/lower_ngg: never export edge flags via position exports
It has no effect, but the extra export instructions is unnecessary and
we can't gather the effective number of position exports from NIR if we
insert incorrect exports.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35351>
2025-06-28 08:20:25 +00:00
Lionel Landwerlin
a742b859bd anv: add support for handling wa_18019110168 with gfx-libs
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/35103>
2025-06-28 05:55:35 +00:00
Lionel Landwerlin
fcf4401824 brw: handle wa_18019110168 with independent shader compilation
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/35103>
2025-06-28 05:55:35 +00:00
Lionel Landwerlin
bc8d18aee2 brw: make a helper for vertex attribute offset computation
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/35103>
2025-06-28 05:55:34 +00:00
Lionel Landwerlin
8fabcd754f brw: move primitive_id_index field in fs_msaa
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/35103>
2025-06-28 05:55:34 +00:00
Lionel Landwerlin
6336cf0ea2 brw: store the remapping table for wa_18019110168 in constant data
That way it can be accessed at runtime.

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/35103>
2025-06-28 05:55:33 +00:00
Lionel Landwerlin
e1a7eb1718 brw: extract out attribute register remapping
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/35103>
2025-06-28 05:55:33 +00:00
Lionel Landwerlin
5cc66e2c8d anv/brw: move Wa_18019110168 handling to backend
We simplify the implementation by assuming the worse case, copying
entire per-vertex regions if necessary.

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/35103>
2025-06-28 05:55:32 +00:00
Lionel Landwerlin
8e7e0ef75a anv: make Wa_18019110168 deal with dynamic provoking vertex
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/35103>
2025-06-28 05:55:32 +00:00
Lionel Landwerlin
f0f4f9c566 brw: fix vertex attribute offset computation
The formula uses scalar indices (4bytes), not slots (16bytes).

We also incorrectly passed a scalar (vertex case) & slot (mesh case)
offset in the push constants. Use slots instead so that the value is
smaller and we can pack more stuff into fs_msaa_flags.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 18bbcf9a63 ("intel: introduce new VUE layout for separate compiled shader with mesh")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35103>
2025-06-28 05:55:31 +00:00
Lionel Landwerlin
4b5539a0cb brw: fix set_range on load_per_primitive_output
load intrinsics don't have range

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 18bbcf9a63 ("intel: introduce new VUE layout for separate compiled shader with mesh")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35103>
2025-06-28 05:55:31 +00:00
Rob Clark
7fd99c88b9 freedreno/a6xx: The great register renaming
Align register names to internal docs to avoid having to mentally remap
register names between the names we invented over the years and what
they are actually called.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35803>
2025-06-27 23:08:32 +00:00
Rob Clark
a8c052ca9d freedreno: Rename IBO -> UAV
Internally, adreno uses dx terminology, and calls these UAVs.  Rename to
match.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35803>
2025-06-27 23:08:31 +00:00
Rob Clark
12530fb8df freedreno/registers: Some reg64 conversion
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35803>
2025-06-27 23:08:30 +00:00
Rob Clark
f55d8fa62e freedreno/registers: Fix a couple missing variants
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35803>
2025-06-27 23:08:29 +00:00
Rob Clark
79d2014d8b freedreno/a6xx: Fix SP_CS_IBO address on a7xx
This moved to accomidate the additional BINDLESS_BASE registers, and we
overlooked that when adding a7xx support.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35803>
2025-06-27 23:08:28 +00:00
Rob Clark
029270f9c1 freedreno/decode: Add a simple util to dump csv reg list
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35803>
2025-06-27 23:08:28 +00:00
Faith Ekstrand
f6bdb8cd06 nvk/copy: Set the gob_kind for tiled copies on Blackwell+
This is needed on blackwell to deal with kind/bpp interactions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35807>
2025-06-27 21:52:08 +00:00
Dave Airlie
a428835681 nouveau/headers: add a hacked up clc9b5 dma-copy
This adds some hacked up dma-copy bits needed for blackwell
until nvidia can release the class.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35807>
2025-06-27 21:52:08 +00:00
Faith Ekstrand
6594a11dfe nil: Remove some unused renames from cbindgen.toml
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35807>
2025-06-27 21:52:07 +00:00
Faith Ekstrand
50a0f9bd88 nil: Add a new GOBType for Z24 on Blackwell+
It's a different memory layout from Ada and earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35807>
2025-06-27 21:52:07 +00:00
Faith Ekstrand
f6ff11a594 nil: Reorder the checks in GOBType::choose() again
Match on HW generation first.  Blackwell is so totally different that it
doesn't make sense to share any code with the others.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35807>
2025-06-27 21:52:07 +00:00
Faith Ekstrand
6fbd6a52ca nak: Use fswzadd.ndv on Blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:25 +00:00
Faith Ekstrand
b4c05a8402 nak: Add a TexDerivMode to OpFSwz and OpFSwzAdd
Even on Blackwell, this is a single bit but we might as well use the
enum for it so it's consistent with tex ops.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:25 +00:00
Faith Ekstrand
4ac4bd62c8 nak: Add a new TexDerivMode enum and plumb it through
For most generations, this is just plumbing through a false bit.  But on
Blackwell, we need to set .dxy at least in compute shaders.

Also, we had a bunch of .NDV comments on OpTxd but it has never existed
there on ahy hardware generation, it's just a left-over from trying to
copy+paste from codegen.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:24 +00:00
Faith Ekstrand
c6ad70551b 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>
2025-06-27 21:23:24 +00:00
Faith Ekstrand
13935c955c nak: Add better is_blackwell*() helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:24 +00:00
Faith Ekstrand
cb9e458d29 nak: Rework printing of TexLodMode
Puth the "." in the Display implementation like other modifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:24 +00:00
Faith Ekstrand
59f4c8dac2 nak: Use set_ureg_src() for Blackwell texture offsets and handles
Also add handles (they're currently missing).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:24 +00:00
Dave Airlie
45bd5502f5 nak: Add misc Blackwell tex encoding bits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35795>
2025-06-27 21:23:24 +00:00
Dave Airlie
06e8db646a 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>
2025-06-27 21:09:13 +00:00
Yiwei Zhang
5dc3708e97 panvk: refactor swapchain image alias bind
This is to prepare for ANB support.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35779>
2025-06-27 16:16:31 +00:00
Yiwei Zhang
827108ab7d panvk: refactor panvk_image to track panvk_device_memory instead of bo
Since we have already dropped the refcounting there, replacing with a
back pointer to the device memory makes it clear we don't hold any ref.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35779>
2025-06-27 16:16:31 +00:00
Alyssa Rosenzweig
1fd993388e hk: fix gs static topology + indirect draw
Fixes: 5640266eb3 ("agx/nir_lower_gs: rework gs rast shape handling")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:49 +00:00
Alyssa Rosenzweig
1c4eb71cbc libagx: port pre-GS to CL
in prep for changing the compile flow for it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:49 +00:00
Alyssa Rosenzweig
dff1230879 agx/nir_lower_gs: remove random idiv const call
should be fixed in the agx backend now

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:49 +00:00
Alyssa Rosenzweig
73659b4f67 agx/nir_lower_gs: CLify more XFB code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:48 +00:00
Alyssa Rosenzweig
10554ccad2 agx/nir_lower_gs: rework XFB prim calculation
significant instr count reduction for many outputs in a buffer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:48 +00:00
Alyssa Rosenzweig
46e139d453 libagx: optimize xfb offset pointers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:47 +00:00
Alyssa Rosenzweig
2544259030 asahi,hk,libagx: drop null checks
instead require scratch addresses be passed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:45 +00:00
Alyssa Rosenzweig
222ffc352e hk: eliminate null_sink
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:45 +00:00
Alyssa Rosenzweig
fa21722f1c asahi: use zero/scratch page for null textures
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:44 +00:00
Alyssa Rosenzweig
db2891ec5f hk,asahi: move scratch BO to common
gl needs this too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:44 +00:00
Alyssa Rosenzweig
d3adef3164 agx: defer nir_opt_idiv_const
noticed in GS work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
2025-06-27 15:31:43 +00:00
David Rosca
53e3e44eb3 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>
2025-06-27 15:17:08 +00:00
Eric R. Smith
65bc0f715e panvk: add a driConf to force enable atomics in shaders
This is mainly useful for enabling validation layers, but might also
be useful for a few apps that use very basic atomic operations. In
general these operations do not work properly in Bifrost, but they
work well enough to e.g. pass some piglit tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35710>
2025-06-27 14:48:16 +00:00
Erik Faye-Lund
fcd2fbfdfd panfrost/ci: fix up msaa fails... again
I should really have performed a full run here rather than just copying
the failures from a recent run... poorly.

Fixes: 8e646739baf ("panfrost/ci: add new 8x/16x msaa fails on t760")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35716>
2025-06-27 14:18:39 +00:00
Erik Faye-Lund
345026ebf1 panfrost/ci: bump timeout for panfrost-t760-gles
This test regularly takes close to an hour, and sometimes exceeds that.
Let's bump the timeout for it, to give it a better chance to finish.

This job is only run manually, so it shouldn't affect the time it takes
to merge changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35716>
2025-06-27 14:18:39 +00:00
Corentin Noël
c0d1b199ae venus: Fix leak in syncobj creation failure path
CID: 1475984 Resource leak
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:24 +00:00
Yiwei Zhang
6469d7268f venus: suppress Coverity Uninitialized scalar variable
Just false alarm. Adjusted the code to suppress it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:24 +00:00
Corentin Noël
4f8612f568 mesa/st: Fix leak in st_create_fp_variant
CID: 1643014 Resource leak
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:24 +00:00
Corentin Noël
c9513782bc mesa/st: Fix memory leak in st_create_common_variant
CID: 1642998 Resource leak
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:24 +00:00
Corentin Noël
ad9db6b259 glx: Free all populated fields of the glx_display on creation failure
Add a common path to ensure that there is no copy-paste error.

CID: 1644424,1644409 Resource leak

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:23 +00:00
Corentin Noël
e3829eccc8 egl/wayland: Plug leak when implicit modifiers are unsupported
Do not leak modifiers_subset and modifiers_subset_opaque.

CID: 1644433 Resource leak
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:23 +00:00
Corentin Noël
8adb2d4949 virgl: Free resource memory on creation failure
CID: 1646975 Resource leak
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:23 +00:00
Antonio Ospite
abb9ebed26 ci/android: download S3_ANDROID_ARTIFACT_NAME in cuttlefish-runner.sh
Downloading the android artifacts separately is really a peculiarity of
cuttlefish jobs, where we need mesa artifacts for both the host and the
guest.

So move the separate download of android artifacts to
cuttlefish-runner.sh

This aligns with the .test-android definition being cuttlefish specific,
and it also matches the original comment in that definition regarding
S3_ANDROID_ARTIFACT_NAME.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Antonio Ospite
00ea50d964 ci/android: download mesa artifacts in a more robust way
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Antonio Ospite
59ecbaaac0 ci/android: support issuing custom commands before running Android CTS
Some Android build may require some specific setup before running
Android CTS, for example switching to a user different than 0, or
setting some properties.

Add a mechanism to issue such commands in a generic way.

The job definition will have to set the `ANDROID_CTS_PREPARE_COMMAND`
variable with the desired command to execute right before running
Android CTS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Antonio Ospite
d49653e4a3 ci/android: trust system GLES if ANGLE_TAG is not specified
In commit c99c67c490 (ci/android: Only replace ANGLE if needed,
2025-06-05) ANGLE is replaced in the Android device only when ANGLE_TAG
is specified.

However it can still happen that the device was using ANGLE all along,
and not replacing it means that the original version would not match the
one built by mesa-ci, making the GLES version check fail unnecessarily.

In case ANGLE_TAG is not specified the GLES version check can be skipped
altogether, the rationale for this approach is that ANGLE can be
considered the  default GLES implementation for Android going forward,
so if android-runner.sh has not replaced it we can just trust that the
original one is in place.

There might still be some fancy setups in the wild where the GLES
implementation is mesa and not ANGLE, but we are not testing those in
mesa-ci for now, so skipping the test for non-ANGLE GLES too is
acceptable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35380>
2025-06-27 09:27:45 +00:00
Eric Engestrom
b885e39c63 broadcom/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:53 +00:00
Eric Engestrom
6ebef82ae8 zink+lavapipe/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:53 +00:00
Eric Engestrom
30f92cff89 zink+nvk/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:53 +00:00
Eric Engestrom
39585f9372 zink+radv/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:53 +00:00
Eric Engestrom
671a63b0c7 nvk/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:52 +00:00
Eric Engestrom
0e78939afb radv/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:52 +00:00
Eric Engestrom
e0e35c051d radeonsi/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:52 +00:00
Eric Engestrom
286318d0f3 radv/ci: sort previously added flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35787>
2025-06-27 09:09:52 +00:00
Pierre-Eric Pelloux-Prayer
3210484fe2 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>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
7c6fb24067 amd/virtio: clear DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT
Calls to radv_amdgpu_cs_submit will come with either no waits
or through vk_queue.
vk_queue uses VK_SYNC_WAIT_PENDING which is translated as
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE.

WAIT_AVAILABLE will wait for the fence to materialize, so
it means it's safe to pass the syncobj in a
AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT chunk without the
WAIT_FOR_SUBMIT flag.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
f0ab43ec1b ac/virtio: support timeline syncobj
The only missing bit was supporting the timeline chunk_ids
during submit.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
c1fdd540aa ac/info: add ac_drm_query_pci_bus_info
This allows to return dummy values for the vpipe case.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-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/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
ddf73e76a9 ac/info: use u_sync_provider instead of DRM_CAP_SYNCOBJ(_TIMELINE)
So we get the correct results regardless of the backend (amdgpu,
virtio nctx, vpipe, null).

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
df1224c8b2 radv: rework VM_ALWAYS_VALID handling
Instead of assuming that VM_ALWAYS_VALID is always available,
make its use conditionnal on its support.

This allows to remove the virtio nctx special case (where
VM_ALWAYS_VALID is only possible with virtio for buffers that
also have the NO_CPU_ACCESS flag since CPU access is implemented
through dmabuf on the host).

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-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/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
8c529ba58c radv: disable extension depending on timeline syncobj when missing
It was already done through sync_types but we also need to declare
that the extensions are not supported.

Similarly .KHR_present_wait can't be exposed since it requires
timeline support.

This is useful for virtio native context which currently doesn't
support timelines on amdgpu.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-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/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
999d5098b4 radv/virtio: support vpipe
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-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/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
a96356b26e radeonsi/virtio: support vpipe
For now use an environment variable to test the virtio code
using vpipe.

Exposing DRM_PRIME_CAP_EXPORT manually is required, otherwise
gbm platform will fallback to dummy buffers which aren't
supported.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
84c137ff14 amd/virtio: add vpipe support
When vpipe is used we won't have a valid fd available,
so make sure init doesn't fail.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
5d63d2fb04 ac/drm: replace direct ioctl calls by util_sync_provider
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
62b9c3eafc ac/drm: store a util_sync_provider in ac_drm_device
util_sync_provider provides a wrapper to manipulate syncobjs.
This allows replacing direct ioctl usages with other functions,
and is going to be used to support vpipe.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:50 +00:00
Pierre-Eric Pelloux-Prayer
80985767cb ac/drm: remove ac_drm_cs_create_syncobj
ac_drm_cs_create_syncobj2 is a simple replacement and this allows
to remove some code.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:49 +00:00
Pierre-Eric Pelloux-Prayer
e0bd24672c ac/virtio: port to vdrm functions
Let's use the shared helpers instead of our own version.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:49 +00:00
Pierre-Eric Pelloux-Prayer
ffdf13bd48 ac/info: rename has_local_buffers into has_vm_always_valid
The has_local_buffers name is based on the original name of this
feature (the GEM flag was AMDGPU_GEM_CREATE_LOCAL).

But in v3 the flag was renamed AMDGPU_GEM_CREATE_VM_ALWAYS_VALID,
so it's clearer to have the Mesa flag to match the kernel one.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-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/34470>
2025-06-27 08:15:49 +00:00
Pierre-Eric Pelloux-Prayer
bb12eebe2a util: add util_sync_provider::clone
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
2025-06-27 08:15:49 +00:00
Samuel Pitoiset
989162e67a radv: split descriptor set and descriptor utils in separate files
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35732>
2025-06-27 07:55:37 +00:00
Samuel Pitoiset
7425b5a82f radv: move radv_push_descriptor_set to radv_cmd_buffer.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35732>
2025-06-27 07:55:37 +00:00
Samuel Pitoiset
d87c937e04 radv: move descriptor update implementation to radv_descriptor_update_template.c/h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35732>
2025-06-27 07:55:37 +00:00
Samuel Pitoiset
173f4eeb65 radv: move write descriptor helpers to radv_descriptors.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35732>
2025-06-27 07:55:36 +00:00
Samuel Pitoiset
8493331eb1 radv: move descriptor pool implementation to radv_descriptor_pool.c/h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35732>
2025-06-27 07:55:35 +00:00
Hans-Kristian Arntzen
ac16b8c439 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>
2025-06-27 07:36:22 +00:00
Boris Brezillon
d36e6af329 panvk: Bump the max image size on v11+
We have more bits to encode the resource size there, so let's increase
the max limits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
c2c91e78fd pan/layout: Allow bigger size/surface stride on v12+
v11 started extending the size/surface stride of a few descriptors to
allow bigger images. Add the necessary code to take that into account.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
7a763bb0a3 pan/genxml: Rework the RT/ZS emission logic
For the ZS emission logic, we split the descriptor in 3 parts: ZS, S and
CRC, so we can easily mix and match each variant with pan_merge(). For
RTs, we just define a layout per variant instead of overlays, which makes
dumps less verbose, and avoid the situation where overlapping fields
get accidentally overwritten in the desc emission logic.

While at it, add the `Surface stride hi` fiels to the ZS/Color target
descriptors so we're all set to bump the image size limit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
61d6e92f25 pan/genxml: Add missing upper-32 bits of the buffer size on v12+
We currently don't use this, but it's good to have it defined anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
d2d27f8d9e pan/genxml: Fix the texture dimension field on v9+
The enum has more than 3 values now, and the field is 3-bit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
01d325ba63 pan/layout: Interleave header/body in AFBC(3D)
This allows us to get rid on an annoying limitation on AFBC(3D), and
makes things a lot easier to reason about.

Signed-off-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>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Samuel Pitoiset
13e6d2ba00 radv: make sure to zero-initialize MSB of accel struct descriptor
RADV only uses the first 8 bytes but zero-initializing it make sure
the descriptor is invariant.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35763>
2025-06-27 06:39:17 +00:00
Matt Turner
6842a8179f intel: Add support for float16 as cooperative matrix accumulator
The number of passing tests in ./deqp-vk -n '*cooperative_matrix.khr*'
increases

- on PTL from 787 -> 914
- on RPL from 799 -> 926

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13304
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:22 +00:00
Matt Turner
6d786a0e4b brw: Use convert_cmat_intel intrinsic
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:22 +00:00
Matt Turner
41cd196886 brw: Implement convert_cmat_intel intrinsic
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:22 +00:00
Matt Turner
102d7409ef nir: Add convert_cmat_intel intrinsic
This intrinsic will be used to implement matrix type and layout
conversions in the backend compiler.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:22 +00:00
Matt Turner
1215845b5b intel: Increase size of cooperative_matrix_configurations[] to 16
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:21 +00:00
Guilherme Gallo
d06f8cfb19 ci/android: Add dEQP module for CML cuttlefish test
Add only those tests for initial coverage:
  * `dEQP-VK.wsi.android.*`
  * `dEQP-VK.api.external.memory.android_hardware_buffer.*`

This increases the job execution time to almost 1h, so move this job to
nightly.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Guilherme Gallo
545727f97c ci/android: Move ANDROID_CTS_MODULES to build script
Rely on the include files (-android-cts-include.txt) to filter both
tests and modules from Android CTS during test time.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Guilherme Gallo
655cd186ee ci/android: Add a job to run CTS on Intel CML
Like we do with `android-angle-lavapipe`, let's include the Android CTS
testing alongside the vkcts one.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Connor Abbott
630380349b tu: Give renderpass events a separate trace buffer
Before this we tried hard to optimize for the sysmem case by emitting
the events for the renderpass inline and only discarding them in the
gmem case. However this won't work if we need to emit the
render_pass_start event after the binning IB, because we don't know
whether the binning IB will be emitted until the RP end time. The old
system also required a ton of confusing code to keep track of the
start/end pointers with suspending and resuming renderpasses. All of
that goes away if we use a separate u_trace for renderpass events and
just copy it to the main trace buffer for sysmem.

With this, the previous method of using the space between trace_rp_start
and trace_rp_drawcalls_start to keep track of the renderpass_start event
and disable it when emitting a split dynamic renderpass at submit time
doesn't work anymore. Just move trace_renderpass_start() to
tu_cmd_render() time after the draw calls have been recorded, which is
now safe to do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35751>
2025-06-26 22:51:29 +00:00
Connor Abbott
7791b5286c util/u_trace: Add u_trace_move()
Destructively copy trace contents to another trace, transfering
ownership of resources. This will be useful for turnip.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35751>
2025-06-26 22:51:29 +00:00
James Price
10ae673368 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>
2025-06-26 22:24:31 +00:00
Nicolas Dufresne
4008300672 build: Include panfrost to the tools 'all' list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35775>
2025-06-26 21:55:17 +00:00
Nicolas Dufresne
3ce37fcbb5 build: Sort the tools 'all' list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35775>
2025-06-26 21:55:17 +00:00
Dave Airlie
5c99599060 nvk/nak: handle sm100 lod mode encoding.
The lod mode encoding has changed on blackwell.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:47 +00:00
Faith Ekstrand
cfc0be2454 nil: Use set_field2() for a few descriptor cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:47 +00:00
Faith Ekstrand
046b6435bc nak: Use the new set_field2() helper for a few things
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:47 +00:00
Faith Ekstrand
ff944106fc nvk/bitview: Add a set_field2() trait and method
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:46 +00:00
Faith Ekstrand
125da7e341 nvk/bitview: Add a new ToFieldBits trait
This makes the implementation of SetField itself more generic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:46 +00:00
Konstantin Seurer
131b917246 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>
2025-06-26 20:52:29 +00:00
Konstantin Seurer
e1acffbfc0 ci: Update trace checksums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:14 +00:00
Konstantin Seurer
5f3c956f49 gallivm/nir/soa: Call lp_build_opt_nir
Makes sure that everything is lowered and optimized.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:14 +00:00
Konstantin Seurer
9f98ded348 gallivm/nir/soa: Cast divergent->uniform at the consumer
The exec mask can change between the producer and the consumer. Casting
at the consumer makes sure that we end up with a valid value.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:14 +00:00
Konstantin Seurer
1fba5739c4 gallivm/nir/soa: Include helper invocations in first_active_invocation
So it returns a valid element if the exec mask is 0 for all active
invocations but -1 for helper invocations.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:13 +00:00
Konstantin Seurer
405378f042 gallivm/nir/soa: Fix typo
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:13 +00:00
Konstantin Seurer
fe601b9293 gallivm: Implement demote and lower terminate in nir
The current implementation does not work for terminate since loads need
to ignore the mask because of helper invocations. This can lead to
crashes.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:12 +00:00
Konstantin Seurer
aacfc663cb nir: Add nir_lower_halt_to_return
This is a lowering pass that was implemented by multiple drivers.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:12 +00:00
mojyack
db383ceb64 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>
2025-06-26 19:36:09 +00:00
Dave Airlie
f972affd9d nvk/hopper: set texture header version
Taken from open-gpu-kernel-modules.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
c387c9fde8 nouveau/headers: generate c56f host methods.
The newer host methods would be nice to have in dumps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
1b654dc198 nouveau/winsys: Add blackwell support
This adds Blackwell support to sm_for_chipset() and
max_warps_per_mp_for_sm()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
f310b3fa6f nvk/qmd: fix shared memory size calcs for blackwell.
I'm still not 100% happy with these, nvidia does appear to use 26
as the max/target values, which corresponds to + 7 not +1
but let's dig a bit more.

Fixes: 6c052d87b7 ("nak/qmd: Add QMD version 5.0 for Blackwell+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
ec3232691b nvk/sm90: fix su atom vs atom encoding
The suatom is encoded different to atom.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
59015f1c64 nak/sm70: fix imnmx on blackwell.
The encoding was slightly wrong, this passes the hw_tests.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Faith Ekstrand
9c354cd47f nak/hw_tests: Align the shared memory window to 4GB on Hopper+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
50a312ef24 nvk: Add hopper shared memory window alignment
This changes to need 4GB alignment on hopper and later.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
46c72f69f9 nvk: invalidate raster cache after setting shading rate
on blackwell fix:
dEQP-VK.fragment_shading_rate.renderpass2.monolithic.attachment_rate.misc.two_subpass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
a2518c817f nvk: SET_REFERENCE is not legal anymore.
replace with WFI, this is possibly overkill

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:55 +00:00
Dave Airlie
6fa078c0be nvk: handle hopper invalidate sequence for memory barrier
This changed on hopper to need a MEM_OP memory barrier emitted.

Use the new headers to send the correct sequence, this is taken
from the open-gpu-kernel-modules repo, but it might be a too
large hammer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:55 +00:00
Dave Airlie
cdd01c416c nvk: add clc86f class for hopper host methods.
This is taken from open-gpu-kernel-modules, and provides
the host interface on hopper and newer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Dave Airlie
153dc0f406 nouveau/headers: add a single field to skip parsing headers.
Newer headers have 2 fields at 0 for one value, just ignore one
for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Dave Airlie
337fcd31e4 nvk/nil: Use PTE_KIND_GENERIC_MEMORY for everything on Blackwell+
This has been confirmed for current blackwell hardware, look
out in future for changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Dave Airlie
f6b22a54e4 nvk/nil: add texture header v2 support for hopper/blackwell
The texture header got redefined and some fields got reworked,
deriving it from the old info doesn't seem trivial, so introduce
a second column to handle the v2 header info.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Marek Olšák
1754507d49 nir: rename nir_lower_io_to_temporaries -> nir_lower_io_vars_to_temporaries
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:54 +00:00
Marek Olšák
1e03827c77 nir: rename nir_lower_io_arrays_to_elements -> nir_lower_io_array_vars_to_elements
same for *_no_indirects

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:54 +00:00
Marek Olšák
3713e2d580 nir: rename nir_lower_clip_cull_distance_arrays -> nir_lower_clip_cull_distance_array_vars
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:53 +00:00
Marek Olšák
adb17a8609 nir: move nir_recompute_io_bases into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:53 +00:00
Marek Olšák
97743980ce nir: remove unused nir_force_mediump_io & nir_unpack_16bit_varying_slots
I think I added these.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:52 +00:00
Marek Olšák
aefea49dad nir: move lots of code from nir_lower_io.c into new nir_lower_explicit_io.c
nir_lower_io is just for regular inputs/outputs.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:52 +00:00
Marek Olšák
5bd3e0c08c nir: move nir_assign_var_locations to freedreno (its only use)
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:52 +00:00
Marek Olšák
c8cda0dc1a nir: move nir_io_add_const_offset_to_base into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:51 +00:00
Marek Olšák
d78070ded5 nir: move nir_io_add_intrinsic_xfb_info into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:51 +00:00
Marek Olšák
12df9b3def nir: rename nir_vectorize_tess_levels -> nir_lower_tess_level_array_vars_to_vec
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:50 +00:00
Marek Olšák
2aa94caf82 nir: rename nir_lower_io_to_vector -> nir_opt_vectorize_io_vars
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:50 +00:00
Marek Olšák
944f8f6db2 nir: move nir_lower_io_vars_to_scalar into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:49 +00:00
Marek Olšák
439d805291 nir: rename nir_lower_io_to_scalar_early -> nir_lower_io_vars_to_scalar
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:49 +00:00
Ian Romanick
b83f618fb2 brw: Fully write temporary destinations
Consider an innocuous instruction like:

    and(1) v250:UD, g0.3<0,1,0>:UD, 4294967264u NoMask group0

If register allocation decides to spill v250, it will see this
instruction and say, "Oh no! The other components of v250 aren't set, so
I'd better add a fill before that instruction!"

But it gets even worse than that... if register coalesce decided to
merge two of these, the live range gets massively extended because the
writes don't fully initialize the value. This causes the need to spill
these registers in the first place.

Changing that instruction to SIMD16 on Xe2 or SIMD8 on other platforms
alleviates these issues.

shader-db:

Lunar Lake
total instructions in shared programs: 17118324 -> 17113191 (-0.03%)
instructions in affected programs: 93701 -> 88568 (-5.48%)
helped: 42 / HURT: 6

total cycles in shared programs: 895422566 -> 895079488 (-0.04%)
cycles in affected programs: 30111338 -> 29768260 (-1.14%)
helped: 35 / HURT: 40

total spills in shared programs: 3588 -> 3304 (-7.92%)
spills in affected programs: 285 -> 1 (-99.65%)
helped: 10 / HURT: 0

total fills in shared programs: 2218 -> 1663 (-25.02%)
fills in affected programs: 556 -> 1 (-99.82%)
helped: 10 / HURT: 0

Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results.  (Meteor Lake shown)
total instructions in shared programs: 20059218 -> 20053563 (-0.03%)
instructions in affected programs: 96938 -> 91283 (-5.83%)
helped: 43 / HURT: 6

total cycles in shared programs: 884174588 -> 883536475 (-0.07%)
cycles in affected programs: 22105268 -> 21467155 (-2.89%)
helped: 35 / HURT: 27

total spills in shared programs: 5032 -> 4679 (-7.02%)
spills in affected programs: 355 -> 2 (-99.44%)
helped: 12 / HURT: 0

total fills in shared programs: 4782 -> 4113 (-13.99%)
fills in affected programs: 671 -> 2 (-99.70%)
helped: 12 / HURT: 0

Skylake
total instructions in shared programs: 19097658 -> 19097665 (<.01%)
instructions in affected programs: 14202 -> 14209 (0.05%)
helped: 0 / HURT: 5

total cycles in shared programs: 862058109 -> 862058267 (<.01%)
cycles in affected programs: 3450244 -> 3450402 (<.01%)
helped: 7 / HURT: 11

fossil-db:

Lunar Lake
Totals:
Cycle count: 31439652246 -> 31439652272 (+0.00%)

Totals from 2 (0.00% of 707091) affected shaders:
Cycle count: 2602 -> 2628 (+1.00%)

No other Intel platforms had any fossil-db changes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35721>
2025-06-26 17:59:47 +00:00
Gurchetan Singh
8a2f43c9bd util: rust: update to rustix 1.0.7
Latest tagged release.  Fedora uses it, and for it to
work on Android we'll need to latest release so a pure
libc backend can be used.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35768>
2025-06-26 17:11:41 +00:00
Serdar Kocdemir
5fbb3817ba gfxstream: Small optimization on transformDescriptorSetList
Reduce number of possible allocations and remove unnecessary
memory initialization which will be overwritten immediately.

Test: dEQP-GLES31.functional.ssbo.layout.*

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35768>
2025-06-26 17:11:41 +00:00
Albert Liu
dce282e7d9 gfxstream: Add VK_EXT_memory_budget to allowlists. (mesa3d side)
Codegen change.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35768>
2025-06-26 17:11:41 +00:00
Alyssa Rosenzweig
194c717e04 agx: optimize sign fix ups
Totals from 1787 (3.33% of 53701) affected shaders:
MaxWaves: 1620160 -> 1620096 (-0.00%); split: +0.01%, -0.01%
Instrs: 2036003 -> 2033382 (-0.13%); split: -0.16%, +0.04%
CodeSize: 13988944 -> 13971384 (-0.13%); split: -0.17%, +0.05%
Spills: 5505 -> 5504 (-0.02%)
ALU: 1514305 -> 1511676 (-0.17%); split: -0.22%, +0.05%
FSCIB: 1514305 -> 1511676 (-0.17%); split: -0.22%, +0.05%
GPRs: 200723 -> 200779 (+0.03%); split: -0.06%, +0.09%
Uniforms: 642921 -> 645743 (+0.44%); split: -0.00%, +0.44%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
2025-06-26 16:41:55 +00:00
Alyssa Rosenzweig
6efe557718 nir/search_helpers: add has_multiple_uses helper
heuristic for the next patch.

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/35720>
2025-06-26 16:41:55 +00:00
Alyssa Rosenzweig
22272c71f2 hk: use new path for !soft fault UBO
this is more efficient for !soft fault and lets us drop a code path. i've been
running fossils without soft fault since dev machine so that's what these stats
are based on.

Totals from 11799 (22.22% of 53090) affected shaders:
MaxWaves: 11472896 -> 11467200 (-0.05%); split: +0.09%, -0.14%
Instrs: 7032360 -> 6603558 (-6.10%); split: -6.11%, +0.02%
CodeSize: 49902322 -> 48693876 (-2.42%); split: -2.95%, +0.52%
Spills: 2817 -> 2846 (+1.03%); split: -5.75%, +6.78%
Fills: 2911 -> 3143 (+7.97%); split: -2.37%, +10.34%
Scratch: 10896 -> 11020 (+1.14%); split: -1.95%, +3.08%
ALU: 5092487 -> 5265337 (+3.39%); split: -0.58%, +3.97%
FSCIB: 5092487 -> 5265333 (+3.39%); split: -0.58%, +3.97%
IC: 1461194 -> 1387408 (-5.05%); split: -5.22%, +0.17%
GPRs: 803121 -> 805414 (+0.29%); split: -0.80%, +1.08%
Uniforms: 2942007 -> 2247619 (-23.60%); split: -24.35%, +0.75%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
2025-06-26 16:41:55 +00:00
Alyssa Rosenzweig
63ce73a601 nir,hk: sink lowered UBOs
this is better than doing it once we've lowered to hardware ops which makes it
more challenging to sink since then we'd have to sink the whole tree instead of
a single intrinsic.

Totals from 17617 (32.81% of 53701) affected shaders:
MaxWaves: 16863872 -> 16901504 (+0.22%); split: +0.24%, -0.02%
Instrs: 12406405 -> 12430375 (+0.19%); split: -0.15%, +0.35%
CodeSize: 87055248 -> 87180802 (+0.14%); split: -0.18%, +0.33%
Spills: 10350 -> 9301 (-10.14%); split: -11.57%, +1.43%
Fills: 5215 -> 3733 (-28.42%); split: -31.49%, +3.07%
Scratch: 113164 -> 110472 (-2.38%); split: -2.63%, +0.25%
ALU: 9552550 -> 9558513 (+0.06%); split: -0.22%, +0.28%
FSCIB: 9552545 -> 9558508 (+0.06%); split: -0.22%, +0.28%
IC: 2874032 -> 2876442 (+0.08%); split: -0.00%, +0.09%
GPRs: 1470040 -> 1459283 (-0.73%); split: -1.00%, +0.27%
Uniforms: 5113254 -> 5115158 (+0.04%); split: -0.82%, +0.85%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Job Noorman <job@noorman.info> [NIR]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
2025-06-26 16:41:55 +00:00
Alyssa Rosenzweig
d17dd8332e hk: sink SSBO loads
Seems to hit instr count due to RA lottery but reduce reg pressure a LOT so,
probably worth it.

Totals from 5305 (9.88% of 53701) affected shaders:
MaxWaves: 4487168 -> 4551040 (+1.42%); split: +1.51%, -0.09%
Instrs: 6063323 -> 6178678 (+1.90%); split: -0.17%, +2.07%
CodeSize: 44356516 -> 44662024 (+0.69%); split: -0.21%, +0.90%
Spills: 7321 -> 4034 (-44.90%); split: -45.49%, +0.59%
Fills: 8522 -> 5069 (-40.52%); split: -40.87%, +0.35%
Scratch: 21940 -> 9856 (-55.08%); split: -55.17%, +0.09%
ALU: 4541440 -> 4554906 (+0.30%); split: -0.20%, +0.50%
FSCIB: 4541440 -> 4554906 (+0.30%); split: -0.20%, +0.50%
IC: 1180150 -> 1184856 (+0.40%); split: -0.01%, +0.41%
GPRs: 605023 -> 576336 (-4.74%); split: -5.00%, +0.26%
Uniforms: 1421832 -> 1425367 (+0.25%); split: -0.08%, +0.33%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
2025-06-26 16:41:55 +00:00
Alyssa Rosenzweig
776f07517f hk: optimize load_global_bounded
Totals from 5967 (11.24% of 53090) affected shaders:
MaxWaves: 5044864 -> 5126720 (+1.62%); split: +1.95%, -0.32%
Instrs: 6911845 -> 6227557 (-9.90%); split: -9.96%, +0.06%
CodeSize: 46353592 -> 45359410 (-2.14%); split: -4.41%, +2.27%
Spills: 18002 -> 7046 (-60.86%); split: -63.22%, +2.36%
Fills: 15833 -> 8074 (-49.01%); split: -54.59%, +5.58%
Scratch: 52160 -> 23324 (-55.28%); split: -58.32%, +3.04%
ALU: 4235569 -> 4602546 (+8.66%); split: -1.79%, +10.45%
FSCIB: 4235364 -> 4602341 (+8.66%); split: -1.79%, +10.45%
IC: 1261552 -> 1253110 (-0.67%); split: -4.33%, +3.66%
GPRs: 664060 -> 640627 (-3.53%); split: -4.69%, +1.16%
Uniforms: 1568288 -> 1505664 (-3.99%); split: -10.88%, +6.89%
Loops: 4669 -> 4670 (+0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
2025-06-26 16:41:54 +00:00
Alyssa Rosenzweig
caa0854da8 nir: plumb load_global_bounded
this lets the backend implement bounded loads (i.e. robust SSBOs) in a way
that's more clever than a full branch. similar idea to
load_global_constant_bound which should eventually be merged into this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
2025-06-26 16:41:53 +00:00
Dave Airlie
37e71a5cb2 radv/video: add support for AV1 encoding
Co-authored-by: Charlie Turner <cturner@igalia.com>
Co-authored-by: Benjamin Cheng <benjamin.cheng@amd.com>
Co-authored-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32440>
2025-06-26 15:41:01 +00:00
Dave Airlie
724655bfc6 vulkan/video: add support for AV1 encoding to runtime
Co-authored-by: Charlie Turner <cturner@igalia.com>
Co-authored-by: Benjamin Cheng <benjamin.cheng@amd.com>
Co-authored-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32440>
2025-06-26 15:41:01 +00:00
David Rosca
ac935c18b2 vulkan/video: Add bit depth to session and session params
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32440>
2025-06-26 15:41:01 +00:00
Dave Airlie
ee9ec055d9 radv/video: move session defines to header as encode needs more.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32440>
2025-06-26 15:41:01 +00:00
Dylan Baker
dd45e25dc3 meson: update b_sanitize check for Meson >= 1.8
In Meson 1.8 the b_sanitize option was changed from an enumerated set of
known sanitizers to an array of options to test with `-fsanitize`, this
means that the thread sanitizer could be used in conjunction with one
or more other sanitizers and we need to account for this. Use
`.contains()` to check if `thread` is in the sanitizer list

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35747>
2025-06-26 14:59:27 +00:00
Mike Blumenkrantz
5cfaa6cd5f zink: use smaller keys for surface/bufferview caching and switch to sets
this should be a bit more efficient

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
9ac256645e zink: use samplerview obj to check buffer rebinds in non-db path
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
c88cc5d135 zink: unify bvci creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
3517ad1432 zink: remove redundant pipe_resource param from zink surface funcs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
5cf6cb1c6d zink: enforce pipe_surface::texture matching the resource in zink_get_surface()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
ef3f798957 zink: prune zink_surface down to the imageview and create/fetch on demand
this eliminates all pipe_surface allocations

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
309710c260 zink: various trivial struct access changes
ideally no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b8108d0e7a zink: use temp struct for implicit feedback loop detection
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
9197de066c zink: add layer info to bindless descriptor
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
daa07aba98 zink: directly return import2d resource
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
ed325d9309 zink: directly use imageview format for image descriptors for depth clamping
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
21fbe0f893 zink: track whether fb has swapchain bound on context
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
defc3dfa79 zink: use a better check for current fb zsbuf in zink_clear_depth_stencil()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
76e2b61a2f zink: delete/simplify some bindless descriptor resource accesss
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
8805afd291 zink: delete zink_surface::ivci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
a9c928954e zink: allocate keys for surface cache to stop using zink_surface::ivci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b3c02d2bca zink: store/use fb attachment formats directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b177136c56 zink: tweak zink_create_transient_surface to stop using zink_surface::ivci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
35cd9f663b zink: break out fb ivci init
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
25441082d9 zink: big resource view rework
* move/unify the cache onto zink_resource_object to streamline rebinds
* delete refcounts from surfaces and bufferviews
* only delete surfaces and bufferviews when owner object is destroyed
* cache swapchain surfaces onto the swapchain image

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
8eb5f272f2 zink: remove some usage of zink_surface::ivci
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b030b20d72 zink: unify some z24 sampler clamping code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
74cf4f4efc zink: remove random format check in surface create
not sure why this was here

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
efcd6c11d9 zink: delete some redundant flagging of ctx->rp_changed
this already happens during unbind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
635f0c5f4f zink: delete transient attachments instead of leaking them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
07cc25d968 zink: always directly create surfaces
no need to defer this anymore

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
a7bfa37c6a zink: unify zink_resource_object_init_mutable() calling
this all goes through surface creation the same way

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
2ac0f97921 zink: delete surface handling of blockTexelViewCompatibleMultipleLayers
this is a pipe cap now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
e7a2268ca2 zink: simplify code surrounding prep_fb_attachment()
there's no need to pass a surface here since no part
of the surface is actually used besides the resource

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
9a1f5e82ee zink: clean up null surface case in prep_fb_attachment()
this is already checking for non-null surface in the caller,
and usage must be set after swapchain acquire to handle barriers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
78cd7f17af zink: move zink_prep_fb_attachment up and make static
no longer used externally

also move update_res_sampler_layouts() as a dependency

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
0f58227324 zink: remove pipe_resource ref from bufferviews
this was only ever needed for shader images and bindless, which both
now take their own refs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
3da0853867 zink: make pipe_resource refs for image views more consistent
now they always get a ref on bind and lose the ref on unbind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
6658533ad5 zink: add a pipe_resource ref to bindless descriptors
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
f385b87963 zink: delete zink_surface::usage_info
not needed, just regenerated on creation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
37bb3af312 zink: remove resource param from apply_view_usage_for_format()
not actually needed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
a4d4fee9d3 zink: delete zink_surface::hash
this is barely used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
0a2c395394 zink: require nullDescriptor feature
this simplifies a huge amount of code and enables a lot of refactoring

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Valentine Burley
bac51d2931 virtio/ci: Add nightly Android Venus jobs on Intel TGL and ADL
Introduce nightly Cuttlefish jobs on Intel Tiger Lake and Alder Lake.

Like `android-angle-venus-anv-cml`, these jobs run dEQP with the Android
guest using Venus + ANGLE, and the host using the ANV Vulkan driver.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Valentine Burley
bf98db1c45 virtio/ci: Split android-angle-venus-anv into reusable template
Move shared variables and configuration for the android-angle-venus-anv
job into a new template so that it can be reused by other jobs.

This follows the structure used everywhere else.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Valentine Burley
32264e7a00 virtio/ci: Increase timeout for AHB tests
Some of the tests occasionally time out on Tiger Lake.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Valentine Burley
e2ac66efdd ci: Uprev kernel to enable Multi-Gen LRU
Update the kernel to enable CONFIG_LRU_GEN.
This is the only change from the previous kernel build.

Mutli-gen LRU improves how Linux handles high memory pressure, which
allows Cuttlefish to boot on devices with limited RAM.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Lucas Stach
29eb30c747 etnaviv/ci: drop fails due to ignored stencil valuemask
Now that the workaround for stencil valuemask 0 is gone on more
recent cores, we can drop the failures that were caused by this
workaround.

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/35704>
2025-06-26 12:17:06 +00:00
Lucas Stach
41b08a2040 etnaviv: allow 0 back stencil valuemask on new cores
Older cores have a hardware bug where the stencil test misbehaves when
the valuemask is 0 in the back stencil. The workaround is to effectively
switch to single sided stencil and hope for the best. This seems to be
okay for most actual use-cases and tests, as a 0 valuemask is quite rare.

However, as 0 is a valid value for the mask the workaround breaks some
edge cases. Newer cores don't seem to require the workaround and operate
correctly with all stencil valuemasks, so drop the workaround for them.

I don't know which feature bit tells us about the bugfix. I made an
educated guess by checking behavior on multiple GPUs: GC880r5106 and
GC2000r5108 need the workaround, GC3000r5450, GC7000r6204 and GC600r4653
work fine without it. By comparing the set BugFixes feature bits between
the cores and the fact that BugFixes15 already fixes some PE issues, I
think this one is the most likely candidate.

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/35704>
2025-06-26 12:17:06 +00:00
Lucas Stach
2dc5db625b etnaviv: simplify stencil ref front/back selection condition
Drop the check for front stencil enable when selecting which stencil
ref value to put into the back stencil state. If the front stencil
isn't enabled then stencil operations as a whole aren't enabled and
we don't care which value ends up in the state.

While at it fix indentation.

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/35704>
2025-06-26 12:17:06 +00:00
Lucas Stach
a6e9061880 etnaviv: drop obsolete question about alpha/stencil test interaction
There's a few things that will prevent enabling the more efficient
PE_COLOR_FORMAT_OVERWRITE mode, but pixel dicard due to alpha or
stencil testing isn't one of those conditions, as this behaves the
same way as pixel discard due to a failed depth test.

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/35704>
2025-06-26 12:17:05 +00:00
Lucas Stach
277b9bba38 etnaviv: remove obsolete two-sided stencil comment
There is no question anymore: we need to swap front/back stencil
depending on the frontface winding order, as the hardware doesn't
have a front face configuration option. This is what is implemented
in 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/35704>
2025-06-26 12:17:05 +00:00
Natalie Vock
af86cc37d5 aco/spill: Don't spill scratch_rsrc-related temps
These temps are used to create the scratch_rsrc. Spilling them will
never benefit anything, because assign_spill_slots will insert code
that keeps them live. Since the spiller assumes all spilled variables
to be dead, this can cause more variables being live than intended and
spilling to fail.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
acf29e403a aco/spill: Add a null scratch offset if no scratch_offset arg exists
Function callees' scratch_rsrc comes with the scratch offset
pre-applied.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
630913e1b4 aco: Introduce static_scratch_rsrc program member
Function callees get their scratch resource as a parameter instead of
generating it on-the-fly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
e006f68b11 aco/isel: Don't add scratch offset as gfx8- soffset if no offsets exist
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
a5eba11657 aco/isel: Use stack pointer parameter in load/store_scratch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
4a62b342f3 aco: Add common utility to load scratch descriptor
Also modifies the scratch descriptor to take the stack pointer into
account.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Natalie Vock
cd2caa5e2b aco/spill: Use scratch stack pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Natalie Vock
22624d6f12 aco: Add scratch stack pointer
Function callees shouldn't overwrite caller's stacks.
Track where to write scratch data with a stack pointer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Natalie Vock
be89c02be5 aco: Add pseudo instr to calculate a function callee's stack pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Job Noorman
54151cfb76 ir3/cf: add support for movs
movs supports the same conversions as cov which means that any cov of
its dst can be folded into the movs if all uses of its dst are the same
type of cov.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
bf203fbf20 ir3: add codegen for movs
movs is just nir_intrinsic_read_invocation so this is a matter of
disabling the current lowering to nir_intrinsic_read_invocation_cond_ir3
and adding lowering to movs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
d94bea85b8 ir3: make backend aware of movs
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
4b3f58701c ir3/isa: add isaspec definition for movs
movs works like subgroupBroadcast/OpGroupNonUniformBroadcast. The fiber
id can either be an immediate or a value in a0.x. In the latter case,
the value has to be dynamically uniform or else the behavior is
undefined. The dst register has to be shared or else the behavior seems
to be equivalent to a normal mov (i.e., the fiber id is not taken into
account anymore).

movs can do a cov on the broadcasted value. It works exactly like a
normal cov except that using u8 as the src type does not seem to work at
all.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
d328b1e8c0 ir3/parser: add uinteger helper
To match unsigned immediates.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
f9b03fd170 ir3/a7xx: disable half shared mov quirk
The HW issue was fixed in a7xx so we can remove the workarounds there.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
edce6f410f ir3: support half regs for read_{first,cond,getlast}
The emitted mov had a hard coded dst type of u32. This was fine because
we needed this to work around a HW bug with shared half movs. However,
since this bug was fixed in a7xx, we need to support half movs as well.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:08 +00:00
Job Noorman
a02d7b0131 ir3: add helper to apply half shared mov quirk
The quirk was copy-pasted in 3 separate places making it difficult to
make changes.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:08 +00:00
Daniel Schürmann
7620957193 aco/ra: always set fill_operands=true when handling operands
This makes the behavior consistent and less prone to error.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35735>
2025-06-26 10:05:07 +00:00
Daniel Schürmann
ee8424d839 aco/ra: always fill moved operands when handling vector-operands
update_renames() assumes that killed operands are already removed from
the register file, except for precolored and copy-kill operands.
When dealing with vector-operands, however, unrelated operands might
also be moved, in order to make space.

Fixes: fb689f133e ('aco/ra: handle register assignment of vector-aligned operands')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35735>
2025-06-26 10:05:07 +00:00
Georg Lehmann
7de352e99e nir,radv: add an option to not move 8/16bit vecs
ACO will overestimate the register demand of the sources, so we don't
want to create the vector later.

Foz-DB Navi48:
Totals from 240 (0.30% of 80265) affected shaders:
MaxWaves: 6429 -> 6435 (+0.09%)
Instrs: 3406069 -> 3406646 (+0.02%); split: -0.01%, +0.03%
CodeSize: 18231596 -> 18233288 (+0.01%); split: -0.01%, +0.02%
VGPRs: 14768 -> 14732 (-0.24%)
Latency: 18981274 -> 18979170 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 4247331 -> 4246634 (-0.02%); split: -0.02%, +0.01%
VClause: 85453 -> 85458 (+0.01%); split: -0.01%, +0.01%
Copies: 262046 -> 261971 (-0.03%); split: -0.06%, +0.03%
PreVGPRs: 10899 -> 10775 (-1.14%)
VALU: 1923441 -> 1923485 (+0.00%); split: -0.01%, +0.01%
SALU: 457983 -> 457982 (-0.00%)
VOPD: 4980 -> 4861 (-2.39%); split: +0.48%, -2.87%

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35729>
2025-06-26 09:29:43 +00:00
Georg Lehmann
7ac9a87572 nir/opt_sink: don't assume moving conversion can't increase register pressure
Foz-DB Navi48:
Totals from 11311 (14.09% of 80265) affected shaders:
MaxWaves: 337664 -> 337648 (-0.00%); split: +0.00%, -0.01%
Instrs: 10102221 -> 10101625 (-0.01%); split: -0.05%, +0.04%
CodeSize: 55000184 -> 54999292 (-0.00%); split: -0.04%, +0.03%
VGPRs: 571052 -> 571064 (+0.00%); split: -0.03%, +0.03%
Latency: 59247189 -> 59204726 (-0.07%); split: -0.13%, +0.06%
InvThroughput: 10236407 -> 10215675 (-0.20%); split: -0.26%, +0.06%
VClause: 211730 -> 211677 (-0.03%); split: -0.07%, +0.04%
SClause: 284802 -> 284762 (-0.01%); split: -0.07%, +0.06%
Copies: 702890 -> 702539 (-0.05%); split: -0.18%, +0.13%
Branches: 205117 -> 205112 (-0.00%)
PreSGPRs: 475898 -> 475825 (-0.02%); split: -0.02%, +0.00%
PreVGPRs: 366318 -> 366449 (+0.04%); split: -0.14%, +0.17%
VALU: 5764791 -> 5764349 (-0.01%); split: -0.02%, +0.01%
SALU: 1259529 -> 1259517 (-0.00%); split: -0.04%, +0.04%
VOPD: 5854 -> 5724 (-2.22%); split: +0.70%, -2.92%

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35729>
2025-06-26 09:29:43 +00:00
David Rosca
0c8b245094 radeonsi/vpe: Change some error messages to warnings
Error should be only used for critical failures.
Fixes warning spam when the input surface has DCC.

Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35719>
2025-06-26 08:19:33 +00:00
Jose Maria Casanova Crespo
1377e18234 v3d: avoid submit of supertile coordinates on jobs without rasterization
If all draw calls of a job were submitted with GL_RASTERIZER_DISCARD
enabled we can avoid all the rasterization by not submitting the
supertile coordinates in the CLE.

There is a performance improvement in scenarios where only running the
geometry stages is needed like using TF. Altought the load/stores were
already avoided. Before this patch, the FS was still being executed for
each tile.

It helps on manhattan benchmarks.

fps_avg  helped:  gl_manhattan.trace:   12.71 -> 13.16 (3.54%)
fps_avg  helped:  gl_manhattan31.trace:  7.86 ->  8.02 (2.03%)

total fps_avg in affected (through threshold) runs: 20.57 -> 21.18 (2.96%)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35739>
2025-06-26 07:27:11 +00:00
Jose Maria Casanova Crespo
d0163f1096 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>
2025-06-26 07:27:11 +00:00
Pierre-Eric Pelloux-Prayer
04d283c628 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>
2025-06-26 07:06:51 +00:00
Pierre-Eric Pelloux-Prayer
ac6abd9c23 radeonsi: enable SQTT for more chips
Same as radv.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35582>
2025-06-26 07:06:51 +00:00
Pierre-Eric Pelloux-Prayer
ca0ed07588 ac/pm4: determine spi_shader_pgm_lo_reg when PKT3_SET_SH_REG_PAIRS is used
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35582>
2025-06-26 07:06:51 +00:00
Pierre-Eric Pelloux-Prayer
5da4941101 radeonsi: fix typo in sdma code
cs_create returns a bool not an int so check correctly for
success (sdma was still used because sdma_cs would be non
NULL when entering this function the second time).

While at it update debug_flags to not retry creating sdma_cs
if it failed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35582>
2025-06-26 07:06:51 +00:00
Pierre-Eric Pelloux-Prayer
6c206ffbbc radeonsi: use si_set_buf_desc_address helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35582>
2025-06-26 07:06:51 +00:00
Konstantin Seurer
42c2ccbfb2 spirv: Move the shader_call_data workaround above nir_validate_shader
Prevents validation failures.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35532>
2025-06-26 06:30:44 +00:00
Samuel Pitoiset
30ccd97cd2 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>
2025-06-26 06:11:54 +00:00
Rob Clark
2e00925c81 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>
2025-06-26 03:12:07 +00:00
Rob Clark
6f5ff6be44 nir: Fix lower_readonly_images_to_tex bitsize
The txf instruction could be returning something smaller than 32b.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35758>
2025-06-26 02:48:16 +00:00
Timothy Arceri
642c4cf2b2 dril: add BGR{X,A}8888 and RGB{X,A}8888
Needed after a6f534107a

Fixes: a6f534107a ("gbm/dri: Fix color format for big endian.")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35726>
2025-06-26 02:24:37 +00:00
Timothy Arceri
b03cd283d5 dril: use endian independent pipe formats
fourcc_to_pipe_format() was using the endian specific pipe
formats but drilConfigs which guards the supported formats
was using the little endian definitions directly so we would
always skip the formats on big endian. The little endian
pipe format is the correct one to use since that is how
DRM_FORMAT_* formats are defined.

Fixes: 20b3400701 ("dril: rework config creation")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35726>
2025-06-26 02:24:37 +00:00
Timothy Arceri
e446c05a49 dril: fix format typo in lookup helper
Fixes: 20b3400701 ("dril: rework config creation")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35726>
2025-06-26 02:24:37 +00:00
Caio Oliveira
30490de24a intel/executor: allow single line comments in macro lines
Assembler supports them, so allow them on @-macro lines.  For now
we don't bother with multiline comments, if becomes a thing we
can add them later.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35699>
2025-06-26 00:58:02 +00:00
Caio Oliveira
d14fa6683b intel/executor: update SFID names in macros to match recent changes
After commit 88309a9818, SFID names were renamed

- "dp data 1" became "hdc1"
- "thread_spawner" became "ts/btd"

Update macros in executor to use the new SFID names so the
generated assembly can be parsed correctly.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35701>
2025-06-25 17:31:00 -07:00
Antonino Maniscalco
32a6b7ae09 freedreno/decode: expose lookback as a cli option
It is sometimes necessary to exetend the lookback in order to catch
`CP_INDIRECT_BUFFER` packets.

Expose it as a command line option to facilitate that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35752>
2025-06-26 00:10:16 +00:00
Timothy Arceri
eaad90c262 util/cpu: fix broken powerpc linux builds
Fixes: 0ffbfa1d54 ("util/cpu: Teach the Linux code about getauxval()")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35727>
2025-06-25 23:39:23 +00:00
Eric Engestrom
2801c51a9e 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>
2025-06-26 01:02:37 +02:00
Eric Engestrom
1a6fc7006a meson: split subdir for virtio/vdrm and virtio/vulkan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-25 22:21:48 +00:00
Eric Engestrom
6f8c4a7ce1 virtio: move inc_virtio up one folder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723>
2025-06-25 22:21:48 +00:00
Eric Engestrom
a1daeb87a8 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>
2025-06-25 22:21:48 +00:00
Eric Engestrom
d0c7bea727 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>
2025-06-25 22:21:47 +00:00
Eric Engestrom
b4ed35994d meson: bump required meson version to 1.4
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652#note_2973761

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742>
2025-06-25 21:55:16 +00:00
Eric Engestrom
474774ea58 meson: drop error for meson < 1.3 since we require 1.3+ already
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742>
2025-06-25 21:55:16 +00:00
Eric Engestrom
cd9879d632 docs: drop outdated line about meson version
Clearly we don't keep this line updated, so let's just drop it to not
state incorrect information.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742>
2025-06-25 21:55:15 +00:00
Mohamed Ahmed
ab6c55893b nil/copy.rs: Add host copy support for Fermi-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35756>
2025-06-25 21:32:38 +00:00
Faith Ekstrand
3c5b4fdc82 nil: Rename a few GOB types
This adds a single catch-all depth/stencil GOB type instead of Turing
having its own and renames the Fermi GOB type FermiColor because we
don't want to pretend depth/stencil and color are the same anywhere at
the moment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35756>
2025-06-25 21:32:38 +00:00
Faith Ekstrand
c83493cfb2 nil: Fix the GOBType::TuringColor2D description
The sectors were in the wrong order.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35756>
2025-06-25 21:32:37 +00:00
Antonino Maniscalco
8ea0b00a75 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>
2025-06-25 18:24:35 +00:00
Samuel Pitoiset
e91029c82d aco: consider that nir_tex_src_{coord,ddx} can be the first source
Only -1 means it's not found, but 0 is still valid.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35736>
2025-06-25 17:20:02 +00:00
Eric R. Smith
fddd455e9c pan: Teach libpanfrost about YU08/Y010
This is just a matter of adding a few entries to existing
arrays/switch-statements, the rest of the logic stays
unchanged.

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/35318>
2025-06-25 18:40:32 +02:00
Eric R. Smith
f2093b137e dri2: Teach the DRI layer about YU08 and YU10
Add the necessary bits to support YU08/YU10 images.

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/35318>
2025-06-25 18:38:40 +02:00
Eric R. Smith
8c68512b84 gallium/st: Teach the state tracker about YU08 and YU10 formats
Add the necessary bits to the state tracker to support single plane
YUV 420 formats (YU08 and YU10 fourcc codes).

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/35318>
2025-06-25 18:38:37 +02:00
Eric R. Smith
d4f83a96c9 util/format: add support for YU08 and YU10 formats
Adds support for single plane YUV 420 formats (YU08 and YU10 fourcc
codes). The internal layout for these is unspecified and driver
specific.

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/35318>
2025-06-25 18:37:28 +02:00
Pierre-Eric Pelloux-Prayer
bb22697437 winsys/amdgpu: use mesa_loge instead of fprintf
It's helpful on platforms with custom loggers like Android.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:59 +00:00
Pierre-Eric Pelloux-Prayer
c1bfbabca3 radeonsi: use mesa_loge instead of fprintf
It's helpful on platforms with custom loggers like Android.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:59 +00:00
Pierre-Eric Pelloux-Prayer
514a35b5ae winsys/amdgpu: remove return value from amdgpu_init_cs_context
It can't fail.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
2025-06-25 16:19:59 +00:00
Pierre-Eric Pelloux-Prayer
613e9e9c23 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>
2025-06-25 16:19:58 +00:00
Michel Dänzer
ac8dc19512 radeonsi: Don't assert src_va != 0 with CP_DMA_CLEAR
CP_DMA_CLEAR just clears the destination, which doesn't require a valid
source address.

Fixes spurious assertion failures running xserver build tests (with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34958 also
applied).

Fixes: a1b8c6c404 ("radeosi: assert addresses are not NULL in a couple of places")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35718>
2025-06-25 14:35:22 +00:00
Lars-Ivar Hesselberg Simonsen
ef91ad64d5 panvk/v10+: Advertise nullDescriptor support
Advertise support for VK_EXT_robustness2 with only the nullDescriptor
feature enabled.

Except for index buffers, the same implementation should work for v9 as
well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Lars-Ivar Hesselberg Simonsen
228d62479a panvk/v9+: Handle nullDescriptor for texture/image builtins
When loading the texure/image glsl builtins from a descriptor, we
currently apply modifiers to account for the stored value. This does not
work for nullDescriptors.

Therefore, check whether the Descriptor Type field is set to zero, which
would indicate a nullDescriptor, and if so directly return zero.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Lars-Ivar Hesselberg Simonsen
a789867cb4 panvk/v10+: Implement nullDescriptor support
Adds support for nullDescriptors in PanVK by memsetting the relevant
descriptors to zero. This is valid for v9+.

Note that vertex/index buffers require special handling in order to rely
on out-of-bounds behavior.
For index buffers specifically, the approach is only valid for v10+, as
v9 does not have a way to specify index buffer size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Lars-Ivar Hesselberg Simonsen
bbe3c7e1a3 pan/genxml/v9+: Add support for NullDescriptor decode
It's now valuable to know whether a decoded descriptor is completely
zeroed (NullDescriptor) or invalid.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Georg Lehmann
01d20680e2 aco/optimizer: generalize p_create_vector of split vector opt
Foz-DB Navi48:
Totals from 116 (0.14% of 80251) affected shaders:
MaxWaves: 2965 -> 2972 (+0.24%)
Instrs: 145933 -> 144632 (-0.89%); split: -0.91%, +0.02%
CodeSize: 815968 -> 806512 (-1.16%); split: -1.20%, +0.04%
VGPRs: 7240 -> 7144 (-1.33%); split: -1.66%, +0.33%
Latency: 3065858 -> 3063802 (-0.07%); split: -0.11%, +0.05%
InvThroughput: 745395 -> 743506 (-0.25%); split: -0.26%, +0.01%
VClause: 3702 -> 3694 (-0.22%); split: -0.65%, +0.43%
SClause: 3187 -> 3191 (+0.13%)
Copies: 12716 -> 11804 (-7.17%); split: -7.42%, +0.25%
Branches: 3501 -> 3503 (+0.06%)
PreVGPRs: 5400 -> 5327 (-1.35%); split: -1.41%, +0.06%
VALU: 76455 -> 75492 (-1.26%); split: -1.30%, +0.04%
SALU: 23594 -> 23595 (+0.00%); split: -0.00%, +0.01%
VOPD: 1478 -> 1527 (+3.32%); split: +4.67%, -1.35%

Mostly helps FSR4.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35674>
2025-06-25 11:03:30 +00:00
Boris Brezillon
5fe1b95b33 pan: Make it so all pan_image_xxx helpers get passed an image
Some layout related helpers are being passed images subfields. Let's
make things consistent by always passing an image, plus extra parameters
to specify which part of the image is addressed.

While at it, move these helpers protypes/definitions to pan_image.h.

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>
2025-06-25 12:10:53 +02:00
Boris Brezillon
53e5e07c4b pan: Add the concept of modifier handler
There are a few operations that are modifier specific. Instead of
spreading the

   if (is_mod_x) do_x
   else if (is_mod_y) do_y
   ...

pattern, let's add the concept of mod handler so we can abstract away
these operations and get rid of some boiler-plate.

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>
2025-06-25 12:10:53 +02:00
Boris Brezillon
0f90ae39c4 panfrost: Allow AFBC(3D) on Valhall
Now that pan_layout_init() has been fixed to report the correct
slice size, we can do what the comment says and allow AFBC(3D)
on v7+.

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>
2025-06-25 12:10:53 +02:00
Boris Brezillon
92ea3139c1 pan/layout: Don't mix AFBC and non-AFBC properties
AFBC is different from other modifiers (AFRC, u-tiled and linear) in that
metadata is placed in a separate memory section that needs to be properly
sized/aligned. This forces us to have header/body (or metadata/payload)
info stored at the layout level if we don't want to recalculate one
from the other everytime we need to fill descriptors.

Those properties were already present, but some of them were encoded in
non-afbc prefixed fields which makes things very confusing. Let's clarify
that by moving AFBC properties to their own struct, and move the
previously generic {row,surface}_stride_B to a tiled_or_linear struct.
We use a union to combine both.

With this sanitized semantics, we can fix some inconsistencies in our
AFBC layout initialization, hence the functional changes to
test-layout.cpp.

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>
2025-06-25 12:10:53 +02:00
Boris Brezillon
b06f6b81a6 pan/layout: Fix WSI.Import test
We were leaving the depth to zero, but the layout code expects a depth
of at least one.

Add an assert() in pan_image_layout_init() to catch this in the future.

Fixes: 916f75a2a6 ("pan/layout: Test WSI import behavior on all supported format/mods")
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/35555>
2025-06-25 12:10:47 +02:00
Boris Brezillon
f87cd970e3 pan/layout: Document the strict property
pan_image_layout_constraints::strict only applies to imports of AFBC/AFRC
resources. Linear/tiled imports are already strict, and any new modifier
addition should be strict too.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
1f2aa429d8 pan/layout: Get rid of pan_image_[render]block_size_el()
Now that things are handled per-modifier at the pan_layout level, there's
no good reason to keep those helpers.

The BlockSize.Linear test is dropped, since blocksize is assumed to be
<1,1> all the time.

panfrost_resource_create_with_modifier() is changed to make use of the
pan_image_get_wsi_row_pitch() helper to calculate the DUMB_BUFFER
stride/width.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
e6f8cab698 pan/layout: Split the logic per modifier
Prepare for mod handlers by splitting the layout logic per modifier.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
18f87b6ada pan/format: De-duplicate get_plane_blocksize()
Expose a pan_format_get_planed_blocksize() so we don't have to duplicate
the logic in test-layout.cpp.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
4bf983fb26 pan/afbc: Add the pan_afbc_{super,render}block_size_el() helpers
Those are just pan_afbc_{render,super}block_size_el() but with the
size returned in number of elements instead of pixels. This is only
relevant for YUV-formats whose block extent is bigger than one pixel.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
8b93e8c33e pan/layout: Get rid of pan_image_surface_{offset,stride}()
For AFBC images it's not clear what the offset/stride refers to (header
or body). Let's clear the confusion by dropping the helper and letting
the callers dereference the layout directly.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
0825eccb47 pan/image: Get rid of pan_iview_get_surface()
No longer used, get rid of it.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
8a8ea487de pan/desc: Split the attachment descriptor emission per modifier
Will be needed for the pan_mod_handler abstraction we'll introduce later
on.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
d4f89986ff pan/genxml: Get rid of the Plane descriptor
We use specialized plane descriptors now almost everywhere except when
we want to get the plane descriptor size, and we can use a null plane in
that case, so let's get rid of the old definitions.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
4b3be4a4a6 pan/texture: Split the texture payload emission logic per modifier
This is a preliminary step to allow delegating texture payload emission
to a modifier handler.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
442be34441 pan/genxml: Introduce per-type plane descriptors
It makes it easier to decipher when reading a dump, and it will also
make overlapping fields impossible to set twice once we've converted the
texture logic to use those.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
5b654a07b1 pan/afxc: s/pan_format_supports_afxc/pan_afxc_supports_format/
Let's stay consistent with the rest of the afxc helpers and
prefix this helper with pan_afxc.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
1522fdc371 pan/afbc: Fix header alignment requirement on Midgard
This is actually 64 byte on Midgard. This makes pan_afbc_body_align()
and pan_afbc_header_align() return the same value, so let's define
one as a wrapper around the other.

Not flagged as a fix because pan_image_layout() init is handling AFBC
header alignment properly on Midgard already, but we want that fixed
to cleanup the image layout logic.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
883ce63db5 pan/genxml: Reconcile AFBC RT properties naming on v5+
Pick the same names we use on v9+ for the "Render Target AFBC Overlay"
properties that exist on v5+ too.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
a2e9ce39e9 pan/layout: Drop pan_image_slice_layout::afbc::{stride_sb,nr_sblocks}
Those fields are only used for AFBC packing which has deep knowledge
of AFBC layouts and can easily recover the row_stride/size in superblock
from other layout fields.

By getting rid of these two fields we also reduce the number of ways we
can express the same information, which makes things less confusing
overall.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
abe23e1cd0 pan/layout: Use uint64_t types for offsets and sizes
As things are now, the pan_image_slice_layout::{offset,size}_B calculation
can exceed UINT32_MAX, and we silently droppin the upper 32-bit on the
floor. Same goes for the crc offset. Let's use a uint64_t to make sure
that doesn't happen.

While at it, move the two 64-bit field next to each other to avoid
padding, and document what size_B encodes.

It's hard to find the commit that introduced the problem with all the
code motion that happened this this struct was introduced, so I'll
just flag for backport.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
dad53edc9c pan/layout: Relax alignment constraints on pre-v7 for imports of linear/u-tiled
Commit f64a7c1506 ("pan/layout: Check the wsi_layout consistency in
wsi_row_pitch_to_row_stride()") introduced stricter alignments on pre-v7
for linear/tiled imports. It turns out alignment constraints on pre-v7 are
weaker than they are on v7+, and this got lost in the refactoring.

Let's fix linear_or_tiled_row_align_req() helper so we can import images
that don't have their base address/row_pitch aligned on a cacheline, and
only cacheline alignment for images we create ourselves.

Also add unittests to make sure we don't regress that in the future.
With this being tested, we can also use
pan_linear_or_tiled_row_align_req() in offset_align_for_mod()
(test-layout.cpp) instead of open-coding it.

Fixes: f64a7c1506 ("pan/layout: Check the wsi_layout consistency in wsi_row_pitch_to_row_stride()")
Fixes: 916f75a2a6 ("pan/layout: Test WSI import behavior on all supported format/mods")
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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
25059a4576 pan/layout: Fix get_plane_blocksize()
The blocksize of for R8G8_R8G8_xxx formats is 4 bytes, not 2 bytes.

Fixes: 4d9a4e8228 ("pan/image: Teach pan_image/layout about planar images")
Fixes: 916f75a2a6 ("pan/layout: Test WSI import behavior on all supported format/mods")
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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
1389a23708 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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
a6ba8019d4 panvk: Check the return of pan_image_layout_init()
Fail the image creation if the image layout initialization fails instead
of silently ignoring the problem.

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/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
e25a91d919 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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
c4f1dd1e2d panvk: Make sure we don't use AFBC on images that are too big
AFBC headers point to their tile with a 32-bit offset, meaning the last
header has to cross the entire body to reach its tile, so we can't
have a body size that's bigger than UINT32_MAX.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
700f179bc8 panfrost: Let ::can_create_resource() report when the layout init failed
We will soon make pan_image_layout_init() return false even for
non-explicit layout case, which will allow panfrost_can_create_resource()
to properly report when the resource size doesn't fix some HW limits.
But before we can do that, we need to let panfrost_resource_setup()
return an error instead of asserting() that pan_image_layout_init()
always return true. Add a new panfrost_resource_try_setup() helper
and define panfrost_resource_setup() as wrapper around it with the
existing assert(valid), and make panfrost_can_create_resource() use the
new helper.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
4c9d3bc171 panfrost: Make sure we don't use AFBC on resources that are too big
AFBC headers point to their tile with a 32-bit offset, meaning the last
header has to cross the entire body to reach its tile, so we can't
have a body size that's bigger than UINT32_MAX.

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>
2025-06-25 12:10:37 +02:00
Boris Brezillon
737fc5d3c1 pan/genxml: Make sure we catch overflows on 32-bit integer fields
If we store the temporary value in a [u]int32_t, the result might be
silently truncated, making the overflow check in the u_pack helpers
useless.

Make sure we use 64-bit fields as soon as the size is greater than 31
bits to prevent that.

It forces us to fix some types in the xml and helper arguments (sint
wrongly defined as uint) and add explicit casts on u32 subtraction
whose result is stored in an s32.

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/35555>
2025-06-25 12:10:37 +02:00
David Rosca
189bf9fe9a radv/video: Prefer visible VRAM for host visible context buffers
In most cases this has little to no effect, but AV1 decode on VCN5
is up to 40% slower when the context buffer is in GTT.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35684>
2025-06-25 09:39:11 +00:00
Christoph Pillmayer
f5498fda2a panvk: Fix occlusion query oq_chain order
We were pointing the new_node.next at the previous node but trying to
iterate over the nodes starting at the first one.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35687>
2025-06-25 08:15:54 +00:00
Christoph Pillmayer
d1448e3243 panvk: Add cs_single_link_list
The linked list will be used to store occlusion queries to signal after a
renderpass.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35687>
2025-06-25 08:15:54 +00:00
Samuel Pitoiset
2d4b4a296e radv: move pipeline layout implementation to radv_pipeline_layout.c/h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35708>
2025-06-25 07:52:12 +00:00
Samuel Pitoiset
46f78b40f0 radv: simplify add_descriptor_set()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35708>
2025-06-25 07:52:12 +00:00
Samuel Pitoiset
f5a71a1262 radv: rename border_color_slot to border_color_index
To match future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35708>
2025-06-25 07:52:12 +00:00
Samuel Pitoiset
c08a97633c radv: remove an useless check about custom border color
The Vulkan spec is pretty clear and says:
 "VUID-VkSamplerCreateInfo-None-04012
  The maximum number of samplers with custom border colors which can be
  simultaneously created on a device is implementation-dependent and
  specified by the maxCustomBorderColorSamplers member of the
  VkPhysicalDeviceCustomBorderColorPropertiesEXT structure"

So this check can be removed because it would be an application bug
otherwise.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35708>
2025-06-25 07:52:12 +00:00
Martin Roukala (né Peres)
7272323d48 zink/ci: run glcts and piglit on NVK's ad106
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35546>
2025-06-25 07:34:51 +00:00
Martin Roukala (né Peres)
15111a6e36 nvk/ci: run on our jobs on ad106
We currently only have 2 hosts with RTX 4060 GPUs, with more expected
to be added in a near future in order to enable pre-merge testing for
NVK.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35546>
2025-06-25 07:34:51 +00:00
Martin Roukala (né Peres)
dfecd38519 nvk/ci: uprev the kernel to v6.16-rc2
This allows us to use the GSP v570 which has been reported to be more
stable than the previous v535.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35546>
2025-06-25 07:34:51 +00:00
Martin Roukala (né Peres)
d1e9b56dd1 nvk/ci: split the common ci-tron parts to their own job
This will allow us to add new DUTs without duplicating the driver-level
variables.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35546>
2025-06-25 07:34:51 +00:00
Valentine Burley
a7f970ee6d zink/ci: Add glcts and piglit job on Cezanne with RADV
AMD Cezanne is Vega, where we already have radeonsi coverage on Raven.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35682>
2025-06-25 07:09:08 +00:00
Valentine Burley
fc9dbe4e01 zink/ci: Rename zink-radv Valve rule to make it unambiguous
Also drop redundant build-piglit.sh rule, as changes to .gitlab-ci are
already tracked by the core rules.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35682>
2025-06-25 07:09:07 +00:00
Valentine Burley
57f97ad64a radeonsi/ci: Add glcts and piglit job on Mendocino
Like Van Gogh, Mendocino is RDNA 2. This new job is intended to replace
the existing radeonsi-vangogh-glcts job, which couldn't run the full
test suite pre-merge.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35682>
2025-06-25 07:09:07 +00:00
Valentine Burley
e5323ff07b radeonsi/ci: Rename radeonsi Collabora rule to make it unambiguous
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35682>
2025-06-25 07:09:06 +00:00
Valentine Burley
1e31ebc21e radeonsi/ci: Move full radeonsi-stoney-glcts-piglit job to pre-merge
The full job previously ran in the nightly pipeline, but its runtime is
within the recommended 10-minute limit reported by deqp-runner. This
allows us to run it pre-merge and remove the separate nightly job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35682>
2025-06-25 07:09:05 +00:00
Georg Lehmann
1819e1caef radv: keep fp8 conversions vectorized
Totals from 11 (0.01% of 80265) affected shaders:
MaxWaves: 102 -> 104 (+1.96%)
Instrs: 24105 -> 21027 (-12.77%)
CodeSize: 190744 -> 167480 (-12.20%)
VGPRs: 1968 -> 1920 (-2.44%)
Latency: 91890 -> 90302 (-1.73%); split: -2.86%, +1.13%
InvThroughput: 100616 -> 98496 (-2.11%); split: -2.24%, +0.13%
VClause: 802 -> 759 (-5.36%); split: -6.48%, +1.12%
Copies: 3131 -> 3329 (+6.32%); split: -0.48%, +6.80%
PreVGPRs: 1816 -> 1802 (-0.77%)
VALU: 12543 -> 11399 (-9.12%)
SALU: 4635 -> 2859 (-38.32%)
VOPD: 1133 -> 1195 (+5.47%); split: +7.33%, -1.85%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35676>
2025-06-25 05:34:48 +00:00
Georg Lehmann
e6d208b1f9 nir/opt_shrink_vectors: also split vecs into distinct smaller vecs if possible
Foz-DB Navi48:
Totals from 17 (0.02% of 80265) affected shaders:
Instrs: 75085 -> 74912 (-0.23%); split: -0.23%, +0.00%
CodeSize: 428968 -> 427028 (-0.45%); split: -0.45%, +0.00%
Latency: 1306841 -> 1306080 (-0.06%); split: -0.06%, +0.00%
InvThroughput: 598998 -> 598719 (-0.05%)
Copies: 15733 -> 15561 (-1.09%)
Branches: 2435 -> 2422 (-0.53%)
PreVGPRs: 1723 -> 1721 (-0.12%)
VALU: 43019 -> 42847 (-0.40%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35676>
2025-06-25 05:34:48 +00:00
Georg Lehmann
22d7dd69b2 nir/shrink_vectors: shrink larger vectors too
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35676>
2025-06-25 05:34:48 +00:00
Iván Briano
d964b8d5fa anv: don't report custom sample locations for sample count 1
We can't actually enable MSAA for images with sample count 1, and
without MSAA active, the sample location machinery does not get used.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35504>
2025-06-24 19:44:34 +00:00
Eric Engestrom
127926977a lavapipe/ci: explicitly state in the job name which test is being run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35683>
2025-06-24 19:24:45 +00:00
Eric Engestrom
7f66823fd7 lavapipe/ci: move job timeout definition to jobs
The `.lavapipe-rules` job template cannot know what the job will run and how long it will take.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35683>
2025-06-24 19:24:45 +00:00
Eric Engestrom
686b774952 lavapipe/ci: drop redundant .lavapipe-rules in .lavapipe-test
All the jobs (except two, fixed here) already re-specify whether they
want `.lavapipe-rules` or `.lavapipe-manual-rules`, so drop this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35683>
2025-06-24 19:24:44 +00:00
Eric Engestrom
90439f6af5 lavapipe/ci: promote vkd3d job from nightly to merge pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35683>
2025-06-24 19:24:43 +00:00
Eric Engestrom
afc0b7bed3 lavapipe/ci: drop unneeded MESA_VK_IGNORE_CONFORMANCE_WARNING
The non-conformance warning on lavapipe was removed 3 years ago, in
bfebf51571 ("lavapipe: state latest conformance tests passed")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35683>
2025-06-24 19:24:43 +00:00
Eric Engestrom
9d970a442c lavapipe/ci: drop redundant stage:
It's already defined by `.lavapipe-rules`/`.lavapipe-manual-rules`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35683>
2025-06-24 19:24:42 +00:00
Caterina Shablia
3653085b45 panvk: add panvk_as_alloc and panvk_as_free helpers
In panvk we often need to allocate and free address ranges in the
address space represented by panvk_device::as::heap. In most
situations, panvk_device::as::lock has to be held while performing
an operation on panvk_device::as::heap, so there are a lot of
instances of exactly the same 3 locs locking the as::lock,
allocating or freeing a range in as::heap, and unlocking the lock.
These helpers are the less verbose replacements for these 3 locs
that should be used going forward.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35692>
2025-06-24 18:53:04 +00:00
Caterina Shablia
e16d4b3eba panvk: move panvk_image_plane_bind to the beginning of the file
We'll need this function in panvk_CreateImage in order to implement
sparse images.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35692>
2025-06-24 18:53:04 +00:00
Caterina Shablia
09814eb32a panvk: prepare for multiple queue types
Make the queue entry points forward to the implementations
appropriate for the queue's type.

Rename panvk_queue to panvk_gpu_queue.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35692>
2025-06-24 18:53:04 +00:00
Boris Brezillon
33060373c0 panvk: Make panvk_device.{c,h} panvk_queue agnostic
We will soon have a panvk_bind_queue object to expose bind queues,
so let's modify the code to make this reasonably clean by letting
the CSF/JM backing keep their queue object opaque.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-By: Caterina Shablia <caterina.shablia@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35692>
2025-06-24 18:53:04 +00:00
Yiwei Zhang
4d972bce5b venus: use more common wsi codes
This has been unblocked a while back after common queue adoption.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35705>
2025-06-24 18:38:32 +00:00
Yiwei Zhang
25d7c6cd4d venus: relocate tls ring hint from wsi init to queue submission
This ensures synchronous shader compilation doesn't occur on most render
threads.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35705>
2025-06-24 18:38:32 +00:00
Adrián Larumbe
cf4a137459 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>
2025-06-24 18:11:09 +00:00
Adrián Larumbe
b351600436 panfrost: Implement pipe screen's resource_label interface
Extend the panfrost resource screen interface with a function that lets
the pipe resource the BO belongs to share a label pointer for debugging
purposes.

Then append this resource label to the existing driver tag and label the
backing kernel BO accordingly.

A panfrost_resource::user_label field was added to store the argument
user label. Because in the case of an AFBC-packed resource, user tagging
can happen before the packed BO is created, we need to store it
separately, so that all the necessary label fields are available before
a complete label can be given to the kernel driver.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:09 +00:00
Adrián Larumbe
a4ffd2395f mesa: Implement label sharing from GL objects with UM drivers
At the moment, the string passed to glObjectLabel() stays only within the
confines of GL objects. It would be nice if that textual description could
be made known to the underlying drivers somehow.

Expand the pipe screen function interface to allow passing GL object labels
down to the UM driver that handles a particular pipe screen.

Not all GL objects have an associated GL resources, so this behaviour has
been implemented for those which are associated with at least one.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:08 +00:00
Adrián Larumbe
3bd0e58d66 panfrost: Expand BO label for panfrost resources
When creating a BO that backs a panfrost resource, append additional
information. To this end, add a new helper that composes it from
a base resource label and some parameters of interest.

To avoid dealing with situations in which a BO is referenced by multiple
resources, we only allow the BO creator to claim ownership at resource
creation time. There are, however, code paths in which a panfrost
resource's BO is assigned from an existing resource. In those cases, we
transfer ownership between resources.

In those cases, we assign the old BO a label in static memory without
passing it down to the kernel, because in a majority of times that BO
will immediately reach a refcnt of 0, leading to its destruction. That
way we avoid a useless round-trip to the kernel through the BO labelling
ioctl().

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:08 +00:00
Adrián Larumbe
0f22729d51 panfrost: Flag resources with imported BOs
In preparation of a future commit in which UM will be able to pass
down a label from the GL layer and append it to the existing BO's driver
label, we want to disallow resource handling of imported BO labels.

To this end, add a boolean flag to the panfrost_resource definition so
that future commits can take this into account when managing resource
labels.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:08 +00:00
Adrián Larumbe
b9b1c5438e panfrost: Label kernel BO's for newly created objects
To this end, provide a helper that passes the label to the kmod layer
upon demand. Helper returns the old label, in preparation for future
commits in which the label might not be in static RO memory, but
dynamically alocated instead, and its lifetime managed by the resource
layer.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:07 +00:00
Adrián Larumbe
32b128be01 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>
2025-06-24 18:11:07 +00:00
Adrián Larumbe
28c43385d1 pan/kmod: Add Panfrost BO Labeling IOCTL support
Implement kmod->ops->bo_label operation for Panfrost kmod driver.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:07 +00:00
Adrián Larumbe
a05b6829c8 pan/kmod: Add Panthor BO Labeling IOCTL support
Implement kmod->ops->bo_label operation for Panthor kmod driver.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:07 +00:00
Adrián Larumbe
9fa730b15d drm-uapi: Sync panfrost_drm.h
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:06 +00:00
Adrián Larumbe
e64de493cf drm-uapi: Sync panthor_drm.h
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:06 +00:00
Adrián Larumbe
0c9841ec7d pan/kmod: Add BO-labeling kernel module operation
Both Panfrost and Panthor are expected to implement these in a
device-specific way.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
2025-06-24 18:11:06 +00:00
Romaric Jodin
bc973d687c 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>
2025-06-24 17:30:54 +00:00
Georg Lehmann
21523dad96 radv/nir/lower_cmat: use nir_src_as_deref
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35633>
2025-06-24 17:12:34 +00:00
Georg Lehmann
48fc8c8d1c radv/nir/lower_cmat: set optimal load/store alignment
Allows vectorizing load/stores with sub dword types or with robustness.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35633>
2025-06-24 17:12:33 +00:00
Georg Lehmann
ed2ecf9ef8 radv/nir/lower_cmat: share cmat_load/cmat_store code
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35633>
2025-06-24 17:12:33 +00:00
Boris Brezillon
f3f67823c4 pan/format: Add an entry for BGR8 to the blendable table
Without it, BGR8 gets a NULL entry, and it trips out the GPU when it
gets passed a blend descriptor with RGB8 as a format to convert to.

Fixes: bba4785f60 ("pan/format: Add render target support for R8G8B8/B8G8R8 formats")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35715>
2025-06-24 16:41:01 +00:00
Mike Blumenkrantz
ec0387f13f zink: enable image2DViewOf3DSparse with maint9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35714>
2025-06-24 16:18:46 +00:00
Georg Lehmann
4ac6aae3a4 radv/nir/lower_cmat: fix gfx11 B->ACC conversion
Of course I messed up the one path that's not tested by CTS.

Fixes: 249ccc6b4c ("radv/nir/lower_cmat: implement use conversions/transpose")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35713>
2025-06-24 15:53:52 +00:00
Matt Turner
7d329d615a vulkan: Generate files with newline at end
These generator scripts use the `write` function that, unlike `print`,
doesn't print a trailing newline. So let's add one to the template.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
2025-06-24 14:01:04 +00:00
Matt Turner
6a47531440 intel: Generate files with newline at end
This generator scripts uses the `write` function that, unlike `print`,
doesn't print a trailing newline. So let's add one to the template.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
2025-06-24 14:01:04 +00:00
Matt Turner
6100dbc3d0 compiler: Generate files with newline at end
These generator scripts use the `write` function that, unlike `print`,
doesn't print a trailing newline. So let's add one to the template.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
2025-06-24 14:01:04 +00:00
Ashley Smith
2ce201707e mesa: Add support for GL_EXT_shader_clock
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35630>
2025-06-24 13:21:28 +00:00
Georg Lehmann
b729ad1742 nir/loop_analyze: consider movs/vecs free
They are free more likely than not.

Foz-DB Navi31:
Totals from 462 (0.58% of 80251) affected shaders:
Instrs: 1464013 -> 1868466 (+27.63%)
CodeSize: 8476352 -> 10745544 (+26.77%)
VGPRs: 27412 -> 27560 (+0.54%)
SpillSGPRs: 0 -> 16 (+inf%)
SpillVGPRs: 83 -> 76 (-8.43%)
Scratch: 6072832 -> 6071808 (-0.02%)
Latency: 19282476 -> 19552323 (+1.40%); split: -0.11%, +1.51%
InvThroughput: 2198357 -> 2258490 (+2.74%); split: -0.47%, +3.21%
VClause: 32986 -> 43491 (+31.85%)
SClause: 72760 -> 126112 (+73.33%)
Copies: 165286 -> 223368 (+35.14%)
Branches: 60530 -> 79743 (+31.74%); split: -0.03%, +31.77%
PreSGPRs: 24885 -> 25077 (+0.77%)
PreVGPRs: 23004 -> 22494 (-2.22%); split: -2.26%, +0.04%
VALU: 760978 -> 898136 (+18.02%)
SALU: 187786 -> 252995 (+34.73%); split: -0.03%, +34.75%
VMEM: 58469 -> 69164 (+18.29%); split: -0.07%, +18.36%
SMEM: 87926 -> 158175 (+79.90%); split: -0.00%, +79.90%
VOPD: 580 -> 732 (+26.21%); split: +31.38%, -5.17%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35686>
2025-06-24 12:18:47 +00:00
Georg Lehmann
b1290fdf20 nir/loop_analyze: handle vector selections properly
Consider all conditions, not just the first.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35686>
2025-06-24 12:18:47 +00:00
Georg Lehmann
47aba15489 nir/loop_analyze: always consider comparisions between induction var and constant free
There is no reason why this should be restricted to single uses.

Foz-DB Navi31:
Totals from 21 (0.03% of 80251) affected shaders:
Instrs: 54424 -> 65851 (+21.00%)
CodeSize: 286688 -> 346896 (+21.00%)
Latency: 2980310 -> 2959904 (-0.68%)
InvThroughput: 403744 -> 400782 (-0.73%)
VClause: 923 -> 1316 (+42.58%)
SClause: 1217 -> 1705 (+40.10%)
Copies: 3226 -> 3393 (+5.18%); split: -0.87%, +6.04%
Branches: 1014 -> 1130 (+11.44%); split: -0.39%, +11.83%
PreSGPRs: 1327 -> 1306 (-1.58%)
PreVGPRs: 1896 -> 1868 (-1.48%)
VALU: 36083 -> 43560 (+20.72%)
SALU: 4471 -> 4708 (+5.30%); split: -2.75%, +8.05%
VMEM: 2225 -> 2743 (+23.28%)
SMEM: 1662 -> 2273 (+36.76%); split: -0.06%, +36.82%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35686>
2025-06-24 12:18:47 +00:00
Samuel Pitoiset
dc4be89e7c radeonsi: add a way to override the disk cache key with radeonsi-build-id
This is similar to radv-build-id which is mainly used on SteamOS for
shaders pre-compilation.

For RadeonSI, it also useful to have this option to force the disk
cache key to be uniq for redistributed shaders accross machines when
it's safe.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35629>
2025-06-24 09:34:50 +00:00
Erik Faye-Lund
2815287f55 panfrost/ci: add new 8x/16x msaa fails on t760
These tests are all failing on t760 after enabling 8x and 16x MSAA.
Let's mark them as expected until the issue has been root-caused.

Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35689>
2025-06-24 08:47:29 +00:00
Erik Faye-Lund
e3c50ddfaf panfrost/ci: explain g52 fails
I already marked these as expected fails on G57, but missed the
corresponding failures on G52 because those were moved to post-merge
while the feature here was in development.

Fixes: 350eccd032 ("Uprev Piglit to a0a27e528f643dfeb785350a1213bfff09681950")
Fixes: 423f3fd485 ("panfrost: enable 8x and 16x msaa modes when supported")
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35689>
2025-06-24 08:47:29 +00:00
Antonio Ospite
c9a8e1f49a ci/android: get aapt from the build-tools from Google instead of Debian
The aapt package form Debian might not be recent enough to install the
packages from Android CTS.

Resulting in an error like:

```
03:12:09.302: Module(s) with run failure(s):
03:12:09.302:     x86_64 CtsGraphicsTestCases: com.android.tradefed.targetprep.TargetSetupError[AAPT_PARSER_FAILED|520050|DEPENDENCY_ISSUE]: AaptParser failed for file CtsGraphicsTestCases.apk. The APK won't be installed
```

So get aapt from the build-tools matching the ANDROID_SDK_VERSION
corresponding to the Android version and CTS version used in the tests,
to ensure compatibility.

This effectively reverts the changes from commit b3c07fe722
(ci/android: Use aapt from Debian packages, 2025-04-21), but moving the
code around a bit.

The build-tools are not taken as LAVA overlay because LAVA is not able
to handle zip files, and the file in not big enough to be worth any
repacking effort.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35688>
2025-06-24 08:21:18 +00:00
Antonio Ospite
8383d28b44 ci/android: test that all available modules ran in android-cts-runner.sh
If an Android CTS module does not even start the amount of `FAILED`
tests in the invocation summary could still show up as 0, passing the
sanity check on the completion status, and `cts-tradefed` would not
reflect the module-level failure in the return value either.

So explicitly check that all included modules completed and, in case
they didn't, propagate this kind of failure to `EXIT_CODE`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35688>
2025-06-24 08:21:17 +00:00
Georg Lehmann
a61b564cf5 radv/ci: test VK_NV_cooperative_matrix2
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34793>
2025-06-24 07:14:36 +00:00
Georg Lehmann
8256097c0c radv: advertise VK_NV_cooperative_matrix2/cooperativeMatrixConversions behind an env var
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34793>
2025-06-24 07:14:35 +00:00
Georg Lehmann
249ccc6b4c radv/nir/lower_cmat: implement use conversions/transpose
This could potentially be improved using packed 32bit subgroup ops,
but what we actually care about (gfx12 ACC -> B) is free.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34793>
2025-06-24 07:14:34 +00:00
Georg Lehmann
bdd2c7b9f2 spirv: implement CooperativeMatrixConversionsNV
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34793>
2025-06-24 07:14:34 +00:00
Georg Lehmann
8c4225b99b nir: add cmat_transpose
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34793>
2025-06-24 07:14:34 +00:00
Ryan Mckeever
bba4785f60 pan/format: Add render target support for R8G8B8/B8G8R8 formats
Add render target support to the existing R8G8B8/B8G8R8 formats
and add the B8G8R8_UNORM format.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
6c871b1a7d st/mesa: Support RGB888/BGR888 formats
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
a4d5012a66 egl/wayland: Support RGB888/BGR888 formats
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
c86b3e1ae9 egl/wayland: Set EGL_NATIVE_VISUAL_ID for EGLConfig
We want to make sure that EGL doesn't de-duplicate configs with
'identical' properties but different visual IDs. This way clients can
explicitly select which format they want to use (e.g., XRGB vs. RGB).

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
53a4960f2e gbm/dri: Support RGB888/BGR888 formats
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
4848fbf774 gallium: Support RGB888/BGR888 formats
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
1f33be6503 st/mesa: Do not specify PIPE_FORMAT_R8G8B8X8_UNORM twice for RGB
PIPE_FORMAT_R8G8B8X8_UNORM is already the first format in
DEFAULT_RGB_FORMATS, so removing it should make no difference.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Ryan Mckeever
0cafd65a31 frontend/dri: Replace tabs with spaces
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:47 +00:00
Faith Ekstrand
42097772f9 nil: Improve Tiling and GOBType documentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:12 +00:00
Mohamed Ahmed
f0c34f1702 nil/copy: Add Blackwell+ GOB layouts for host copy
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:12 +00:00
Faith Ekstrand
69cd6069c9 nil/copy: Add a simpler CopyGOBLines trait
This lets us implement all the complex logic of copying a GOB in a
central place and all we really need for each GOB type is an iterator
function.  There's a bit of duplication here with the copy functions but
it's still better than what we had before.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:12 +00:00
Mohamed Ahmed
0ad57c169a nil/copy: Rename Copy16B to CopyBytes and add a copy_8b method
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:12 +00:00
Faith Ekstrand
9981227dae nil: Add new GOBTypes for blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:11 +00:00
Faith Ekstrand
76e72d63f0 nil: Match on gob types in the tiled image copy code
This depends on GOB types but we really only support Turing for now.
Add the match statement anyway so we panic if we see an unsupported GOB
type instead of pretending it's TuringColor2D and copying anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:11 +00:00
Faith Ekstrand
d8c43ff46a nil: Use GOBType::choose() to pick gob kinds for modifiers
The gob kind and sector layout should map directly to a unique GOBType.
We can now also advertise zero modifiers for GOB types that don't
support modifiers.  Currently this is redundant with the earlier return
for depth/stencil images but it should help protect us in the future
when adding new GOB types.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:11 +00:00
Faith Ekstrand
52b8072040 nil: Add more GOBType enums
We know Turing+ is different because it's different in the NVIDIA
modifiers and because we've implemented host image copies and the
current implementation doesn't work on Volta and earlier.  We also know
that Z/S is different from color and that there's some sort of 3D GOB
concept we haven't reverse engineered yet.  Let's make everything a as
explicit as we can.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35660>
2025-06-24 02:58:10 +00:00
Karol Herbst
0012715b8f rusticl/queue: reuse vector between queue iterations
There is no reason not to and this will get rid of some pointless
reallocations.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:43 +00:00
Karol Herbst
4254e13300 rusticl/queue: use let else statement when receiving new events
Gets rid of an unwrap() call.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:43 +00:00
Karol Herbst
513a7ca417 rusticl/queue: do not block when dropping a queue
There is no need for a blocking wait anymore now that event processing
doesn't depend on the queue anymore.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:43 +00:00
Karol Herbst
162ab66c2e rusticl/event: convert queue to Weak reference
This works around applications leaking cl_event references, which
prevented queues to be destroyed and GPU context resources to be freed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:42 +00:00
Karol Herbst
8291331c43 rusticl/event: check the queue timed to detect enabled profiling in call
Gets rid of an unwrap and the dependency on the queue.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:42 +00:00
Karol Herbst
815373fe62 rusticl/event: change Queue argument to Context in EventSig
Will allow us to drop the strong reference to the queue in events.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:41 +00:00
Karol Herbst
f03f79d9c6 rusticl/queue: signal events directly on panics
This works better than checking if the worker thread still exists. It also
will allow us to turn the Event -> Queue dependency into a Weak one more
easily.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
2025-06-24 01:49:40 +00:00
Lucas Stach
906d4d5dfe etnaviv/ci: update expectation after dither fixes
Remove the fails that were caused by precision issues when trying
to dither a 4bpc format.

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/35673>
2025-06-23 23:27:24 +00:00
Lucas Stach
46cb190944 etnaviv: improve dither enable conditions
Take into account the alpha blend state of all render targets when deciding
whether it is okay to enable dithering. Do not dither render targets with
less than 5 bits of precision per channel as this leads to visible artifacts.

GC7000 fails to blend RGBA4444 correctly when dithering is disabled but
PE_LOGIC_OP_DITHER_MODE is set to anything other than 0, so set this state
depending on whether dithering is actually enabled.

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/35673>
2025-06-23 23:27:24 +00:00
Jesse Natalie
07af41b0a2 microsoft/compiler: Separate 'advanced texture ops' from SM6.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35664>
2025-06-23 23:10:15 +00:00
Christian Gmeiner
e64390a056 etnaviv: nir: Move pre-halti5 tex lowering
Let's have all the texture lowerings in one place.

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/35696>
2025-06-23 22:50:38 +00:00
Yiwei Zhang
84cb568150 vulkan/wsi: drop wsi_common_get_images
..since there's no users of it now.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35702>
2025-06-23 22:05:19 +00:00
Yiwei Zhang
8d8bdd2b1b dozen: drop redundant dzn_swapchain_get_image api
This drops the last usage of wsi_common_get_images.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35702>
2025-06-23 22:05:19 +00:00
David Neto
e9b9f1f764 spirv: spirv-to-c-array: use '-' to specify stdin
The spirv-to-c-array.py script assembles a SPIR-V module,
then disassembles it, capturing that text, then re-assembles
that text, providing it on stdin. But this last invocation of
spirv-as must use '-' to specify that the text input appears
on stdin.

Currently it always errors out, complaining that there must
be exactly one input file.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35691>
2025-06-23 21:24:56 +00:00
Dave Airlie
29c599ffea anv: only expose VK_KHR_cooperative_matrix on devices with hw instructions.
Currently anv exposes this on lots of devices, with the intent to be better
than apps can give, but I think this is wrong for a couple of reasons.

Apps want to know if hw exposes the fast path, Vulkan is meant to be explicit,
and telling llama.cpp if the fast path exists lets it make smarter decisions.

It seems unless someone heavily optimises the slow path, that CPU is usually
faster than GPU with llama-bench unless the hw path exists.

v2: added INTEL_LOWER_DPAS support

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35564>
2025-06-23 21:06:51 +00:00
Konstantin Seurer
4cbbdc0a50 vulkan: Pass a structure to most BVH build callbacks
It is annoying to change all function signatures when a driver needs
more information. There are also some callbacks that have a lot of
parameters and there have already been bugs related to that.

This patch tries to clean the interface by adding a struct that contains
all information that might be relevant for the driver and passing that
to most callbacks.

radv changes are:
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>

anv changes are:
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

turnip changes are:
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>

vulkan runtime changes are:

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35385>
2025-06-23 20:43:43 +00:00
Konstantin Seurer
a73824a59d vulkan: Remove bvh_state::leaf_node_size
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35385>
2025-06-23 20:43:43 +00:00
Konstantin Seurer
28713789ad vulkan: Replace get_*_key with get_build_config
It is a cleaner API and gives more control about the build to the
driver.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35385>
2025-06-23 20:43:43 +00:00
Konstantin Seurer
37869a9bc2 vulkan: Move the build options to the accel struct header
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35385>
2025-06-23 20:43:42 +00:00
Konstantin Seurer
6cae6e8708 vulkan: Allow reserving scratch memory for encode passes
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35385>
2025-06-23 20:43:42 +00:00
Alyssa Rosenzweig
f336b4d1dd hk: enable snorm rendering
now that blending works.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35519>
2025-06-23 19:38:27 +00:00
Alyssa Rosenzweig
d37bf148d2 nir/lower_blend: fix snorm factor clamping
The spec says (emphasis mine):

  If the color attachment is fixed-point, the components of the source and
  destination values **AND BLEND FACTORS** are each clamped to [0,1] or [-1,1]
  respectively for an unsigned normalized or signed normalized color attachment
  prior to evaluating the blend operations. If the color attachment is
  floating-point, no clamping occurs.

However, neither the CTS nor any hardware implement this semantic.

For unsigned normalized formats, the definitions are roughly equivalent (except
perhaps around constant colours). 0 <= x <= 1 implies that 0 <= 1 - x <= 1.
Therefore if the source/destination colours are clamped to [0, 1], then their
complements are also in [0, 1], so clamping any blend factor (except constant
colour) has no effect if the source/dest were already clamped.

For signed normalized formats, however, this difference matters. -1 <= x <= 1
implies that 0 <= 1 - x <= 2... so to implement the spec text faithfully, we
would need to clamp again the complemented colour blend factors to return back
to signed normalized range. Software blending implementations can of course do
that... but doing so causes CTS fails, as the CTS reference renderer does not do
this.

This commit adjusts nir_lower_blend to match what actual hardware does, what CTS
requires, and what the spec should have said.

See https://gitlab.khronos.org/vulkan/vulkan/-/issues/4293 for the spec
resolution.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35519>
2025-06-23 19:38:27 +00:00
Yiwei Zhang
09d6427c13 docs/venus: keep requirements up to date
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35680>
2025-06-23 19:16:34 +00:00
Yiwei Zhang
a441470315 docs/venus: drop Virtio-WL section
virtio-gpu cross-domain context supersedes the downstream virtio-wl.
However, there's no compositor working well with cross-domain context
yet (sommelier from ChromeOS only works robustly with virtio-wl while
being pretty broken with cross-domain). So let's just drop the legacy
piece to avoid confusions.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35680>
2025-06-23 19:16:34 +00:00
José Roberto de Souza
bdd20457ed anv: Emit STATE_COMPUTE_MODE before COMPUTE_WALKER when new async compute limits are needed
Cc: stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35563>
2025-06-23 18:57:25 +00:00
José Roberto de Souza
b37747ce68 blorp: Emit STATE_COMPUTE_MODE before COMPUTE_WALKER
Cc: stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35563>
2025-06-23 18:57:25 +00:00
José Roberto de Souza
52bd6fae0e iris: Emit STATE_COMPUTE_MODE before COMPUTE_WALKER when new async compute limits are needed
Cc: stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35563>
2025-06-23 18:57:25 +00:00
José Roberto de Souza
59d361043e intel/common: Use as much as possible spec recommended values for compute engine async thread limits
Spec recommended values should give us a good balance between progress
in render and compute engines, also with less possibility of values
it will reduce the number of times that we need to emit
STATE_COMPUTE_MODE reducing the number of stalls in the compute engine.

Cc: stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35563>
2025-06-23 18:57:25 +00:00
José Roberto de Souza
080b9a165c intel/common: Add function to compute optimal compute engine async thread limits
Spec has several restrictions to the values we program to compute
engine async thread limits.
Without those we risk hit deadlocks, so here adding a function to
return the optimal value based on those restrictions.

Cc: stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35563>
2025-06-23 18:57:24 +00:00
Emma Anholt
61ceaed48c tu: Block ib2 skipping for pre-final subpass resolves.
Fixes a TODO I noticed along the way in this MR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17943>
2025-06-23 18:40:41 +00:00
Emma Anholt
37ce9a7a61 turnip: Share gmem allocations between attachments.
If attachments are used in separate subpasses, then we can store them in
the same GMEM area.  That gives us more space per attachment and thus
larger tile sizes.  For gfxbench vk-5-normal's main renderpass it goes
from 128x128 to 160x128, improving perf by 2.125% +/- 0.194356% (n=4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17943>
2025-06-23 18:40:41 +00:00
Emma Anholt
ba9d0ba9a0 turnip: Emit tile stores at subpass end time.
This can reduce the subpass live range of attachments, for future gmem
attachment space sharing.

We have to disable IB2 skipping when the subpass isn't the last, but being
able to reuse the gmem space by storing early ends up paying off (in the
next commit).

Fixes: #5181
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17943>
2025-06-23 18:40:41 +00:00
Emma Anholt
33f3e6255d turnip: Move end-of-subpass resolves to a helper function.
Deduplicates a bit of attachment walking code, and drops a note about
something that's not right with how we're doing things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17943>
2025-06-23 18:40:40 +00:00
Emma Anholt
2b0e6f42de 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>
2025-06-23 18:40:40 +00:00
Emma Anholt
d0d3797a4d freedreno/a2xx: Share the shader state create/delete functions.
They were almost exactly the same.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8431>
2025-06-23 18:24:00 +00:00
Emma Anholt
3178b9f4d1 freedreno/a2xx: Dump the intrinsic name instead of a number when compile failing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8431>
2025-06-23 18:24:00 +00:00
Emma Anholt
5a3300f4a3 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>
2025-06-23 18:24:00 +00:00
Emma Anholt
58187a98c7 ir3: Enable NIR matrix reassociation.
We have to be careful about the placement of this to run after preamble,
otherwise you start executing more instructions in the case of uniform *
uniform * varying.

fossils on a730 (ANGLE affected):
Totals from 45 (0.09% of 50500) affected shaders:
Instrs: 6548 -> 6456 (-1.41%)
CodeSize: 14032 -> 13512 (-3.71%)
NOPs: 364 -> 476 (+30.77%)
MOVs: 91 -> 157 (+72.53%)
Full: 506 -> 508 (+0.40%)
(sy)-stall: 2691 -> 2507 (-6.84%)
Cat0: 411 -> 523 (+27.25%)
Cat1: 195 -> 261 (+33.85%)
Cat2: 1980 -> 1710 (-13.64%)

GL on a630 (mostly ANGLE, skia affected)

total instructions in shared programs: 11097572 -> 11096713 (<.01%)
instructions in affected programs: 43897 -> 43038 (-1.96%)

total nops in shared programs: 1549278 -> 1549333 (<.01%)
nops in affected programs: 4027 -> 4082 (1.37%)

total non-nops in shared programs: 9548294 -> 9547380 (<.01%)
non-nops in affected programs: 39625 -> 38711 (-2.31%)

total mov in shared programs: 290948 -> 290888 (-0.02%)
mov in affected programs: 3382 -> 3322 (-1.77%)

total dwords in shared programs: 21428802 -> 21426224 (-0.01%)
dwords in affected programs: 65354 -> 62776 (-3.94%)

total last-baryf in shared programs: 381845 -> 381784 (-0.02%)
last-baryf in affected programs: 278 -> 217 (-21.94%)

total last-helper in shared programs: 2613970 -> 2614334 (0.01%)
last-helper in affected programs: 31582 -> 31946 (1.15%)

total full in shared programs: 783901 -> 783989 (0.01%)
full in affected programs: 128 -> 216 (68.75%)

total cat0 in shared programs: 1722310 -> 1722365 (<.01%)
cat0 in affected programs: 4291 -> 4346 (1.28%)

total cat1 in shared programs: 478775 -> 478715 (-0.01%)
cat1 in affected programs: 3406 -> 3346 (-1.76%)

total cat2 in shared programs: 4245797 -> 4245335 (-0.01%)
cat2 in affected programs: 4148 -> 3686 (-11.14%)

total cat3 in shared programs: 4134879 -> 4134483 (<.01%)
cat3 in affected programs: 1971 -> 1575 (-20.09%)

total cat6 in shared programs: 167122 -> 167126 (<.01%)
cat6 in affected programs: 433 -> 437 (0.92%)

total sstall in shared programs: 633551 -> 633541 (<.01%)
sstall in affected programs: 47 -> 37 (-21.28%)

total (ss) in shared programs: 188548 -> 187926 (-0.33%)
(ss) in affected programs: 1320 -> 698 (-47.12%)

total systall in shared programs: 1632601 -> 1632496 (<.01%)
systall in affected programs: 14152 -> 14047 (-0.74%)

total (sy) in shared programs: 90995 -> 91000 (<.01%)
(sy) in affected programs: 394 -> 399 (1.27%)

total waves in shared programs: 1530906 -> 1530892 (<.01%)
waves in affected programs: 38 -> 24 (-36.84%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35622>
2025-06-23 17:49:51 +00:00
Emma Anholt
bc8994cb48 nir: Add a pass to reassociate multiplication of mat*mat*vec.
The typical case of mat4*mat4*vec4 is 80 scalar multiplications, but
mat4*(mat4*vec4) is only 32.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35622>
2025-06-23 17:49:51 +00:00
Timothy Arceri
21ea8c205f nir: raise NIR_SEARCH_MAX_VARIABLES limit to 24
This is required to process the pattern in the following patch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35622>
2025-06-23 17:49:51 +00:00
Brian Paul
a5b36600d8 svga: assorted code clean-ups in svga drm code
Fix whitespace/formatting.  Remove trailing whitespace.  Replace
tabs with spaces.  No functional change.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35663>
2025-06-23 17:33:18 +00:00
Pohsiang (John) Hsu
d7d31708fa d3d12: fix failure when building with v1.717.0-preview and running on Windows 11 without Agility Pack
remove wrong #else statment preventing falling back to old interface.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35690>
2025-06-23 17:18:55 +00:00
Eric Engestrom
2ae9b2ce43 r300/ci: update expectations and document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
63e1fbd891 zink/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
5848e3a894 broadcom/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
4052348d09 radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
8fa443b3a8 radeonsi/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
8553cfe125 lavapipe/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
6eacb756de lavapipe/ci: remove duplicate flakes line
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:19 +00:00
Eric Engestrom
3a58b84033 lavapipe/ci: fix flakes regex
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35693>
2025-06-23 16:58:18 +00:00
Guilherme Gallo
969bb7bd70 ci/android: Use structured tag for Android CTS version
Structured tagging ensures that we are building and testing the current
component version specified in the commit by matching the checksum of
the related build script file.

In this case, it is worthy to isolate the Android CTS version part,
because we don't need to rebuild the entire test-android container when
we change the CTS version or the CTS modules filtering.

PS: actually the new file `build-android-cts.sh` is not building
anything, it is just downloads, filters, compress and reupload the
stripped version to S3. The `build-` prefix is to make it work
transparently with `bin/ci/update_tag.py` script.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35596>
2025-06-23 15:22:45 +00:00
Guilherme Gallo
b26ad1783d ci/android: Disable zipbomb detection for CTS
The CTS is almost 9GB, when we unzip it locally (on Fedora 41 at least)
it is partially extracted because it is falsely detected as a zipbomb.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35596>
2025-06-23 15:22:45 +00:00
Guilherme Gallo
e9a1e22d6c ci/android: Store stripped CTS on S3
The CTS has almost 9GB atm, which takes almost 20 minutes to download
it. Moreover, it is stripped down after that, so we don't need the entire
file anyway.

So let's move this artifact to S3 in a similar way that we do with
fluster vectors.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35596>
2025-06-23 15:22:44 +00:00
Faith Ekstrand
261366cb11 nvk: Use nir_tex_get/steal_src in nvk_nir_lower_descriptors()
Our index manipulation was only okay because of the order in which
spirv_to_nir constructs texture sources.  It's better if we always
reference sources by type and not by index.  Otherwise, we risk
screwing up indices when we remove a source.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35623>
2025-06-23 14:25:31 +00:00
Faith Ekstrand
bb4c5edda1 nir: Add more tex_src helpers
This adds a variant of nir_steal_tex_src() which is for derefs as well
as versions that just return the source without removing it.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35623>
2025-06-23 14:25:30 +00:00
Faith Ekstrand
2b40fa09f2 nir: Move nir_steal_tex_src() to nir.h
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35623>
2025-06-23 14:25:30 +00:00
David Neto
bff2b1b947 mesa: flush stderr when dumping nir validation errors
When dumping nir validation errors, flush stderr before
calling abort. Otherwise the errors might not be emitted.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35665>
2025-06-23 13:36:09 +00:00
Patrick Lerda
b986550b92 r600: enable AMD_framebuffer_multisample_advanced
This change was tested on rv770, palm, barts and cayman:
spec/amd_framebuffer_multisample_advanced/api-glcore: skip pass
spec/amd_framebuffer_multisample_advanced/api-gles3: skip pass

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/35429>
2025-06-23 12:24:42 +00:00
Patrick Lerda
d27ed38d1a 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>
2025-06-23 12:11:07 +00:00
Patrick Lerda
e8fa3b4950 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>
2025-06-23 11:56:11 +00:00
Patrick Lerda
f6df349a1a r600: update the documentation of the extensions
This change updates the documentation of the extensions.
Here are the commits where these extensions were activated:
8348c9c84d "r600: enable ARB_gl_spirv":				GL_ARB_gl_spirv GL_ARB_spirv_extensions
8a1ef5bd31 "r600: enable ARB_transform_feedback_overflow_query":	GL_ARB_transform_feedback_overflow_query
6fab29d37e "r600: implement EXT_window_rectangles":			GL_EXT_window_rectangles
769510f1cc "r600: implement EXT_shader_image_load_store":		GL_EXT_shader_image_load_store

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/35547>
2025-06-23 11:40:52 +00:00
Bas Nieuwenhuizen
b53602ce71 radv: Use packed invocation ids for newer CDNA.
From inspection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33963>
2025-06-23 11:23:40 +00:00
Bas Nieuwenhuizen
9574089ea2 radv: Add CDNA register settings.
From inspection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33963>
2025-06-23 11:23:40 +00:00
Bas Nieuwenhuizen
098770ec51 radv: Don't init gfx preamble without gfx support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33963>
2025-06-23 11:23:40 +00:00
Bas Nieuwenhuizen
d2e69dc734 radv: Add support for not having gfx queues.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33963>
2025-06-23 11:23:40 +00:00
Patrick Lerda
1a441ad5cb r600: clamp to max_texel_buffer_elements
This change is inspired by the following updates: 74a172a448 ("radeonsi:
fix glTexBuffer max size handling") and 86cce0e677 ("panfrost: clamp
buffer-size to max-size").

The value of max_texel_buffer_elements is updated as well and synchronized
with radeonsi. The previous value was too high.

Note: the clamp is done on rv770 and cypress and the tests are failing. This
seems to be related to resinfo (textureSize()) which is not working properly
on these gpus.

This change was also tested on barts and cayman. Here are the tests fixed:
spec/arb_texture_buffer_object/texture-buffer-size-clamp/r8ui_texture_buffer_size_via_image: fail pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/r8ui_texture_buffer_size_via_sampler: fail pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/rg8ui_texture_buffer_size_via_image: skip pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/rg8ui_texture_buffer_size_via_sampler: skip 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/35159>
2025-06-23 11:07:46 +00:00
Patrick Lerda
1d03751801 r600: clean up and refactor texture_buffer_sampler_view()
The parameters width0 and height0 are not used anymore and
the function is prepared for the clamp update.

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/35159>
2025-06-23 11:07:45 +00:00
Danylo Piliaiev
af1465c36b tu/perfetto: Ignore events with zero duration
Zero duration can only happen when tracepoints did not happen on GPU.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35657>
2025-06-23 09:30:48 +00:00
Eric Engestrom
99e8d804bf 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>
2025-06-23 08:26:29 +00:00
Eric Engestrom
f545f9eed4 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>
2025-06-23 08:26:29 +00:00
Eric Engestrom
729922cdae intel/compiler tests: fix path-to-string conversion
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34756>
2025-06-23 08:26:29 +00:00
Eric Engestrom
de6ab1beda 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>
2025-06-23 08:26:29 +00:00
Georg Lehmann
60796c85d1 radv: expose VK_EXT_shader_float8
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:27 +00:00
Georg Lehmann
cbd17cb4d6 radv/nir/lower_cmat: handle float8 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:27 +00:00
Georg Lehmann
c7a6b3318e radv: vectorize float8 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:27 +00:00
Georg Lehmann
001cd632ee aco: select float8 to fp32 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:27 +00:00
Georg Lehmann
19ca4be6b0 aco/isel: fix get_alu_src with 8bit vec2 source
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:27 +00:00
Georg Lehmann
f047a67fba nir,aco: optimize FP16_OFVL pattern created by vkd3d-proton
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:27 +00:00
Georg Lehmann
9e6adcbca0 aco: select fp32 to float8 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:26 +00:00
Georg Lehmann
3a45802514 aco/lower_to_hw: support saturating fp8 conversions
Sadly amd only made this behavior controlable with global state.
We add a new pseudo opcode for this purpose and change FP16_OVFL
for each instruction. Ideally we would only do it once for clauses
and after ilp scheduling, but this can be improved in the future.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:25 +00:00
Georg Lehmann
65650cfef8 aco: emit float8 wmma
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:25 +00:00
Georg Lehmann
a1b88fcd8c spirv: support float8 capabilities
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:25 +00:00
Georg Lehmann
51d3c4c889 spirv: support float8 spec constant op
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:25 +00:00
Georg Lehmann
55b2f4958f spirv: create float8 types
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:25 +00:00
Georg Lehmann
e19ccb00f2 spirv: support float8 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00
Georg Lehmann
30ec9ed1cf spirv,nir: emit saturating float8 cmat convert
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00
Georg Lehmann
d0ac1cfb0d spirv: vtn_has_decoration helper
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00
Georg Lehmann
5addbf63f9 nir: add float8 conversion opcodes
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00
Georg Lehmann
2237c022a2 util: add float8 conversion functions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00
Georg Lehmann
9da23499ff compiler: add float8 glsl types
e4m3fn: 8bit floating point format with 4bit exponent, 3bit mantissa
        and no infinities (finite only)
e5m2:   8bit floating point format with 5bit exponent, 2bit mantissa
        and with infinities.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35434>
2025-06-23 07:59:24 +00:00
Mauro Rossi
28f7bb2418 radv: Fix gnu-empty-initializer error
Fixes the following builing error happening with clang:

../src/amd/vulkan/radv_pipeline.c:817:29: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
   struct amd_stats stats = {};
                            ^
1 error generated.

Fixes: 325dfd80 ("radv,aco: switch to shader statistics framework")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35677>
2025-06-23 07:09:09 +00:00
Samuel Pitoiset
2754915f07 mr-label-maker.yml: remove remaining osmesa occurrences
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35638>
2025-06-23 06:42:50 +00:00
Samuel Pitoiset
34b8aeec41 meson: remove unused osmesa option
Looks like this was forgot during the removal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35638>
2025-06-23 06:42:50 +00:00
Lionel Landwerlin
4e25a4ce1e intel/ci: document a couple of vkd3d failures
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/35679>
2025-06-23 05:45:25 +00:00
Lionel Landwerlin
786bace191 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>
2025-06-23 05:45:25 +00:00
Lionel Landwerlin
32b53a7c6a 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>
2025-06-23 05:45:25 +00:00
Lionel Landwerlin
691ac65000 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>
2025-06-23 05:45:24 +00:00
Yiwei Zhang
2d3f64bf97 venus: use common vk_android_get_front_buffer_usage helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35568>
2025-06-23 00:46:43 +00:00
Yiwei Zhang
61a90a154d v3dv: use common vk_android_get_front_buffer_usage helper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35568>
2025-06-23 00:46:42 +00:00
Yiwei Zhang
64326d0be5 anv: use common vk_android_get_front_buffer_usage helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35568>
2025-06-23 00:46:42 +00:00
Yiwei Zhang
6ea894a809 vulkan/android: add a helper to easy front buffer usage query
When front buffer rendering is supported, the returned usage bit is
non-zero. Return zero for all other cases including uninitialized
gralloc.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35568>
2025-06-23 00:46:42 +00:00
Emma Anholt
cf17230e54 ci/tu: Fix a typo in the flakes list, add a couple more tess/gs flakes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35675>
2025-06-22 15:09:33 +00:00
Rohan Garg
e103afe7be brw: run the nir_opt_offsets pass and set the maximum offset size
Perf A/B testing on DG2: no changes
Perf A/B testing on BMG: +2.1% Blackops3, +1.5% Cyberpunk

DG2 stats (mostly insignificant):
Assassins Creed Valhalla:
 Totals from 1169 (55.67% of 2100) affected shaders:
 Instrs: 509237 -> 509215 (-0.00%)
 Cycle count: 30614325 -> 30607419 (-0.02%); split: -0.03%, +0.00%
 Non SSA regs after NIR: 83434 -> 85909 (+2.97%)

Blackops 3:
 Totals from 1045 (64.63% of 1617) affected shaders:
 Instrs: 527312 -> 527310 (-0.00%)
 Cycle count: 496912222 -> 496902846 (-0.00%); split: -0.00%, +0.00%
 Non SSA regs after NIR: 106883 -> 109095 (+2.07%)

Cyberpunk:
 Totals from 706 (56.03% of 1260) affected shaders:
 Instrs: 345976 -> 345974 (-0.00%); split: -0.00%, +0.00%
 Cycle count: 9775138 -> 9775472 (+0.00%); split: -0.00%, +0.00%
 Max live registers: 40295 -> 40297 (+0.00%)
 Non SSA regs after NIR: 93245 -> 94718 (+1.58%)

Fortnite:
 Totals from 4210 (55.98% of 7521) affected shaders:
 Instrs: 2205471 -> 2205469 (-0.00%)
 Cycle count: 91451040 -> 91450956 (-0.00%); split: -0.00%, +0.00%
 Non SSA regs after NIR: 952354 -> 961664 (+0.98%)

LNL stats (notable changes):
Assassins Creed Valhalla:
 Totals from 1684 (83.57% of 2015) affected shaders:
 Instrs: 774305 -> 764501 (-1.27%); split: -1.27%, +0.01%
 Cycle count: 58845842 -> 58699250 (-0.25%); split: -0.98%, +0.73%
 Spill count: 625 -> 638 (+2.08%)
 Fill count: 1490 -> 1503 (+0.87%)
 Scratch Memory Size: 41984 -> 44032 (+4.88%)
 Max live registers: 196424 -> 197561 (+0.58%); split: -0.10%, +0.68%

Blackops 3:
 Totals from 1125 (76.53% of 1470) affected shaders:
 Instrs: 781749 -> 773275 (-1.08%); split: -1.08%, +0.00%
 Subgroup size: 22896 -> 22912 (+0.07%)
 Cycle count: 659864454 -> 654641032 (-0.79%); split: -1.10%, +0.31%
 Max live registers: 116772 -> 116854 (+0.07%); split: -0.01%, +0.08%
 Non SSA regs after NIR: 172648 -> 168260 (-2.54%); split: -2.55%, +0.01%

Control:
 Totals from 378 (51.50% of 734) affected shaders:
 Instrs: 148184 -> 147544 (-0.43%)
 Cycle count: 6905200 -> 6913366 (+0.12%); split: -0.30%, +0.42%
 Max live registers: 41271 -> 41281 (+0.02%)
 Non SSA regs after NIR: 44964 -> 43868 (-2.44%); split: -2.45%, +0.01%

Cyberpunk:
 Totals from 1141 (92.46% of 1234) affected shaders:
 Instrs: 636744 -> 629333 (-1.16%)
 Subgroup size: 24256 -> 24272 (+0.07%)
 Cycle count: 24952258 -> 24801298 (-0.60%); split: -1.39%, +0.78%
 Max live registers: 125848 -> 126855 (+0.80%); split: -0.00%, +0.80%
 Non SSA regs after NIR: 127399 -> 119837 (-5.94%); split: -5.95%, +0.02%

Fortnite:
 Totals from 5497 (83.52% of 6582) affected shaders:
 Instrs: 4072831 -> 4041852 (-0.76%); split: -0.77%, +0.01%
 Subgroup size: 103296 -> 103312 (+0.02%)
 Cycle count: 133046874 -> 132789242 (-0.19%); split: -0.67%, +0.48%
 Spill count: 7218 -> 7254 (+0.50%); split: -0.33%, +0.83%
 Fill count: 11724 -> 11749 (+0.21%); split: -0.34%, +0.55%
 Scratch Memory Size: 591872 -> 599040 (+1.21%)
 Max live registers: 816530 -> 818522 (+0.24%); split: -0.01%, +0.26%
 Non SSA regs after NIR: 1610296 -> 1560284 (-3.11%); split: -3.11%, +0.00%

Hitman3:
 Totals from 4713 (92.39% of 5101) affected shaders:
 Instrs: 2731598 -> 2698224 (-1.22%)
 Cycle count: 186422098 -> 185472640 (-0.51%); split: -1.12%, +0.61%
 Spill count: 3244 -> 3242 (-0.06%)
 Fill count: 9937 -> 9933 (-0.04%)
 Max live registers: 585035 -> 589801 (+0.81%); split: -0.00%, +0.82%
 Non SSA regs after NIR: 347681 -> 324314 (-6.72%); split: -6.73%, +0.01%

Hogwarts Legacy:
 Totals from 930 (59.81% of 1555) affected shaders:
 Instrs: 464146 -> 459526 (-1.00%); split: -1.00%, +0.01%
 Subgroup size: 19104 -> 19120 (+0.08%)
 Cycle count: 24062460 -> 24078964 (+0.07%); split: -0.49%, +0.56%
 Spill count: 2068 -> 1964 (-5.03%); split: -5.22%, +0.19%
 Fill count: 2342 -> 2205 (-5.85%); split: -6.40%, +0.56%
 Scratch Memory Size: 147456 -> 141312 (-4.17%)
 Max live registers: 112384 -> 112787 (+0.36%); split: -0.08%, +0.44%
 Non SSA regs after NIR: 80293 -> 79161 (-1.41%); split: -1.72%, +0.32%

Metro Exodus:
 Totals from 29755 (78.62% of 37846) affected shaders:
 Instrs: 11495578 -> 11492951 (-0.02%); split: -0.02%, +0.00%
 Subgroup size: 644688 -> 644704 (+0.00%)
 Cycle count: 301572068 -> 301548054 (-0.01%); split: -0.03%, +0.02%
 Max live registers: 3369504 -> 3370454 (+0.03%); split: -0.00%, +0.03%
 Non SSA regs after NIR: 2476561 -> 2396090 (-3.25%); split: -3.27%, +0.02%

Red Dead Redemption 2:
 Totals from 4161 (78.61% of 5293) affected shaders:
 Instrs: 2428782 -> 2409032 (-0.81%); split: -0.82%, +0.00%
 Subgroup size: 85344 -> 85360 (+0.02%)
 Cycle count: 8514984142 -> 8533415324 (+0.22%); split: -0.02%, +0.23%
 Spill count: 4659 -> 4674 (+0.32%); split: -0.02%, +0.34%
 Fill count: 11236 -> 11231 (-0.04%); split: -0.19%, +0.14%
 Scratch Memory Size: 398336 -> 397312 (-0.26%)
 Max live registers: 473946 -> 475798 (+0.39%); split: -0.08%, +0.47%
 Non SSA regs after NIR: 616820 -> 567706 (-7.96%); split: -8.09%, +0.12%

Rise Of The Tomb Raider:
 Totals from 68 (46.58% of 146) affected shaders:
 Instrs: 28209 -> 27801 (-1.45%)
 Subgroup size: 1584 -> 1600 (+1.01%)
 Cycle count: 16182992 -> 16249364 (+0.41%); split: -0.97%, +1.38%
 Max live registers: 7320 -> 7296 (-0.33%); split: -0.38%, +0.05%
 Non SSA regs after NIR: 8438 -> 8207 (-2.74%); split: -2.82%, +0.08%

Spiderman Remastered:
 Totals from 6403 (93.87% of 6821) affected shaders:
 Instrs: 5662713 -> 5597949 (-1.14%); split: -1.28%, +0.14%
 Cycle count: 282861519016 -> 279806958122 (-1.08%); split: -1.26%, +0.18%
 Spill count: 61150 -> 60754 (-0.65%); split: -1.13%, +0.48%
 Fill count: 162597 -> 163190 (+0.36%); split: -0.84%, +1.21%
 Scratch Memory Size: 5834752 -> 5804032 (-0.53%); split: -0.70%, +0.18%
 Max live registers: 901926 -> 903820 (+0.21%); split: -0.01%, +0.22%
 Non SSA regs after NIR: 555053 -> 521016 (-6.13%); split: -6.14%, +0.01%

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35252>
2025-06-22 10:55:24 +00:00
Rohan Garg
8a5e062e5e brw: store the buffer offset for load/store intrinsics
This will later be encoded by the backend into the
LSC extended descriptor message.

Reworks:
  * Sagar: Add nir_intrinsic_ssbo_atomic_swap

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35252>
2025-06-22 10:55:24 +00:00
Rohan Garg
0186113640 brw: encode the offset into the message descriptor for Xe2
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35252>
2025-06-22 10:55:24 +00:00
Rohan Garg
937d37f0b1 brw: introduce MEMORY_LOGICAL_ADDRESS_OFFSET to encode address offsets
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35252>
2025-06-22 10:55:24 +00:00
Lionel Landwerlin
d5a58364b1 brw: add new helper for immediate integer register with type
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/35252>
2025-06-22 10:55:24 +00:00
Lionel Landwerlin
50dab62f57 nir/opt_offsets: add support for intel intrinsics
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/35252>
2025-06-22 10:55:23 +00:00
Lionel Landwerlin
16fca611d7 nir: add new intel ssbo intrinsics
Similar to ir3 ones, to optimize offsets in the backend.

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/35252>
2025-06-22 10:55:23 +00:00
Lionel Landwerlin
ba119c73c6 intel: replace RANGE_BASE by BASE for uniform block loads
We're not currently using RANGE_BASE and we'll use BASE for offset
optimizations on Xe2+.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@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/35252>
2025-06-22 10:55:23 +00:00
Rohan Garg
909ec6ff1f nir/lower_io: add io_offset support for more intrinsics
This will be used by upcoming changes in the intel compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35252>
2025-06-22 10:55:22 +00:00
Lionel Landwerlin
098249ba66 brw: print descriptor & extended descriptors
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@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/35252>
2025-06-22 10:55:22 +00:00
Lionel Landwerlin
8ea124f877 nir/divergence: add missing intel intrinsics
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@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/35252>
2025-06-22 10:55:21 +00:00
Lionel Landwerlin
87ef9aabe9 intel: fix monitor build dependencies
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35252>
2025-06-22 10:55:21 +00:00
Doug Nazar
c3980bb4ec 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>
2025-06-21 23:47:13 +00:00
Lucas Stach
3387e9e8e9 Revert "etnaviv/ci: document new failure"
This reverts commit 757ad6a333. This test has been flagged as failing
due to something that looks more like a runner issue than a real test
failure and it has been showing up as unexpected pass in later CI runs.

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/35671>
2025-06-21 18:59:24 +00:00
Christian Gmeiner
74526442b2 etnaviv: nir: Use nir offset lowering
We can use the offset lowering for
 - nir_texop_tex in vertex shader only
 - nir_texop_txf

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/35573>
2025-06-21 17:09:17 +00:00
Lucas Stach
3a40d5a7bf etnaviv: don't advertise anisotropic filtering on GPUs with NO_ANISTRO_FILTER
Anisotropic filtering is generally supported starting with halti0, but there
is a separate feature bit telling us that the filter is not available.

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/35666>
2025-06-21 11:59:29 +00:00
Lucas Stach
4b424e9b86 etnaviv: use TX_SEAMLESS_CUBE to determine seamless cubemap support
I have no idea why the HWDB includes two distinct bits that seem to
relate to seamless cubemap support. However, the only cores where
both bits disagree are NPUs (which don't have any samplers) and the
GC880, which is currently special cased in the driver.

Use TX_SEAMLESS_CUBE to determine seamless cubemap support, which
seems to accurately reflect the real support status.

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/35666>
2025-06-21 11:59:29 +00:00
Eric Engestrom
d31b0c9b3b egl/meson: include glvnd in the devenv
This was working by accident in the case where `-D glvnd-vendor-name`
was not set, because `meson devenv` adds all the folders that produce
a lib to `LD_LIBRARY_PATH` and the system's glvnd's json was pointing
to the same filename as the build had, which ended up getting picked up.

This breaks when `-D glvnd-vendor-name` is set to any other value than
the one set by the distro packagers though, so let's set it up properly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652>
2025-06-20 22:18:22 +00:00
Eric Engestrom
367fb5e233 egl/meson: allow passing a full path to the glvnd json file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652>
2025-06-20 22:18:22 +00:00
Eric Engestrom
b952c1a26a egl/meson: move glvnd config file after libEGL
Necessary for the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652>
2025-06-20 22:18:21 +00:00
Eric Engestrom
2e8d14406f egl/meson: reuse existing glvnd_vendor_name variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652>
2025-06-20 22:18:21 +00:00
Eric Engestrom
b5b49dcfd7 egl/meson: simplify glvnd json configuration
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652>
2025-06-20 22:18:20 +00:00
Eric Engestrom
413dbcdf79 meson: include VkLayer_MESA_overlay in the devenv
See https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35650>
2025-06-20 21:51:17 +00:00
Eric Engestrom
294d8ce80a meson: include VkLayer_MESA_device_select in the devenv
See https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35650>
2025-06-20 21:51:17 +00:00
Eric Engestrom
6b11a53a3a meson: include VkLayer_INTEL_nullhw in the devenv
See https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#linux-layer-discovery

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35650>
2025-06-20 21:51:17 +00:00
Alyssa Rosenzweig
43a47266c8 hk: merge adjacent CDM control streams
this reduces submission overhead in the kernel/firmware.

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>
2025-06-20 21:38:12 +00:00
Alyssa Rosenzweig
f7db4afd09 hk: use fast-clears for empty render passes
this generalizes our trivial VDM optimization.

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>
2025-06-20 21:38:12 +00:00
Alyssa Rosenzweig
9cdf486f14 hk: implement vkCmdClear*Image with fast-clears
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>
2025-06-20 21:38:11 +00:00
Alyssa Rosenzweig
7120f86035 libagx: add fast-clear kernels
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>
2025-06-20 21:38:11 +00:00
Alyssa Rosenzweig
908d12d346 libagx: export coordinate twiddle routine
we'll use for both image atomics and fast-clears

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>
2025-06-20 21:38:11 +00:00
Alyssa Rosenzweig
319a6259d9 libagx: add agx_2d grid helper
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>
2025-06-20 21:38:11 +00:00
Alyssa Rosenzweig
349e802e78 ail,asahi,hk: distinguish logical vs allocation compression
the hw uses the wrong definition of compressability of mip levels in some
places, but not in others. we need to distinguish these for correct fast clears.

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>
2025-06-20 21:38:11 +00:00
Alyssa Rosenzweig
9740474021 ail: generalize solid mode values
this is blocksize dependenant, fill in the gaps.

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>
2025-06-20 21:38:11 +00:00
Alyssa Rosenzweig
cdb4463b52 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>
2025-06-20 21:38:10 +00:00
Marek Olšák
d4b742f934 radeonsi: fix printing asm for the first shader of merged shaders for ACO
When we print asm for merged VS+TCS, we need to record asm for VS
even when only TCS is being printed because they are printed together.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35620>
2025-06-20 21:21:27 +00:00
Marek Olšák
23c3646164 radeonsi: fix tess regression with latest LLVM git
The problem was that SGPRs returned from LS were treated as VGPRs by LLVM
because LS executes conditionally. The workaround is to use input SGPRs
initialized by the hw (i.e. parameters of the wrapper function) instead of
the ones returned by LS.

Fixes: 80236f2367 - ac/nir/tess: add if/endif for HS threads in NIR instead of ACO/LLVM

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35620>
2025-06-20 21:21:27 +00:00
Eric Engestrom
b3ed7f7b63 radeonsi/ci: reduce coverage of radeonsi-vangogh-glcts
It currently takes 15min of test run time, which is higher than what
a merge-pipeline test is allowed.

Reduce it to 10min, and reduce the timeouts which were way too high.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35588>
2025-06-20 20:24:59 +00:00
Eric Engestrom
fb8c2a6318 turnip/ci: document vkd3d regression
It started failing after a commit in the 2782fa2c...df55ea8c range.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35661>
2025-06-20 20:08:57 +00:00
Emma Anholt
e9d75ce16b ci/tu: Sync up a660's flakes with a618 where they seem to match up.
and generalize a couple more things into regexes.  I noticed these after
enabling 660 flake reporting and starting to see them roll in on the CI
channel.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35659>
2025-06-20 19:46:45 +00:00
Emma Anholt
8e22420187 ci/tu: Don't forget to report flakes on a660, too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35659>
2025-06-20 19:46:45 +00:00
Emma Anholt
2919d64d98 ci/tu: Add some recent flakes and consolidate lists into regexes.
I was going to stability test an MR, and for that I want the flakes list
to be truthful.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35659>
2025-06-20 19:46:45 +00:00
Eric Engestrom
6addaca3d4 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>
2025-06-20 19:32:18 +00:00
Danylo Piliaiev
9db945c3be tu: Add info about usage to command buffers tracepoint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637>
2025-06-20 19:15:44 +00:00
Danylo Piliaiev
9f74fcffe4 tu: Add MESA_TRACE_FUNC to submit and BO alloc paths
Makes much easier to see how slow are submits and BO allocs,
which sometimes happen together.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637>
2025-06-20 19:15:44 +00:00
Danylo Piliaiev
6e5944ec4b tu: Cache copy timestamp cs to avoid allocations on submit
For non-ONE_TIME_SUBMIT command buffers we have to create CS that
copies u_trace timestamps. Having cs pool allows us to avoid
allocations in most cases.

Together with previous commit, BO allocations on submit would be
rare during normal u_trace tracing.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637>
2025-06-20 19:15:44 +00:00
Danylo Piliaiev
a1b9aa3385 tu: Suballocate u_trace buffers to avoid allocations on submit
For non-ONE_TIME_SUBMIT command buffers we have to copy tracepoints
which leads to BO allocations. That adds overhead we don't want,
especially when there are many tiny submissions.

While suballocator for u_trace BOs is allocated only when needed,
it's not deallocated afterwards, since the point where it's not needed
is tricky to determine.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35637>
2025-06-20 19:15:44 +00:00
Alyssa Rosenzweig
8ec4337c1f hk: drop psiz writes with !largePoints
affects geom/tess mostly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
691aa581c3 hk: optimize !largePoints
should slightly help proton

requires reordering the uvs lowering to be after tes lowering since that can
insert psiz writes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
9d7301b2d1 hk: disable custom border for proton
zoom.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
ba4bab0584 hk: make border colour lint quieter
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
81e005c18b hk: don't give DXVK fake min/max
no games use this, we want to be demoted to fl11 for dxvk for perf anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:16 +00:00
Alyssa Rosenzweig
b68f34e1f9 hk: stop uploading blend constants
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:15 +00:00
Alyssa Rosenzweig
34b8ef8f7e hk: stop reserving pile of uniform regs for literally no reason
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:15 +00:00
Alyssa Rosenzweig
8fb891334f hk: make image heap / root uniform dynamic
so we don't have to worst case alloc without disrupting gl.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:15 +00:00
Alyssa Rosenzweig
f64ba2d2dc hk: don't advertise b4g4r4a4 format
it is optional and broken with opaque_black

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
3afd675310 hk: use #defines for uniforms
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
53bbd850f5 asahi: use #defines for uniforms
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
c3b449ff98 asahi: use #defines for prologs/epilogs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
733dd3ba4e asahi: clean up fs prolog pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
c4b3f8cf74 agx: add headers for uniform abi
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:14 +00:00
Alyssa Rosenzweig
5795c8595f nir: model dynamic uniform layout on hk
add some new intrinsics so we can defer lowering until we have the information.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35658>
2025-06-20 18:46:13 +00:00
Yiwei Zhang
7b81c5bb78 vulkan/android: clean up u_gralloc_get_buffer_color_info handling
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613>
2025-06-20 18:13:36 +00:00
Yiwei Zhang
072223c11d egl/android: clean up u_gralloc_get_buffer_color_info handling
No longer need the defaults, and can properly bail on real errors. The
behavior change of chroma sitting has been mentioned in the prior
commit, and doesn't affect gallium side.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613>
2025-06-20 18:13:36 +00:00
Yiwei Zhang
4b68ed990b u_gralloc: assign default u_gralloc_buffer_color_info
Gralloc is the central piece to align defaults and expectations across
different APIs. Doing so simplifies client side handling. To be noted,
midpoint chroma location is preferred as the default to skip the chroma
lowering pass. The same has been suggested by all Vulkan drivers with
AHB implemented and practiced for years under venus.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613>
2025-06-20 18:13:36 +00:00
Yiwei Zhang
64d18f84b0 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>
2025-06-20 18:13:36 +00:00
Yiwei Zhang
0ac1e05f65 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>
2025-06-20 18:13:36 +00:00
Karol Herbst
de1ce0f75e rusticl: allow packagers to enable freedreno by default
The msm driver hasn't yet passed conformance, so it's not part of the
auto set at this point in time. But this will allow distribution to
enable it by default, if they find it suitable.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35618>
2025-06-20 17:46:32 +00:00
Job Noorman
bc10c812d6 ir3/legalize: apply initial GS/TCS sync in legalize
When applying the sync flags after legalize, we might run into the issue
of the first instruction not supporting (ss)/(sy). We cannot insert a
nop at that point anymore since jump targets have already been
calculated. Fix this by applying the sync flags during legalize, where
all other sync flags are also applied.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653>
2025-06-20 17:23:46 +00:00
Job Noorman
e51fa32aac ir3/legalize: propagate force_ss/sy across blocks
Just like the other sync state, we might need to apply this at the start
of successor blocks.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653>
2025-06-20 17:23:46 +00:00
Job Noorman
a5355b5ffd ir3/legalize: don't force (ss) after predt
This isn't necessary and since predt is a terminator and we (mistakenly)
didn't propagate force_ss across blocks, it wasn't actually applied.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653>
2025-06-20 17:23:46 +00:00
Mike Blumenkrantz
2e071cc66c zink: actually use GENERAL image barrier functions
and fix a bunch of issues there

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:32 +00:00
Mike Blumenkrantz
5c2344b6a6 zink: mimic buffer transfer dst noop barrier semantics with images
this should better guarantee sync with GENERAL

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:32 +00:00
Mike Blumenkrantz
bbac75acd3 zink: always unset unordered access flags when executing an ordered barrier
this otherwise confuses the calculator

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
ea45f89ebe zink: always pass through src access flags for buffer barriers
this is more accurate and avoids mixing/matching flags from different cmdbufs

probably won't affect anything at this exact moment

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
cb026adc4c 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>
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
5ff573d534 zink: skip sampler layout updates when using GENERAL layouts
these are always GENERAL

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
06be46c7a0 zink: add another aggressive sampler barrier after sequential image copies
this should better handle pipelined texture uploads

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
e5d1547f08 zink: break out the fb unbind sampler barrier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
d8c1fdb644 zink: fix GENERAL image copy box resets on non-transfer barrier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
43def9716b zink: use GENERAL layout in zink_copy_image_buffer when possible
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
4f329fdc61 zink: local screen variable in zink_copy_image_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
d30008124d zink: fix image transfer op batching with GENERAL layouts
this depends on the access, not the layout

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
3d073bb0b3 zink: delete barrier sync flag inferring
these are all explicit now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
5f22d3f174 zink: fill in sync flags for a couple barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
4483c6195d zink: put back the sampler barrier on fb unbind with GENERAL layouts
this is actually critical to avoid splitting renderpasses regardless of
the layout being used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476>
2025-06-20 17:08:30 +00:00
Yiwei Zhang
41d241bf6e 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>
2025-06-20 16:51:18 +00:00
Alyssa Rosenzweig
b0f8c22682 nir/opt_sink: sink agx backfacing
helps an elden ring shader:

Totals from 1 (0.03% of 3206) affected shaders:
Instrs: 4146 -> 4141 (-0.12%)
CodeSize: 27374 -> 27334 (-0.15%)
ALU: 2554 -> 2549 (-0.20%)
FSCIB: 2554 -> 2549 (-0.20%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559>
2025-06-20 16:09:28 +00:00
Alyssa Rosenzweig
3eeba6efdd nir/opt_preamble: hoist reorderable SSBO loads on AGX
basically asahi version of 2f93137308 ("nir/opt_preamble: Handle
load_global_ir3"). elden ring:

Totals from 2409 (75.14% of 3206) affected shaders:
MaxWaves: 2068416 -> 2081984 (+0.66%); split: +0.74%, -0.08%
Instrs: 2439078 -> 1849792 (-24.16%)
CodeSize: 15570886 -> 12196612 (-21.67%)
Spills: 11623 -> 11678 (+0.47%); split: -0.63%, +1.10%
Fills: 9815 -> 9762 (-0.54%); split: -1.37%, +0.83%
Scratch: 31200 -> 31328 (+0.41%); split: -0.23%, +0.64%
ALU: 1154256 -> 1038680 (-10.01%); split: -10.22%, +0.21%
FSCIB: 1154256 -> 1038479 (-10.03%); split: -10.24%, +0.21%
IC: 248318 -> 237344 (-4.42%); split: -4.47%, +0.05%
GPRs: 266323 -> 254621 (-4.39%); split: -4.72%, +0.33%
Uniforms: 639557 -> 794085 (+24.16%); split: -0.07%, +24.23%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reacted-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559>
2025-06-20 16:09:28 +00:00
Christoph Neuhauser
e99446fc5e egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id
Adds support for the EGL extensions EGL_EXT_device_query_name and
EGL_EXT_device_persistent_id. This enables querying device name, vendor
name, renderer name and device and driver UUIDs.

Signed-off-by: Christoph Neuhauser <christoph.neuhauser@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34958>
2025-06-20 15:35:44 +00:00
Karol Herbst
ee7536a1e3 radeonsi: implement SVM interfaces
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175>
2025-06-20 15:10:42 +00:00
Karol Herbst
a107041112 radeonsi: implement resource_get_address
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175>
2025-06-20 15:10:42 +00:00
Karol Herbst
a1b8c6c404 radeosi: assert addresses are not NULL in a couple of places
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175>
2025-06-20 15:10:42 +00:00
Mike Blumenkrantz
d2d98abf1d gallium: add compressed_surface_reinterpret_blocks_layered
this affects piglit/bin/ext_texture_array-compressed teximage pbo -auto -fbo

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

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35612>
2025-06-20 14:47:25 +00:00
Valentine Burley
f39240b98f panvk/ci: Increase DEQP_FRACTION for g610-vk
Adjust the fraction of the panfrost-g610-vk:arm64 job, which has
been taking longer than the recommended 10 minutes of testing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35438>
2025-06-20 14:05:06 +00:00
Nanley Chery
42ef23ecd1 intel/blorp: Don't redescribe some Tile64 clears
We don't support redescribing Tile64 and 3D due to interleaved depth
planes.

Fixes: 312952048b ("intel/blorp: Redescribe gfx12.5 surfaces for CCS fast clears")
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35619>
2025-06-20 13:39:20 +00:00
John Anthony
cce2fa9af6 panvk: report the maximum supported size for a variable count iub
If VkDescriptorSetVariableDescriptorCountLayoutSupport is passed to
vkGetDescriptorSetLayoutSupport, we should report the maximum size in
bytes for inline uniform blocks.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
2025-06-20 13:14:34 +00:00
John Anthony
1b309e77fc panvk: handle 0 count for vdc when checking if layout is supported
A binding with variable descriptor count should be counted when checking
if a descriptor set layout is supported, even if it has a count of zero.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
2025-06-20 13:14:34 +00:00
John Anthony
5023feb0f7 panvk: count iubs correctly when checking if layout is supported
For inline uniform blocks, the descriptor count given in the binding is
a byte size. Convert the size into a descriptor count and use that when
checking if a descriptor set layout is supported.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 0440d1dd03 ("panvk: Advertise VK_EXT_inline_uniform_block")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
2025-06-20 13:14:34 +00:00
John Anthony
3e9dc4f777 panvk: use variable count when initializing iub buffer descriptor
Ensure we use the variable count to initialize the internal buffer
descriptor for variable count inline uniform block, if we have one.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
2025-06-20 13:14:33 +00:00
John Anthony
9719744d05 panvk: fix allocated size for sets with variable count iub
When allocating descriptor sets, ensure we correctly calculate the new
size if the last binding is an inline uniform block with a variable
count.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
2025-06-20 13:14:33 +00:00
John Anthony
37a5e6562e panvk: add panvk_get_iub_desc_count and panvk_get_iub_size
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/35545>
2025-06-20 13:14:33 +00:00
John Anthony
677153c642 panvk: fix maxInlineUniformTotalSize
maxInlineUniformTotalSize is derived from
MAX_INLINE_UNIFORM_BLOCK_DESCRIPTORS, but due to missing parenthesis
around the expression, the value calculated is incorrect.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Fixes: 0440d1dd03 ("panvk: Advertise VK_EXT_inline_uniform_block")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545>
2025-06-20 13:14:32 +00:00
Mary Guillemard
266b25a356 panvk/ci: Update Mali-G52 status with full VKCTS
New failures found with current main full run.

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/35639>
2025-06-20 10:11:52 +00:00
Mary Guillemard
c3897b3a98 panvk: Fix dependency chain on indirect dispatch for JM
The copy job was missing a dependency on the indirect job causing issues
on various "dEQP-VK.synchronization.*indirect*" and
"dEQP-VK.synchronization2.*indirect*" tests.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 8b4e515ca2 ("panvk: Implement indirect dispatch on JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639>
2025-06-20 10:11:52 +00:00
Mary Guillemard
e8137404b6 meson: make clz available in OpenCL code
for various math helpers.

the clzll version isn't available since long long is 128-bit for CL.

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/35639>
2025-06-20 10:11:52 +00:00
Mary Guillemard
2c455c2d81 libcl: Add more UINT_MAX variants
Needed by panvk's minmax CL code.

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/35639>
2025-06-20 10:11:52 +00:00
Mary Guillemard
276b65dbca pan/clc: Lower IO as late as possible
We were assigning the scratch size of the whole lib... that was causing
very big TLS usage on draw indirect.

With this TLS usage is way lower now at the cost of running more pass
for every variants.

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/35639>
2025-06-20 10:11:52 +00:00
Mary Guillemard
01c8ee5737 pan/clc: Use hash_format_strings option with nir_lower_printf
At some point CL C shader switched to a format hash approach and we
forgot to properly migrate here.

This should fix all printf again.

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/35639>
2025-06-20 10:11:52 +00:00
Rhys Perry
325dfd809a radv,aco: switch to shader statistics framework
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12756
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35583>
2025-06-20 09:26:58 +00:00
Rhys Perry
2382d657ec radv: use vk_outarray for pipeline statistics/executables
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/35583>
2025-06-20 09:26:58 +00:00
Rhys Perry
eb86717f4d util/stats: add serialize helpers
These copy the stats with any padding zero'd.

The layout is the same as the C struct, so it's still usable as one, if
the alignment is correct.

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/35583>
2025-06-20 09:26:58 +00:00
Rhys Perry
92eb0941d3 util/stats: fix XML type validation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/35583>
2025-06-20 09:26:58 +00:00
Rhys Perry
ace17d0ea1 util/stats: use PRIdx/PRIux format constants
Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/35583>
2025-06-20 09:26:58 +00:00
Rhys Perry
3625ed36b7 util/stats: fix signness of c types
Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/35583>
2025-06-20 09:26:57 +00:00
Romaric Jodin
ae128624ab panvk: fix typo in printf in bi_validate
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35641>
2025-06-20 08:29:54 +00:00
Dave Airlie
d68a1fc0d4 radv/video: port hevc slice header encoding from radeonsi
The radeonsi code has been improved to handle reference lists
better, port the code to radv and vulkan API.

This has been updated to for Vulkan

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35628>
2025-06-20 07:31:04 +00:00
Dave Airlie
f7d2939457 radv/video: add some missing hevc header bits
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35628>
2025-06-20 07:31:04 +00:00
Samuel Pitoiset
5e2fcdfea2 radv/meta: add a helper to determine if clearing is a full rect
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35603>
2025-06-20 06:36:19 +00:00
Samuel Pitoiset
525e73c045 ac/descriptors: configure {Z,STENCIL}_READ_ONLY for ds surfaces on GFX12+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35603>
2025-06-20 06:36:19 +00:00
Samuel Pitoiset
59dfa8c2f5 radv: switch to nir_intrinsic_load_input_attachment_coord
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35556>
2025-06-20 06:12:24 +00:00
Rob Clark
df55ea8c51 freedreno/a6xx: Don't use 2d blit path for f16
This seems to canonicalize NaNs when the source format is a 16-bit
floating point format, likely because it implicitly converts to 32b.

Fixes OpenCL-CTS:

  ./test_basic imagearraycopy
  ./test_basic imagearraycopy3d

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35589>
2025-06-20 00:10:47 +00:00
Rob Clark
86a8eda644 freedreno: Add custom f16 blit shader
To avoid canonicalizing NaNs for f16, we need to avoid promoting the
value to 32b.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35589>
2025-06-20 00:10:47 +00:00
Rob Clark
2adff20fde util: Add a util_blitter_blit_with_txf() helper
If a driver is (or is contemplating) providing it's own fs_override then
it needs to know whether the blitter is going to use txf or not.  So
split this logic out into a helper.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35589>
2025-06-20 00:10:47 +00:00
Rob Clark
9e07f38b91 util+tu: Add util_format_is_float16()
Extract out a helper to check for f16 formats from turnip so it can be
used elsewhere.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35589>
2025-06-20 00:10:47 +00:00
Valentine Burley
0273f1f504 ci/lava: Fix .lava-x86_64-test-android dependencies
Container jobs might not exist in mesa/mesa pipelines.

Fixes: c035454a3c ("ci/virtio: Add an Android Venus job on Intel Comet Lake")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35646>
2025-06-19 22:08:44 +00:00
Emma Anholt
eae86f455c v3d: Stop advertising support for HW clip planes.
The GL frontend is perfectly good at lowering it like we do.  Cuts out a
bunch of duplicate code.

We still have ucp_enables for the FS due to lowering of CLIPDIST to
discards in the FS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8953>
2025-06-19 21:44:55 +00:00
Emma Anholt
211e03d026 gallium: Remove the need for set_clip_state() on !PIPE_CAP_CLIP_PLANES.
More driver boilerplate we don't need.  We do still have to go through the
transformation in st_atom_clip.c because the clip state can get used in
draw fallbacks.  This revealed that lima had a dirty bit being set that
nobody was reading.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8953>
2025-06-19 21:44:55 +00:00
Eric Anholt
a9b622bcca vc4: Drop VS ucp lowering code.
The GL frontend handles it for us since c1442030ec ("vc4: lower clip
planes in st/mesa").  Now we should just be dropping the VS re-recompiles
we were doing, along with dead code.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8953>
2025-06-19 21:44:55 +00:00
Job Noorman
899a179e8c freedreno/decode: don't count alias regs for GPR stats
Alias regs don't actually consume GPR space so shouldn't be counted.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35627>
2025-06-19 21:23:01 +00:00
Job Noorman
d2e1e4442a ir3: enable nir_opt_uniform_subgroup
fossildb results:

Totals from 320 (0.19% of 164575) affected shaders:
MaxWaves: 2684 -> 2688 (+0.15%)
Instrs: 458284 -> 457275 (-0.22%); split: -0.22%, +0.00%
CodeSize: 896464 -> 896230 (-0.03%); split: -0.09%, +0.06%
NOPs: 109357 -> 109452 (+0.09%); split: -0.08%, +0.17%
MOVs: 25634 -> 24975 (-2.57%)
Full: 5781 -> 5779 (-0.03%)
(ss): 11491 -> 11241 (-2.18%); split: -2.21%, +0.03%
(sy): 5179 -> 5174 (-0.10%); split: -0.12%, +0.02%
(ss)-stall: 57044 -> 56592 (-0.79%); split: -0.95%, +0.16%
(sy)-stall: 114577 -> 114484 (-0.08%); split: -0.11%, +0.03%
Preamble Instrs: 103205 -> 103748 (+0.53%)
Cat0: 124379 -> 124474 (+0.08%); split: -0.07%, +0.15%
Cat1: 30969 -> 30310 (-2.13%)
Cat2: 163648 -> 163260 (-0.24%)
Cat3: 94946 -> 94921 (-0.03%)
Cat4: 13061 -> 13041 (-0.15%)
Cat5: 7421 -> 7414 (-0.09%)
Cat7: 18041 -> 18036 (-0.03%)

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35636>
2025-06-19 20:56:35 +00:00
Guilherme Gallo
c035454a3c ci/virtio: Add an Android Venus job on Intel Comet Lake
Introduce a Venus job running in Cuttlefish on Intel Comet Lake DUTs.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Co-authored-by: Antonio Ospite <antonio.ospite@collabora.com>
Co-authored-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:42 +00:00
Valentine Burley
0553a2de25 ci/virtio: Generalize .venus-rules
Decouple the .venus-rules definition from lavapipe to prepare for adding
hardware driver coverage for Venus.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Co-authored-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:42 +00:00
Valentine Burley
03b480d381 ci/intel: Fix the runner tag for Flip-hatch
The GitLab runner tags are case sensitive, and Flip-hatch's tag was
incorrectly lowercase. This prevented jobs from being picked up
by the runner.

Also remove an outdated note, as the device now appears to be stable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:42 +00:00
Valentine Burley
b026b5e277 ci/android: Print the detailed deqp versions
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:41 +00:00
Valentine Burley
bbffb1b967 ci/lava: Remove Android CTS from the core rootfs
Current LAVA jobs use dEQP instead of Android CTS, so there's no need
to include Android CTS in the rootfs. Removing both Cuttlefish and
Android CTS reduces the rootfs size from ~2GB to ~500MB.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:41 +00:00
Valentine Burley
f7befb9d8d ci/lava: Make Cuttlefish a LAVA overlay
Instead of including Cuttlefish in the core LAVA rootfs, make it an
optional LAVA overlay. This reduces the size of the core rootfs and
keeps Cuttlefish cached when the container is rebuilt, leading to
faster deploys.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:40 +00:00
Guilherme Gallo
6527ac72d4 ci/android: export container for DUTs
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35522>
2025-06-19 20:20:39 +00:00
Lionel Landwerlin
bfee389f0c 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>
2025-06-19 19:55:59 +00:00
Emma Anholt
6808ccf23a mesa: Retire the OptimizeForAOS code.
It's been unused for years.  Back on the brw driver, it was used for a ~1%
win on a VS-heavy workload, because you could hide instruction latency
using a DP4 sequence instead of MADs for doing the MVP transform.  Given
that r300 and i915 don't seem to want it, and nobody has successfully
ported it for crocus (see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14277), just
garbage collect the code at this point.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35617>
2025-06-19 19:23:53 +00:00
Mel Henning
f7aa6ba906 vulkan: Specify library_arch in ICD files
This should help vk-icd-loader skip libraries of the wrong bit width.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35567>
2025-06-19 17:30:24 +00:00
Mike Blumenkrantz
6b9415cb45 ci: rename "lvp" jobs to lavapipe
better regex globbing

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35321>
2025-06-19 17:11:41 +00:00
Mike Blumenkrantz
dc066f8577 draw: silence some no-op draw debug prints
this has been annoying me for years

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35584>
2025-06-19 16:22:05 +00:00
Faith Ekstrand
366b36aefd vulkan: Drop vk_sampler_init()
It's ill-defined at best since it doesn't even initialize the
vk_object_base and its only use was NVK and that use is now gone.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35624>
2025-06-19 15:45:09 +00:00
Faith Ekstrand
5d416a3742 nvk: Use vk_sampler_state for nvk_sampler_get_header()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35624>
2025-06-19 15:45:09 +00:00
Faith Ekstrand
a33e25185a vulkan/sampler: Add border color swizzle info to vk_sampler_state
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35624>
2025-06-19 15:45:09 +00:00
Faith Ekstrand
4cb8bfe285 vulkan: Add a vk_sampler_state struct
This struct gathers up all the sampler state from VkSamplerCreateInfo
and its pNext chain into a single struct.  The struct is has no pointers
and has uses -Wpadded to ensure no holes.  This means it's hashable and
mem-comparable.  We also make give vk_ycbcr_conversion_state -Wpadded
because vk_sampler_state has a copy of vk_ycbcr_conversion_state
embedded in it.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35624>
2025-06-19 15:45:08 +00:00
Samuel Pitoiset
5ff6d9cbd8 ci: uprev vkd3d
This adds new tests with E5B9G9R9 that uncovered a RADV bug.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35634>
2025-06-19 14:08:52 +00:00
Samuel Pitoiset
50c4d5cccd radv: use one descriptor per plane for combined image+sampler with ycbcr
This removes a very old hack which will also allow us to enable DCC
for multiplanar formats eventually and to reduce the combined
image+sampler descriptor size from 96 to 48 on RDNA3+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35457>
2025-06-19 12:58:32 +00:00
Samuel Pitoiset
f46126284f radv: reduce the number of bytes written for combined image+sampler desc
Only for non multiplanar formats.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35457>
2025-06-19 12:58:32 +00:00
Samuel Pitoiset
22402dadd3 radv: add a separate path for writing ycbcr combined image+sampler desc
This will allow us to remove the ycbcr hack and to reduce the number
of bytes written for combined image+sampler from 80 to 64.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35457>
2025-06-19 12:58:31 +00:00
Samuel Pitoiset
4f37876c7b radv: replace radv_combined_image_descriptor_sampler_offset() by a constant
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35457>
2025-06-19 12:58:31 +00:00
Ashley Smith
8160d0b80e panfrost: Enable GL_EXT_shader_realtime_clock on panfrost v6+
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35496>
2025-06-19 11:18:53 +00:00
Rhys Perry
2cfd2d3b1d aco/tests: add lower_branches tests
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/35202>
2025-06-19 10:58:39 +00:00
Rhys Perry
c45482e652 aco: validate that preds/succs match
This isn't done in validate_cfg() because that's called less frequently.

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/35202>
2025-06-19 10:58:39 +00:00
Rhys Perry
85db025cd7 aco: continue when try_remove_simple_block can't remove a predecessor
We should update linear_preds so that the predecessors we can remove are
actually removed.

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/35202>
2025-06-19 10:58:38 +00:00
Rhys Perry
5344abbc56 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>
2025-06-19 10:58:38 +00:00
Ashley Smith
e9c2c32409 panvk: enable VK_KHR_shader_clock
CTS passing and manual tests show it's working well

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/35488>
2025-06-19 09:11:51 +00:00
Iago Toral Quiroga
20ec897598 v3dv: switch to using nir_intrinsic_load_input_attachment_coord
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35569>
2025-06-19 07:55:23 +00:00
Georg Lehmann
001fe8c236 aco: optimize boolean phi with empty else block
We can keep the else empty by handling the phi in the "then" block.

Foz-DB Navi21:
Totals from 921 (1.15% of 80065) affected shaders:
Instrs: 4532598 -> 4527309 (-0.12%); split: -0.12%, +0.00%
CodeSize: 24498484 -> 24481780 (-0.07%); split: -0.08%, +0.01%
Latency: 41016915 -> 41020477 (+0.01%); split: -0.10%, +0.11%
InvThroughput: 9998405 -> 9991873 (-0.07%); split: -0.08%, +0.02%
SClause: 128261 -> 128267 (+0.00%)
Copies: 409949 -> 408585 (-0.33%); split: -0.36%, +0.02%
Branches: 169740 -> 169222 (-0.31%); split: -0.58%, +0.27%
PreSGPRs: 64408 -> 64398 (-0.02%)
VALU: 2972521 -> 2972518 (-0.00%)
SALU: 673844 -> 668973 (-0.72%); split: -0.72%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35165>
2025-06-19 07:32:43 +00:00
Georg Lehmann
4a2884237a radv: dump NIR for executable info after nir_to_asm
ACO modifies the NIR, most importantly it updates divergence analysis.

Acked-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/32990>
2025-06-19 07:02:20 +00:00
Georg Lehmann
88753ddd1d aco: allow nir divergence to be printed again
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32990>
2025-06-19 07:02:20 +00:00
Valentine Burley
bc049216cc ci/android: Build test AMD drivers
Build the radeonsi and RADV drivers for Android.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35578>
2025-06-19 06:19:06 +00:00
Faith Ekstrand
2782fa2cf3 nvk: Lower input attachments earlier
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35551>
2025-06-19 02:14:05 +00:00
Faith Ekstrand
0e740fa8e6 nvk: Switch to nir_intrinsic_load_input_attachment_coord
The important change here is that we're no longer using state to
determine whether or not we're multiview.  We just assume that layer_id
is zero when in multiview (this appears to be the case when SET_RT_LAYER
is set to CONTROL_V_SELECTS_LAYER) and that view_index is zero when not
in multiview (this is required by Vulkan) and add the two together.
This fixes a long-standing bug where multiview input attachments didn't
work properly with shader objects.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35551>
2025-06-19 02:14:05 +00:00
Faith Ekstrand
e1e32fcf0d nvk: Add a load_root_table() helper
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35551>
2025-06-19 02:14:04 +00:00
Faith Ekstrand
9f9cde04ec nir: Add a new load_input_attachment_coord intrinsic
This hoists all the annoyance of figuring out the current pixel's input
attachment coordinates to the driver.  The pass still deals with all the
annoyance of turning an image instruciton into a texture instruction but
it gives the driver more control over the position.  For most drivers,
this will be something like ivec3(int(gl_FragCoord.xy), gl_Layer) or
similar, some drivers need something more nuanced.  Turnip, for
instance, needs unscaled coordinates for some attachments and NVK
doesn't really want gl_Layer or gl_ViewIndex for the layer.  It's better
to just have a new system value that drivers can make what they want.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35551>
2025-06-19 02:14:04 +00:00
Faith Ekstrand
2c13e1e655 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>
2025-06-19 02:14:04 +00:00
Faith Ekstrand
9a52b9372c 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>
2025-06-19 02:14:03 +00:00
Ryan Houdek
f872cbea37 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>
2025-06-18 17:13:37 -07:00
Emma Anholt
cd981e27f7 intel/elk: Move wpos_w setup right into nir_intrinsic_load_frag_w.
Given that the intrinsic will be CSEed at the NIR level, we don't need to
preemptively set it up at the top of the shader.  No change in HSW shader-db.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:43 +00:00
Emma Anholt
269fbcb144 intel/elk: Use pixel_z for gl_FragCoord.z on pre-gen6.
Unless I've seriously missed something, we have the Z in the payload
(which we can always request if we need access to it and it's not already
passed to us due other WM IZ settings).

total instructions in shared programs: 4408303 -> 4408186 (<.01%)
instructions in affected programs: 1164 -> 1047 (-10.05%)
total cycles in shared programs: 142485036 -> 142484566 (<.01%)
cycles in affected programs: 26820 -> 26350 (-1.75%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:43 +00:00
Emma Anholt
dc55b47a58 intel/elk: Move pre-gen6 smooth interpolation 1/w multiply to NIR.
NIR catches that if you're just doing something like adding two smooth
inputs, we can do the multiply once on the result instead of on each
input.  BRW shader-db results:

total instructions in shared programs: 4409146 -> 4408303 (-0.02%)
instructions in affected programs: 800761 -> 799918 (-0.11%)
total cycles in shared programs: 143203198 -> 142485036 (-0.50%)
cycles in affected programs: 79081682 -> 78363520 (-0.91%)
total sends in shared programs: 363044 -> 363042 (<.01%)
sends in affected programs: 33 -> 31 (-6.06%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:42 +00:00
Emma Anholt
fb9b2261a1 intel/elk: Move pre-gen6 gl_FragCoord.w -> interpolation lowering to NIR.
BRW shader-db:
total instructions in shared programs: 4409143 -> 4409146 (<.01%)
instructions in affected programs: 330 -> 333 (0.91%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:41 +00:00
Emma Anholt
17ab39fbf8 intel/elk: Fix some tabs in gen4 URB setup.
This formatted terribly in my editor, just use spaces.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:40 +00:00
Emma Anholt
9d7a016ed1 intel/elk: Retire the global float pixel_x/y values.
Nothing used them any more.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:40 +00:00
Emma Anholt
e1bf014b6e intel/elk: Reduce this->pixel_x/y usage in gfx4 interp setup.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:40 +00:00
Emma Anholt
241bc5da70 intel/elk: Use the pixel_coord UW x/y values for noncoherent FB reads.
No need to force generating the float cast just to turn it back to an int.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:39 +00:00
Emma Anholt
1134cdc198 intel/elk: Lower load_frag_coord to load_{pixel_coord,frag_coord_z/w} in NIR.
This moves some conversions to NIR that may get eliminated, and also
distinguishes gl_FragCoord.z/w loads at the shader info level so we don't
need to flag uses_src_depth/uses_src_w when only gl_FragCoord.xy get used
(as is typical).  This reduces thread payload setup on many shaders.
Also, interestingly, blorp shaders stop reserving space for z/w despite
not putting them in the payload (since PS_EXTRA isn't filled out for z/w).

HSW shader-db is noise:

total instructions in shared programs: 9942649 -> 9942997 (<.01%)
instructions in affected programs: 143167 -> 143515 (0.24%)

total cycles in shared programs: 314768862 -> 314299112 (-0.15%)
cycles in affected programs: 62951452 -> 62481702 (-0.75%)

LOST:   44
GAINED: 26

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:39 +00:00
Emma Anholt
88f1656133 intel/elk: Save the UW pixel x/y as a temp.
This will be used for representing gl_FragCoord in NIR and reducing
payload registers pushed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:38 +00:00
Emma Anholt
5222c35924 intel/elk: Save the UW pixel x/y as a temp on gfx6+.
This will be used for representing gl_FragCoord in NIR and reducing
payload registers pushed.

HSW results:

total instructions in shared programs: 9940636 -> 9948574 (0.08%)
instructions in affected programs: 852560 -> 860498 (0.93%)

total cycles in shared programs: 314804525 -> 314900080 (0.03%)
cycles in affected programs: 39786599 -> 39882154 (0.24%)

LOST:   5
GAINED: 11
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:38 +00:00
Emma Anholt
af74abd68c intel/fs: Don't bother checking if load_frag_coord uses interpolation.
This was leftover dead code from 4bb6e6817e ("intel: Use a system value
for gl_FragCoord") -- the sysval doesn't do any interpolation and doesn't
have sources that could use a barycentric.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:37 +00:00
Emma Anholt
1b9b63de37 intel/shim: Report I915_PARAM_HAS_GEN7_SOL_RESET.
Quiets more startup warnings from drm-shim.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:37 +00:00
Emma Anholt
1b6689d79e 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>
2025-06-18 23:11:37 +00:00
Emma Anholt
908bfb2ac9 nir: Add support for load_frag_coord_zw to nir_opt_fragdepth.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:36 +00:00
Emma Anholt
3b28604be2 nir: Make pixel_coord/frag_coord_zw be peephole-able sysvals.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:36 +00:00
Emma Anholt
8fa6d473e7 nir: Add SYSTEM_VALUE_FRAG_COORD_Z/W.
Intel's going to use these.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:36 +00:00
Emma Anholt
7db62e6dad nir: Split nir_load_frag_coord_zw to separate z/w intrinsics.
This will be a win for Intel for tracking which payload values need to be
set up.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
2025-06-18 23:11:36 +00:00
Emma Anholt
0bf114736a intel: Use the common NIR lowering for fquantize2f16.
This generates one extra instruction to set the rounding mode to RTE due
to f2f16_rtne in the lowering.  This changes the result for
fquantize2f16(65505.0) from 65536 to 65504, which fixes SPIR-V
conformance for this value:

    If Value is positive with a magnitude too large to represent as a
    16-bit floating-point value, the result is positive infinity. If Value
    is negative with a magnitude too large to represent as a 16-bit
    floating-point value, the result is negative infinity.

SPIR-V doesn't specify whether this overflow check is before or after
rounding, but IEEE specifies rounding first, which is what produces our
65504.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25552>
2025-06-18 22:45:08 +00:00
Yiwei Zhang
4efaa64159 vulkan/treewide: add and use common Android HMI hal implementation
There's no need for a per driver HMI implementation since the
vk_icdGetInstanceProcAddr implementation can well populate the required
entrypoints for Android icd.

Changes have to be done in this single commit for simplicity. Otherwise,
I would have to create a separate android shared library in the runtime
like how vk_instance is handled today, so that the target is able to
check per driver enablement def. However, after all drivers have
migrated over within this MR, we still have to clean those up. So I
decided to just do those in a single commit instead.

v2: avoid preloading u_gralloc in vulkan hal open

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:53 +00:00
Yiwei Zhang
04d0392007 vulkan/android: clean up helpers no longer used
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:53 +00:00
Yiwei Zhang
08f18030bd venus: adopt common android u_gralloc helpers
Drop explicit u_gralloc init since it will be initialized upon the
initial vk_android_get_ugralloc.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:53 +00:00
Yiwei Zhang
217685108a gfxstream: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:52 +00:00
Yiwei Zhang
edbefeb5b1 v3dv: drop explicit u_gralloc init
u_gralloc will be initialized upon the initial vk_android_get_ugralloc.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:52 +00:00
Yiwei Zhang
6d27c16f13 v3dv: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:52 +00:00
Yiwei Zhang
818464f443 turnip: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:52 +00:00
Yiwei Zhang
ba48380260 radv: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:51 +00:00
Yiwei Zhang
ca419ff624 panvk: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:51 +00:00
Yiwei Zhang
73aa0f5370 nvk: drop explicit u_gralloc init
u_gralloc will be initialized upon the initial vk_android_get_ugralloc.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:50 +00:00
Yiwei Zhang
0bff86d31e nvk: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:50 +00:00
Yiwei Zhang
0e77de00e3 lvp: drop explicit u_gralloc init
u_gralloc will be initialized upon the initial vk_android_get_ugralloc.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:50 +00:00
Yiwei Zhang
a2ca6843c7 lvp: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:50 +00:00
Yiwei Zhang
02c65181c1 hasvk: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:49 +00:00
Yiwei Zhang
710282f83c anv: adopt common Android gralloc helpers
u_gralloc will be initialized upon the initial vk_android_get_ugralloc.

v2: drop explicit gralloc init

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:49 +00:00
Yiwei Zhang
896bda5143 anv: free up hwvulkan_device_t upon driver unloading
Per <hardware/hwvulkan.h>, the hw_device_t::close() function is called
upon driver unloading. The behavior has been like this since Android 10.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:49 +00:00
Yiwei Zhang
0c141ef492 vulkan/android: update helper to initialize u_gralloc once
Initialize u_gralloc once upon the initial init or get call. We'll skip
updating the backend drivers for this since most usages will be cleaned
up later.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:49 +00:00
Yiwei Zhang
6c284cd534 vulkan/android: rename global u_gralloc ptr
...to avoid mixing up with type name and local returns from getter.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35561>
2025-06-18 22:23:48 +00:00
Jesse Natalie
856f1d4e3c d3d12: Fail-fast on PSO creation failures
I'm seeing crash reports from the wild where it's not necessarily clear why
something failed, and it'd be nice to have the PSO desc on the stack when
something failed. It ends up being fatal anyway (we don't gracefully drop
draw calls, and I don't think we should).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35614>
2025-06-18 22:07:19 +00:00
Jesse Natalie
43d61df19b microsoft/compiler: Clamp bias to DXIL valid range
Technically this won't produce valid results, but it will at least compile and
will probably be good enough, which is better than where we are right now,
which is that shaders fail to validate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35614>
2025-06-18 22:07:19 +00:00
Olivia Lee
b8c7fcda27 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>
2025-06-18 21:16:23 +00:00
Sagar Ghuge
a676ba9294 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>
2025-06-18 20:56:56 +00:00
Eric Engestrom
6446433761 docs: add sha sum for 25.1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35611>
2025-06-18 20:52:32 +00:00
Eric Engestrom
5e772e00d5 docs: add release notes for 25.1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35611>
2025-06-18 20:52:32 +00:00
Eric Engestrom
952305e853 docs: update calendar for 25.1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35611>
2025-06-18 20:52:32 +00:00
Emma Anholt
0ba0681cfc tu: Add a link to my branch for stencil read optimization.
No sense in someone else retimplementing it if they want to test it, too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34991>
2025-06-18 20:30:31 +00:00
Emma Anholt
7714480c79 tu,freedreno/a6xx: Give the FS_CTRL UNK24 bit a name: INOUTREGOVERLAP.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34991>
2025-06-18 20:30:31 +00:00
Emma Anholt
7fe18b147d tu,freedreno: Rename the MRT enable_blend field to blend_reads_dest.
The per-MRT blend enables are in RB_MRT_CONTROL regs, this field is a
bitmask of whether we need to read in the MRT's current color in order to
perform the blending/colormask/logicop.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34991>
2025-06-18 20:30:31 +00:00
Job Noorman
78f62d6d6d nir: remove unused global_atomic(_swap)_ir3 intrinsics
ir3 switched to using the generic ones.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:33 +00:00
Job Noorman
2490ecf5fc ir3: ingest global addresses as 64b values from NIR
There are currently two places where we have to handle values that are
logically 64b: 64b atomics and 64b global addresses. For the former, we
ingest the values as 64b from NIR, while the latter uses 2x32b values.
This commit makes things more consistent by using 64b NIR values for
global addresses as well.

Of course, we could also go the other way around and use 2x32b values
everywhere, which would make things consistent as well. Given that ir3
doesn't actually have 64b registers, and 64b values are represented by
collected 2x32b registers, this could actually make more sense.

In the end, both methods are mostly equivalent and it probably doesn't
matter too much one way or the other. However, the reason I have a
slight preference for ingesting things as 64b is that it allows us to
use more of the generic NIR intrinsics, which use 1-component values for
64b addresses or atomic values. This commit already makes
global_atomic(_swap)_ir3 obsolete and I'm planning to create generic
intrinsics to support ldg.a/stg.a as well.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:32 +00:00
Job Noorman
c91f4b2363 ir3: use ir3_64b helpers where possible
Don't rely on manually (un)packing 64b values from/into components but
use the newly introduced ir3_64b helpers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:32 +00:00
Job Noorman
7cf01a1ae0 ir3: don't vectorize 64b values
The only 64b ops that are supported are (un)packs and using rptN won't
help them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:32 +00:00
Job Noorman
669270ca7e ir3: add support for u2u64
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:31 +00:00
Job Noorman
d2f9972945 ir3/lower_preamble: add support for 64b values
Now that we support 64b values in more places, they might end up being
stored in the preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:31 +00:00
Job Noorman
917c56c78c ir3: add ir3_split_off_scalar helper
This implements the common pattern of splitting-off a scalar value from
a vector. It handles both 64b (via ir3_64b) and normal register scalars.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:31 +00:00
Job Noorman
37f4786881 ir3: add helpers to handle 64b values
64b values occupy 2 registers but we receive them as a single component
value from NIR. Since there are many places that assume a 1:1
relationship between components and instructions, this can be error
prone as we have to remember to double the number of components whenever
a 64b value is involved.

This commit tries to improve on this situation by representing 64b
values as a collect of 2 registers, restoring the 1:1 mapping between
NIR components and ir3 instructions. This commit only adds some helpers
to create 64b values and access their individual components but doesn't
actually use them yet. This will happen in a follow-up commit.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:31 +00:00
Job Noorman
2f75e6cba9 ir3: flatten nested collects
When creating a collect with a source that is itself a collect, flatten
the latter's sources into the new collect. This is mainly useful for
collects used for 64b values, as we can treat them just like non-64b
values when collecting them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:30 +00:00
Job Noorman
74aecf2207 ir3: add support for collects in ir3_get_src_shared
We want to start lowering certain NIR instructions to collects (e.g.,
instructions with a 64b def) which means that ir3_get_src_shared has to
support collects. Since we can't mov the result of a collect, implement
this by converting its sources and creating a new collect.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:30 +00:00
Job Noorman
36300ee51d ir3: move collect/split helpers to ir3.{c,h}
They have nothing to do with ir3_context and this way, we can use them
from ir3.h.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33797>
2025-06-18 19:06:30 +00:00
José Roberto de Souza
37f4182ac3 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>
2025-06-18 18:52:19 +00:00
Georg Lehmann
e9c886c331 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>
2025-06-18 18:18:15 +00:00
Corentin Noël
ab5605aab3 ci: Update CrosVM and Virglrenderer
Update to their latest version on time

Update Rust to 1.81 as it is the minimal required version for CrosVM

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35598>
2025-06-18 17:34:11 +00:00
Hoe Hao Cheng
412d97e667 zink/codegen: init properties struct fully for double-loaded extensions
Fixes: 4d1768aec5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35608>
2025-06-18 17:17:08 +00:00
Jesse Natalie
1fb0e76233 microsoft/compiler: Fix PSV0 for validator 1.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35595>
2025-06-18 16:49:36 +00:00
Christopher Gautier
48e8d6d207 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>
2025-06-18 16:09:03 +00:00
Christopher Gautier
db4c878e4f panfrost, panvk: Use arch version 9 to distinguish between Bifrost & Valhall
The change was performed automatically with a regular expression over
the code base.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35553>
2025-06-18 16:09:03 +00:00
Gurchetan Singh
3a3239dcf9 gfxstream: proper depedendences in non virtgpu-kumquat case
In case virtgpu_kumquat isn't built, provide a null_dep
rather than undefined meson dependencies.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35607>
2025-06-18 15:16:32 +00:00
Martin Krastev
fb97f3f836 svga/ci: enable vmware farm
Issue with farm infra licensing banished for one more year.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35602>
2025-06-18 14:52:25 +00:00
Karol Herbst
b4b6582220 rusticl: cl_khr_icd 2.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35241>
2025-06-18 13:30:40 +00:00
Karol Herbst
dd686e0d81 rusticl/icd: use default value for cl_icd_dispatch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35241>
2025-06-18 13:30:40 +00:00
Karol Herbst
924c76b7e5 include: sync OpenCL headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35241>
2025-06-18 13:30:40 +00:00
Christian Gmeiner
034ac06c64 etnaviv: nir: Use texldlpcf opcode for shadow texture look-ups with explicit LOD
Fixes the following test on GC7000:
 - dEQP-GLES3.functional.shaders.texture_functions.texture.sampler2darrayshadow_vertex
 - dEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_vertex
 - dEQP-GLES3.functional.shaders.texture_functions.texturelod.sampler2dshadow_fragment
 - dEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler2dshadow_vertex
 - dEQP-GLES3.functional.shaders.texture_functions.textureprojlod.sampler2dshadow_fragment

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/35600>
2025-06-18 13:10:59 +00:00
Eric Engestrom
081aa09aeb meson: drop unnecessary -D legacy-x11=none
Array options are allowed to be empty, so there's no need to add an
extra value to convey that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35309>
2025-06-18 12:39:26 +00:00
Russell Greene
e1bcd0f4a5 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>
2025-06-18 10:48:07 +00:00
Karol Herbst
93f24f0bd0 rusticl: support cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
6a36056f59 zink: lower bitfield operations without maintenance9
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
8ba63c1d16 zink: check for VK_KHR_maintenance9
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
9c0d121366 v3d: lower bitfield_extract8|16
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
9d9a17ea2a r600: lower bitfield_extract8|16
Reviewed-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
0e24452535 panfrost: lower bitfield_extract8|16
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
b9e1e91a86 ir3: enable bitfield lowering for cl_khr_extended_bit_ops
Co-developed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
dd652bb8f0 agx: enable bitfield lowering for cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
a16eb630fa llvmpipe: more bitfield_extract lowering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
cf3b16f7af clc: support cl_khr_extended_bit_ops
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Karol Herbst
1a5b5a883d vtn: mark BitInstructions cap as supported
It simply enables certain Shader only instructions for Kernels.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
2025-06-18 10:13:44 +00:00
Samuel Pitoiset
e5d047d160 ci: uprev VKCTS main to 9cc8e038994c32534b3d2c4ba88c1dc49ef53228
RADV is the only driver using VKCTS main. This bumps adds tests for
maintenance9, unified_image_layout and VP9.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35540>
2025-06-18 09:15:34 +00:00
Christian Gmeiner
07f5cbcd9b etnaviv: nir: Add assertion to prevent src2 conflicts in texture instructions
Add an assert to catch cases where both nir_tex_src_comparator and
nir_tex_src_ddy attempt to use the same src2 slot in texture instructions.
This prevents silent overwrites that could cause incorrect shader
compilation.

The assertion helps catch potential issues in complex texture operations
like those found in dEQP textureGrad shadow tests, where multiple
texture sources compete for the same hardware slot.

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/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
3225d3e918 etnaviv: nir: Use texldgpcf opcode for shadow texture gradients
Passes all dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*
tests on GC7000.

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/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
7149597860 etnaviv: Push nir_tex_instr down to etna_emit_tex(..)
There are too many parameters already.

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/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
cc4a6fa25c etnaviv: nir: Legalize txd comparator
The hardware expects textureGrad (txd) shadow comparator to be
specified as the w component of the coordinate, rather than as a
separate comparator source.

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/35531>
2025-06-18 08:58:41 +00:00
Christian Gmeiner
0f25d5e3f4 etnaviv: isa: Add texldgpcf instruction
Implement support for the texldgpcf instruction, which handles texture
gradient sampling with shadow comparison.

Blob generates such txf's for
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*shadow*

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/35531>
2025-06-18 08:58:40 +00:00
Eric Engestrom
14fedcfb8d ci_run_n_monitor: fix padding in links
8f557b84f6 was done because `text` is sometimes just an int,
but the fix was only applies to the padding calculation.

Unfortunately, the padding direction is also different between strings
and integers, which means the behaviour is now incoherent.

Let's convert `text` to a string before we start doing anything so that
everything afterwards is coherent.

Fixes: 8f557b84f6 ("ci: crnm: fix hyperlink format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35587>
2025-06-18 08:42:19 +00:00
Karol Herbst
21ed913198 rusticl/image: enable sRGB support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35535>
2025-06-18 06:53:19 +00:00
Georg Lehmann
e0cdf4dfdd radv/nir/lower_cmat: use common matrix layout on gfx12
The GFX12 ISA doc describes other layouts for A/B, but they are identical
to the C layout with the exception of the order of the rows (columns for A).
And as long as these are swapped in the same way for both A and B, the muladd
result will be the same. So we use the C layout for all uses.

This will simplify conversions between uses, and allows A/B to use a single
memory access for load/store in wave32.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35570>
2025-06-18 06:33:06 +00:00
Valentine Burley
e82e1bca1d intel/ci: Drop deprecated fp16 environment variable
Fixes: cf3ec8d3b9 ("rusticl: enable proper fp16 support")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35574>
2025-06-18 06:13:25 +00:00
Valentine Burley
04d35cacbf intel/ci: Reduce parallelism of intel-adl-cl job
The intel-adl-cl job was previously running on two DUTs, but the
runtime reported by deqp-runner was only about 3 minutes.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35574>
2025-06-18 06:13:25 +00:00
Valentine Burley
68244ee819 anv/ci: Add a pre-merge vkd3d job on ADL
Introduce a new, pre-merge vkd3d-proton job on Alder Lake, and move the
VK_DRIVER variables to the .anv-test template.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35574>
2025-06-18 06:13:25 +00:00
Yiwei Zhang
5cb50c3cf5 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>
2025-06-17 22:51:40 -07:00
Yiwei Zhang
c169ad60c1 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>
2025-06-17 22:51:30 -07:00
Connor Abbott
60843bc806 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>
2025-06-17 23:04:00 +00:00
Connor Abbott
0017b9e8ed 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>
2025-06-17 23:04:00 +00:00
Gurchetan Singh
f7a9991b89 mesa: add option to enable virtgpu_kumquat FFI for gfxstream
Will be used by Cuttlefish CI/CD, but also commonly used by
gfxstream developers.

meson setup gfxstream-build -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvirtgpu_kumquat=true -Dopengl=false -Drust_std=2021

In distros, virtgpu_kumquat is not expected to be packaged since
it is a CI/CD tool.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:55 +00:00
Gurchetan Singh
f2b07903ab mesa: import virtgpu_kumquat_ffi
This adds a frontend to C-FFI to VirtGpuKumquat, to be used
with gfxstream.  This allows testing gfxstream, without a virtual
machine.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:55 +00:00
Gurchetan Singh
c00027b46f mesa: import virtgpu kumquat
This is Rust-based client side of the Kumquat protocol.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
040b256abd mesa: import mesa3d_protocols
This crate is intended to house zerocopy-based protocols
and utilites for them.  This is useful for paravirtualization
and microkernel-like systems.

Currently, the only supported protocol is the Kumquat GPU protocol.

https://crosvm.dev/book/appendix/rutabaga_gfx.html#kumquat-media-server

And there is a concept of a "KumquatStream".  In the future, there
would be more protocols, like a "MagmaStream".  In fact, this crate
would house more generic streams in the future, a gfxstream crate
(* hears minds getting blown *) if you would like.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
e0b1193361 mesa: import mesa3d_util
This is intended to a Rust analog to "src/util", which has
many utilities used by Mesa developers.  This is mostly
a copy of ${crosvm} rutabaga_gfx/src/rutabaga_os (which will
be deleted in favor of this crate).

Key constructs include:
    - SharedMemory
    - MemoryMapping
    - Tube (sockets, essentially)
    - OwnedDescriptor (HANDLE or fd-based)
    - WaitContext (epoll, ..)

As one would expect, Linux implementations are the most complete.

Acked-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
68c70c3eff subprojects: add zerocopy
Version 0.8.13 supported in:

     - AOSP
     - Fedora (https://src.fedoraproject.org/rpms/rust-zerocopy)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
15b100770b subprojects: add remain
Version 0.2.12 or greater supported in:

  - AOSP
  - Fedora (https://src.fedoraproject.org/rpms/rust-remain)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
85f620cabc subprojects: add thiserror
Version 2.0.11 or greater supported in:

  - Android
  - Fedora (https://src.fedoraproject.org/rpms/rust-thiserror)
  - Debian

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
92d7504de3 subprojects: add log
Version 0.4.27 available in:

- AOSP
- Fedora (https://src.fedoraproject.org/rpms/rust-log)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
043d503f9d subprojects: add rustix
Version 0.38.31 available:

   - AOSP
   - Fedora (https://bodhi.fedoraproject.org/updates/?packages=rust-rustix)
   - Debian (https://tracker.debian.org/pkg/rust-rustix)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
e04026adde subprojects: add linux-raw-sys
Version 0.4.14 or above supported in:

    - AOSP
    - Fedora
      (https://bodhi.fedoraproject.org/updates/?packages=rust-linux-raw-sys)
    - Debian

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
f02e60409b subprojects: add errno
Version 0.3.12 in:

     - Fedora
       (https://packages.fedoraproject.org/pkgs/rust-errno/rust-errno+default-devel/)
     - AOSP (0.3.8, but should still work)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
59e2d1e549 subprojects: add libc
Version 0.2.168 supported in:

     - Android
     - Fedora
       (https://bodhi.fedoraproject.org/updates/?packages=rust-libc)
     - Debian (https://tracker.debian.org/pkg/rust-libc)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
734dd83494 subprojects: add bitflags
Version 2.9.1 supported in:

    - Android
    - Fedora (https://src.fedoraproject.org/rpms/rust-bitflags)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
f20d43d654 subprojects: add cfg-if
Version 1.0.0 supported in:

    - AOSP
    - Fedora
      (https://bodhi.fedoraproject.org/updates/?packages=rust-cfg-if)
    - Debian (https://tracker.debian.org/pkg/rust-cfg-if)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
35894b5c87 subprojects: add more syn features
This is needed by the zerocopy crate.

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
71ff4ab788 subprojects: update syn to 2.0.87
Fedora is at 2.0.90 now.

https://src.fedoraproject.org/rpms/rust-syn

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
62e36aeb95 subprojects: update quote to 1.0.35
Debian is at 1.0.37

https://tracker.debian.org/pkg/rust-quote

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
c9c3a1f869 subprojects: fix missing space between colon and license string
Essentially:

find ./ -type f -exec sed -i -e "s/license :'/license : '/g" {} \;

Suggested-by: @LingMan
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Eric Engestrom
0766d14562 lavapipe/ci: catch all the dEQP-VK.synchronization2.timeline_semaphore.* flakes
Suggested-by: @daniels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:36 +00:00
Eric Engestrom
734523f851 broadcom/ci: catch more similar flakes
Suggested-by: @daniels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:36 +00:00
Eric Engestrom
393cbfa8f7 radv+zink/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:36 +00:00
Eric Engestrom
418ebcde82 lavapipe/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
60c89bf6f3 freedreno/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
cc1cbf87f0 broadcom/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
454684aa59 radv/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
d5a3cfac25 radeonsi/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
494bb340eb lavapipe/ci: skip timing out tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
0dcdee80c6 lavapipe/ci: document new failure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
8d497c94c1 nvk+zink/ci: document new failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
bd5b852ee6 freedreno/ci: document fixed & new failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
757ad6a333 etnaviv/ci: document new failure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Eric Engestrom
92cf8b2dc3 radeonsi/ci: update glcts expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35592>
2025-06-17 21:49:35 +00:00
Brian Paul
0b2b51cf1c svga: assorted code clean-ups
- formatting clean-ups, remove tabs, trailing whitespace.
- move var decls into loops or closer to where they're used.
- add const qualifiers.

No functional changes.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35579>
2025-06-17 20:50:48 +00:00
Mike Blumenkrantz
5bc840ea62 zink: add ZINK_DEBUG to skip msaa stores on renderpasses which have ended
this is super illegal and not conformant but very desirable on tilers
for certain apps

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 15:49:38 -04:00
Mike Blumenkrantz
2b6e7c4609 tc: add #define to disable strict resolve merging
this enables merging fb resolves which do not cover the full dst

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 15:49:36 -04:00
Mike Blumenkrantz
8933b3ed39 tc: add resolve resource to rp info
this allows non-winsys resolves to be optimized out

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 15:49:34 -04:00
Mike Blumenkrantz
e2d40aab6f tc: rework rp info incrementing
the logic for incrementing this in recorder/executor threads was far
too complex, which meant there were unlimited bugs which could trigger
in subtle corner cases

rework this to be simpler to ensure that the executor info always matches
up with the recorder info

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 15:49:31 -04:00
Mike Blumenkrantz
4989a40e89 tc: explicitly terminate renderpasses on fb access
this helps to avoid some deadlock scenarios when rp tracking gets more complex,
and it also makes rp splitting a bit more precise

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 15:49:29 -04:00
Mike Blumenkrantz
ea85a14c35 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>
2025-06-17 15:49:27 -04:00
Mike Blumenkrantz
438e5abc06 zink: create inline resolve surface in begin_rendering
this will unify more code in a future commit

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 14:05:30 -04:00
Mike Blumenkrantz
a5265384fc zink: move tc inlined resolve code down a bit
this was getting clobbered by msrtss

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 14:05:30 -04:00
Mike Blumenkrantz
7b3454322c zink: add format param to zink_surface_resolve_init
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 14:05:30 -04:00
Mike Blumenkrantz
8755a8b0ca zink: extract resolve surface init to separate function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 14:05:30 -04:00
Mike Blumenkrantz
9b43daca24 zink: be slightly more precise about flagging loadop change on fb invalidate
probably doesn't change anything anywhere, but it can't hurt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 14:05:30 -04:00
Mike Blumenkrantz
19ec703f28 zink: update docs for nopc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35477>
2025-06-17 14:05:27 -04:00
Jesse Natalie
d6e5f4852c d3d12: Fix 'surface conversion' path for RTVs
Fixes: 2eb45daa ("gallium: de-pointerize pipe_surface")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35585>
2025-06-17 17:42:21 +00:00
Jesse Natalie
2023a96e4d d3d12: Optimize redundant flushes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35566>
2025-06-17 17:25:10 +00:00
Matt Jolly
1a698c75ae build: Rust: Bump minimum Meson and bindgen version
Meson 1.7.0 is required to ensure that generated bindings
are suitable for use with the selected Rust compiler.

Bindgen is bumped to 0.71.1 which has more permissive handling of
`--rust-target`, enabling (almost) any valid Rust version to be
passed as a target; `-nightly` and `-beta*` suffixes are an exception
to this.

This behaviour is expected to improve further with later versions of
Meson; upstream fixes have landed that:

 - pass a stripped version string to bindgen
 - additionally pass an appropriate `--rust-edition` if `rust_std` is
   set (or "nightly" if the compiler is `nightly`).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12680
Bug: https://bugs.gentoo.org/946913
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33725>
2025-06-17 16:51:15 +00:00
Matt Jolly
c1440cd342 ci: add header with image tags to build-bindgen.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33725>
2025-06-17 16:51:15 +00:00
Matt Jolly
fe8ca3c9ab ci/fedora: use build-bindgen.sh to install [c]bindgen
We now depend on a later version of bindgen than is available
in the Fedora repositories. Use `build-bindgen.sh` to install
the specific version that we need.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33725>
2025-06-17 16:51:15 +00:00
Matt Jolly
1f00e6fb28 ci/debian: arm64: only install Meson once
We already use `install-meson.sh` so that we can select an appropriate
version of Meson. Instead of installing two copies just do it before
we begin building anything in the container.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33725>
2025-06-17 16:51:15 +00:00
Matt Jolly
a75a1cd8ec ci/alpine: Control Meson version
We need to use a later version of Meson than is currently available
in the Alpine repository. Use the existing `install-meson.sh` to fetch
the appropriate version from PyPI.

This requires that we explicitly install a Ninja impl on Alpine -
Samurai is the preferred impl and by using this we do not need
to prefix `PATH` to access Ninja.

`apk` installed Installed packages are additionally sorted.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33725>
2025-06-17 16:51:15 +00:00
David Rosca
31967efd2c radv/video: Fix indentation
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35543>
2025-06-17 16:28:59 +00:00
David Rosca
58085da743 radv/video: Only enable VP9 decode with supported firmware
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35543>
2025-06-17 16:28:59 +00:00
David Rosca
3b6f23a8e1 ac/gpu_info: Add vcn_fw_revision
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35543>
2025-06-17 16:28:59 +00:00
Gurchetan Singh
1d62d989a1 gfxstream: fix virtio-gpu on Goldfish interactions
So Goldfish doesn't really have /dev/dri/renderN128
in it's system image, but somehow this worked in the
past?

Probably since VirtGpuDevice::getInstance() never
returned a nullptr in the past, and now it does.

Add nullptr checks to fix the crash.

TEST=emulator -feature GuestAngle -gpu lavapipe boots
     to UI on main

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
2025-06-17 16:13:03 +00:00
Gurchetan Singh
5090aa7160 gfxstream: fix opening virtgpu DRM
Somebody needs to modify Cuttlefish's SELinux rules to
account for the syscalls used by drmGetDevices2().

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
2025-06-17 16:13:03 +00:00
Serdar Kocdemir
7a723331a1 gfxstream: Remove unnecessary parentheses in codegen
Improve readability of the code by removing some of the
unnecessary parentheses in the generated code.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
2025-06-17 16:13:03 +00:00
Serdar Kocdemir
c77ccd0904 gfxstream: Check size for memcpy operations
Avoid nullptr from zero-size allocations being passed
into the copy functions, which is causing UB errors.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
2025-06-17 16:13:03 +00:00
Jason Macnak
191fe7e4c4 gfxstream: Update snapshot decoder to handle imageless framebuffer
When `VkFramebufferCreateInfo::flags` has
`VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT`,
`VkFramebufferCreateInfo::pAttachments` should be ignored.

Test: cvd create \
    --gpu_mode=gfxstream_guest_angle_host_swiftshader \
    --gpu_renderer_features="VulkanSnapshots:enabled"

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
2025-06-17 16:13:03 +00:00
Bo Hu
0c1390acfb gfxstream: [vulkan snapshot]: update codegen for vkCmdCopyImageToBuffer
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35580>
2025-06-17 16:13:03 +00:00
Janne Grunau
48ede1a757 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>
2025-06-17 15:42:55 +00:00
Rhys Perry
ea0670dfb5 nir: simplify nir_addition_might_overflow
nir_unsigned_upper_bound is good enough that this isn't needed anymore.

No fossil-db 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/35514>
2025-06-17 13:28:00 +00:00
Rhys Perry
f3b7ac730c nir/uub: improve ior/ixor with constant sources
No fossil-db 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/35514>
2025-06-17 13:28:00 +00:00
Rhys Perry
ae6ad8977b nir/uub: improve iand with constant sources
fossil-db (navi21):
Totals from 9 (0.01% of 79653) affected shaders:
Instrs: 11878 -> 11868 (-0.08%)
CodeSize: 61572 -> 61508 (-0.10%)
Latency: 44585 -> 44581 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 9697 -> 9660 (-0.38%)
VALU: 8889 -> 8876 (-0.15%)
SALU: 1339 -> 1342 (+0.22%)

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/35514>
2025-06-17 13:27:59 +00:00
Rhys Perry
8ee5440073 nir/uub: improve ishl/imul with constant sources
fossil-db (navi21):
Totals from 1 (0.00% of 79653) affected shaders:
Instrs: 1339 -> 1338 (-0.07%)
CodeSize: 7244 -> 7240 (-0.06%)
Latency: 19827 -> 19822 (-0.03%)
InvThroughput: 9913 -> 9911 (-0.02%)
SALU: 419 -> 418 (-0.24%)

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/35514>
2025-06-17 13:27:59 +00:00
Lionel Landwerlin
4a966fd28d 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>
2025-06-17 11:23:46 +00:00
Lionel Landwerlin
4a93c4f5e3 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>
2025-06-17 11:23:46 +00:00
Calder Young
03cdb3078a 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>
2025-06-17 11:23:46 +00:00
Lionel Landwerlin
f4c1753c1a 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>
2025-06-17 11:23:46 +00:00
Lionel Landwerlin
bd959ea48f 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>
2025-06-17 11:23:46 +00:00
Lionel Landwerlin
befc2a2f62 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>
2025-06-17 11:23:45 +00:00
Samuel Pitoiset
ff8b652ff9 docs: remove redundant nogttspill description
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35572>
2025-06-17 09:28:34 +00:00
Sergi Blanch-Torne
8f557b84f6 ci: crnm: fix hyperlink format
While preparing a console link, if there is not padding defined and the text
is not strictly a string, we can have an exception that is also finishing the
execution. So, we need to strictly cast the text variable.

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

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35511>
2025-06-17 09:02:40 +00:00
Samuel Pitoiset
c1cd28a6ab docs: move nogttspill to the RADV_PERFTEST section
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35571>
2025-06-17 09:50:01 +02:00
Eve
f4ad6e6d4a radv: add RADV_PERFTEST option to turn off gtt spilling
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8107
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35355>
2025-06-17 06:46:27 +00:00
Samuel Pitoiset
203aacf064 radv/meta: use radv_get_copy_flags_from_bo() more
Cleanups.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35550>
2025-06-17 06:16:07 +00:00
Jonathan Gray
270035fdce 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>
2025-06-17 05:04:46 +00:00
Brian Paul
21a83aba3b svga: stop using pipe_context::create_surface()
Call svga_create_surface() directly instead.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35565>
2025-06-17 00:13:14 +00:00
Rob Clark
8d13fc447e 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>
2025-06-16 23:40:04 +00:00
Rob Clark
551ffb73c7 freedreno/cffdec: Skip printing null descriptors
If the descriptor is all 0's, it isn't interesting to print.  This
reduces the verbosity of --bindless arg quite a bit.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35534>
2025-06-16 22:53:57 +00:00
Rob Clark
8eb2540b78 freedreno/a6xx: cl_khr_image2d_from_buffer support
This allows sampling from a buffer as if it was a simple (single
level/layer, linear) 2d image/texture.  Add a helper to convert
struct pipe_image_view to an apprpriate fdl_layout and wire it up
in the image view and tex view paths.

Can be tested with cl cts:

 ./test_image_streams 2D read CL_RG CL_SIGNED_INT16 CL_FILTER_NEAREST CL_ADDRESS_CLAMP_TO_EDGE UNNORMALIZED

(for ex)

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35447>
2025-06-16 22:38:36 +00:00
Rob Clark
095e136f8b freedreno/a6xx: Fix max_threads_per_block calc
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35447>
2025-06-16 22:38:36 +00:00
Rob Clark
a890ad80d6 freedreno: Remove obsolete comment
We do used CACHED_COHERENT in some cases.  We don't used
cached-incoherent, so nothing more to do.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35447>
2025-06-16 22:38:35 +00:00
Danylo Piliaiev
4a80e0baf6 tu: Fix tracepoints with renderpasses spanning several cmdbufs
- cmdbuf tracepoint moved to tu_cmd_buffer_begin since we want to
  trace internal cmdbuf where we reconstruct renderpass.
- Stomp renderpass start tracepoint if renderpass doesn't end in
  current cmdbuf, and create new renderpass tracepoint when rp
  is reconstructed.
- Create new trace_rp_drawcalls_start when reconstructing rp
  in the internal cmdbuf.

With this there are no crashes in:
 dEQP-VK.dynamic_rendering.primary_cmd_buff.*
With TU_DEBUG=gmem,forcebin MESA_GPU_TRACES=print

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34981>
2025-06-16 22:22:05 +00:00
Danylo Piliaiev
1cd2a857d6 tu: Rename u_trace renderpass iterators
They are not around renderpass but around draw_cs inside a renderpass.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34981>
2025-06-16 22:22:05 +00:00
Karol Herbst
7e9ee2000a 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>
2025-06-16 21:57:43 +00:00
Jordan Justen
17fbd0df51 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>
2025-06-16 13:59:39 -07:00
Christian Gmeiner
3a9acd47c7 nouveau/nir: Don't use deprecated NIR_PASS_V macro
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35544>
2025-06-16 20:44:42 +00:00
Christian Gmeiner
7e8f4df4ff nouveau/nir: Return progress for nv_nir_move_stores_to_end(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35544>
2025-06-16 20:44:42 +00:00
Lionel Landwerlin
4dad9d443b anv: fix valgrind warning
Found when running
KHR-Single-GL46.arrays_of_arrays_gl.InteractionArgumentAliasing2_var_type_index_4
with zink/anv :

Test case 'KHR-Single-GL46.arrays_of_arrays_gl.InteractionArgumentAliasing2_var_type_index_4'..
==22722== Thread 3 glcts:zfq0:
==22722== Uninitialised byte(s) found during client check request
==22722==    at 0x134A8D51: anv_batch_bo_finish (anv_batch_chain.c:350)
==22722==    by 0x134ACD3E: anv_cmd_buffer_end_batch_buffer (anv_batch_chain.c:1114)
==22722==    by 0x13CECB30: end_command_buffer (genX_cmd_buffer.c:3467)
==22722==    by 0x13CECB7B: gfx12_EndCommandBuffer (genX_cmd_buffer.c:3478)
==22722==    by 0x6FFA343: submit_queue (zink_batch.c:739)
==22722==    by 0x672684B: util_queue_thread_func (u_queue.c:294)
==22722==    by 0x6790976: impl_thrd_routine (threads_posix.c:43)
==22722==    by 0x579BAA3: start_thread (pthread_create.c:447)
==22722==    by 0x5828A33: clone (clone.S:100)
==22722==  Address 0x94ac840 is 2,112 bytes inside a block of size 8,192 client-defined
==22722==    at 0x134A04C7: anv_bo_pool_alloc (anv_allocator.c:1311)
==22722==    by 0x134A8772: anv_batch_bo_create (anv_batch_chain.c:262)
==22722==    by 0x134AB6BC: anv_cmd_buffer_init_batch_bo_chain (anv_batch_chain.c:877)
==22722==    by 0x134BCC4C: anv_create_cmd_buffer (anv_cmd_buffer.c:146)
==22722==    by 0x152FEBE4: vk_common_AllocateCommandBuffers (vk_command_pool.c:218)
==22722==    by 0x133FEA1D: vkAllocateCommandBuffers (trampoline.c:1950)
==22722==    by 0x6FF8AE4: create_batch_state (zink_batch.c:367)
==22722==    by 0x6FF91B5: get_batch_state (zink_batch.c:495)
==22722==    by 0x6FF91DB: zink_reset_batch (zink_batch.c:504)
==22722==    by 0x6FF9424: zink_start_batch (zink_batch.c:537)
==22722==    by 0x706C01D: zink_context_create (zink_context.c:5647)
==22722==    by 0x60403A6: st_api_create_context (st_manager.c:978)
==22722==

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d21e7e5a9f ("anv: Query sampler offset in set_image_clear_color()")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35549>
2025-06-16 18:26:30 +00:00
Wenfeng Gao
0af342ce36 mediafoundation: Modify the newly added CODECAPI behavior CODECAPI_AVEncVideoOutputQPMapBlockSize, CODECAPI_AVEncVideoOutputBitsUsedMapBlockSize.
IsSupported() returns S_OK only when the HW encoder supports this API.
GetValue() returns the supported block size for CODECAPI_AVEncVideoOutputQPMapBlockSize and CODECAPI_AVEncVideoOutputBitsUsedMapBlockSize.
SetValue() returns E_INVALIDARG if the set value does not match the supported value.
User can call GetValue() to get the supported block size before calling SetValue() to avoid the failure.

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35554>
2025-06-16 17:49:59 +00:00
Pohsiang (John) Hsu
2bb9f691e8 mediafoundation: fix slice capability check, and fix the slice mb mode, remove slice mode 2
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35554>
2025-06-16 17:49:59 +00:00
Olivia Lee
8b15d0f31f panvk: advertise VK_KHR_maintenance6 on v10+
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
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>
2025-06-16 10:29:26 -07:00
Olivia Lee
0018b6cff1 panvk: allow binding VK_NULL_HANDLE index buffers
This is required by VK_KHR_maintenance6. Because we don't
advertise nullDescriptor, it is only valid to draw with a null index
buffer if the draw accesses 0 indices. For direct draws, this is covered
by checks on instancedCount and indexCount. For indirect draws we need
to add an additional check, under the assumption that if the index
buffer is null, the draw must be empty.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
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>
2025-06-16 10:29:26 -07:00
Olivia Lee
b9046ffa14 panvk: implement VkBindMemoryStatus
Needed for VK_KHR_maintenance6.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
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>
2025-06-16 10:29:26 -07:00
Olivia Lee
c34d88f81d panvk: factor BindImageMemory2 loop into function
This simplifies VkBindMemoryStatus support.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
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>
2025-06-16 10:29:26 -07:00
Olivia Lee
b31dee9b7e 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>
2025-06-16 10:29:25 -07:00
Tapani Pälli
cc6681e878 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>
2025-06-16 15:38:55 +00:00
Sagar Ghuge
3696f85b63 anv: Drop unused helper cmd_buffer_dispatch_kernel
Drop some more unused fields: (Lionel)
- kernel_args_size, kernel_arg_count & kernel_args
- anv_kernel_arg
- anv_kernel
- max_grl_scratch_size

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/35530>
2025-06-16 15:22:09 +00:00
Hoe Hao Cheng
8ed19a407f zink/codegen: check for core promotion using the latest registry entry
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35552>
2025-06-16 22:25:15 +08:00
Eric Engestrom
9e007063f2 ci/piglit: avoid copying /piglit across filesystems when unused
This `mv` copies the folder from the read-only docker image to the
run time overlayfs, which is expensive and unnecessary, and slow on
devices using network disks.

`rm` by comparison is instant, and there is no reason to keep the folder
around if we're taking it away from the expected path anyway.

Fixes: 8d08cde667 ("ci/piglit: Use structured tagging for Piglit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35500>
2025-06-16 11:52:08 +00:00
Patrick Lerda
1d28931d2c 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>
2025-06-16 11:34:42 +00:00
Lucas Fryzek
49f5cc48cf anv: Add format conversion for AHARDWAREBUFFER_FORMAT_YCbCr_P010
Reviewed-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35161>
2025-06-16 10:52:25 +00:00
Sushma Venkatesh Reddy
03fc7d6a6d intel/perf: Add PTL OA support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35298>
2025-06-16 09:01:30 +00:00
Lucas Stach
83a3123ac5 docs/etnaviv: add/fix supported texture extensions
We do support both GL_EXT_texture_shared_exponent and GL_EXT_texture_snorm
on hardware able to deal with those formats. GL_ARB_texture_rg is limited
to HALTI5 feature level, as it requires R8 render target support, which
isn't available in earlier GPU versions.

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/35538>
2025-06-16 07:49:38 +00:00
Samuel Pitoiset
061bc6151a 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>
2025-06-16 06:18:07 +00:00
Samuel Pitoiset
251b23f6c2 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>
2025-06-16 05:56:45 +00:00
Samuel Pitoiset
b0604d6938 docs: mark VK_KHR_depth_clamp_zero_one as done for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35516>
2025-06-16 05:52:39 +00:00
Yiwei Zhang
8368328d98 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>
2025-06-16 04:22:20 +00:00
Autumn Ashton
5b50f229f0 tu: Implement VK_KHR_unified_image_layouts
Turnip does not use any image layouts aside from UNDEFINED, therefore, we can expose this extension.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35536>
2025-06-15 15:42:31 +01:00
Karol Herbst
79656dbcd3 rusticl: implement cl_khr_priority_hints
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35456>
2025-06-15 13:12:11 +02:00
Lucas Stach
1c3f238ce9 etnaviv: expose ARB_seamless_cube_map
While AMD_seamless_cubemap_per_texture gives more control over seamless
filtering than the base extension, the cap isn't strictly handled as a
superset, so we also need to set the cap for the context wide handling
to expose ARB_seamless_cube_map.

Makes piglit spec@amd_seamless_cubemap_per_texture go from skip to pass
as this test (correctly) also checks the presence of the base extension.

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/35527>
2025-06-14 21:50:49 +00:00
Lucas Stach
340dc7787f etnaviv/ci: update expection after blit fixes
With the blit now using the correct shadow a bunch of
blit related tests start passing.

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>
2025-06-14 21:37:06 +00:00
Lucas Stach
ede41372f4 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>
2025-06-14 21:37:06 +00:00
Lucas Stach
d4780f03fc 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>
2025-06-14 21:37:06 +00:00
Mary Guillemard
b5004298aa pan/lib: Add a test for pan_compute_npot_divisor
This ensures proper behaviors of pan_compute_npot_divisor by using the
same algorithm as the hardware to perform the division.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35490>
2025-06-14 17:20:10 +02:00
Mary Guillemard
0d9ac8f448 pan/lib: Rename pan_compute_magic_divisor to pan_compute_npot_divisor
It's not that magical those days.

This also give proper names around the codebase for exponent and
epsilon.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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>
2025-06-14 17:20:02 +02:00
Mary Guillemard
5743bd703d pan/lib: Inline pan_atributes.c in pan_encoder.h
We are going to need those functions in indirect CL codepaths.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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>
2025-06-14 17:19:55 +02:00
Mary Guillemard
c1cd05771f pan/lib: Refactor pan_padded_vertex_count
We are going to move everything in pan_encode.h for CL usage.

This inline the code used by pan_padded_vertex_count.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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>
2025-06-14 17:19:45 +02:00
Mary Guillemard
b53d98eb41 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>
2025-06-14 17:19:28 +02:00
Rhys Perry
01fae0c5c2 ac/llvm: use ds_bpermute_b32 for GFX12 wave64
It works.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35489>
2025-06-14 13:59:11 +00:00
Rhys Perry
9a5073e3a4 ac/llvm: rewrite shuffle waterfall loop
This can't break until we have read all lanes, otherwise it might read
from an inactive lane.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35489>
2025-06-14 13:59:11 +00:00
Rhys Perry
2ff53fd97c 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>
2025-06-14 13:59:10 +00:00
Rhys Perry
8609008aeb ac/llvm: fix mul24 intrinsic overloading
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: e3edc6029b ("ac/llvm: use mul24 intrinsics")
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>
2025-06-14 13:59:10 +00:00
Rhys Perry
3c2b3fbd03 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>
2025-06-14 13:59:10 +00:00
Rhys Perry
ac2e36b377 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>
2025-06-14 13:59:10 +00:00
Georg Lehmann
29787911e7 vulkan: update headers/xml for 1.4.318
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35517>
2025-06-14 08:21:31 +00:00
Olivia Lee
a7276d0010 ci: update CI contact list
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35521>
2025-06-13 23:21:37 -07:00
Olivia Lee
e1856d7152 ci: document process for disabling broken farms in more detail
Reading the previous version of the docs, I had the impression that the
correct action when a farm is broken is to ping Daniel or Emma in
the #freedesktop channel. I learned that just creating an MR to disable
it immediately is fine, and am documenting this. The farm maintainer
table also wasn't mentioned in the docs previously.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35521>
2025-06-13 23:21:37 -07:00
Faith Ekstrand
6a77c8e953 nvk: Add an nvk_sampler_header struct and return it by value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35475>
2025-06-14 03:52:34 +00:00
Faith Ekstrand
bbc6f50963 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>
2025-06-14 03:52:34 +00:00
Faith Ekstrand
40b59a5c26 nil: Rework the descriptor interface
This adds a new Descriptor (nil_descriptor) struct and reworks all the
methods/functions to return a Descriptor.  This is less janky than all
the output pointers.  It also gives us a struct type that's the right
size so we're not declaring uint32_t[8] arrays everywhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35475>
2025-06-14 03:52:34 +00:00
Yiwei Zhang
12e94a91e3 zink: leave can_do_invalid_linear_modifier open for venus
Venus is able to force LINEAR modifier to ensure the handshake across
the legacy modifier-unaware boundaries. e.g. Xorg

Acked-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35453>
2025-06-14 03:31:32 +00:00
Yiwei Zhang
d6bff136bd 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>
2025-06-14 03:31:32 +00:00
Yiwei Zhang
6781dcc565 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>
2025-06-13 21:54:04 +00:00
Mel Henning
7d974c32ce 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>
2025-06-13 19:43:25 +00:00
Christian Gmeiner
6d8bc4c98a etnaviv: tex_desc: Add seamless cube map support
Seamless cube map filtering requires setting the SEAMLESS_CUBE_MAP bit
in the texture descriptor's CONFIG1 field. Since this bit is controlled
by sampler state but stored in the texture descriptor, we need to handle
the mismatch between sampler state lifetime and descriptor immutability.

Create two texture descriptors per sampler view: one with seamless cube
map disabled and one enabled. At emission time, select the appropriate
descriptor based on the current sampler state's seamless_cube_map flag.

Passes all dEQP-GLES3.functional.texture.filtering.cube.* tests on GC7000.

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/35499>
2025-06-13 19:28:57 +00:00
Olivia Lee
5fe5e3176f panvk: advertise descriptor indexing on valhall
Our existing descriptor implementation already supports
update-after-bind on both bifrost and valhall, but on bifrost the some
of the descriptor limits are lower than the minimum required by the
extension.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
f90b9b3642 panvk: raise descriptor limits on valhall
Previously, our descriptor set limits were set based on the hardware
limits on bifrost. On valhall, the hardware descriptor table limits are
much higher. We need to advertise higher update-after-bind descriptor
limits for descriptor indexing, so might as well increase these also.
The 2^20 limit is the same as nvk and honeykrisp.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
88ac602cc2 panvk: implement shaderInputAttachmentArrayNonUniformIndexing
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
8e4c6990a1 panvk: implement non uniform indexing except for input attachments
We need to lower everything on bifrost, and everything except nonuniform
texture offsets on valhall. With texture offsets, the hardware supports
nonuniform offsets passed in a staging register, but does not support
passing nonuniform offsets as src1 in the narrow layout. We need to make
sure we check for this if we implement narrow offsetms later.

Input attachments are skipped in this commit because they need
additional changes.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
e7a439f73b panvk: implement runtimeDescriptorArray and descriptorBindingVariableDescriptorCount
Runtime descriptor array doesn't require any changes, variable descriptor
count is already mostly supported and just needs handling for
maxVariableDescriptorCount.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
f725bc4475 panvk: implement shaderInputAttachmentArrayDynamicIndexing
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
a268412533 panvk: allow sysvals to be dynamically-indexed
We already do this for push constants, just extend the existing
implementation. We need to update the push_consts sysval inside the
cmd_prepare_push_uniforms loop now because indirect draws patch the
sysvals. Previously this value was only used to read push constant FAUs,
so we didn't care.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
7ca2d51cf6 panvk: advertise texel buffer dynamic indexing
These don't require any changes for support.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
9399258af6 panvk: move descriptor set limits to constant macros
This simplifies get_physical_device_properties and allows us to use the
limits elsewhere.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
e9388f3d2d panvk: use constants from other headers in device properties
We were not able to use these previously because the headers require
PAN_ARCH.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
91ebeddbad panvk: make extensions, features, and properties per-arch
This makes things a little more flexible for groups of fields that are
arch-dependent, and allows us to use existing per-arch constant macros
instead of open-coding their values.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
a681b4f107 panvk: fix outdated comment
The name of the struct that we're currently using is panvk_ssbo_addr.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
5554cca4a2 panvk: add missing include to panvk_cmd_draw.h
This is needed for the panvk_descriptor_state struct. All of the current
sites already included panvk_cmd_desc_state.h, so it wasn't a visible
issue.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-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/35408>
2025-06-13 19:02:19 +00:00
Olivia Lee
b1caa2ae86 ci: disable vmware farm
I am getting spurious CI failures. See:
<https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35408#note_2957802>

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35520>
2025-06-13 18:59:26 +00:00
Lucas Stach
03c40b5aa0 etnaviv: get rid of etna_surface
Now that nothing calls the driver create/destroy surface hooks
anymore, we can get rid of what's left from the 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/35406>
2025-06-13 18:44:37 +00:00
Lucas Stach
8b1ee7adb4 etnaviv: state: stop using etna_surface
Use pipe_surface to fill in the color and ZS buffer 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/35406>
2025-06-13 18:44:37 +00:00
Lucas Stach
999dd209f5 etnaviv: blt: stop using etna_surface
Use pipe_surface to get the necessary information for the
various clears.

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/35406>
2025-06-13 18:44:37 +00:00
Lucas Stach
f034323c20 etnaviv: rs: stop using etna_surface
Use pipe_surface to get the necessary information for the
various clears.

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/35406>
2025-06-13 18:44:37 +00:00
Lucas Stach
9ee9b109ca etnaviv: move render compatible handling from surface to resource
So it can be reused from different places in the driver when
etna_surface is gone.

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/35406>
2025-06-13 18:44:37 +00:00
Lucas Stach
d479573f8e etnaviv: return render resource from render_handle_incompatible if it exists
If a render resource already exists, we know that a earlier check already
determined that the resource isn't compatible with the PE requirements, so
there is no point in checking again. Simply return the render resource if
it exists.

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/35406>
2025-06-13 18:44:36 +00:00
Lucas Stach
0acee3bfbf etnaviv: stop caching RS clear commands on surface
As we want to get rid of the etna_surface, stop caching the (fast) clear
commands for the RS engine on the surface. As the pipe_surface is no
longer a CSO, we were regenerating those commands on each framebuffer
state change anyway, so the additional CPU overhead of doing this for
each clear shouldn't be too much worse.

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/35406>
2025-06-13 18:44:36 +00:00
Lucas Stach
6111d07048 etnaviv: drop precomputed offset from etna_surface
As another step in the direction of getting rid of etna_surface,
plug the offset calculation into all places that need it and drop
the precomputed offset from the surface struct.

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/35406>
2025-06-13 18:44:36 +00:00
Lucas Stach
cd58efd055 etnaviv: drop superfluous PE alignment check
This check and especially the XXX in the comment hasn't been valid
for a long time, as our mipmap layout and render shadow code makes
sure that all levels are properly aligned for PE usage.

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/35406>
2025-06-13 18:44:35 +00:00
Lucas Stach
324cf6c305 etnaviv: don't prepare relocs in etna_surface
Fill the reloc data when the framebuffer state is set. Now that
pipe_surface is no longer a CSO, it doesn't matter that we need
to pay the price for the computation at state set time instead
of surface_create time.

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/35406>
2025-06-13 18:44:35 +00:00
Lucas Stach
162a1cadd0 etnaviv: stop tracking ZS buffer address information multiple times
Same as with the color buffer addresses, we don't need to track the
ZS buffer relocs in different members per GPU generation. Simply
emit the part that's relevant for the targeted GPU instance. Again
TS depth surface base is always the same address as the first depth
pipe address, so we can reuse the reloc.

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/35406>
2025-06-13 18:44:35 +00:00
Lucas Stach
393d594df7 etnaviv: stop tracking color buffer address information multiple times
Currently we track the color buffer address information in multiple reloc
members in the compiled framebuffer state, depending on the GPU generation.
This wastes some space, as some of the relocs will never be used on any
specific GPU instance and it complicates the framebuffer state code.

Stop doing that in favor of a single PE_RT_PIPE_COLOR_ADDR reloc array to
track this information and simply fill and emit the relevant part of that
array. Additionally the TS color surface base is always equal to the first
pixel pipe color address, so we don't need to store this separately, but
can reuse the relocs from the color pipe setup.

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/35406>
2025-06-13 18:44:34 +00:00
Lucas Stach
ce124146e5 etnaviv: drop unused member PE_RT_COLOR_ADDR from compile framebuffer state
Those relocs were never used.

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/35406>
2025-06-13 18:44:34 +00:00
Lucas Stach
e5c77d3367 etnaviv: add screen spec bit for PE multitiling
There are a lot of places scattered through the driver where we check
if the GPU has more than a single pixel pipe and whether the single
buffer feature is supported. All of them are trying to work out if we
need to use multitiling for the PE render targets. Add a screen spec
flag to store the result of both checks and use it where appropriate.

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/35406>
2025-06-13 18:44:33 +00:00
Job Noorman
e31b1b649c ir3: optimize more before opt_preamble
This prevents hoisting values to the preamble that might still get
optimized (away). This especially has a huge impact on binning variants
because many of their outputs got removed but we never optimized after
that.

fossildb stats:

Totals:
MaxWaves: 2765084 -> 2770308 (+0.19%); split: +0.19%, -0.00%
Instrs: 56289002 -> 56226045 (-0.11%); split: -0.13%, +0.02%
CodeSize: 118071672 -> 116551008 (-1.29%); split: -1.29%, +0.00%
NOPs: 9491112 -> 9477190 (-0.15%); split: -0.25%, +0.11%
MOVs: 1790085 -> 1789548 (-0.03%); split: -0.22%, +0.19%
Full: 2156693 -> 2140043 (-0.77%); split: -0.77%, +0.00%
(ss): 1329812 -> 1326394 (-0.26%); split: -0.66%, +0.40%
(sy): 686396 -> 686244 (-0.02%); split: -0.17%, +0.15%
(ss)-stall: 4995295 -> 4993233 (-0.04%); split: -0.69%, +0.65%
(sy)-stall: 19828966 -> 19833863 (+0.02%); split: -0.32%, +0.34%
STPs: 36271 -> 33249 (-8.33%)
LDPs: 45794 -> 42537 (-7.11%)
Preamble Instrs: 14467846 -> 13645555 (-5.68%); split: -5.69%, +0.01%
Early Preamble: 129346 -> 134346 (+3.87%); split: +3.89%, -0.02%
Cat0: 10450369 -> 10436616 (-0.13%); split: -0.23%, +0.10%
Cat1: 2787946 -> 2787085 (-0.03%); split: -0.15%, +0.12%
Cat2: 21265787 -> 21251803 (-0.07%); split: -0.07%, +0.01%
Cat3: 16207098 -> 16178995 (-0.17%); split: -0.17%, +0.00%
Cat5: 1596677 -> 1596707 (+0.00%)
Cat6: 854011 -> 848522 (-0.64%)
Cat7: 1597849 -> 1597052 (-0.05%); split: -0.13%, +0.08%

Totals from 22836 (11.41% of 200220) affected shaders:
MaxWaves: 335882 -> 341106 (+1.56%); split: +1.56%, -0.01%
Instrs: 6019621 -> 5956664 (-1.05%); split: -1.23%, +0.18%
CodeSize: 14192546 -> 12671882 (-10.71%); split: -10.74%, +0.03%
NOPs: 1107562 -> 1093640 (-1.26%); split: -2.18%, +0.92%
MOVs: 270465 -> 269928 (-0.20%); split: -1.43%, +1.23%
Full: 257820 -> 241170 (-6.46%); split: -6.47%, +0.01%
(ss): 156869 -> 153451 (-2.18%); split: -5.59%, +3.41%
(sy): 80161 -> 80009 (-0.19%); split: -1.46%, +1.27%
(ss)-stall: 573278 -> 571216 (-0.36%); split: -6.01%, +5.65%
(sy)-stall: 3537926 -> 3542823 (+0.14%); split: -1.78%, +1.92%
STPs: 30563 -> 27541 (-9.89%)
LDPs: 37112 -> 33855 (-8.78%)
Preamble Instrs: 2440099 -> 1617808 (-33.70%); split: -33.76%, +0.06%
Early Preamble: 9060 -> 14060 (+55.19%); split: +55.50%, -0.31%
Cat0: 1215965 -> 1202212 (-1.13%); split: -2.00%, +0.87%
Cat1: 475910 -> 475049 (-0.18%); split: -0.90%, +0.72%
Cat2: 1940479 -> 1926495 (-0.72%); split: -0.81%, +0.09%
Cat3: 1680902 -> 1652799 (-1.67%); split: -1.68%, +0.01%
Cat5: 151246 -> 151276 (+0.02%)
Cat6: 269190 -> 263701 (-2.04%)
Cat7: 174584 -> 173787 (-0.46%); split: -1.20%, +0.75%

Preamble improvements are even bigger on shaderdb:

total dwords in shared programs: 8800204 -> 8400960 (-4.54%)
dwords in affected programs: 1008384 -> 609140 (-39.59%)
helped: 3385
HURT: 14
helped stats (abs) min: 2 max: 1762 x̄: 118.02 x̃: 32
helped stats (rel) min: 0.21% max: 90.17% x̄: 32.93% x̃: 31.25%
HURT stats (abs)   min: 2 max: 32 x̄: 18.43 x̃: 26
HURT stats (rel)   min: 0.39% max: 16.67% x̄: 9.09% x̃: 13.13%
95% mean confidence interval for dwords value: -125.03 -109.88
95% mean confidence interval for dwords %-change: -33.46% -32.06%
Dwords are helped.

total preamble-inst in shared programs: 1274769 -> 1063479 (-16.57%)
preamble-inst in affected programs: 323660 -> 112370 (-65.28%)
helped: 3819
HURT: 5
helped stats (abs) min: 1 max: 1000 x̄: 55.33 x̃: 13
helped stats (rel) min: 0.61% max: 100.00% x̄: 53.55% x̃: 53.85%
HURT stats (abs)   min: 1 max: 9 x̄: 2.60 x̃: 1
HURT stats (rel)   min: 3.23% max: 6.34% x̄: 4.04% x̃: 3.70%
95% mean confidence interval for preamble-inst value: -58.84 -51.67
95% mean confidence interval for preamble-inst %-change: -54.22% -52.73%
Preamble-inst are helped.

total early-preamble in shared programs: 31297 -> 32057 (2.43%)
early-preamble in affected programs: 20 -> 780 (3800.00%)
helped: 780
HURT: 20
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.00% max: 0.00% x̄: 0.00% x̃: 0.00%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
95% mean confidence interval for early-preamble value: 0.93 0.97
95% mean confidence interval for early-preamble %-change: -3.58% -1.42%
Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree).

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34311>
2025-06-13 16:12:01 +00:00
Job Noorman
fca143946e 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>
2025-06-13 16:12:00 +00:00
Job Noorman
97dd831a07 ir3: don't vectorize 8bit SSBO accesses
We already scalarize them but they might get vectorized again when
running the optimize loop before the intrinsics get turned into the
ir3-specific ones.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34311>
2025-06-13 16:12:00 +00:00
Derek Foreman
07881b085e vulkan: Enable PresentWait2 on many physical devices
PresentWait2 should be possible on any physical device, as it adds a
surface capability query that depends on common wsi code.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35414>
2025-06-13 15:52:02 +00:00
Derek Foreman
074ab1db29 wsi/x11: add support for PresentWait2
It's the same as PresentWait here, and always available.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35414>
2025-06-13 15:52:02 +00:00
Derek Foreman
9a1a34836d wsi/display: Add support for PresentWait2
It's really just the same as PresentWait here, and always available.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35414>
2025-06-13 15:52:02 +00:00
Derek Foreman
3023f31cad wsi/wayland: Add support for PresentWait2
Support PresentWait2 on any compositor that provides presentation feedback
protocol.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35414>
2025-06-13 15:52:02 +00:00
Derek Foreman
bf285c3be9 vulkan/wsi: Add basic support for PresentWait2
Add common code for PresentWait2.

Unlike PresentWait, PresentWait2 is exposed by a surface capability.

On Wayland, PresentWait (and PresentWait2) require the presentation-time
extension to be available for a proper implementation, but not all
compositors support this. PresentWait would either have to be exposed
nowhere, or have weird/complicated fallback paths to try to enable it
on systems where presentation-time is unavailable.

Since PresentWait2 has a surface capability, we can simply not expose it
on Wayland when present-time is unavailable instead of always having to
have a less compliant fallback path.

PresentWait2 also explicitly forbids waiting on an ID that hasn't been
queued for presentation, so we don't need to handle that weird case.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35414>
2025-06-13 15:52:02 +00:00
Job Noorman
29eb9ec7b7 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>
2025-06-13 15:21:29 +00:00
Ville Syrjälä
3bd85064d4 iris: Don't use CCS_CC modifiers with INTEL_DEBUG=nofc
Don't use the CCS_CC modifiers when fast clears are disabled
through INTEL_DEBUG=nofc. anv already behaves this way.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35417>
2025-06-13 14:47:55 +00:00
Samuel Pitoiset
3c3684f4d4 radv: fix a compilation warning with Clang in radv_get_depth_clamp_mode()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35508>
2025-06-13 14:31:22 +00:00
Lionel Landwerlin
854298e033 docs/features: update anv support
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/35426>
2025-06-13 17:25:59 +03:00
Rhys Perry
a905ff3d54 meson: add dep_llvm to radv_tests
It seems this will try to link to LLVM because libvulkan_radeon links to
LLVM. Without the dep_llvm and with the GCC linker (instead of mold), this
will fail if you use a custom built LLVM and it can't find the shared object.

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/35495>
2025-06-13 11:29:31 +00:00
Erik Faye-Lund
1145cac490 docs/features: mark vk 1.3 as complete on panvk/v10+
This already landed upstream, I just forgot to update this file.

While we're at it, update the vk 1.2-entry to only list V10+, to match
reality.

Fixes: 8ec846407d ("panvk: expose vulkan 1.3 support")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35513>
2025-06-13 13:13:43 +02:00
Erik Faye-Lund
8ec846407d panvk: expose vulkan 1.3 support
vulkanMemoryModel was the last required feature we needed to expose
Vulkan 1.3, so let's enable it!

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>
2025-06-13 12:05:28 +02:00
Erik Faye-Lund
8426973ad6 panvk: enable KHR_vulkan_memory_model
We have all the pieces lined up now, so let's enable the memory model
extension.

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>
2025-06-13 12:05:25 +02:00
Erik Faye-Lund
b3e18a606f panvk: optimize barriers
It seems like a good idea to optimize barriers, so let's do the same
thing as most other drivers do.

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>
2025-06-13 12:05:04 +02:00
Erik Faye-Lund
6c17915fda pan/bi: handle barriers with NONE scope
NONE-barriers also needs scheduling barriers, because otherwise we can
end up with memory loads and stores being reordered during scheduling.

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>
2025-06-13 12:05:03 +02:00
Erik Faye-Lund
18893a250f 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>
2025-06-13 12:05:02 +02:00
Christian Gmeiner
31e4e38f7d crocus: Don't use deprecated NIR_PASS_V macro
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/35503>
2025-06-13 09:08:21 +00:00
Christian Gmeiner
c80d75afe5 crocus: Return progress for crocus_lower_storage_image_derefs(..)
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/35503>
2025-06-13 09:08:21 +00:00
Samuel Pitoiset
161f27e206 radv: enable shaderImageFloat32AtomicAdd on GFX12 with ACO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35493>
2025-06-13 08:47:59 +00:00
Samuel Pitoiset
d23de4918e aco: add support for image f32 atomic add
It's supported on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35493>
2025-06-13 08:47:59 +00:00
Samuel Pitoiset
c5bf1caf17 radv: enable shaderBufferFloat32AtomicMinMax on GFX12
This is supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35493>
2025-06-13 08:47:59 +00:00
Olivia Lee
d0b353018f panvk: Add tests for ls tracking in cs_maybe
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35460>
2025-06-13 08:28:30 +00:00
Ludvig Lindau
3778b22268 panvk: Fix ls_tracker usage in cs_maybe
Currently a cs_maybe block affects the ls_tracker of a command stream
even if the cs_maybe block is later replaced by NOP instructions. This
can lead to missing WAIT instructions in the command stream.

* Add a WAIT at the end of the cs_maybe block if the block has changed
 the ls_tracker state
* At the end of a cs_maybe block, restore the ls_tracker state to what
 it was before the block

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13259
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Tested-By: Alexandre ARNOUD <aarnoud@me.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/35460>
2025-06-13 08:28:30 +00:00
Samuel Pitoiset
8dd496955d radv: advertise VK_KHR_unified_image_layouts on GFX11+
On GFX12, everything is compressed with DCC and it's completely
transparent to the userspace driver.

On GFX11-GFX11.5, DCC can compress everything with GENERAL and FMASK
has been merged with DCC.

On GFX10-GFX10.3, MSAA through FMASK can't be compressed with GENERAL
and this will hurt performance.

On GFX6-9, DCC can't be supported with GENERAL because no DCC stores,
so this will destroy performance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35424>
2025-06-13 08:12:04 +00:00
Samuel Pitoiset
a3fa8eed4c radv: implement VK_KHR_unified_image_layouts
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35424>
2025-06-13 08:12:04 +00:00
Samuel Pitoiset
eeabce93b6 radv: use constants for different descriptor sizes
Instead of magic values everywhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35428>
2025-06-13 07:53:04 +00:00
Samuel Pitoiset
939b66a798 radv: remove unused 96-bit memcpy for image descriptors
This can only be 32, 64 or 80 for combined image/sampler.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35428>
2025-06-13 07:53:04 +00:00
Samuel Pitoiset
6b604ff60f radv: cleanup redundant switch cases in radv_GetDescriptorEXT()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35428>
2025-06-13 07:53:04 +00:00
Samuel Pitoiset
63f8b8ce6d radv/nir: adjust a comment about inlining immutable samplers
That (broken) optimization has been removed few weeks ago.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35428>
2025-06-13 07:53:04 +00:00
Samuel Pitoiset
d5da47f831 radv: advertise VK_KHR_maintenance9
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35423>
2025-06-13 07:33:03 +00:00
Samuel Pitoiset
99fb1a9bd7 radv/nir: lower unassigned vertex attributes to (0,0,0,0)
The spec allows both 0,0,0,0 and 0,0,0,1. Returning all zeroes makes it
consistent with vertex prologs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35423>
2025-06-13 07:33:03 +00:00
Samuel Pitoiset
4e46cabb75 radv: add support for VK_QUERY_POOL_CREATE_RESET_BIT_KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35423>
2025-06-13 07:33:03 +00:00
Karol Herbst
4ff66b4343 ac/llvm: fix bitfield ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35423>
2025-06-13 07:33:03 +00:00
Samuel Pitoiset
358addb78d radv: unset radv_lower_terminate_to_discard=true for Indiana Jones
This game bug has been fixed since.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35023>
2025-06-13 06:43:47 +00:00
Samuel Pitoiset
36c0c1e857 Revert "radv,driconf: Add radv_force_64k_sparse_alignment config"
This reverts commit e32a90b57c.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35023>
2025-06-13 06:43:47 +00:00
Samuel Pitoiset
aed7045bc9 radv: unset radv_force_64k_sparse_alignment for DOOM: The Dark Ages
Looks like this has been fixed by the game.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35023>
2025-06-13 06:43:47 +00:00
Samuel Pitoiset
817f7f1bb2 radv: remove radv_disable_dedicated_sparse_queue completely
This drirc workaround is probably not useful since RADV allows SPARSE
on all queues.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35023>
2025-06-13 06:43:47 +00:00
Samuel Pitoiset
4cc9bb4532 radv: unset radv_disable_dedicated_sparse_queue for Bethesda Games
This shouldn't be needed anymore since f58630f07c ("radv: Always
allow sparse on normal GFX/COMPUTE/DMA queues."). These games were
always assuming that GFX queue supported sparse which wasn't correct
with the dedicated sparse queue.

List of games that are concerned:
- DOOM Eternal
- Indiana Jones: The Great Circle
- DOOM: The Dark Ages

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35023>
2025-06-13 06:43:46 +00:00
Samuel Pitoiset
7f7ed18929 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>
2025-06-13 06:27:26 +00:00
Samuel Pitoiset
22e06d65d7 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>
2025-06-13 06:27:25 +00:00
Tapani Pälli
6e57f3738d 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>
2025-06-13 06:04:22 +00:00
Hyunjun Ko
0d3ffd8275 anv: enable the KHR_video_decode_vp9 extension
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/35485>
2025-06-13 04:51:51 +00:00
Hyunjun Ko
314de7af06 anv: Initial support for VP9 decoding
Helped from: Stéphane Cerveau <scerveau@igalia.com>
- Fix crash when segmentation is unavailable
- Set 8x8 to minCodedExtent
- Fix typo for GOLDEN and ALTREF scale factor

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/35485>
2025-06-13 04:51:51 +00:00
Hyunjun Ko
0689e3d873 anv: add default vp9 tables from FFMpeg and intel-vaapi-driver
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/35485>
2025-06-13 04:51:51 +00:00
Hyunjun Ko
213ca2ac9a intel/genxml: fix HCP_VP9 commands
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/35485>
2025-06-13 04:51:51 +00:00
Olivia Lee
0034fec71d panvk: implement VK_EXT_depth_clip_control
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/35224>
2025-06-13 02:19:21 +00:00
Olivia Lee
1d21ea9f9a panvk: refactor depth range logic
Preparation for VK_EXT_depth_clip_control.

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/35224>
2025-06-13 02:19:21 +00:00
Olivia Lee
f44a824541 panvk: advertise VK_KHR_depth_clamp_zero_one
This matches our existing behavior on both JM and CSF, where when
depthClamp is disabled, we clamp to [0,1].

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/35224>
2025-06-13 02:19:20 +00:00
Timothy Arceri
1f2568ae31 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>
2025-06-12 23:33:27 +00:00
Emma Anholt
59a5e042b2 ci/tu: Add a frequent a618 flake I've noticed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35262>
2025-06-12 22:01:35 +00:00
Emma Anholt
fde529a55e ir3: Enable nir_opt_acquire_release_barriers.
Fossil results for a730:

Totals from 6 (0.01% of 49975) affected shaders:
Instrs: 4068 -> 4028 (-0.98%)
CodeSize: 5794 -> 5674 (-2.07%)
NOPs: 1991 -> 1973 (-0.90%)
(ss): 256 -> 234 (-8.59%)
(sy): 158 -> 136 (-13.92%)
(sy)-stall: 2705 -> 1780 (-34.20%)
Cat0: 2221 -> 2203 (-0.81%)
Cat7: 207 -> 185 (-10.63%)

Affects Danylo's d3d fossils.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35262>
2025-06-12 22:01:35 +00:00
Emma Anholt
5bd6fd5c10 ir3: Enable nir_opt_combine_barriers.
From my fossils db:

Totals from 42 (0.08% of 49975) affected shaders:
Instrs: 108929 -> 108046 (-0.81%)
CodeSize: 182346 -> 179498 (-1.56%)
NOPs: 22106 -> 21916 (-0.86%)
(ss): 5458 -> 4765 (-12.70%)
(sy): 2987 -> 2294 (-23.20%)
Cat0: 24293 -> 24103 (-0.78%)
Cat7: 3939 -> 3246 (-17.59%)

Affected fossils include Danylo's d3d traces, gfxbench, and Sascha Willems's
computenbody.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35262>
2025-06-12 22:01:35 +00:00
Christian Gmeiner
0c1d5e4114 ir2: Remove NIR_PASS_V usage
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35478>
2025-06-12 21:46:53 +00:00
Christian Gmeiner
29f2566542 st/mesa: Remove NIR_PASS_V usage
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/35480>
2025-06-12 21:23:17 +00:00
Christian Gmeiner
8519cd2a0d zink: Don't use deprecated NIR_PASS_V macro anymore
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35463>
2025-06-12 22:35:54 +02:00
Christian Gmeiner
70eb306119 zink: fixup_io_locations: Preserve all metadata
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35463>
2025-06-12 22:35:52 +02:00
Christian Gmeiner
b30b87c096 nir/inline_uniforms: Convert to use nir_shader_intrinsics_pass(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35463>
2025-06-12 22:35:48 +02:00
Marek Olšák
fa2e7c3dfd nir: return progress from nir_group_loads, nir_inline_uniforms
so that NIR_PASS is usable

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:37 +00:00
Marek Olšák
0cbcb72869 nir/opt_vectorize_io: work around a 16-bit IO bug for RADV
If nir_opt_vectorize_io isn't called, 16-bit IO is broken.
This is a workaround to keep RADV working and consume incorrect NIR
while other drivers consume correct NIR.

Hopefully this will be removed ASAP.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:37 +00:00
Marek Olšák
6e9e9c9f0c nir: add shader_info::prev_stage_has_xfb
We will use it to skip lowering mediump IO to 16 bits if the previous
shader has XFB and mediump XFB doesn't work.

Drivers can decide not to lower mediump IO to 16 bits if nir->xfb_info
!= NULL for the pre-rast stage and if nir->info.prev_stage_has_xfb is
true for the FS stage. That way, drivers can lower mediump to 16 bits
for all cases except XFB.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:37 +00:00
Marek Olšák
ebbcec76b0 glsl/spirv: link XFB before prelink_lowering
Hopefully this doesn't break it (we may even lack tests), but we need to
know in prelink_lowering whether XFB is enabled or not.

The next commit that adds shader_info::prev_stage_uses_xfb depends on this.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:37 +00:00
Marek Olšák
b636e5ca66 nir: add nir_clear_mediump_io_flag
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:36 +00:00
Marek Olšák
13005d5e4e nir/xfb_info: don't merge incompatible XFB outputs to fix mediump
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:36 +00:00
Marek Olšák
118c0e6991 nir/opt_vectorize_io: fix vectorizing 16-bit XFB
Tested with mediump.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:36 +00:00
Marek Olšák
caddd67b8c nir/opt_vectorize_io: don't vectorize 16-bit IO to vec8 - it's illegal
NIR represents low bits of 16-bit IO as a separate vec4, and high bits as
another separate vec4. There is no representation that allows vec8.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:35 +00:00
Marek Olšák
1f80ff5550 nir/opt_vectorize_io: convert bool merge_low_high_16_to_32 to an enum
refactoring for the next commit

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:35 +00:00
Marek Olšák
6270136b7d nir/opt_varyings: set prev_stage/next_stage if they are NONE and validate them
Doing it here ensures that any linked shader will have the correct values
there.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:34 +00:00
Marek Olšák
e3d122ed7b nir/opt_varyings: completely exclude mediump from type changes
It broke mediump XFB, which needs the correct type for the up-conversion.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:34 +00:00
Marek Olšák
cf26760218 glsl: set prev/next_stage according to the new definition
Keep MESA_SHADER_NONE if there is no previous/next shader.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:34 +00:00
Marek Olšák
aba7b0831c nir: add shader_info::prev_stage
When lowering mediump to 16 bits, this will allow drivers to enable
the lowering only for certain pairs of stages, e.g. a driver can lower
mediump for VS->FS, but not GS->FS.

This could also be useful for other things.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:33 +00:00
Eric Engestrom
3649f28771 lavapipe/ci: add missing VKD3D_PROTON_TAG
Fixes: 2b7ddc7d71 ("ci/vkd3d: Use structured tagging for vkd3d-proton")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35498>
2025-06-12 19:13:56 +00:00
Eric Engestrom
a07cd0e255 turnip/ci: add missing VKD3D_PROTON_TAG
Fixes: 2b7ddc7d71 ("ci/vkd3d: Use structured tagging for vkd3d-proton")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35498>
2025-06-12 19:13:56 +00:00
Eric Engestrom
03c73bdc35 nvk/ci: add missing VKD3D_PROTON_TAG
Fixes: 2b7ddc7d71 ("ci/vkd3d: Use structured tagging for vkd3d-proton")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35498>
2025-06-12 19:13:56 +00:00
LingMan
1853886023 rusticl: Initialize NIR option structs with default values
Eases NIR maintenance since adding new members no longer requires touching rusticl.

The one const `nir_remove_dead_variables_options` has been duplicated as two local variables because
`default()` cannot be called from const contexts, yet.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35497>
2025-06-12 18:52:25 +00:00
Jonathan Gray
68be3b7159 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>
2025-06-12 16:49:23 +00:00
Jason Macnak
3bf5347436 gfxstream: Fix strict aliasing violations in VkDecoder
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35494>
2025-06-12 08:48:23 -07:00
Bo Hu
f3e9f0e9a6 gfxstream: update codegen for vkQueueFlushCommandsGOOGLE
This method requires removal of obsolete recording

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35494>
2025-06-12 08:48:23 -07:00
Daniel Stone
7bfb51a7e6 ci: Fix missing pipelines on user pipelines in MRs
Oops. We were being a bit too extensive with our rules and also skipping
the container stage for user (non-marge) pipelines in MRs unless
image-tags.yml had changed. We can't actually do this, because we might
still need to run the jobs to copy the containers into the user's
namespace, even if we don't need to rebuild them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35491>
2025-06-12 13:15:54 +00:00
Karol Herbst
ee1fe1a1e5 rusticl: implement cl_khr_spirv_queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35439>
2025-06-12 12:41:48 +00:00
Karol Herbst
3b2af3006e rusticl/device: refactor Device::new
Adding a DeviceBase type will allow us to do pass in a proper spirv_caps
object into SPIRVBin::get_lib_clc. Should also make device creation more
flexible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35439>
2025-06-12 12:41:48 +00:00
Karol Herbst
95eb537548 include: update CL headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35439>
2025-06-12 12:41:48 +00:00
Lionel Landwerlin
d0608425f4 anv: handle REMAINING_LAYERS with 3D images & maintenance9
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9a1485ec5c ("anv: missing bit from maintenance9")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35487>
2025-06-12 11:34:33 +00:00
Tapani Pälli
58c4b31d31 anv: small cleanup, remove unused helper function
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/35450>
2025-06-12 11:15:21 +00:00
Erik Faye-Lund
b58dd5508e panfrost/ci: add new half-float fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35451>
2025-06-12 08:56:21 +00:00
Erik Faye-Lund
53c3943f4c panfrost/ci: fix sorting of fails
These were mostly sorted, but not quite. Let's fix that up, so it's
easier to add new fails in the right place.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35451>
2025-06-12 08:56:21 +00:00
Lars-Ivar Hesselberg Simonsen
5d0465a253 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>
2025-06-12 08:12:23 +00:00
Peyton Lee
75736aa494 amd/gmlib: remove the executable bit
remove the executable bit for all files.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
fd1930b035 amd: add vpe_version
vpe_version describes which generation of vpe capabilities a chip has.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
548b026297 radeonsi/vpe: correct capability
should return the capability that hardware can support

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
ce3c1b018a radeonsi/vpe: remove background color
remove un-used background color value

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
47163fa8d3 radeonsi/vpe: enhance scaling quality
add support for lanczos coefficients
which enhaces the quality of scaling down

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:26 +00:00
Pierre-Eric Pelloux-Prayer
75f596d909 radeonsi: fix attribute_pos_prim_ring handling
Apply the same logic as the other rings.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35452>
2025-06-12 07:23:33 +00:00
Lionel Landwerlin
9a1485ec5c anv: missing bit from maintenance9
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 595889018a ("anv: implement VK_KHR_maintenance9")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35467>
2025-06-12 09:14:20 +03:00
Jianxun Zhang
a9aad4565f anv: Enable compression on CCS modifiers (xe2)
Don't report compressed memory type in the case of Xe2 modifiers
as the Vulkan spec requires identical memory types behind the
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.

Instead, we require dedicated allocation to get the right
compressed memory in allocation stage. The BMG modifier also
requires scanout flag to set. Refer to comments.

Thanks for the help from:
Nanley Chery <nanley.g.chery@intel.com>
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Kenneth Graunke <kenneth@whitecape.org>
and other people not listed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:12 +00:00
Jianxun Zhang
a45143e04c anv: Don't choose compression modifier when aux is disabled
When aux has to be disabled (ISL_SURF_USAGE_DISABLE_AUX_BIT)
for some reasons like VK_SHARING_MODE_CONCURRENT, we simply
cannot implicitly choose any modifier with compression.

Otherwise, we run into a situation that an image is created
with a modifier but without the aux support that modifier
requires. It will fail a CTS test once Xe2 modifiers are
enabled:

dEQP-VK.wsi.wayland.swapchain.private_data.image_sharing_mode

MESA: warning: ../src/intel/vulkan/anv_image.c:1198: image with
modifier unexpectedly has wrong aux usage (VK_ERROR_UNKNOWN)

GFX12.x (MTL) does not show this failure because only one queue
family is present. But they will face the same issue when aux is
disabled for any other reasons:

NotSupported (Only 1 queue families available for
VK_SHARING_MODE_CONCURRENT at vktWsiSwapchainTests.cpp:715)

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:12 +00:00
Jianxun Zhang
7c2f340d37 anv: Align size of compressed scanout buffers to 64KB on BMG (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
b7f7f1c74f anv: Treat imported compressed buffers as displayable (xe2)
As a part of the effort to unify the displayable attribute
on dmabuf sharing across drivers, we set scanout flag on
imported bos on Xe2+.

Refer to the comment in the change.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
0af794fe50 iris: Enable Xe2 modifier (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
b96d677c42 iris: Refactor function iris_flush_resource
Setting the removed flag true is not needed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
f88e153635 iris: Update conditions when flushing resource (xe2)
Update the conditions of reallocation for Xe2 modifiers and also
ensure the realloation to happen on all bos.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
1149f1c5a1 iris: Choose PAT entry on imported buffers (xe2)
Refer to the comment added into the change, buffers imported
with a Xe2 modifier supporting compression should get a
compression-enabled PAT entry.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Jianxun Zhang
665f5e8757 iris: Add new modifiers into code (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Jianxun Zhang
785d1c3b86 iris: Align size of compressed scanout buffers to 64KB on BMG (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Jianxun Zhang
2660b7c49d isl: Add Xe2 CCS modifiers (xe2)
Narrow down the definition of two compression flags suggested by
Nanley Chery <nanley.g.chery@intel.com> so that we can address
the unified compression support of Xe2 modifiers and don't have
to set media compression flag thats result more update in the
stack.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Christian Gmeiner
f261370995 asahi/lib: Don't use deprecated NIR_PASS_V macro
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35479>
2025-06-11 21:43:01 +00:00
Collabora's Gfx CI Team
350eccd032 Uprev Piglit to a0a27e528f643dfeb785350a1213bfff09681950
685ea49b47...a0a27e528f

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:59 +00:00
Valentine Burley
c793d20c9c ci/piglit: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:59 +00:00
Valentine Burley
33f5e6472d ci/vkd3d: Fix build when not uploading vkd3d-proton archive
Only delete vkd3d-proton.tar.zst if it exists.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:58 +00:00
Sergi Blanch-Torne
da1c8994bb Uprev ANGLE to c39f4a5c553cbee39af8f866aa82a9ffa4f02f5b
b135927706...c39f4a5c55

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:58 +00:00
Mike Blumenkrantz
2b39cd0722 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>
2025-06-11 20:46:29 +00:00
Georg Lehmann
ad80b554f4 spirv: use feq for OpIsInf
This effectively reverts fcca6a83cd because feq was clarified to be ordered
when used with exact and without fast math flags.

It's common for HW to only have free abs for floating point instructions.

Foz-DB Navi21:
Totals from 63 (0.08% of 80065) affected shaders:
Instrs: 337027 -> 336667 (-0.11%); split: -0.12%, +0.02%
CodeSize: 1846752 -> 1845000 (-0.09%); split: -0.13%, +0.03%
Latency: 3401087 -> 3400633 (-0.01%); split: -0.04%, +0.03%
InvThroughput: 847299 -> 845939 (-0.16%); split: -0.19%, +0.03%
VClause: 7693 -> 7694 (+0.01%)
Copies: 45175 -> 45240 (+0.14%); split: -0.12%, +0.27%
PreSGPRs: 3555 -> 3553 (-0.06%)
PreVGPRs: 4565 -> 4564 (-0.02%)
VALU: 225473 -> 225245 (-0.10%); split: -0.13%, +0.03%
SALU: 44735 -> 44625 (-0.25%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35437>
2025-06-11 18:34:21 +00:00
Faith Ekstrand
9c83e9f120 nvk: Drop nvk_buffer_address()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35472>
2025-06-11 18:09:38 +00:00
Rob Clark
cd4f6caa0d vtn: Handle non-32b tex dests
With cl_khr_fp16 we can get texture instructions w/ f16 dest.  Not all
drivers handle this, so convert to 32b dest and insert alu conversion to
the requested type.  Drivers that can handle f16 texture loads would
fold away the extra conversion with nir_opt_16bit_tex_image.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35470>
2025-06-11 17:48:10 +00:00
Mel Henning
d764e1c062 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>
2025-06-11 17:32:27 +00:00
Derek Foreman
95148a5dfd egl/dri/wayland: Fix memory leak in wayland buffer handling
In 54c4a41e2d some of the wl_buffers are
destroyed without using the loader_wayland_buffer_destroy functions on
their wrappers, leaking the wrapper.

Fixes 54c4a41e2d

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35466>
2025-06-11 17:09:47 +00:00
Erik Faye-Lund
1895d6a107 meson: use literal false instead of string
This fixes the following warning from Meson:

meson.options:179: WARNING: Project targets '>= 1.3.0' but uses
feature deprecated since '1.1.0': "boolean option" keyword argument
"value" of type str. use a boolean, not a string

Fixes: d348fd5fb5 ("mediafoundation: Add mediafoundation frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35468>
2025-06-11 16:02:26 +00:00
Aaron Ruby
36dd155e7a gfxstream: Prune the wait/signal semaphore lists on queue submissions
For Linux guests, remove syncFd semaphores entirely, as they are waited
on/signaled using the guest-side syncFd operations, and coarse
queueWaits only.

Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34751>
2025-06-11 11:46:10 -04:00
Christoph Pillmayer
f9ed719c6a panvk: Add tests for ls tracker behavior in cs_loop
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35436>
2025-06-11 15:19:50 +00:00
Christoph Pillmayer
cdedd04640 panvk: Fix ls_tracker usage in cs_loop
LOAD_MULTIPLE can be emitted inside of a loop body. We need to WAIT if
that loads targets a register for which a load was not already in-flight
at the start of the loop body.

Technically we only have to emit the wait if the dst reg of a new load
is actually used inside the loop, but that would require separate
tracking of source regs used in the loop and is probably not worth
the effort for now.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35436>
2025-06-11 15:19:50 +00:00
Christoph Pillmayer
a24abc3fbd panvk: Move cs_wait_slot(s) and cs_flush_loads/stores
The following commit needs to flush loads from cs_loop_ functions.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35436>
2025-06-11 15:19:50 +00:00
Hoe Hao Cheng
a36e51af22 zink: remove fixup_driver_props
No longer needed after the codegen improvements

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:52 +00:00
Hoe Hao Cheng
4d1768aec5 zink/codegen: support double-loading dynamic properties arrays
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:52 +00:00
Hoe Hao Cheng
4eb50771e4 zink/codegen: add indentation to the mako templates
This regains us some much needed sanity

And it actually uncovered a bug in zink_instance.py:L306 (misplaced
%endif)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:52 +00:00
Hoe Hao Cheng
a5e114ce97 zink: apply EXT-suffixed functions to their unsuffixed counterpart
...if they are promoted to core verbatim.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:51 +00:00
Hoe Hao Cheng
66f0a99c73 zink: apply core functions to extension functions
...if those core functions were promoted verbatim from the extension.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:51 +00:00
Hoe Hao Cheng
ef1ae1f24f zink: make zink_device_info look for KHR versions of promoted exts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:51 +00:00
Hoe Hao Cheng
bbfeb6cd87 zink: fix win32 detection in zink_device_info
str.find(substr) returns -1 if the substring's not in the string, and
bool(-1) returns True in Python, so the _WIN32 ifdef guard was actually
inserted everywhere.

Also, the win32 functions actually have "Win32" in their name, like
vkGetMemoryWin32HandleKHR

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35389>
2025-06-11 14:49:50 +00:00
Marek Olšák
4dafd2e787 radeonsi: add a workaround for a DrawTransformFeedback issue on gfx11.5
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35344>
2025-06-11 14:29:06 +00:00
Marek Olšák
d991810833 radeonsi/ci: update gfx8 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35344>
2025-06-11 14:29:06 +00:00
Marek Olšák
56ed949e08 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>
2025-06-11 14:29:06 +00:00
Lionel Landwerlin
595889018a anv: implement VK_KHR_maintenance9
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/35381>
2025-06-11 14:09:56 +00:00
Lionel Landwerlin
884df891d7 anv: allow device creation with no queue
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35381>
2025-06-11 14:09:56 +00:00
Lionel Landwerlin
1d8382b88e brw: enable more lowering for bitfield manipulation at non 32bit sizes
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/35381>
2025-06-11 14:09:56 +00:00
Juan A. Suarez Romero
d983280da9 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>
2025-06-11 13:29:35 +00:00
Martin Krastev
bacc0451bc svga/ci: vmware farm is back; restore piglit job to automatic
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35459>
2025-06-11 13:11:44 +00:00
Pierre-Eric Pelloux-Prayer
7280e3b2a1 radeonsi/tests: update expected results
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:28 +00:00
Pierre-Eric Pelloux-Prayer
3bcbd11a33 aco/isel: fix visit_tex handling of is_sparse
For cases when less than 4 components are read, the original code
would compute an incorrect dmask. eg: with a single component + is_sparse,
the dmask was 0x13:
  - 0x 3 = coming from nir_def_components_read
  - 0x10 = the sparse bit
While it should have at 2 bits set (1 for the color/depth, 1 for tfe).

This caused problem when expand_vector() used the dmask to generate
the final results, because the value for the sparse component was
read from the wrong index.

So after the call to emit_mimg() dmask needs to be adjusted
because the components will be stored in order, so if mask is 0x11
the tfe value would be stored at invalid index=5 (while it should
be at index=1).

This fixes KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency_texture_2d_depth_component16
and KHR-GL46.sparse_texture2_tests.SparseTexture2Lookup_texture_2d_depth_component16
with ACO.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:28 +00:00
Pierre-Eric Pelloux-Prayer
4a84ebfcb1 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>
2025-06-11 12:11:28 +00:00
Pierre-Eric Pelloux-Prayer
1cc52dff05 radeonsi: allow sparse depth textures
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:28 +00:00
Pierre-Eric Pelloux-Prayer
508bf2a490 radeonsi/tests: fix script handling of missing results
When running radeonsi-run-tests.py with the -t option, it's possible that
some suite won't generate any result so don't fail in this case.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:28 +00:00
Pierre-Eric Pelloux-Prayer
b153188f25 amd/ci: remove references to tests that don't exist anymore
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:27 +00:00
Pierre-Eric Pelloux-Prayer
3d8fe9b36d radeonsi: skip draws using invalid setup
Draws running with the secure bit set needs to have their destination
surfaces created with tmz to get the correct result.
Instead of asserting this fact, let just skip the invalid draws
completely.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:27 +00:00
Pierre-Eric Pelloux-Prayer
0e9ba3031e radeonsi: allow msaa sparse textures on gfx10+
The hardware doesn't support the prt layouts, but we can use normal
layouts and ac_surface_addr_from_coord to determince which pages
need to be committed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:27 +00:00
Pierre-Eric Pelloux-Prayer
ee6d3a593e winsys/radeon: add surface_offset_from_coord
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35206>
2025-06-11 12:11:27 +00:00
Juan A. Suarez Romero
d6614099a0 vc4,v3d: update expected results
Add new failures/flakes.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35462>
2025-06-11 11:55:54 +00:00
Corentin Noël
1dfe97cc0b llvmpipe: Make sure to not divide by zero on debug output
Check that lp->nr_fs_variants is not zero before dividing by it as done in a few
lines above.

CID: 1417662 Division or modulo by zero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:34 +00:00
Corentin Noël
d4d37ead82 llvmpipe: Make sure to not divide by zero on debug output
Check that lp->nr_cs_variants is not zero before dividing by it as done in a few
lines above.

CID: 1531786 Division or modulo by zero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:34 +00:00
Corentin Noël
383684596c llvmpipe: Check for negative size before mapping the memory
CID: 1596479 Argument cannot be negative
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:34 +00:00
Corentin Noël
94f2d53586 llvmpipe: Close mem_fd or dmabuf_fd on error
The variable shadowing made the error path to leak these file descriptors.

CID: 1596485, 1596493 Logically dead code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:34 +00:00
Corentin Noël
fb72e84c7a llvmpipe: Do bitwise operation on unsigned constants
This fixes coverity issues while all compilers would do the right thing here.

CID: 1605222 Overflowed constant
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:34 +00:00
Corentin Noël
c9243262f0 llvmpipe: Check allocated memory instead of argument
This is likely a copy-paste error.

CID: 1616035 Dereference after null check
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:33 +00:00
Corentin Noël
09938eee85 llvmpipe: Asserts that the format at least has one non-void channel
As we are using its index as array index, avoid the use of the -1 index there.

CID: 1517247, 1517239 Negative array index read
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:33 +00:00
Corentin Noël
d2aade9184 llvmpipe: Avoid function name leak on fail paths
Free the memory on the fail path, also check early on allocation failure.

CID: 1644471 Resource leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
2025-06-11 11:03:33 +00:00
Emma Anholt
6e97df1d76 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>
2025-06-11 10:02:30 +00:00
Rhys Perry
bc2edf14d8 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>
2025-06-11 09:01:39 +00:00
Samuel Pitoiset
3b326abf7b radv: add capture/replay for sparse buffers and descriptor buffer
Shouldn't be super useful in practice because the normal capture/replay
BDA path should also work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35366>
2025-06-11 07:31:29 +00:00
Samuel Pitoiset
643e1c4395 radv: cleanup creating sparse buffers with capture/replay
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35366>
2025-06-11 07:31:29 +00:00
Samuel Pitoiset
74acae0ed8 radv: stop setting the address for capture/replay and non-sparse buffers
This doesn't do anything because for non-sparse buffers, a device
memory object must be bound to the buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35366>
2025-06-11 07:31:28 +00:00
Samuel Pitoiset
ee200cc0d1 radv: stop using vk_common entrypoints when not necessary
For less indirections.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35359>
2025-06-11 07:10:02 +00:00
Samuel Pitoiset
7d2f20b2fb radv: remove useless vk_common_entrypoints.h includes
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35359>
2025-06-11 07:10:02 +00:00
Samuel Pitoiset
f3578973d7 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>
2025-06-11 07:10:01 +00:00
Mike Blumenkrantz
2a58d7b333 zink: verify that mutable dmabufs are created with a format list
this is otherwise illegal

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35433>
2025-06-10 23:12:22 +00:00
Mike Blumenkrantz
0d3dc92863 zink: emulated alpha formats do not require mutable
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35433>
2025-06-10 23:12:22 +00:00
Vladly
760c96628d ir3/legalize: don't allow end instruction as jump target on a5xx
From experiments it appears that (jp) flag on "end" instruction has no
effect (at least on a5xx). This means that we should insert "(jp)nop"
before it, which is what blob is doing too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35331>
2025-06-10 22:51:21 +00:00
Guilherme Gallo
e1d54be524 ci/lava: Avoid eval when generating env script
Remove use of `eval` when writing `dut-job-env-vars.sh`, as it's
unnecessary. The script only needs to declare variables, not evaluate
them.

Using `eval` introduces parsing issues when variables contain both
single and double quotes, such as in commit titles. Example:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/77995175#L3188
This job failed to parse `CI_COMMIT_TITLE` and `CI_MERGE_REQUEST_TITLE`
correctly due to mixed quoting in:

    Revert "ci: disable Collabora's farm due to maintenance"

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35421>
2025-06-10 18:19:21 -03:00
Guilherme Gallo
655cf2f553 ci: Simplify filter_env_vars using indirect expansion
Avoid parsing variable values manually by using `${!varname@A}`, which
returns the exact declaration as stored in the bash session.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35421>
2025-06-10 18:19:21 -03:00
Connor Abbott
d77166edec tu: Use a temporary descriptor to patch input attachments
The final descriptor is in write-combined memory, so avoid reading from
it. Instead modify a temporary descriptor on the stack.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35420>
2025-06-10 20:25:54 +00:00
Connor Abbott
83212054e0 tu: Use cached coherent memory when possible for query pools
It's expected to read back the result on the CPU, so make this cached
when cached coherent memory is available.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35443>
2025-06-10 20:12:11 +00:00
Connor Abbott
77b96ac0a7 tu: Add tu_bo_init_new_cached() helper
Unfortunately this has to live in tu_device.h because it depends on
accessing the physical_device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35443>
2025-06-10 20:12:11 +00:00
Connor Abbott
d8a19711ed tu: Remove outdated comment
This only really matters with virtgpu, and we long stopped using this
function for user-visible BOs, so it's only really applicable to a few
rare uses in the driver. Those would be better served by a new function
than modifying this one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35443>
2025-06-10 20:12:11 +00:00
Erik Faye-Lund
423f3fd485 panfrost: enable 8x and 16x msaa modes when supported
8x and 16x MSAA should work now, so we no longer need to deal with those
separately. We have more accurate checks for when it's supported or not
in place already.

2x MSAA isn't supported at all until v12, which we haven't finished
wiring up yet. So let's leave that one for now... We'll need some more
fixes for that anyway.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
139f2c6629 mesa/main: contain mutlisample advanced limitations
The AMD_framebuffer_multisample_advanced extension interacts kinda badly
with ARB_internalformat_query and GLES 3. The problem is that
ARB_internalformat_query etc untangles MAX_SAMPLES and
per-internalformat sample limits, but the multisample advanced spec
explicitly requires that we can't go above the global maximum.

This isn't the biggest problem in the world; one could just deal with
these limitations for the multisample_advanced functions... if it wasn't
for the fact that we by mistake apply the multisample_advanced
limitations for functions where they shouldn't be taken into account.
Whoops. So let's make sure we don't do that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
273689bc49 mesa/main: more careful ext checking
This makes sure the extension is only effective in the APIs that it
supports.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
01378d96c7 mesa/main: add missing error-check for samples
We're doing this in frame_buffer_texture, but were missing it in
framebuffer_texture_with_dims(). Let's add the missing check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
17f91c0354 mesa/main: use _mesa_check_sample_count instead of open-coding error
The _mesa_check_sample_count() helper deals with these errors much more
carefully, considering multiple extensions that extends the features.

In particular, GLES 3 and and ARB_internalformat_query allows us to use
higher sample-counts than what MAX_SAMPLES reports for some formats.

Because this actually needs to be done in a few more places, let's
implmenent this as a helper, similar to check_level. We also need to
call the helper a bit later on, after the level has been verified.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
89df1c50df mesa/main: correct internalformat query condition
This is fairly subtle, but internalformat query doesn't modify GLES 1
or GLES 2 on drivers that doesn't support full GLES 3.

Also fix up a tiny detail in the comment while we're at it.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
f56443ac84 st/mesa: search for smallest supported sample-count
For MaxColorTextureSamples etc, we need to report the smallest
sample-count that is guaranteed to work. On some GPUs (e.g. Arm's Mali
GPUs), larger pixel-formats can't always support the higher sample
counts, becuse it takes up too much storage in the tile buffers.

From the OpenGL 4.6 spec, section 22.3.2 ("Other internal format
queries"):

  "The maximum value in SAMPLES is guaranteed to be at least the
   lowest of the following:

   * The value of MAX_INTEGER_SAMPLES, if internalformat is a
     signed or unsigned integer format.

   * The value of MAX_DEPTH_TEXTURE_SAMPLES, if internalformat
     is a depth/stencil-renderable format and target is TEXTURE_2D_-
     MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY.

   * The value of MAX_COLOR_TEXTURE_SAMPLES, if internalfor-
     mat is a color-renderable format and target is TEXTURE_2D_-
     MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY.

   * The value of MAX_SAMPLES"

Since SAMPLES needs to be *at least* MAX_COLOR_TEXTURE_SAMPLES here, we
need to set it to the smallest possible value for any format.

So let's swap the loops here, trying one format at the time. To avoid
doing needless tests, we check from the largest value supported in all
previous formats, omitting sample-counts that has previously been ruled
out.

In addition, we need to check a few larger formats as well, to capture
the limitations above. Since large formats exists in fewer swizzle
variants, we don't need to check as many options as for 8-bit per
component formats.

And since the larger formats are the most likely ones to support lower
sample counts, make sure those formats are listed first.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
96d62b47fd mesa/main: search all the way to MAX_SAMPLES
The constants we were comparing with here aren't the max values in all
cases. These are the max *guaranteed* to be supported values, but
specific formats can support higher sample counts. If we don't serach
for higher values, we might end up not picking a format, leading to
FBOs that are incorrectly marked as incomplete.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
8ffce0e49b mesa/main: introduce MAX_SAMPLES define
We're hard-coding the max to 16 in several places, but this value needs
to be consistent. Let's introduce a define here, that we can use instead
of hard-coding 16 more places.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34455>
2025-06-10 19:22:48 +00:00
Erik Faye-Lund
02457ee29e 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>
2025-06-10 18:59:41 +00:00
Faith Ekstrand
48f0d738de nvk: Don't set queue lost from nvk_queue_push()
This is used both in the vkQueueSubmit path and in the vkCreateDevice
path and we don't want vkCreateDevice to return VK_ERROR_DEVICE_LOST.
In the vkQueueSubmit path we already have a catch-all that will cause
device loss on any error so we don't need to do it in nvk_queue_push().

This fixes dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Fixes: e814fc16ff ("nvk: Use an nvk_mem_stream for nvk_queue_push()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35442>
2025-06-10 18:45:32 +00:00
Erik Faye-Lund
90b92aaf26 docs/features: add GL_EXT_shader_realtime_clock
This should've been done when we wired up the core-bits, but better late
than never.

Fixes: c5500cd12f ("mesa: Add support for GL_EXT_shader_realtime_clock")
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35349>
2025-06-10 18:40:58 +00:00
Patrick Lerda
6268819f52 r600: bump evergreen and cayman glsl level to 460
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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
9e1180b335 r600: implement ARB_indirect_parameters
This change extends the ARB_shader_draw_parameters
algorithm to support ARB_indirect_parameters.

The linux kernel needs to be updated to support
the following PM4 commands: COND_EXEC and COND_WRITE.
Without the update, this extension is disabled.

This change was tested on cypress, palm, barts and cayman.
It passes all the piglit tests (6/6) and all the khr-gl45
tests (3/3).

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
f66f5d1cd5 r600: implement ARB_shader_draw_parameters
This implementation is aimed at compatibility. The
new multi draw indirect mode is unrolled at the
command stream level.

This change was tested on cypress, palm, barts and cayman.
It passes all the piglit tests (23/23) and all the khr-gl45
tests (11/11).

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
285d57d64b r600: improve command stream constraints
This change helps to calculate the correct
command stream length.

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
7947fba185 r600: enable trivial ARB_shader_group_vote
This change was tested on rv770, palm and cayman.

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
8a1ef5bd31 r600: enable ARB_transform_feedback_overflow_query
This functionality was mostly implemented but not enabled.
The functionality which is using SET_PREDICATION seems to
not work as expected.

This change was tested on palm, barts and cayman,
piglit tests (26/28), and khr-gl45 tests (7/13).

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
175a67c9bf r600: bump evergreen atomic counters to twelve
The previous limit was eight.

The number of atomic counters of the evergreen implementation
is limited by the number of R_02872C_GDS_APPEND_COUNT_x registers.
This limits this implementation to twelve atomic counters.

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
3fc4fc6a60 r600: unlock cayman number of atomic counters
This change updates the cayman atomic counters implementation
to be compatible with the OpenGL limit MAX_ATOMIC_COUNTERS (4096).
The previous limit was eight.

This change preserves the compatibility with the evergreen
implementation.

Here is the improvement at the test level:
khr-gl4[2-5]/shader_atomic_counters/basic-usage-tes: fail pass
spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read: skip pass
spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read: skip pass
spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter: skip pass
spec/arb_shader_atomic_counters/active-counters: skip 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/34726>
2025-06-10 17:30:24 +00:00
Patrick Lerda
0d9bc4eb38 r600: restructure the atomic function for the next update
This change adds some abstractions and updates the atomic function with a
"count" which is what the hardware and sfn_shader are using. The software
limitation to eight atomic counters (uint8_t) is removed as well. The
function headers are updated in the process.

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
e056762f12 r600: fix index buffer with offset
This is an issue when glMultiDrawElements() is
enabled.

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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
922a0bdcd6 r600: add an unlikely() to synchronize with the index_bias fix
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>
2025-06-10 17:30:24 +00:00
Patrick Lerda
a640b7233c 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>
2025-06-10 17:30:24 +00:00
Mary Guillemard
9963cf2d89 panvk: Remove iter_sb on v11+
iter_sb is now unused on v11+, let's not store it on this codepath and
only define it for v10.

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/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
1879b33877 panvk: Only restrict iter scoreboards on v10
Now that all paths support indirect wait for iter scoreboards, we can
remove the previous limit.

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/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
cf8c71c0a0 panvk: Implement v11+ path for issue_fragment_jobs
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/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
6207426706 panvk: Implement v11+ path for flush_tiling
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/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
19fe0bb780 panvk: Implement v11+ path for compute dispatch
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/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
236dcccedb panvk: Use NEXT_SB_ENTRY on v11+ and prepare for indirect wait
Now that cs_next_iter_sb match NEXT_SB_ENTRY behavior, we can just
implement it with it.

We also setup the scoreboard wait mask when selecting the next
scoreboard entry to prepare for defer indirect wait and signal usage
around the codebase.

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/35307>
2025-06-10 16:26:43 +00:00
Mary Guillemard
9d1d6c75fe panvk: Select next iter scoreboard early
This closely match what NEXT_SB_ENTRY gives us on v11+ and should also
reduce the number of instruction by low margin.

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/35307>
2025-06-10 16:26:42 +00:00
Mary Guillemard
e23612d0a9 panvk: Rework iter_sb to be the scoreboard directly
This patch changes iter_sb to contains the actual scoreboard info
instead of the index in the iter range.

This is required to handle NEXT_SB_ENTRY 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/35307>
2025-06-10 16:26:42 +00:00
Gurchetan Singh
0d3e8fa536 gfxstream: add virgl_hw.h in VirtGpu.h header
Otherwise, errors such as:

GrallocEmulated.cpp:101:29: error: use of undeclared identifier 'VIRGL_FORMAT_R8G8B8A8_UNORM'
  101 |              .virglFormat = VIRGL_FORMAT_R8G8B8A8_UNORM,
      |                             ^
GrallocEmulated.cpp:117:29: error: use of undeclared identifier 'VIRGL_FORMAT_B8G8R8A8_UNORM'
  117 |              .virglFormat = VIRGL_FORMAT_B8G8R8A8_UNORM,

happen in Android builds.  Add it to VirtGpu.h to fix this.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
2025-06-10 16:11:47 +00:00
Serdar Kocdemir
778230341b gfxstream: Change clear colors only for images with ANB
Swapchain mutable format extension issues were resolved by converting
clear colors on the guest side but that introduced regressions on other
clear related CTS test. Limit clear color modification to images with
Android native buffer structure, to filter swapchain images better.

Test: dEQP-VK.image.*

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
2025-06-10 16:11:47 +00:00
Jason Macnak
7fb8d85c26 gfxstream: use VkSnapshotApiCallHandle outside of VkReconstruction
... as VkSnapshotApiCallInfo* is a pointer into a
std::vector<VkSnapshotApiCallInfo> which can be invalidated during
multi threaded VK usage when the std::vector<> is resized.

Test: bazel test common/end2end:gfxstream_end2end_tests \
      --graphics_drivers=gles_angle_vulkan_swiftshader \
      --test_arg="--gtest_filter=*MultiThreadedResetCommandBuffer*VulkanSnapshots*" \
      --test_arg="--gtest_repeat=100" \
      --test_output=streamed

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35416>
2025-06-10 16:11:47 +00:00
Adam Jackson
0f05988640 rusticl: Implement cl_intel_required_subgroup_size
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35133>
2025-06-10 15:53:39 +00:00
Erik Faye-Lund
23a32b948b upanfrost: make 128-bit opt-in with driconf on v4
On v4, we can't lower the tile-size to get enough per-pixel space for
both 4xMSAA *and* 128-bit formats at the same time.

And because GLES 2 doesn't support per-format queries, this means that
we'd effectively not support MSAA at all. We can avoid this issue by
dropping support for the 128-bit formats on V4, unless explicitly
requested by a driconf.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35207>
2025-06-10 15:32:42 +00:00
Erik Faye-Lund
1617778c38 lima: make fp16 render-targets opt-in with driconf
Lima can't do *both* FP16 *and* 4x MSAA at the same time. And because
GLES2 requires MAX_SAMPLES to be valid for *all* supported formats,
this means we can't support MSAA at all unless we disable support for
the FP16 formats when used as render-targets.

To allow applications that needs FP16 render-targets to still support
it, we introduce a driconf that makes the opposite trade; support FP16,
but not 4x MSAA. Unfortunately, we can't support both, and still be
following the spec.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35207>
2025-06-10 15:32:42 +00:00
Erik Faye-Lund
939d3a96fb lima: add driconf infrastructure
This is the boiler-plate code needed to support driver-specific driconf
variables in Lima.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35207>
2025-06-10 15:32:42 +00:00
Erik Faye-Lund
43ca34464f lima: drop R16G16B16_FLOAT support
We're currently reporting support for this format, but trying to use it
leads to asserts in pan_access_tiled_image(). Right now, it's
effectively unused, because the state-tracker will end up using the RGBA
version, because that is renderable.

This is all about to change, so let's drop this format for now. But
because this is technically speaking supported on the HW, let's leave
this ifdeffed out with a comment to re-enable once the assert has been
fixed.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35207>
2025-06-10 15:32:42 +00:00
Daniel Stone
c8576cc0dc ci: Use placeholder-job for sanity
This runs in 11 seconds and doesn't even clone the git repo, so we can
use the placeholder tag here to get it through instantly.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:14 +00:00
Daniel Stone
4b2a4dce78 ci: Skip check-only container jobs for pre-merge
For pre-merge pipelines, we know that we don't need to run the
container-check jobs unless image-tags.yml has been modified. In this
case, we can just skip the container jobs, because we 'know' that the
containers are present in the upstream repo.

For downstream or off-main pipelines, we still need to run the check
job, because the changed-file tracking is not reliable on other
branches, and because we may need to copy the container image from the
upstream container storage into the user's namespace.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:14 +00:00
Daniel Stone
fe8bc3f23e ci: Only run rustfmt when necessary
The rules we want here are pretty simple:
  - only run rustfmt when Rust code changes, to the extent that we can
    tell what has or hasn't changed (only really reliable for pre-merge)
  - make rustfmt success mandatory for pre-merge, advisory for other
    branches

Encode that, and make sure we don't run rustfmt when we don't need to.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:14 +00:00
Daniel Stone
a3efd8284a ci/windows: Use build rules for the build job
... not the test rules, which would try to run automatically.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:14 +00:00
Daniel Stone
e3fa9c224a ci/freedreno: Fix dependencies for trace jobs
The way we pull needs is overly baroque and relies on some jobs
overriding some other jobs to not be broken. This doesn't make it all
the way better, but does improve at least some parts.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:14 +00:00
Daniel Stone
7d25850f18 ci/baremetal: Fix broken dependency declaration
debian/baremetal_arm_test no longer exists, although this was not
material beacuse the dependencies were overridden later anyway.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:13 +00:00
Daniel Stone
ce346523ae ci: Remove baremetal rules special case
It's not clear what this ever referred to, but it's a no-op now since
the rules are no different for .container versus directly overriding
from .container+build-rules.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35203>
2025-06-10 14:37:13 +00:00
Eric Engestrom
9b6171214f lavapipe/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35432>
2025-06-10 13:58:25 +00:00
Eric Engestrom
84bde6b1c3 broadcom/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35432>
2025-06-10 13:58:25 +00:00
Eric Engestrom
0a4a47b92f radeonsi/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35432>
2025-06-10 13:58:25 +00:00
Eric Engestrom
9d7bd8e78d radv/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35432>
2025-06-10 13:58:25 +00:00
Pohsiang (John) Hsu
f30214c1ef mediafoundation: periodic clang-format
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35413>
2025-06-10 13:42:24 +00:00
Sil Vilerino
f514fd80b6 mediafoundation: Pass the frame stats buffers to the gallium driver
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35413>
2025-06-10 13:42:24 +00:00
Sil Vilerino
a92a24d845 mediafoundation: Cleanup comments/dead code
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35413>
2025-06-10 13:42:24 +00:00
Sil Vilerino
9f4768c37d mediafoundation: Remove WIL dependency, use std elements instead
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35413>
2025-06-10 13:42:24 +00:00
Pohsiang (John) Hsu
0023a97576 mediafoundation: Disable level check to unblock 8K x 8K HEVC encode for now.
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35413>
2025-06-10 13:42:23 +00:00
Konrad Dybcio
639d7946c7 freedreno: Add initial A702 support
A702 has been used in Qualcomm QCM2290 / QRB2210 as well as in Qualcomm
SW5100 (SmartWatch).

Co-developed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Co-developed-by: Craig Stout <cstout@google.com>
Co-developed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Co-developed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34867>
2025-06-10 13:19:16 +00:00
Rob Clark
130972c52f freedreno/fdl: Add fd6_texture_format_supported()
Helper so we can deal with special cases where a device adds/
removes format support.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34867>
2025-06-10 13:19:16 +00:00
Sid Pranjale
30de94b91d vulkan/wsi: add cached bit to wsi host memory selection
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34247>
2025-06-10 12:55:09 +00:00
Christoph Pillmayer
223945721b panvk: Manually flush loads in panvk_cmd_draw_indirect
The ls_tracker will re-emit the WAIT for cs_load32_to(..attrib_offset..)
since it is only used in one branch of an if-else below. Thus, it is
better to manually flush it before.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35425>
2025-06-10 12:34:31 +00:00
Christoph Pillmayer
c106fcf284 panvk: Use ls_tracker in cs_if_else
For cs_if_else the ls_tracker needs to be setup such that the loads and
stores of both branches are accounted for separately.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35425>
2025-06-10 12:34:31 +00:00
Karol Herbst
13e47cde01 iris: implement SVM interfaces
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35174>
2025-06-10 12:17:39 +00:00
Karol Herbst
a34a8fc0cd iris: implement resource_get_address
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35174>
2025-06-10 12:17:39 +00:00
Karol Herbst
006eca8b3c rusticl/mesa: catch invalid use of resource_assign_vma in debug builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35174>
2025-06-10 12:17:39 +00:00
Karol Herbst
a482ec7f05 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>
2025-06-10 13:16:29 +02:00
Karol Herbst
392ad203eb 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>
2025-06-10 13:16:16 +02:00
Erik Faye-Lund
564e8a9a0b panfrost: remove surface create/destroy hooks
These should be unused now, let's get rid of them.

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/35338>
2025-06-10 09:06:50 +00:00
Samuel Pitoiset
6fac587aa2 radv: use 32 bytes descriptor for sampled/input attachment images on GFX11+
FMASK has been removed since GFX11+ and using 32 bytes can save a lot
of memory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19621>
2025-06-10 08:49:09 +00:00
Samuel Pitoiset
2797efb12d radv: remove dead code in radv_CreateDescriptorSetLayout()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19621>
2025-06-10 08:49:09 +00:00
Valentine Burley
b25135c7a9 ci/android: Use DEQP_ANDROID_EXE for GLES CTS
The new GLES CTS 3.2.12.0 release allows using DEQP_ANDROID_EXE for EGL
testing on Android.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34321>
2025-06-10 07:56:46 +00:00
Valentine Burley
5ee7a4c1e9 ci: Uprev GL & GLES CTS
Update to the newest releases.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13076
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34321>
2025-06-10 07:56:46 +00:00
Georg Lehmann
f36ac8434c aco: add a readme entry for v_pk_cvt_u8_f32
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35391>
2025-06-10 07:32:05 +00:00
Georg Lehmann
94c191e6d9 aco: remove p_v_cvt_pk_u8_f32
Now unused.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35391>
2025-06-10 07:32:04 +00:00
Georg Lehmann
d95e90ab5f 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>
2025-06-10 07:32:04 +00:00
Lionel Landwerlin
07c2b90e25 ci: add intel format emulation testing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35383>
2025-06-10 07:16:27 +00:00
Sushma Venkatesh Reddy
a796b4a0d2 intel/tools: Reflect SIMD lane count for EUs in device info output
Update the device info output to display EU count together with the native
SIMD width. This clarifies the SIMD width of execution units and explains
differences in EU counts between hardware generations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35116>
2025-06-10 06:55:27 +00:00
Valentine Burley
519ecf372d radv/ci: Add a pre-merge vkd3d job on Raven
Introduce a new, pre-merge vkd3d-proton job on Raven.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:10 +00:00
Valentine Burley
9fae52a19c ci/init-stage1: Add /dev/fd symlink
Create a symlink from /dev/fd to /proc/self/fd if /dev/fd is missing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:10 +00:00
Valentine Burley
15b6967154 ci/lava: Remove vkd3d-proton from the core rootfs
Remove the /vkd3d-proton directories from the core LAVA rootfs archive
and upload vkd3d-proton as a separate archive for use as an optional LAVA
overlay.

This reduces the size of the core lava-rootfs tarball and ensures
vkd3d-proton is only deployed when the job needs it.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:10 +00:00
Valentine Burley
2b7ddc7d71 ci/vkd3d: Use structured tagging for vkd3d-proton
Structured tagging captures a checksum of the component we think we're
building, and verifies this through the chain.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:10 +00:00
Valentine Burley
84bee4571c ci/fluster: Move build-time check into GitLab log section
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:09 +00:00
Valentine Burley
48d1933fab ci/deqp: Use curl-with-retry helper
Use the new helper to avoid intermittent network issues.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:09 +00:00
Valentine Burley
0ccfa323bc ci: Add and use find_s3_project_artifact (and curl-with-retry) helpers
Introduce find_s3_project_artifact (and curl-with-retry) helpers to
simplify locating S3 artifacts across upstream mesa/mesa and forks.

Use these helpers in the Fluster build process and for fetching LAVA
rootfs artifacts.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:09 +00:00
Valentine Burley
7537f0f42b lima/ci: Remove redundant FDO_HTTP_CACHE_URI
For LAVA, LAVA_HTTP_CACHE_URI is used for the caching proxy.
Adding FDO_HTTP_CACHE_URI can cause find_s3_project_artifact to fail.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35167>
2025-06-10 06:33:08 +00:00
Samuel Pitoiset
d98533630b radv: stop using multiview with DGC
DGC doesn't support multiview. The Vulkan spec says:

"VUID-vkCmdExecuteGeneratedCommandsEXT-None-11062
 If a rendering pass is currently active, the view mask must be 0."

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35342>
2025-06-10 06:15:00 +00:00
Faith Ekstrand
31f248b382 nvk: Set memory windows in engine init
There's no reason to re-set them on every queue state dirty.  They're
fixed from the dawn of time.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
e814fc16ff nvk: Use an nvk_mem_stream for nvk_queue_push()
Importantly, this makes nvk_queue_push() no longer stall waiting on the
GPU so we can use it more freely.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
3470cd7568 nvk/queue: Rename submit_simple() to push()
Also, make it take an nv_push for ease of use.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
fdec18dfa5 nvk/upload_queue: Use an nvk_mem_stream internally
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Faith Ekstrand
e206962409 nvk: Add an nvk_mem_stream struct
This is based on nvk_upload_heap but with a different interface and
minor changes to deal with those differences.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35356>
2025-06-10 04:36:40 +00:00
Marek Olšák
a35a12dd38 radeonsi: fix AMD_DEBUG=usellvm
It did nothing for streamout and blits.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
906b2b36ee radeonsi: don't refer to removed GTF CTS tests
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
3d504ee844 radeonsi: remove a non-trivial optimization that doesn't do much
It only caused some optimized shader variants to not be compiled in very
rare cases. I think it doesn't happen in practice, but if it does, it's
not a big deal.

The case when this was useful was when a shader wrote (0,0,0,0) or
(0,0,0,1) or (1,1,1,0, or (1,1,1,1) to a shader output before PS,
but PS didn't use the output.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
edd2fc3c7f radeonsi: use AC_EXP_PARAM_UNDEFINED for clarity
The code was slightly confusing.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
de9eee7700 radeonsi: support 8 instead of 6 clip planes with gl_ClipVertex
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
8ea7d32570 radeonsi: restructure si_emit_clip_regs
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Marek Olšák
447d744833 ac/llvm: allocate LLVM PS output variables on demand
This stops relying on si_shader_info, allowing further cleanup of
si_shader_info.

radv_load_output was unused.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
2025-06-10 03:31:20 +00:00
Faith Ekstrand
6b2331d5f7 nvk: Use an nvk_arena for nvk_descriptor_table
This gives descriptors a consistent base address and lets us stop doing
the memory reference counting dance for queue state management.  We
still need to track sizes so that the GPU doesn't read outside the arena
but that's a lot simpler.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:06 +00:00
Faith Ekstrand
ec148e9cdc nvk/descriptor_table: Add a couple new helpers
This cleans up the code a bit, de-duplicates, and makes locking easier
to understand.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:06 +00:00
Faith Ekstrand
9e52e296f7 nvk/heap: Use an nvk_mem_arena
The only material change here is that we're now allocating slightly less
memory every time in the non-contiguous case.  Instead of allocating a
power of two plus the over-allocation so our total usable space is a
power of two, we now allocate a power of two and just let the over-
allocation burn space.

This also reworks the internal vma_heap to use actual addresses instead
of the index+offset packed things.  This costs us a tiny bit more
looking up the map in alloc() but we save it again on free so there's no
real loss here.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:05 +00:00
Faith Ekstrand
417e85f617 nvk: Add a new arena data structure
This is about 80% of what nvk_heap does today but with the explicit goal
of just pulling out the growable memory arena part out and separating
all of the heap logic.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35327>
2025-06-09 23:08:05 +00:00
Paulo Zanoni
12192f6489 brw: properly decode TGL_PIPE_SCALAR
Source: BSpec "Instruction Fields" page (56701), SWSB field.

Credits to Caio Oliveira here, since he was helping me while we found
this issue together.

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/35395>
2025-06-09 22:21:13 +00:00
Mel Henning
42ba492b88 compiler/rust/bitset: BitSetStream takes Key type
This was an oversight when BitSet was parameterized on a key type.
BitSetStream needs to also take a key type to prevent users from mixing
different key types in binary operators. Constraining this makes BitSet
usage more type safe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35328>
2025-06-09 21:49:29 +00:00
Dave Airlie
b8ac2d47e7 radv/video: add KHR_video_decode_vp9 support.
This adds the VP9 decoding support.

This was initially developed by me,

Stéphane Cerveau from Igalia did a bunch of fixes and testing,
Benjamin Cheng from AMD also helped with a few fixes and how
to program the firmware better.

This passes the current VK-GL-CTS tests.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:04 +00:00
Dave Airlie
4399e43ffd ac/vcn: add new firmware flag to pass uncompresed header offset.
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:04 +00:00
Dave Airlie
3fe375eca5 vulkan/video: add vp9 decode
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:03 +00:00
Dave Airlie
a0f4cbe6f7 amd: move vp9 probs table to common code.
This will be reused by radv eventually, so let's move it all
over to common code. It might have other users eventually,
but we can worry about that later.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35398>
2025-06-09 20:46:03 +00:00
Mike Blumenkrantz
622612f67e zink: hook up global GENERAL image layouts
on some hardware/drivers, image layouts other than WSI are discarded,
which means a bunch of layout-specific synchronization can be omitted

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:03 +00:00
Mike Blumenkrantz
35ee74181e zink: rename a sync function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:03 +00:00
Mike Blumenkrantz
b84f98288c zink: add UIM feedback loop info for dynamic rendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:02 +00:00
Mike Blumenkrantz
5ef18a10ea zink: add a local screen variable in begin_rendering
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:02 +00:00
Mike Blumenkrantz
8af0a2b0ca zink: hook up VK_KHR_unified_image_layouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:01 +00:00
Mike Blumenkrantz
f079cad644 zink: support vulkan 1.4
this just makes features/properties available

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35259>
2025-06-09 20:15:01 +00:00
Dave Airlie
e8914c62ac nak: add support for cbuf2 format to non uniform lowering.
This adds the hopper/blackwell support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35409>
2025-06-09 20:00:12 +00:00
Dave Airlie
fada333435 nvk: bindless cbufs on hopper/blackwell are different.
These are now 51/13 vs 45/19 in previous.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35409>
2025-06-09 20:00:12 +00:00
Lorenzo Rossi
759e83204e nak: Remove unreachable code in sm50.rs
This was probably retained from a refactor

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34327>
2025-06-09 19:46:07 +00:00
Lorenzo Rossi
e53e430dde nak: Add tests for imnmx and dsetp
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34327>
2025-06-09 19:46:07 +00:00
Faith Ekstrand
6c052d87b7 nak/qmd: Add QMD version 5.0 for Blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Dave Airlie
ac699637c0 nak/qmd: Move slm size to a separate macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Faith Ekstrand
6f8245472d nak/qmd: Allow program addresses to be shifted
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Faith Ekstrand
53dc4117b1 nak/sm70: Fix r2ur for Blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35418>
2025-06-09 18:54:59 +00:00
Sergi Blanch-Torne
047a90d683 ci: Re-enable the Collabora farm
This reverts commit acebfc7a38.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35410>
2025-06-09 18:02:25 +00:00
Nanley Chery
b2ad1333d0 anv: Use genX(set_fast_clear_state)() in transition_depth_buffer()
Simplify transition_depth_buffer() by reusing a function to update the
fast-clear value instead of open-coding that logic.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
e0bce5650c anv: Move the gfx9 sRGB sampling clear color code
Simplify set_image_clear_color() by restricting the gfx9-specific code
to the gfx9 #ifdef.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
d21e7e5a9f anv: Query sampler offset in set_image_clear_color()
Enables set_image_clear_color() to be used in transition_depth_buffer()
in a future commit.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
1820db80d6 anv: Fix an assert for ISL_FORMAT_RAW clear color update
We meant to count the number of bits, not bytes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
a0bb9cb6d8 iris: Update clear color initializations for FCV
There were a couple issues in iris_resource_prepare_render():

* It previously assumed that the sampler would always look at the raw
  dwords for 32bpc formats. However, the sampler only does this on
  gfx12.0 for R32 formats (not RG32 formats for example). Update the
  comments to reflect this.

* It only initialized the clear color if the render_format was
  non-32bpc. However, initialization is still needed outside of this
  case because a subsequent sampling operation may use a view format
  which looks at the sampler field. Check for the FCV aux-usage instead
  of the render format's number of bits-per-channel to fix this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
a5bc71dc56 iris: Update check for sampler field changes
Use isl_get_sampler_clear_field_offset() to more accurately determine
when the sampler will change the field it reads from on gfx11-12. This
avoids partial resolving in a number of cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:21 +00:00
Nanley Chery
69d91ae975 intel/blorp: Use get_copy_format_for_bpb more for gfx12.5
Use get_copy_format_for_bpb() instead of
get_ccs_compatible_uint_format() when performing blorp_copy(). This
matches the code path taken on gfx20 and increases the testing of cases
which would impact gfx12.0 in isl_get_sampler_clear_field_offset().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:20 +00:00
Nanley Chery
27a5d84632 intel/isl: Fix isl_get_sampler_clear_field_offset()
Through testing, I've found that the sampler will fetch the clear color
pixel from the converted clear color field in more cases. So, stop
reporting the raw dword offset for them:

* On gfx12.5, for 32-bpc color images.
* On gfx11-12.0, for 64-bpp color images.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35329>
2025-06-09 17:40:20 +00:00
Yiwei Zhang
d4cedcd362 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.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35372>
2025-06-09 17:17:08 +00:00
Yiwei Zhang
d1c191a8c8 venus: do not force prime blit on nv
...since the hw path doesn't work either

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35372>
2025-06-09 17:17:08 +00:00
Natalie Vock
a28515f096 aco/opt: Rename loop header phis
Fossil stats on top of !35269:
Totals from 133 (0.16% of 81077) affected shaders:

Instrs: 4328456 -> 4327891 (-0.01%)
CodeSize: 22890004 -> 22887732 (-0.01%); split: -0.01%, +0.00%
Latency: 28406452 -> 28404732 (-0.01%)
InvThroughput: 5361458 -> 5361153 (-0.01%)
Copies: 376788 -> 376222 (-0.15%)
VALU: 2429210 -> 2428645 (-0.02%)
VOPD: 57 -> 56 (-1.75%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35270>
2025-06-09 14:36:44 +00:00
Rhys Perry
00dd0d0dd1 aco: update VALUReadSGPRHazard comment
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/35387>
2025-06-09 10:12:25 +00:00
Rhys Perry
a714a19e16 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>
2025-06-09 10:12:25 +00:00
Olivia Lee
19e494a461 panfrost/ci: smoke test AFBC-P in CI
The AFBC path is behind a driconf option, and so was not tested by any
existing CI jobs. We had a regression with this that went unnoticed for
several months. To avoid similar situations in the future, add AFBC
smoke tests to CI, similar to the existing spilling smoke tests..

Some tests on g52 fail instead of crashing when AFBC is enabled, but
otherwise the CI expectations are identical.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35193>
2025-06-09 06:33:49 +00:00
Sergi Blanch Torne
e19e8012e4 docs: crnm: document token usage
Judging by comments in the chat, it seems the usage of the tokens in crnm is
only natural when you've been using it for a while. New users would appreciate
reading it in the documentation, beyond the help in the tool.

Also, mentioning how to create a token and what's the minimal scope of the
token to be used with the tool can help new users.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34860>
2025-06-09 06:06:11 +00:00
Sergi Blanch-Torne
acebfc7a38 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-06-09 07:00 UTC
* End: 2025-06-09 13:00 UTC

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35304>
2025-06-09 07:18:34 +02:00
Dave Airlie
870b8717b2 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>
2025-06-09 09:20:19 +10:00
Christian Gmeiner
ac042d1178 lima: Convert to use nir_shader_intrinsics_pass
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35130>
2025-06-08 22:17:39 +00:00
Rob Clark
52d028e06c freedreno: Enable the X1-45
Enable the GPU in the X1P41200 chipset.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35404>
2025-06-08 20:18:42 +00:00
Rob Clark
1eef2a65c7 freedreno: Fold X1-85 back into existing dev table entry
Commit 453ecaddb5 ("freedreno: Remove compute_constlen_quirk") removed
the only UMD visible difference from a740 but did not re-merge the
device table entries.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35404>
2025-06-08 20:18:42 +00:00
Marek Olšák
bd7efb8805 egl: export GL-CL interop functions from libEGL_mesa.so
Non-GLVND EGL already exports them.

The PUBLIC un-definition was unnecessary since we use symbols lists.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35386>
2025-06-08 13:20:47 -04:00
Vinson Lee
8c8496e2f6 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>
2025-06-08 14:07:50 +00:00
Pavel Ondračka
2859fd34f3 r300: minor fix for backend writer/reader detection
Consider the following snippet from a Trine shader

 20: RCP temp[40].z, temp[39].__w_;
 21: MOV temp[40].xy, temp[34].-x-y__;
 22: DP3 temp[41].x, temp[40].xyz_, temp[29].xyz_;
...
 33: DP3 temp[52].x, temp[40].xyz_, temp[51].xyz_;
 34: MAX temp[53].x, temp[52].x___, none.0___;
 35: MUL temp[54].xy, temp[40].xy__, const[8].ww__;
 36: MUL temp[55].xy, temp[54].xy__, temp[41].xx__;
 37: MUL temp[56].x, temp[40].z___, const[8].w___;

When we search for writers for temp[40] so that we can check if we can
convert the MUL to omod, the corresponding variable actually contains
the RCP temp[40].z first and the MOV temp[40].xy is marked as friend.
However the current logic only checks the first instruction of variable,
so we fail to find the writer. Just search recursivelly also the
variable friends.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34462>
2025-06-08 06:29:49 +00:00
Marek Olšák
d279d019d4 ac/nir/tess: remove parameter from and simplify hs_per_patch_output_vmem_offset
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
5734a916d6 ac: move tcs_offchip_layout into ac_shader_args
It's the same variable between radv and radeonsi, but the implementation of
the load intrinsics is very different.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
5994e08f8b ac: set LDS limit for TCS to 32K for all chips
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
fa5e07d5f7 ac/nir/tess: write TCS patch outputs to memory as vec4 stores at the end
This moves per-patch output VMEM stores to the end of the shader where they
execute only once. They are skipped if the whole workgroup discards
all patches.

If tcs_vertices_out == 1, per-patch output VMEM stores use the same lanes
as per-vertex output VMEM stores, which are aligned to 4 or 8 lanes to get
cached bandwidth for the stores.

Previously, per-patch outputs were stored to memory for every store_output
intrinsic in TCS.

Additionally, LDS is no longer allocated for per-patch outputs that are only
written and read by invocation 0, or they are written by all invocations
but not read, and don't have indirect indexing. This reduces LDS usage and
LDS traffic.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
c732306c5a ac/nir/tess: unify computing LDS output patch size, minimize LDS bank conflicts
This unifies the duplicated LDS output patch size computation between
hs_output_lds_offset and ac_nir_compute_tess_wg_info.

"+ 4" to the output patch stride minimizes LDS bank conflicts by making
the beginning of each patch start on a different LDS bank.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
37dc376395 ac/nir/tess: use if-ladder to determine valid tess level components for the vote
Checking whether every compoment is valid in tess_level_has_effect() when
prim_mode is unknown generated too many SALU. Do this instead:

    if (triangles) ...
        subgroup vote for triangles
    else if (quads) ..
        subgroup vote for quads
    else // isoline
        subgroup vote for isolines

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
2f0d9495c5 ac/nir/tess: inline mask helpers
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
10ae5b2fbf ac/nir/tess: rewrite tess level tracking, don't use LDS for more cases
This rewrites tess level value tracking to use the 2-bit masks, which
means LDS allocation is determined separately for outer and inner levels.

LDS is not allocated for tess levels that are only written by invocation 0
and never read or only read by invocation 0. If the number of output
patch vertices is 1, LDS is also not allocated for tess levels.

Tess level outputs for TES are always written as whole vec4 to get cached
bandwidth.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
be44da1888 radeonsi: replace tess_levels_written_for_tes mask with a count
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
9d9cfd89da ac/nir/tess: compute the number of remapped VRAM outputs in common code
This unifies it for both drivers.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
ea70060826 ac/nir/tess: stop using tes_inputs_read / tes_patch_inputs read for TCS & TES
use ac_nir_tess_io_info instead

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
c38bc4824f ac/nir/tess: apply no_varying to ac_nir_tess_io_info
This has the effect that no_varying is finally honored for per-patch
outputs, skipping VMEM stores that TES doesn't read.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
f2c48652da nir: add shader_info::tess::tcs_*outputs_read_by_tes*
Gather no_varying for AMD.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
42445e271e radv,radeonsi: use ac_nir_tess_io_info for LDS size computation
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
c678844ccb ac/nir/tess: move LDS and VMEM output masks into a new info structure
This will replace LDS and VMEM output size computations in drivers.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
f9c2a01f6a ac/nir/tess: indent a block for nir_if
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
d967266edd ac/nir/tess: if all tess levels are 0, skip per-vertex TCS output stores
This is done for all chips.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
c1237256cb ac/nir/tess: execute the tess level workgroup vote on all chips
It will be used to skip stores for discarded patches.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
9c16228359 ac/nir/tess: write TCS per-vertex outputs to memory as vec4 stores at the end
This improves write throughput for TCS outputs. It follows the same idea
as attribute stores in hw GS. The improvement is easily measurable with
a microbenchmark.

It also has the advantage that multiple output stores to the same address
don't result in multiple memory stores. Each output components gets only
one memory store at the end of the shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
509f0e62ad ac/nir/tess: allow passing explicit patch_offset to VMEM/LDS offset calculations
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
a59464b6e3 radv,radeonsi: precompute and pass TCS per-vertex output stride via a user SGPR
It's a stride of 1 output, which isn't 16. It's 16 * num_threads,
aligned to 256.

tcs_offchip_layout has 5 unused bits, so let's use them.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
742227c65c radv,radeonsi: make TCS_OFFCHIP_LAYOUT_NUM_PATCHES not off by one
We never use 128 anyway.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
8d3e3c72e0 radv,radeonsi: merge PATCH_CONTROL_POINT & OUT_PATCH_CP into 1 field
One is only used by TCS, the other is only used by TES.
Use the same field for both, call it PATCH_VERTICES_IN.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:39 +00:00
Marek Olšák
534b282573 ac/nir/tess: adjust memory layout of TCS outputs to have aligned store offsets
There is a comment that explains it.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:38 +00:00
Marek Olšák
80236f2367 ac/nir/tess: add if/endif for HS threads in NIR instead of ACO/LLVM
This just removes the if/endif wrapping for LLVM, and hopefully the ACO
change does the same thing.

ACO had redundant code in endif_merged_wave_info, which is removed here.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:38 +00:00
Marek Olšák
cd366b57d9 ac/nir: implement load_subgroup_id/local_invocation_index for TCS on gfx6-10.x
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34780>
2025-06-07 16:29:38 +00:00
Eric Engestrom
b937d8be9d docs: add sha sum for 25.1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35401>
2025-06-07 14:19:55 +00:00
Eric Engestrom
5c25b09002 docs: add release notes for 25.1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35401>
2025-06-07 14:19:55 +00:00
Eric Engestrom
1f787ff64e docs: update calendar for 25.1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35401>
2025-06-07 14:19:55 +00:00
llyyr
c8bd9ac789 brw: don't unconditionally print message on instance creation
This would cause Mesa to print this message even if an Intel GPU is just
being enumerated by a Vulkan application. For example, `vulkaninfo
--summary`.

Fixes: 52f73db5b7 ("brw: implement read without format lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35396>
2025-06-07 13:59:22 +00:00
Pavel Ondračka
16dbcd9b04 r300/ci: add two flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35400>
2025-06-07 12:12:41 +02:00
Valentine Burley
c6aad1b4c2 khronos-update: Add missing Vulkan Video headers
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35384>
2025-06-07 05:52:21 +00:00
Guilherme Gallo
f61fe79fc0 ci/turnip: Update a couple of flaky tests on a660-vk
Got a consecutive timeout in two different `a660-vk` jobs on
`dEQP-VK.subgroups.clustered.compute.subgroupclusteredmax_u64vec4_requiredsubgroupsize`
test.

Analyzed the CI quality stats dashboard [1] (via job name filter) and also
found a flaky
`dEQP-VK.clipping.user_defined.clip_cull_distance.vert_tess_geom.1_7` on
the same job

[1] https://ci-stats-grafana.freedesktop.org/goto/1ai94GLHR?orgId=1

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35377>
2025-06-07 04:28:49 +00:00
Rob Clark
242f677d20 freedreno: A couple features.txt updates
Just catching up with reality.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35371>
2025-06-06 21:15:21 +00:00
Rob Clark
0b20bddb8a freedreno: correct resource usage check
Usage is not a bitmask.  This was causing us to not pick cached-coherent
for staging read buffers (ie. clEnqueueReadBuffer() and friends).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35371>
2025-06-06 21:15:21 +00:00
Rob Clark
95fede0126 freedreno: Use non-draw batches for compute contexts
We don't want opencl profiling related queries to create "draw" batches,
as we'd end up with three batches per grid.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35371>
2025-06-06 21:15:21 +00:00
Rob Clark
014b2308c0 freedreno: Fix compute caps
Get subgroup_sizes and max_compute_units from dev info.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35371>
2025-06-06 21:15:21 +00:00
Rob Clark
57eb3529ac freedreno: Don't autotune if we are already sysmem
If we've already picked sysmem (for example, non-draw batches) no need
to autotune.  Avoids autotune for compute-only workloads, for example.
Cuts down on per-batch overhead when we get a lot of single grid batches.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35371>
2025-06-06 21:15:21 +00:00
Rob Clark
c5e2e26f49 freedreno: Avoid repeated device lookup
fd_device_gen() calls fd_dev_info_raw() which loops over all the device
table entries.  No need to do this for every batch.  And we _especially_
don't want to do this per-batch when rusticl cl profiling mode triggers
a batch flush for every launched kernel.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35371>
2025-06-06 21:15:21 +00:00
Caleb Callaway
111005066d 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>
2025-06-06 19:32:35 +00:00
Mel Henning
5f0e4a7605 nak,nir: Stop using std::mem::zeroed()
We can replace all of these with safe alternatives if we ask bindgen for
implementations of Default.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35390>
2025-06-06 18:58:35 +00:00
Mel Henning
d15b5fadbb nir/divergence_analysis: Update LCSSA comment
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35271>
2025-06-06 18:15:05 +00:00
Caio Oliveira
80fb555718 brw: Fix MAD instruction usage in spilling logic
The intention here is to build a SIMD8 value, that will be expanded
as needed -- just like the SHL/ADD case, but with a single instruction.

Found when the was triggering invalid MAD with SIMD32 (that gets compressed)
*and* with overlapping destination and source *and* which would cause
conflict when divided into two SIMD16.

Fixes: 338273dedd ("brw/reg_allocate: Optimize spill offset calculation using integer MAD")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35302>
2025-06-06 15:31:50 +00:00
Lionel Landwerlin
9c0ff88e8d vulkan: dump headers/registry to 1.4.317
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35382>
2025-06-06 14:38:17 +00:00
Lionel Landwerlin
49def5ca9d spirv: bump headers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35382>
2025-06-06 14:38:17 +00:00
Boris Brezillon
bb07343c28 pan/image: Start checking image view consistency
We recently found a weird case where an image was re-interpreted with
a format that had a bigger size than the image format, which led the
resulting texture descriptor to have a size that was bigger than what
the plane descriptors were covering.

Let's make sure this sort of unexpected use don't slip through in the
future by introducing basic image view consistency checks.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/35317>
2025-06-06 14:16:43 +00:00
Boris Brezillon
eb476fd2c6 panfrost: Make the MTK detiling more robust
There are several problems in the current logic:

- it doesn't account for the WSI stride, and just assumes things are
  tightly packed and the resource extent is aligned on a tile
- the format re-interpretation done in panfrost_mtk_detile_compute()
  where the view format and the image format have a different block size
  is not supposed to be supported, and that's something we'd like
  to enforce now
- we write to textures that may have no descriptors bound to. This works
  thanks to the robustness behind image stores/loads, but we'd probably
  rather discard a bunch of instructions when Y/UV planes are copied
  separately
- the linear to tiled coordinates conversion can be simplified by using
  a combination of local_invocation_id+workgroup_id instead of the
  global_invocation_id

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Eric R. Smith <eric.smith@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/35317>
2025-06-06 14:16:43 +00:00
Boris Brezillon
a87805fdd8 panfrost: Draw a clear line between AFBC and MTK_TILED conversion shaders
Those two types are completely different, and they don't use the same
key attributes. Let's provide two different helpers, and place the key
bits that are AFBC-specific into an struct inside a union. We also add
the modifier to the key to prevent AFBC/MTK_TILED collisions.

Not only this make things clearer, but we also no longer compile
MTK detiling shaders when AFBC shaders are requested (or the other way
around).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/35317>
2025-06-06 14:16:43 +00:00
Lars-Ivar Hesselberg Simonsen
e6d53fc1d8 panvk: Add FS read support for PrimitiveID
Adds support for reading PrimitiveID in a fragment shader assuming the
previous shader was vertex.

If support for shaders that can modify PrimitiveID is added, additional
changes will be required.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35367>
2025-06-06 13:54:57 +00:00
Lars-Ivar Hesselberg Simonsen
49a7b1a5b8 panvk: Fix unsupported LogicOp NOOP blending
For formats that do not support LogicOps, NOOP should be treated as
COPY. This was implemented in nir/lower_blend, but an optimization in
PanVK would trigger for all NOOP that stopped this from happening.

This commit limits the NOOP optimization to supported formats.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35367>
2025-06-06 13:54:57 +00:00
Mary Guillemard
8953c13b15 panfrost: Remove pan_indirect_dispatch
Now that we use a precomp shader for indirect dispatch,
we can safely remove this.

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/32839>
2025-06-06 12:58:21 +00:00
Mary Guillemard
2c563781fc panfrost: Enable indirect dispatch support on v6 and v9
Our CL implementation also handle v6/v9 and pass CTS.

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/32839>
2025-06-06 12:58:21 +00:00
Mary Guillemard
33fed5a20f panfrost: Use panlib indirect dispatch precomp shader in Gallium
Now that we have an implementation there, we can just call it.

This pass "dEQP-GLES31.functional.compute.indirect_dispatch.*".

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/32839>
2025-06-06 12:58:21 +00:00
Mary Guillemard
8b4e515ca2 panvk: Implement indirect dispatch on JM
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/32839>
2025-06-06 12:58:21 +00:00
Mary Guillemard
bf9331b3fe libpan: Add indirect dispatch implementation
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/32839>
2025-06-06 12:58:21 +00:00
Mary Guillemard
1abe5d1da9 pan/genxml: Switch pan_merge to a macro
This switch pan_perge to a macro to keep address space
information when working with OpenCL C.

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/32839>
2025-06-06 12:58:21 +00:00
Mary Guillemard
a1b1713b43 panfrost: Make pan_encoder.h CL safe
Will be used for indirect dispatch.

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/32839>
2025-06-06 12:58:21 +00:00
Lionel Landwerlin
c9ccb9568f anv: simplify RENDER_SURFACE_STATE parsing
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/22524>
2025-06-06 12:28:42 +00:00
Lionel Landwerlin
1f5a9a5a73 anv: add support for shaderStorageImageReadWithoutFormat through emulation
Using in shader lowering, only relevant for Gfx9,11,12.0 platforms.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5117
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22524>
2025-06-06 12:28:42 +00:00
Lionel Landwerlin
52f73db5b7 brw: implement read without format lowering
Load the format enum and then just go through a series of :

   if format == R16G16B16A16_UNORM
      color = lower_r32g32_uint_tor_r16g16b16a16_unorm(color)
   else if format == R16G16B16A16_SNORM
      ...

For Gfx12.5, there is no in-shader conversion.

For Gfx12/11, the in-shader conversion covers the following formats :
    - ISL_FORMAT_R10G10B10A2_UNORM
    - ISL_FORMAT_R10G10B10A2_UINT
    - ISL_FORMAT_R11G11B10_FLOAT

For Gfx9, the following formats :
    - ISL_FORMAT_R16G16B16A16_UNORM
    - ISL_FORMAT_R16G16B16A16_SNORM
    - ISL_FORMAT_R10G10B10A2_UNORM
    - ISL_FORMAT_R10G10B10A2_UINT
    - ISL_FORMAT_R8G8B8A8_UNORM
    - ISL_FORMAT_R8G8B8A8_SNORM
    - ISL_FORMAT_R16G16_UNORM
    - ISL_FORMAT_R16G16_SNORM
    - ISL_FORMAT_R11G11B10_FLOAT
    - ISL_FORMAT_R8G8_UNORM
    - ISL_FORMAT_R8G8_SNORM
    - ISL_FORMAT_R16_UNORM
    - ISL_FORMAT_R16_SNORM
    - ISL_FORMAT_R8_UNORM
    - ISL_FORMAT_R8_SNORM

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/22524>
2025-06-06 12:28:42 +00:00
Jose Maria Casanova Crespo
a8c3767386 v3d: Rename MAX_JOB_SCISSORS to V3D_JOB_MAX_SCISSORS
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35042>
2025-06-06 11:56:08 +00:00
Jose Maria Casanova Crespo
ed16884bfa 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>
2025-06-06 11:56:08 +00:00
Jose Maria Casanova Crespo
6ff509593c 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>
2025-06-06 11:56:08 +00:00
Jose Maria Casanova Crespo
45367643f6 v3d: Add missing newline char on perf debug message
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35042>
2025-06-06 11:56:07 +00:00
Rhys Perry
86ccceb4de aco: don't consider gfx1153 to have point sample acceleration
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/34978>
2025-06-06 11:55:13 +01:00
Rhys Perry
f10b49781d aco: make all wait entries linear
If we remove exec skips, then we can wait for an entry on all paths in the
linear cfg, but not the logical cfg.

fossil-db (gfx1201):
Totals from 0 (0.00% of 79653) affected shaders:

fossil-db (navi31):
Totals from 0 (0.00% of 79653) affected shaders:

fossil-db (navi21):
Totals from 1586 (1.99% of 79653) affected shaders:
Instrs: 5118897 -> 5113206 (-0.11%); split: -0.11%, +0.00%
CodeSize: 28365852 -> 28343696 (-0.08%); split: -0.08%, +0.00%
Latency: 47820341 -> 47799532 (-0.04%); split: -0.09%, +0.05%
InvThroughput: 9904391 -> 9908653 (+0.04%); split: -0.02%, +0.06%

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/34978>
2025-06-06 11:55:13 +01:00
Rhys Perry
1088ac49db aco: sometimes join linear wait entries on logical edges
fossil-db (gfx1201):
Totals from 1303 (1.64% of 79653) affected shaders:
Instrs: 6920949 -> 6917692 (-0.05%); split: -0.06%, +0.01%
CodeSize: 37112404 -> 37095728 (-0.04%); split: -0.05%, +0.01%
Latency: 70471343 -> 70365986 (-0.15%); split: -0.15%, +0.00%
InvThroughput: 11515673 -> 11504666 (-0.10%); split: -0.10%, +0.01%

fossil-db (navi31):
Totals from 1293 (1.62% of 79653) affected shaders:
Instrs: 6500186 -> 6496761 (-0.05%); split: -0.06%, +0.01%
CodeSize: 34562712 -> 34549236 (-0.04%); split: -0.04%, +0.01%
Latency: 68604746 -> 68666532 (+0.09%); split: -0.15%, +0.24%
InvThroughput: 11276591 -> 11284914 (+0.07%); split: -0.10%, +0.17%

fossil-db (navi21):
Totals from 811 (1.02% of 79653) affected shaders:
Instrs: 4110953 -> 4108788 (-0.05%); split: -0.05%, +0.00%
CodeSize: 22955984 -> 22948064 (-0.03%); split: -0.03%, +0.00%
Latency: 35070231 -> 35064448 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 6945610 -> 6945053 (-0.01%); split: -0.01%, +0.00%

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/34978>
2025-06-06 11:51:08 +01:00
Rhys Perry
c1f8537131 aco: skip waitcnt between two vmem writing different lanes
fossil-db (gfx1201):
Totals from 1382 (1.74% of 79653) affected shaders:
Instrs: 6531704 -> 6523935 (-0.12%); split: -0.12%, +0.00%
CodeSize: 34992076 -> 34933568 (-0.17%); split: -0.17%, +0.01%
Latency: 70183360 -> 69616066 (-0.81%); split: -0.81%, +0.00%
InvThroughput: 11155445 -> 11068667 (-0.78%); split: -0.78%, +0.00%

fossil-db (navi31):
Totals from 46 (0.06% of 79653) affected shaders:
Instrs: 1833768 -> 1833732 (-0.00%)
CodeSize: 9468788 -> 9468716 (-0.00%)
Latency: 11683092 -> 11667865 (-0.13%)
InvThroughput: 2274377 -> 2272872 (-0.07%)

fossil-db (navi21):
Totals from 0 (0.00% of 79653) affected shaders:

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/34978>
2025-06-06 11:51:08 +01:00
Rhys Perry
9649deb50e aco: skip waitcnt between two vmem writing different halves
fossil-db (gfx1201):
Totals from 4 (0.01% of 79653) affected shaders:
Instrs: 41374 -> 41380 (+0.01%); split: -0.01%, +0.02%
CodeSize: 238912 -> 238924 (+0.01%); split: -0.01%, +0.01%
Latency: 706714 -> 706410 (-0.04%)
InvThroughput: 352269 -> 352118 (-0.04%)
VClause: 803 -> 798 (-0.62%)

fossil-db (navi31):
Totals from 0 (0.00% of 79653) affected shaders:

fossil-db (navi21):
Totals from 0 (0.00% of 79653) affected shaders:

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13028
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34978>
2025-06-06 11:51:08 +01:00
Rhys Perry
9a38ad3ca7 aco: add wait_entry::logical_events
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/34978>
2025-06-06 11:51:08 +01:00
Rhys Perry
bb99de00f7 aco: add wait_entry::vm_mask
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/34978>
2025-06-06 11:51:08 +01:00
Rhys Perry
b70ecfa588 aco: only join barrier_imm/barrier_events for logical edges
fossil-db (gfx1201):
Totals from 3 (0.00% of 79653) affected shaders:
Instrs: 2904 -> 2893 (-0.38%)
CodeSize: 14944 -> 14900 (-0.29%)
Latency: 14703 -> 14248 (-3.09%)
InvThroughput: 1237 -> 1210 (-2.18%)

fossil-db (navi31):
Totals from 3 (0.00% of 79653) affected shaders:
Instrs: 2742 -> 2731 (-0.40%)
CodeSize: 14136 -> 14092 (-0.31%)
Latency: 14744 -> 14287 (-3.10%)
InvThroughput: 1241 -> 1213 (-2.26%)

fossil-db (navi21):
Totals from 3 (0.00% of 79653) affected shaders:
Instrs: 2326 -> 2315 (-0.47%)
CodeSize: 12472 -> 12428 (-0.35%)
Latency: 14921 -> 14465 (-3.06%)

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/34978>
2025-06-06 11:51:08 +01:00
Rhys Perry
62a9b4b976 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>
2025-06-06 11:51:08 +01:00
Erik Faye-Lund
fb0a422be2 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>
2025-06-06 08:35:35 +00:00
Erik Faye-Lund
cc66651fc1 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>
2025-06-06 08:35:35 +00:00
Yiwei Zhang
69b458fdd7 panvk: fix imported external multi-planar image support
This change and the prior preparations have fixed the false assumption
of ordered image planes for external multi-planar image (YV12 has the
chroma planes swapped to map to the Vulkan format). We no longer need to
use plane data size to advance plane offset. The code paths for
subresource reporting, memroy reporting and memory binding are now
consistent across native disjoint/non-disjoint and imported external
images no matter single-planar or multi-planar.

Test:
- No regressions in dEQP-VK.ycbcr.*
- NV12 camera preview works on Android
- YV12 video playback works on Android
- Android graphics cts passing
  - BasicVulkanGpuTest
  - MediaVulkanGpuTest
  - CameraVulkanGpuTest

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
2025-06-06 07:25:27 +00:00
Yiwei Zhang
a9006ebde0 pan/layout: document and prepare to fix planar plane offset
This change:
1. Rename pan_image_wsi_layout to pan_image_layout_constraints.
1. Document that pan_image_layout_constraints::offset_B will be used to
   pass planar plane offset for native images as well. Update
   array_stride_B to exclude such offset accordingly.
2. Document that whether explicit layout is used further depends on if
   the passed wsi_row_pitch_B is non-zero or not. Updated the checks to
   base on the new boolean use_explicit_layout.
3. Update and document the intended slice offset_B behavior so that
   native and imported images are aligned.

No behavior change from this commit since the client (panvk) hasn't set
the pan_image_layout_constraints->offset_B for planar plane yet.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
2025-06-06 07:25:27 +00:00
Yiwei Zhang
6690c74f6d pan/layout: refactor wsi layout query
This change splits pan_image_layout_get_wsi_layout into separate queries
to prepare for making pan_image_wsi_layout an input layout constraint.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
2025-06-06 07:25:27 +00:00
Yiwei Zhang
1d77569cbc pan/layout: exclude plane offset from plane data size for import
This doesn't affect gallium side behavior since data_size_B is never
looked at for imported planar plane. For panvk, it doesn't affect
imported single planar image, and multi-planar side is still broken.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
2025-06-06 07:25:26 +00:00
Yiwei Zhang
360c08a3dc pan/layout: add const to immutable local vars in pan_image_layout_init
Putting compiler optimization aside, this at least improves readability
by making it clean which vars are mutable and which are immutable.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
2025-06-06 07:25:26 +00:00
Caleb Callaway
a633d3f71f docs: Add CPU frequency governor perf tip
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33744>
2025-06-06 07:20:09 +00:00
Caleb Callaway
f64dbfd08a anv: ANV_DEBUG_WAIT_FOR_ATTACH
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35324>
2025-06-06 07:02:07 +00:00
Erik Faye-Lund
ad6e1afe74 panvk: add EXT_texture_compression_astc_hdr support
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34828>
2025-06-06 06:40:59 +00:00
Erik Faye-Lund
a271b9a9a3 vulkan/format: map ASTC HDR formats
Because the ASTC HDR formats are extension formats, we need to convert
it manually in vk_format_to_pipe_format() instead of using the table.
Otherwise, the compiler tries to create a gigantic array and ends up
dying.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34828>
2025-06-06 06:40:59 +00:00
Dave Airlie
ade742db14 nvk/headers: sync up the latest blackwell compute class headers
These should unblock a few things.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35378>
2025-06-06 12:46:51 +10:00
Guilherme Gallo
83f80dc4aa ci/lava: Update image tag to apply the changes
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35222>
2025-06-05 22:32:37 +00:00
Guilherme Gallo
9024e0df83 ci/lava: Don't fail if the section times mismatches
Time drift can occur during LAVA job execution due to transitions
between three different clocks.

The process begins in the GitLab job [1], using the CI_JOB_STARTED_AT
variable. If SSH is enabled, we then connect to the DUT through an
Alpine-based SSH client container inside the LAVA dispatcher [2], where
some GitLab-related steps are timestamped by lava_job_submitter.
Finally, the DUT [3] runs and uses the setup-test-env.sh helper to
handle GitLab sections, potentially using a third distinct clock.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35222>
2025-06-05 22:32:37 +00:00
Guilherme Gallo
7322e44833 ci/lava: Style fixes in test_lava_log
Fix the formatting according flake8

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35222>
2025-06-05 22:32:36 +00:00
Guilherme Gallo
19357b9a84 ci/lava: Fix type hint errors in GitlabSection
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35222>
2025-06-05 22:32:36 +00:00
Wenfeng Gao
c4dd9027db mediafoundation: enable new CODECAPI properties for frame stats
CODECAPI_AVEncVideoEnableFramePsnrYuv
CODECAPI_AVEncVideoEnableSpatialAdaptiveQuantization
CODECAPI_AVEncVideoOutputQPMapBlockSize
CODECAPI_AVEncVideoOutputBitsUsedMapBlockSize

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:01 +00:00
Pohsiang (John) Hsu
9f22e3f98c ci: build mediafoundation frontend in windows-msvc
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:01 +00:00
Sil Vilerino
38d2133e3e ci: Add Windows SDK 26100 to msvc image
Keep older 10.0.20348.0 SDK as well. Also change:
mesa_deps_test_piglit - Add CMAKE_POLICY_VERSION_MINIMUM=3.5 and _UCRT_NOISY_NAN
mesa_deps_test_deqp - Add CMAKE_POLICY_VERSION_MINIMUM=3.5 and CMAKE_SYSTEM_VERSION=10.0.20348.0
meson: When building with MSVC, add -D_UCRT_NOISY_NAN to workaround Win SDK 26100

D_UCRT_NOISY_NAN is for SDK 26100 issue:
https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907

Reviewed-by: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:01 +00:00
Wenfeng Gao
9b1c4f2e04 mediafoundation: Support new MFSampleExtension for PSNR, QPMap, and BitsUsedMap.
Added a helper function MFAttachPipeResourceAsSampleExtension that converts pipe_resource into D3D12 resource, attached as IMFMediaBuffer to IMFSample.
Conditionally applied MFAttachPipeResourceAsSampleExtension to:
    MFSampleExtension_FramePsnrYuv
    MFSampleExtension_VideoEncodeQPMap
    MFSampleExtension_VideoEncodeBitsUsedMap

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:01 +00:00
Pohsiang (John) Hsu
4df6954219 mediafoundation: Allow to build multiple codec MFT DLLs in one build pass
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13235
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:01 +00:00
Sil Vilerino
d9f0ddf336 mediafoundation: Request PSNR frame stats
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:00 +00:00
Sil Vilerino
caa74854ec mediafoundation: Implement full/lower resolution two pass
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:02:00 +00:00
Wenfeng Gao
d7022698ff mediafoundation: Added new CODECAPIs for GetValue and SetValue.
CODECAPI_AVEncVideoEnableFramePsnrYuv
CODECAPI_AVEncVideoEnableSpatialAdaptiveQuantization
CODECAPI_AVEncVideoOutputQPMapBlockSize
CODECAPI_AVEncVideoOutputBitsUsedMapBlockSize

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:01:59 +00:00
Sil Vilerino
a81ffa7747 mediafoundation: Fill RefPicListL0/L1 sizes in pipe_h265_enc_picture_desc
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:01:59 +00:00
Sil Vilerino
5e44557686 mediafoundation: Upgrade to use DirectX-Headers 717 SDK from previous 716 version
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
2025-06-05 22:01:58 +00:00
Connor Abbott
b6c1881d29 tu: Add perf debug for FDM being disabled
It's important to know when FDM is being disabled to a load/store of an
MSAA attachment as this is likely not what the user intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35373>
2025-06-05 21:18:07 +00:00
Alyssa Rosenzweig
3c5c3d7819 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>
2025-06-05 18:57:43 +00:00
Alyssa Rosenzweig
01c59030e8 hk: clarify A8_UNORM issue
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:43 +00:00
Alyssa Rosenzweig
dffee5abc8 hk: enable another format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:43 +00:00
Alyssa Rosenzweig
df6c52ff2a hk: enable ETC, ASTC
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:42 +00:00
Alyssa Rosenzweig
a52c5fbc35 asahi: fix shader-db with fbfetch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:42 +00:00
Alyssa Rosenzweig
25d24b5a59 hk: clean out unused driconf
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:42 +00:00
Alyssa Rosenzweig
870bde17d0 agx: drop encoding masks
unused and will now never be used, since we have the XML for this instead.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:42 +00:00
Alyssa Rosenzweig
65a5ff67e9 agx: add XML-based disassembler
autogenerate a disassembler from the XML. also add a simple pure Python
reference disassembler, since autogenerated C code can be annoying to work with
in various contexts (we might drop this down the line, TBD if it's useful to
port over the current non-Mesa consumers of dougallj/applegpu). both
disassemblers produce identical output, unit tested via Meson.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:42 +00:00
Alyssa Rosenzweig
53a2ada9d7 agx: add instruction encoding cases
for unit testing disassembly. this is the new syntax.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:41 +00:00
Alyssa Rosenzweig
2dccbf8c7f agx: add XML description of the AGX2 ISA
for our disassembler and later more stuff. should cover everything mesa uses,
not 100% complete to what applegpu has but mostly there.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
2025-06-05 18:57:41 +00:00
Alyssa Rosenzweig
c16bb0365a 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>
2025-06-05 18:57:41 +00:00
Rohan Garg
248b8cb8c5 anv: drop anv_can_hiz_clear_ds_view in favor of anv_can_hiz_clear_image
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/34824>
2025-06-05 20:27:33 +02:00
Rohan Garg
658b89ac86 anv: Support fast-clears in vkCmdClearDepthStencilImage
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: #11897
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34824>
2025-06-05 20:27:30 +02:00
Rohan Garg
db8b07f88d anv: use the float qualifier to denote the right value
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/34824>
2025-06-05 20:26:54 +02:00
Samuel Pitoiset
babeb975c4 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>
2025-06-05 16:51:07 +00:00
David Rosca
c72987350b 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>
2025-06-05 15:47:31 +00:00
Valentine Burley
02256a5aa3 ci/android: Close the Android tools section
This was missing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35362>
2025-06-05 15:18:23 +00:00
Valentine Burley
9a52a25a9e ci: Allow ANGLE_TAG to be unset in -runner scripts
The android-runner scripts use `set -u`, which causes them to fail if
ANGLE_TAG is not defined. This issue went unnoticed because all current
Android jobs set ANGLE_TAG.

Update all -runner scripts to tolerate ANGLE_TAG being unset.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35362>
2025-06-05 15:18:23 +00:00
Valentine Burley
c99c67c490 ci/android: Only replace ANGLE if needed
Only replace the stock ANGLE libraries if the job inherits .test-angle.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35362>
2025-06-05 15:18:23 +00:00
Ashley Smith
95c508d950 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>
2025-06-05 14:57:20 +00:00
Christoph Pillmayer
6d4d42e328 panvk: Add support for 64bit conditionals in CSF
This will be used to implement timestamp queries for CSF GPUs.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35368>
2025-06-05 14:20:54 +00:00
Christoph Pillmayer
8ed900c406 panvk: Fix start label position in cs_while_start
We want the start label to be after the initial check for the condition
not being true.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35368>
2025-06-05 14:20:54 +00:00
Eric R. Smith
ab4301619f panfrost: add support for AFBC modifiers on YUV formats
Make AFBC work for NV12 and similar YUV formats that we already
supported.

Signed-off-by: Eric R. Smith <eric.smith@collabora.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/35015>
2025-06-05 13:51:34 +00:00
Eric R. Smith
f59efe88ed pan/afbc: Teach AFBC about YUV formats
Extend the existing helpers to report the correct values when YUV formats
are involved.

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/35015>
2025-06-05 13:51:34 +00:00
Boris Brezillon
4d9a4e8228 pan/image: Teach pan_image/layout about planar images
The way things are done at the moment, the pan_layout logic has no way
of knowing which plane is targeted, which either forces the user of
pan_image_layout_init() to patch the layout after the calculation based
on the YUV format.

These changes unblock unittests on YUV formats.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
ceb79e399e util/format: Handle emulated YUV formats in util_format_get_plane_{height,width}()
Useful to drivers doing the CSC in software, but still needing
to account for width/height adjusment based on the subsampling.

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: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
2025-06-05 13:51:34 +00:00
Eric R. Smith
6b54547a0e util/format: fix some missing cases in util_format_get_plane_format
We were missing some of the emulated YUV formats (like R8_G8B8_420_UNORM)
in util_format_get_plane_format; add those.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
2025-06-05 13:51:34 +00:00
Boris Brezillon
aceabab18f panfrost: Add a debug flag to enforce WSI row pitch at import time
So far we assumed tile rows would be tightly packed, so changing the
behavior without introducing a new set of AFBC modifiers is likely
to break some cases where the exported got the stride wrong. That's
still something we would like to enforce in the long run, so let's
start by adding a "PAN_MESA_DEBUG=strict_afbc" flag to exercise the
code supposed to force this behavior.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
916f75a2a6 pan/layout: Test WSI import behavior on all supported format/mods
Instead of picking random formats/extents, iterate over all supported
<format,modifier> for each architecture, and make sure
pan_image_layout_init() fails/suceeds when it's supposed to.

On success, we also make sure pan_image_layout_get_wsi_layout() returns
values that match the import.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
f28b2c9e8d util/format: Add missing entries for {R8_B8G8,G8_B8R8}_422_UNORM
The yaml lacks entries for those formats which are defined in the enum.

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: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>
2025-06-05 13:51:34 +00:00
Boris Brezillon
cff496eee9 pan/layout: Don't base the WSI row_pitch calculation on the image width
If we want to allow the import path to specify padding tiles, we need
to adjust pan_image_layout_get_wsi_layout() to base its WSI row pitch
calculation on the AFBC header row stride instead of the image width.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
20a97c928e pan/layout: Add an option to enforce WSI row pitch at layout init time
At the moment, we check that the WSI pitch is big enough to cover the
resource width, but we don't validate that it's tile aligned, and we
also don't use the user provided pitch when AFBC is requested, meaning
we don't allow row tile padding.

Add an option to force using the explicit WSI pitch, and fail if the
pitch doesn't give a tile aligned row stride.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
8e18402eb1 pan/layout: Don't align WSI import offset
If the offset is considered valid by wsi_row_pitch_to_row_stride() we
should use it as-is, even if it's suboptimal.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
f64a7c1506 pan/layout: Check the wsi_layout consistency in wsi_row_pitch_to_row_stride()
We do a bunch of WSI -> GPU translation in there, so it makes sense to
also check that the offset and row stride are properly aligned, and
that the pixel width that results from this transformation is greater or
equal to the image width.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
a24fddefba pan/layout: Drop the AFBC(compressed) tests in AFBCFormatInvariant
We're not supposed to do AFBC(compressed), so there's no point testing
that in our AFBCFormatInvariant tests.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
b65b621062 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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
bba62e047e 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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
fc92caf216 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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
5292fef80d pan/afbc: Add helpers to query AFBC header alignment requirements
Will be used in pan_layout.c to validate the WSI info.

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>
2025-06-05 13:51:34 +00:00
Boris Brezillon
ce197c8018 pan/format: Draw a clear line between native and emulated modifiers
Mali GPUs don't support DRM_FORMAT_MOD_MTK_16L_32S_TILE natively, so
it doesn't make sense to teach the common layer about this format,
especially since it would require adding more hacks to make sense of
the tiled -> linear view of such resources.

Given the only user of this format is the gallium driver, move the
MTK_TILED definitions there and start differentiating native and
emulated 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>
2025-06-05 13:51:34 +00:00
Karol Herbst
cf3ec8d3b9 rusticl: enable proper fp16 support
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
2025-06-05 13:17:27 +00:00
Karol Herbst
33fb1eca3e nir/scale_fdiv: handle fp16 fdiv
Not strictly scaling, but we upcast fo fp32, do the fdiv there and cast
back again.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
2025-06-05 13:17:27 +00:00
Karol Herbst
aa5a981b83 vtn/opencl: support fp16 builtins
If we can't find an appropiate builtin in the libclc library, we add our
own wrapper at runtime executing the op in fp32 space.

Libclc has variying support for fp16 opcodes and with a libclc prior
llvm-19 it does not work as good as with the newer one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
2025-06-05 13:17:27 +00:00
Karol Herbst
ca01635075 clc: support fp16 spec constants
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
2025-06-05 13:17:27 +00:00
Karol Herbst
f8305828f4 util/u_printf: support printing fp16 values
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
2025-06-05 13:17:27 +00:00
Karol Herbst
162b604043 freedreno/ci: add CL fp16 skips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34053>
2025-06-05 13:17:27 +00:00
Sil Vilerino
24eb46b720 d3d12: Add video encode PSNR output stats
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
1b801a95ae pipe: Add video encode PSNR output stats
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
228a0a46a5 d3d12: Implement full/lower two pass video encode
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
daa16cf0d4 pipe: Two pass video encode definitions
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
0e63becefb d3d12: Use helper to properly initialize d3d12_fences in d3d12 video
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
7fb98a1e6f d3d12: Use RefPicListL0/L1 sizes in pipe_h265_enc_picture_desc when supported
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
8f6077ad57 d3d12: Fix sliced encode ID3D12Resource/ID3D12Fence reuse. Note the fence value now is the frame fence value as the fence is reused
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
a562c0787f d3d12: Add D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_DISABLE_LOOP_FILTER_ACROSS_SLICES when querying HEVC capabilities
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Sil Vilerino
f28417a7bb d3d12: Upgrade to use DirectX-Headers 717 SDK from previous 716 version
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35263>
2025-06-05 12:15:48 +00:00
Valentine Burley
775cd85ed3 ci/android: Add a version and renderer check for android-angle-lavapipe
Add one GLES 2 test to run in the deqp-runner suite of the
android-angle-lavapipe job to verify the version and renderer used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35337>
2025-06-05 11:43:18 +00:00
Christoph Pillmayer
0440d1dd03 panvk: Advertise VK_EXT_inline_uniform_block
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35178>
2025-06-05 11:18:29 +00:00
Christoph Pillmayer
2ec6527c70 panvk: Implement VK_EXT_inline_uniform_block
Inline uniforms blocks are implemented as a buffer descriptor followed by
the actual inlined data.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35178>
2025-06-05 11:18:29 +00:00
Martin Krastev
ca8719bebf svga/ci: vmware farm is out; temporary relegate piglit job to manual
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35364>
2025-06-05 10:57:20 +00:00
Icenowy Zheng
dca392b119 Revert "zink: reject Imagination proprietary driver w/o geometryShader"
This reverts commit ca087e2027.

It's discovered that the newest Rogue proprietary Vulkan driver does not
prevent us from running Zink (aside from an assert of geometryShader,
which is already changed to an if clause), and which fails previously is
because of some bugs in old driver blobs.

As the faulty blob versions are rejected now, revert this commit to
accept Rogue drivers.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34183>
2025-06-05 10:37:56 +00:00
Icenowy Zheng
b6d7736792 zink: reject IMG blob < 24.1@6554834 unless enforced
Imagination closed blobs earlier than 24.1@6554834 has some issues about
NULL pCommandBuffers in VkSubmitInfo, which is present in VkSubmitInfo's
submitted by Zink.

Reject these drivers to prevent crashes, unless zink is enforced and the
user knows what they're doing.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34183>
2025-06-05 10:37:56 +00:00
Icenowy Zheng
45d9d55cc1 zink: don't assert geometryShader for IMG proprietary driver
The proprietary driver for Imagination Rogue-architecture GPUs does not
come with geometryShader support.

Change the assert for it to another if condition.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34183>
2025-06-05 10:37:56 +00:00
Rhys Perry
00a2ed60f8 radv/meta: use unsigned min in copy/fill shaders
Otherwise, this would break >2 GiB copy/fill.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport: 25.1
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35343>
2025-06-05 09:55:32 +00:00
Lionel Landwerlin
426ddb4fc9 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>
2025-06-05 09:39:07 +00:00
Calder Young
57c5419bbd 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>
2025-06-05 09:22:16 +00:00
Georg Lehmann
297fdc6636 radv: don't accidentally expose samplerFilterMinmax through Vulkan 1.2
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35339>
2025-06-05 09:01:19 +00:00
Maíra Canal
cd7dc398d8 broadcom/ci: update expected results with kernel 6.12
Some tests no longer OOM after updating the devices to the 6.12 kernel.
Therefore, remove those tests from the skip list.

Also, reduce the timeout of some full-run jobs, as the VK full-run
usually takes no longer than 25 minutes in the RPi 4 and no longer than
30 minutes in the RPi 5.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35300>
2025-06-05 11:21:46 +02:00
Mike Blumenkrantz
1ad37360de zink: update renderdoc layer string for android
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35350>
2025-06-04 19:08:48 +00:00
Eric Engestrom
6eaac7c171 docs: add sha sum for 25.1.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35348>
2025-06-04 19:01:14 +00:00
Eric Engestrom
aabbd9f0b2 docs: add release notes for 25.1.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35348>
2025-06-04 19:01:14 +00:00
Eric Engestrom
5df6b445ba docs: update calendar for 25.1.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35348>
2025-06-04 19:01:13 +00:00
Mike Blumenkrantz
208450fc57 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>
2025-06-04 18:21:16 +00:00
Marek Olšák
c3034fa82c amd: replace most u_bit_consecutive* with BITFIELD_MASK/RANGE
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35346>
2025-06-04 17:46:38 +00:00
Gurchetan Singh
feff86220c gfxstream: fix suballocation logic using u_mm
- mSize should be used rather than kHostVisibleHeapSize.
  Since kHostVisibleHeapSize is bigger, OOB errors occured.

- Freeing memory did not work.  Look up via the offset
  rather pointer.  Complain loudly if offset isn't found.

- Align to 4096 bytes (page size), like the old AEMU suballocator
  flow.

TEST=set deferredMapping = 0 and test via Cuttlefish

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:24 +00:00
Serdar Kocdemir
73d94d70f1 gfxstream: Fix min max reduction samplers v2
Test: dEQP-VK.pipeline.monolithic.sampler.view_type.*

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:24 +00:00
Serdar Kocdemir
bc79017f87 gfxstream: Allow all promoted device extensions
.. for api level 1.1, 1.2 and 1.3.

Also allow VK_KHR_external_memory_fd for non-Android Linux, as the
related functionalities are only implemented for that case.

Bug: 389637419
Test: dEQP smoke tests && CI

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:23 +00:00
sergiuferentz
de3361d050 gfxstream: intercept vkCmdClearColor(...) and do linear->SRGB conversion
Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:23 +00:00
Serdar Kocdemir
fd40649768 gfxstream: Fix compiler warnings
.. for some unused function arguments.

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Serdar Kocdemir
3ade950b6f gfxstream: Fix codegen for the moved logging.h file
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Serdar Kocdemir
68e42404b7 gfxstream: Implement private data extension
The logic is implemented on the guest side as we need special handling
for swapchain and device memory handle types.

Memory handles for coherent memory allocations on the guest can map into
a single handle on the host side, which makes it infeasible to pass
through the extension functions with handle remapping. Swapchain handles
are not passed to the host driver, so we need to keep a separate table
for them as well. Instead of separating the logic based on the handle
type, we manage all the private data set/get calls on the guest side
without encoding the commands to the host.

Test: dEQP-VK.api.object_management.private_data.*
Test: dEQP-VK.wsi.android.swapchain.private_data.*

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Bo Hu
b6c5a548ad gfxstream: [vulkan snapshot]: update codegen for vkUpdateDescriptorSetWithTemplateSized
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Bo Hu
b951324606 gfxstream: [vulkan snapshot]: update codegen to handle failed api calls
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
Serdar Kocdemir
4253e5789a gfxstream: Adjust allowed device extensions
To include VK_KHR_dynamic_rendering for shader_object
tests on dEQP. Also enable timeline_semaphore extension
on Android since some of the known issues are already
fixed and the extension is promoted to 1.2 core.

Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:22 +00:00
sergiuferentz
f839e321b8 gfxstream: Remove MEMORY_HANDLE_OPAQUE_FD support from Guest to fix suballocation dEQP tests
Reviewed-by: Marcin Radomski <dextero@google.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:21 +00:00
Bo Hu
786bd1c6f2 gfxstream: [vulkan snapshot]: update to support vkCmdCopyBuffer
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:21 +00:00
Jason Macnak
eea41d1f86 gfxstream: Update codegen license
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Serdar Kocdemir
33ba95cb0c gfxstream: Track vkGetDeviceImageMemoryRequirements on host
vkGetDeviceImageMemoryRequirements can be used to get memory
requirements without creating an actual image and we should apply the
same image modifications based on the create info when returning the
memory requirements.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Bo Hu
4340dfb400 gfxstream: [vulkan snapshot]: update codegen for vkCmdBindPipeline
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Jason Macnak
e7826d89a7 gfxstream: Update GfxApiLogger namespace and header file
... to parallel the changes in ag/33517750.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:20 +00:00
Serdar Kocdemir
dae39cd278 gfxstream: Reduce log level on AHB allocation
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Bo Hu
464c2e35b8 gfxstream:: update code gen for vkResetCommandPool
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Jason Macnak
afab126947 gfxstream: Update gfxstreaml vk xml location
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Serdar Kocdemir
ad5f1ed77e gfxstream: Mark VK_KHR_ray_tracing_pipeline dispatch only
VkStridedDeviceAddressRegionKHR structure cannot be correctly
serialized. Update codegen to not use marshalling.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:19 +00:00
Jason Macnak
3331752323 gfxstream: Remove old include
... no longer needed after the aemu -> gfxstream changes.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:18 +00:00
Jason Macnak
c0c10744fd gfxstream: Update codegen for aemu -> gfxstream stream interface
Bug: b/403363880

Test: cd hardware/google/gfxstream
      mma

Test: cd hardware/google/gfxstream
      mkdir build && cd build
      cmake .. -G Ninja
      ninja

Test: meson setup \
        -Ddefault_library=static \
        -Dgfxstream-build=host \
        build

      meson compile -C build

Test: cd <emu master dev repo>
      cd external/qemu
      python android/build/python/cmake.py --gfxstream

Test: cd <emu main next repo>
      prebuilts/bazel/linux-x86_64/bazel test \
      --platforms=@//build/bazel/platforms:linux_x64 \
     @gfxstream//...

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:18 +00:00
Bo Hu
3df2a0c061 gfxstream: update sudbdecode snapshot code
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:17 +00:00
Jason Macnak
524d9b0647 gfxstream: Update codegen after many aemu -> gfxstream changes
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:17 +00:00
Jason Macnak
711606dff4 gfxstream: Update codegen to use gfxstream_common_base
... after ag/32953937.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:17 +00:00
Serdar Kocdemir
5a5810d2f0 gfxstream: Use logging functions for call tracing
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:16 +00:00
Joshua Duong
9bc395fca4 gfxstream: VkDecoder: break from seqno logic when puid dies.
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:16 +00:00
Jason Macnak
30fd362ca7 gfxstream: Update iostream header
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:15 +00:00
Serdar Kocdemir
9ba070a398 gfxstream: Track sparse image related functions
Sparse resources are not commonly available on Android devices
and overriding the functions enables the host to disable the
feature support when needed.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:15 +00:00
Jason Macnak
1d4b4fe8b7 gfxstream: Update to new logging
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
2025-06-04 17:24:14 +00:00
Martin Krastev
f1f684ffa7 svga/ci: return svga piglit job to automatic rules pool
Make svga piglit job extend from vmware automatic (non-manual) rules pool
again. There was an issue with local nginx caching of FDO artifacts, which
led to jobs sporadically timing out on their http-download sections; the
issue has been resolved now.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35341>
2025-06-04 17:04:34 +00:00
Lionel Landwerlin
978933c015 nir/opt_algebraic: extend lowering for (i|u)bitfield_extract
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.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/35334>
2025-06-04 16:28:39 +00:00
Antonio Ospite
9f65081e02 ci/android: use curl -O to avoid having to specify the same filename again
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
dc1502af2e ci/android: use newer cuttlefish images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
088a4b0e23 ci/android: configure both hard limits and soft limits
The soft limits cannot go above the hard limits values, so the hard
limits should be configured too, just in case default limits values set
by the kernel or the init process are too small.

E.g. when booting with `init=/bin/sh` we have:

$ cat /proc/1/limits
Limit                     Soft Limit           Hard Limit           Units
...
Max open files            1024                 4096                 files
...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
859e903004 ci/android: skip org.skia.skqp.SkQPRunner#UnitTest_SurfaceResolveTest
Skip `org.skia.skqp.SkQPRunner#UnitTest_SurfaceResolveTest` when running
the `android-angle-android-cts` job, as it fails sporadically.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Antonio Ospite
0a8fec6c6d ci/android: skip org.skia.skqp.SkQPRunner#UnitTest_BulkTextureRectTest
Skip `org.skia.skqp.SkQPRunner#UnitTest_BulkTextureRectTest` when running
the `android-angle-android-cts` job, as it sometimes fails with memory
related issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:42 +00:00
Guilherme Gallo
cf6f97a224 ci/android: reduce launch_cvd memory limit to 4GB by default
We only have 8GB on the Brya Chromebook used for venus testing, and the
job is unstable because using all the available RAM causes OOM kills.

So reduce launch_cvd memory limit to 4GB by default, still allowing to
change the default by setting the CUTTLEFISH_MEMORY variable in jobs
that might want a different value.

This change has been inspired by CROSVM_MEMORY, but a new variable is
used because technically cuttlefish can also use qemu in some setups,
not only crosvm.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:41 +00:00
Guilherme Gallo
769a4aa34e ci/android: disable errexit in trap function
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:41 +00:00
Guilherme Gallo
16754dbd13 ci/android: Add gitlab section for logs uploads
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Guilherme Gallo
bfca9fbbb3 ci/lava: SSH tweaks
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Antonio Ospite
b16ed16d75 ci: set up XDG_RUNTIME_DIR to be under /tmp which is tmpfs
Set up XDG_RUNTIME_DIR path to be under /tmp.

This might improve speed as /tmp is under tmpfs while the older path
might have been under NFS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35126>
2025-06-04 15:43:40 +00:00
Ashley Smith
c5500cd12f mesa: Add support for GL_EXT_shader_realtime_clock
This is similar to ARB_shader_clock

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34345>
2025-06-04 14:49:00 +00:00
Antonio Ospite
47619ef538 ci/android: silence mesa error about //.cache
Pass XDG_CACHE_HOME=/data/local/tmp to binaries that load mesa
libraries to avoid the following message on the stderr:

  Failed to create //.cache for shader cache (Read-only file system)---disabling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
bdcdfe8b33 ci/android: show also the device name when printing GLES and VK info
This can give an indication in the logs about what driver is being
picked up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:21 +00:00
Antonio Ospite
76a73ba263 ci/android: get only the first device from eglinfo and vulkaninfo
It is possible that `eglinfo` and `vulkaninfo` provide info on multiple
devices.

Consider only the first device, which is going to be the default one
used by other components, when checking the versions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Antonio Ospite
e12aa9a49e ci/android: fix printing the original GLES and Vulkan versions
New mechanisms to retrieve the GLES and Vulkan driver versions have been
introduced in

  - 3029fdde65 (ci/android: Switch to using eglinfo to check GLES implementation, 2025-05-28)
  - 3ba9038648 (ci/android: Check Vulkan driver using vulkaninfo, 2025-05-28)

These mechanisms are more robust than the previous one but they do
change the behavior in that the version is not retrieved by an already
running process (e.g. SurfaceFlinger), but by creating new processes
that load the libraries available on the filesystem.

Because of this change of behavior the original version should be
printed **before** pushing the new libraries to the Android guest, so
that developers are able to compare the old and new versions in the logs.

Moreover, the runtime checks do not answer the original question anymore:

  "what GLES/VK libraries is surfaceflinger currently using?"

but rather new question:

  "what GLES/VK libraries are services going to use when they load?"

So the shell start/stop can very well performed after the version check,
accompanied by a new check on the PID of SurfaceFlinger to be sure that
it has reloaded consequently picking up the new libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35335>
2025-06-04 13:25:20 +00:00
Erik Faye-Lund
57b04e8dfd mesa/main: fix enum errors
This enum shouldn't be allowed in GLES before version 3.1

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:18 +00:00
Erik Faye-Lund
bba7f7d586 mesa/main: fix error-handling for gles1/2
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
89d5447ea6 mesa/main: fix multisample enum checks
These needs proper extension checks on GLES.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
5a5ce75a63 mesa/main: correct error-checks for GL_TEXTURE_2D_MULTISAMPLE_ARRAY
This enum is only valid on GLES when OES_texture_storage_multisample_2d_array
is supported.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:17 +00:00
Erik Faye-Lund
8d97f5d77e mesa/main: add _mesa_has_texture_multisample-helper
This reduces the number of places we need to keep track of what
extensions enables this functionality.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
214fd4e40d mesa/main: fix texture view enum checks
These were a bit of a mixed bag; we had some open-coded cases, and a few
overly permissive code-paths. Anyway, let's stricten this up a bit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:16 +00:00
Erik Faye-Lund
f87f6d9cd4 mesa/main: do not allow desktop enums on gles
These enums aren't allowed on GLES, but we would happily allow them.
Let's fix that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:14 +00:00
Erik Faye-Lund
fcf26c951b mesa/main: clean up invalid pname-check
The logic is a bit easier to follow if we list the cases where this is
supported, rather than the cases where it isn't.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
937e1d55b3 mesa/main: fix ARB_texture_float quirk
While ARB_texture_float is indeed supposed to disable clamping, it
should only do so on the APIs where the extension is supported.
Otherwise, we end up disabling clamping also when using GLES 1.x,
which isn't quite what we want.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
25830434c2 mesa/main: do not allow non-gles1 enums in gles1
These enums are not allowed in GLES1, but would be incorrectly accepted
if running on hardware capable of the functionality even in GLES1. So
let's use the helper that also considers the API, which should fix the
problem.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:13 +00:00
Erik Faye-Lund
879ef152db mesa/main: use _mesa_has_Foo-helpers
These helpers already keep track of what API each extension is available
in. This makes the code easier to read and maintain. Let's use them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:12 +00:00
Erik Faye-Lund
1e4f12d7ac mesa/main: use _mesa_is_desktop_gl_compat-helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:11 +00:00
Erik Faye-Lund
87dda2988b mesa/main: fixup bad indent
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35097>
2025-06-04 12:44:11 +00:00
Iago Toral Quiroga
c059c721fb 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>
2025-06-04 11:50:30 +00:00
David Rosca
e579b982b0 radv/video: Set all pic params for H264 encode refs
Fixes encoding B-frames with I-frame as L1 reference.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35283>
2025-06-04 11:33:02 +00:00
David Rosca
92e99e6169 radv/video: Add radv_enc_h264/5_pic_type
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35283>
2025-06-04 11:33:02 +00:00
Jose Maria Casanova Crespo
e7de2bd086 v3d: Remove struct v3d_surface and create/destroy surface functions
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
5e4b66e226 v3d: Stop calling deprecated util_framebuffer_init
We remove all v3d usages of create_surface hooks.

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

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
680b6d0e9b v3d: Remove separate_stencil from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
46ef49ab55 v3d: Remove internal_type and internal_bpp from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:32 +00:00
Jose Maria Casanova Crespo
735cf1cb78 v3d: Remove padded_height_of_output_image_in_uif_blocks from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:31 +00:00
Jose Maria Casanova Crespo
1fe0327255 v3d: Remove tiling from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:31 +00:00
Jose Maria Casanova Crespo
b3228e0648 v3d: Remove never used offset from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:30 +00:00
Jose Maria Casanova Crespo
c13135f7c3 v3d: Remove rt_format from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:30 +00:00
Jose Maria Casanova Crespo
46b96e0079 v3d: Remove swap_rb logic from v3d_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35288>
2025-06-04 11:18:29 +00:00
Georg Lehmann
1c4070f3e9 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>
2025-06-04 10:49:05 +00:00
Georg Lehmann
eaeaf9554d 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>
2025-06-04 10:49:05 +00:00
Jose Maria Casanova Crespo
27279b2cbe vc4: Remove struct vc4_surface and create/destroy surface functions
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
ba950f9556 vc4: Stop calling deprecated util_framebuffer_init
We remove all vc4 usages of create_surface hooks.

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

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
40f3dac716 vc4: Remove tiling from vc4_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:50 +00:00
Jose Maria Casanova Crespo
51bc2e607f vc4: Remove offset from vc4_surface
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35278>
2025-06-04 10:31:49 +00:00
Lionel Landwerlin
79498a0849 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>
2025-06-04 10:10:38 +00:00
Samuel Pitoiset
226b0e28db nir: generalize bitfield insert/extract sizes
Original patch from Alyssa Rosenzweig

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35209>
2025-06-04 09:37:53 +00:00
Samuel Pitoiset
2474118a06 spirv: disable mediump for bitfield insert/extract
This prevents a regression with the next change that generalizes
bitfield insert/extract sizes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35209>
2025-06-04 09:37:53 +00:00
Samuel Pitoiset
098c15bfc9 radv: use paired shader registers for graphics on GFX12
Loosely based on RadeonSI.

This is supposed to be faster because parsing the packet header seems
to be the main bottleneck on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35282>
2025-06-04 09:17:51 +00:00
Samuel Pitoiset
c8b3c92a3e radv: add macros for paired shader 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/35282>
2025-06-04 09:17:51 +00:00
Samuel Pitoiset
c8f9e0fb05 radv: add a new dirty state for emitting tess user SGPRs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35282>
2025-06-04 09:17:51 +00:00
Georg Lehmann
c27cdaac70 radv: expose scalarBlockLayout on GFX6
Scalar block layout doesn't allow anything that our memory load/store vectorizer
couldn't create on its own. So I assume whatever reason there was to only
expose this feature on GFX7+ was incorrect or ended up being fixed.

Passes vkcts in CI on tahiti.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35279>
2025-06-04 08:49:57 +00:00
Samuel Pitoiset
c26c9c6296 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>
2025-06-04 09:25:18 +02:00
Karol Herbst
fa94b1b29c rusticl: check the returned pointer of mmap
Prior Linux 4.17 MAP_FIXED_NOREPLACE might not be respected and might
return a pointer different than the requested one.

Fixes: da4de8d7e3 ("rusticl: add support for coarse-grain buffer SVM")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35286>
2025-06-04 06:28:39 +00:00
Karol Herbst
9b28067b59 rusticl: move unmap out of debug_assert_eq statement
Fixes: da4de8d7e3 ("rusticl: add support for coarse-grain buffer SVM")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35286>
2025-06-04 06:28:39 +00:00
Karol Herbst
931ec3e954 rusticl: fix compilation on non Linux systems
Thanks to @jbeich to validate this on FreeBSD!

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13278
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35286>
2025-06-04 06:28:39 +00:00
Lionel Landwerlin
a51d061c00 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>
2025-06-04 06:08:26 +00:00
Caio Oliveira
2bb9b94c4c brw/disasm: Don't print src1 information for SEND gather
There's always only the ARF scalar register source, so don't
bother printing other information that won't be used.  Matches
the assembler code.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35297>
2025-06-03 22:52:39 +00:00
Mauro Rossi
7e523b4400 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>
2025-06-03 22:01:01 +00:00
Mauro Rossi
9fd6bae3c4 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>
2025-06-03 22:01:01 +00:00
Mauro Rossi
4aafb5fcc3 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>
2025-06-03 22:01:01 +00:00
Caio Oliveira
542836afe5 intel: Don't require dpas_intel src2 to match destination
With upcoming configurations, the number of elements in the src2
slice might not match the destination.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35301>
2025-06-03 21:31:23 +00:00
Eric Engestrom
b83f406c91 ci: inline the only anchor reference that was on its own line
The way yaml works, this makes no difference in practice, it's just to be more consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285>
2025-06-03 20:58:51 +00:00
Eric Engestrom
50dbb6c31a ci: improve explanation of the pre-merge/merge-request pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285>
2025-06-03 20:58:51 +00:00
Eric Engestrom
f2f8a1cb3e ci: improve name of merge-request pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285>
2025-06-03 20:58:50 +00:00
Eric Engestrom
730c938a46 ci: improve name of fork pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285>
2025-06-03 20:58:50 +00:00
Eric Engestrom
f29524c1de ci: improve names of push-to-upstream-{default,staging}-branch pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35285>
2025-06-03 20:58:50 +00:00
Marek Olšák
942b565f34 mesa: strengthen the condition that triggers generating VS with edge flags
Check the cull face state to see if polygon mode has any effect.
It could happen that polygon mode is GL_LINE, but that face is always
culled, in which case polygon mode has no effect, thus edge flags
have no effect either.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35314>
2025-06-03 19:49:21 +00:00
Mike Blumenkrantz
d8a6ec5985 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>
2025-06-03 18:57:23 +00:00
Connor Abbott
723a1fabac 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>
2025-06-03 18:34:05 +00:00
Mary Guillemard
946bbd8b2f panvk: Enable vertexPipelineStoresAndAtomics on ANGLE for v13+
ANGLE requires VK_EXT_transform_feedback or vertexPipelineStoresAndAtomics
to enable OpenGL ES 3.1 support. As we currently don't support this extension,
we enable support for vertexPipelineStoresAndAtomics via DRICONF
to allow XFB emulation on hardware without speculative behaviors around vertices (v13+).

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>
2025-06-03 14:28:06 +00:00
Mary Guillemard
d7f21cd9c6 pan/bi: Lower VS atomics direct output store to only exec in one stage when possible
Atomics and memory write on the vertex stage have implementation-defined
behaviors on how many invocations will happen. However for some reasons,
atomic counters on GL/GLES specs are quite ambigous here and even have tests
counting how many invocations have been made on VS.... This pass detects
atomics that result in a direct store output of one specific IDVS stage and
ensure it's only executed for said stage.

This allows "dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.*" to
pass under panvk+ANGLE.

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>
2025-06-03 14:28:06 +00:00
Mary Guillemard
4100f1d08a 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>
2025-06-03 14:28:06 +00:00
Mary Guillemard
f1ba807099 panforst: Update ForEachMacros for pan/bi
We have various clang-format issues around those nir macros in
bifrost_compile.c.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34758>
2025-06-03 14:28:06 +00:00
Valentine Burley
5b60cae2af ci/android: Make android-runner scripts safe for set -u
Also make having VK_DRIVER set mandatory for Cuttlefish.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35277>
2025-06-03 13:58:11 +00:00
Mary Guillemard
a6de893b60 panvk: Expose 2 queues on v10+
This works out of the box.

We could have more (up to 127) but this cause timeouts on
"dEQP-VK.api.device_init.create_device_various_queue_counts.basic" and
realistically we only need 2 for Android 14+ HWUI framework.

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/35310>
2025-06-03 13:35:14 +00:00
Karol Herbst
4f5ce2d5aa 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>
2025-06-03 13:14:31 +00:00
Juan A. Suarez Romero
d30a6f8102 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>
2025-06-03 11:21:14 +00:00
Juan A. Suarez Romero
2cac70558d 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>
2025-06-03 11:21:14 +00:00
Karol Herbst
9e3f190e2e rusticl/kernel: rework unsafe block inside clSetKernelArg
No functional change

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35305>
2025-06-03 11:04:45 +00:00
Karol Herbst
f663e3330c 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>
2025-06-03 11:04:45 +00:00
Karol Herbst
868ae6a262 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>
2025-06-03 11:04:45 +00:00
Samuel Pitoiset
94a4ba5b4d radv/ci: bump the timeout for radv-polaris10-vkcts
Looks like it's actually also affected by the memory explosion caused
by zerovram alloc by default in AMDGPU. Though it's very random,
sometimes the job will finish in 40 minutes, sometimes it needs more
than 1h15m. Let's bump the timeout because it's a post-merge job.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35157>
2025-06-03 10:18:30 +00:00
Samuel Pitoiset
61ca95fa67 ci: uprev VKCTS main to f66e0ae866117f3d7375763bf5ec194404d88cdb
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/35157>
2025-06-03 10:18:30 +00:00
Rhys Perry
dd45bf5bce nir/load_store_vectorize: stabilize entry sort
I think this was unlikely to cause issues, even if the qsort()
implementation is unstable.

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/35255>
2025-06-03 09:45:01 +00:00
Rhys Perry
397920c16e nir: fix left shift of negative value in ibfe constant folding
Fixes "left shift of negative value -128" with parallel_rdp/00f93a9497dfbb3b
and UBSan.

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/35255>
2025-06-03 09:45:01 +00:00
Rhys Perry
78aae4b1ba nir: fix signed overflow in pack_half_2x16 constant folding
Without this cast, the left shift is promoted to 'int'.

Fixes "left shift of 50432 by 16 places cannot be represented in type 'int'"
with horizon_zero_dawn/001064f580f8e3be and UBSan.

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/35255>
2025-06-03 09:45:01 +00:00
Rhys Perry
2e82f481ca radv: fix too large shift exponent in radv_remove_color_exports
"shift exponent 1020 is too large for 32-bit type 'unsigned int'" with
madmax/25b8180e05220b8c and UBSan

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/35255>
2025-06-03 09:45:01 +00:00
Rhys Perry
6852538ba0 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>
2025-06-03 09:45:01 +00:00
Valentine Burley
817c14cc7c ci/lava: Only deploy kernel-modules when needed
Not all LAVA jobs appear to require kernel modules, so only apply the
kernel-modules overlay when HWCI_KERNEL_MODULES is explicitly set.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35129>
2025-06-03 07:27:26 +00:00
Valentine Burley
3a0cc0ee0d ci: Use zstd compressed kernel modules
Change how we package kernel modules: instead of storing them in
.tar.zst archives with uncompressed .ko files inside, we now compress
each .ko file individually with ZSTD and bundle them into a plain tar
archive.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35129>
2025-06-03 07:27:26 +00:00
Faith Ekstrand
347e957b44 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>
2025-06-03 07:02:36 +00:00
Georg Lehmann
a6675f35b2 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>
2025-06-03 06:34:18 +00:00
Marek Olšák
bf2ed20eb9 nir: remove unused nir_io_semantics::invariant
Acked-by: Alyssa on IRC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35256>
2025-06-02 23:08:58 +00:00
Marek Olšák
44fcda9631 nir/opt_clip_cull_const: support GS
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35256>
2025-06-02 23:08:58 +00:00
Marek Olšák
6677d087c0 nir/xfb_info: add new fields to describe 16-bit XFB better
for drivers that need this information

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35256>
2025-06-02 23:08:58 +00:00
Marek Olšák
7b70b419b5 nir: always index SSA defs before printing
This makes the output more readable.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35256>
2025-06-02 23:08:58 +00:00
Marek Olšák
cf94ae8544 nir: change the type of shader_info::patch_* fields to 32 bits
Patch outputs only use 32 bits.

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/35256>
2025-06-02 23:08:58 +00:00
Ryan Mckeever
b69dcd8d33 panvk: Enable VK_EXT_load_store_op_none
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32915>
2025-06-02 22:01:11 +00:00
Mike Blumenkrantz
a7e61f95b8 zink: delete zink_ctx_surface
finally the nightmare is over

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
1d1ca611be zink: don't fixup depth buffer if it's already big enough
the zs buffer doesn't have to exactly match the size of the framebuffer,
it just has to be "big enough"

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
3dc8d81332 zink: delete zink_ctx_surface::needs_mutable
this was some awfulness required because previously pipe_surface objects
could be created from a different thread, but now they are only ever created
by the driver

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
8ad4b07c38 zink: delete zink_ctx_surface::transient
this untangles a lot of code and makes surfaces very nearly comprehensible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
92d76f16ed zink: delete another pipe_surface from msaa replicate
this was never used anyway

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
92f4d506d7 zink: remove some trivial transient surface references in rt init
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
ad5a115246 zink: slightly rework transient surface/image handling
this was a big nightmare because of how the pipe_surface object worked,
but now it's more possible to move the backing multisampled image
onto the base resource and reuse the 'valid' flag instead of the special
surface one for transients

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Mike Blumenkrantz
4f81f121e6 zink: remove a pipe_surface from blitting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35240>
2025-06-02 20:51:47 +00:00
Alyssa Rosenzweig
e5e91887cf asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35295>
2025-06-02 20:34:32 +00:00
Alyssa Rosenzweig
49564786f7 asahi: drop dead surface stuff
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35295>
2025-06-02 20:34:32 +00:00
Calder Young
6f28364541 intel_aux_map: Avoid creating new table pages when removing
Fixes #13241, where iris_bufmgr occasionally deadlocks while allocating buffers.

The deadlock happens when iris_bufmgr.c calls intel_aux_map_unmap_range while
holding the bufmgr lock, with a range that includes pages that were never created,
which can happen because the iris_resource that adds aux mappings will sometimes
use a slightly larger buffer with an offset to ensure the resource is aligned
correctly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35266>
2025-06-02 20:10:49 +00:00
Natalie Vock
dac6f09451 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>
2025-06-02 19:52:51 +00:00
Natalie Vock
6628ac8ad9 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>
2025-06-02 19:33:18 +00:00
Jordan Justen
d84d7b78e4 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>
2025-06-02 11:36:25 -07:00
Jonathan Gray
ca33127652 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>
2025-06-02 17:51:56 +00:00
Mike Blumenkrantz
e0641fdac7 zink: fix ZINK_RENDERDOC=all
the intent of this option is to create a single capture for the lifetime
of the app, which is great for unit test debugging, and this instead
created a capture for every queue submission, which is a nightmare

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35292>
2025-06-02 17:34:04 +00:00
Mike Blumenkrantz
cb6dfc4169 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>
2025-06-02 17:34:04 +00:00
Eric Engestrom
f611fb4af9 svga/ci: fix indentation
The list of files is _inside_ `changes:`, not alongside it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35289>
2025-06-02 17:15:18 +00:00
Eric Engestrom
0c5fa54b5b svga/ci: fix job stages
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35289>
2025-06-02 17:15:18 +00:00
Mike Blumenkrantz
a321b3207c util/dd: delete surface object hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
ddef6be19a noop: delete surface object hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
bbc4a2d2d9 aux/trace: delete surface object hooks
should never be used

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
0100e44a8c util/tc: delete surface hooks
these should never be called from a frontend now

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
94979fec2c vl: delete a missed pipe_surface_reference usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
06cf5794b1 vdpau: de-pointerize surfaces
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
b36fba19cc va: remove one more pipe_surface object
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
5607797743 d3d10umd: update to latest pipe_surface changes
does it work? nobody knows!

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
561fed955b 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>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
3ecec254a7 util/tc: fix surface refcounting (by deleting it)
missed this in earlier series

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
11a3f2f3d1 lavapipe: kill off pipe_surface objects
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
db500d4a56 gallium: kill off pipe_surface_unref_no_context()
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
718e277ab5 util/surface: delete more pipe_context::create_surface usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
2d9f5d3bcd util/debug: delete more pipe_context::create_surface usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Mike Blumenkrantz
b92b67c941 util/blitter: delete more pipe_context::create_surface usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35236>
2025-06-02 16:49:32 +00:00
Caterina Shablia
b81359ec84 panvk: bump maxPushConstantSize to 256
Vulkan 1.4 raises the minimum for maxPushConstantSize to 256, and given
that we intend on supporting 1.4 eventually and the change is very simple
might as well do it now.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35191>
2025-06-02 16:21:34 +00:00
Caterina Shablia
c6f19e87ac panvk: ensure we don't go over the hardware FAU limit
All the Malis in existence out there support at most 64 user-supplied FAUs.

Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35191>
2025-06-02 16:21:34 +00:00
Faith Ekstrand
c37bcd43fc nvk: Claim shaderUniformBufferArrayNonUniformIndexingNative
"Native" is relative for UBOs.  On the one hand, we don't loop in the
shader for non-uniform UBO access ever.  On the other hand, uniformity
does affect UBOs on Turing since we can only use bindless UBOs if the
handle (and therefore the loaded descriptor) are uniform.  But if it's
non-uniform, we fall back to ld.constant which is pretty fast.  On
Volta and earlier where we don't have bindless UBOs, we use ld.uniform
or ld.ci which are just as fast uniform as non.  On all hardware,
non-constant UBO indexing prevents cbuf promotion so that's always
slower no matter what.

The moral of the story is that "native" non-uniform for UBOs is a
nonsense anyway and we should just set NonUniformIndexingNative so we
don't scare apps into doing something silly.  The proprietary driver
claims native non-uniform UBOs as well.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35268>
2025-06-02 16:04:05 +00:00
Faith Ekstrand
a8b309f1cf nvk: Run nir_opt_non_uniform_access for UBOs on Turing+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35268>
2025-06-02 16:04:05 +00:00
Faith Ekstrand
7690d35aaa nvk: Rework non-uniform access lowering
The UBO lowering did nothing because nir_lower_non_uniform_access
doesn't handle load_deref.  For texture and storage image lowering,
nir_lower_non_uniform_access handles bindless handles just as well as
derefs.  For textures, it's probably better this way anyway because we
combine the image and sampler into a single handle in
nvk_nir_lower_descriptors() and this way nir_lower_non_uniform_access()
will generate a loop on a single 32-bit handle instead of multiple array
indices.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35268>
2025-06-02 16:04:05 +00:00
Faith Ekstrand
6bea7caddb nvk/lower_descriptors: Drop buffer_address_to_ldcx_handle()
It's a remnant of older bindless cbuf attempts and is never called.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35268>
2025-06-02 16:04:05 +00:00
Collabora's Gfx CI Team
64a3ab35a9 Uprev Piglit to 685ea49b47ae52560975cfcdb0ea0d4d27fead16
c32e5cc717...685ea49b47

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35223>
2025-06-02 15:39:02 +02:00
Collabora's Gfx CI Team
87b74c6146 Uprev ANGLE to b1359277066648c3577ea8b57cc5e0bccee7b6cc
ec4d8f8e4d...b135927706

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35223>
2025-06-02 15:39:02 +02:00
Rhys Perry
1fdfdbaf92 aco/hard_clauses: simplify and complete get_type()
This now includes image_msaa_load and the new atomic instructions in
GFX12.

It also treats point sample accelerated MIMG as either sample or load,
like the waitcnt insertion pass. I'm not sure if that's necessary or not,
though.

No fossil-db changes (gfx1201, gfx1150 and navi31).

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/35235>
2025-06-02 10:28:10 +00:00
Rhys Perry
8764ec0230 aco: consider image_msaa_load a sample operation before gfx12
LLVM commit 62dea99a7d7df9daedbb86133f3d46699cd2728d made this instruction
a sample for all GFX levels, then with f898161bfa95723954a273a519180e070a5ccd2e
it was changed to be GFX12+. Now 34b6285735c999d2fab77b0ff8e5b497d86df3af
changed it to be all GFX levels again.

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/35235>
2025-06-02 10:28:09 +00:00
David Rosca
960f63596f radv/video: Add VCN5 encode support
New with VCN5 is separate reference images support.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35261>
2025-06-02 09:30:30 +00:00
David Rosca
4a3b3febda radv/video: Enable decode on VCN5
No differences from VCN4 for tier2.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13118
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35261>
2025-06-02 09:30:30 +00:00
David Rosca
25f7996395 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>
2025-06-02 09:30:30 +00:00
David Rosca
ef305f3875 radv: Use RADEON_SURF_VIDEO_REFERENCE for video DPB images
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35261>
2025-06-02 09:30:30 +00:00
Samuel Pitoiset
47f5d25f93 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>
2025-06-02 07:30:18 +00:00
Karol Herbst
ad08dc9549 llvmpipe remove llvmpipe_screen::allow_cl
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35275>
2025-06-02 07:13:54 +00:00
Valentine Burley
3ba9038648 ci/android: Check Vulkan driver using vulkaninfo
Add a step to detect the active Vulkan driver by parsing `vulkaninfo`.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35232>
2025-06-02 06:27:31 +00:00
Valentine Burley
3029fdde65 ci/android: Switch to using eglinfo to check GLES implementation
In newer Android versions, SurfaceFlinger uses Vulkan by default,
so `dumpsys SurfaceFlinger` no longer reveals the GLES implementation.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35232>
2025-06-02 06:27:31 +00:00
Maíra Canal
9e4e8542d4 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>
2025-06-02 06:10:16 +00:00
Robert Mader
afd6788036 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>
2025-06-02 04:36:48 +00:00
Robert Mader
ba1bd9aed8 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>
2025-06-02 04:36:48 +00:00
Karol Herbst
7cd1f645de include: remove C++ OpenCL headers
We don't use them and will therefore be always out of date. They live in
a seperate reposity at https://github.com/KhronosGroup/OpenCL-CLHPP.

And since distributions can't rely on us to install OpenCL headers there
is no advantage in keeping them around in our repo.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35228>
2025-06-01 22:15:49 +00:00
Sviatoslav Peleshko
0e3e5146cf 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>
2025-06-01 17:37:10 +00:00
Mel Henning
aae67ab678 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>
2025-05-31 01:04:43 +00:00
Faith Ekstrand
9b94ec30b6 nak/sm50: Use ld.ci for constant loads
This matches what CUDA does.  This makes Unigine Heaven go about 4x
faster on my GTX 750 Ti when run with NVK_DEBUG=no_cbuf (to force all
UBO loads down the global memory path).

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35265>
2025-05-31 00:50:13 +00:00
Faith Ekstrand
fb3125c4e3 nak/sm50: Encode cache ops on Maxwell
We just sort of YOLO'd it before, with no real plan.  But it passed all
the tests so it never cared.  It turns out the cache ops on Maxwell are
mostly the same as the ones we already added to Kepler, we just need to
encode them.  The only big difference is that we no longer need to avoid
the L1 cache on Maxwell as it's either coherent or disabled in hardware
for global memory (I don't know which).

The only substantive change this MR makes is that images are now using
.ca by default rather than .cg.  However, this is the same choice we're
currently making for global access and it still passes all the memory
model tests so it should be okay.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35265>
2025-05-31 00:50:13 +00:00
Faith Ekstrand
a3b4401fe6 nak: Handle MemScope::System on Kepler
We never actually create any MemScope::System instructions anymore, but
it's worth handling it now just so we don't forget.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35265>
2025-05-31 00:50:13 +00:00
Faith Ekstrand
81b6aece17 nak: Print cache ops on suldga and sustga
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35265>
2025-05-31 00:50:13 +00:00
Faith Ekstrand
a0391b92bb nak: Plumb the ShaderModel through to Ld/StCacheOp::select()
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35265>
2025-05-31 00:50:13 +00:00
Guilherme Gallo
05c2c748db ci/build: Remove CPP_ARGS var duplication
This variable appeared twice in debian-testing-msan, removing the first
one because it is probably being overridden by the second one.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35251>
2025-05-30 21:05:45 +00:00
Guilherme Gallo
0a63e324a5 ci/panfrost: Reuse file list YAML anchors
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35251>
2025-05-30 21:05:45 +00:00
Mel Henning
295373f29f nak: Implement nir_intrinsic_reduce with REDUX
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34912>
2025-05-30 19:28:01 +00:00
Mel Henning
b165c07b38 nak: Add OpRedux
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34912>
2025-05-30 19:28:01 +00:00
Mel Henning
12b903d384 nak: lower_scan_reduce after divergence analysis
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34912>
2025-05-30 19:28:01 +00:00
Mel Henning
a3839dbb90 nak: Change divergence analysis pass order
Always convert to lcssa before divergence analysis

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34912>
2025-05-30 19:28:01 +00:00
Mel Henning
666bad5d22 nak: Always run nak_nir_mark_lcssa_invariants
We're about to change the way that lcssa is constructed, and we won't
be able to conclude that there are no lcssa phis based on this pass'
progress.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34912>
2025-05-30 19:28:01 +00:00
Mel Henning
018f4f1c27 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>
2025-05-30 18:29:00 +00:00
Faith Ekstrand
c39bf7e7f9 nvk: Don't use INVALIDATE_TEXTURE_DATA_CACHE_NO_WFI on Kepler
It exists in the headers but it doesn't seem to work properly.  Even
doing a separate WFI right before it doesn't help.

Acked-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35246>
2025-05-30 17:38:39 +00:00
Faith Ekstrand
9458dd606e nak/sm20: pixld has a predicate destination
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35246>
2025-05-30 17:38:39 +00:00
Jesse Natalie
b25e430700 microsoft/compiler: Cast one enum to another instead of to int to resolve warning
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35247>
2025-05-30 17:04:18 +00:00
Jesse Natalie
ae3c495de1 formats: Cast enum to int before shifting
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35247>
2025-05-30 17:04:18 +00:00
Jesse Natalie
f0dde6ca7f nir_gather_output_deps: Fix incorrect enum in switch
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35247>
2025-05-30 17:04:18 +00:00
Brian Paul
f29d939824 svga: rework framebuffer state
Create svga_framebuffer_state as a subclass of pipe_framebuffer_state.
This contains pointers to svga_surface objects which correspond to
pipe_framebuffer_state's surfaces.

Replace pipe_surface with svga_surface in many functions.

Stop using deprecated util_framebuffer_init() function.

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

Signed-off-by: Brian Paul <brian.paul@broadcom.com>x
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
Brian Paul
b7774effbf svga: asst. clean-ups in svga_surface.c
- whitespace fixes
- move var decls
- add const qualifiers

No functional changes.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
Brian Paul
24a57350eb svga: whitespace clean-ups in svga_screen_cache.h
Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
Brian Paul
ce70baeef3 gallium/util: minor clean-ups in u_framebuffer.c
Replace tabs w/ spaces, move vars.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
Brian Paul
64da531799 svga: remove unneeded assignments in svga_set_framebuffer_state()
The util_copy_framebuffer_state() function copies the width, height,
nr_cbufs fields.

Also move a loop variable.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
Brian Paul
dac04694b2 svga: handle NULL surface in svga_surface_needs_propagation()
To avoid null checks at the call sites.

Signed-off-by: Brian Paul <brian.oaul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
Brian Paul
e6058e5ab0 svga: 80-column wrapping and misc code cleanups
No functional changes.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
2025-05-30 16:40:56 +00:00
David Rosca
3bb9905e7f 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>
2025-05-30 16:17:42 +00:00
Guilherme Gallo
e942d1e9e4 bin/ci: crnm: Sanitize n_colums value
The number of columns should never be less than 1, otherwise we can
break the script such as:

```
Traceback (most recent call last):
  File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 734, in <module>
    main()
  File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 713, in main
    target_job_id, ret, exec_t = monitor_pipeline(
                                 ^^^^^^^^^^^^^^^^^
  File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 221, in monitor_pipeline
    cancel_jobs(project, to_cancel)
  File "/var/home/guilherme/projects/mesa/bin/ci/ci_run_n_monitor.py", line 400, in cancel_jobs
    print_formatted_list(cancelled_jobs, indentation=8)
  File "/var/home/guilherme/projects/mesa/bin/ci/gitlab_gql.py", line 373, in print_formatted_list
    step = (len(elements) // n_columns) + 1
            ~~~~~~~~~~~~~~^^~~~~~~~~~~
ZeroDivisionError: integer division or modulo by zero
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35250>
2025-05-30 13:15:37 +00:00
Yao Zi
b1d81a7df1 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>
2025-05-30 12:48:18 +00:00
Juan A. Suarez Romero
f340990fcb v3dv: don't use deprecated NIR_PASS_V macro
Check more details at
https://gitlab.freedesktop.org/mesa/mesa/-/issues/10409.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35127>
2025-05-30 14:24:24 +02:00
Juan A. Suarez Romero
5505bb6c6d v3d/compiler: don't use deprecated NIR_PASS_V macro
We still keep it for the case of nir_scheduling, as this pass requires
to be adapted to return the progress as well as update the metadata.

Check more details at
https://gitlab.freedesktop.org/mesa/mesa/-/issues/10409.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35127>
2025-05-30 14:24:24 +02:00
Juan A. Suarez Romero
62ba0d7bf8 vc4: don't use deprecated NIR_PASS_V macro
Check more details at
https://gitlab.freedesktop.org/mesa/mesa/-/issues/10409.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35127>
2025-05-30 14:24:24 +02:00
Juan A. Suarez Romero
b5706ef70a vc4: return progress on custom nir lowering
Report if the vc4 specific NIR lowering did any progress.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35127>
2025-05-30 14:24:24 +02:00
David Rosca
a9a54632af 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>
2025-05-30 08:54:31 +00:00
David Rosca
8f4e251c98 radeonsi/vcn: Support disabling HEVC dependent slice segments
With older FW this needs to be always enabled, but it can now be
disabled when using the new separate header instructions for
dependent_slice_segment_flag and slice_segment_address.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35072>
2025-05-30 08:29:53 +00:00
David Rosca
09a1429a00 radeonsi/vcn: Remove carrizo workaround
Carrizo has UVD so this can never be true.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35072>
2025-05-30 08:29:53 +00:00
David Rosca
f17ea8e901 radeonsi/vcn: Get rid of not_referenced
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35072>
2025-05-30 08:29:52 +00:00
Jesse Natalie
47f4d3e701 d3d12: Handle a null threaded context
When GALLIUM_THREAD=0, the threaded context doesn't get created and
the following lines would fault.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35248>
2025-05-30 02:19:26 +00:00
Jesse Natalie
0c0f6c6df1 d3d12: Handle sampler view creation on B8G8R8X8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35142>
2025-05-30 01:24:10 +00:00
Jesse Natalie
f5781553f6 winsys/d3d12: Support no-alpha formats through the DXGI swapchain path
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35142>
2025-05-30 01:24:10 +00:00
Eric R. Smith
548f652d10 panfrost, panvk: spread hierarchy mask bits out when max_levels < 8
We create hierarchy masks based on the number of levels available,
creating a bitmask with `max_levels` bits set. Originally these bits
all came together. Modify this to spread the bits out, which improves
performance on chips like the G31 with only 2 levels of hierarchy.

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>
2025-05-29 21:50:54 +00:00
Eric R. Smith
13b35a3c9c 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>
2025-05-29 21:50:52 +00:00
Faith Ekstrand
2e85076b1d nak: Set cache ops on surface load/store ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35217>
2025-05-29 21:02:37 +00:00
Faith Ekstrand
ad98b76a14 nak: Set cache ops on global memory access on Kepler
For now we leave shared and local alone on SM32 (there are no such
controls on SM20).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35217>
2025-05-29 21:02:37 +00:00
Faith Ekstrand
a7760e4bd8 nak: Set MemOrder::Constant for CAN_REORDER image loads on all hardware
On Turing and Volta, it will safely degrade suld.weak.  On Maxwell and
Pascal, it will degrade to suld.cta.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35217>
2025-05-29 21:02:37 +00:00
Faith Ekstrand
d3b9752ee6 nak/sm50: Use MemScope::CTA for constant image loads
Using MemScope::System synchronizes with everything, which is exactly
what we don't want for constant loads.  This is currently a no-op
because we aren't using MemScope::Constant pre-Ampere yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35217>
2025-05-29 21:02:37 +00:00
Faith Ekstrand
6ea0e91c99 nak: Handle suld.constant on Turing and Volta in legalization
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35217>
2025-05-29 21:02:37 +00:00
Lionel Landwerlin
f0e18c475b intel: remove GRL/intel-clc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35227>
2025-05-29 20:17:13 +00:00
Mike Blumenkrantz
44bff7eb05 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>
2025-05-29 15:25:04 -04:00
Mel Henning
6c68c2c3ba 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35143>
2025-05-29 18:30:40 +00:00
Mel Henning
0e5880ebe4 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>
2025-05-29 18:30:40 +00:00
Mike Blumenkrantz
d8d913c341 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>
2025-05-29 13:18:23 -04:00
Faith Ekstrand
cfeda2d8ae nvk: Disallow GetMemoryFdProperties with OPAQUE_FD_BIT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35213>
2025-05-29 11:53:27 -04:00
Faith Ekstrand
601cf33c44 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>
2025-05-29 11:53:27 -04:00
Faith Ekstrand
77eba0980b nvk: Don't assert memory placement on import
Instead, we assert that the non-placement flags match, which is
currently CAN_MAP and SHARED.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35213>
2025-05-29 11:53:27 -04:00
Faith Ekstrand
bf82c94751 nvk/nvkmd: Add a force_mem_to_gart() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35213>
2025-05-29 11:53:27 -04:00
Mike Blumenkrantz
05f8b59c90 gallium: delete union pipe_surface_desc
this is no longer used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35168>
2025-05-29 13:07:02 +00:00
Mike Blumenkrantz
ca65f2cf1c gallium: delete pipe_surface::writable
no longer used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35168>
2025-05-29 13:07:02 +00:00
Samuel Pitoiset
9692ef41a3 aco: implement bitfield_extract for 8-bit/16-bit
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35199>
2025-05-29 12:24:59 +00:00
Daniel Stone
80e19e7b1e ci: Bump v6.14 kernel for updated Panthor scheduler
Apply a newer version of the Panthor scheduling timeout fix from the
list.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35230>
2025-05-29 12:05:06 +01:00
Karmjit Mahil
688d8217a5 tu,freedreno: Add pkt_field_{get,set} helper macro
It's very common needing to extract or overwrite a certain field
in an already packed register value, so add macros to do that
instead of manually doing that each time.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35088>
2025-05-29 10:54:28 +01:00
Danylo Piliaiev
398f14ca3d freedreno: Use fast variants of {BC4/BC5}_SNORM formats
Hardware has two types of BC4 and BC5: fast and not.
The exact perf difference is not tested, but these distinct formats
could be seen in the public docs:
Qualcomm Adreno GPU > Spec Sheet -> Texture format
https://docs.qualcomm.com/bundle/publicresource/topics/80-78185-2/spec_sheets.html?product=1601111740035277#panel-0-0-1

Found when scanning prop driver's cmdstream seeing unknown format.

Passes:
dEQP-VK.*bc4*
dEQP-VK.*bc5*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33945>
2025-05-29 09:01:17 +00:00
Eric Engestrom
5a5b00cfca ci: drop unneeded printing of pass/fail alongside the exit_code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35214>
2025-05-29 07:29:25 +00:00
Samuel Pitoiset
fe2c93a788 ac/nir: enable 64-bit lowering for bitfield_extract
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35187>
2025-05-29 08:45:41 +02:00
Samuel Pitoiset
cecf6675be nir/lower_int64: add bitfield_extract lowering
This will be used by RADV for ACO/LLVM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35187>
2025-05-29 08:45:40 +02:00
Olivia Lee
104ea2e4cf 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>
2025-05-29 01:50:31 +00:00
Olivia Lee
bed54fa402 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>
2025-05-29 01:50:31 +00:00
Yiwei Zhang
749265da0d vulkan/wsi: split cmd record for img2buf blit and img2img blit
There's no behavior change, but to prepare for the next img2buf blit
improvement, except adding asserts to make clear of the existing blit
code paths.

v2: use switch with unreachable default per @gfxstrand has suggested

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35220>
2025-05-29 01:20:27 +00:00
Yiwei Zhang
2af2314fb2 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>
2025-05-29 01:20:27 +00:00
Pohsiang (John) Hsu
79bc373b1e mediafoundation: move readme.md to docs folder
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35219>
2025-05-29 01:03:34 +00:00
Pohsiang (John) Hsu
0107d94632 mediafoundation: add mechanism to disable async and h.264 unwrapped POC (commented out for now) according to gpu/version
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35219>
2025-05-29 01:03:34 +00:00
Pohsiang (John) Hsu
061085708a mediafoundation: on use LTR, synchronize the active ltr bitmap to the one passed in
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35219>
2025-05-29 01:03:34 +00:00
Pohsiang (John) Hsu
22d84522ed mediafoundation: get device vendor id, device id, and driver version
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35219>
2025-05-29 01:03:34 +00:00
Pohsiang (John) Hsu
5ee854c4eb mediafoundation: add ETW event for perf analysis
Add perf ETW events using TraceLogging API, the following are adding:

- MFT receives fence (FenceCompletion).
- MFT has output MFSample (METransformHaveOutput).
- MFT calls to pipe end_frame (PipeEndFrame) -- bracketed.
- MFT calls to pipe flush (PipeFlush) -- bracketed.
- MFT submits a frame to pipe (PipeSubmitFrame) -- bracketed from begine_frame to encode_bitstream/encode_bitstream_sliced
- MFT processinput (ProcessInput) -- bracketed
- MFT processoutput (ProcessOutput) -- bracketed

The ETW provider(s) are:

- H264Enc: 0000e264-0dc9-401d-b9b8-05e4eca4977e
- H265Enc: 0000e265-0dc9-401d-b9b8-05e4eca4977e
- AV1Enc:  0000eaa1-0dc9-401d-b9b8-05e4eca4977e

Note that the provider is mostly the same as the WPPTrace provider for each codec, with the additional 'e' (e.g. 0000e264 vs 00000264)

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35219>
2025-05-29 01:03:34 +00:00
Lucas Stach
a8009e7c11 etnaviv: move TS allocation to resource allocation
Allocate TS together with the tracked resource, which gets rid
of the resource mutation on surface creation and the diversion
between the interal and shared TS handling.

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/34488>
2025-05-29 00:48:07 +00:00
Lucas Stach
83ab7a8d58 etnaviv: add resource render compatible check
Untangle the convoluted render compatible check from
etna_render_handle_incompatible to make it easier to read and move it
into a separate function so it can be reused from other callers.

As this is intended to be called also at resource creation time, where
we don't know the exact level of the resource that might be rendered to,
the stride check for linear resources is made a bit more conservative by
checking that the last level (the one with the smallest stride) still
meets the render target stride alignment requirement.

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/34488>
2025-05-29 00:48:07 +00:00
Lucas Stach
4717022cb0 etnaviv: drop ts_offset from etna_surface
TS is only allocated for single layer surfaces, so there is no need to
cache a ts_offset taking into account the layer offset in etna_surface.

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/34488>
2025-05-29 00:48:07 +00:00
Lucas Stach
50940ce393 etnaviv: don't pretend to support TS for array or 3D textures
etna_screen_resource_alloc_ts is only called for textures that have a
single layer and slice, as we don't want to duplicate the driver side
TS tracking information per layer or depth slice. Stop pretending to
support allocating TS for such resources.

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/34488>
2025-05-29 00:48:06 +00:00
Nanley Chery
965d3ec7d4 intel/isl: Fix isl_surf_image_has_unique_tiles()
Prevent the function from unnecessarily returning false by:
* Comparing the image tile range with that of every LOD instead of only
  LOD0.
* Using the correct comparison check for the exclusive tile end ranges.

Fixes: 8dad01903a ("intel: Add and use isl _surf_image_has_unique_tiles()")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35192>
2025-05-29 00:11:45 +00:00
Paulo Zanoni
ecc90e1bb3 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>
2025-05-28 23:45:54 +00:00
Olivia Lee
97e54511a5 panvk: advertise VK_EXT_shader_subgroup_vote and VK_EXT_shader_subgroup_ballot
These are already supported in the compiler.

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/35218>
2025-05-28 23:20:09 +00:00
Valentine Burley
46539edf03 ci: Rename debian-testing to debian-x86_64
This matches the naming scheme used for debian-arm32 and debian-arm64.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35173>
2025-05-28 22:46:13 +00:00
Olivia Lee
6f5f5ca4b2 pan/va: allow using both FAU and small constants in the same instruction
Normally we aren't able to mix FAU srcs from different pages. We
consider small constants (BIR_FAU_IMMEDIATE) to be page 0, and so were
previously always pulling small constants out with a MOV in instructions
that also use FAUs. This is not necessary. Message unit instructions
have no restrictions on small constant use and execution unit
instructions allow mixing small constants with FAU srcs as long as we
don't use more than 64 bits.

shader-db results on G610:

total instrs in shared programs: 673595 -> 672719 (-0.13%)
instrs in affected programs: 111294 -> 110418 (-0.79%)
helped: 293
HURT: 9
helped stats (abs) min: 1.0 max: 27.0 x̄: 3.12 x̃: 2
helped stats (rel) min: 0.08% max: 10.53% x̄: 1.71% x̃: 1.02%
HURT stats (abs)   min: 1.0 max: 15.0 x̄: 4.33 x̃: 3
HURT stats (rel)   min: 0.06% max: 12.20% x̄: 2.07% x̃: 0.49%
95% mean confidence interval for instrs value: -3.38 -2.42
95% mean confidence interval for instrs %-change: -1.80% -1.39%
Instrs are helped.

total cycles in shared programs: 34260.22 -> 34257.44 (<.01%)
cycles in affected programs: 143.53 -> 140.75 (-1.94%)
helped: 78
HURT: 1
helped stats (abs) min: 0.015625 max: 0.296875 x̄: 0.04 x̃: 0
helped stats (rel) min: 0.32% max: 5.71% x̄: 1.78% x̃: 1.32%
HURT stats (abs)   min: 0.046875 max: 0.046875 x̄: 0.05 x̃: 0
HURT stats (rel)   min: 1.90% max: 1.90% x̄: 1.90% x̃: 1.90%
95% mean confidence interval for cycles value: -0.05 -0.02
95% mean confidence interval for cycles %-change: -1.98% -1.49%
Cycles are helped.

total cvt in shared programs: 4097.12 -> 4083.44 (-0.33%)
cvt in affected programs: 706.75 -> 693.06 (-1.94%)
helped: 293
HURT: 9
helped stats (abs) min: 0.015625 max: 0.421875 x̄: 0.05 x̃: 0
helped stats (rel) min: 0.19% max: 45.45% x̄: 6.38% x̃: 2.53%
HURT stats (abs)   min: 0.015625 max: 0.234375 x̄: 0.07 x̃: 0
HURT stats (rel)   min: 0.15% max: 50.00% x̄: 7.85% x̃: 1.90%
95% mean confidence interval for cvt value: -0.05 -0.04
95% mean confidence interval for cvt %-change: -7.03% -4.89%
Cvt are helped.

total code size in shared programs: 6205824 -> 6198528 (-0.12%)
code size in affected programs: 395648 -> 388352 (-1.84%)
helped: 57
HURT: 2
helped stats (abs) min: 128.0 max: 256.0 x̄: 132.49 x̃: 128
helped stats (rel) min: 0.08% max: 25.00% x̄: 6.96% x̃: 5.26%
HURT stats (abs)   min: 128.0 max: 128.0 x̄: 128.00 x̃: 128
HURT stats (rel)   min: 1.12% max: 2.86% x̄: 1.99% x̃: 1.99%
95% mean confidence interval for code size value: -137.46 -109.86
95% mean confidence interval for code size %-change: -8.19% -5.12%
Code size are helped.

total threads in shared programs: 22203 -> 22204 (<.01%)
threads in affected programs: 1 -> 2 (100.00%)
helped: 1
HURT: 0

Signed-off-by: Olivia Lee <olivia.lee@collabora.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/35154>
2025-05-28 22:21:46 +00:00
Matt Turner
37016468a5 intel/compiler: Align human-readable send message info
This fprintf() was added in commit cce3bea2a7 ("i965/disasm: Align send
instruction meta-information with dst.")) to align the human-readable
send message info (e.g. "render MsgDesc: RT write ...") with the
destination register on the previous line.

Two months later we disabled printing the instruction offset in commit
662f1ccc24 ("i965: Disable hex offset printing in disassembly."),
thereby unaligning the human-readable send message info for the next 11
years.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35077>
2025-05-28 21:54:40 +00:00
Jordan Justen
4c4d90ae49 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>
2025-05-28 21:17:33 +00:00
Faith Ekstrand
9924ad4e8b nouveau: Move codegen back to the src/gallium/drivers/nouveau
Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
Faith Ekstrand
ac45243ec1 nak: Unconditionally call lower_io_to_temporaries in preprocess_nir
We're calling it for fragment shaders and NVK is calling it for
eerything before invoking NAK so we may as well call it unconditionally
in NAK and skip calling it in NVK.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
Faith Ekstrand
f70d0425c8 nvk: Stop doubling root descriptors
Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
Faith Ekstrand
cee45c8bf5 nvk: Only pass texture handles to NAK
Codegen expects to get the handle in both the sampler and texture handle
sources.  NAK only cares about texture_handle.  Now that we don't care
about codegen anymore, we can drop the extra source.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
Faith Ekstrand
511a490f8b nvk: Inline nvk_compile_nir_with_nak()
With codegen gone, there's no point in hanging onto this helper.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
Faith Ekstrand
6d35ee3888 nvk: Remove codegen support
Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
Faith Ekstrand
9cf78d6532 nvk: Don't disable features based on NVK_USE_NAK
Now that NAK is the default for everything, if someone explicitly
switches to codegen, they get what they get.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30403>
2025-05-28 21:01:26 +00:00
José Roberto de Souza
573e992b99 intel/tools: Skip dump of binaries in unknown sections
In current Xe KMD error dump it will remove the GuC log from dump
but would also drop any new binary added to error dump.

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/33249>
2025-05-28 20:26:55 +00:00
José Roberto de Souza
a4cf7dde4b intel/tools: Rename and better detect topic changes
Xe KMD added topics without our notice in the past and that may happen
in future so better rename XE_TOPIC_INVALID to XE_TOPIC_UNKNOWN
and better detect topic changes.

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/33249>
2025-05-28 20:26:55 +00:00
José Roberto de Souza
52e9d25aa0 intel/tools: Replace error_decode_xe_read_hw_sp_or_ctx_line() by a more generic function
error_decode_xe_read_hw_sp_or_ctx_line() is too specific, replacing
it by a more generic function that later will be used in other places
too.

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/33249>
2025-05-28 20:26:55 +00:00
Mike Blumenkrantz
b89e0fa226 tc: rework resource usage tracking to be lighter
this (conceptually) flattens out the batches into a wrapping id which
is used to determine whether a resource has in-flight work pending

the code cleanup is nice, but evaluating performance of this is difficult.
in testing a heavy use case of unsynchronized subdata:
* 10% fewer driver flushes (good)
* 20% fewer direct unsynchronized uploads (bad? or possibly hidden race conditions fixed...)

Fixes: 9cc06f817c ("tc: allow unsynchronized texture_subdata calls where possible")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35026>
2025-05-28 20:00:36 +00:00
Karol Herbst
c7d09eca27 rusticl: add memory debugging
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
da4de8d7e3 rusticl: add support for coarse-grain buffer SVM
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
6e13e438d1 rusticl/kernel: add an SVM kernel argument value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
2fb8bb3c49 rusticl: move SVM allocation into core
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
b65652b4be rusticl: implement cl_ext_buffer_device_address
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
35a9829391 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>
2025-05-28 19:21:46 +00:00
Karol Herbst
c5411351ad rusticl/mesa: add util_vma_heap wrapper
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
875fc911b6 rusticl/mesa: wrap new VM interfaces SVM edition
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
1ff64f6ac1 rusticl/mesa: wrap new VM interfaces
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
4027f0f30a lp: implement resource_get_address
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>
2025-05-28 19:21:46 +00:00
Karol Herbst
c449d1d063 zink: implement resource_get_address
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>
2025-05-28 19:21:46 +00:00
Karol Herbst
a04569b2ea 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>
2025-05-28 19:21:46 +00:00
Karol Herbst
8658529e88 gallium: new VM interfaces for SVM
The old interfaces added back in clover's time were modeled after a very
bindful resource model.

However SVM (shared virtual memory) requires us to be way more flexible.

The new interfaces allow frontends to create a cut-out in the GPU's vm and
to assign addresses themselves. This gives us the following benefits:
 - The frontend is empowered to synchronize resource addresses between
   several devices. cl_mem objects in OpenCL span across a set of multiple
   devices and SVM requires them to have the same VMA across all of them.
 - Coarse grain SVM can be implemented without bothering drivers too much
   as the frontend can be responsible to make sure a host allocation with
   a specific VMA matches a GPU allocation with the identical VMA.
 - Support for Global variables in the CrossWorkgroup storage class
   Initializers. Those can depend on addresses of CrossWorkgroup memory,
   if the frontend can just assign a VMA, this address can be passed as a
   constant to spirv_to_nir and folded without the need to support
   spilling of constant initializers.

Drivers not able to give us a vm-cutout are left with implementing
cl_ext_buffer_device_address instead.

Reviewed-by: Adam Jackson <ajax@redhat.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/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
9d7441dcb0 gallium: add fixed address resource API
cl_ext_buffer_device_address requires us to set a fixed address for a
given memory allocation. As this extension is intended to be implemented
on top of vulkan we have to take its limitations into account.

For SVM we'll add proper VM management interfaces, but zink won't be able
to implement those, so here we are.

The old interfaces added back in clover's time were modeled after a very
bindful resource model and the frontend was require to bind all the used
resources ahead of launch_grid.

cl_ext_buffer_device_address and also SVM however will require us to
dynamically attach a list of buffers used in a dispatch with known
addresses, hence set_global_binding isn't really suited for those use
cases.

So PIPE_RESOURCE_FLAG_FIXED_ADDRESS is added to tell a driver that the
address of a resource needs to stay the same over its lifetime, which then
can be queried via pipe_screen::resource_get_address.

All such buffers then can be either bound via set_global_binding or passed
in via pipe_grid_info::globals.

Reviewed-by: Adam Jackson <ajax@redhat.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/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
833bd74291 include: sync CL headers
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>
2025-05-28 19:21:46 +00:00
Valentine Burley
4986c650f6 ci: Don't forward long environment variables
Filter out the CI_COMMIT_DESCRIPTION, CI_COMMIT_MESSAGE, and
CI_MERGE_REQUEST_DESCRIPTION variables, which were causing issues in LAVA.

Fixes: cc83b3db5f ("ci: Forward all environment variables to DUTs and crosvm")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35196>
2025-05-28 18:44:16 +00:00
Yiwei Zhang
28f051a024 panvk: drop bo refcount from panvk_image
The bound bo validity is blessed by the spec VU. No need to beat VVL in
userspace icd.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35197>
2025-05-28 18:06:57 +00:00
Yiwei Zhang
e9b7c88775 panvk: drop bo tracking from panvk_buffer
No longer needed.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35197>
2025-05-28 18:06:57 +00:00
Yiwei Zhang
7e2fe6d1c1 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>
2025-05-28 18:06:57 +00:00
Eric Engestrom
1a6ad85c6c docs: add sha sum for 25.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35211>
2025-05-28 18:01:31 +00:00
Eric Engestrom
0937689d40 docs: add release notes for 25.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35211>
2025-05-28 18:01:31 +00:00
Eric Engestrom
4bf45ce167 docs: update calendar for 25.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35211>
2025-05-28 18:01:31 +00:00
Mary Guillemard
f6f5bee080 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>
2025-05-28 17:03:30 +00:00
Mary Guillemard
172dead3df panvk: Increase CSF scratch limits on v12+
We have way more registers to work with and we are going to need an
additional register for indirect scoreboard handling so let's increase
our scratch limits.

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/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
50dc885eb2 panvk: Set proper upper limit for IDVS reg blacklist on v12+
This was forgotten when introducing v12+ support.

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/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
bacd87ba3c panfrost: Fix codestyle issue with cs_nop
We never use this kind of form in that header and that was bumping on
clang-format a lot.

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/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
3a5d1d74ec panfrost: Add indirect mode for async operations on v11+
v11 and later allows to indirectly wait on a scoreboard mask and signal
a scoreboard (as set via SET_STATE)

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/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
a0826ad205 panfrost: Add cs_* helpers for v11 CSF instructions
This adds all bit operations and an helper to indirectly wait on
scorebards.

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/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
d0c76cd2ac panvk: Depends on Panthor scoreboard information
Instead of hardcoding scoreboard count and mask, we now derive those
informations from Panthor CSIF properties.

We still limit iters to 5 as we currently don't support more.

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/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
80b06fb82f panfrost: Allow up to 16 for scoreboards on CSF instructions on v11+
The max value on v11+ is 16.

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/35089>
2025-05-28 17:03:30 +00:00
Alyssa Rosenzweig
d696b19dd0 nir/lower_int64: add bitfield_reverse lowering
now that we can represent 64-bit bitfield_reverse in NIR, we need a lowering for
it as well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35198>
2025-05-28 16:29:30 +00:00
Alyssa Rosenzweig
c3fb0645d8 nir/lower_alu: compact bitcount lowering
while in the area.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35198>
2025-05-28 16:29:30 +00:00
Alyssa Rosenzweig
759dc70bde nir: generalize bitfield_reverse bit size
No reason we can't reverse other bit sizes, we just need to generalize the
constant folding & bit size lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35198>
2025-05-28 16:29:30 +00:00
Christian Gmeiner
2e6c565b77 vc4: Use nir_shader_intrinsics_pass(..) for vc4_nir_lower_blend(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35205>
2025-05-28 16:12:22 +00:00
Christian Gmeiner
f2b03202e7 vc4: Use nir_shader_intrinsics_pass(..) for vc4_nir_lower_io(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35205>
2025-05-28 16:12:22 +00:00
Alyssa Rosenzweig
d7c0355725 asahi: advertise ASTC HDR formats
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
be74e9ffaf pan/lib: wire up ASTC HDR formats
This exposes GL_KHR_texture_compression_astc_hdr, which makes a few
piglit tests go from fail to pass.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
d9dbf5cebf panfrost: set decode_hdr when needed
When using the HDR-formats, we need to set decode_hdr to actually get
HDR values.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
33ad5d447e panfrost: correct texfeat-bit for ASTC LDR
These formats don't depend on the ASTC HDR texfeat, they depend on the
ASTC HDR texfeat. The ASTC HDR texfeat simply adds support for more
endpoint encodings to these formats.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
95d7df1ce3 gallium/st: enable KHR_texture_compression_astc_hdr when supported
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
fd42cdfc01 mesa/main: support astc_hdr formats
This gets a bit annoying because Vulkan has separate format enums for
the LDR and HDR ASTC formats, whereas OpenGL uses the same format enums,
but allows additional color-endpoint encodings when HDR is supported.

Either of these behaviors makes sense on their own, but since we share
pipe_format definitions between the APIs, we need to resolve this. This
patch does that by checking if the HDR extension is supported, and
always using the HDR formats. This works, because the HDR formats are
supersets of the LDR formats in terms of features.

Not all of the LDR formats have HDR variants, either because they're
sRGB or 3D, which either is nonsensical or just not exposed by the
ASTC HDR extensions. So we only need to map a subset of the ASTC formats
with this HDR-aware mapping.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
6cd898dbc2 util/format: add util_format_is_astc_hdr()-helper
This will be used later in the series.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
ccc7833f16 util/format: add ASTC HDR formats
These are just the float variations of the normal LDR formats. Not all
LDR formats have an HDR variant.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Daniel Stone
ae8704fbdb ci/panfrost: Demote T720 to nightly runs only
We only have two of these boards, and can't get more as they're EOL.
Demote them to nightly until we can source different boards with this
SoC, and more of them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35200>
2025-05-28 12:48:45 +00:00
Mary Guillemard
8965e60118 panfrost: Fix varying descriptors on v12+
Since introduction of support for more than 16 varyings, support for
v12+ has been broken on certain apps.

This manifest with a black screen on all GL Core 1.x apps like glxgears
or xonotic in legacy mode.

The issue is a wrong buffer index being used on v12 for the varying
descriptors.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: cd2ca0ac22 ("panfrost: Enable more than 16 varyings on v9+")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35201>
2025-05-28 12:16:35 +00:00
Marek Olšák
2b716972c6 radeonsi: enable 16-bit ALU, LDS, uniforms on gfx8
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>
2025-05-28 11:01:12 +00:00
Marek Olšák
45cbd60c3b glsl,gallium: add an option not to lower mediump tex & image dst
ACO doesn't support it for gfx8.

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>
2025-05-28 11:01:12 +00:00
Marek Olšák
bd5d623674 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>
2025-05-28 11:01:12 +00:00
Marek Olšák
0dc5d649ea winsys/amdgpu: fall back to a normal priority without root in the winsys
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00
Marek Olšák
2ef6aa5934 winsys/amdgpu: pass PIPE_CONTEXT_* flags to ctx_create
instead of using our own flags; also REALTIME_PRIORITY is never used,
so the relevant code is removed

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00
Marek Olšák
7f441beaf6 winsys/amdgpu: set the priority for gfx user queues
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00
Marek Olšák
6785e42511 winsys/amdgpu: add a high priority gfx queue
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00
Marek Olšák
59e93b02e0 winsys/amdgpu: add enums for queues using the fence rings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00
Marek Olšák
4bf2a28334 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>
2025-05-28 10:23:14 +00:00
Marek Olšák
d9e681ee3f winsys/amdgpu: use alt_fence for all video queues
It's already used by VCN queues.

This reduces the size of sequence numbers stored per BO.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:14 +00:00
Marek Olšák
f75e54453f winsys/amdgpu: print an error when we fail to allocate VA
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:14 +00:00
Samuel Pitoiset
8596150ae8 aco: implement bitfield_reverse for types other than 32-bits
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34583>
2025-05-28 09:52:12 +00:00
Daniel Schürmann
5b4d284493 aco/isel: use vector-aligned operands for image_bvh64_intersect_ray
Totals from 93 (0.12% of 79377) affected shaders: (Navi48)
MaxWaves: 1376 -> 1368 (-0.58%)
Instrs: 3583500 -> 3581861 (-0.05%); split: -0.05%, +0.00%
CodeSize: 18792300 -> 18785296 (-0.04%); split: -0.04%, +0.00%
VGPRs: 8652 -> 8592 (-0.69%); split: -1.25%, +0.55%
Latency: 20861347 -> 20834407 (-0.13%); split: -0.17%, +0.04%
InvThroughput: 4032604 -> 4028020 (-0.11%); split: -0.14%, +0.03%
VClause: 90507 -> 90525 (+0.02%); split: -0.01%, +0.03%
Copies: 279429 -> 277839 (-0.57%); split: -0.58%, +0.01%
Branches: 100260 -> 100251 (-0.01%)
PreVGPRs: 8949 -> 8771 (-1.99%)
VALU: 1955635 -> 1954053 (-0.08%); split: -0.08%, +0.00%
SALU: 477347 -> 477329 (-0.00%); split: -0.01%, +0.01%
VOPD: 69 -> 61 (-11.59%)

Totals from 93 (0.12% of 79377) affected shaders: (Navi31)

MaxWaves: 1376 -> 1374 (-0.15%)
Instrs: 3442606 -> 3440344 (-0.07%); split: -0.07%, +0.00%
CodeSize: 17801008 -> 17790476 (-0.06%); split: -0.07%, +0.01%
VGPRs: 8652 -> 8556 (-1.11%); split: -1.25%, +0.14%
Latency: 20590943 -> 20542279 (-0.24%); split: -0.27%, +0.03%
InvThroughput: 3978133 -> 3969497 (-0.22%); split: -0.25%, +0.03%
VClause: 91784 -> 91769 (-0.02%); split: -0.05%, +0.03%
Copies: 277177 -> 275263 (-0.69%); split: -0.70%, +0.01%
Branches: 100098 -> 100092 (-0.01%); split: -0.02%, +0.01%
PreVGPRs: 9021 -> 8843 (-1.97%)
VALU: 2001794 -> 1999893 (-0.09%); split: -0.10%, +0.00%
SALU: 419504 -> 419559 (+0.01%); split: -0.01%, +0.02%
VOPD: 77 -> 64 (-16.88%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Rhys Perry
c50f9541e4 aco/tests: Add tests for vector-aligned operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
b5382faa9c aco/validate: validate register assignment of vector-aligned operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
9091c3bf5b aco/ra: add affinities for MIMG vector-aligned operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
fb689f133e aco/ra: handle register assignment of vector-aligned operands
Vector-aligned operands are handled by temporarily allocating
a vector-SSA value for the duration of the instruction.
On completion of the register assignment, the individual
operands are assigned to the reserved register space and,
if necessary, parallelcopies are emitted.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
92b1154397 aco/ra: Always rename copy-kill operands, even if the temporary doesn't match
This makes it independent of whether the operand already got renamed or not.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
4fad3514a9 aco/ra: only change registers of already handled operands in update_renames()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
51a2e1eb94 aco/ra: don't use kill-flags as indicator in get_reg_create_vector()
We are about to re-use this function for vector-aligned operands.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
3d8b355f22 aco/assembler: support vector-aligned operands on MIMG instructions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:17 +00:00
Daniel Schürmann
8cb1700c74 aco/print_ir: print parenthesis around vector-aligned operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
6aabcb02a1 aco/print_ir: only print 'lateKill' if requested via print_kill flag
Also only print lateKill for actually killed operands.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
a9645fdd89 aco: introduce concept of vector-aligned Operands
Operand::isVectorAligned indicates that the Operand is part of a vector
consisting of multiple operands. Therefore, it must reside in a register
aligned with the next Operand.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
a4fa3935fd aco/live_var_analysis: set same lateKill flags for same operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Daniel Schürmann
ee0ee282b9 aco: simplify Operand() constructor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34359>
2025-05-28 09:24:16 +00:00
Mary Guillemard
19531a0162 pan/csf: Fix typo in cs_trace_run_idvs2
This should have been a multiply not an add.
Fix an assertion when running in tracing mode on panvk.

Fixes: 79a1d98e1e ("pan/csf: make cs_builder.h usable from c++")
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/35176>
2025-05-28 10:12:19 +02:00
Samuel Pitoiset
2ebfa64be7 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>
2025-05-28 07:20:26 +00:00
Marek Olšák
35c76bc7f7 nir/tcs_info: use range analysis to determine the range of tess levels
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35195>
2025-05-28 06:46:56 +00:00
Marek Olšák
24c3f30e4a nir/tcs_info: gather which patch outputs are only read/written by invoc 0
Tested thoroughly by a shader test.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35195>
2025-05-28 06:46:56 +00:00
Marek Olšák
a3632d7d88 nir/tcs_info: gather for all patch outputs whether they're written by all invocs
This substantially rewrites the pass. It also makes it easier to read.
Tested thoroughly by a shader test.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35195>
2025-05-28 06:46:56 +00:00
Faith Ekstrand
6b265d9d7d nvk: Use NAK by default on Kepler
At this point it's way more correct than codegen.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
a37c50e985 nak/sm20: Encode OpSuLdGa and OpSuStGa
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
2a5ac439f5 nak/sm20: Encode imadsp
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
2c0957d086 nak/sm20: Encode surface address ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
4d86f95cff nak/sm32: Encode surface address ops
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
2c0d0bad01 nak: Remove unused intrinsic image_load_raw_nv
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
ac3fd5768b nak: Add surface address ops
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
82d789d22a nvk: Lower images to addresses on Kepler
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
bb3f4b86bf nvk: Use nil_su_info for image descriptors on Kepler
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
e5d4c4934d nak: Add an image address lowering pass
On Kepler, we don't have real surface opcodes. Instead, we have a bunch
of helper ops which make image calculations in the shader reasonably
efficient and we have to lower to that and an address-based load/store.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
0b06feee92 nouveau: Move bitview to a common rust util folder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
5fbcdd6e32 nir,nak: Add NV-specific image intrinsics
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Lorenzo Rossi
a27a711c3a nil: Add helpers for filling out Fermi/Kepler surface info
Kepler needs different descriptors for Image storage, these descriptors
are not directly used by the hardware but by lowering instructions
(added in later commits)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:19 +00:00
Faith Ekstrand
e388f25a2a nil: Align linear image strides to the image alignment
This is a function no-op right.  In the case where we don't have an
explicit_row_stride_B, we use an alignment of 128B which is what we were
aligning the row stride to before.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:18 +00:00
Faith Ekstrand
7a577d2e3a nvk: Drop the union from nvk_buffer_view
The space saved is tiny and not having the union at all makes me way
more comfortable about the modifications we're about to do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
2025-05-28 01:47:18 +00:00
Adam Jackson
4b1c824b67 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>
2025-05-28 01:08:20 +00:00
Adam Jackson
92f07860a4 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>
2025-05-28 01:08:20 +00:00
Adam Jackson
fd7589d775 vtn: Handle SPV_KHR_uniform_group_instructions
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34941>
2025-05-28 01:08:20 +00:00
Caleb Callaway
52db0e1480 intel/compiler: fix SHA generation for shader replace
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35140>
2025-05-27 22:57:19 +00:00
Faith Ekstrand
8ffe0098be nvk: Reserve a sampler for TXF on Kepler
The SPIR-V spec says texelFetch and friends don't take a sampler.
However, on Kepler and earlier hardware, the sampler is read even for
tld.  In particular, the hardware reads the sRGB conversion bit in the
sampler and this can be in an inconsistent state if we haven't
initialized samplers properly.  On Kepler, we should just reserve a
sampler at device creation time and always use that for tld.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35190>
2025-05-27 22:23:37 +00:00
Faith Ekstrand
bfdc95b109 nak: Scalarize non-constant ald/ast on Kepler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35190>
2025-05-27 22:23:36 +00:00
Faith Ekstrand
f10c42fcc1 bitview: Implement SetFieldU64 for all BitViewMutable
There's no reason why we need to keep overriding this.  There's also
probably not a good reason why this trait exists at all but that's a
problem for another day.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35190>
2025-05-27 22:23:36 +00:00
Eric Engestrom
6ec69e5a07 gallium: drop dynamic pipe-loader leftovers
Fixes: 30c5c7d811 ("gallium: remove dynamic pipe-loader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35185>
2025-05-27 21:44:31 +00:00
Karol Herbst
0a9b871b9e rusticl: support cl_khr_kernel_clock
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
2025-05-27 19:57:28 +00:00
Karol Herbst
8144c7ee86 rusticl: generate bindings for llvm version macros
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
2025-05-27 19:57:28 +00:00
Karol Herbst
f5a9a80f29 clc: wire up cl_khr_kernel_clock
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35179>
2025-05-27 19:57:28 +00:00
Samuel Pitoiset
63758bc093 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>
2025-05-27 19:30:18 +00:00
Eric Engestrom
a628190e0d ci/vkd3d: collapse section by default
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35180>
2025-05-27 18:52:50 +00:00
Eric Engestrom
f12f2bcae1 ci: uprev vkd3d
A new group of descriptor aliasing tests was added; let's run these in CI :)

7e829e8836...041cfa7558

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35180>
2025-05-27 18:52:50 +00:00
Erik Faye-Lund
738b95a35e panfrost: add max_4x_msaa quirk
Turns out, some Midgard GPUs don't support more than 4x MSAA. Add a
quirk for those GPUs, so don't expose it when it doesn't work.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
3a78d9213b panfrost: pass quirks through __VA_ARGS__
We can't easily pass multiple initializers here, because a comma in the
initializer list would be treated as a preprocessor argument separator
and not a separator in the initializer lst.

We could also have fixed this with some nested macro ugliness, but let's
instead do what nir_builder does for intrinsic indices and use __VA_ARGS__
to keep this neat.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
e77e4d5c17 panfrost: change tie-breaking rule for 16x MSAA
When using 16x MSAA, we have two sample-positions on the negative
boundary of the unit-square covering the pixel. This causes problems
when using the default tie-breaking rule, where we miss some
sample-positions when rasterizing primitives covering the entire
viewport.

This works fine on Bifrost and later, but this setting is ignored on
those GPUs, and they assume the default (e.g MINUS_180_OUT_0_IN).
Because we'd prefer for rasterization to match between Midgard and
Bifrost when we can, we only apply this when we have 16x MSAA.

As an added bonus, this behavior matches what the DDK does.

Fixes these tests when 16x MSAA is enabled:
- dEQP-GLES31.functional.texture.multisample.samples_16.use_texture_*
- dEQP-GLES3.functional.multisample.fbo_max_samples.proportionality_alpha_to_coverage

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
130bbf20c7 panfrost: properly compute tile-buffer requirements
This should be helful when we want to enable higher sample counts.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
64becaf142 panfrost: re-align table
The formatting here has grown some warts over time, let's clean it up a
bit.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
cf28edd8bd panfrost: do not calculate max-msaa on v4
The V4 GPUs doesn't have the dynamic allocation logic that V5 and later
has. There's nothing to calculate here; the GPU either supports 8x MSAA,
or 4x MSAA.

Since 8x MSAA is the architectural max, let's have this function report
that. We deal with the 4x limit separately as a quirk, because this
applies to some V5 GPUs as well.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
483ce5a1dc 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>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
7de12da5a2 panfrost: v4 does not support 16x msaa
This value isn't valid on V4, so let's make sure we don't try to use it.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Erik Faye-Lund
439b88c619 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>
2025-05-27 17:41:47 +00:00
Mike Blumenkrantz
7ffc774f35 aux/trace: handle sampler_view_destroy
it's still legal for frontends to do this, just frowned upon

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35183>
2025-05-27 17:17:49 +00:00
Matt Turner
278d894146 meson: add wrap for libdrm
This allows building Mesa with the Android NDK, which doesn't provide
libdrm.

We will generate an `Android.bp` file using the `ninja-to-soong` tool
(https://github.com/rjodinchr/ninja-to-soong), and to do this we run
Mesa's standard meson build system to generate the ninja commands that
we then translate to soong.

That meson invocation is done using the Android NDK, which doesn't
provide libdrm, so until we find an alternative solution[*] we provide a
wrap file that builds libdrm as part of the Mesa build (but does not
install it--we still use the Android-provided libdrm at runtime)

Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35058>
2025-05-27 16:07:29 +00:00
Adam Jackson
2249ba9fa3 rusticl: Enable cl_intel_subgroups if you ask nicely
Definitely not fully working yet but works well when it does.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31772>
2025-05-27 15:20:17 +00:00
Adam Jackson
96e99d47e7 rusticl: Add RUSTICL_FEATURES=intel
We're going to hide some of the cl_intel_* extensions behind that until
they start stabilizing.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31772>
2025-05-27 15:20:17 +00:00
Alyssa Rosenzweig
f07ccd9142 hk: gate custom border colour emulation on feature
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35181>
2025-05-27 15:00:13 +00:00
Yogesh Mohan Marimuthu
1af419deed ac: for userq do not set info->has_fw_based_shadowing
register shadow enabling for user queue is different code flow than
kernel queue. In case of kernel queue preamble ib is initialized which
is not requried for kernel queue.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34803>
2025-05-27 14:25:50 +00:00
Yogesh Mohan Marimuthu
0298ee5719 winsys/amdgpu: apu fwm packet supports only 4 max fences
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34803>
2025-05-27 14:25:50 +00:00
Yogesh Mohan Marimuthu
137907945f ac: add AMD_USERQ env var to enable user queue
user queue is enabled only if AMD_USERQ env var is set and Kernel
supports user queue.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34803>
2025-05-27 14:25:50 +00:00
Yogesh Mohan Marimuthu
97c48c5aa7 ac: fix getting mcbp info for userq
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34803>
2025-05-27 14:25:50 +00:00
Alyssa Rosenzweig
794b6a14bb asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35169>
2025-05-27 13:23:12 +00:00
Alyssa Rosenzweig
ab9da6bc49 hk: gate min LOD emulation on the feature
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35169>
2025-05-27 13:23:12 +00:00
Alyssa Rosenzweig
3065815c7c hk: make hk_lower_nir static
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35169>
2025-05-27 13:23:12 +00:00
Alyssa Rosenzweig
f47de306b8 vulkan: pass enabled features to drivers
for pipelines, we know enabled features. for classic shader objects, we do not.
therefore, we want to plumb this through explicitly for drivers using common
pipelines, rather than making drivers guess whether they can use the device
features.

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/35169>
2025-05-27 13:23:12 +00:00
Erik Faye-Lund
2ec3b83f99 panvk: expose EXT_texel_buffer_alignment support
This was mostly wired up, but we currently require an alignment of 64
for uniform texel buffers, because we're currently using
plane-descriptors for this.

We could lift that limitation by switching to buffer descriptors and use
LD_CVT for the format-conversion, but that's a bigger change.

Let's just fix up the aligntment and enable the extension for now.

Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34826>
2025-05-27 11:31:55 +02:00
Samuel Pitoiset
69467f26c9 radv/ci: remove RADV_PERFTEST=video_{decode,encode} when it's the default
It's automatically enabled when recent kernels.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34879>
2025-05-27 08:47:50 +00:00
Samuel Pitoiset
dd9682ab09 amd/ci: hold back navi21/navi31 to kernel 6.6
There is a regression in AMDGPU that prevents using 6.10+ on
navi21/navi31 due to a memory explosion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34879>
2025-05-27 08:47:50 +00:00
Eric Engestrom
68323b195a amd/ci: uprev amdgpu.ko jobs to kernel 6.14.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34879>
2025-05-27 08:47:50 +00:00
Karol Herbst
30c5c7d811 gallium: remove dynamic pipe-loader
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Karol Herbst
cd78417514 pipe-loader: remove libpipe_loader_dynamic
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Karol Herbst
0e322c6092 glx,egl: drop libpipe_loader_dynamic dependency
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Karol Herbst
2edd0c4bbd glx,egl: use driGetDriInfoXML
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Karol Herbst
fca4c5adc4 frontend/dri: add wrapper around pipe_loader_get_driinfo_xml
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Yiwei Zhang
c093a4e18b venus: properly handle implicit fence from the compositor
Vulkan is supposed to operate in explicit synchronization mode. However,
for legacy compositors that only support implicit fencing, we have to
extract the compositor implicit fence (release fence) and resolve it
properly. Since we used to rely on renderer side drivers being able to
handle implicit in-fence, here we only opt-in the new behavior for those
known to have issues with that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34516>
2025-05-27 02:40:44 +00:00
Yiwei Zhang
5535184539 venus: track prime blit dst buffer memory in the wsi image
This is to prepare for handling implicit fence from the compositor.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34516>
2025-05-27 02:40:44 +00:00
Faith Ekstrand
fef64b7e7d nak/sm20: Encode OpAL2P
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35172>
2025-05-26 22:03:06 -04:00
Faith Ekstrand
9fe2a21e93 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>
2025-05-26 22:02:33 -04:00
Faith Ekstrand
4bab33db20 nak/sm20: Fix a comple misplaced bits
Fixes: 078ffb860b ("nak/sm20: Add initial SM20 encoding")
Fixes: a3330f1d46 ("nak/sm20: Add float ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35170>
2025-05-26 23:17:02 +00:00
Faith Ekstrand
00eaca4c8f nak/sm20: Fix the encoding of fset
We weren't setting the accum src (which should be pT for now) and we put
ftz in the wrong place.  Bit 5 is actually .bf which we want to set all
the time in order to get a float output.  (Otherwise it gives an integer
output.)

Fixes: a3330f1d46 ("nak/sm20: Add float ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35170>
2025-05-26 23:17:02 +00:00
Derek Foreman
6671251100 egl/dri/wayland: Add some arbitrary perfetto trace points
These are potentially slow functions, and would be interesting to see in
perfetto traces.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
04acb0eed8 egl/dri/wayland: Use presentation feedback to track frame delivery
Use the new shared presentation feedback code in the loader to implement
perfetto frame delivery tracing similar to the wayland vulkan wsi code.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
39fb510849 egl/dri/wayland: Refactor buffer wait out of get_back_bo()
This is a potentially slow process, so let's break it out into its own
function so we can have more meaningful profiling data from perfetto later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
ebfd7df1b9 egl/dri/wayland: Refactor throttle code
The throttling code is potentially long running. Move it to a separate
function so we can have better perfetto tracing later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
2f8d17ad35 egl/dri/wayland: Use loader_wayland_surface abstraction
Use the new wl_surface wrapper

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
54c4a41e2d egl/dri/wayland: Use loader_wayland_buffer abstraction
Use the new wl_buffer wrapper.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
b3e3f0fc2e loader/wayland: Move acquisition time tracking into perfetto flows
We only use the acquisition time for calculating latency for perfetto
tracks later, and the acquisition time should ideally be the start of the
perfetto flow.

This has been more or less true with very small error margin for vk wsi,
but the wayland EGL buffer handling is a lot more complicated. Moving the
time check into the flow start will make re-using this code for EGL much
simpler.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
336cbc499f wsi/wayland: Move presentation tracing code into loader
Push the presentation feedback code into the common code in the loader,
so we're one step closer to using the perfetto instrumentation here in
the EGL code.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
3521abe0d1 wsi/wayland: Early return from tracing function
We can bail on all of this if tracing isn't enabled.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
94b45c6c8a wsi/wayland: Refactor some surface management code into loader
Share some wayland surface setup code in the loader so we can use it in
both VK and (in an upcoming commit) EGL.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
aefd3d835e wsi/wayland: Move buffer name string into common code
Push this into the loader bits so it will be available to egl when we
add profiling later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
6946758682 wsi/wayland: Move perfetto flow_ids into loader_wayland_buffer
Pull some more common stuff into the new abstraction.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
c06624d797 wsi/wayland: Refactor some buffer management code into loader
For now just pull the tiny bit that looks up the wayland buffer id for
profiling. The end goal is to promote more code sharing between vk and egl
and improving wayland egl's perfetto profiling.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
81487d8663 wsi/wayland: Count outstanding feedbacks
Count the outstanding feedback requests instead of relying on list
length calculations.

When moving presentation feedback bits into common code shortly, the list
will no longer be exposed.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
08ed1390e2 wsi/wayland: Add a bool to track the presentation id fallback path
Instead of testing the protocol object pointer, track this with a bool.

We're going to wrap the protocol object in some common code later, so
testing it directly will become inconvenient.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
d8c8a7fb6e loader: Move the wayland protocol build into loader
We can hang this here instead of off wayland-drm's build.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:19 -05:00
Valentine Burley
d09594cc40 ci/lava: Move mesa build job dependency to variant definitions
This will make adding ASan definitions easier.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
3d56b98061 ci/lava: Rename LAVA_S3_ARTIFACT_NAME
Now that we're no longer using multiple artifacts, we can drop the
LAVA_ prefix from the S3_ARTIFACT_NAME variable name for simplicity.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
8114d72606 ci: Delete python-artifacts job
LAVA was the last user of this job. Now that the lava-trigger container
includes all the necessary files, the python-artifacts job is no longer
needed and can be removed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
080894325a ci: Remove debian/x86_64_pyutils container
Delete the debian/x86_64_pyutils container, since the LAVA jobs no longer
use it.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
b85b84fde6 ci/lava: Drop LAVA_DISTRIBUTION_TAG
The alpine/x86_64_lava-trigger image was set up in a way that avoids
conflicts with MESA_IMAGE_PATH and FDO_DISTRIBUTION_TAG.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
60c531b7af ci/baremetal: Set LAVA_DISTRIBUTION_TAG directly
This will make the following commit possible.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
f6dce6dee1 ci: Add a minimal Alpine container for running LAVA jobs
Compared to the existing Debian-based x86_64_pyutils container, this
Alpine-based variant reduces the image size by approximately 83%.

Include all the necessary python artifacts, including lava_job_submitter
in the container to avoid having to download them at the start of each
test job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Valentine Burley
f83e830dbc bin/ci: Split out LAVA-specific python requirements
Move LAVA-related Python packages into a separate requirements file to
simplify installing only the necessary dependencies.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34980>
2025-05-26 17:25:40 +00:00
Georg Lehmann
96c0e600e3 docs/gallium: remove some nine mentions
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:04 +00:00
Georg Lehmann
3a42e43e01 gallium: remove tgsi_div pipe cap
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:04 +00:00
Georg Lehmann
bfeaf78922 gallium: remove polygon_offset_units_unscaled pipe cap
This was only used by nine.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:03 +00:00
Georg Lehmann
282310e1fe nvc0: remove unscaled poly offset support
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:03 +00:00
Georg Lehmann
6071367ffa r600: remove unscaled poly offset support
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:02 +00:00
Georg Lehmann
2f6d1f1f31 zink: remove unscaled poly offset support
This was incorrect anyway...

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:01 +00:00
Georg Lehmann
806388a3a1 radeonsi: remove unscaled poly offset support
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35147>
2025-05-26 17:01:01 +00:00
Faith Ekstrand
424ef4b260 nak/sm20: Add encodings for OpLdSharedLock and OpStSCheckUnlock
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35028>
2025-05-26 16:29:05 +00:00
Lorenzo Rossi
93ddaa90b3 nak/sm32: Add encodings for OpLdSharedLock and OpStSCheckUnlock
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35028>
2025-05-26 16:29:05 +00:00
Lorenzo Rossi
dccf5ed336 nak: Add OpLdSharedLock and OpStSCheckUnlock
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35028>
2025-05-26 16:29:05 +00:00
Lorenzo Rossi
47f6c74b71 nir,nak: Add KeplerB shared atomics intrinsics and lowering
Kepler cards do not support shared atomic operations directly, but they
have special ldslk and stsul that can implement mutex locks on
addresses. Shared atomics can be lowered into operations in mutexes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35028>
2025-05-26 16:29:05 +00:00
Faith Ekstrand
88e449dc85 nak/sm20: Encode OpViLd instead of OpIsberd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35028>
2025-05-26 16:29:05 +00:00
Valentine Burley
8b37cfae2e ci/lava: Forward environmental variables to DUT directly
Instead of uploading the environmental variables to S3, append it to the
job definition instead.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35051>
2025-05-26 15:30:47 +00:00
Valentine Burley
ffe8a2e023 ci/lava: Use init-stage2 and setup-test-env.sh from Mesa install
init-stage2.sh and setup-test-env.sh are already downloaded on the DUT as
part of the mesa-build overlay, which downloads the Mesa artifacts from
S3.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35051>
2025-05-26 15:30:47 +00:00
Valentine Burley
a6e1926a8e ci: Fix date parsing with BusyBox on Alpine
This fixes the timestamps in Alpine containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35051>
2025-05-26 15:30:47 +00:00
Valentine Burley
cc83b3db5f ci: Forward all environment variables to DUTs and crosvm
Instead of the current allowlist in export-gitlab-job-env-for-dut.sh,
filter out unwanted environment variables and forward the rest to
bare-metal and LAVA DUTs, as well as crosvm.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35051>
2025-05-26 15:30:47 +00:00
Vladly
45e61f1203 freedreno/a3xx-a5xx: re-emit vertex state on VS change
On a3xx-a5xx information from vertex program is used to emit state
related to vertex buffer. However this state is not re-emitted if only
vertex program changes which causes rendering artifacts on gnome-shell
where there are 2 draws with same vertex buffer but different shaders
(due to changed vertex attribute destination regid).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35164>
2025-05-26 15:13:19 +00:00
Lorenzo Rossi
02805fd900 nak/sm20: Fix encoding panic for OpFAdd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35151>
2025-05-26 14:41:23 +00:00
Lorenzo Rossi
4942a29314 nvk: Fix local memory loads in Kepler shader header
Kepler cards shader header needs the load/store flag enabled even for
local memory usage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35151>
2025-05-26 14:41:23 +00:00
Lorenzo Rossi
a427f540e5 nvk: Don't advertise BAR memory for Kepler cards
Previously the driver would advertize the memory heap for BAR memory,
but no memory type to use it. This would cause a lot of crashes for
programs using the driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35151>
2025-05-26 14:41:23 +00:00
Alessandro Astone
b519cb80a6 asahi: Avoid AND-ing with string literal in static_assert
Some compilers have trouble dealing with this, including the clang prebuilts
used in older AOSP trees.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35137>
2025-05-26 13:45:50 +00:00
Alessandro Astone
33e0330baf asahi: Do not require fopencookie on Android
The android build lies when setting _GNU_SOURCE, presumably to have access to
other functions that Android's libc actually implements.
However, fopencookie is not one of those.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35137>
2025-05-26 13:45:50 +00:00
Faith Ekstrand
26ba29f75b nouveau/mme: Don't install the HW tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35163>
2025-05-26 09:17:09 -04:00
Mike Blumenkrantz
6b2c39e9d8 zink: delete zink_surface_info
this is no longer needed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34822>
2025-05-26 12:58:03 +00:00
Mike Blumenkrantz
7eae11930f zink: delete legacy renderpasses and framebuffer objects
this is vulkan 1.0 stuff, which is no longer tested and has been superceded
by dynamic rendering

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34822>
2025-05-26 12:58:03 +00:00
Iago Toral Quiroga
e8c151f09f v3d: fix incorrect resource unref
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35158>
2025-05-26 12:35:13 +00:00
Konstantin Seurer
36c9b66ee2 radv/bvh: Fix updating empty bvhs
valid_child_count_minus_one is 15 for box nodes without child so every
child was considered valid which made the code read invalid data and use
that for addressing.

Fixes: 2d48b2c ("radv: Use subgroup OPs for BVH updates on GFX12")
Closes: #13217
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35119>
2025-05-26 12:03:21 +00:00
Patrick Lerda
df2c774a83 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>
2025-05-26 11:41:20 +00:00
Collabora's Gfx CI Team
1730001351 Uprev Piglit to c32e5cc717e846ffa43408174181dc16a31d3df0
1767af745e...c32e5cc717

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35148>
2025-05-26 10:19:29 +00:00
Daniel Stone
086d7cb8fd ci/bare-metal: Remove remnants of old bare-metal setups
With the rest of the Qualcomm devices moving to LAVA, we can remove the
original (!) bare-metal infrastructure, leaving only the Igalia RPi
devices still using bare-metal. When those are converted to b2c, we can
remove the rest of bare-metal.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35148>
2025-05-26 10:19:29 +00:00
Juan A. Suarez Romero
38caef8fa2 broadcom/ci: update expected test results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35156>
2025-05-26 11:42:45 +02:00
Job Noorman
7ebcc8d402 ir3: don't free constant_data after assembling
When using shader overrides, the assembler will be called a 2nd time
which will try to dereference the freed constant_data. Fix this by not
explicitly freeing constant_data, it's ralloc'd in the context of the
shader variant anyway so will be freed automatically.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35128>
2025-05-26 07:43:16 +00:00
Lionel Landwerlin
5daf4608e5 anv: workaround Sky: Children of the Light
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12966
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35111>
2025-05-26 05:52:30 +00:00
Lionel Landwerlin
828173d79a anv: add support for lower_terminate_to_discard workaround
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/35111>
2025-05-26 05:52:30 +00:00
Lionel Landwerlin
87e57a9bb2 radv: rename radv_lower_terminate_to_discard for wider use
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35111>
2025-05-26 05:52:30 +00:00
Olivia Lee
65406cf500 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:22 +00:00
Olivia Lee
885805560f 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:22 +00:00
Olivia Lee
4d99346477 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:22 +00:00
Olivia Lee
32177b99d5 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
d60c688317 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
61e7d47270 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
83bb97796b 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
952703eefe pan/csf: add cs_builder unit test infrastructure
For now, just comparing the raw contents of the output buffer. Possibly
in the future we could hook this up to the disassembly from decode_csf.c
to make it a easier to edit.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
79a1d98e1e pan/csf: make cs_builder.h usable from c++
We need to do this in order to test it with gtest. Most of the changes
are just fixing integer truncation warnings.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Qiang Yu
6f2a1e19da 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>
2025-05-26 02:07:50 +00:00
Timothy Arceri
bf24d56862 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>
2025-05-26 00:10:40 +00:00
Timothy Arceri
27945bbd8a 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>
2025-05-26 00:10:39 +00:00
Faith Ekstrand
38f8e82dd2 nvk: 64-bit atomics exist on Kepler B+
64-bit atomics exist on Kepler B but not Kepler A.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35149>
2025-05-25 00:39:56 +00:00
Faith Ekstrand
aad4410b51 nak/sm20: Don't allow 64-bit atomics
The encoding exists and the disassembler will disassemble it but the
hardware throws an ILLEGAL_INSTRUCTION_ENCODING if we ever try to
execute one.  The proprietary driver doesn't expose any 64-bit atomics
features on Kepler A so we assume the hardware just doesn't do them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35149>
2025-05-25 00:39:56 +00:00
Faith Ekstrand
4d752ad123 nvk: Disable R64_[US]INT formats when shaderImageInt64Atomics isn't supported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35149>
2025-05-25 00:39:56 +00:00
Lorenzo Rossi
00bbb68c08 nak/sm32: Fix various encoding bugs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35059>
2025-05-25 00:33:47 +02:00
Lorenzo Rossi
150a61ab2f nak/sm32: Fix shfl.up register alignment
For some obscure reason, shfl.up on sm32 requires the lane register to
be 128-bit aligned, this can be fixed with minimal code changes by
aligning the register in legalization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35059>
2025-05-24 21:20:49 +02:00
Collabora's Gfx CI Team
3b6d7cdd23 Uprev ANGLE to ec4d8f8e4d3f1a9e64430abd8b6b436253732adf
db71e8fa7c...ec4d8f8e4d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35040>
2025-05-24 07:35:01 +00:00
Marek Olšák
32c419744e mesa: remove the old GL name (ID) allocator
Split from the commit that enabled the new GL name (ID) allocator.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31515>
2025-05-24 05:05:03 +00:00
sarbes
40497ca3a9 lima: genxml-ify PP frame registers
Most (all?) PP frame registers are now documented in genxml. Most of the magic values written to the registers are gone.

v2:
- moved default values out of genxml
- commented on stencil truncation

v3:
- fixed comment typo

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34210>
2025-05-24 00:45:27 +00:00
sarbes
eb61a607d8 lima: add 'unorm8' format to genxml
This MR allows packing of (normalized) floats into an 8 bit field.

v2:
- removed default attribute

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34210>
2025-05-24 00:45:27 +00:00
Christian Gmeiner
41f2da1a6e treewide: Do not use NIR_PASS_V for nir_divergence_analysis(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35131>
2025-05-23 21:19:25 +00:00
Caleb Callaway
e7454f5318 intel/debug: shader dump filter
v2: Fixes filtering for various brw shader dump logic

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35061>
2025-05-23 19:57:02 +00:00
Caleb Callaway
5a36452158 intel/perf: intel_monitor documentation tweak
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35061>
2025-05-23 19:57:02 +00:00
Mel Henning
59308f92bf nak: Call nir_lower_undef_to_zero
Totals:
CodeSize: 4571686864 -> 4545122720 (-0.58%); split: -0.59%, +0.01%
Number of GPRs: 10994283 -> 10963889 (-0.28%); split: -0.28%, +0.00%
SLM Size: 1893964 -> 1855380 (-2.04%)
Static cycle count: 1114502308 -> 1104322907 (-0.91%); split: -0.93%, +0.02%
Spills to memory: 573363 -> 480689 (-16.16%)
Fills from memory: 573363 -> 480689 (-16.16%)
Spills to reg: 1625502 -> 458804 (-71.77%); split: -71.78%, +0.00%
Fills from reg: 878478 -> 303068 (-65.50%); split: -65.50%, +0.00%
Max warps/SM: 7235748 -> 7245516 (+0.13%)

Totals from 25050 (12.75% of 196502) affected shaders:
CodeSize: 1870779504 -> 1844215360 (-1.42%); split: -1.45%, +0.03%
Number of GPRs: 2578387 -> 2547993 (-1.18%); split: -1.18%, +0.00%
SLM Size: 890840 -> 852256 (-4.33%)
Static cycle count: 439061010 -> 428881609 (-2.32%); split: -2.37%, +0.05%
Spills to memory: 268807 -> 176133 (-34.48%)
Fills from memory: 268807 -> 176133 (-34.48%)
Spills to reg: 1485538 -> 318840 (-78.54%); split: -78.54%, +0.00%
Fills from reg: 753623 -> 178213 (-76.35%); split: -76.35%, +0.00%
Max warps/SM: 556844 -> 566612 (+1.75%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35100>
2025-05-23 19:41:31 +00:00
Mel Henning
9d620fabd2 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>
2025-05-23 19:41:31 +00:00
Eric Engestrom
162f1f5566 delete xa leftovers
Fixes: 3be2c47db2 ("delete the XA frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35136>
2025-05-23 18:54:04 +00:00
Eric Engestrom
e3d8f4c135 lavapipe/ci: skip timing out tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
31a5039b38 lavapipe/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
84bbee22f4 rpi/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
30dedadc53 rpi/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
cde3351213 amd/ci: document radv flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
286204404a amd/ci: document radeonsi flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
2beeac9484 r300/ci: document fixed test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
5969df364a radeonsi/ci: document fixed piglit tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Eric Engestrom
7707e17cd4 radv/ci: document fixed angle test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35135>
2025-05-23 18:30:30 +00:00
Mike Blumenkrantz
00aaef9f12 delete gallium-nine
farewell, old friend

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Axel Davy <davyaxel0@gmail.com>
Acked-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34887>
2025-05-23 13:43:37 -04:00
Mike Blumenkrantz
3be2c47db2 delete the XA frontend
this is unmaintained and untested

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34823>
2025-05-23 12:46:23 -04:00
Sil Vilerino
c4b6285c81 mr-label-maker.yml: Add mediafoundation tag and associated directories
Reviewed-by: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34843>
2025-05-23 15:30:04 +00:00
Pohsiang (John) Hsu
d348fd5fb5 mediafoundation: Add mediafoundation frontend
Reviewed-by: <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34843>
2025-05-23 15:30:04 +00:00
Rob Clark
45a2f02876 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>
2025-05-23 15:27:16 +00:00
Mike Blumenkrantz
42b303c7b0 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>
2025-05-23 14:53:02 +00:00
Mike Blumenkrantz
753d3e71d3 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>
2025-05-23 14:53:02 +00:00
José Roberto de Souza
ddca50584c intel: Return PTL stepping
Without this no temporary workaround is applied to PTL as by
default INTEL_STEPPING_RELEASE is returned and it is larger than
any stepping.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35110>
2025-05-23 13:52:27 +00:00
Mike Blumenkrantz
c78d6bc4c3 ci: disable panfrost-t720-gles2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054>
2025-05-23 13:21:29 +00:00
Mike Blumenkrantz
2eb45daa9c gallium: de-pointerize pipe_surface
this allows eliminating surface refcounting and objects
which, relatively speaking, don't serve much purpose

see MR for details

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054>
2025-05-23 13:21:29 +00:00
Mike Blumenkrantz
506c8f9b76 mesa: remove gl_renderbuffer::surface
this is just a convenience alias

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054>
2025-05-23 13:21:29 +00:00
Mike Blumenkrantz
c374bfd864 ci: set -Wno-error=deprecated-declarations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054>
2025-05-23 13:21:29 +00:00
Mike Blumenkrantz
7999b8024c util/inlines: constify pipe_surface_equal()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054>
2025-05-23 13:21:29 +00:00
Mike Blumenkrantz
7154116220 gallium: pipe_surface_release -> pipe_surface_unref
this is a more accurate name for the function and will avoid confusion
with the 'release' mechanism of other objects

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34054>
2025-05-23 13:21:28 +00:00
Lionel Landwerlin
39f55541a3 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>
2025-05-23 12:56:31 +00:00
Christian Gmeiner
9da5eafa8e util/perf: Add sysprof integration
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34893>
2025-05-23 11:27:14 +00:00
Christian Gmeiner
8358d44223 util/perf: Change _mesa_trace begin functions to return void *
This enables implementations to pass context data between begin and
end tracing points, which is useful for more complex performance monitoring.

The change is minimal and only affects the function signatures and return
values, with no functional changes to existing behavior.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34893>
2025-05-23 11:27:14 +00:00
Lionel Landwerlin
2418525b2e anv: avoid 64bit atomics emulation on Xe2+
Xe2+ still requires lowering 64bit image load/store to 2x32bit for the
message format. But atomics work without lowering.

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/34876>
2025-05-23 10:04:29 +00:00
Mauro Rossi
ff6b181c2d 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>
2025-05-23 08:58:03 +02:00
Samuel Pitoiset
a4a59a2504 radv: eliminate useless mov(const) after lowering all IO to scalar
This eliminates useless mov copies introduced by nir_lower_io_to_scalar
and this might be useful for nir_opt_varyings which optimizes
constant varyings.

It also uncovers a bug with mesh shader and constant varyaings that is
fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35081.

No fossils-db change on NAV21.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35090>
2025-05-23 05:56:31 +00:00
Timothy Arceri
3ec68e8382 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>
2025-05-23 00:51:04 +00:00
Paulo Zanoni
d77b49eb0a 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>
2025-05-23 00:17:18 +00:00
Dmitry Baryshkov
5c43cf823c 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>
2025-05-22 23:30:20 +00:00
Karol Herbst
abbb0c0125 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>
2025-05-22 22:59:08 +00:00
Karol Herbst
bc444f6d26 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>
2025-05-22 22:59:08 +00:00
Dmitry Baryshkov
31cf6b94ad 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>
2025-05-22 22:18:34 +00:00
Sushma Venkatesh Reddy
6d226ceca1 intel/compiler: Call brw_try_override_assembly independent of debug flag
Previously, brw_try_override_assembly was only called when a debug flag was
enabled. However, during investigations involving workloads such as Steam
games, enabling the debug flag results in excessive NIR and ISA output to
stderr, making debugging more difficult.

This change ensures that brw_try_override_assembly is called when the
INTEL_SHADER_ASM_READ_PATH is set, regardless of the debug flag. This
improves usability in scenarios where minimal debug output is desired.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35115>
2025-05-22 21:45:38 +00:00
Dylan Baker
51b51eb676 anv: Add comment why we overmap and then unmap a region
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35114>
2025-05-22 21:14:26 +00:00
Dylan Baker
25dd3923dc anv: attempt to make coverity happy
Coverity is upset that we're using `ptr` after we've `munmap`ed up to
the offset of the region, even though we're just moving past the
unmapped region to the still mapped region. Attempt to make it happy by
doing that calculation before unmapping. If it's still mad there's
nothing left we can do.

CID: 1646981
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
CID: 1646956
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35114>
2025-05-22 21:14:26 +00:00
Dylan Baker
ff5cb90880 anv: avoid potential integer overflow
Coverity points out that we're using a 32bit type on the left side here,
so the entire operation is done as 32 bit instead of 64

CID: 1646960
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35114>
2025-05-22 21:14:26 +00:00
Dylan Baker
2a3cf70db8 blorp: cast uint32_t -> int64_t to avoid potential overflow
In practice, I don't think it's actually going to overflow, but it could
in theory, which coverity is pointing out.

CID: 1647010
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35114>
2025-05-22 21:14:26 +00:00
Gurchetan Singh
f1a9c2b55c gfxstream: fix missing include
Initial Kumquat build broken.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35120>
2025-05-22 20:56:58 +00:00
Christian Gmeiner
ea73edde07 asahi: Don't use deprecated NIR_PASS_V macro
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35118>
2025-05-22 20:40:32 +00:00
Dmitry Baryshkov
aa2ff0261b ir3: enable lower_pack_64_4x16
The compiler won't be able to emit pack_64_4x16. Fix infinite
optimization loop caused in nir_opt_algebraic caused by it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13223
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35112>
2025-05-22 20:17:55 +00:00
Christian Gmeiner
86f7ce06be 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>
2025-05-22 20:01:06 +00:00
Calder Young
b0eb715b50 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>
2025-05-22 19:34:46 +00:00
Gurchetan Singh
126af1feb9 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>
2025-05-22 18:43:51 +00:00
Yiwei Zhang
d7f6400762 venus: force different device on NV proprietary
If forcing prime blit via disabling modifier support is not sufficient,
take a step further to force different device so that the memory type
choice is more conservative.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34965>
2025-05-22 11:03:47 -07:00
Lars-Ivar Hesselberg Simonsen
64ce37b2d9 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>
2025-05-22 15:39:10 +00:00
Lars-Ivar Hesselberg Simonsen
e6e406de0e 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>
2025-05-22 15:39:10 +00:00
Lars-Ivar Hesselberg Simonsen
0a47a1cb6d 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>
2025-05-22 15:39:10 +00:00
Lars-Ivar Hesselberg Simonsen
a6c7a774ab 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>
2025-05-22 15:39:10 +00:00
Alyssa Rosenzweig
8e9d7c3a84 docs/features: add honeykrisp
I'm tired.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35108>
2025-05-22 15:32:48 +00:00
Romaric Jodin
ffdc08dfb6 panvk: add support for {s,u}dot_4x8_{sat}
Generate IDPADD instruction to support integer dot product
Support is added for both signed/unsigned dot product as well as
saturated dot product.
Support is only for v9+.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34812>
2025-05-22 14:39:32 +00:00
Romaric Jodin
dc1c701489 panfrost: Update bifrost_isa.py to support saturate for valhall
Add support for <saturate/> as valhall ISA.xml uses it instead of <mod
name="saturate"/>.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34812>
2025-05-22 14:39:32 +00:00
Romaric Jodin
67ca56d7ad panfrost: bi_builder.h.py: stop generating unneeded parentheses
Generate typecheck condition later to be able to know whether extra
parentheses are needed.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34812>
2025-05-22 14:39:32 +00:00
Calder Young
8547f8b557 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>
2025-05-22 09:43:01 +00:00
David Rosca
1608bc20b5 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>
2025-05-22 09:20:51 +00:00
David Rosca
1f795ec226 radv/video: Remove carrizo workaround from VCN decode
Carrizo has UVD so this can never be true.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35105>
2025-05-22 09:20:50 +00:00
Juan A. Suarez Romero
79045337bc broadcom/ci: add skqp testing
As part of the nightly runs.

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/35104>
2025-05-22 09:02:33 +00:00
David Rosca
63e952ff2c radv/video: Support encoding multiple slices
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12285
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35070>
2025-05-22 08:40:17 +00:00
Lionel Landwerlin
b036d2ded2 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>
2025-05-22 07:49:20 +00:00
Lionel Landwerlin
df15968813 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>
2025-05-22 07:49:20 +00:00
Lionel Landwerlin
b204153106 anv: add a comment about Wa_14016820455
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/35101>
2025-05-22 07:31:49 +00:00
Stéphane Cerveau
72a1c4ffb2 radv/debug: use common path for dmesg and tail
popen does not find the command when the full path
is not specified.

Chose /bin as the main location for both dmesg and tail to keep
compatibility with old distribution and possible embedded rootfs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35087>
2025-05-22 07:05:03 +00:00
Sushma Venkatesh Reddy
524733a990 intel/compiler: Centralize type stomping logic for Gen12.5 restrictions
This patch improves code readability by centralizing the type stomping
logic for Gen12.5 region restrictions in `brw_lower_alu_restrictions`.
It removes redundant comments and ensures type consistency assertions
in `brw_broadcast`, `generate_mov_indirect`, and `generate_shuffle`.

Thank you Ken for guiding me on this.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35006>
2025-05-22 06:46:18 +00:00
Erik Faye-Lund
80f6b5b483 pan/ci: remove no longer failing test
No idea why this was failing on CI in the first place, as I can't
reproduce it failing locally at any point. But at some point recently,
this also stopped failing on CI as well. It's not clear what caused
this, but I can't find anything in the history around the time it
changed that seems particularly suspicious either.

Let's just accept the new behavior, and investegate further if it
reappears.

Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35085>
2025-05-21 20:47:09 +00:00
Mel Henning
61d9911bba nak: Bias RA to find clear spaces for vector dests
Try to find a space where the entire vec will fit when allocating one of
its components.

Totals:
CodeSize: 5750619392 -> 5654953920 (-1.66%); split: -1.75%, +0.09%
Static cycle count: 1497053946 -> 1493196467 (-0.26%); split: -0.43%, +0.18%

Totals from 163626 (83.27% of 196502) affected shaders:
CodeSize: 5498993328 -> 5403327856 (-1.74%); split: -1.83%, +0.09%
Static cycle count: 1423951803 -> 1420094324 (-0.27%); split: -0.46%, +0.19%

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35033>
2025-05-21 19:40:02 +00:00
Mel Henning
a24a001209 nak: Change parameters to try_find_unset_reg_range
The new argument order matches BitSet::find_aligned_unset_region() and
adds an align_offset parameter.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35033>
2025-05-21 19:40:02 +00:00
Mel Henning
22401cd49e compiler/rust/bitset: find_aligned_unset_region()
Add a new helper and use it from within nak.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35033>
2025-05-21 19:40:02 +00:00
Lorenzo Rossi
4d07e940c7 nak/opt_copy_prop: convert b2i-i2b into copy
Previously i2b(b2i(x)) optimization was only done in src parameters, and
not applied if the bool predicate was used for predicated execution.
Instead of copying the same behavior of the src code into predicates,
this commit converts i2b(b2i(x)) into a copy(x), reusing the same code
paths for copy propagation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35027>
2025-05-21 18:58:06 +00:00
Yiwei Zhang
a312bb4285 venus: refactor wsi acquire to use semaphore and fence SYNC_FD import
This drops separate vn_fence_signal_wsi and vn_semaphore_signal_wsi
helpers for consistency and robustness. The behavior now aligns with the
Android WSI vkAcquireImageANDROID impl. This is to prepare for
installing an actual payload from the compositor side.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35079>
2025-05-21 18:41:23 +00:00
Yiwei Zhang
b19e470802 venus: update docs and drop obsolete code for prime blit
The spec has been clarified long ago. Meanwhile, prime blit in common
wsi has become more legit over the time, and the handling in venus has
been obsolete for a while. For now, I just dropped all obsolete code for
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35034, which
has taken care of the pipeline barriers for prime blit dst buffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35079>
2025-05-21 18:41:23 +00:00
Yiwei Zhang
47b207726c venus: avoid false assert for MESA_VK_WSI_DEBUG=sw,linear
Forcing linear cpu image is supported via venus.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35079>
2025-05-21 18:41:23 +00:00
Yiwei Zhang
e6481d3f42 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>
2025-05-21 18:04:45 +00:00
Patrick Lerda
1f4e3d56de r600: add r600_nir_lower_txl_txf_array_or_cube metadata compatibility
../src/compiler/nir/nir_metadata.c:172: nir_metadata_check_validation_flag: Assertion `!(impl->valid_metadata & nir_metadata_not_properly_reset)' failed.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34155>
2025-05-21 17:46:02 +00:00
Patrick Lerda
546acfbc31 r600: add r600_nir_lower_int_tg4 metadata compatibility
../src/compiler/nir/nir_metadata.c:172: nir_metadata_check_validation_flag: Assertion `!(impl->valid_metadata & nir_metadata_not_properly_reset)' failed.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34155>
2025-05-21 17:46:02 +00:00
Patrick Lerda
b3e0d7e8e9 r600: add r600_lower_shared_io metadata compatibility
../src/compiler/nir/nir_metadata.c:172: nir_metadata_check_validation_flag: Assertion `!(impl->valid_metadata & nir_metadata_not_properly_reset)' failed.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34155>
2025-05-21 17:46:02 +00:00
Patrick Lerda
2ea6e67dcf r600: add r600_lower_tess_io metadata compatibility
../src/compiler/nir/nir_metadata.c:172: nir_metadata_check_validation_flag: Assertion `!(impl->valid_metadata & nir_metadata_not_properly_reset)' failed.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34155>
2025-05-21 17:46:01 +00:00
LingMan
3fbee8bae6 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>
2025-05-21 17:11:08 +00:00
LingMan
040ef8f5c9 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>
2025-05-21 17:11:08 +00:00
Mel Henning
3ab29ffca0 nak: Use nir membar optimizations
Call nir_opt_barrier_modes and nir_opt_acquire_release_barriers.

Totals:
CodeSize: 5750619392 -> 5750618656 (-0.00%)
Number of GPRs: 16276896 -> 16276898 (+0.00%)
Static cycle count: 1497053946 -> 1497053776 (-0.00%); split: -0.00%, +0.00%
Spills to reg: 9143000 -> 9143006 (+0.00%)
Fills from reg: 6892354 -> 6892360 (+0.00%)

Totals from 14 (0.01% of 196502) affected shaders:
CodeSize: 786432 -> 785696 (-0.09%)
Number of GPRs: 1294 -> 1296 (+0.15%)
Static cycle count: 153230 -> 153060 (-0.11%); split: -0.14%, +0.03%
Spills to reg: 1360 -> 1366 (+0.44%)
Fills from reg: 947 -> 953 (+0.63%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35055>
2025-05-21 15:59:35 +00:00
Connor Abbott
eb21e2471b freedreno: Fix CP_RESET_CONTEXT_STATE bitfield names
Based on kgsl.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35080>
2025-05-21 15:36:06 +00:00
Boris Brezillon
7164208efb pan/texture: Don't mix image and buffer views
Specialize the texture emission logic for buffer views, which are much
simpler to deal with than image views.

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>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34767>
2025-05-21 15:03:37 +02:00
Boris Brezillon
a6157e8dd5 pan/texture: s/pan_texture_emit/pan_sampled_texture_emit/
Reflect the expected usage in the function name.

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>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34767>
2025-05-21 15:02:44 +02:00
Boris Brezillon
949206a593 pan/layout: Split pan_image_layout
Split pan_image_layout into two pieces:

- pan_image_props containing all the properties set by the user of
  pan_image_layout_init()
- pan_image_layout containing all the information constructed from
  the image properties to describe the pixel layout

This allows us to clearly identify what's set by the user and what's
initialized from it. It will also allow us to share the image props
for multi-plane images.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
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/34767>
2025-05-21 15:02:17 +02:00
Eric R. Smith
bb999ae466 pan/layout: Use _{B,el,px,sb} suffixes to clarify things
Improve the layout code, based in part on the Asahi/Intel layout.
Suffixes like `_px` (for pixel), `_B` (for byte), `_el` (for element)
and `_sb` (for superblock) make some of the sizes of items within the
layout more explicit.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
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/34767>
2025-05-21 15:00:06 +02:00
Boris Brezillon
97e0fdbd4d pan/image: Get rid of pan_image_mem::offset
We can simply adjust pan_image_mem::base to take the memory offset into
account.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
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/34767>
2025-05-21 14:59:04 +02:00
Boris Brezillon
2952c6d789 pan: Add a pan_image_mip_level_size() helper and use it for 3D attribute initialization
Right now, 3D attribute buffers are set to cover the bytes remaining
in the BO starting from the plane surface offset, which works but
doesn't provide an accurate information about where the storage image
section is supposed to stop.

Let's provide a pan_image helper to query the size covered by a MIP
level, and use it in panvk/panfrost.

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>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34767>
2025-05-21 14:58:52 +02:00
Boris Brezillon
086bcbe186 pan: Use a consistent pan_ prefix across src/panfrost/*
We've been inconsistenly using panfrost_ and pan_ as a prefix for
the common helpers/structs. Let's finally make a clear cut by
prefixing everything that lives in src/panfrost/* with pan_.

No functional changes here, this is just renaming and reformatting
changes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
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/34767>
2025-05-21 14:58:20 +02:00
Boris Brezillon
a936013311 pan: Draw a clear line between image layout, image and texture helpers
This involves moving helpers in separate pan_{layout,image,texture}.{c,h}
files, and renaming some of the helper/structs to clarify their purpose.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
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/34767>
2025-05-21 14:58:16 +02:00
Boris Brezillon
c847d4fac3 pan/layout: Refactor WSI explicit image layout support
There's no point exposing a panfrost_from_legacy_stride() if all
users of pan_image_layout_init() passing an explicit layout
fill pan_image_explicit_layout::row_pitch_B with the result of
panfrost_from_legacy_stride(). We can directly calculate the row stride
inside pan_image_layout_init().

While at it, replace panfrost_get_legacy_stride() by a
pan_image_layout_get_wsi_layout() helper.

Note that we need to adjust the LegacyStride unittests to take the
alignment constraints into account, which is probably a good thing
awyway.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
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/34767>
2025-05-21 14:58:12 +02:00
Boris Brezillon
a794ea6f9f pan: Consolidate AFRC helpers in a single source file
Create a pan_afrc.h header gathering all AFRC-related helpers spread
across pan_layout.c, pan_texture.{c,h} and pan_afbc.c.

By making them inline functions, we also allow for extra compile-time
optimizations.

While at it, we pick a consistent pan_ prefix instead of the
pan_/panfrost_ mix we currently have.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@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/34767>
2025-05-21 14:57:55 +02:00
Boris Brezillon
0807d26a29 pan: Consolidate AFBC helpers in a single source file
Create a pan_afbc.h header gathering all AFBC-related helpers spread
across pan_layout.c, pan_texture.{c,h} and pan_afbc.c.

By making them inline functions, we also allow for extra compile-time
optimizations.

While at it, we pick a consistent pan_ prefix instead of the
pan_/panfrost_ mix we currently have.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@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/34767>
2025-05-21 14:57:37 +02:00
Boris Brezillon
cea9b04b59 pan: Rename/move panfrost_format_supports_mtk_tiled()
Use pan_ instead of panfrost_ as a prefix, and move the function to
pan_format.h, since this modifier has nothing to do with AFBC. We keep
it in pan_format.h since the amount of code doesn't justify having a
separate file for MTK tiling.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@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/34767>
2025-05-21 14:57:14 +02:00
Boris Brezillon
ce7667b4a9 pan/format: Change the way we expose supported modifiers
Let's turn the pan_best_modifiers[] array into a PAN_SUPPORTED_MODIFIERS()
macro, such that:

- we don't have to update PAN_MODIFIER_COUNT when adding new modifiers
- we can let the compiler see through the values inside this array and
  possibly optimize the modifier selection loop

While at it, we move this new PAN_SUPPORTED_MODIFIERS() macro to
pan_format.h, since modifiers and formats are kinda related, and
pan_layout.c/pan_texture.h were not a great fit.

Also move the drm_is_xxx() macros to pan_format.h, to be consistent.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@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/34767>
2025-05-21 14:56:56 +02:00
Boris Brezillon
67e574f1bd pan: Drop the format argument passed to drm_is_mtk_tiled()
It's not used, and we shouldn't have to check the format to identify
a modifier anyway.

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>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34767>
2025-05-21 14:55:40 +02:00
Boris Brezillon
022e3cb66a pan/format: Make pan_format::bind a 5-bit field
This way, a pan_format instance fits into a single u32. This forces us
to have an explicit translation in pipe_to_pan_bind_flags(), which is
probably a good thing anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@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/34767>
2025-05-21 14:55:13 +02:00
Job Noorman
8b2e57aaf6 freedreno/drm-shim: add support for MSM_PARAM_UCHE_TRAP_BASE
Just return the default value from tu_drm_get_uche_trap_base.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35084>
2025-05-21 11:29:31 +00:00
Samuel Pitoiset
25eb836eec radv: fix CP DMA with NULL PRT pages on GFX8-9
On GFX8-9 (starting from Polaris10), CP DMA is broken with NULL PRT
pages. It doesn't read 0 and doesn't discard writes which can cause
GPU hangs.

Fix that by always using the compute path when a BO is sparse.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12828
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35071>
2025-05-21 09:41:23 +00:00
Samuel Pitoiset
235f70e475 ac/gpu_info: add has_cp_dma_with_null_prt_bug
CP DMA is broken on GFX8-9 with NULL PRT pages. The workaround is to
use compute instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35071>
2025-05-21 09:41:23 +00:00
Eric Engestrom
85d2c8f8ae docs: add sha sum for 25.1.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35083>
2025-05-21 09:34:40 +00:00
Eric Engestrom
58995ad436 docs: add release notes for 25.1.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35083>
2025-05-21 09:34:40 +00:00
Eric Engestrom
1e5a6fa564 docs: update calendar for 25.1.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35083>
2025-05-21 09:34:40 +00:00
Valentine Burley
dc483ea924 ci: Remove firmware from test-base
Firmware packages continue to grow in size, so stop installing them in
the test-base image.

The necessary firmware is now collected and uploaded per vendor in an
external repository.

LAVA devices can opt into optional firmware by specifying the name of the
archive via LAVA_FIRMWARE.

For bare-metal, Qualcomm firmware required for DUTs in the Google lab is
included in the baremetal image.

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

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34861>
2025-05-21 08:48:15 +00:00
Valentine Burley
a394b7b64c amd/ci: Update kernel for Raven
This updated kernel allows loading .xz compressed firmware files.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34861>
2025-05-21 08:48:14 +00:00
Guilherme Gallo
afaa236803 ci/lava: make overlay->compression optional
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34861>
2025-05-21 08:48:14 +00:00
Michel Dänzer
ce268d1a4b amd/ci: Add cl profile on rusticl in radeonsi-raven-piglit job
There's been a number of regressions with rusticl on radeonsi lately,
hopefully this will catch at least some of them.

v2:
* Reference .rusticl-rules. (Valentine Burley)
* Move rusticl fails to their own section at the end of the file.
  (LaughingMan)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35066>
2025-05-21 08:19:19 +00:00
Samuel Pitoiset
6528bb76b1 radv: stop using GDS for emulated prims gen/xfb queries on GFX11-GFX11.5
Use the same path as GFX12 using SSBO atomics because performance
should be equal or slightly better due to less synchronization.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35017>
2025-05-21 08:48:04 +02:00
Samuel Pitoiset
2812efd7ad radv: declare and emit NGG_QUERY_BUF_VA on GFX11-GFX11.5
This user SGPR is used to pass the query buffer VA for emulated queries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35017>
2025-05-21 08:46:12 +02:00
Samuel Pitoiset
439baafe5e radv: increase size of the buffer for emulated queries on GFX12
This increases this buffer by 20 bytes but it will be re-used for
emulated queries on GFX11-GFX11.5 in order to remove the GDS path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35017>
2025-05-21 08:46:12 +02:00
Samuel Pitoiset
98c1753214 radv: stop reserving NGG streamout counters
NGG streamout counters use GDS_OA, not GDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35017>
2025-05-21 08:46:12 +02:00
Samuel Pitoiset
3922cc6fbd radv: rename a variable in gfx10_copy_shader_query_ace()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35017>
2025-05-21 08:46:12 +02:00
Samuel Pitoiset
266c3bdeaf radv: adjust comments describing GDS needs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35017>
2025-05-21 08:46:12 +02:00
Iván Briano
815bcda06d anv: enable VK_KHR_fragment_shader_barycentric
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:59 +00:00
Iván Briano
6268792a29 anv: set HW state for fragment shader barycentric
When the FS requires it, set the VertexAttributeBypass and
LegacyBaryAssignmentDisable bits accordingly.

Also program the provoking vertex to give us the per-vertex attributes
in the order the Vulkan specification dictates, and track its dynamic
value for the FS to pick up constant interpolated inputs correctly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:59 +00:00
Iván Briano
27a2f6d1ff brw: add lowering passes for FS barycentric inputs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:59 +00:00
Iván Briano
8ee14e5291 brw/anv: add provoking vertex to fs_msaa_flags
This will be necessary to select the right value for flat inputs in
fragment shaders when fragment shader barycentrics are in use.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:58 +00:00
Iván Briano
acdd30a9da brw: check if the FS needs vertex_attributes_bypass to be set
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:58 +00:00
Iván Briano
c327b83706 brw: implement load_input_vertex intrinsic
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:58 +00:00
Iván Briano
4c1f9554f5 intel/genxml: update some instructions for Xe2+
3DSTATE_CLIP and 3DSTATE_SF add:
 - Triangle Strip Odd Provoking Vertex Select
3DSTATE_RASTER:
 - Legacy Bary Assignment Disable
3DSTATE_SBE:
 - Vertex Attributes Bypass

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34445>
2025-05-20 20:57:58 +00:00
Valentine Burley
4696d12f8b freedreno/ci: Re-enable a618-piglit
With the a630's offline, this restorer pre-merge piglit coverage.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35018>
2025-05-20 20:36:33 +00:00
Valentine Burley
09e713f46b freedreno/ci: Update piglit expectations on a618
Fixes: 65e18a8494 ("freedreno: Fix shader-clock when kernel exposes UCHE_TRAP_BASE")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35018>
2025-05-20 20:36:33 +00:00
Valentine Burley
2815e803ae freedreno/ci: Disable all a630 jobs
The cheza DUTs are retired and no longer active.
The pre-merge jobs have already been disabled, do the same for the
nightly ones as well.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35018>
2025-05-20 20:36:33 +00:00
Konstantin Seurer
f4a233a34e llvmpipe: Reduce the size of lp_descriptor
Now that the descriptor does not have to store the texeture layout, the
size can be reduced (to 64 bytes).

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35043>
2025-05-20 20:10:16 +00:00
Konstantin Seurer
8d11da0c10 llvmpipe: Make more texture state static with bindless
Because almost everything is compiled on demand, this can be done
without blowing up the compiled sample function count. Making this
static improves performance by a bit and will make it possible to reduce
the descriptor size.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35043>
2025-05-20 20:10:16 +00:00
Konstantin Seurer
ab35233f79 llvmpipe: Compile size query functions on demand
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35043>
2025-05-20 20:10:16 +00:00
Konstantin Seurer
7e9182e6ee llvmpipe: Compile fewer unnecessary functions
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35043>
2025-05-20 20:10:16 +00:00
Konstantin Seurer
d30593ae3d llvmpipe: Compile texture fetch functions on demand
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35043>
2025-05-20 20:10:16 +00:00
Mike Blumenkrantz
427678c025 egl: handle DRI_PRIME with surfaceless
this is mostly a direct port of the wayland handling

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

Tested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34610>
2025-05-20 19:42:57 +00:00
Gurchetan Singh
c7c72d1d68 gfxstream: add VulkanMapper
This adds logic for a singleton VulkanMapper to be used with
Kumquat.  The main goal is remove the Vulkano dependency on
virtgpu_kumquat, so it's more portable.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34884>
2025-05-20 19:16:27 +00:00
Eric Engestrom
b03d5ecad3 ci: uprev vkd3d
7eef0a64e3...7e829e8836

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35074>
2025-05-20 18:40:28 +00:00
Aditya Swarup
ac863b8b15 iris: Disable fast clear when surface width is 16k
HSD 16023071695 description mentions we need to extend
WA_16021232440 to cover the case when surface width is 16k.

BSpec: 57340

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34838>
2025-05-20 10:44:52 -07:00
Aditya Swarup
6528d267ef anv: Disable fast clear when surface width is 16k
HSD 16023071695 description mentions we need to extend
WA_16021232440 to cover the case when surface width is 16k.

BSpec: 57340

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34838>
2025-05-20 10:44:52 -07:00
Konstantin Seurer
8edee1e25b lavapipe: Fail device enumeration when DRAW_USE_LLVM=0 is set
DRAW_USE_LLVM=0 is not supported and crashes.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35036>
2025-05-20 16:54:19 +00:00
Rhys Perry
072e6d1ab5 aco/tests: add tests for tied definitions
Some of these would have failed before the rewrite.

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/34700>
2025-05-20 15:40:47 +00:00
Rhys Perry
b341a12526 aco/ra: rewrite handling of tied definitions
The old version worked by precoloring both the operand and definition to
whatever register the operand was at the time. This didn't allow moving
the operand/definition after precoloring them, or two tied operands with
the same temporary.

The new version works by temporarily making the operands late kill and
creating a copy if the temporary is live-through or used as another tied
operand. Then we can simply later make the operands early kill again and
assign the definitions to the operand's register.

This way, we can move the operand to make space and the new location will
not intersect with any other definition and won't cause the operand and
definition registers to mismatch.

fossil-db (gfx1201):
Totals from 2253 (2.84% of 79377) affected shaders:
Instrs: 1634747 -> 1630799 (-0.24%); split: -0.27%, +0.03%
CodeSize: 8688148 -> 8672348 (-0.18%); split: -0.20%, +0.02%
VGPRs: 106500 -> 106512 (+0.01%)
Latency: 11385480 -> 11382965 (-0.02%); split: -0.04%, +0.01%
InvThroughput: 1754430 -> 1754326 (-0.01%); split: -0.01%, +0.00%
SClause: 38954 -> 38964 (+0.03%); split: -0.01%, +0.04%
Copies: 110772 -> 110800 (+0.03%); split: -0.02%, +0.04%
Branches: 29093 -> 29092 (-0.00%)
VALU: 902011 -> 902008 (-0.00%)
SALU: 260175 -> 260203 (+0.01%); split: -0.01%, +0.02%

fossil-db (navi31):
Totals from 2 (0.00% of 79377) affected shaders:
Latency: 1766 -> 1765 (-0.06%)
InvThroughput: 3219 -> 3215 (-0.12%)

fossil-db (navi21):
Totals from 14 (0.02% of 79377) affected shaders:
(no affected stats)

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/34700>
2025-05-20 15:40:47 +00:00
Rhys Perry
cdf3767001 aco: set copy-kill for tied operands with the same temporary
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/34700>
2025-05-20 15:40:47 +00:00
Rhys Perry
f783f5df6d aco/ra: move optimize_encoding earlier
We have to handle tied definitions after optimize_encoding, but a rewrite
of that will need the register file from before clearing the killed
operands.

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/34700>
2025-05-20 15:40:47 +00:00
Rhys Perry
fd05181a26 aco/ra: replace skip_renaming with copy_kill
This will be used in the next commit.

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/34700>
2025-05-20 15:40:46 +00:00
Rhys Perry
c04ef28c56 aco: rename ops_fixed_to_def to tied_defs
This is less words.

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/34700>
2025-05-20 15:40:46 +00:00
Dmitry Baryshkov
275a39b3c6 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>
2025-05-20 15:21:06 +00:00
Eric Engestrom
6c1968df19 ci/container: fix whitespace for yamllint
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35068>
2025-05-20 14:51:18 +00:00
Eric Engestrom
76ca28865b ci: avoid unsetting S3_JWT too early in container image builds
Fixes: 0a52d00393 ("ci: clear S3_JWT_FILE_SCRIPT as it also contains the S3_JWT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35068>
2025-05-20 14:51:18 +00:00
Mary Guillemard
eafe2527b5 panvk: Clean up some todo comments about already supported extensions
We forgot to edit some comments when enabling some extensions, this
clean this up.

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/35065>
2025-05-20 14:20:23 +00:00
Mary Guillemard
8a3b89db95 panvk: Advertise support for VK_EXT_image_2d_view_of_3d
This is already supported, we just need to toggle the switch.

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/35065>
2025-05-20 14:20:23 +00:00
Mary Guillemard
43d84078e6 panvk: Advertise support for VK_EXT_primitive_topology_list_restart
This is already supported, we just need to toggle the switch.

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/35065>
2025-05-20 14:20:23 +00:00
Samuel Pitoiset
4d1fcd75f9 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>
2025-05-20 13:57:35 +00:00
Samuel Pitoiset
7ce7009ee4 radv/meta: move and rename get_r32g32b32_format()
For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34971>
2025-05-20 13:30:07 +00:00
Samuel Pitoiset
b7ce612743 radv: add vk_format_is_96bit()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34971>
2025-05-20 13:30:07 +00:00
Samuel Pitoiset
c22d86e844 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>
2025-05-20 13:06:51 +00:00
Samuel Pitoiset
e345b03c89 ac/gpu_info: rename has_zerovram_support to has_default_zerovram_support
To avoid confusion between RADEON_FLAG_ZERO_VRAM and default VRAM
allocation clears since AMDGPU 3.59+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35021>
2025-05-20 12:43:59 +00:00
Samuel Pitoiset
d7099675b6 radv: expose VK_EXT_zero_initialize_device_memory unconditionally
This extension doesn't require AMDGPU to clear VRAM on allocations by
default. RADEON_FLAG_ZERO_VRAM exists since the beginning.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35021>
2025-05-20 12:43:59 +00:00
Tapani Pälli
5828612da2 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>
2025-05-20 10:58:53 +00:00
Tapani Pälli
0f591425c9 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>
2025-05-20 10:58:53 +00:00
Juan A. Suarez Romero
73409e7cc5 broadcom/v3dv: skip implicit synchronization tests
Something is not working correctly when running Vulkan implicit
synchronization tests. They are affecting other tests running in
parallel in the sense that they go from taking a few seconds to time
out.

Let's skip them until we find where is the problem, as this is affecting
the CI with several flakes and timeouts.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35064>
2025-05-20 12:00:03 +02:00
Georg Lehmann
0257644130 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>
2025-05-20 08:24:21 +00:00
Guilherme Gallo
e9e98d997d ci/lava: Parametrize message burst length on unit tests
We can have jobs with a lower job timeout values, given by
CI_JOB_TIMEOUT environment variable, such as the pytest ones.

The previously hardcoded burst length of 1000 messages at a simulated
rate of 1 msg/sec caused tests to exceed these timeouts and fail
unexpectedly on specific job timeouts.

Reported-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/34907>
2025-05-19 22:44:21 +00:00
Guilherme Gallo
e7f6b4bdae ci/lava: Improve timeout estimation logic for case/suite runs
Some jobs, like those using pytest, have lower `CI_JOB_TIMEOUT` values.
This change ensures that the estimated LAVA overhead (in minutes) is
compatible with the actual job timeout, failing early with an assertion
and also avoiding mismatches and unintended timeouts.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34907>
2025-05-19 22:44:21 +00:00
Karol Herbst
41a18a27b0 radeonsi: fix variable_shared_size assert in si_switch_compute_shader
shader->selector->stage is always set to COMPUTE even for OpenCL. Remove
the assert as it doesn't really protect against anything and patch the
shared size only when variable_shared_size is set.

Fixes: e478410466 ("radeonsi: inline shader_info in si_shader_info, keep only what's used")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35003>
2025-05-19 17:51:15 -04:00
Mike Blumenkrantz
0e57c236c4 lavapipe: EXT_zero_initialize_device_memory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34955>
2025-05-19 17:50:29 +00:00
Felix DeGrood
e75c0160df intel/tools: add intel_measure.py
We are moving away from the INTEL_MEASURE tool, replacing
it with utrace. Utrace is better maintained and provides similar
debug data. The eventual plan is to EOL INTEL_MEASURE from the driver.

This python script reinterprets the dumped utrace data into the
traditional INTEL_MEASURE csv file format.

Usage:
MESA_GPU_TRACES=print_csv MESA_GPU_TRACEFILE=/tmp/ut.csv INTEL_DEBUG=stall <cmd>
intel_measure.py /tmp/ut.csv > im.csv

Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34662>
2025-05-19 17:27:30 +00:00
Matt Turner
eea3ed6a37 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>
2025-05-19 17:02:03 +00:00
Olivia Lee
6458880594 panfrost: use cpp_args instead of c_args for C++ files
c_args is not used for C++, so these were just being ignored. As far as
I know this was inconsequential. I doubt anybody is compiling panfrost
on msvc, and I didn't see any initializer override warnings.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35035>
2025-05-19 16:34:26 +00:00
Sil Vilerino
9ebb5e65fc d3d12: Add new video encode HEVC configuration CU size 16-32 range
Reviewed-by: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35057>
2025-05-19 11:32:24 -04:00
Sil Vilerino
33f670d869 d3d12/meson: Add USE_D3D12_PREVIEW_HEADERS compiler flag based on dep_dxheaders.version()
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13126

Reviewed-by: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35057>
2025-05-19 11:32:17 -04:00
Konstantin Seurer
97f71420df radv/bvh: Fix comment
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34938>
2025-05-19 14:08:33 +00:00
Konstantin Seurer
100616859e radv/bvh: Remove some unused variables
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34938>
2025-05-19 14:08:33 +00:00
Konstantin Seurer
f00b25331a radv/bvh: Make sure the AABB is written before internal_ready_count
Otherwise, the next stage can read garbage. Fixes flickering in The
Witcher 3.

Closes: #13145
Closes: #13196
Fixes: 2d48b2c ("radv: Use subgroup OPs for BVH updates on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34938>
2025-05-19 14:08:33 +00:00
Konstantin Seurer
f42d52f922 radv: Flush L2 on GFX12 when binding an update pipeline
This is just for completeness since the flush above is probably
sufficient.

Fixes: 2d48b2c ("radv: Use subgroup OPs for BVH updates on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34938>
2025-05-19 14:08:33 +00:00
Danylo Piliaiev
8dcf84451a tu: Use EARLY_Z when there is no depth/stencil tests
Mostly a cosmetic change to be in line with what prop driver is doing,
this way it's easier to compare them.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34973>
2025-05-19 13:30:39 +00:00
Danylo Piliaiev
8f5d433840 tu: Occlusion query counting should happen after FS that kills
"EARLY_Z + discard" would yield incorrect occlusion query result,
since Vulkan expects occlusion query to happen after fragment shader.

See Vulkan spec "29. Fragment Operations".

Also see https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5713

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34973>
2025-05-19 13:30:39 +00:00
Danylo Piliaiev
b6cf0b68be tu: Use EARLY_Z_LATE_Z with alpha-to-coverage
Alpha-to-coverage behaves like a discard, so we can use EARLY_Z_LATE_Z
for it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34973>
2025-05-19 13:30:39 +00:00
Danylo Piliaiev
13e6dfb45f tu: Use EARLY_Z_LATE_Z even when LRZ is disabled
As previously documented, this mode either uses LRZ or early-z
(when LRZ is invalid).

Though it has some limitations, it's not compatible with:
- Lack of D/S attachment
- Stencil writes on stencil or depth test failure
- Per-sample shading

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34973>
2025-05-19 13:30:39 +00:00
Danylo Piliaiev
de6d111d73 freedreno/regs: A6XX_EARLY_LRZ_LATE_Z is really A6XX_EARLY_Z_LATE_Z
By observing prop driver and doing some tests this mode is about
both early_z and early lrz.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34973>
2025-05-19 13:30:39 +00:00
Georg Lehmann
cd4c0bc58e aco: don't use constant_bits when not applying constants
This is incorrect for 16bit integer operands.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35020>
2025-05-19 13:05:48 +00:00
Georg Lehmann
f98d20fec6 aco: replace get_operand_size with get_operand_type
To not use constant_bits everywhere.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35020>
2025-05-19 13:05:48 +00:00
Georg Lehmann
e1b35a2721 aco/optimizer: only use get_operand_size for alu
It's only used once for pseudo instructions anyway, and that's trivial.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35020>
2025-05-19 13:05:48 +00:00
Georg Lehmann
7d59bd399a aco/optimizer: optimize packed fneg with negative constant
We shouldn't rely on constant propagation always creating
positive 1.0 constants.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35020>
2025-05-19 13:05:48 +00:00
Georg Lehmann
fa3f207035 aco: swap operands without instructions
For future work.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35020>
2025-05-19 13:05:48 +00:00
Patrick Lerda
45133e0e91 radeon/evergreen: improve depth24_stencil8 mipmap behavior
This change is an update to 42be38a8fb. It fixes the remaining
depth24_stencil8 mipmap issues.

This change was tested with the test below modified to check for
every width and height between (1,1) and (143,143), the levels
are tested between 0 and 5.

This change was tested on r600 cypress, palm, barts and cayman.
Here are the tests fixed:
khr-gl(3[0-3]|4[0-5])/texture_repeat_mode/depth24_stencil8_11x131_1_clamp_to_edge: fail pass
khr-gl(3[0-3]|4[0-5])/texture_repeat_mode/depth24_stencil8_11x131_1_mirrored_repeat: fail pass
khr-gl(3[0-3]|4[0-5])/texture_repeat_mode/depth24_stencil8_11x131_1_repeat: fail pass
khr-gles3/texture_repeat_mode/depth24_stencil8_11x131_1_clamp_to_edge: fail pass
khr-gles3/texture_repeat_mode/depth24_stencil8_11x131_1_mirrored_repeat: fail pass
khr-gles3/texture_repeat_mode/depth24_stencil8_11x131_1_repeat: fail pass

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/34406>
2025-05-19 12:50:25 +00:00
Patrick Lerda
1186c73c6b r600: implement gs indirect load_per_vertex_input
This functionality is useful with the software fp64
implementation. It allows running the remaining
tests.

Note: the same tests do not generate this indirect
access on cayman which has the hardware fp64
implementation enabled.

This change was tested on cypress, palm and barts.
Here are the tests fixed:
spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-array-copy: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4-row-major: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-double-array-const-index: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-double-array-variable-index: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-double-bool-double: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-double-uniform-array-direct-indirect: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-doubles-float-mixed: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-dvec4-uniform-array-direct-indirect: fail pass
spec/arb_gpu_shader_fp64/uniform_buffers/gs-nested-struct: 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/34926>
2025-05-19 12:07:37 +00:00
Patrick Lerda
8df9e3b2d0 r600: add a constant representing gs vertex indirect total
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/34926>
2025-05-19 12:07:37 +00:00
Eric Engestrom
0a52d00393 ci: clear S3_JWT_FILE_SCRIPT as it also contains the S3_JWT
This whole thing of dumping the env var in a file and unsetting it so
that it wouldn't be visible in an env dump anymore?  Yeah, we kinda
failed here 😅

Note: setting it to an empty string instead of unsetting it allows for
redundant `eval "$S3_JWT_FILE_SCRIPT"` calls without failing over an
unset variable.

Reported-by: @alatiera
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35050>
2025-05-19 11:16:59 +00:00
Danylo Piliaiev
701d26be9d tu: Fix state.lrz.force_late_z condition not being updated
It was accidentally made sticky when LRZ is disabled. That resulted
in a big perf regression in some games.

Fixes: 847ad80e03 ("tu/lrz: Consider FS depth layout when gl_FragDepth is written")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35029>
2025-05-19 10:55:12 +00:00
Eric Engestrom
add5447483 vmware/ci: move jobs to nightly until farm is stabilized
Example of this job hanging/timing out in merge pipelines that
I personally saw in the last 24h (and right now is Monday morning):
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76580719
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76580721
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76581000
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76581063
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76585062
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76585063
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76585109
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76585110
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76587835
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76587836
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76607117
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76607118
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76607119
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76607120
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76607687
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76607688
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76620657

That's a rather long list, so I'm merging this without waiting for your
feedback @blu, but please revert this commit once the issue has been
fixed :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35048>
2025-05-19 10:36:27 +00:00
Mary Guillemard
9e6e7d9ee3 panfrost: Enable 2 sample count support on v12+
v12+ supports this, let's expose it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34997>
2025-05-19 10:13:49 +00:00
Mary Guillemard
37856eff06 panfrost: Use pan_sample_pattern in pan_cmdstream
We had a duplicate function there, let's use common code instead and
allow v4.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34997>
2025-05-19 10:13:49 +00:00
Mary Guillemard
4c0ce0c6f9 panvk: Enable VK_SAMPLE_COUNT_2_BIT support on v12+
v12+ supports this, let's expose it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34997>
2025-05-19 10:13:49 +00:00
Mary Guillemard
8e05222e1d pan/lib: Add support for rotated 2x grid sample pattern
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34997>
2025-05-19 10:13:49 +00:00
Timothy Arceri
c7c4905981 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>
2025-05-19 09:41:50 +00:00
Timothy Arceri
b7d8c195a2 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>
2025-05-19 09:41:50 +00:00
Timothy Arceri
c1d00c9a1a 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>
2025-05-19 09:41:50 +00:00
Timothy Arceri
d04d9da98c 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>
2025-05-19 09:41:50 +00:00
Eric Engestrom
fd8d8264e0 ci/ci-tron: replace crude dump of env vars with reproducible job script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34962>
2025-05-19 11:04:32 +02:00
Samuel Pitoiset
fef1174b00 vulkan/runtime: fix a wrong assert that validates timeline semaphores
It's still legal to include VkTimelineSemaphoreSubmitInfo in pNext
without any timeline semaphores. While we are at it, also fix the VUs.

This was observed with Doom The Dark Ages.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35022>
2025-05-19 07:22:23 +00:00
Lionel Landwerlin
c570740272 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>
2025-05-19 06:56:04 +00:00
Echo J
586ad02b9c subprojects: Don't use native option for rustc-hash dependency
This should fix the 32-bit NVK build

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35037>
2025-05-18 13:56:34 +00:00
Echo J
4605592db2 subprojects: Don't ignore Meson wrappers in gitignore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35037>
2025-05-18 13:56:34 +00:00
Alessandro Astone
84cae30f0a 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>
2025-05-18 07:18:35 +00:00
llyyr
033ce1bae1 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>
2025-05-17 08:01:57 +00:00
Jianxun Zhang
2212865ce0 anv: Use different PAT entries for compressed resources
Displayable compressed resournces have a different PAT
entry from the non-displayable compressed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29928>
2025-05-16 16:03:54 -07:00
Jianxun Zhang
6eeb079653 iris: New compressed heaps for scanout buffers (xe2)
Two new heaps are introduced to use a different PAT entry
for compressed buffers to display.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29928>
2025-05-16 16:03:54 -07:00
Jianxun Zhang
ca092db7ce intel/dev: Differentiate displayable PAT entry of compression (xe2)
We need two PAT entries with compression for displayable and
non-displayable compressed images. The current 'compressed' entry
is renamed to 'scanout_compressed' for the displayable.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29928>
2025-05-16 16:03:54 -07:00
Ian Romanick
37ee91679a nir/algebraic: Generalize an existing bfi(a, 0, ...) pattern
No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 210561118 -> 210560921 (-0.00%)
Send messages: 10979615 -> 10979613 (-0.00%)
Cycle count: 31576352808 -> 31576347218 (-0.00%); split: -0.00%, +0.00%
Max live registers: 66068161 -> 66068157 (-0.00%)
Non SSA regs after NIR: 60230775 -> 60230949 (+0.00%)

Totals from 180 (0.03% of 707082) affected shaders:
Instrs: 68035 -> 67838 (-0.29%)
Send messages: 3190 -> 3188 (-0.06%)
Cycle count: 3979496 -> 3973906 (-0.14%); split: -0.14%, +0.00%
Max live registers: 11812 -> 11808 (-0.03%)
Non SSA regs after NIR: 18878 -> 19052 (+0.92%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34905>
2025-05-16 14:49:25 -07:00
Ian Romanick
464955bbdd nir/algebraic: Optimize some open-coded extract_i8
These were initially observed in Hogwarts Legacy while working on
something else entirely. Two compute shaders in that app are helped
for spills and fills. On Skylake, one of the shaders benefits from
this change, and the other is hurt pretty significantly.

About 40 vertex shaders in Shadow of the Tomb Raider were helped for
instructions.

v2: Use ~0xff instead of 0xffffff00 to ensure the patterns will work
properly with all bit sizes. Noticed by Georg.

v3: No, really, fix the various errors to ensure the patterns will work
properly with all bit sizes. Noticed by Georg.

No shader-db changes on any Intel platform.

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake)
Totals:
Instrs: 210566294 -> 210561118 (-0.00%)
Cycle count: 31582309052 -> 31576352808 (-0.02%); split: -0.02%, +0.00%
Spill count: 519300 -> 519280 (-0.00%)
Fill count: 625181 -> 625161 (-0.00%)
Scratch Memory Size: 36289536 -> 36281344 (-0.02%)
Max live registers: 66068413 -> 66068161 (-0.00%)
Non SSA regs after NIR: 60230773 -> 60230775 (+0.00%)

Totals from 1662 (0.24% of 707082) affected shaders:
Instrs: 635064 -> 629888 (-0.82%)
Cycle count: 36549632 -> 30593388 (-16.30%); split: -16.43%, +0.14%
Spill count: 246 -> 226 (-8.13%)
Fill count: 280 -> 260 (-7.14%)
Scratch Memory Size: 16384 -> 8192 (-50.00%)
Max live registers: 178491 -> 178239 (-0.14%)
Non SSA regs after NIR: 169552 -> 169554 (+0.00%)

Tiger Lake
Totals:
Instrs: 238544730 -> 238539407 (-0.00%)
Cycle count: 23679446097 -> 23673238578 (-0.03%); split: -0.03%, +0.00%
Max live registers: 42494925 -> 42494799 (-0.00%)
Non SSA regs after NIR: 63639071 -> 63639074 (+0.00%)

Totals from 1662 (0.21% of 802704) affected shaders:
Instrs: 626604 -> 621281 (-0.85%)
Cycle count: 26444363 -> 20236844 (-23.47%); split: -23.50%, +0.02%
Max live registers: 95405 -> 95279 (-0.13%)
Non SSA regs after NIR: 181150 -> 181153 (+0.00%)

Ice Lake
Totals:
Instrs: 238855310 -> 238826534 (-0.01%)
Cycle count: 24952257277 -> 24944589398 (-0.03%); split: -0.03%, +0.00%
Spill count: 575510 -> 575117 (-0.07%)
Fill count: 713007 -> 708632 (-0.61%)
Max live registers: 42499556 -> 42499432 (-0.00%)
Non SSA regs after NIR: 64388747 -> 64388750 (+0.00%)

Totals from 1662 (0.21% of 805149) affected shaders:
Instrs: 926887 -> 898111 (-3.10%)
Cycle count: 67025583 -> 59357704 (-11.44%); split: -11.45%, +0.01%
Spill count: 5168 -> 4775 (-7.60%)
Fill count: 32883 -> 28508 (-13.30%)
Max live registers: 95614 -> 95490 (-0.13%)
Non SSA regs after NIR: 181150 -> 181153 (+0.00%)

Skylake
Totals:
Instrs: 161904416 -> 161895239 (-0.01%); split: -0.01%, +0.00%
Cycle count: 20098067714 -> 20090767583 (-0.04%); split: -0.04%, +0.00%
Spill count: 525546 -> 525789 (+0.05%); split: -0.04%, +0.09%
Fill count: 603369 -> 602276 (-0.18%); split: -0.28%, +0.10%
Max live registers: 33895714 -> 33895590 (-0.00%)
Non SSA regs after NIR: 57348729 -> 57348730 (+0.00%)

Totals from 1655 (0.25% of 653734) affected shaders:
Instrs: 769979 -> 760802 (-1.19%); split: -1.83%, +0.64%
Cycle count: 51365416 -> 44065285 (-14.21%); split: -14.22%, +0.01%
Spill count: 4186 -> 4429 (+5.81%); split: -4.90%, +10.70%
Fill count: 16356 -> 15263 (-6.68%); split: -10.50%, +3.82%
Max live registers: 95115 -> 94991 (-0.13%)
Non SSA regs after NIR: 180797 -> 180798 (+0.00%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34905>
2025-05-16 14:49:05 -07:00
Sergi Blanch Torne
fca369f57a bin/ci: crnm: adaptative field pads
Some text paddings are not enough during the execution of the script. Having
an adaptative way for this variable can help the structure and visibility of
the output.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34856>
2025-05-16 20:34:16 +00:00
Sergi Blanch Torne
f65975975e bin/ci: crnm: columns list when waiting jobs update
It's another example of a long list of job names, when the jobs waiting for a
status update is printed. The print formatted list can help to present it.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34856>
2025-05-16 20:34:16 +00:00
Sergi Blanch Torne
e4396c40fa bin/ci: crnm: columns list for cancelled jobs
Rewrite how the jobs are cancelled within a pool of threads to simplify how
it can then use the print formatted list to for a better presentation of the
results.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34856>
2025-05-16 20:34:16 +00:00
Sergi Blanch Torne
e504d226ce bin/ci: crnm: format in columns when listing
When we are printing a long list, and it needs more than one line, it gets
hard to review the content. This is an idea to group the elements to be
printed in columns to make it easier to identify individual elements in
the output.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34856>
2025-05-16 20:34:16 +00:00
Seán de Búrca
611772af45 rusticl: replace unnecessary Vec references with slice refs
v2: restore static borrow on `core::device::devs()`

Reviewed-by: @LingMan
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34389>
2025-05-16 19:58:31 +00:00
Seán de Búrca
543b07bee8 rusticl: write CLInfoValues from iterators instead of collecting
All of the current instances of writing info values from `Vec`s involve
building an iterator and then collecting it specifically for writing.
By using an `ExactSizeIterator`, we can avoid the need for allocating in
these cases.

v2: use existing `CLInfoValue::write_iter()` instead of custom type

Reviewed-by: @LingMan
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34389>
2025-05-16 19:58:31 +00:00
Seán de Búrca
3a16c9ab43 rusticl: iterate subgroup sizes only as needed
Making subgroup sizes an iterator avoids collecting (and thus
allocation) in cases where the values are unneeded or only the first is
needed.

v2: fix calculation of `SetBitIndices<u32>` iterator length

Reviewed-by: @LingMan
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34389>
2025-05-16 19:58:31 +00:00
Seán de Búrca
0980ba8595 rusticl: use simple equality check for contexts instead of HashSet
v2: use `[T]::split_first()` to consolidate equality check
v3: undo misleading comment split

Reviewed-by: @LingMan
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34389>
2025-05-16 19:58:31 +00:00
Seán de Búrca
ac44513b9e rusticl: hand-map 3-element arrays for fallible conversion
Iterating arrays and collecting to a `Vec` requires allocating memory
for the `Vec` and, when the needed result is an array of the same size
as the original, an unnecessary fallible conversion back to an array.

While arrays have a `map()` method for infallible conversions,
`try_map()` is unstable. Fortunately, we only have to worry about one
array size and it's small, so hand-mapping is a viable alternative.

Reviewed-by: @LingMan
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34389>
2025-05-16 19:58:31 +00:00
Collabora's Gfx CI Team
38efae8964 Uprev Piglit to 1767af745ed96f77b16c0c205015366d1fbbdb22
1498c397ea...1767af745e

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34936>
2025-05-16 17:25:05 +00:00
Collabora's Gfx CI Team
749ccf3a9c Uprev ANGLE to db71e8fa7c26d18f76d7b9e9474447b20f1c73b3
db33baf4eb...db71e8fa7c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34936>
2025-05-16 17:25:05 +00:00
Ella Stanforth
be3ce07f58 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>
2025-05-16 16:05:21 +00:00
Olivia Lee
22fb7eaa8c 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>
2025-05-16 14:28:50 +00:00
Yiwei Zhang
1895de16a6 venus: filter out venus incapable physical devices
VK_KHR_external_memory_fd is required by Venus at the bare minimum for
all different ways to support the current venus guest memory mapping.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34830>
2025-05-16 14:12:36 +00:00
Yiwei Zhang
5abce52a67 venus: misc cleanups post wsi requirement relax
This avoids an invalid assert hit on debug build since we no longer
require drm format modifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34830>
2025-05-16 14:12:36 +00:00
Yiwei Zhang
92f79d35c4 venus: relax external memory ext requirement
On Android, both the ANB and AHB extensions support still requires
renderer external memory support along with format modifier and foreign
queue support.

On Linux, however, renderer external memory support alone is sufficient
to expose external memory extensions. This also helps not to force sw
wsi device when renderer has external memory support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34830>
2025-05-16 14:12:36 +00:00
Yiwei Zhang
0c345c2c5e venus: clang-format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34830>
2025-05-16 14:12:36 +00:00
Loïc Molinari
a35415530d panfrost: Use util_streaming_load_memcpy() to copy AFBC superblocks
Use the now AArch64 optimized util_streaming_load_memcpy() routine to
copy the AFBC superblocks from non-cacheable to cacheable memory.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34606>
2025-05-16 13:35:33 +00:00
Loïc Molinari
293cdbce75 util: Add AArch64 support to util_streaming_load_memcpy()
AArch64 supports non-temporal (streaming) loads and writes.
util_streaming_load_memcpy() is extended to support AArch64
non-temporal loads using inline assembly.

The mesa_util_sse41 name is updated to mesa_util_simd to reflect
support for non-x86 architectures.

This makes copies from non-cacheable to cacheable memory about 20%
faster on a Rock 5B.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34606>
2025-05-16 13:35:33 +00:00
Loïc Molinari
d3544aebd7 panfrost: Optimize AFBC-P offsets computation
Copy block info from non-cacheable memory to cacheable memory in order
to avoid flushing the write combining buffer at each iteration for
only 4 bytes written.

This makes AFBC-P offsets computation ~13.5 times faster on Rock 5B
for a 2048x2048 RGBA8 texture, taking ~0.2 ms instead of ~2.7 ms.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34606>
2025-05-16 13:35:33 +00:00
Daniel Schürmann
64eed6807a aco/isel: move visit_intrinsic() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
8aae636e38 aco/isel: move visit_alu_instr() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
5342576789 aco/isel: rename aco_instruction_selection.cpp -> aco_isel_nir.cpp
Also remove some unused includes and unnecessary static specifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
b6442669c1 aco/isel: move select_ps_epilog() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
776384d99d aco/isel: move select_ps_prolog() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
c3ef927e31 aco/isel: move select_vs_prolog() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
c4ec430c26 aco/isel: move select_rt_prolog() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
4d910ca301 aco/isel: move select_trap_handler_shader() into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
146ce57f2d aco/isel: move control-flow helper functions into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
59f314a9a6 aco/isel: move some helper functions into a separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
62a92417ef aco: move instruction selection files to /compiler/instruction selection/ subfolder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
Daniel Schürmann
85a4ec32e8 aco: rename aco_instruction_selection_setup.cpp -> aco_isel_setup.cpp
Also remove unused includes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34977>
2025-05-16 11:01:19 +00:00
David Rosca
bade93c447 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>
2025-05-16 10:36:44 +00:00
David Rosca
ad96031ec6 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>
2025-05-16 10:36:44 +00:00
David Rosca
fd1480c3df 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>
2025-05-16 10:36:44 +00:00
Juan A. Suarez Romero
f27d062abc gallium/util: fix num primitives for line loops
When computing the number of primitives from the number of vertices, for
the case of line loops we need to include an extra line that closes the
shape.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35007>
2025-05-16 09:06:17 +00:00
Gert Wollny
58d8dc9543 r600/sfn: dump the lowered shader when translation fails
So far we printed the variant before the final lowering was done,
this is usually not that helpful. For this the code to dump the
shader has to go into r600_shader_from_nir.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34999>
2025-05-16 08:45:58 +00:00
Valentine Burley
2ce2c1f835 zink/ci: Skip flaky trace on TGL
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35016>
2025-05-16 08:00:11 +00:00
Valentine Burley
4ad8c8752d ci: Run rustfmt and python jobs on aarch64
The x86_64 shared runners often have long queues.
Move the rustfmt, python-artifacts, and yaml-toml-shell-py-test jobs to
use the aarch64 runners instead.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35000>
2025-05-16 06:07:20 +00:00
Valentine Burley
3029898a15 ci/container: Include DEBIAN_BUILD_TAG in debian/arm64_build
Unlike other containers (e.g. debian/x86_64_build-base and
debian/x86_64_build), debian/arm64_build is a single-stage image without
a separate -base variant.

Including DEBIAN_BUILD_TAG in its FDO_DISTRIBUTION_TAG ensures it gets
rebuilt when the build tag changes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12737
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35000>
2025-05-16 06:07:20 +00:00
Yiwei Zhang
cc4fd7cc9d vulkan: fix random tabs to spaces
Only the vk_time_max_deviation tab usage requires a manual fix to make
sense. Others are boring replacements.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35011>
2025-05-16 03:57:31 +00:00
Kovac, Krunoslav
360d252888 amd/vpelib: Fix CodeQL issues Pt1
[WHY]
Redundant / inconsisten nullptr checks

Reviewed-by: Jude Shih <Jude.Shih@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Chang, Tomson
134b5bede7 amd/vpelib: Update headers
Update new headers

Reviewed-by: Jude Shih <Jude.Shih@amd.com>
Reviewed-by: Ricky Lin <Ricky.Lin@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Chan, Roy
ffa5aadd2f amd/vpelib: fix doxgen warnings
What does the change do after sanization if any.
Delete this section if not applicable.

Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Roy Chan <roy.chan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Nagulendran, Iswara
80af9d4756 amd/vpelib: Fix VPELIB Build Warnings
Fix build warnings.

Signed-off-by: Iswara Nagulendran <Iswara.Nagulendran@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Okenczyc, Andrzej
71b285d091 amd/vpelib: Resolve query, predication and timestamp operations
[HOW]
Some clients of vpelib requires additional operations to be implemented.
Implemented support for new firmware operations.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Okenczyc, Andrzej <andrzej.okenczyc@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Nagulendran, Iswara
f10244d8d9 amd/vpelib: Setup cost profiling support
Add logs to profile registers writes.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Nagulendran, Iswara <Iswara.Nagulendran@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Han, Szu Chih
8bdbd12508 amd/vpelib: add TF_BT709
[HOW]
Add VPE_SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb -> VPE_TF_BT709 in
vpe_visual_confirm.c

Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Reviewed-by: Min-Hsuan You <Min-Hsuan.You@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Han, Szu Chih <SzuChih.Han@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Han, Szu Chih
3bd03b3cb0 amd/vpelib: add VPE_TF_SRGB
[HOW]
Add VPE_SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb -> VPE_TF_SRGB in
vpe_visual_confirm.c

Co-authored-by: Mike Han <szuchhan@amd.com>
Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Reviewed-by: Min-Hsuan You <Min-Hsuan.You@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Han, Szu Chih <SzuChih.Han@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Shih, Jude
7b68174bf0 amd/vpelib: Alpha Fill add mode
Add destination and source stream mode

[WHY]
In the new version, we add the two alpha fill mode

[HOW]
Add the two enum first

Reviewed-by: Brendan Steve Leder <BrendanSteve.Leder@amd.com>
Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Shih, Jude
cb0b8d58a0 amd/vpelib: remove sensitive keywords
[WHY]
    The KWS hit the words in the vpelib as forbidden

[HOW]
    replace it with proper ones

Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Reviewed-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Shih, Jude
c40ac921aa amd/vpelib: VPE descriptor added
[WHY]
- Need to implement code for new version
- There are some format changes in new version

[HOW]
- Add plane descriptor
- Add plane descriptor patch
- Add command builder
- Restructure the code base to apply for multiple version

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Agate, Jesse
f80a69d756 amd/vpelib: Add macro to perform ceil division
Add macro to perform ceil division

Reviewed-by: Brendan Steve Leder <BrendanSteve.Leder@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Agate, Jesse <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Zhao, Jiali
7b8c912c22 amd/vpelib: G2084 STUDIO output gamma fix
Made output gamma a hook function

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Zhao, Jiali <Jiali.Zhao@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Kovac, Krunoslav
fc5973429f amd/vpelib: Update comment and fix some code alignment issues.
Update comment and fix some code alignment issues.

Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Visan, Tiberiu
96b7e52b57 amd/vpelib: feature augment
[WHY]
support future feature augment

Co-authored-by: Chan, Roy <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Visan, Tiberiu <Tiberiu.Visan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Krunoslav Kovac
f6144116c9 amd/vpelib: Remove RGBE_ALPHA
No such DXGI_FORMAT, nor is there space to squeeze in alpha.

Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Chen, Phoebe
f2e65c02e6 amd/vpelib: Fix memory leak from segment ctx
[WHY]
There is potential memory leak from vpe_alloc_segment_ctx.
This memory leak occurs only in multi-frame VPE tests where
between vpe_create and vpe_destroy, multiple calls are made
to vpe_check_support that allocates new segment context without
releasing the old one.

[HOW]
Allocate segment_ctx only when it is not already allocated. If it is
already allocated, check whether re-allocation is needed. If not, skip
the allocation.

Signed-off-by: Phoebe Chen <phoebe.chen@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Leder, Brendan Steve
c1a3d021f3 amd/vpelib: Make BG gen stream idx adjustable
Update BKGR API

Change bg generation code so bg gen isn't hard-coded to stream 0, as
certain cases result in bg being generated at different stream.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: ChuanYu Tseng <ChuanYu.Tseng@amd.com>
Signed-off-by: Leder, Brendan Steve <BrendanSteve.Leder@amd.co>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35012>
2025-05-16 11:33:08 +08:00
Faith Ekstrand
5b34895e81 nak/dce: Use BitSet for live phis and SSA values
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
52dcb1c9c1 nak: Add a Phi struct type
Instead of passing raw u32's arround, this adds a new Phi wrapper struct
which is treated as opaque by most of the rest of the compiler.  This is
similar to what we're already doing with Label and SSAValue.  This also
gives us the opportunity to properly document NAK's phi model.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
531070cf91 nak: Use op instead of phi when referring to OpPhiSrcs or OpPhiDsts
This will reduce name conflicts in the next patch

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
5f5ce00410 nak/repair_ssa: Rename Phi to PhiTracker
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
fc54e6e1d2 nak/liveness: Use typed bitsets
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
afb11a5a9e nak/liveness: Use an SSA value as the last_use HashMap key
We're not saving ourselves anything by using just the index.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
56f06a072c compiler/rust/bitset: Make BitSet a generic container type
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:28:31 -04:00
Faith Ekstrand
323769d3bb compiler/rust,nak: Rename BitSet::get() to contains()
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:14:12 -04:00
Faith Ekstrand
20d247d754 nak: Use Default::default() for BitSet constructors
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34994>
2025-05-15 22:14:12 -04:00
Mel Henning
ed658a2d3a compiler/rust/cfg: Add a hash func type parameter
and switch nak over to rustc-hash for CFGBuilder

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:05 +00:00
Mel Henning
f5231e0677 nak: Also use rustc-hash for UnionFind
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
Mel Henning
43c3f5a8db nak: Switch most Hash{Set,Map} uses to rustc-hash
We shouldn't need to worry about HashDoS attacks because:
 1. All of these keys are compiler-assigned IDs which makes it very
    difficult to force collitions, and
 2. Anyone who can hit the NAK compiler backend can already use CPU
    power by spamming shader compiles or using O(n^2) behavior in
    shader opt loops
As a result, we can afford to use a weaker hash function without
randomization.

This decreases total compile times by around 12% on shaderdb
(from 8113.74 user to 7115.47 user) on my machine.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
Mel Henning
c1f979d84a nak: Add a dependency on rustc-hash
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
Mel Henning
b4b557c9ef nak: s/HashSet::new()/Default::default()/
wherever this doesn't result in type inference failing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
Mel Henning
7a47f29d6d nak: s/HashMap::new()/Default::default()/
wherever this doesn't result in type inference failing.
Using default() makes it easier to swap out the underlying type.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
Mel Henning
bb62044836 nak: rustfmt ir_proc.rs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
Mel Henning
bfe8340296 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>
2025-05-16 01:08:07 +00:00
Mel Henning
da22094593 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>
2025-05-16 01:08:07 +00:00
Kenneth Graunke
20222cd956 anv: Use the new nir_opt_acquire_release_barriers pass
Improves performance of Phasmophobia with the "Eye Adaptation" video
setting enabled on Arc B570 by about 9.5%.

fossil-db results on Battlemage:

   Totals:
   Instrs: 148797922 -> 148797865 (-0.00%)
   Send messages: 7066341 -> 7066317 (-0.00%)
   Cycle count: 21459978352 -> 21459975048 (-0.00%)

   Totals from 8 (0.00% of 574410) affected shaders:
   Instrs: 4633 -> 4576 (-1.23%)
   Send messages: 479 -> 455 (-5.01%)
   Cycle count: 611886 -> 608582 (-0.54%)

Observed to cut 15% of sends in a Phasmophobia shader, 8.3% in a Far Cry
New Dawn shader, 7% in a Borderlands 3 DX11 shader, and 3.4-3.7% of
sends in a few Witcher 3 and Dark Souls 3 shaders.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33504>
2025-05-16 00:29:13 +00:00
Kenneth Graunke
deb1d47155 nir: Add a new optimization for acquire/release atomics & barriers
Some shaders contain back-to-back atomic accesses in SPIR-V with
AcquireRelease semantics.  In NIR, we translate these to a release
memory barrier, the atomic, then an acquire memory barrier.

This results in a lot of unnecessary memory barriers in the middle
of the sequence of atomics:

   0. Release barrier
   1. Atomic
   2. Acquire barrier
   3. Release barrier
   4. Atomic
   5. Acquire barrier
   6. Release barrier
   7. Atomic
   8. Acquire barrier

In the absence of loads/stores, and when the atomic destinations are
unused, these barriers in-between atomics shouldn't be required.

This optimization pass would drop them (lines 2-3 and 5-6 above) while
leaving the first and last barriers (0 and 8), so the sequence remains
synchronized against other access elsewhere in the program.

One common example where this occurs is a sequence of min and max
atomics to clamp a certain memory location's value within a range.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33504>
2025-05-16 00:29:13 +00:00
Rob Clark
65e18a8494 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>
2025-05-15 22:27:17 +00:00
Yinjie Yao
089e2cb6f9 radeonsi: Disable av1 cdef_channel_strength for VCN4
VCN4 hardware doesn't support this feature, it can only be supported in VCN5.

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/35004>
2025-05-15 18:52:08 +00:00
Seán de Búrca
10fad5081d nouveau: implement Default for Push
By convention, a struct with a `new()` method which has no parameters
should have a `Default` impl which calls `new()`.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
f4f4b25d25 nak,nil: style cleanup
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
adecea4af9 nak,nouveau: adjust function/method signatures to better match convention
v2: restore `to_cssa()` naming

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
e559c63fd8 nak,nil: elide lifetimes where possible
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
e4f045df58 nak,nil: avoid explicit returns at the end of functions
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
e32c82d0f5 nak: use standard methods and macros to improve readability
v2: Leave `Op::is_branch()` and `Op::no_scoreboard()` matches alone
v3: Revert additional changes with unclear readability

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
ba2b9345e8 nak: use Option propagation instead of explicit let-else clauses
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
f2cc77dca8 nak: collapse extraneous conditional branches
v2: Revert collapsing of branches per review

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
451b37820d nak: remove unnecessary casts and conversions
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34372>
2025-05-15 17:52:32 +00:00
Seán de Búrca
e4d895f0e1 rusticl: fix build with clippy driver
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35002>
2025-05-15 09:35:17 -07:00
Seán de Búrca
35af55a2a7 rusticl: replace map_or(false, f) with is_some_and(f)
A new clippy lint fails on this pattern, causing build errors on
versions >= 1.84.0. `is_some_and()` is stable from 1.70.0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35002>
2025-05-15 09:35:08 -07:00
José Roberto de Souza
cb6f96a1e8 anv: Remove a '#if GFX_VER >= 30' block inside of a else of '#if GFX_VERx10 >= 125'
Removing deadcode.

Reviewed-by: Lucas Fryzek <lfryzek@igalia.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/34988>
2025-05-15 15:25:12 +00:00
José Roberto de Souza
37b42ef648 anv: Drop '#if GFX_VERx10 >= 125' inside of '#if GFX_VERx10 >= 125'
This is just redundant.

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>
2025-05-15 15:25:12 +00:00
José Roberto de Souza
bca12800aa iris: Restrict platforms that needs Wa_1604061319
It was being applied even to platforms that don't require it.

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>
2025-05-15 15:25:12 +00:00
José Roberto de Souza
3cd972a2d3 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>
2025-05-15 15:25:12 +00:00
José Roberto de Souza
2432d6677e 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>
2025-05-15 15:25:12 +00:00
Ashley Smith
a1376449c8 panvk: Expose support for multiview on v7
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/34832>
2025-05-15 14:04:29 +00:00
Ashley Smith
4171917210 panvk: Add support for VK_KHR_multiview on v7
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/34832>
2025-05-15 14:04:29 +00:00
Rob Clark
d8ed4f14e6 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>
2025-05-15 12:46:16 +00:00
Georg Lehmann
3f70433ff0 aco: add type information for operands/definitions
More information available for use in the optimizer.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29695>
2025-05-15 12:17:17 +00:00
Corentin Noël
6c1c116a0f virgl: Avoid possible double free when destroying the hw resource
When a resource is un-referenced, the reference count is decremented,
and intentionally no lock is acquired. This can result in the following
race condition when a resource is created from a handle:

```
[Thread] Operation
[0] Create resource from handle for the first time, refcount set to 1
[0] resource is unreferenced, refcount is decremented to 0 (intentionally
    no mutex is locked)
[0] before entering virgl_hw_res_destroy to lock
    virgl_drm_winsys::bo_handles_mutex the thread yields
[1] Create resource from handle pulls the resource from
     virgl_drm_winsys::bo_handles, refcount is incremented to 1
[1] resource is unreferenced, refcount is decremented to 0
[1] Enter virgl_hw_res_destroy,
[1] acquire the lock on virgl_drm_winsys::bo_handles_mutex
[1] check reference count to be 0, yes -> the resource is destroyed
[1] release the lock on virgl_drm_winsys::bo_handles_mutex
[0] Enter virgl_hw_res_destroy,
[0] acquire the lock on virgl_drm_winsys::bo_handles_mutex
[0] Here the res pointer already points to freed memory
[0] check reference count to be 0, yes -> the resource is destroyed (again!)
double free or corruption (!prev)
```

To work around this race condition, keep track of the number of times
the resource was pulled from virgl_drm_winsys::bo_handles to see whether
it has to be kept alive despite the reference count being zero.

This can be reproduced with the `spec@ext_image_dma_buf_import@ext_image_dma_buf_import-refcount-multithread`
piglit test.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34809>
2025-05-15 10:38:13 +00:00
Mary Guillemard
1c57581856 pan/lib: Make pan_shader.c not GENX
We move pan_raw_format_mask_midgard to pan_format.c instead making
pan_shader.c not depending on any GENX.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34895>
2025-05-15 10:41:07 +02:00
Mary Guillemard
0bb9df9d33 pan/lib: Make pan_shader_get_compiler_options not GENX
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34895>
2025-05-15 10:40:57 +02:00
Mary Guillemard
7158f2eb8b pan/lib: Make pan_shader_compile not GENX
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34895>
2025-05-15 10:40:47 +02:00
Mary Guillemard
1fa13ceb74 pan/lib: Move pan_fixup_blend_type to pan_blend.c
Also move bifrost_blend_type_from_nir to pan_blend.c, rename it and
makes it not GENX.

This part is related to blend so it makes more sense to have it there
and this will allow us to make pan_shader.c not GENX.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34895>
2025-05-15 10:40:36 +02:00
Mary Guillemard
b3f8c955a7 pan/genxml: Add Register File Format to common.xml
This was added in v6+ and never changed.
This will allow us to remove GENX code logic that is identical.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34895>
2025-05-15 10:40:23 +02:00
Mary Guillemard
60b131a712 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>
2025-05-15 07:12:44 +00:00
Mary Guillemard
5588ff49a7 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>
2025-05-15 07:12:44 +00:00
Hans-Kristian Arntzen
e674823d55 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>
2025-05-15 06:14:46 +00:00
Samuel Pitoiset
b79f1a3af3 ac/gpu_info: allow 32-bit predicate on GFX11+
This is natively supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34953>
2025-05-15 05:51:04 +00:00
Samuel Pitoiset
3ca2f71f3d 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>
2025-05-15 05:51:04 +00:00
Samuel Pitoiset
e2625fa9ca 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>
2025-05-15 05:51:04 +00:00
Faith Ekstrand
d808870d49 nvk: Implement VK_EXT_zero_initialize_device_memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13159
Reviewed-By: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-By: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34968>
2025-05-15 03:20:12 +00:00
Faith Ekstrand
f542a60686 nak: Add a helper to reduce OpPrmt sel immediates
Only the bottom 16 bits matter of the select source matter so we can
throw away the top 16 bits and avoid any i20 encoding issues.  All of
the back-ends were already doing this except SM70 which has 32-bit
immediates anyway.  However, doing it in a common place where it's
documented is better than skattering it everywhere.  Also, doing it as
part of legalization ensures that we see the same thing in the
post-legalize IR as gets encoded.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34678>
2025-05-15 02:32:27 +00:00
Faith Ekstrand
212f99d39d nak: Add a helper for reducing OpShfl lane and c immediates
Every back-end has code to mask these because the hardware only has
limited encoding space.  However, this can be done as a common
legalization operation and doing so means that our post-legalize IR
matches what actually gets encoded.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34678>
2025-05-15 02:32:25 +00:00
Faith Ekstrand
9890110856 nak: Reduce shift immediates instead of adding copies
SM20 was smart enough to reduce shift immediates instead of just
detecting i20 overflow and adding copies.  This adds helpers to make
this easier and propagates the improvement out to all the back-ends.
Even though it isn't necessary on Volta+, we might as well do it there
for consistency and because smaller shift values are easier to read in
the final assembly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34678>
2025-05-15 02:32:24 +00:00
Faith Ekstrand
87a90a0e6a nak: Add HW tests for OpShr and OpShl
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34678>
2025-05-15 02:32:23 +00:00
Faith Ekstrand
d3e917ea03 nak: Fix OpShf folding for shift >= 64
The checked_shr wasn't returning the correct value if .wrap was not set.
We also weren't checking this case in the unit tests so we missed it.
While we're here, get rid of a bunch of pointhess `as u64` as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34678>
2025-05-15 02:32:22 +00:00
Faith Ekstrand
fa58199166 nak/sm20: Remove some unnecessary Option<>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34678>
2025-05-15 02:32:22 +00:00
Hyunjun Ko
7ddf51dc99 anv: Fix to set CDEF filter flag correctly.
This fixes to play av1_intel_broken2.ivf.

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/34866>
2025-05-15 01:02:05 +00:00
Hyunjun Ko
2e256a3cee anv: Allocate MV buffers enough for AV1 decoding.
As other video memories for AV1 are already allocated for the maximum
sizes, now it does the same for MV buffers too.

This fixes a bunch of artifacts of AV1 playing.

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/34866>
2025-05-15 01:02:05 +00:00
Hyunjun Ko
f4d480f808 anv: Always allocate cdf tables when independent profiles provided
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/34866>
2025-05-15 01:02:05 +00:00
Faith Ekstrand
b5e657da48 nak/sm70: Don't set a predicate destination on redg
Reduction ops don't return anything, including predicates.  On Turing
through Hopper, this doesn't matter because these bits are ignored.
However, Blackwell uses those bits to adjust address calculations for
reduction ops.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Faith Ekstrand
e2b7a736a4 nak/nir/lower_tex: Use nir_tex_instr_add_src()
This is slightly less efficient but way safer than trying to mangle the
sources array that's already in the tex instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Dave Airlie
8a39a1502f nak: Use TexOffsetMode for all texture ops
We had a bool for most of them and an enum for OpTld4. Now we have an
enum for all of them and we just reserve PerPx for OpTld4.  While we're
here, rework printing to put the "." in the enum display method.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Faith Ekstrand
4c6010df64 nak/sm70: imnmx takes and returns more predicates on Blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Faith Ekstrand
9d89214a69 nak/sm70: Use rZ for the 3rd source of lea when .hi is not set
Pre-blackwell, it's ignored so we can set whatever.  On Blackwell+, it
seems to be take into account somehow (more RE needed?) so we need to
set it to rZ to get the old behavior.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Faith Ekstrand
32f78eff80 nak/sm70: Fix bra offset encoding for for Hopper+
They split the field to add 8 more bits on Hopper.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Faith Ekstrand
046f90ad56 nak/copy_prop: Don't propagate cbufs into ALU on Blackwell+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:08 +00:00
Faith Ekstrand
9604896c70 nak/lower_copy: Implement copy from CBuf as ldc on Blackwell+
Constant buffer sources for ALU instructions are removed on Blackwell so
we have to use ldc instead of mov.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Faith Ekstrand
994035908d nak/hw_tests: Copy data stride and invocations to avoid cbuf sources
CBuf sources are gone on Blackwell+.  Let's not introduced them directly
in the unit tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Faith Ekstrand
8c3ebddba3 nak/sm70: Properly encode ldc on Blackwell+
Also add nvdisasm tests for ldc because it's pretty important and has
lots of subtle per-SM differences.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Faith Ekstrand
0b142182cb nak/sm70: Increase the number of UGPRs on Blackwell+ to 80
This also affects encodings as rZ is now 255 instead of 63.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Dave Airlie
da16e8aff7 nvk: Add hopper priv registers
The priv registers moved. I've confirmed hopper and above.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Dave Airlie
1c77a6f049 nvk: Don't emit MME FIFO config on Blackwell+
I can't see this in traces on Blackwell and it causes hangs.

These regs are in the hopper class headers so should be fine there.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Dave Airlie
bd7777aee6 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>
2025-05-15 00:11:07 +00:00
Dave Airlie
693b55a4af nouveau/headers: Add stub blackwell class headers
These just have the class define.  We'll replace them with the actual
headers from NVIDIA once we have them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34910>
2025-05-15 00:11:07 +00:00
Eric Engestrom
2bc7130808 r300/ci: switch radeon.ko jobs to common kernel (6.13.7)
Now that it is possible to have more than one initrd, let's switch to
the common b2c kernel which requires two additional initrds:

 * The GPU initrd which contains amdgpu, i915, nouveau, radeon, and xe,
   along with their necessary firmware
 * The depmod initrd which contains what's necessary to modprobe the
   modules of the GPU initrd

Since the GPU initrd is huge (73 MB), let's reduce the size by dropping
all the firmware that is not related to AMD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34881>
2025-05-14 23:06:42 +00:00
Emma Anholt
e4790143a5 tu: Disable Z reads for always/never.
This saves a bit of bandwidth when we're not going to use the value.
Improves renderpass times across 4 affected traces I tested (bioshock,
stranded deep, transport fever, and godot material testers) on sysmem by
.3% +/- .1%.

A similar change for avoiding stencil reads showed no change on the one
app affected among all of our renderdoc traces, so that's left out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34964>
2025-05-14 22:34:08 +00:00
Olivia Lee
c053bc2213 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>
2025-05-14 21:55:26 +00:00
Marek Olšák
3fd2bdd285 radeonsi: move si_gs_output_info into si_temp_shader_variant_info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
97357e721d radeonsi: add struct si_temp_shader_variant_info
This contains all shader info that's used during compilation,
but is never used after compilation.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
53cd29d946 radeonsi: move shaders args initialization into its own file
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
af8c4f19ab radeonsi: move shader variant info and spi_ps_input_ena code into its own file
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
2e8cac328a radeonsi: move si_nir_mark_divergent_texture_non_uniform to its own file
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
deda05e2b7 nir: move nir_lower_color_inputs into radeonsi
it's the only user

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
70aa58cc95 radeonsi: move shader info structures into new file si_shader_info.h
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
5389a3736f radeonsi: move NIR passes from si_shader.c into their own files
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
e478410466 radeonsi: inline shader_info in si_shader_info, keep only what's used
This reduces the si_shader_info size by 244 B.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
dc5e0e2b73 radeonsi: rename num_stream_output_components -> num_gs_stream_components
it's not for streamout

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
54cc89f7c2 radeonsi: use a simpler way to gather enabled_streamout_buffer_mask
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
180f320e69 radeonsi: use info.num_streamout_vec4s instead of si_shader_uses_streamout
It's identical now.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
759de230de radeonsi: don't declare GDS size for LLVM
We don't use GDS memory.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:17 +00:00
Marek Olšák
32274ab50e radeonsi: implement remove_streamout in si_nir_kill_outputs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
100f9a1624 radeonsi: move xfb fields from si_shader_info to shader variant info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
9edcf19f7d radeonsi: remove si_shader_info::writes_position
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
c761da42ce radeonsi: don't use si_shader_info in si_parse_next_shader_property
just use NIR info.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
20e5c35cfe radeonsi: gather uses_discard from shader variants
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
de6ca8c7ec radeonsi: gather writes_z/stencil/sample_mask as shader variant info
si_get_shader_variant_info doesn't need to check the kill flags because
killed stores are removed from NIR before that.

Only shader variants need to clear the writes_* flags if the epilog kills
them.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
a9ac95fc0a radeonsi: gather uses_gs_state_provoking_vtx_first/outprim from the shader
Just use nir_def_bits_used() instead of the manually written conditions.

These are gathered from bits of load_scalar_arg(vs_state_bits):
- uses_vs_state_indexed
- uses_gs_state_provoking_vtx_first
- uses_gs_state_outprim

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
b85984d2b5 radeonsi: gather VS system value usage from shader variants
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
3b276e4ba6 radeonsi: move gathering VMEM information into si_get_shader_variant_info
This is a step towards gathering shader info from shader variants instead of
input NIR.

uses_fbfetch_output can be ignored because it's already lowered to image
loads.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
c59fc30fee radeonsi: always gather shader variant info
All shaders will eventually have their info there, not just FS.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
e114b9b11c radeonsi: don't return progress from run_pre_link_optimization_passes
We will always gather shader info after it, so always optimize instead of
returning progress.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
3d6747f6e0 radeonsi: determine uses_vmem_load_other more accurately
Some opcodes don't load from memory.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
bcd0679258 radeonsi: remove si_shader_info::uses_indirect_descriptor
It shouldn't affect uses_vmem_load_other because divergent descriptors
are loaded with SMEM in waterfall loops.

Also all this removed code is highly questionable. Indirect access doesn't
matter for anything. Divergent access does, and that's handled correctly.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
970825258e radeonsi: restructure si_get_shader_variant_info
iterate over instructions outside of the conditional.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
f5bc1ebc11 radeonsi: don't check sel->nir in si_init_shader_selector_async
It's always non-NULL.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Marek Olšák
6e4154b7ef ac/nir: fix export_ps_outputs not preserving divergence metadata
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34492>
2025-05-14 20:19:16 +00:00
Eric Engestrom
7eb7a4d278 docs/release-calendar: fix release numbers
"No Eric, the next release after 25.1.0 is not 25.1.0 again"
~ Eric, a week later.

Reported-by: Liam Dawe
Fixes: 6d8324e819 ("docs: add calendar for 25.1.x releases")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34985>
2025-05-14 22:01:16 +02:00
Eric Engestrom
ea4c1ceb79 docs: add sha sum for 25.0.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34982>
2025-05-14 19:14:52 +02:00
Eric Engestrom
042830b158 docs: add release notes for 25.0.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34982>
2025-05-14 19:14:52 +02:00
Eric Engestrom
e7846a5aec docs: update calendar for 25.0.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34982>
2025-05-14 19:14:30 +02:00
Erik Faye-Lund
df38cdce53 gallium/aux: fixup bad indent
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34954>
2025-05-14 16:33:12 +00:00
Erik Faye-Lund
8e48db3028 r600: ingest u_blitter_clear_buffer
r600 is the only driver using this functionality, so let's move it there.

There's a few functions we used that aren't available outside of
u_blitter.c, but it turns out these aren't really needed. The first one
is blitter_check_saved_vertex_states(), that one just verifies that
certain states are saved as they should be. It's a bit sad to lose these
checks, but they are currently always passing, so nothing should break
by dropping them right now.

The second one is blitter_disable_render_cond(), and this one is also OK
to drop, because r600 never calls util_blitter_save_render_condition()
in the first place.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34954>
2025-05-14 16:33:12 +00:00
Erik Faye-Lund
20986b77f3 gallium/aux: move util_pipe_tex_to_tgsi_tex to u_blitter.c
This is the only place this is called from, and this allows us to avoid
a TGSI specific include from generic code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34954>
2025-05-14 16:33:12 +00:00
Alyssa Rosenzweig
d2ac44dfde meson: make ffs available in OpenCL code
for u_foreach_bit.

the ffsll version isn't available since long long is 128-bit for CL.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34909>
2025-05-14 11:29:09 -04:00
Alyssa Rosenzweig
063d35b829 vtn: ignore SpvDecorationFPFastMathMode
This is just a hint as far as I can tell. We're allowed to ignore it (as we do),
we just shouldn't be warning about it.

This quiets piles of annoying SPIR-V warnings when running CTS.

    SPIR-V WARNING:
        In file ../src/compiler/spirv/vtn_cfg.c:144
        Function parameter Decoration not handled: SpvDecorationFPFastMathMode
        1340 bytes into the SPIR-V binary

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34909>
2025-05-14 11:29:09 -04:00
Alyssa Rosenzweig
52cc6c101f nir/lower_printf: fix vectors with nir_printf_fmt
for specifiers like %v4f, we need to store the whole vector. u_printf can
already handle this from OpenCL, we just need to match that here.

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/34909>
2025-05-14 11:29:08 -04:00
Christoph Pillmayer
90d966f9fa panvk: Remove unused path in flush_tiling
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/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
b115850ece panfrost: Remove unused ls_sb_slot from contexts
ls_sb_slot is unused now in cs_tracing_ctx and cs_exception_handler_ctx.
Let's remove it.

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/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
f75569734e panvk: Remove explicit LS waits
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/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
c28497c355 panvk: Add automatic load/store cs WAITs
This commit adds automatic insertion of WAIT instructions based
on the already existing cs_load_store_tracker.

Dependencies through memory need to be handled manually by the
user using the cs_flush_[loads/stores] functions.

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/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
cc790d12c6 panvk: Change pending_stores from bitset to bool
Also remove pending_stores check from cs_dst_tuple.
This is not required as the staging regs are read synchronously.

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/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
82f36cd8e3 panfrost: Make ls tracker mandatory in cs_builder
This commit moves cs_load_store_tracker from the cs_builder_conf
to cs_builder and makes it no longer optional to supply.

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/34808>
2025-05-14 14:03:29 +00:00
Rhys Perry
e7a7d9ea2e aco: fix wait_entry::join() when changing vmem_types
This is a bitmask, not a boolean.

No fossil-db 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/34935>
2025-05-14 11:22:13 +00:00
Rhys Perry
171920ceed 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>
2025-05-14 11:22:13 +00:00
Juan A. Suarez Romero
cbd85acf9a v3dv: free indirect CSD job with queue cpu
The indirect CSD job is added to the list of jobs when the device do not
support CPU queues. Otherwise it is not added, which means the job is
not free when the command buffer frees all the resources, generating a
leak.

This fixes this leak by identifying the job that contains the indirect
CSD job, and freeing it before freeing the job itself.

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/34892>
2025-05-14 10:23:46 +00:00
Lars-Ivar Hesselberg Simonsen
626e9e4179 panvk: Request resources during subqueue init
REQ_RES is a quite expensive operation, so calling it before and after
each RUN-command slows down RUN-command heavy workloads.

This commit moves REQ_RES calls to subqueue_init.

Reviewed-by: John Anthony <john.anthony@arm.com>
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/33512>
2025-05-14 09:07:17 +00:00
Lorenzo Rossi
e12ddbfd78 nak/from_nir: Fix fquantize crash on < SM70
Fixes: f21557154b ("nak/from_nir: Turn srcs into a closure")
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34961>
2025-05-14 08:51:15 +00:00
Lorenzo Rossi
efb440a3d8 nak: sm32: Fix wrong dsetp encoding
Fixes: 2929dae1e8 ("nak: Initial SM32 support")
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34961>
2025-05-14 08:51:15 +00:00
Erik Faye-Lund
080c0acf05 pan/ci: add fragment_out flakes from t860 to t760
We're seeing this in the nightly runs as well:

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/76298410#L1467

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34966>
2025-05-14 08:36:51 +00:00
Collabora's Gfx CI Team
d03d7015fd Uprev ANGLE to db33baf4eb0d7954f0110cddc30acb9cdc12e2d4
3540a326ec...db33baf4eb

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34870>
2025-05-14 08:04:17 +00:00
Georg Lehmann
33b5d8b2ec 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>
2025-05-14 07:42:23 +00:00
Mary Guillemard
804567ddd8 panfrost: Remove PROGRESS_* helpers in cs_builder.h
Progression logic is deprecated since v11 (removed on v14) and
we don't plan to use it.

This removes all PROGRESS_* helper in cs_builder.h.

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/34947>
2025-05-14 07:16:36 +00:00
Mary Guillemard
53f780ec91 panfrost: Remove progress_increment from all CS builders
Progression logic is deprecated since v11 and we don't plan to use it.
Let's get ride of all increment logic on all instructions.

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/34947>
2025-05-14 07:16:36 +00:00
Lorenzo Rossi
5ba982f166 nvk: Clean up boilerplate around complex NIR flags
This commit moves boilerplate code surrounding NIR flags in a common
NAK_AS_U32 macro. The code only checks that the flag structure
has only 32 bits and then copies it into a 32-bit int.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34940>
2025-05-14 03:22:32 +00:00
Patrick Lerda
769510f1cc r600: implement EXT_shader_image_load_store
Evergreen and cayman have the hardware support for this extension.
This is described by the manual as EXPORT_RAT_INST_INC_UINT_RTN
and EXPORT_RAT_INST_DEC_UINT_RTN.

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

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/34501>
2025-05-14 01:23:54 +00:00
Timothy Arceri
1d4ebe79b5 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>
2025-05-13 23:32:19 +00:00
Juan A. Suarez Romero
da7c716869 broadcom/ci: update test expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34963>
2025-05-13 19:30:41 +00:00
Thomas H.P. Andersen
a87c9bc49e 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>
2025-05-13 17:11:41 +00:00
Samuel Pitoiset
69ff204422 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>
2025-05-13 16:27:22 +00:00
Samuel Pitoiset
9a07ccbc89 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>
2025-05-13 16:08:14 +00:00
Marek Olšák
069fdc6f71 nir: handle mov and bcsel in nir_def_bits_used
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
e080833478 nir: handle iand/ior opcodes recursively in nir_def_bits_used
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
a78ed8b8e8 nir: handle extract opcodes recursively in nir_def_bits_used
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
e38a0b9a05 nir: handle u2u/i2i recursively in nir_def_bits_used
to get the number of bits actually used by the uses.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
15369a792a nir: handle mul24 in nir_def_bits_used
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
7e7ef7b8b7 nir: handle bit shifts by constants in nir_def_bits_used
useful for open-coded bitfield extracts that are not using ubfe/ibfe

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
7d24a9b649 nir: handle ibfe/ubfe in nir_def_bits_used
it will be used by radeonsi

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Marek Olšák
81bdf1ace6 nir: remove unnecessary (nir_shader *) typecasts
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34489>
2025-05-13 15:38:37 +00:00
Nanley Chery
4502254cd2 anv: Drop the slow clear heuristic
This no longer provides a performance improvement.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:05 +00:00
Nanley Chery
67d60f4325 intel/blorp: Simplify get_fast_clear_rect() for gfx12.5
Refactor the scale factors to highlight the 16-tile width requirement on
Tile4. The fast-clear simulator code associated with HSD 1407682962
also contains a 16-tile requirement for Tile4 surfaces (for the pitch).

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:05 +00:00
Nanley Chery
312952048b intel/blorp: Redescribe gfx12.5 surfaces for CCS fast clears
According to HSD 1407682962 and the associated simulator code,
fast-clear performance can be affected by: image alignment, tiling,
dimensionality, and row pitch. Redescribe surfaces in order avoid
fast-clearing at a slower rate.

Also, benchmarking the main patch in the performance CI (hw=A750)
shows that some traces are helped significantly:
* TotalWarWarhammer3 +5.58% (n=2)
* Factorio +3.75% (n=1)
* TerminatorResistance +3.3% (n=2)
* Borderlands3 +3.23% (n=2)

We could additionally increase the alignment requirements of surfaces in
order to deterministically increase fast-clear performance. That's left
out of this patch in order to avoid any functional pitfalls that can
arise with increased memory consumption. As a result, performance will
continue to be affected by how ISL/drivers/apps configure main surface
memory alignments (directly or indirectly).

Thanks to Lionel Landwerlin for pointing me to the relevant simulator
code.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11168
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11418
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:05 +00:00
Nanley Chery
169e22f962 intel/blorp: Drop clear color assignment prior to Xe2
This hasn't been used since the responsibility of clear color updates
moved to the drivers.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:05 +00:00
Nanley Chery
e353244553 intel/blorp: Disable repclear for gfx12 fast-clear
Docs indicate that this shouldn't be used.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:05 +00:00
Nanley Chery
8dad01903a intel: Add and use isl_surf_image_has_unique_tiles()
Returns whether or not a subresource range maps to a tile-aligned memory
range which doesn't overlap other subresources.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:04 +00:00
Nanley Chery
fcdae4d4c0 intel: Add and use isl_surf_from_mem()
Unify code which creates surfaces from buffers. The behavior is slightly
changed to use array layers to enable arrayed buffer clears (as needed).

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33776>
2025-05-13 15:13:04 +00:00
Wei Zhao
9a21ac2730 winsys/amdgpu: Remove assert about user fence in amdgpu_fence_wait
The assertion `assert(afence->seq_no <= *user_fence_cpu)` in
`amdgpu_fence_wait` can trigger a Mesa exit during GPU mode2 resets in
virtualized guest environments.

A GPU reset can cause the hardware to discard commands, including the
one that updates the user fence BO (`*user_fence_cpu`). This leaves
`*user_fence_cpu` with an older value, while `afence->seq_no` (from
command submission) is newer, leading to
`afence->seq_no > *user_fence_cpu` and triggering the assert.

Removing this assert prevents Mesa from exiting in this reset scenario.
No adverse side effects observed during testing. The assert appears
overly strict for hardware reset events where command completion is not
guaranteed.

Signed-off-by: Wei Zhao <wei.zhao@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34924>
2025-05-13 14:51:01 +00:00
Eric Engestrom
c2b6600ae8 docs/release-calendar: add 25.2 branchpoint & rc dates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34950>
2025-05-13 15:12:57 +02:00
Danylo Piliaiev
bcf901f5fb tu,freedreno: Use HW option to auto add base instance to instance id
We don't need the lowering of instance id to "base instance + offset"
since hw has VFD_ADD_OFFSET_INSTANCE flag.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34902>
2025-05-13 11:35:39 +00:00
Danylo Piliaiev
4bc060ea11 nir: Add option to not lower gl_InstanceIndex
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <anholt@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34902>
2025-05-13 11:35:39 +00:00
Georg Lehmann
0a30611c10 nir/opt_algebraic: some bitfield_select optimizations
Foz-DB Navi21:
Totals from 47 (0.06% of 79789) affected shaders:
Instrs: 69536 -> 69363 (-0.25%)
CodeSize: 370624 -> 369388 (-0.33%)
Latency: 383505 -> 383298 (-0.05%)
InvThroughput: 72924 -> 72727 (-0.27%)
PreSGPRs: 2618 -> 2610 (-0.31%)
VALU: 43261 -> 43091 (-0.39%)
SALU: 13065 -> 13063 (-0.02%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34739>
2025-05-13 10:59:09 +00:00
Georg Lehmann
201f6c1a00 gallium: remove left over clover files
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34930>
2025-05-13 10:29:46 +00:00
David Rosca
f5677a9050 radeonsi/video: Use ac_uvd_alloc_stream_handle
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
2025-05-13 09:36:48 +00:00
David Rosca
5fee04bcae 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>
2025-05-13 09:36:48 +00:00
David Rosca
69455e8208 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>
2025-05-13 09:36:47 +00:00
David Rosca
46d5926d83 radeonsi/vcn: Stop using stream handle for decode
It's only needed for old UVD without session context. Also remove
the NULL check for session context buffer as we always have the buffer.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
2025-05-13 09:36:47 +00:00
David Rosca
09d8235938 radeonsi/vcn: Remove unused stream_handle for encode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
2025-05-13 09:36:47 +00:00
David Rosca
fb53eec720 radeonsi/uvd_enc: Remove unused stream_handle
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
2025-05-13 09:36:47 +00:00
Natalie Vock
4339cf0aff 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>
2025-05-13 07:58:03 +00:00
Natalie Vock
e32a90b57c 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>
2025-05-13 07:58:03 +00:00
Tapani Pälli
720dae85f2 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>
2025-05-13 07:29:04 +00:00
Samuel Pitoiset
4b73d7e817 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>
2025-05-13 06:15:55 +00:00
Marek Olšák
a1ee6d6730 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>
2025-05-13 00:05:37 -04:00
Mike Blumenkrantz
ef63e3e4d2 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>
2025-05-12 19:34:08 +00:00
Danylo Piliaiev
824194aa0b tu: Don't disable EARLY_Z if SampleMask is written without d/s write
With EARLY_Z depth is written before FS is executed, so if FS writes
gl_SampleMask - the d/s written before FS would be incorrect since
sample mask can kill samples. However, if there is no d/s write
it's ok to kill fragment before FS.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34900>
2025-05-12 19:04:54 +00:00
Konstantin Seurer
5926b63f66 nir: Print struct type declarations
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26267>
2025-05-12 18:28:50 +00:00
Konstantin Seurer
5981b5bb7e nir/print: Use get_name for types
This avoids an awkward "  " if the struct name is missing.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26267>
2025-05-12 18:28:50 +00:00
Konstantin Seurer
d21311504b nir/print: Add a get_name helper
get_name works for any identifier, not just variables.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26267>
2025-05-12 18:28:50 +00:00
Job Noorman
96e2cf64ae freedreno/ci: update expectations
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
53de95cb0d ir3/postsched: use legalize state for delay/sync calc
Switch to using the newly available ir3_legalize_state API in
ir3_postsched. This has a few advantages:
- Prevents duplication of delay/sync logic. ir3_postsched is currently
  missing a lot of the complexities implemented in ir3_legalize. Reusing
  the logic makes sure ir3_postsched is kept up to date with these
  complexities.
- Allows ir3_postsched to have a global view (i.e., across blocks) on
  delay and sync state. Currently, all information is cleared at the
  start of blocks which makes us underestimate required delays.
- Allows ir3_postsched to have a more accurate view on required sync
  flags. We currently calculate requirement once based on whether an
  instruction's sources come from a ss/sy-producer. This does not take
  into account whether sources have already been synced. Now we can do
  this.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
ca014c7c24 ir3/legalize: make ir3_legalize_state and helpers public
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
631a105148 ir3/legalize: apply ss/sy to state in sync_update
This will keep the state consistent without having to worry about
calling apply_ss/sy.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
a0c2fdd152 ir3/legalize: add syncs based on previous instr to sync_update
sync_update currently only deals with the current instruction but there
are a few cases where syncs depend on the previous instruction (e.g.,
barriers). Add those to sync_update/ir3_required_sync_flags to have all
the sync logic centralized.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
7a44d832d3 ir3/legalize: add ir3_update_legalize_state helper
This is a convenience helper that updates 1) the sync state, 2) the
delay state, and 3) the block's current cycle value.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
0e9b7c6ff3 ir3/legalize: remove unused parameter from delay_update
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
0c05839fcd ir3/legalize: extract ir3_merge_pred_legalize_states helper
We will want to use this functionality in ir3_postsched.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
d4503b01b7 ir3/legalize: add ir3_init_legalize_state helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
ee430745fe ir3/legalize: extract sync_update helper
We will want to use this functionality in ir3_postsched.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
b91828d553 ir3/legalize: extract ir3_required_sync_flags helper
We will want to use this functionality in ir3_postsched.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
540cee6c3b ir3/legalize: remove ctx argument from delay_calc/update
In preparation for making these functions usable outside of
ir3_legalize.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
f7002802c3 ir3/legalize: normalize nop state at block start
Now that we have the block's final cycle value available in its state,
we don't have to subtract it at the end of a block anymore, but we can
do it at the beginning when merging it into its successor state. This
will save us one iteration over all its ready slots.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Job Noorman
03ee7c7c0f ir3/legalize: add cycle to ir3_legalize_state
Having the cycle as part of the state will become convenient for two
reasons:
- It will allow us to merge the state of predecessors without having to
  normalize states at the end of blocks (i.e., we now have to subtract
  the block's final cycle value from its ready slots at the end of the
  block; having its final cycle value available in its state will allow
  us to do this when merging predecessor states at the start of the
  block).
- We can update the cycle value as part of delay/sync state update
  routines. This way, the user doesn't have to worry about which
  instructions should actually update the cycle as this logic is nicely
  encapsulated.

This is part of the preparation for making the delay/sync legalization
logic available outside of ir3_legalize.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Job Noorman
12fadd27d3 ir3: add mergedregs to ir3_compiler
Storing it only in ir3_shader is sometimes inconvenient because it's not
available everywhere.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Job Noorman
0977863a8e ir3: calculate sstall/systall across blocks
Resetting the ss/sy delays at the start of blocks would underestimate
the actual delays at runtime. Make the estimate more accurate by keeping
track of outstanding delays at the end of blocks and setting the initial
delays of blocks to the maximum of their predecessor blocks.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Faith Ekstrand
13f9135e85 compiler/rust: Better document CFG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
98deabfa90 nak: Fix some rusdoc warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
3459004104 nak: Improve documentation for RegRef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
22056d5b08 nak: Improve documentation for PerRegFile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
d9cd61dc23 nak: Improve documentation on RegFile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
c022e22368 nak: Improve documentaiton for SSAValue and SSARef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
b26b0211b6 nak: sm32: Add Texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
2929dae1e8 nak: Initial SM32 support
This commit adds most operations to enable compute and basic draw tasks
for KeplerB (also known as Kepler 2.0, chips GK110 to GK180 or codename
NVF0-NVF1).  There are still major aspects such as as textures,
surfaces, shared atomics and scheduling that still need work and will be
added in other commits.

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/34329>
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
ee4cff7603 nvk: nak: Add OpViLd support
Kepler and earlier GPUs do not support the ISBERD instruction but have a
different VILD (Vertex Indirect Load) instruction that provides less
functionality.  This commit adds support for the op in nak and nir,
needed for the upcoming encoder commit.

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/34329>
2025-05-12 16:41:48 +00:00
Konstantin Seurer
2d48b2cb47 radv: Use subgroup OPs for BVH updates on GFX12
This patch changes the update code to launch 8 invocations for every
internal node. The internal nodes update their child leaf nodes using
the geometry index and primitive index stored inside the primitive node.

Processing 8 child nodes in parallel is faster than looping over them.
Moving to one dispatch that updates all nodes in one go lets us get rid
of atomics and will also enable updatable BVHs to use pair compression.

Improves Elden Ring (high settings, max RT settings, 1080p) by around
10%.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:31 +02:00
Konstantin Seurer
c6fdf11303 radv: Make radv_update_memory non-static
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:25 +02:00
Konstantin Seurer
4a8e232e39 vulkan: Add more information to BVH update callbacks
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:16 +02:00
Konstantin Seurer
5da0810e5d vulkan/bvh: Add type information for vk_bvh_geometry_data
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:11 +02:00
Konstantin Seurer
8157f84246 radv: Refactor the update scratch layout code
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:06 +02:00
Konstantin Seurer
b2aa0647d5 radv: Use a specialized shader for in place updates
If src == dst, we only need to update aabbs for the internal nodes.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:00 +02:00
Konstantin Seurer
e1110d20f8 vulkan: Add acceleration structure update keys
The driver can use an optimized shader when src == dst.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:44:56 +02:00
Sergi Blanch Torne
0796d8c502 fluster: xfile update
During the maintenance, and proably the previous MR to the first attempt
to merge, fixed a failing test without testing on fluster because the
farm was disabled.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922>
2025-05-12 14:25:54 +00:00
Sergi Blanch Torne
89d4f16c41 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit c06033955e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922>
2025-05-12 14:25:54 +00:00
Corentin Noël
77c0ff9fc7 virgl: Bail out on file descriptor duplication failure
Do not try to use a negative file descriptor.

CID: 1465120 Argument cannot be negative

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
965f41b550 virgl: Ensure to not overflow when encoding string marker
The maximal length is 65535 as an offset of 16 bits is being used to encode it.

Afterwards in VIRGL_CMD0, the buf_len equals 65536, so buf_len << 16 overflows its type which is uint32_t.

CID: 1604743 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
11a7b112cb vtest: Be more resilient when a resource creation has failed
Do not override the handle number with 0 if we fail to create a new resource.

Also make sure to store the handle consistently in an uint32_t.

CID: 1644460 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
5bec582e30 vtest: Silence some coverity issues
Add assertion about the returned read/written size being smaller than the size
left

CID: 1605126, 1604911
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
David Rosca
4fca9d9699 pipe/video: Remove st_rps_bits and UseStRpsBits
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836>
2025-05-12 13:12:05 +00:00
David Rosca
7d55b510e8 frontends/va: Set HEVC NumShortTermPictureSliceHeaderBits
This is the same value as st_rps_bits, which VDPAU already uses.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836>
2025-05-12 13:12:05 +00:00
Matthieu Oechslin
4e68e422e0 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>
2025-05-12 11:42:37 +00:00
Martin Krastev
034cb260ac svga/ci: Increase vmware-vmx-piglit job parallelism to 4
Bump up vmware farm's vmware-vmx-piglit job parallelism to 4.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34925>
2025-05-12 11:23:20 +00:00
Martin Krastev
d1ae27be0a svga/ci: enable vmware farm
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34925>
2025-05-12 11:23:20 +00:00
Rhys Perry
d0a09b6ff7 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>
2025-05-12 10:51:57 +00:00
Rhys Perry
c1ecad2b11 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>
2025-05-12 10:51:57 +00:00
Rhys Perry
ab09822b86 util: fix float to bfloat16 conversion with NaN
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: ecd2d2cf46 ("util: Add functions to convert float to/from bfloat16")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34882>
2025-05-12 10:26:01 +00:00
Eric Engestrom
f88dc25d23 docs/ci: allow running linkcheck in pre-merge pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34923>
2025-05-12 10:19:28 +00:00
Eric Engestrom
01a7b08992 docs/linkcheck: ignore loging wall for broadcom
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34923>
2025-05-12 10:19:27 +00:00
Eric Engestrom
9c251da89a docs/linkcheck: ignore a couple more domains blocking the linkcheck user-agent
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34923>
2025-05-12 10:19:27 +00:00
Eric Engestrom
8d4b63270a docs/conf.py: fix python formatting (whitespace changes only)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34923>
2025-05-12 10:19:27 +00:00
Eric Engestrom
fe82dcfc3d docs/linkcheck: print summary of problems found
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34923>
2025-05-12 10:19:27 +00:00
Karol Herbst
f0fa2209a8 nir: add nir_opt_algebraic_integer_promotion
This handles basic operations where clang promotes integers to 32 bits
according to the C99 spec in OpenCL C source code.

This is its own opt_algerbraic pass, because we don't wanna fight with
nir_lower_bit_size.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34641>
2025-05-12 09:29:20 +00:00
Danylo Piliaiev
2582cf9971 tu/lrz: Don't disable LRZ test for blend+depth write
Only LRZ write should be disabled for this draw call, while
test is ok since failing the test doesn't affect blending.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34901>
2025-05-12 08:53:57 +00:00
Lars-Ivar Hesselberg Simonsen
7451bc3bef 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
e2aa0b7566 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
009e4c2eba 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
e38eb00e4e 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
2542857259 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
6a9a4b3eef 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
cc58e30847 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>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
8b2ff9a8cf panfrost: Add pan_unpack to ForEachMacros
While various pan_pack macros were already there, pan_unpack was
missing.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
2025-05-12 08:37:08 +00:00
David Rosca
4ea52147c1 pipe/video: Remove unused UseRefPicList
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:59 +00:00
David Rosca
5edac5cd92 frontends/va: Only keep current slice RefPicList for HEVC
This is only used for slice header parsing now.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
David Rosca
639a95cd77 radeonsi/uvd: Stop using HEVC direct reflist
Not needed now that va frontend provides correct ref pic sets.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
David Rosca
203e9c29b4 radeonsi/vcn: Stop using HEVC direct reflist
Not needed now that va frontend provides correct ref pic sets.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
David Rosca
779edc0759 frontends/va: Correctly derive HEVC StCurrBefore, StCurrAfter and LtCurr
StCurrBefore and StCurrAfter are sorted by POC.
For LtCurr there is no defined order, so if there are multiple long term
references in a picture, we need to parse the slice header.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
Corentin Noël
c5d3a73f5e mesa: enable GL name reuse for virgl
This is now fixed upstream, the workaround is not required anymore.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34296>
2025-05-12 07:15:44 +00:00
Samuel Pitoiset
219a2b1e32 radv: ignore radv_zero_vram=true if zeroInitialDeviceMemory is enabled
To let applications like vkd3d-proton to take full control.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
21badbf336 radv: advertise VK_EXT_zero_initialize_device_memory
Only expose this extension when AMDGPU supports zerovram allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
eaf646d020 radv: implement VK_EXT_zero_initialize_device_memory
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
4b16de5e0d ac/gpu_info: add has_zerovram_support
AMDGPU 3.59.0+ clears VRAM on allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
2f2a5d31bd vulkan: add support for VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
62ec7e1056 vulkan: Update XML and headers to 1.4.315
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Sergi Blanch Torne
c06033955e ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-05-12 07:00 UTC
* End: 2025-05-12 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34690>
2025-05-11 22:35:10 +02:00
Eric Engestrom
96d5c5df6f lavapipe/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
df3f279233 lavapipe/ci: replace large (and growing) list of flakes with a regex
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
055594f886 broadcom/ci: document fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
86a29ce0ea radv/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
50c60dd07e radeonsi/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
6935f28cb3 radeonsi/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Faith Ekstrand
a752f242e5 docs/systems: Point people at the NVK page first
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34911>
2025-05-10 23:26:41 +00:00
Faith Ekstrand
86100ff8e3 docs/nvk: Add section about NVK+Zink
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34911>
2025-05-10 23:26:41 +00:00
Faith Ekstrand
bd207d6c54 docs/nvk: Improve the NVK docs page
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34911>
2025-05-10 23:26:41 +00:00
Mauro Rossi
04a643d877 intel/compiler: use ffsll instead of ffsl in brw_vue_map.c
18bbcf9a triggered the following building error in Android,
simple fix is to use ffsll() as it was done before 18bbcf9a
to process uint64_t generics argument.

Fixes the following building error:

FAILED: src/intel/compiler/libintel_compiler.a.p/brw_vue_map.c.o
...
../src/intel/compiler/brw_vue_map.c:120:37: error: implicit declaration of function 'ffsl' is invalid in C99 [-Werror,-Wimplicit-function-declaratio
n]
   const int first_generic_output = ffsl(generics) - 1;
                                    ^
../src/intel/compiler/brw_vue_map.c:120:37: note: did you mean 'ffs'?
/home/utente/r-x86_kernel/bionic/libc/include/strings.h:72:5: note: 'ffs' declared here
int ffs(int __i) __INTRODUCED_IN_X86(18);
    ^
1 error generated.

Fixes: 18bbcf9a ("intel: introduce new VUE layout for separate compiled shader with mesh")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34915>
2025-05-11 00:50:21 +02:00
Eric Engestrom
7c4f501e99 radv/ci: drop unnecessary CI_TRON_TIMEOUT__BOOT_CYCLE__MINUTES
It doesn't serve any purpose when `CI_TRON_TIMEOUT__BOOT_CYCLE__RETRIES`
is not set to 1 or more.

The two exception are `zink-radv-vangogh-valve` and
`radv-polaris10-vkcts` which do set `retries` > 0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899>
2025-05-09 22:19:39 +00:00
Eric Engestrom
61ba1fceff radv/ci: move the timeout from polaris10 job template to polaris10 job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899>
2025-05-09 22:19:39 +00:00
Eric Engestrom
9a9a08994b turnip/ci: drop CI_TRON_TIMEOUT__BOOT_CYCLE__MINUTES
It doesn't serve any purpose when `CI_TRON_TIMEOUT__BOOT_CYCLE__RETRIES`
is not set to 1 or more.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899>
2025-05-09 22:19:39 +00:00
Eric Engestrom
24ed4a244c nvk/ci: drop CI_TRON_TIMEOUT__BOOT_CYCLE__MINUTES
It doesn't serve any purpose when `CI_TRON_TIMEOUT__BOOT_CYCLE__RETRIES`
is not set to 1 or more.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899>
2025-05-09 22:19:39 +00:00
Eric Engestrom
0c4f53e8ae ci-tron: drop default timeouts
Every job must define the right timeouts anyway, so it doesn't make
sense to set these here.

Additionally, the 90/100 minutes overall timeout was unreachable since
the per-boot-cycle timeout was 45 minutes and there was no
BOOT_CYCLE__RETRIES set, so no retry was possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899>
2025-05-09 22:19:39 +00:00
Roland Scheidegger
5006d7f1f1 llvmpipe: Fix crash when using nir_tex_src_min_lod
Calculating lod does not always happen with the same vector size as
the vector size of the coords, which led to a crash when using the
new minLod feature. Use same repacking as with explicit lod.

Fixes: a8b104d9bd
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34906>
2025-05-09 21:55:12 +00:00
Ian Romanick
338273dedd brw/reg_allocate: Optimize spill offset calculation using integer MAD
Gfx12.5 and later allow the use of two 16-bit immediate values in
integer MAD. Gfx11 and Gfx12 allow a single immediate for integer MAD,
but that is not helpful where.

v2: brw_reg_alloc::build_lane_offsets is only used on Gfx12.5+, so the
check around using integer MAD is unnecessary.

No shader-db or fossil-db changes on any pre-Gfx12.5 platforms.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 17119962 -> 17118441 (<.01%)
instructions in affected programs: 65398 -> 63877 (-2.33%)
helped: 32 / HURT: 0

total cycles in shared programs: 895433316 -> 895425578 (<.01%)
cycles in affected programs: 13437376 -> 13429638 (-0.06%)
helped: 30 / HURT: 2

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 210052706 -> 209550074 (-0.24%)
Cycle count: 31486266412 -> 31436238696 (-0.16%); split: -0.16%, +0.00%

Totals from 7081 (1.00% of 707082) affected shaders:
Instrs: 16864614 -> 16361982 (-2.98%)
Cycle count: 6323185782 -> 6273158066 (-0.79%); split: -0.79%, +0.00%

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34886>
2025-05-09 21:31:09 +00:00
Ian Romanick
3db8dbfdc3 brw/reg_allocate: Optimize spill offset calculation using more SIMD8
Re-associate the calculation. The current calcuation is

    ((lane + zero_or_8) << 2) + offset

The first addition is SIMD8, and the shift and second addition are
SIMD16. By switching to

    ((lane << 2) + offset) + zero_or_32

All operations are SIMD8.

The SHL operates directly on the UW 0x76543210UV value, and that
eliminates the MOV to expand the UW to UD.

v2: Switch to alternate method. Update for SIMD32 on Xe2.

No shader-db or fossil-db changes on any pre-Gfx12.5 platforms.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 17121519 -> 17119962 (<.01%)
instructions in affected programs: 73208 -> 71651 (-2.13%)
helped: 36
HURT: 0
helped stats (abs) min: 1 max: 129 x̄: 43.25 x̃: 56
helped stats (rel) min: 0.05% max: 4.92% x̄: 2.50% x̃: 2.79%
95% mean confidence interval for instructions value: -56.02 -30.48
95% mean confidence interval for instructions %-change: -3.24% -1.75%
Instructions are helped.

total cycles in shared programs: 895450146 -> 895433316 (<.01%)
cycles in affected programs: 13709400 -> 13692570 (-0.12%)
helped: 31
HURT: 2
helped stats (abs) min: 26 max: 1654 x̄: 543.10 x̃: 672
helped stats (rel) min: <.01% max: 3.43% x̄: 0.43% x̃: 0.51%
HURT stats (abs)   min: 2 max: 4 x̄: 3.00 x̃: 3
HURT stats (rel)   min: <.01% max: <.01% x̄: <.01% x̃: <.01%
95% mean confidence interval for cycles value: -652.42 -367.58
95% mean confidence interval for cycles %-change: -0.61% -0.19%
Cycles are helped.

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 210566294 -> 210052706 (-0.24%)
Cycle count: 31582309052 -> 31486266412 (-0.30%); split: -0.30%, +0.00%

Totals from 7091 (1.00% of 707082) affected shaders:
Instrs: 17408115 -> 16894527 (-2.95%)
Cycle count: 6443785290 -> 6347742650 (-1.49%); split: -1.49%, +0.00%

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34886>
2025-05-09 21:31:09 +00:00
Marek Olšák
dbef8f1791 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>
2025-05-09 20:50:57 +00:00
Adam Jackson
0ffbfa1d54 util/cpu: Teach the Linux code about getauxval()
In addition to being nicer to read this is also slightly more efficient
since it doesn't need to open a file.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34820>
2025-05-09 20:10:10 +00:00
Adam Jackson
1ef9cd3504 util/cpu: Remove util_cpu_caps_t::family
This had two uses, neither of them very good. On s390x we used it to
store the fact of our s390-ness, which we can replace with
DETECT_ARCH_S390. On x64 we used it to communicate AMD-Zen-ness to the
L3 topology detection code, which we can replace with a local parameter.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34820>
2025-05-09 20:10:10 +00:00
Adam Jackson
6abae1d42b util: Remove unused USED macro
The glapi assembly code used to use this to force some symbols to stay
in the link even if they would normally get garbage-collected. We're not
doing that anymore. If we ever need it again we can add it back, and not
conflate its definition with the PUBLIC macro state while we're at it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34820>
2025-05-09 20:10:10 +00:00
Brian Paul
c2267358c6 svga: increase SVGA_MAX_FRAMEBUFFER_DEFAULT_SAMPLES to 16
This fixes the piglit arb_framebuffer_no_attachments-query test
(asserted in debug builds, crashed in release builds).  Passes
with this change.

The SVGA_MAX_FRAMEBUFFER_DEFAULT_SAMPLES value is only used to
dimension the svga_rasterizer_state::altRastIds[] array.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34888>
2025-05-09 19:51:43 +00:00
Eric Engestrom
c4ead6d703 nvk/ci: tighten job timeouts a little bit
Since nvk got faster, and job duration is incredibly stable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34880>
2025-05-09 19:19:31 +00:00
Eric Engestrom
3619986283 zink+nvk/ci: document more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34880>
2025-05-09 19:19:31 +00:00
Martin Roukala (né Peres)
4ccc37577c nvk/ci: switch nouveau.ko jobs to common kernel (6.13.7)
Now that it is possible to have more than one initrd, let's switch to
the common b2c kernel which requires two additional initrds:

 * The GPU initrd which contains amdgpu, i915, nouveau, radeon, and xe,
   along with their necessary firmware
 * The depmod initrd which contains what's necessary to modprobe the
   modules of the GPU initrd

Since the GPU initrd is huge (73 MB), let's reduce the size by dropping
all the firmware that is not needed for the exact generation of GPU
needed by the DUT.

Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34880>
2025-05-09 19:19:31 +00:00
Boyuan Zhang
5247269135 frontends/va: enable cenc for protected playback
Enable cenc mode by checking protected slice data buffer

Signed-off-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/34854>
2025-05-09 17:54:14 +00:00
Boyuan Zhang
e1f9dde5c0 radeonsi/vcn: add drm keyblob for cenc
Add new message buffer for drm keyblob which contains local policy
for cenc

Signed-off-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/34854>
2025-05-09 17:54:14 +00:00
Boyuan Zhang
2b6ecc8269 radeonsi/vcn: add drm key for cenc
Add new function to handle drm message buffer for cenc, which is
different than legacy mode.

Signed-off-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/34854>
2025-05-09 17:54:14 +00:00
Boyuan Zhang
d6e2438113 radeonsi/vcn: add subsample for cenc
Create new buffer for subsample parameters and submit it for cenc decryption

Signed-off-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/34854>
2025-05-09 17:54:14 +00:00
Boyuan Zhang
5565043534 radeonsi: add header file for cenc parameters
New header file that defines parameters and structres for cenc decryption.

Signed-off-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/34854>
2025-05-09 17:54:14 +00:00
Boyuan Zhang
4e9b59075a pipe: add boolean for CENC standard
Set it to be true for cenc encryption standard, or false otherwise.

Signed-off-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/34854>
2025-05-09 17:54:14 +00:00
Daniel Schürmann
83fcd0e908 aco/insert_exec_mask: don't create unnecessary loop-header and -exit phis after demote
No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Daniel Schürmann
3dab7b0a45 nir/tests: add tests for nir_move_terminate_out_of_loops
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Daniel Schürmann
7adad4fc0e aco/isel: assert that terminate intrinsics don't appear in loops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Daniel Schürmann
46f6c73d36 aco/isel: remove check for empty exec mask on uniform continues
This could only happen after terminate_if inside loops.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Daniel Schürmann
2b0536e921 aco: remove block_kind_continue_or_break workaround and tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Daniel Schürmann
fa4eb37bf6 radv: move terminate{_if} out of loops.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Daniel Schürmann
c59356e6a5 nir: add option to move terminate{_if} out of loops
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479>
2025-05-09 17:20:29 +00:00
Tanner Van De Walle
07ae79d4f9 util: Make atomic_read use volatile reads with _Generic/decltype
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34845>
2025-05-09 16:34:00 +00:00
Sil Vilerino
150fa795fe nir: Only build nir headers for mediafoundation/d3d12-no-graphics paired build
Reviewed-by: <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34845>
2025-05-09 16:34:00 +00:00
Pohsiang (John) Hsu
493b3fa661 gallium/auxiliary: fix msvc build warning 4146 (unary minus operator applied to unsigned type, result still unsigned)
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34845>
2025-05-09 16:34:00 +00:00
Pohsiang (John) Hsu
fdc36dd54a util: fix msvc build warning 4146 (unary minus operator applied to unsigned type, result still unsigned)
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34845>
2025-05-09 16:34:00 +00:00
Eric Engestrom
0f4b022708 ci/ci-tron: drop special case for default x86_64 kernel (= uprev to 6.13.7)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34898>
2025-05-09 15:56:18 +00:00
Eric Engestrom
9798f48de5 ci/ci-tron: document which kernel version is provided in a given b2c release
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34898>
2025-05-09 15:56:18 +00:00
Eric Engestrom
5fc98ce169 amd/ci: set kernel for amdgpu jobs in .ci-tron-test-amdgpu
This fixes the kernel used by `radeonsi-vangogh-glcts`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34898>
2025-05-09 15:56:18 +00:00
Eric Engestrom
1d902e3372 amd/ci: split .ci-tron-test-amdgpu from .ci-tron-test-radv
To be reused by the other ci-tron amdgpu jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34898>
2025-05-09 15:56:18 +00:00
David Rosca
f8042fa926 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>
2025-05-09 14:46:53 +00:00
Georg Lehmann
f1c066b353 aco/optimizer: remove instr_usedef_labels completely
Some changes because omod/clamp/insert no longer remove label_extract.

Foz-DB GFX1201:
Totals from 15 (0.02% of 79789) affected shaders:
Instrs: 15328 -> 15299 (-0.19%)
CodeSize: 76416 -> 76292 (-0.16%)
Latency: 62306 -> 62288 (-0.03%)
InvThroughput: 6165 -> 6148 (-0.28%)
Copies: 710 -> 709 (-0.14%)
VALU: 7908 -> 7892 (-0.20%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
eb6f5202ac aco/optimizer: remove label_usedef
No Foz-DB changes on NAvi21 and GFX1201.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
ffe11c0235 aco/optimizer: create fma without label_usedef
Foz-DB GFX1201:
Totals from 1 (0.00% of 79789) affected shaders:
Instrs: 1492 -> 1485 (-0.47%)
CodeSize: 7436 -> 7384 (-0.70%)
Latency: 2738 -> 2743 (+0.18%)
InvThroughput: 364 -> 365 (+0.27%)
SClause: 50 -> 56 (+12.00%)
Copies: 101 -> 100 (-0.99%)
PreSGPRs: 32 -> 31 (-3.12%)
VALU: 700 -> 701 (+0.14%)
SALU: 351 -> 350 (-0.28%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
177c98f95a aco/optimizer: apply dpp without label_usedef
Less interference with output modifier labels.

Foz-DB GFX1201:
Totals from 109 (0.14% of 79789) affected shaders:
Instrs: 161005 -> 160890 (-0.07%); split: -0.08%, +0.01%
CodeSize: 859472 -> 859720 (+0.03%); split: -0.03%, +0.06%
VGPRs: 6420 -> 6432 (+0.19%)
Latency: 1453659 -> 1452201 (-0.10%); split: -0.14%, +0.04%
InvThroughput: 171403 -> 171135 (-0.16%); split: -0.21%, +0.06%
VClause: 2746 -> 2743 (-0.11%)
SClause: 5256 -> 5257 (+0.02%)
Copies: 11085 -> 11008 (-0.69%); split: -0.89%, +0.20%
Branches: 3758 -> 3756 (-0.05%)
VALU: 90903 -> 90793 (-0.12%); split: -0.14%, +0.02%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
94ea9fd999 aco/optimizer: label p_extract as usedef
Helpful for combine_add_or_then_and_lshl on gfx11+.

Foz-DB GFX1201:
Totals from 478 (0.60% of 79789) affected shaders:
Instrs: 3844774 -> 3843719 (-0.03%); split: -0.03%, +0.00%
CodeSize: 20268684 -> 20268120 (-0.00%); split: -0.01%, +0.00%
Latency: 27005820 -> 27002460 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 5438686 -> 5436935 (-0.03%); split: -0.03%, +0.00%
Copies: 312458 -> 312469 (+0.00%); split: -0.00%, +0.01%
VALU: 2141236 -> 2140406 (-0.04%)
SALU: 527973 -> 527922 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
edfba93f4c aco/optimizer: apply f2f32 without label_usedef
This means we apply it to instructions where an omod label removed label_usedef.

Foz-DB Navi21:
Totals from 52 (0.07% of 79789) affected shaders:
Instrs: 144945 -> 144304 (-0.44%); split: -0.45%, +0.01%
CodeSize: 835956 -> 833992 (-0.23%); split: -0.30%, +0.06%
Latency: 2850900 -> 2850018 (-0.03%); split: -0.05%, +0.02%
InvThroughput: 1299486 -> 1299116 (-0.03%); split: -0.05%, +0.02%
Copies: 29638 -> 29803 (+0.56%); split: -0.16%, +0.71%
VALU: 94971 -> 94329 (-0.68%); split: -0.69%, +0.01%
SALU: 29272 -> 29274 (+0.01%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
c0e88c376a aco/optimizer: validate context data
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
906b7dbcec aco: replace novalidateir with novalidate debug option
The next commits will add more validation that's enabled by default.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
1540db244b aco/optimizer: store parent_instr for all temps
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
918359b41e aco/optimizer: add semantic aliases for info.instr
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:25 +00:00
Georg Lehmann
c62d7e680c aco/optimizer: remove label_mul
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
f773860a23 aco/optimizer: remove label_bitwise
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
cf3ec4a28f aco/optimizer: remove label_split
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
907e86e8fb aco/optimizer: remove label_vec
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
2c0a924521 aco/optimizer: remove label_minmax
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
dca8a7981d aco/optimizer: remove label_f2f32
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
17a973c6fa aco/optimizer: remove label_dpp8 and label_dpp16
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:24 +00:00
Georg Lehmann
dfa7e56f23 aco/optimizer: remove label_add_sub
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:23 +00:00
Georg Lehmann
345bf8a2f2 aco/optimizer: remove label_vop3p
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:23 +00:00
Georg Lehmann
6667ee66d5 aco/optimizer: remove label_vopc
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858>
2025-05-09 14:23:23 +00:00
Georg Lehmann
6f4e26e54d radv/gfx12+: enable VK_KHR_shader_bfloat16
GFX11 seems to have precision issues, so don't enable the extension there for now.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:26 +00:00
Georg Lehmann
a2209547db ac/nir: enable nir_op_bfdot2_bfadd
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:26 +00:00
Georg Lehmann
44be05cc45 ac/llvm: support nir_op_bfdot2_bfadd
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:26 +00:00
Georg Lehmann
f5a5905e37 aco: support nir_op_bfdot2_bfadd
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:26 +00:00
Georg Lehmann
ba63263f32 nir: add bfdot2_bfadd and use it for lowering bfdot if supported
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:26 +00:00
Georg Lehmann
f364303084 ac/nir: set lower_bfloat16_conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:26 +00:00
Georg Lehmann
02e743c99e nir: add an option to lower bf2f and f2bf
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:25 +00:00
Georg Lehmann
7716e63cd6 radv/nir/lower_cmat: handle bf16 conversions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:25 +00:00
Georg Lehmann
78524837c1 radv/nir/opt_cmat: support bfloat16
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:25 +00:00
Georg Lehmann
5ca98bf99e aco: support bf16 wmma
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:25 +00:00
Georg Lehmann
e8f5c335ff radv,aco,nir: keep the A and B base type for cmat_muladd_amd
With bfloat16, and the two fp8 formats in the future, using just the bit size
to identify the types is no longer possible.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34768>
2025-05-09 11:20:25 +00:00
Konstantin Seurer
c21e1776b3 radv: Use build flags instead of defines
Using the meta framework makes managing shader variants much easier.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34594>
2025-05-09 09:55:32 +00:00
Konstantin Seurer
2eaf997574 vulkan: Add helpers for creating bvh build pipelines/layouts
This should make it easier for drivers to use the meta framework for
managing encode/update pipelines.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34594>
2025-05-09 09:55:32 +00:00
Konstantin Seurer
33ac143779 vulkan: Introduce VK_BUILD_FLAG for specializing BVH build shaders
The advantage of using spec constants is that we do not have to include
multiple spirv binaries for multiple variants of a build stage.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34594>
2025-05-09 09:55:32 +00:00
Mary Guillemard
330c3c68e2 pan/util,midgard: Remove pan_block
This is only used by midgard, move everything left related to it to
midgard.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32650>
2025-05-09 09:33:38 +00:00
Mary Guillemard
dce110a604 panfrost/util: Move print_alu_type and PAN_IS_REG to midgard
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32650>
2025-05-09 09:33:38 +00:00
Mary Guillemard
fdef86a4a2 pan/util: Move liveness logic to midgard
Only used in midgard.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32650>
2025-05-09 09:33:38 +00:00
Mary Guillemard
49261faac8 pan/util: Move lcra to midgard
This is only used by midgard, bifrost have its own custom version of
this.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32650>
2025-05-09 09:33:38 +00:00
Mary Guillemard
22f70f20c7 panfrost: Move genxml out of pan/lib
This will simplify things a bit later

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32650>
2025-05-09 09:33:38 +00:00
Samuel Pitoiset
dae45adc9d aco: adjust an assertion in select_trap_handler_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34840>
2025-05-09 09:04:57 +00:00
Samuel Pitoiset
ae6d3df139 radv,aco: dump more SQ_WAVE registers from the trap handler on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34840>
2025-05-09 09:04:57 +00:00
Samuel Pitoiset
0e73c85424 radv: fix configuring TRAP_PRESENT for compute shaders on GFX12
It no longer exists and it's been replaced by DYNAMIC_VGPR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34840>
2025-05-09 09:04:57 +00:00
Samuel Pitoiset
50a01a6559 radv: fix save/restore SCC in the trap handler on GFX12
SQ_WAVE_STATE_PRIV now contains SCC instead of SQ_WAVE_STATUS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34840>
2025-05-09 09:04:57 +00:00
Samuel Pitoiset
effa563bb0 radv: adjust computing the PC from the trap handler on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34840>
2025-05-09 09:04:57 +00:00
Valentine Burley
34012d5af3 ci: Remove EXTERNAL_KERNEL_TAG variable
The EXTERNAL_KERNEL_TAG variable is no longer needed.
For LAVA and bare-metal, we can override the KERNEL_TAG variable to fetch
both the kernel image and modules from a different tag than the default
mainline gfx-ci/linux kernel.

For LAVA, this also avoids the issue where jobs using EXTERNAL_KERNEL_TAG
would still have mainline kernel modules downloaded by the LAVA overlay.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34873>
2025-05-09 07:18:53 +00:00
Valentine Burley
c093a09660 ci/baremetal: Fix rootfs URL detection
The previous check used a directory path without the filename, causing
`curl` to return 404 and always fall back to the fork's URL. Add the
rootfs filename to ensure the check works as intended.

Fixes: 13db56320b ("ci/baremetal: Use container rootfs")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34873>
2025-05-09 07:18:53 +00:00
Iván Briano
99405647a4 anv: vkCmdTraceRays* are not covered by conditional rendering
The spec says:
  Certain rendering commands can be executed conditionally based on a
  value in buffer memory. These rendering commands are limited to
  drawing commands, dispatching commands, and clearing attachments with
  vkCmdClearAttachments within a conditional rendering block which is
  defined by commands vkCmdBeginConditionalRenderingEXT and
  vkCmdEndConditionalRenderingEXT. Other rendering commands remain
  unaffected by conditional rendering.

It would seem that vkCmdTraceRays* are not covered by that.

Fixes new tests dEQP-VK.conditional_rendering.conditional_ignore.trace_rays*

Reviewed-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/34864>
2025-05-08 21:08:06 +00:00
Konstantin Seurer
bdadd1aa68 lavapipe/ci: Update expected vkd3d-proton fails
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
e3420edac9 gallivm: Use divergent sources for more subgroup ops
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
2cdec6238c gallivm/nir/aos: Remove left over debug print
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
3d1072ec26 lavapipe: Implement VK_EXT_fragment_shader_interlock
This is a noop implementation because it is not possible for multiple
threads to access the same pixel during rasterization since it is
tiled.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
94c8a0e820 lavapipe: Implement KHR_shader_quad_control
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
f49ef38701 lavapipe: Advertise shaderResourceMinLod
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
a8b104d9bd llvmpipe: Handle nir_tex_src_min_lod
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
db34e2d540 lavapipe: Advertise VK_EXT_shader_image_atomic_int64
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
2be75cfe63 lavapipe: Implement 64-bit image clears
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
3ecb89c35b gallium: Handle 64bit textures in the SW clear fallback path
64bit clears only work with <=2 component formats because the two
integer clear values are interpreted as one 64bit integer.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
37f4ede8bf llvmpipe: Disable 64-bit integer formats for vertex fetch
draw does not handle them.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
c05e42eaea llvmpipe: Implement 64-bit image operations
LLVM has support and everything should be in place to support them.
There are just a few 32-bit assumptions that have to be removed.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Konstantin Seurer
d49de8f10a util: Add util_format_is_int64
util_format_is_int64 returns true for pure 64-bit integer (sint64 and uint64) formats.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
2025-05-08 19:30:19 +00:00
Samuel Pitoiset
4b76d04f7f 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>
2025-05-08 19:08:10 +00:00
Robert Mader
7b68e1da91 llvmpipe: Enable support for multiplanar formats
Stop supporting formats that would cause us to use
lp_build_fetch_subsampled_rgba_aos() for YCbCr->RGB conversion
and always go through the slower emulated paths using
mulitple sampler views.

This not only allows dmabuf imports with EXT_image_dma_buf_import
to succeed for common YCbCr formats, but also ensures hints like
EGL_YUV_COLOR_SPACE_HINT_EXT and EGL_SAMPLE_RANGE_HINT_EXT are
honored.

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>
2025-05-08 18:47:17 +00:00
Robert Mader
bf126d08ae llvmpipe: Preparations for multiplanar formats
Use the appropriate util functions like many other drivers.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34775>
2025-05-08 18:47:17 +00:00
Robert Mader
4051d4ef59 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>
2025-05-08 18:47:17 +00:00
Gurchetan Singh
03a35024a6 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>
2025-05-08 18:29:03 +00:00
Samuel Pitoiset
b7d2cdd2b4 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>
2025-05-08 17:17:28 +02:00
Sil Vilerino
154c3934d6 d3d12: Add missing offset to encode slice metadata in the get_feedback function
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 10:42:17 -04:00
Sil Vilerino
245be20fa1 d3d12: Add fallback to ID3D12VideoEncodeCommandList2 if ID3D12VideoEncodeCommandList4 not available in underlying OS
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
e30a534f29 d3d12: Add missing D3D12_VIDEO_USE_NEW_ENCODECMDLIST4_INTERFACE guards
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
be33edbdf1 d3d12: Set HEVC slice mode state before calling d3d12_video_encoder_negotiate_requested_features_and_d3d12_driver_caps
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Pohsiang (John) Hsu
2939604248 d3d12: fix configuration flag for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_DISABLE_LOOP_FILTER_ACROSS_SLICES
Signed-off-by: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
2ff18b2757 d3d12: Remove more nir dependencies when with_gallium_d3d12_graphics disabled
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
27829d7ffe d3d12: Do not build microsoft/compiler when graphics, gl or vk disabled
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
5051140c32 d3d12: Report pipe_enc_cap_dirty_info.supports_require_sao/loop_filter_disabled
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
64f1a365e5 pipe: Add pipe_enc_cap_dirty_info.supports_require_sao/loop_filter_disabled
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
922f8a7d07 d3d12: Implement H264/HEVC PIPE_VIDEO_SLICE_MODE_AUTO for gallium driver auto-partition
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
0ee4b77ec9 pipe: Add PIPE_VIDEO_SLICE_MODE_AUTO for gallium driver auto-partition
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
7dfc7e1b1d d3d12: Reports pipe_enc_cap_dirty_info.supports_require_auto_slice_mode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
ffe9cec740 pipe: Add pipe_enc_cap_dirty_info.supports_require_auto_slice_mode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
1c31fc3091 d3d12: Implement GPU Input Motion vectors
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
143087dadd d3d12: Make d3d12_video_encode_support_caps in/out param capEncoderSupportData1 pointer members an external allocation to outlive the stack of the method call
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
7312db4827 pipe: Add support for (GPU Input) motion maps
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
2c193547ca d3d12: Implement PIPE_VIDEO_CAP_ENC_QP_MAPS and CPU/GPU input QPMaps
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
5810c39978 pipe: Add (GPU input) PIPE_VIDEO_CAP_ENC_QP_MAPS and input_gpu_qpmap GPU input support
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
5cb4979875 d3d12: Add GPU input dirty rect support
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
86d521db4f pipe: Add (GPU input) PIPE_VIDEO_CAP_ENC_DIRTY_MAPS and pipe_enc_move_rects GPU input support
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
064e07b26a d3d12: deduplicate code with helpers: get_dirty_rects_support, get_move_rects_support, get_gpu_output_stats_support, get_sliced_encode_support
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
19cbb13255 d3d12: Support slice NAL prefixes on slice notifications mode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
df995c9631 d3d12: Implement multi-slice notifications
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
bedd423893 d3d12: Prepare d3d12_video_encoder_encode_bitstream for sliced encoding. Checked working with single slice buffer at this point
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
555a13661a pipe: Add sliced encoding API and caps
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
c5f5ee41c8 d3d12: Add support for QP, SATD and RC bits output stats
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
25726509ff pipe: Add PIPE_VIDEO_CAP_ENC_GPU_STATS_* and pipe_resource textures in H264/H265 encode pic params
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
56bbfb9598 d3d12: Add support for pipe_enc_move_rects for H264/H265 encode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
7c490bb860 pipe: Add PIPE_VIDEO_CAP_ENC_MOVE_RECTS and pipe_enc_move_rects for H264/H265 encode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
6d81bc0cdd d3d12: Add support for pipe_enc_dirty_rects for H264/H265 encode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
700c6fff58 pipe: Add PIPE_VIDEO_CAP_ENC_DIRTY_RECTS and pipe_enc_dirty_rects for H264/H265 encode
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
4e632ed891 d3d12: Use D3D12_FEATURE_VIDEO_ENCODER_SUPPORT2 when D3D12_VIDEO_USE_NEW_ENCODECMDLIST4_INTERFACE is set
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
731bc92e87 d3d12: Add #if guards for using new ID3D12VideoEncodeCommandList4
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
2465dcf4cc d3d12: Fix reporting for PIPE_VIDEO_CAP_ENC_MAX_DPB_CAPACITY
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
0577c77a4c d3d12: Report pipe_enc_cap_roi.log2_roi_min_block_pixel_size
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Sil Vilerino
17cdbc5729 pipe: Add pipe_enc_cap_roi.log2_roi_min_block_pixel_size
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Pohsiang (John) Hsu
295ecc8d96 d3d12: enable D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_LONG_TERM_REFERENCES when max_num_ltr_frames > 0
Signed-off-by: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Pohsiang (John) Hsu
ebd82f39f8 d3d12: Add support for retreiving PIPE_VIDEO_CAP_ENC_MAX_DPB_CAPACITY for H264/H265 encode
Signed-off-by: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:22 +00:00
Pohsiang (John) Hsu
7557ce41be pipe: add PIPE_VIDEO_CAP_ENC_MAX_DPB_CAPACITY for H264/H265 encode
Signed-off-by: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:21 +00:00
Pohsiang (John) Hsu
ea7ef6d575 d3d12: Add support for retrieving PIPE_VIDEO_CAP_ENC_MAX_LONG_TERM_REFERENCES_PER_FRAME for H264/H265 encode
Signed-off-by: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:21 +00:00
Pohsiang (John) Hsu
743f0a8df1 pipe: add PIPE_VIDEO_CAP_ENC_MAX_LONG_TERM_REFERENCES_PER_FRAME for H264/H265 encode
Signed-off-by: Pohsiang Hsu <pohhsu@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
2025-05-08 14:17:21 +00:00
Rhys Perry
2704a30df0 radv: perform nir_opt_access before the first radv_optimize_nir
Two lowered loads might not be CSE'd after nir_lower_explicit_io if one of
them is shrinked. This doesn't happen for deref loads, but it needs the
CAN_REORDER flag first.

fossil-db (gfx1201):
Totals from 556 (0.70% of 79377) affected shaders:
MaxWaves: 14936 -> 14940 (+0.03%); split: +0.05%, -0.03%
Instrs: 2140334 -> 2140942 (+0.03%); split: -0.07%, +0.10%
CodeSize: 11137948 -> 11145416 (+0.07%); split: -0.07%, +0.13%
SpillSGPRs: 2385 -> 2527 (+5.95%); split: -0.34%, +6.29%
Latency: 12310570 -> 12305011 (-0.05%); split: -0.08%, +0.04%
InvThroughput: 2136142 -> 2135516 (-0.03%); split: -0.06%, +0.03%
VClause: 47419 -> 47420 (+0.00%); split: -0.01%, +0.01%
SClause: 58423 -> 58290 (-0.23%); split: -0.36%, +0.14%
Copies: 160626 -> 161321 (+0.43%); split: -0.25%, +0.68%
Branches: 69693 -> 69710 (+0.02%); split: -0.04%, +0.06%
PreSGPRs: 34824 -> 34945 (+0.35%); split: -0.24%, +0.58%
PreVGPRs: 28682 -> 28649 (-0.12%); split: -0.36%, +0.24%
VALU: 1080800 -> 1081171 (+0.03%); split: -0.04%, +0.08%
SALU: 353112 -> 353770 (+0.19%); split: -0.15%, +0.34%
SMEM: 81587 -> 81364 (-0.27%)

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
18a53230eb aco: don't check dst_bitsize in apply_load_extract
I don't think this is necessary.

fossil-db (gfx1201):
Totals from 12 (0.02% of 79377) affected shaders:
Instrs: 73041 -> 72669 (-0.51%); split: -0.51%, +0.00%
CodeSize: 417376 -> 413852 (-0.84%); split: -0.85%, +0.00%
Latency: 1301862 -> 1301533 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 599874 -> 599723 (-0.03%)
VClause: 1344 -> 1346 (+0.15%)
Copies: 15855 -> 15832 (-0.15%); split: -0.37%, +0.23%
VALU: 42138 -> 41883 (-0.61%); split: -0.61%, +0.00%

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
eb95f7cc0e aco: support sign extension in apply_load_extract
fossil-db (gfx1201):
Totals from 10 (0.01% of 79377) affected shaders:
Instrs: 28954 -> 28938 (-0.06%)
CodeSize: 164552 -> 164472 (-0.05%)
Latency: 1249341 -> 1247037 (-0.18%)
InvThroughput: 297077 -> 296618 (-0.15%)
VALU: 15951 -> 15941 (-0.06%)

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
0de0fd38b4 aco: support more opcodes in apply_ds_extract
fossil-db (gfx1201):
Totals from 320 (0.40% of 79377) affected shaders:
Instrs: 3439754 -> 3432384 (-0.21%)
CodeSize: 18008696 -> 17973180 (-0.20%); split: -0.20%, +0.00%
VGPRs: 16016 -> 15404 (-3.82%)
Latency: 20246168 -> 20295740 (+0.24%); split: -0.08%, +0.33%
InvThroughput: 4462916 -> 4478546 (+0.35%); split: -0.08%, +0.43%
VClause: 87123 -> 87099 (-0.03%)
Copies: 261779 -> 261948 (+0.06%); split: -0.05%, +0.12%
Branches: 94611 -> 94601 (-0.01%); split: -0.01%, +0.00%
VALU: 1870695 -> 1865738 (-0.26%)
SALU: 488351 -> 487557 (-0.16%)

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
3b42626973 ac/nir: allow 8/16-bit smem loads
fossil-db (gfx1201):
Totals from 295 (0.37% of 79377) affected shaders:
Instrs: 314018 -> 313355 (-0.21%); split: -0.22%, +0.00%
CodeSize: 1697996 -> 1696528 (-0.09%); split: -0.11%, +0.02%
Latency: 4197719 -> 4197106 (-0.01%)
InvThroughput: 1258891 -> 1258744 (-0.01%)
PreSGPRs: 12232 -> 12230 (-0.02%)
SALU: 66762 -> 66269 (-0.74%)

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
5b116c4de9 ac/nir: allow vectorization of unsupported 8/16-bit loads
These can later be lowered to a vectorized 32-bit load.

fossil-db (gfx1201):
Totals from 1259 (1.59% of 79377) affected shaders:
MaxWaves: 36821 -> 36817 (-0.01%)
Instrs: 4363702 -> 4355749 (-0.18%); split: -0.23%, +0.05%
CodeSize: 22779980 -> 22706504 (-0.32%); split: -0.37%, +0.05%
VGPRs: 69672 -> 69792 (+0.17%); split: -0.02%, +0.19%
SpillSGPRs: 675 -> 673 (-0.30%)
Latency: 26684053 -> 26663819 (-0.08%); split: -0.11%, +0.03%
InvThroughput: 5617687 -> 5614798 (-0.05%); split: -0.10%, +0.04%
VClause: 106830 -> 106654 (-0.16%); split: -0.17%, +0.00%
SClause: 75523 -> 75495 (-0.04%); split: -0.04%, +0.01%
Copies: 323199 -> 323525 (+0.10%); split: -0.10%, +0.20%
Branches: 109475 -> 109480 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 55036 -> 55040 (+0.01%)
PreVGPRs: 47538 -> 47582 (+0.09%); split: -0.12%, +0.21%
VALU: 2377777 -> 2389977 (+0.51%); split: -0.02%, +0.53%
SALU: 578272 -> 578385 (+0.02%); split: -0.02%, +0.04%
VMEM: 190065 -> 181204 (-4.66%)
SMEM: 99709 -> 99565 (-0.14%)
VOPD: 244 -> 243 (-0.41%); split: +0.41%, -0.82%

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
6dbf44ad9c ac/nir: allow less than one register of overfetch
This is to allow vectorization of 8/16-bit loads, which can later be
cheaply lowered to a 32-bit load.

fossil-db (gfx1201):
Totals from 178 (0.22% of 79377) affected shaders:
MaxWaves: 4138 -> 4102 (-0.87%)
Instrs: 619714 -> 617917 (-0.29%); split: -0.32%, +0.03%
CodeSize: 3364396 -> 3352724 (-0.35%); split: -0.38%, +0.03%
VGPRs: 12896 -> 12980 (+0.65%); split: -0.19%, +0.84%
SpillSGPRs: 546 -> 545 (-0.18%)
Latency: 7589585 -> 7406076 (-2.42%); split: -2.45%, +0.04%
InvThroughput: 1926356 -> 1879866 (-2.41%); split: -2.42%, +0.00%
VClause: 12301 -> 11750 (-4.48%)
SClause: 13614 -> 13583 (-0.23%); split: -0.45%, +0.22%
Copies: 82207 -> 82265 (+0.07%); split: -0.10%, +0.17%
Branches: 19284 -> 19266 (-0.09%)
PreSGPRs: 9525 -> 9457 (-0.71%)
PreVGPRs: 12366 -> 12421 (+0.44%)
VALU: 347928 -> 348020 (+0.03%); split: -0.01%, +0.04%
SALU: 82620 -> 82519 (-0.12%); split: -0.19%, +0.07%
VMEM: 22248 -> 21430 (-3.68%)
SMEM: 17951 -> 17843 (-0.60%)

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
ddef4bddf8 ac/nir: round components when lowering 8/16-bit loads to 32-bit
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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
f538cae743 nir/algebraic: optimize ior(unpack_4x8, unpack_4x8<<8) to unpack_32_2x16
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
10f4264936 nir/search: extend swizzle_y
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
4fa1c92862 aco/gfx12: allow 8/16-bit smem 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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
75efc218f5 aco: support 8/16-bit loads in smem_combine()
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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
8abb787c6b radv/gfx12: use dword3 smem loads for push constants
fossil-db (gfx1201):
Totals from 5 (0.01% of 79377) affected shaders:
(no affected stats)

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
13b0131edc aco/gfx12: select dwordx3 smem loads
fossil-db (gfx1201):
Totals from 47814 (60.24% of 79377) affected shaders:
MaxWaves: 1436871 -> 1436855 (-0.00%); split: +0.00%, -0.00%
Instrs: 36653621 -> 36649461 (-0.01%); split: -0.07%, +0.06%
CodeSize: 194102884 -> 194076060 (-0.01%); split: -0.06%, +0.04%
VGPRs: 2267944 -> 2269648 (+0.08%); split: -0.01%, +0.08%
SpillSGPRs: 8301 -> 8295 (-0.07%); split: -0.08%, +0.01%
Latency: 249627561 -> 249631829 (+0.00%); split: -0.04%, +0.04%
InvThroughput: 40004042 -> 40003575 (-0.00%); split: -0.02%, +0.02%
VClause: 680488 -> 680429 (-0.01%); split: -0.08%, +0.07%
SClause: 1062835 -> 1066206 (+0.32%); split: -0.20%, +0.52%
Copies: 2393981 -> 2393607 (-0.02%); split: -0.23%, +0.22%
Branches: 728117 -> 728113 (-0.00%); split: -0.00%, +0.00%
VALU: 20358269 -> 20358585 (+0.00%); split: -0.01%, +0.01%
SALU: 4737317 -> 4736411 (-0.02%); split: -0.07%, +0.06%
SMEM: 1712349 -> 1710075 (-0.13%); split: -0.13%, +0.00%
VOPD: 5808 -> 5813 (+0.09%); split: +0.12%, -0.03%

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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
90a5c93ea5 aco: prepare for dwordx3 smem 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/34162>
2025-05-08 13:30:50 +00:00
Rhys Perry
208d62430f aco/gfx12: use s_load_dwordx3 to load ray launch sizes
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/34162>
2025-05-08 13:30:49 +00:00
Rhys Perry
cbd718506b aco: add smem opcode helper
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/34162>
2025-05-08 13:30:49 +00:00
Daniel Stone
fa27cacdd7 ci/panfrost: Really document T860 array flakes
It looks like this entire class of test is going to sometimes fail
causing GPU timeouts. As the random class presumably includes array
tests, flake the lot of those as well, rather than trying to figure out
which seed includes which subtests.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34878>
2025-05-08 15:51:57 +03:00
Lionel Landwerlin
fa2627aefb vulkan/runtime: add a multialloc variant for pipeline create
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/34874>
2025-05-08 11:22:55 +00:00
Lionel Landwerlin
565ac1ee6a 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>
2025-05-08 11:22:55 +00:00
Lionel Landwerlin
a29d0cfaf0 vulkan/runtime: track dynamics descriptor in a set layout
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/34874>
2025-05-08 11:22:55 +00:00
Lionel Landwerlin
fead813644 vulkan/runtime: store index of the push descriptor in pipeline layout
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/34874>
2025-05-08 11:22:55 +00:00
Zan Dobersek
b8cc891e6e ir3: allow asm roundtrip testing of compiled shader variants
The `asmroundtrip` IR3_SHADER_DEBUG option enables roundtrip testing of
ir3 asm facilities by generating disassembly for each compiled shader
variant, parsing that disassembly back into ir3 and assembling back into
binary, with the expectation that the initial binary and the post-roundtrip
binary are identical.

This should give some guarantee that any shader that ir3 can produce can
also be constructed through assembly and fed back into ir3.

When enabled, each shader variant has a parallel roundtrip variant created.
At the moment this variant is discarded after validation, but it could
replace the initial variant in the future to also test behavior of such
roundtrip-generated binary and accompanying metadata.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34076>
2025-05-08 09:44:31 +00:00
Zan Dobersek
0acf46b973 ir3: fix parsing of texture prefetch headers
Adjust ir3 parsing rules for texture prefetches to the current state. Those
rules expect the write mask to always be present, so the disassembly
production code is adjusted accordingly.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34076>
2025-05-08 09:44:31 +00:00
Zan Dobersek
c2f4d3d139 ir3: fix display of dot-product instructions
For dp2acc and dp4acc, don't display the derived NOP value by default, but
do display repeat flags for source registers. When the nop encoding
condition is met, the derived NOP value should be shown, mirroring what the
base cat3 instruction specification does.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34076>
2025-05-08 09:44:31 +00:00
Juan A. Suarez Romero
19fe1e5b5b v3d/v3dv/ci: update expected results
Add new timeouts and flakes.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34869>
2025-05-08 08:47:40 +00:00
Job Noorman
b038cb3df1 tu: scalarize IO before linking
This allows nir_link_opt_varyings, nir_remove_unused_varyings and
nir_compact_varyings to find a lot more optimization opportunities.

The implementation has been shamelessly copied, with some minor tweaks,
from radv_link_shaders.

Note that the regression in "Early Preamble" is caused by more texture
operations becoming uniform and being hoisted to the preamble (where
they need GPRs).

Totals from 72221 (43.88% of 164575) affected shaders:
MaxWaves: 924390 -> 929534 (+0.56%); split: +0.62%, -0.06%
Instrs: 29657203 -> 29265425 (-1.32%); split: -1.63%, +0.31%
CodeSize: 61509010 -> 61032290 (-0.78%); split: -1.46%, +0.68%
NOPs: 4810811 -> 4799957 (-0.23%); split: -2.49%, +2.27%
MOVs: 923221 -> 830062 (-10.09%); split: -14.80%, +4.71%
Full: 949533 -> 933312 (-1.71%); split: -1.82%, +0.11%
(ss): 685957 -> 678810 (-1.04%); split: -3.68%, +2.63%
(sy): 326800 -> 324295 (-0.77%); split: -2.56%, +1.79%
(ss)-stall: 2710956 -> 2682550 (-1.05%); split: -4.19%, +3.15%
(sy)-stall: 9480654 -> 9332777 (-1.56%); split: -4.39%, +2.83%
STPs: 5907 -> 5885 (-0.37%)
LDPs: 2622 -> 2596 (-0.99%)
Preamble Instrs: 6728019 -> 6671785 (-0.84%); split: -1.75%, +0.92%
Early Preamble: 52865 -> 52319 (-1.03%); split: +0.26%, -1.30%
Cat0: 5280863 -> 5268118 (-0.24%); split: -2.33%, +2.08%
Cat1: 1385055 -> 1271076 (-8.23%); split: -11.33%, +3.10%
Cat2: 11333273 -> 11194153 (-1.23%); split: -1.25%, +0.02%
Cat3: 8735603 -> 8618710 (-1.34%); split: -1.34%, +0.00%
Cat4: 958143 -> 952511 (-0.59%)
Cat5: 840520 -> 836190 (-0.52%); split: -0.53%, +0.02%
Cat6: 242192 -> 232244 (-4.11%)
Cat7: 881554 -> 892423 (+1.23%); split: -1.25%, +2.48%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34784>
2025-05-08 08:18:24 +00:00
Job Noorman
6a57bfb004 nir/lower_io_to_vector: remove can_read_output assert
Since we're not creating new output reads, just vectorizing existing
ones, this isn't the place to assert whether we can actually read
outputs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Emma Anholt <anholt@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34784>
2025-05-08 08:18:24 +00:00
Lionel Landwerlin
386decce41 panvk/ci: add more flaky tests
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
5c7c1eceb5 anv/brw: handle pipeline libraries with mesh
I always thought there was a massive issue with pipeline libraries &
mesh shaders. Indeed recent CTS tests have exposed a number of issues.

Some values delivered to the fragment shader are coming from different
places depending on whether the preceding shader is Mesh or not. For
example PrimitiveID is delivered in the per-primitive block in Mesh
pipelines whereas for other pipelines it's coming as a VUE slot (which
is per-vertex). Those are 2 different locations in the payload.

We have to find a layout for fragment shaders that is compatible with
everything. Leaving gaps here and there in the thread payload.

Fixes the following test pattern :

  dEQP-VK.mesh_shader.ext.smoke.fast_lib.shared_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
18bbcf9a63 intel: introduce new VUE layout for separate compiled shader with mesh
Mesh shaders have per vertex block in URB pretty much identical to the
VUE format. Let's just reuse that concept to do all of our layout in
the payload attribute registers. This will ensure that we have
consistent VUE layout between Mesh & non-Mesh pipelines.

We need a new way of laying out the VUE though as we have to
accomodate a HW constraint of maximum (per-primitive + per-vertex) of
32 varying. This means we cannot have 2 locations in the payload for
things like PrimitiveID which can come from either the per-primitive
or the per-vertex block. The new layout places the PrimitiveID at the
end of the per-vertex attributes and shrinks the delivery dynamically
if the mesh stage is active. The shader is compiled with a
MOV_INDIRECT to read the PrimitiveID from the right location in the
attributes.

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/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
2d396f6085 intel: prepare VUE layout for more than 2 layouts
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/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
95efdca00b brw: add documentation pointers to FS attribute layout
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/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
9d342081e7 brw/nir: add intrinsics to read attribute payload register indirectly
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/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
ef17fbf8e5 anv/brw: use separate_shader to deduced MUE compaction
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
6230f3029f 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>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
5ff1b31c3f brw: document some brw_wm_prog_data fields
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
2f654ddd03 brw: use VARYING_BIT_* macros more
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
75b2d000fc anv: tidy up (CLIP|SBE)_MESH emission
Moving it to is related functions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
62d2e323ba anv/brw: shrink FS varying payload
We're currently allocating payload spots for 3 fields already
delivered somewhere else in the payload.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
c467444670 brw/nir: use a new intrinsic for fs_msaa_flag
Avoid NIR code doing offset computations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
dd1ef73aae brw: use newer NIR constructs
nir_shader_intrinsics_pass() & NIR_PASS()

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
b64f237dc4 brw: move helper to brw_nir.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
cbbe7ff66e brw: add new helper to print out FS URB setup
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
b8a80c88cb brw: improve VUE printout
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
4f10a1f618 anv: switch to brw helpers to figure out if a fragment is dynamic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
cb461fa287 anv: switch to use the tcs_prog_data for dynamic input vertices
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
7f500cc6e4 brw: store input_vertices on tcs_prog_data
Will allow the driver to know if the vertices count is dynamic.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
a9ee498347 brw: add helpers to check if a fragment shader execution is dynamic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
4717382f84 anv: lower input vertices for TCS unconditionally
Take the opportunity to reuse the backend pass.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
119ef792c5 anv: remove tbimr workaround check
Already handled by having a special range created

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
99580a815f compiler: add VARYING_BIT_PRIMITIVE_INDICES
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
07303c3fbc compiler: add VARYING_BIT_CULL_PRIMITIVE
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109>
2025-05-08 06:48:34 +00:00
Ella Stanforth
b3cc871b7c v3d/compiler: remove requirement for format information for fbfetch
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742>
2025-05-08 06:25:22 +00:00
Ella Stanforth
9a71e6dcc2 v3d/compiler: use mask for 16bit and 32bit return values
There are only ever two possibilities here so lets use a mask.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742>
2025-05-08 06:25:22 +00:00
Ella Stanforth
bb07364c54 v3d/compiler: remove num_samplers_used from shader key
This is only ever used by assertions.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742>
2025-05-08 06:25:22 +00:00
Ella Stanforth
01d0ccd664 v3d/compiler: remove unused texture swizzle
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742>
2025-05-08 06:25:22 +00:00
Ella Stanforth
76e27d2d0d v3d/compiler: remove return_channels from the shader key
This isn't used anywhere.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742>
2025-05-08 06:25:22 +00:00
Ella Stanforth
b39fc710ee v3d/compiler: remove int/uint tracking
We don't need this anymore as we do not support anything older than 4.2.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742>
2025-05-08 06:25:22 +00:00
Jesse.Zhang
d8624e6a79 winsys/amdgpu: Add support for queue priority in Mesa
This patch adds support for queue priority levels in Mesa's AMDGPU winsys layer.
The changes include:

1. Updated ac_drm_create_userqueue() to accept and pass through flags parameter
2. Modified amdgpu_userq_init() to use the flags when creating queues
3. Added flags field to amdgpu_userq struct to store priority settings
4. Updated header definitions to match kernel UAPI changes

This aligns with the kernel changes provided by Alex:
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122782.html
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122780.html
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122786.html

v2: We only need 1 normal priority queue and 1 TMZ normal priority queue.(Marek Olšák)
v3: Simplified to only support normal priority queues
v4: use a local variable instead of being in struct amdgpu_userq.(Marek Olšák)
v5: rebase the latest main branch.

Signed-off-by: Jesse.Zhang <Jesse.zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34568>
2025-05-08 04:29:29 +00:00
Marek Olšák
870d17012a ac: adjust maximum HS workgroup size
This has no effect on triangles because max 64 patches implied max 192
threads, but it improves performance for cases when the number of threads
per patch is > 3.

This improves the score for gfxbench5 "gl_tess_off" (offscreen) by 11%
on Navi48.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:13 +00:00
Marek Olšák
b960137ebf aco: remove unused aco_shader_info::tcs_offchip_layout
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:13 +00:00
Marek Olšák
f6b3c2c97a radeonsi: remove dead gfx12 tess code from a gfx6-11 function
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:13 +00:00
Marek Olšák
dfc3c1135c ac/nir/tess: don't pass nir_intrinsic_instr to hs_output_lds_offset
It will be used without intrinsics.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:13 +00:00
Marek Olšák
4bbe497d9b ac/nir/tess: don't pass nir_intrinsic_instr to VMEM IO calc helpers
These will be used without intrinsics.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:13 +00:00
Marek Olšák
360494f50d ac/nir/tess: remove unused variables
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:12 +00:00
Marek Olšák
f58c0cbb6a nir: split *_accessed_indirectly* bitmasks into *_read/written_indirectly*
for AMD

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:12 +00:00
Marek Olšák
afd8fefb79 nir: add shader_info::tess::tcs_cross_invocation_outputs_written
for AMD

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863>
2025-05-08 02:54:12 +00:00
Emma Anholt
f45356f4ac tu/perfetto: Forward VkDebugUtilsObjectNameInfoEXT to perfetto.
This gets us names on zink/wsi command buffers in perfetto, but may also
be useful some day for getting app names onto framebuffers and non-dynamic
renderpasses.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
e0355b926d tu/perfetto: Move "have we already sent initial state?" into the helper.
I'm going to have to send initial state from another function too, shortly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
131284b943 tu/perfetto: Attach VkCommandBuffer handles to the GPU events.
All of the GPU renderstage events show a command buffer id/name field in
the UI (default 0/NULL), so let's get it filled with something useful.
This will also be used by perfetto's trace processor for associating
object names with cmdbuf executions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
7c130e5dcf intel/ds: Fix formatting of stage index.
draws had been bumped to stage #10, so they ended up appearing nested
between frame (#1) and cmdbuf (#2), instead of nested under them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
4cc66123ec anv/ds: Forward VkDebugUtilsObjectNameInfoEXT to perfetto.
This gets us names on zink/wsi command buffers in perfetto, but may also
be useful some day for getting app names onto framebuffers and non-dynamic
renderpasses.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
b47a6a5418 perfetto: Add helpers for passing VkDebugUtilsObjectNameInfoEXT to perfetto.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
55d788f434 anv/ds: Associate the VkCommandBuffer some anv-only renderstage events.
This means the perfetto UI will have a non-zero/NULL handle/name in the UI
on these renderstages.  Unfortunately, intel/ds is outside of vulkan so
unless we pull in anv headers, we can't just pass in the anv_cmd_buffer.
This also means it would be much more painful to pass the cmd buffer to
the rest of the events, so they'll still have unset command buffers.
Still, being able to see the name of the command buffer in at least one of
the events should be useful once that's glued together.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
f873b15a48 perfetto: Allow tracepoint args to map to native perfetto fields.
Previously, our args all had to be an extra_data name/value pair.  But
some fields we want to set (such as Vulkan object names) will be a
set_fieldname() call directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
546a100f26 intel/ds: Move "have we already sent initial state?" into the helper.
I'm going to have to send initial state from another function too, shortly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
ccfc3b5c12 perfetto: Move the debug_markers to the incremental state.
You need to re-emit name interning when incremental state is lost, so this
is the right home for the HT of "have we interned this name?".  The
emitter function is still on the datasource because it needs the
templating to get the tracecontext type, but now getting the locked
datasource is not really necessary other than being way more ergonomic
than repeating the template parameters.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
dd81420ef1 perfetto: Create a common MesaRenderpassIncrementalState.
... and explain what its role is.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
82656de029 zink: Add debug names to our command buffers.
This will be nice when debugging multiple sources of command buffers on a
system to see who's responsible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Emma Anholt
188bd800c2 wsi: Label the WSI blit command buffer with a name.
Given that the command buffer will be long-lived, no reason not to just do
this so that debugging tools can see what the cmdbuf is doing.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350>
2025-05-08 01:21:25 +00:00
Timothy Arceri
600892802d 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>
2025-05-08 00:31:29 +00:00
Alyssa Rosenzweig
92f553bcff vtn: remove spurious texel buffer warning
The spec text here is:

   Image Type must be an OpTypeImage. It is the type of the image in the
   combined sampler and image type. It must not have a Dim of SubpassData.
   Additionally, starting with version 1.6, it must not have a Dim of Buffer.

For older SPIR-V versions, there is no analogous requirement. It is implicitly
valid to use a Dim of Buffer (even though it doesn't make much sense). Should
apps do it anyway? Probably not, but it doesn't matter and they do.
glslang considers this requirement relevant only for 1.6+:

   if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6 &&
       texType.getSampler().isBuffer()) {
       // SamplerBuffer is not supported in spirv1.6 so
       // `samplerBuffer(textureBuffer, sampler)` is a no-op
       // and textureBuffer is the result going forward
       constructed = arguments[0];
   } else
       constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments);

That means SPIR-V with an older declared version will warn even with a glslang
new enough to know about the 1.6 requirement. That includes a *lot* of SPIR-V's
built with the CTS.

I see no compelling reason to keep the warning for older than 1.6. Removing the
spurious warning silences a *huge* amount of noise from dEQP-VK (plus a bit from
KHR-GL46). In exchange I see very little tradeoff, it's not really our job to
lint for best practices not in the spec.

I see two viable options:

1. Try to convince the whole ecosystem outside of Mesa to pivot to our pedantic
   reading of the spec and get them to update all the old SPIR-V binaries in the
   wild, in the case of CTS being changed at the glslang level and then
   trickling down into CTS.
2. Merge this patch, simplifying Mesa and immediately forget about this forever.

I'm spending all my FOSS political capital on kernel upstreaming so I have a
strong preference for #2, aka hitting Marge on this MR and then moving on with
all of our lives.

("Ignore the problem and make deqp-runner annoying to use" is the secret 3rd
option I'd rather not do.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34847>
2025-05-07 22:26:02 +00:00
Martin Roukala (né Peres)
809cb17ce6 panfrost/ci: document new t860 flakes
They have been preventing merges, so documenting them in the hope that
the next attemot will be more successful.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Eric Engestrom
d7743ac71f ci/ci-tron: uprev b2c to 0.9.15.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Eric Engestrom
2db1f908f9 radv/ci: rename .test-radv to .ci-tron-test-radv
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Martin Roukala (né Peres)
26e35d538a ci: rename all the .b2c- jobs into .ci-tron-
We named these jobs like this despite b2c being an implementation
detail because we did not have a name for this bare-metal infra.

Now that we do (CI-Tron), let's rename the jobs to remove the
confusion.

Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Eric Engestrom
240ac9f2b9 radv/ci: set swap size for all amd jobs to 16g
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Eric Engestrom
7e32fdceba radv/ci: increase swap size on kabini to 16g
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Eric Engestrom
909d41ef89 ci/build: stop uploading python-artifacts to gitlab artifacts
Everyone uses the S3 bucket for artifacts now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:16 +00:00
Eric Engestrom
a8e282b0c0 ci/ci-tron: print all the variables
This makes it easier to debug inheritance issues like the one fixed
earlier in this series, and makes it easier to reproduce a job without
needing more than looking at the job log.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
f4d2b2a060 ci/ci-tron: add check that the required variables are set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Martin Roukala (né Peres)
37ace710fa ci/ci-tron: switch to the upstream ci-tron template
Up until now, every project using CI-Tron had to write their own job
submission flow because CI-Tron itself was not providing any official
way of interacting with it via GitLab.

This however changed, and the solution is vastly superior to what we
have been using in Mesa:

 * Ability to pass all the environment variables of the job to the DUT,
   so no need to remember to add variables in
   `export-gitlab-job-env-for-dut.sh` anymore

 * No dependency on Mesa code, which means no need to wait on
   python-artifacts and the ability to replicate a run by just copying
   the job description outputted by the job \o/

 * Ability to have as many initrd, HTTP, and TFTP artifacts as wanted

 * Ability to expose a variable through a TFTP/HTTP endpoint or as an
   initrd

 * Ability to overwrite the platform environment (machine-specific FW)

 * Ability to have as many kernel cmdline variables, all merged when
   generating the final cmdline. This makes it easy to share some
   snippets of cmdline between jobs

Transitioning from the custom to the generic template is however pretty
involved. This commit does the minimum changes needed to switch to the
new model, often simply replacing the B2C_ prefix with CI_TRON_.

Further renaming of "b2c" prefixes into "ci-tron" is left for future
commits.

Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
a062f0dd3d zink+turnip/ci: fix inheritance/override order
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
432b7d3276 radv/ci: fix inheritance/override order
Fixes a bug that becomes visible in an upcoming commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Martin Roukala (né Peres)
62291b6e14 radv/ci: drop redundant renoir timeouts
No idea why we ended up having timeouts set in gitlab-ci-inc.yml, but
this isn't right as they are only applicable to jobs.

The actual `radv-renoir-vkcts` job already overrides these, so it's just
dead code; let's reap it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Martin Roukala (né Peres)
a27f739de3 radv/ci: move the vangogh timeouts to the jobs
No idea why we ended up having timeouts set in gitlab-ci-inc.yml, but
this isn't right as they are only applicable to jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
91881ba390 radv/ci: inline .vkcts-test-valve
It was badly named, is not very useful, and the comment above was not
really correct and not useful here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
151062a169 amd/ci: simplify radeonsi-vangogh-glcts jobs definition
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
c78a7d464b ci/ci-tron: deduplicate setting the runner tags for most jobs
etnaviv is the important exception, as it needs to set two fields for
the setup tags, which need to be handled individually as runner tags.

The other exception is the nightly vangogh job that has a custom tag
added, which I'll hopefully get rid of Soon™.

One farm's jobs were also missing farm:$RUNNER_FARM_LOCATION; this
change ensures that it's always set, avoiding the risk of accidentally
picking an equivalent device in another farm.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
c67ecb6393 etnaviv/ci: introduce common .austriancoder-ci-tron
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
7208344abe etnaviv/ci: split model and revision tags
This was working by accident because (we believe) GitLab internally
serializes/deserializes the tags list as a comma-separated list, but
this is not documented and therefore liable to break with any update, so
let's explicitly set two separate tags instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
a40c862ca6 ci/vkd3d: stop supressing vulkaninfo errors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Eric Engestrom
f95adc2c34 ci/b2c: drop dead /runner-before-script.sh code
This has never been used (instead, `pre_build_script` was used), let's drop it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
2025-05-07 21:02:15 +00:00
Sagar Ghuge
bb61a78911 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>
2025-05-07 19:29:50 +00:00
Eric Engestrom
6d8324e819 docs: add calendar for 25.1.x releases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34862>
2025-05-07 19:22:14 +02:00
Eric Engestrom
98a26478f7 docs: add sha sum for 25.1.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34862>
2025-05-07 19:15:23 +02:00
Eric Engestrom
60f180ddd5 docs: add release notes for 25.1.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34862>
2025-05-07 19:15:23 +02:00
Eric Engestrom
819cf4b82d docs: update calendar for 25.1.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34862>
2025-05-07 19:14:51 +02:00
Ganesh Belgur Ramachandra
b1a34ac95d radeonsi: change do_update_shaders boolean to a bitmask
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29326>
2025-05-07 15:43:14 +00:00
Mary Guillemard
aecc3fbe50 panfrost: Ensure printf buffer size is lowered
We were not using the nir_lower_printf_buffer pass, this fix issues with
printf usages with OpenCL C internal shaders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/34814>
2025-05-07 15:10:50 +00:00
Rob Clark
25752d9ac1 freedreno/virtio: Use util_get_command_line() helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34846>
2025-05-07 13:22:48 +00:00
Rob Clark
1cfe89e3d4 tu/virtio: Use util_get_command_line() helper
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34846>
2025-05-07 13:22:48 +00:00
Rob Clark
0c45889fa8 tu: Add TU_DEBUG=comm
The debug flag overrides the process's comm/cmdline values with the
process's comm/cmdline.  This can be useful for debugging faults that
happen after the process exits (when normally the comm/cmdline would no
longer be available to capture in a GPU devcoredump).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34846>
2025-05-07 13:22:48 +00:00
Collabora's Gfx CI Team
e8a9b4571e Uprev ANGLE to 3540a326ec8497700523eb2d3eca90ae21806e8e
f355e2b37e...3540a326ec

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
9749a1a4e4 ci: Refactor structured tagging component definitions
Introduce per-component CI_BUILD_COMPONENTS_* variables to allow
more flexible composition of CI_BUILD_COMPONENTS, and add these to
every container job by listing them in .container.

Also rework the -arm64 and -x86_64 definitions, which were still
based on the old kernel+rootfs layout. Split them into -gl and -vk,
but keep -arm32, which builds fewer components.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
54309f4e7a ci: Replace HWCI_KVM with HWCI_ENABLE_X86_KVM
Replace HWCI_KVM="true" with HWCI_ENABLE_X86_KVM=1 for consistency with
other integer-based toggles (e.g. HWCI_START_WESTON,
PARALLELISE_VIA_LP_THREADS).

The new name also makes the variable’s purpose clearer by explicitly
referencing X86.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
d527da301f ci: Don't include the kernel in test-base image
Including the kernel image in test-base requires rebuilding every
x86_64 container image on each kernel uprev, even though only the
crosvm jobs use this kernel.

Move the download to runtime and update the  distribution tags to avoid
triggering container rebuilds on kernel changes.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
c276e0b29a ci/crosvm: Use structured tagging for crosvm
Structured tagging captures a checksum of the component we think we're
building, and verifies this through the chain.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
f2c68b2ea9 ci/crosvm: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
d847d553ca ci/crosvm: Fix image tags in build-crosvm.sh header
Bumping DEBIAN_BASE_TAG already triggers a rebuild of the test-gl and
test-vk containers, so their tags don’t need to be updated manually.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Valentine Burley
c3313257ca zink/ci: Properly source setup-test-env.sh in zink-venus-lvp
The zink-venus-lvp job wasn’t sourcing setup-test-env.sh like the other
Xvfb jobs, which will be necessary for an upcoming change.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34813>
2025-05-07 12:13:24 +00:00
Eric Engestrom
cfbc20c755 lavapipe/ci: add recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34857>
2025-05-07 10:20:20 +00:00
Eric Engestrom
98a1eddaeb r300/ci: add recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34857>
2025-05-07 10:20:20 +00:00
Eric Engestrom
dd69e34afc etnaviv/ci: add recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34857>
2025-05-07 10:20:20 +00:00
Eric Engestrom
4fb425c197 radv/ci: add recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34857>
2025-05-07 10:20:20 +00:00
Eric Engestrom
f96f416b80 turnip/ci: document a750 fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34857>
2025-05-07 10:20:20 +00:00
Valentine Burley
d1b42e6f3a freedreno/ci: Disable a630 jobs
The cheza runners are offline.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835>
2025-05-07 08:20:19 +00:00
Kai Wasserbäch
531c6696d4 fix(FTBFS): clc: switch to new non-owned TargetOptions for LLVM 21
Upstream hid the `TargetOptions` in commit 985410f87f2d19910a8d327527fd30062b042b63

Use the new `getTargetOpts()` to obtain the `TargetOptions` for
`setTarget()`.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13079
Reference: 985410f87f
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835>
2025-05-07 08:20:19 +00:00
Olivia Lee
04bbe45b76 panfrost: upload blend shaders to bin pool
Instead of reuploading them to a fresh BO every time the blend state
changes. This allows us to drop the separate blend shader cache for the
fb preload shaders.

This improves gfxbench gl_driver FPS on G610 from 42.39 to 61.94,
which is now slightly faster than the DDK (57.76).

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34666>
2025-05-07 07:55:44 +00:00
Olivia Lee
7fe842663e pan/bi: push blend constants to FAU
This improves blend shader performance slightly over loading the
constants from the sysval UBO. On bifrost, we have 128 FAU words, so
reserving 4 words for blend constants is not a significant cost. On
midgard, register mapped uniforms share space with working registers.
With high working register pressure, we only allocate 32 uniform
registers, and so would lose 1/8 of available space to blend constants
if we implemented the same optimization.

This improves gfxbench gl_driver FPS on G610 from 40.48 to 42.39. I did
not measure any regressions on benchmarks I tested that did not use
blend shaders.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34666>
2025-05-07 07:55:44 +00:00
Olivia Lee
781d3162e4 panfrost: pass blend constants to blend shaders dynamically
This is similar to the approach in panvk, where we pass blend constants
to the blend shader in fixed FAU slots instead of specializing the
shader on blend constants. TODO: explain midgard stuff

This eliminates the blend shader variant cache, which performed very
badly when the working set of blend constants in an application was >32
(the maximum number of variants stored). Just increasing the cache size
like we did in f1f39fa645 ("panfrost: Increase the limit for blend
shader variants") would help for applications with a larger static set,
but we would still have cache thrashing on applications which change the
blend constants dynamically.

For gfxbench gl_driver, which uses 386 blend constant values, this
improves FPS on a G610 from 6.06 to 40.48. Most applications are
unaffected, because they don't use enough constant values to cause
thrashing.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34666>
2025-05-07 07:55:44 +00:00
Olivia Lee
def9af0255 panfrost: map sysval UBO to a fixed index
We want the sysval UBO at a fixed index in order to pass dynamic blend
constants to blend shaders, which share UBOs with the fragment shader.
This requires shifting the existing UBOs to make space for a new UBO at
a low index. This remapping happens late, once we know whether sysvals
are actually used by a variant, so applications still use the original
indices.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34666>
2025-05-07 07:55:44 +00:00
Olivia Lee
b6d0fdf556 panfrost: move some blend shader infrastructure into gallium driver
The blend shader cache from pan_blend.h is not used in panvk, which has
it's own blend shader cache and compilation entrypoint. Moving this
allows us to use gallium-specific things in the cache.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34666>
2025-05-07 07:55:44 +00:00
Konstantin Seurer
84b9c281fe 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>
2025-05-07 08:26:33 +02:00
Faith Ekstrand
5d72ebf3e7 nvk: Stop printing errors for invalid dma-buf image queries
This warning message has been annoying people for a long time.  Let's
just get rid of it.  I don't think it's really helping anyone with
anything and it's just burning logging space.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34853>
2025-05-07 00:33:43 +00:00
Olivia Lee
63557a03df mailmap: update my name and email
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34852>
2025-05-07 00:26:45 +00:00
Faith Ekstrand
e3e7dad82d nak: Stop relying on nir_lower_pack
We represent vectors as packed anyway so all these ops are just data
motion that we already know how to do.  Calling into NIR for these
doesn't really help.  It also avoids potential optimization loops in NIR
where pack op lowering conflicts with itself.  It's simpler just to
handle it all in the back-end and trust our prmt optimization and copy
propagation to clean it all up.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34849>
2025-05-07 00:08:05 +00:00
Faith Ekstrand
efd1cddbe9 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>
2025-05-07 00:08:05 +00:00
Eric Engestrom
140cd7c4f4 v3dv/ci: document flakes seen over the last 7 days
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34848>
2025-05-06 21:53:15 +00:00
Eric Engestrom
6a18569aa5 v3d/ci: document flakes seen over the last 7 days
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34848>
2025-05-06 21:53:15 +00:00
Eric Engestrom
bf643bbcf6 vc4/ci: document flakes seen over the last 7 days
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34848>
2025-05-06 21:53:15 +00:00
Eric Engestrom
df3618edc2 v3dv/ci: fix malformatted flakes line
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34848>
2025-05-06 21:53:15 +00:00
Dmitry Osipenko
daad392d5c 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>
2025-05-06 21:36:16 +00:00
Rhys Perry
9ca71b52aa 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>
2025-05-06 21:04:28 +00:00
Sasha Finkelstein
2f4f9f0b98 hk: Implement VK_EXT_map_memory_placed
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13008
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34789>
2025-05-06 18:41:08 +00:00
Alyssa Rosenzweig
0acb34b065 hk: use nir_lower_default_point_size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34762>
2025-05-06 17:07:00 +00:00
Alyssa Rosenzweig
a49403f4ac agx/nir_lower_tess: use nir_lower_default_point_size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34762>
2025-05-06 17:07:00 +00:00
Alyssa Rosenzweig
d53a3a081b agx/nir_lower_gs: use nir_lower_default_point_size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34762>
2025-05-06 17:07:00 +00:00
Alyssa Rosenzweig
5788770d91 nir: add nir_lower_default_point_size pass
this is useful across drivers for maint5 semantics on mobile hw.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34762>
2025-05-06 17:07:00 +00:00
Mel Henning
9ce14a5787 nak: Remove #![allow(unstable_name_collisions)]
Removing this doesn't trigger any warnings, so I assume it's been fixed
in the meantime.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34591>
2025-05-06 16:48:34 +00:00
Mel Henning
7edb086685 nak: Call nir_opt_phi_to_bool
This opt seems to be somewhat sensitive to pass order - it really wants
to run somewhere between nir_opt_loop and nir_opt_remove_phis. (radv,
the only other backend that calls this pass, also matches that
ordering).

shader-db stats:

Totals:
CodeSize: 29166032 -> 29034608 (-0.45%); split: -0.46%, +0.01%
Number of GPRs: 156968 -> 156969 (+0.00%)
SLM Size: 147360 -> 147316 (-0.03%)
Static cycle count: 9126931 -> 9158663 (+0.35%); split: -0.07%, +0.42%
Spills to memory: 173573 -> 170288 (-1.89%)
Fills from memory: 173573 -> 170288 (-1.89%)
Spills to reg: 17838 -> 17111 (-4.08%); split: -4.09%, +0.01%
Fills from reg: 13089 -> 13090 (+0.01%)

Totals from 45 (0.69% of 6568) affected shaders:
CodeSize: 8993312 -> 8861888 (-1.46%); split: -1.49%, +0.03%
Number of GPRs: 4978 -> 4979 (+0.02%)
SLM Size: 93596 -> 93552 (-0.05%)
Static cycle count: 4703524 -> 4735256 (+0.67%); split: -0.14%, +0.81%
Spills to memory: 107785 -> 104500 (-3.05%)
Fills from memory: 107785 -> 104500 (-3.05%)
Spills to reg: 5667 -> 4940 (-12.83%); split: -12.86%, +0.04%
Fills from reg: 4131 -> 4132 (+0.02%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34591>
2025-05-06 16:48:34 +00:00
Zan Dobersek
c0dfdc907b tu: allow bigger block sizes when copying between buffers
When copying between buffers, find the biggest possible block size usable
for all copy regions. A common block size is used since using different
block sizes can require additional flushing between different blocks.

Besides the single-byte and 4-byte block sizes, also allow for 16-byte
block size and the appropriate corresponding format. Using bigger block
size when possible helps potentially reduce the number of required
CP_BLIT operations. Tested on the Crucible benchmarks, especially for
larger copy regions this can improve throughput up to 3x.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34587>
2025-05-06 16:29:48 +00:00
Juan A. Suarez Romero
ae51c59663 broadcom/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34837>
2025-05-06 15:02:56 +00:00
Lionel Landwerlin
c434050a00 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>
2025-05-06 13:34:53 +00:00
Lionel Landwerlin
37608c075f anv: promote VK_EXT_robustness2 to VK_KHR_robustness2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34821>
2025-05-06 13:16:13 +00:00
Danylo Piliaiev
f03be478a9 tu/lrz: Add tu_ignore_frag_depth_direction driconf
Will be useful if app doesn't specify depth direction correctly.
E.g. the capture of "Sons of The Forest" I have has a shader
where `gl_FragDepth` has `layout(depth_less)`, but the output for different
fragments is actually sometimes less, sometimes more than the original depth
by a tiny margin.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34423>
2025-05-06 11:21:17 +00:00
Danylo Piliaiev
847ad80e03 tu/lrz: Consider FS depth layout when gl_FragDepth is written
Specifying depth write direction in shader may help us. E.g.
If depth test is GREATER and FS specifies FRAG_DEPTH_LAYOUT_LESS
it means that LRZ won't kill any fragment that shouldn't be killed,
in other words, FS can only reduce the depth value which could
make fragment to NOT pass with GREATER depth test. We just have to
enable late Z test.

There is the same concept in D3D11 and it is seen e.g. in "Stray" game.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34423>
2025-05-06 11:21:17 +00:00
Karmjit Mahil
d05b92d720 tu: Add "check_cmd_buffer_status" debug option
Add a debug option which checks the status of a command buffer, if
it has completed execution on the GPU, before it's reset or
destroyed.

This works by getting the GPU to write to a specific memory address
on vkBeginCommandBuffer and vkEndCommandBuffer, so the CPU can check
that the GPU has written the TU_CMD_BUFFER_STATUS_IDLE to the slot
before actually resetting or freeing the command buffer.

This can to help in debugging sync issues within the driver.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34383>
2025-05-06 08:47:18 +00:00
Hyunjun Ko
86d21fd2cf anv: Set tc/beta offset according to the flag from PPS.
Consider the flag from PPS when setting tc/beta offset.

This fixes some artifacts when decoding a hevc video,
hevc_scaling_list4.mkv from Lynne.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34782>
2025-05-06 04:24:22 +00:00
Hyunjun Ko
7998106355 vulkan/video: Fix wrong parsing for H265 decoding
Not found real issues yet related to this though,
this is apparently wrong.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34782>
2025-05-06 04:24:22 +00:00
Faith Ekstrand
20543981b5 nak: Print the % for SSA predicates
I don't remember why we special-cased predicates.  There isn't a
particularly good reason.  This lets us drop the weird fmt_plain()
and just use fmt() for everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Faith Ekstrand
56bdf9043b nak: Move SSAValue and friends to a new ssa_value.rs file
This is getting complicated and depends on some inter-linked details for
safety such as values being in-range. It's safer if the rest of the IR
is forced to use public interfaces.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
9d1c38ddf1 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>
2025-05-05 23:08:02 +00:00
Mel Henning
6e72f0f81b 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>
2025-05-05 23:08:02 +00:00
Mel Henning
d91ba8f36d nak: Mark Large SSARef paths as cold
This hints to the optimizer that these paths are less commonly executed.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
2f44970b68 nak: Support large SSARef
This lets us store up to 16 SSAValues in an SSARef, while keeping the
common case of 4-or-fewer SSAValues allocation-free.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
dee3a0aa58 nak: CBuf and SSARef are no longer Copy
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
68069fb810 nak: SrcRef is no longer Copy
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
a9d2789237 nak: Src is no longer Copy
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Faith Ekstrand
30f6ca6391 nak: Replace Src::new_zero() with a ZERO constant
Constants have different rules with respect to the Copy trait and using
a constant will allow us to initialize arrays even once Copy is gone.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
f21557154b nak/from_nir: Turn srcs into a closure
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
854b2d5882 nak: Dst is no longer Copy
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
0ac3296f28 nak/from_nir: Make fault an Option<SSAValue>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
ddcf0029cd nak: Use references to src/dst more places
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
ffe438c77d nak: Return SSAValue from builder where possible
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
b9e9a811b8 nak: Split scalar/vec in SSABuilder::alloc_ssa
SSABuilder::alloc_ssa() is now only for scalars. We intoduce
SSABuilder::alloc_ssa_vec() which handles the vector case the way
alloc_ssa previously did. This matches the split used in SSAValueAllocator

We're about to drop Copy from SSARef, which makes it a lot more annoying
to deal with. SSAValue will remain Copy though, so we want to start
using it instead of SSARef where possible.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
1ff9848d25 nak: Use NonZeroU32 for SSAValue and remove NONE
Code that might have an invalid SSAValue is encouraged to use
Option<SSAValue> instead of NONE, which is now the same size as a u32
and provides more type safety.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Mel Henning
121b2b889b nak: Add an SSARef::from_iter() helper
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
2025-05-05 23:08:02 +00:00
Yiwei Zhang
4f07092bdb venus: fix to passively enable wsi required extensions
Required extensions to support wsi have been relaxed earlier for sw blit
path. So the renderer extensions enablement is fixed to be passive based
on the renderer side correspondingly.

Test: emulate to drop dma-buf and modifier support from host anv driver,
and confirm wsi via venus works with sw blit fallback and device
creation no longer returns VK_ERROR_FEATURE_NOT_PRESENT.

Fixes: 06f5d1a105 ("venus: expose WSI on renderer without dma-buf support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34827>
2025-05-05 21:43:33 +00:00
Collabora's Gfx CI Team
149bad63ea Uprev Piglit to 1498c397ea35119692b579dd6f523de4651c663f
c50d9aa54f...1498c397ea

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34688>
2025-05-05 20:34:12 +00:00
Faith Ekstrand
2f8b27713d nak: Fold Src::fold_imm() into the legalization pass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
Faith Ekstrand
c3417c3c82 nak: Use as_u32() directly in Src::is_fneg_zero()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
Faith Ekstrand
274be4291e nak: Handle SrcType::F64 in Src::is_fneg_zero()
We handled it fine if src_ref was SrcRef::Zero but not if src_ref was
SrcRef::Imm32(0x80000000), which is also negative zero.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
Faith Ekstrand
8a4ffe3c7e nak: Fold source modifiers in Src::as_u32()
For now we leave a fold_imm() helper with the old semantics because
there are still two uses of it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
Faith Ekstrand
4648a15476 nak: Take a SrcType in Src::as_u32()
Without a type, we can't really interpret the data.  Currently, it just
returns None in the presence of modifiers so it's okay.  Also, all of
the callers of this helper today do so on the source of an OpPrmt which
doesn't support source modifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
Faith Ekstrand
4b5eec6c2a nak/sm20: Use SrcRef::as_u32()
This makes more sense as we don't want any complex logic around source
modifiers or any of that.  We just want to handle Zero and Imm32 in the
same case.  Also, explicitly assert that modifiers are None, which is
more clear anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
Faith Ekstrand
cb156a468e nak: Match on the SrcRef directly in Src::is_nonzero()
Calling as_u32() isn't really doing us any good here since we want to
fail for SrcRef::Zero anyway.  Also assert that src_mod == None since we
don't handle FNeg in this path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>
2025-05-05 17:51:25 +00:00
José Roberto de Souza
a82b569649 anv: Reduce memory pool usage in MTL and ARL
Those platforms requires aux map with 1MB alignment, for slab that
means that any buffer needs to have size of multiple of 1MB what
causes a lot of memory to be wasted causing it to run out of memory
when running multiple GPU applications.

Fixes: ea18572ff2 ("anv: Add support for ANV_BO_ALLOC_AUX_CCS in anv_slab_bo")
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/34817>
2025-05-05 16:42:14 +00:00
Karol Herbst
7c78c76181 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>
2025-05-05 16:04:17 +00:00
Karol Herbst
fee9230bb5 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>
2025-05-05 16:04:17 +00:00
Karol Herbst
57ccfd0502 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>
2025-05-05 16:04:17 +00:00
Mary Guillemard
8447f7aaae 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>
2025-05-05 15:31:38 +00:00
Samuel Pitoiset
1aa5fd5da2 radv: promote VK_EXT_robustness2 to VK_KHR_robustness2
This is a 1:1 promotion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34810>
2025-05-05 15:02:19 +00:00
Samuel Pitoiset
4e09a5c992 vulkan: Update XML and headers to 1.4.314
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34810>
2025-05-05 15:02:19 +00:00
Samuel Pitoiset
02d7c8f9d3 spirv: Update the JSON and headers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34810>
2025-05-05 15:02:19 +00:00
Eric Engestrom
7e0f157b8a ci: pass vk_require_etc2 from radv jobs through to the duts
history:
- 8d83ffe531 ("radv/ci: Add coverage for ETC2 emulation.")
  var added to the jobs as `radv_require_etc2`, but not passed to duts
- 567c32b55c ("radv, drirc: rename radv_require_{etc2,astc}")
  var renamed to `vk_require_etc2`, except in the jobs
- 5f177018f7 ("radv/ci: re-enable ET2C emulation testing on non-native GPUs")
  var renamed in the jobs, but still not passed to duts

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34796>
2025-05-05 15:53:45 +02:00
Samuel Pitoiset
0684dc5fa8 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>
2025-05-05 13:50:25 +00:00
Valentine Burley
b8c47c5535 turnip/ci: Update expectations
This test was fixed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34792>
2025-05-05 13:28:41 +00:00
Valentine Burley
8b835a4abb freedreno/ci: Document regressions
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34792>
2025-05-05 13:28:41 +00:00
Valentine Burley
0f5ab7af3d anv/ci: Update expectations
These Vulkan Video tests were fixed in f7ff9b240d ("anv: Do not support the tiling of DRM modifier if DECODE_DST")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34792>
2025-05-05 13:28:40 +00:00
Valentine Burley
9ac2b73cf4 iris/ci: Update trace checksums
These traces have been failing for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34792>
2025-05-05 13:28:40 +00:00
Eric Engestrom
31c2fae476 llvmpipe/ci: document regression in a02b6e6b...676e26ae
Reported at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33415#note_2896031

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
51c5b7e3f9 etnaviv/ci: document two fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
7b14b1d350 lavapipe/ci: document flakes (including a flaky timeout) seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
5cf33e6704 zink+nvk/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
5b958bd18f zink+radv/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
32fe00280a turnip/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
c145f7f2dc radeonsi/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Eric Engestrom
a601d68898 radv/ci: document flakes seen recently
The dEQP-VK.ray_tracing_pipeline.* ones might need a bigger net to catch
them all, but I didn't want to prematurely ignore too many tests, so for
now I'm just dumping a big list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34811>
2025-05-05 12:23:02 +00:00
Rhys Perry
75880655f8 nir/lower_gs_intrinsics: silence warning
../../../../../../../mesa/src/compiler/nir/nir_lower_gs_intrinsics.c: In function ‘nir_lower_gs_intrinsics’:
../../../../../../../mesa/src/compiler/nir/nir_lower_gs_intrinsics.c:523:93: warning: ‘state’ may be used uninitialized [-Wmaybe-uninitialized]
  523 |             state.decomposed_primitive_count_vars[i] = state.decomposed_primitive_count_vars[0];
      |                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../../mesa/src/compiler/nir/nir_lower_gs_intrinsics.c:464:17: note: ‘state’ declared here
  464 |    struct state state;
      |                 ^~~~~

It's always initialized by the first iteration of the loop, but GCC
doesn't seem to know that.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34785>
2025-05-05 11:45:42 +00:00
Rhys Perry
bc49045294 nir/opt_shrink_vectors: add assume to silence warning
../../../../../../../mesa/src/compiler/nir/nir_opt_shrink_vectors.c: In function ‘shrink_dest_to_read_mask’:
../../../../../../../mesa/src/compiler/nir/nir_opt_shrink_vectors.c:140:36: warning: writing 16 bytes into a region of size 15 [-Wstringop-overflow=]
  140 |             swizzle[first_bit + i] = i;
      |             ~~~~~~~~~~~~~~~~~~~~~~~^~~
../../../../../../../mesa/src/compiler/nir/nir_opt_shrink_vectors.c:138:18: note: at offset [1, 15] into destination object ‘swizzle’ of size 16
  138 |          uint8_t swizzle[NIR_MAX_VEC_COMPONENTS] = { 0 };
      |                  ^~~~~~~

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34785>
2025-05-05 11:45:42 +00:00
Rhys Perry
5629332dcf util: silence -Wstringop-overread in SHA1
In function ‘SHA1Update’,
    inlined from ‘SHA1Pad’ at ../../../../../../../mesa/src/util/sha1/sha1.c:157:2,
    inlined from ‘SHA1Final’ at ../../../../../../../mesa/src/util/sha1/sha1.c:168:2:
../../../../../../../mesa/src/util/sha1/sha1.c:135:25: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 1 [-Wstringop-overread]
  135 |                         SHA1Transform(context->state, (uint8_t *)&data[i]);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../mesa/src/util/sha1/sha1.c:135:25: note: referencing argument 2 of type ‘const uint8_t[64]’ {aka ‘const unsigned char[64]’}
../../../../../../../mesa/src/util/sha1/sha1.c: In function ‘SHA1Final’:
../../../../../../../mesa/src/util/sha1/sha1.c:55:1: note: in a call to function ‘SHA1Transform’
   55 | SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH])
      | ^~~~~~~~~~~~~
In function ‘SHA1Update’,
    inlined from ‘SHA1Pad’ at ../../../../../../../mesa/src/util/sha1/sha1.c:159:3,
    inlined from ‘SHA1Final’ at ../../../../../../../mesa/src/util/sha1/sha1.c:168:2:
../../../../../../../mesa/src/util/sha1/sha1.c:135:25: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 1 [-Wstringop-overread]
  135 |                         SHA1Transform(context->state, (uint8_t *)&data[i]);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../mesa/src/util/sha1/sha1.c:135:25: note: referencing argument 2 of type ‘const uint8_t[64]’ {aka ‘const unsigned char[64]’}
../../../../../../../mesa/src/util/sha1/sha1.c: In function ‘SHA1Final’:
../../../../../../../mesa/src/util/sha1/sha1.c:55:1: note: in a call to function ‘SHA1Transform’
   55 | SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH])
      | ^~~~~~~~~~~~~
In function ‘SHA1Update’,
    inlined from ‘SHA1Pad’ at ../../../../../../../mesa/src/util/sha1/sha1.c:160:2,
    inlined from ‘SHA1Final’ at ../../../../../../../mesa/src/util/sha1/sha1.c:168:2:
../../../../../../../mesa/src/util/sha1/sha1.c:135:25: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 8 [-Wstringop-overread]
  135 |                         SHA1Transform(context->state, (uint8_t *)&data[i]);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../mesa/src/util/sha1/sha1.c:135:25: note: referencing argument 2 of type ‘const uint8_t[64]’ {aka ‘const unsigned char[64]’}
../../../../../../../mesa/src/util/sha1/sha1.c: In function ‘SHA1Final’:
../../../../../../../mesa/src/util/sha1/sha1.c:55:1: note: in a call to function ‘SHA1Transform’
   55 | SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH])
      | ^~~~~~~~~~~~~

Reaching this code is impossible for the SHA1Update() calls in SHA1Pad().
Use assume() to inform the compiler of this.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34785>
2025-05-05 11:45:41 +00:00
Danylo Piliaiev
2797f42451 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>
2025-05-05 11:09:31 +00:00
Danylo Piliaiev
969820e7fe tu/lrz: Disable LRZ if RP writes depth but doesn't set on GPU dir
If the render pass writes depth (with direction) but doesn't set
direction on the GPU, the LRZ buffer cannot be used in subsequent
render passes because the direction information is lost.

Fixes rendering in "Elite Dangerous" game.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34577>
2025-05-05 09:32:53 +00:00
Danylo Piliaiev
f903397874 tu/lrz: Call tu_lrz_write_disable_reason once per RP
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34577>
2025-05-05 09:32:53 +00:00
Danylo Piliaiev
6d84dac827 tu/lrz: Fix NOLRZ dbg option
Didn't fully disable LRZ.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34577>
2025-05-05 09:32:53 +00:00
Danylo Piliaiev
9d20241a03 tu/lrz: Fix DONT_CARE not resulting in disabled LRZ
- LOAD results in reusing LRZ from previous renderpasses.
- CLEAR clears LRZ.
- DONT_CARE doesn't clear and doesn't load, so LRZ should be
  disabled, that was also the initial idea in code, but conditions
  didn't work out and are now fixed.

Fixes glcts tests:
 KHR-GL46.packed_depth_stencil.blit.depth24_stencil8
 KHR-GL46.packed_depth_stencil.blit.depth32f_stencil8
 KHR-GLES3.packed_depth_stencil.blit.depth24_stencil8
 KHR-GLES3.packed_depth_stencil.blit.depth32f_stencil8

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34577>
2025-05-05 09:32:53 +00:00
Yiwei Zhang
06f5d1a105 venus: expose WSI on renderer without dma-buf support
For Venus on host driver without dmabuf support, we can fallback to
allow cpu buffer blit for wsi instead of not exposing it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13096
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34804>
2025-05-05 08:27:48 +00:00
Michel Dänzer
f177b787b8 ci: Drop obsolete -Wno-error= stanzas
No corresponding warnings left. Tighten the screws to prevent new
warnings from creeping in.

v2:
* The debian-clang-release job still needs
  -Wno-error=sometimes-uninitialized.
v3:
* Drop more from debian-arm64-asan & debian-testing-msan jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34799>
2025-05-05 08:02:11 +00:00
Samuel Pitoiset
1356d20042 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>
2025-05-05 07:07:58 +00:00
Samuel Pitoiset
55ad0fd35c 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>
2025-05-05 06:46:32 +00:00
Ella Stanforth
32d9afdf73 nir/printf: add new helper to printf at a specific pixel.
Debugging with nir_printf_fmt can result in overwhelming information. This
allows us to filter for a pixel we care about.

Reviewed-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/34737>
2025-05-05 06:20:18 +00:00
Ella Stanforth
43f22110e7 nir/printf: break out va_list handling
Reviewed-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/34737>
2025-05-05 06:20:17 +00:00
Timothy Arceri
e0a111540f 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>
2025-05-04 23:04:29 +00:00
Valentine Burley
e7ce35f3c5 ci/fluster: Fix and rename S3_PATH_FLUSTER to S3_FLUSTER_TAR
The S3_PATH_FLUSTER variable already included the archive filename.
Appending `vectors.tar.zst` again during upload caused the file to be
stored at the wrong location, which broke retrieval in subsequent builds.

Fix this behavior and rename the variable to S3_FLUSTER_TAR to make its
purpose clearer and avoid future confusion.

Fixes: a3fb667b1d ("ci: Include Fluster vectors in the rootfs")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 16:09:12 +02:00
Valentine Burley
4a614cfbfb amd/ci: Remove increased timeout for radeonsi-raven-vaapi-fluster job
This is no longer necessary now that we are no longer downloading the
Fluster vectors at runtime.
This should have been removed in 9870512787 ("ci/lava: Use the new test-video-based rootfs for VA-API jobs").

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:39:51 +02:00
Valentine Burley
f6f7f9e7a2 ci/fluster: Use the structured tag as the Fluster vector version
The strucutered tag replaces the need to have a separate
FLUSTER_VECTORS_VERSION variable just to check if the vectors changed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:39:51 +02:00
Valentine Burley
b01a091856 ci/fluster: Use structured tagging for Fluster
Structured tagging captures a checksum of the component we think we're
building, and verifies this through the chain.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:38:59 +02:00
Valentine Burley
3ca7897ba9 ci/fluster: Move Fluster to its own subfolder in the test-video container
We have a spacious new container, move fluster to its own subfolder.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:38:32 +02:00
Valentine Burley
1bc853f2a0 ci/fluster: Add sections to job logs
Declutter the job output by adding collapsed sections.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:38:32 +02:00
Valentine Burley
46abb7bd2e ci/fluster: Move the fluster-runner.sh script
The fluster-runner.sh was only runner srcipt in a folder, move it out of
the fluster folder.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:38:32 +02:00
Valentine Burley
9cf5c01d0c amd/ci: Rename .radeonsi-raven-vaapi-fluster to .radeonsi-vaapi-fluster-rules
It has nothing to do with Raven, it just happens that the first fluster
job was running on Raven.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:38:32 +02:00
Valentine Burley
c90e1ba5cc ci/test: Move and rename .lava-fluster to .test-fluster
It has nothing to do with LAVA, it just happens that the first fluster
job was running on LAVA.

Also drop the redundant :x86_64 definition.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34787>
2025-05-03 15:38:32 +02:00
Marek Olšák
7f0de1a512 ac: remove gfx11_emulate_clear_state
We don't use CLEAR_STATE on gfx11 anymore.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34589>
2025-05-02 18:40:11 +00:00
Marek Olšák
5e487dbc49 amd: stop using CLEAR_STATE on gfx11
It's not allowed with user queues, so this will make it simpler to support
user queues.

There are 2 groups of registers:
- those that are never set by radv and radeonsi - those are now set
  in the shared preamble
- those that are set by radv but not radeonsi - those are now set
  in the radeonsi preamble

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34589>
2025-05-02 18:40:11 +00:00
Iván Briano
cf9b0dd589 anv, hasvk: ignore QFOT if both src and dst queue families are equal
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34779>
2025-05-02 17:38:56 +00:00
Danylo Piliaiev
c1dbfa0e0f freedreno/a6xx: Implement fast border colors in sampler
There are no fixed border color in GL so we have to compare colors.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34786>
2025-05-02 16:43:31 +00:00
Danylo Piliaiev
3691694933 tu: Remove builtin border color logic
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34786>
2025-05-02 16:43:31 +00:00
Danylo Piliaiev
a1cf7054d9 tu: Implement fast border colors in sampler
Vulkan has 3 fixed border colors all of which exist in HW.
Should be faster than additional level of indirection that
custom border colors introduce.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34786>
2025-05-02 16:43:31 +00:00
Danylo Piliaiev
4690637acd freedreno/regs: Document fast border color in sampler
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34786>
2025-05-02 16:43:31 +00:00
Vignesh Raman
02337aec71 virgl/ci: update flakes
Move glx@glx-multithread-clearbuffer to flakes since
this test flakes in recent runs.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34781>
2025-05-02 21:35:23 +05:30
Vignesh Raman
8949e4a7ec ci: add libproc2-0
libproc2-0 is required for igt tests in drm-ci.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34781>
2025-05-02 19:06:43 +05:30
Sergi Blanch Torne
27020be893 ci: angle: fix depot-tools dependency release
Cloning a dependency from the last commit in the main branch of a repo,
besides is not the usual practice here, is risky because it can fail without
relation with the activity in Mesa. In fact, it happens sporadically, that a
build fails from an error from depot-tools. So, start stabilizing that by
fixing the commit of depot-tools we use. Later we can face the uprev of this
dependency.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34788>
2025-05-02 12:18:56 +00:00
Danylo Piliaiev
6427e57e33 freedreno/percntr: Expose LRZ derived counters
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34770>
2025-05-02 11:39:54 +00:00
Philip Rebohle
4cb358f1c2 radv: Remove offset parameter from radv_make_texel_buffer_descriptor.
This is already only used in vkCreateBufferView, and causes a vkd3d-proton
test to fail with >4GB offsets since the parameter was 32-bit only.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34760>
2025-05-02 09:13:14 +00:00
Paul Gofman
96765935e8 radv/amdgpu: Fix hash key in radv_amdgpu_winsys_destroy().
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34774>
2025-05-02 07:51:23 +00:00
Karol Herbst
ec3011ed04 gallium: remove pipe_grid_info::input
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:31 +02:00
Karol Herbst
6730b8b228 gallium: remove pipe_grid_info::pc and PIPE_SHADER_IR_NATIVE
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:29 +02:00
Karol Herbst
a990ada276 gallium: remove pipe_context::set_compute_resources and PIPE_BIND_COMPUTE_RESOURCE
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:27 +02:00
Karol Herbst
502b821ea3 gallium: remove pipe_compute_state::req_input_mem
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:24 +02:00
Karol Herbst
97b17e7b42 gallium: remove pipe_compute_caps::max_input_size
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:23 +02:00
Karol Herbst
76d82f9b2a gallium: remove pipe_compute_caps::max_private_size
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:19 +02:00
Karol Herbst
44051e6fbd gallium: remove pipe_compute_caps::images_supported
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:06 +02:00
Karol Herbst
9d73da9155 gallium: remove pipe_compute_caps::ir_target
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:18:01 +02:00
Karol Herbst
e5775ac0e0 gallium: remove pipe_compute_caps::max_threads_per_block_clover
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:17:38 +02:00
Karol Herbst
2deea42eba gallium: remove pipe_compute_caps::max_block_size_clover
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:17:16 +02:00
Karol Herbst
2443ce2db6 gallium: remove pipe_binary_program_header
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:16:53 +02:00
Karol Herbst
c93d80ba98 nvc0: remove support for pipe_grid_info::input
The hw sm query code declared some input space, but wasn't actually using
it, so this is all dead code since clover got removed.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:16:42 +02:00
Karol Herbst
d7b3ab3bc2 nv50: move pipe_grid_info::input into the driver
It is left-over from clover, but nv50 used it for hw sm queries

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:16:32 +02:00
Karol Herbst
6416c49247 radeonsi: remove more clover related code
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:16:27 +02:00
Karol Herbst
67b9be91be r600: remove all clover related code
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
2025-05-01 22:16:17 +02:00
Karol Herbst
f6e3c967d9 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>
2025-05-01 22:16:02 +02:00
Eric Engestrom
7addf551f3 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>
2025-05-01 22:15:57 +02:00
José Roberto de Souza
3e5a735d01 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>
2025-05-01 13:27:44 +00:00
Lionel Landwerlin
63f633557f 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>
2025-05-01 11:25:18 +00:00
Rhys Perry
1d7a988ec2 vtn: use nir_const_value_for_raw_uint for bfloat SpecConstantOp/FConvert
I'm not sure how this was supposed to ensure padding was zero, and it
doesn't seem to work for me (GCC 15.0.1).

Fixes a NIR validation failure with dEQP-VK.glsl.bfloat16.constant.compute
and RADV.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 90e1b12890 ("spirv: Add bfloat16 support to SpecConstantOp")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34769>
2025-05-01 10:52:30 +00:00
Rhys Perry
752f5f317e aco: replace max_const_offset_plus_one with max_const_offset
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/34766>
2025-05-01 09:19:02 +00:00
Rhys Perry
a85ebe16b3 aco: fix max_const_offset_plus_one overflow
smem_offset_max is UINT32_MAX on GFX7 and setting
max_const_offset_plus_one to 0 causes divisions by zero later.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: c26851b80b ("aco: increase max_const_offset_plus_one for SMEM load_global")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34766>
2025-05-01 09:19:02 +00:00
José Roberto de Souza
615d0c9669 anv: Remove ANV_BO_ALLOC_HOST_CACHED from ANV_BO_ALLOC_MAPPED assert() on anv_device_alloc_bo()
ANV_BO_ALLOC_MAPPED are internal allocated bos that need mmap() but as
internally we don't do any cflush() we need to make sure those are also
ANV_BO_ALLOC_HOST_COHERENT.

Checking for ANV_BO_ALLOC_HOST_CACHED could lead a cached+uncoherent
bo being allocated internally with ANV_BO_ALLOC_MAPPED.

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/34778>
2025-05-01 02:44:03 +00:00
José Roberto de Souza
57bf646685 anv: Fix assert failure in discrete GPUs when allocating a LMEM+SMEM slab parent
It was failing in the first assert of anv_device_alloc_bo() because
it has ANV_BO_ALLOC_MAPPED but it don't have ANV_BO_ALLOC_HOST_COHERENT or
ANV_BO_ALLOC_HOST_CACHED(this second one is wrong and fixed in the next
patch).

LMEM is always write-combine, even SMEM on discrete GPU is always
write-back + coherent because the PCI bus protocol snooping at CPU
caches and that behavior can't be disabled.
So we can add this coherent flag without any side effects.

The ANV_BO_ALLOC_MAPPED is needed for ANV_BO_SLAB_HEAP_LMEM_SMEM
because to trigger SMEM+LMEM in anv_device_alloc_bo() we need
ANV_BO_ALLOC_MAPPED or ANV_BO_ALLOC_LOCAL_MEM_CPU_VISIBLE but the
second one is mostly used with small PCI bar discrete GPUs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dabb012423 ("anv: Implement anv_slab_bo and enable memory pool")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34778>
2025-05-01 02:44:03 +00:00
Mike Blumenkrantz
8a339cdebc 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>
2025-04-30 19:09:44 +00:00
Mike Blumenkrantz
4d8146befb egl: rename dri2_load_driver -> dri2_detect_swrast
this simplifies some error cases and makes the call more intelligible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34609>
2025-04-30 19:09:44 +00:00
Connor Abbott
453ecaddb5 freedreno: Remove compute_constlen_quirk
Turns out that X1-85 is just more sensitive to the split being set
correctly. There seem to be no more hangs with the
compute_constlen_quirk disabled after the earlier commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34746>
2025-04-30 18:44:34 +00:00
Connor Abbott
ea9d694a7b 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>
2025-04-30 18:44:34 +00:00
Connor Abbott
80bcbc0e92 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>
2025-04-30 18:44:34 +00:00
Connor Abbott
57986ae5ec 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>
2025-04-30 18:44:34 +00:00
Connor Abbott
156ab5839d 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>
2025-04-30 18:44:34 +00:00
Eric Engestrom
6445fd47d8 docs: add sha sum for 25.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34772>
2025-04-30 18:03:00 +00:00
Eric Engestrom
36a98e226c docs: add release notes for 25.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34772>
2025-04-30 18:03:00 +00:00
Eric Engestrom
4e9c89e787 docs: update calendar for 25.0.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34772>
2025-04-30 18:03:00 +00:00
Christian Gmeiner
f17d350001 lima: Move fdot lowering from NIR to lima
This change relocates the fdot lowering from the generic NIR to the lima,
since lima is the only consumer of this particular lowering. This avoids
potential conflicts with the similar fdot lowering already present in
nir_lower_alu_width.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34757>
2025-04-30 17:33:38 +00:00
Eric Engestrom
0f747d0990 docs: update calendar for 25.1.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34771>
2025-04-30 17:27:18 +00:00
Karol Herbst
9a97a5d577 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>
2025-04-30 17:12:11 +00:00
Juan A. Suarez Romero
c8b57594e0 ci/baremetal: fix ubsan gl target
It should use be based on GL, not VK target.

Fixes: e16d422da5 ("ci/baremetal: Split baremetal_arm64_test to -gl and -vk")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34764>
2025-04-30 16:34:23 +00:00
Karmjit Mahil
9d01b318a3 anv,tu: Bypass RMV pcie_family_id check
Since RMV 1.9 pcie_family_id is checked to verify whether a
capture is supported.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34763>
2025-04-30 16:12:11 +00:00
Juan A. Suarez Romero
2781df4d10 Revert "ci: disable Igalia's farm"
This reverts commit 1eb3a40615.

Everything is up again.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34765>
2025-04-30 15:46:35 +00:00
Mike Blumenkrantz
9082715ab0 vk/cmd_queue: generate copies for string struct members
this includes e.g., debug labels, which previously was garbage data

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34534>
2025-04-30 15:01:35 +00:00
Mike Blumenkrantz
26cdd7ebd6 vk/cmd_queue: generate copies for struct-ptr members
this includes e.g., VkCommandBufferBeginInfo::pInheritanceInfo,
which previously was garbage data

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34534>
2025-04-30 15:01:35 +00:00
Mike Blumenkrantz
a7edaaacce vk/cmd_queue: stop generating weird casts for free functions
these are unnecessary and error-prone

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34534>
2025-04-30 15:01:35 +00:00
Mike Blumenkrantz
c3b6122cdf vk/cmd_queue: try to fix some indentation
still not perfect, but at least somewhat readable now

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34534>
2025-04-30 15:01:35 +00:00
Janne Grunau
f6c5f0c19d 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>
2025-04-30 14:23:53 +00:00
Janne Grunau
674c96ad0a 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>
2025-04-30 14:23:53 +00:00
Janne Grunau
a228d715b6 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>
2025-04-30 14:23:53 +00:00
Janne Grunau
007d7418f8 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>
2025-04-30 14:23:53 +00:00
Christian Gmeiner
7c4cce5bfd etnaviv: compiler: Enable more pack/unpack lowerings
Passes 16/20 dEQP-GLES3.functional.shaders.builtin_functions.pack_unpack.*
tests on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34692>
2025-04-30 14:06:08 +00:00
Christian Gmeiner
2193ae0253 etnaviv: compiler: Call nir_lower_alu_width(..)
Lowers nir_op_pack/nir_op_unpack ALU Instructions.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34692>
2025-04-30 14:06:08 +00:00
Christian Gmeiner
68a89bb085 etnaviv: compiler: Handle f2f16 and f2f32
They are needed by some pack/unpack lowerings.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34692>
2025-04-30 14:06:08 +00:00
Lionel Landwerlin
f7bc22e0d7 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>
2025-04-30 13:37:14 +00:00
José Roberto de Souza
5a2ee9b534 iris: Remove iris_slab_free cast
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/33558>
2025-04-30 12:56:40 +00:00
Felix DeGrood
4f0aa96d26 anv: Do conservative oversubscription of pages to 2MB
Round up allocations to nearest 2MB interval if this increases
the allocation by no more than 1.33x. This reduces page count but
at the cost of extra memory consumption. Optimization only applied
to MTL(Xe KMD only)/LNL platforms, which are particularly impacted by
page misses.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
2c05488be1 anv: Align size of bos larger than 1MB to 64k to enable 64k pages
BOs larger than 1MB don't go memory pool due the size but applications
tend to use a lot of VkMemory with size larger than 1MB so to reduce
the number of pages and improve performance here I'm aligning the size
of BOs larger than 1MB to 64kb, this allows 64kb pages to be used at
least on Xe KMD.
This bring substantial perfomance benefit in exchange of a small
memory waste.

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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
dde91cf9cb anv: Always grow fixed address pools by 2MB in platforms that there is a performance gain
MTL and newer integrated platforms has a performance gain when using
transparent huge pages, because of the fixed address requirement
we can't use slab for this case but we can change the initial pool
size to 2MB so all allocations get the transparent huge page
optimization.

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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
7361b3287f anv: Remove useless if block
I can't think in any case where that would be false, so lets drop it.
While at it, also making some variables const.

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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
6f7a32ec92 anv: Add support for batch buffers in anv_slab_bo in i915
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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
39bb51ab27 anv: Add support for batch buffers in anv_slab_bo in Xe KMD
Because of the ANV_BO_ALLOC_CAPTURE flag, batch buffers were not
allowed to use memory pool.
So to workaround that here adding a new anv_bo_slab_heap heap for
cached+coherent+capture buffers with the main goal to get batch
buffer to memory pool but other buffers will as well.

For now that will only work in Xe KMD as i915 requires more changes
to support it.

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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
a0a600ca5f anv: Skip anv_bo_pool if memory pool is enabled
The whole purpose of anv_bo_pool is to reduce the number of
gem_create/destroy calls in command buffers that is something with
a short life span.
But slab_bo/memory pool does the same with even other benefits like
doing 2MB allocations to enable THP.

So here skipping the meat of anv_bo_pool_free() to directly return
the bo to slab_bo. This change is also necessary because the way
anv_bo_pool stores freed buffers it requires that all bos has a unique
gem handle, what not true of buffer allocated by anv_slab.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
0b561f691b anv: Add support for ANV_BO_ALLOC_DYNAMIC_VISIBLE_POOL in anv_slab_bo
This flag was not supported in anv_slab_bo because it is set together
with ANV_BO_ALLOC_CAPTURE and more important it has a specific VMA
range.

We can support it by adding a custom heap and allocating all bos in
the heap with all necessary flags, but because application can also
allocate those with vkAllocateMemory() here the ANV_BO_ALLOC_CAPTURE
is appended to the vkAllocateMemory() path for integrated gpu and
anv_slab_bo check if all the alloc_flags matches, because application
could choose to allocate it in a cached but not coherent memory type
for example.

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/33558>
2025-04-30 12:56:40 +00:00
José Roberto de Souza
8fd4423d99 anv: Add support for ANV_BO_ALLOC_DESCRIPTOR_POOL in anv_slab_bo
This flag was not supported in anv_slab_bo because it is set together
with ANV_BO_ALLOC_CAPTURE and more important it has a specific VMA
range.

But we can easily support it by adding a custom heap with it and
allocating all bos in the heap with all necessary flags.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
ea18572ff2 anv: Add support for ANV_BO_ALLOC_AUX_CCS in anv_slab_bo
This changes allow us to support memory pool of bos with
ANV_BO_ALLOC_AUX_CCS set.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
dabb012423 anv: Implement anv_slab_bo and enable memory pool
This is implementing the functions in anv_slab_bo and actually
enabling memory pool.
This is heavily based on Iris memory pool implementation, the main
difference is that the concept of heaps only exist in anv_slab_bo, we
have function that takes the anv_bo_alloc_flags and decides what heap
to place that bo.

Some anv_bo_alloc_flags blocks memory pool, we can relax and remove
some flags from this denied list later.

This feature can be disabled in runtime by setting
ANV_DISABLE_SLAB=true, this can help us to easily check if bugs
are due to this feature or not.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
3bf6d42fda anv: Add the base infrastructure to support memory pool
Allocating larger buffers allows KMD/HW to enable optimizations
that makes access to memory faster, also because of minimum alignment
required in some cases we allocate 4k or 64k long buffers for
usages that only needs a few bytes, wasting a lot of memory.

Memory pool takes care of both of those things and here I'm
adding the base infrastruture to implement this feature.
The next patch will implement the functions in anv_slab_bo.c, spliting
it in two to make review easier.

The idea here is take the same approach as Iris and use pb_slab.h.
In 99% of the places it will be transparent that anv_bo is actually
a slab of a larger and real anv_bo, the remaning 1% of the places are
handled 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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
5d8ec0ce5c anv: Move VMA alignment requirements to its own function
That will make easy to implement memory pool in the next patches as we
need to calculate the VMA aligment without the KMD alignment requirement
for memory pool.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
4e7ba17413 anv: Export anv_bo_is_small_heap()
This function will be needs in two places in the next patches.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
ce4d48107c util: Move pb_slab from gallium to util
That will be used outside of gallium drivers in the next commit, so
moving it out to util folder.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
0642708fe8 gallium: Remove pb_buffer.h include from pb_slab.h
pb_slab.h don't make use of anything defined in pb_buffer.h.
But removing it breaks Iris build because pb_buffer.h then includes
util/format/u_formats.h that Iris was using but not including.

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/33558>
2025-04-30 12:56:39 +00:00
José Roberto de Souza
e0a9ec34e7 intel: Add has_partial_mmap_offset to intel_device_info
Commit 3fc79582a1db ("drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps")
increased the I915_PARAM_MMAP_GTT_VERSION version, with that we can
detect what kernel version has the partial mmap fix or not and limit
the usage of this workaround.
This time o mmap will be used in memory pool, so here adding this
propertly to enable or not the feature.

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/33558>
2025-04-30 12:56:39 +00:00
Lionel Landwerlin
374ef9228b anv: add ability to mmap at offset
Jose: Added support for placed address

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33558>
2025-04-30 12:56:39 +00:00
Lionel Landwerlin
1d46a663ae anv: update Wa_22019225126 check
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/34754>
2025-04-30 11:55:24 +00:00
Tapani Pälli
eeffb4e674 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>
2025-04-30 11:19:07 +00:00
Danylo Piliaiev
97dc196d42 tu: Add total renderpasses,dispatches to cmdbuf tracepoint
Makes much easier to identify command buffers when tracing
only them, e.g. to see overall performance.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34588>
2025-04-30 09:28:50 +00:00
Danylo Piliaiev
99b23235a6 tu: Don't enable secondary command buffer tracepoint by default
Secondary command buffers don't add much information to the traces, but
add more noise and overhead. In order to disable their tracepoints by
default, a separate "secondary_cmd_buffer" tracepoint is created.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34588>
2025-04-30 09:28:50 +00:00
Karmjit Mahil
9dfd4a091c 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>
2025-04-30 09:06:47 +00:00
Iago Toral Quiroga
103a16e4fa frontend/dri: don't call set_damage_region with a null resource
This can happen if texture allocation failed.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34668>
2025-04-30 07:05:44 +00:00
Iván Briano
29d7b90cfc 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>
2025-04-29 20:28:24 +00:00
Mel Henning
b9275b54a1 nak/sm70_encode: Remove unused has_mod parameter
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34750>
2025-04-29 18:23:43 +00:00
Mel Henning
28d077838f nak/sm70_encode: Encode fneg/fabs for hfma2 src 2
and also stop legalizing away src 1 modifiers. Both of these are present,
they just move to a different place in the encoding.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34750>
2025-04-29 18:23:43 +00:00
Mel Henning
1ff7135691 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>
2025-04-29 18:23:43 +00:00
Valentine Burley
d48b3a232c docs: Remove the docs for setting up bare-metal devices
Bare-metal support is being removed from Mesa, and adding new devices is
no longer supported.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34725>
2025-04-29 18:16:04 +00:00
Valentine Burley
a587a0a389 docs: Move the docs about caching downloads to LAVA from bare-metal
The bare-metal page is getting removed, and LAVA was missing this
section.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34725>
2025-04-29 18:16:04 +00:00
Rhys Perry
6338ed44c5 aco/gfx12: increase maximum vbuffer offset
fossil-db (gfx1201):
Totals from 301 (0.38% of 79377) affected shaders:
Instrs: 2734478 -> 2728816 (-0.21%); split: -0.21%, +0.00%
CodeSize: 14347476 -> 14306568 (-0.29%)
Latency: 15508055 -> 15502202 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 2846419 -> 2842387 (-0.14%); split: -0.14%, +0.00%
VClause: 68286 -> 68101 (-0.27%); split: -0.30%, +0.03%
SClause: 49487 -> 49500 (+0.03%)
Copies: 207179 -> 206093 (-0.52%); split: -0.57%, +0.04%
Branches: 72941 -> 72942 (+0.00%); split: -0.00%, +0.00%
VALU: 1549156 -> 1544727 (-0.29%); split: -0.29%, +0.00%
SALU: 339620 -> 338989 (-0.19%); split: -0.19%, +0.00%

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/34730>
2025-04-29 17:44:41 +00:00
Rhys Perry
d987d5e341 aco/gfx12: increase maximum global/scratch offset
fossil-db (gfx1201):
Totals from 29 (0.04% of 79377) affected shaders:
Instrs: 1439082 -> 1439070 (-0.00%)
CodeSize: 7641688 -> 7641608 (-0.00%)
Latency: 9836296 -> 9836280 (-0.00%)
VALU: 799504 -> 799496 (-0.00%)

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/34730>
2025-04-29 17:44:41 +00:00
Rhys Perry
02d193f058 aco/gfx12: increase maximum smem offset
fossil-db (gfx1201):
Totals from 55 (0.07% of 79377) affected shaders:
Instrs: 3203775 -> 3200809 (-0.09%)
CodeSize: 16817140 -> 16813440 (-0.02%); split: -0.04%, +0.02%
Latency: 17838315 -> 17829658 (-0.05%)
InvThroughput: 3352905 -> 3351689 (-0.04%)
SClause: 57377 -> 57273 (-0.18%)
Copies: 231006 -> 230941 (-0.03%)
SALU: 436900 -> 435234 (-0.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/34730>
2025-04-29 17:44:41 +00:00
Rhys Perry
c26851b80b aco: increase max_const_offset_plus_one for SMEM load_global
fossil-db (gfx1201):
Totals from 1115 (1.40% of 79377) affected shaders:
Instrs: 1473805 -> 1467571 (-0.42%); split: -0.43%, +0.01%
CodeSize: 7852972 -> 7819656 (-0.42%); split: -0.44%, +0.02%
SpillSGPRs: 1632 -> 1460 (-10.54%); split: -11.27%, +0.74%
Latency: 11975762 -> 11971915 (-0.03%); split: -0.05%, +0.02%
InvThroughput: 2496961 -> 2496448 (-0.02%); split: -0.03%, +0.01%
VClause: 25213 -> 25218 (+0.02%); split: -0.00%, +0.02%
SClause: 28822 -> 28565 (-0.89%); split: -1.41%, +0.52%
Copies: 106377 -> 105715 (-0.62%); split: -1.23%, +0.61%
Branches: 27497 -> 27473 (-0.09%)
PreSGPRs: 52071 -> 51310 (-1.46%)
VALU: 871051 -> 870694 (-0.04%); split: -0.04%, +0.00%
SALU: 186090 -> 181811 (-2.30%); split: -2.32%, +0.02%

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/34730>
2025-04-29 17:44:41 +00:00
Rhys Perry
f390893a64 aco/gfx12: use s_sub_u64
fossil-db (gfx1201):
Totals from 2 (0.00% of 79377) affected shaders:
Instrs: 243999 -> 243993 (-0.00%)
CodeSize: 1288176 -> 1288152 (-0.00%)
Latency: 1894093 -> 1894091 (-0.00%)
InvThroughput: 378819 -> 378818 (-0.00%)
SALU: 33048 -> 33044 (-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/34730>
2025-04-29 17:44:41 +00:00
Rhys Perry
5b4813c4f0 aco/gfx12: use s_add_u64
fossil-db (gfx1201):
Totals from 122 (0.15% of 79377) affected shaders:
Instrs: 3640138 -> 3637577 (-0.07%); split: -0.07%, +0.00%
CodeSize: 19133796 -> 19120080 (-0.07%); split: -0.08%, +0.01%
SpillSGPRs: 666 -> 650 (-2.40%)
SpillVGPRs: 2147 -> 2159 (+0.56%)
Scratch: 254208 -> 255232 (+0.40%)
Latency: 21529337 -> 21522317 (-0.03%); split: -0.04%, +0.00%
InvThroughput: 4048519 -> 4047233 (-0.03%); split: -0.03%, +0.00%
VClause: 90453 -> 90455 (+0.00%)
SClause: 67846 -> 67674 (-0.25%); split: -0.28%, +0.03%
Copies: 287449 -> 287476 (+0.01%); split: -0.04%, +0.05%
Branches: 104526 -> 104530 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 9795 -> 9723 (-0.74%); split: -0.78%, +0.04%
VALU: 2004219 -> 2003031 (-0.06%); split: -0.06%, +0.00%
SALU: 492651 -> 491737 (-0.19%); split: -0.19%, +0.00%
VMEM: 161317 -> 161341 (+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/34730>
2025-04-29 17:44:41 +00:00
Sagar Ghuge
821c1bfa7e 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>
2025-04-29 17:03:35 +00:00
Rohan Garg
b9fe5aad37 anv: enable VK_KHR_shader_bfloat16
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
07fa3b3785 intel: Add support for BFloat16 as cooperative matrix source
Re-organize the configuration lists to make easier to include BFloat16
only for the Gfx125+ that support it, while keeping MTL supporting the
"lowered" configurations from pre-Gfx125.

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/34105>
2025-04-29 16:29:37 +00:00
Rohan Garg
2bbe042e87 spirv: Enable bfloat16 capabilities
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
e0b195cadb spirv: Use bfdot for SpvOpDot with BFloat16
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
2807097690 spirv: Implement Conversions to/from bfloat16
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
90e1b12890 spirv: Add bfloat16 support to SpecConstantOp
Handle bfloat16 by converting sources to float, performing the
operation, and converting result back to bfloat16 if needed.  This is
done because not all ALU ops have a `bf` version in NIR.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Rohan Garg
dc8074683d spirv: construct a bfloat16 from the given SPIR-V bitsize and encoding
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
fb6ae2eac1 spirv: Refactor to use glsl_type to pick ALU ops
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
bba607ac2b spirv: Move Convert opcodes handling to its own function
Take the opportunity to add a comment about why the bit_size
comes from the NIR def and not the original type.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
d4381c0908 brw/cmat: Implement conversion from/to BFloat16
When converting BFloat16 from/to non-Float32 type, use
the Float32 conversion as an intermediate step.  Take the
opportunity to separate the unary_op/convert code-paths.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
de88184ab6 brw/cmat: Support different src/dst packing factors in emit_packed_alu1
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
7fa7be970d brw/cmat: Extract emit_packed_alu1() function
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
4b4500ad35 brw/cmat: Store more information about cmat slices
Store the cmat_description and packing_factor so that various
functions don't need to extract and recalculate them.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
a7ff177a88 brw: Consider bfloat16 in lower simd width pass
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
2c31516b3e brw: Consider bfloat16 in lower regioning pass
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
5936768ce0 brw: Consider bfloat16 in copy propagation
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/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
129c074811 brw: Implement support for BFloat16 ALU opcodes
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
a38960e8f3 brw, nir: Use glsl_base_type instead of nir_alu_type for @dpas_intel
This will allow including types that don't have a nir_alu_type
equivalent, like 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/34105>
2025-04-29 16:29:37 +00:00
Caio Oliveira
cf4021f93c nir: Add opcodes for BFloat16
SPV_KHR_bfloat16 requires a small set of operations,
since it doesn't support all the arithmetic ops.

This patch adds conversions to/from Float32 and also
the necessary ops (bfdot, bffma, bfmul) to implement
SpvOpDot using the same lowering approach than the
Float32 counterpart.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:36 +00:00
Rohan Garg
9e5d7eb88d compiler/types: add a bfloat16 type
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:36 +00:00
Caio Oliveira
ecd2d2cf46 util: Add functions to convert float to/from bfloat16
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34105>
2025-04-29 16:29:36 +00:00
Caio Oliveira
3e0418ba02 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>
2025-04-29 16:29:36 +00:00
Mary Guillemard
6ab4ae1a19 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>
2025-04-29 16:07:19 +00:00
Rhys Perry
20279c28c8 aco/tests: add pseudo-scalar transcendental and fallback path RA tests
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/34343>
2025-04-29 15:15:11 +00:00
Rhys Perry
96e49b7904 aco/ra: add ra_test_policy::use_compact_relocate
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/34343>
2025-04-29 15:15:10 +00:00
Rhys Perry
3c1dbc1d9b aco/ra: cleanup compact_relocate_vars fallback path
We don't need to duplicate these loops.

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/34343>
2025-04-29 15:15:10 +00:00
Rhys Perry
a780345e01 aco: fix compact_relocate_vars fallback with scc/exec/m0 precolored regs
This probably doesn't fix anything in practice. I don't think this path is
ever taken for SGPRs except for pseudo-scalar transcendental instructions,
and those don't have any precolored operands/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/34343>
2025-04-29 15:15:10 +00:00
Rhys Perry
f6581b41c4 aco/ra: don't require alignment for NPOT SGPR temporaries
Aligning these can create situations where register allocation is
impossible. Only pseudo-instructions can use these, and they don't require
any alignment.

I'm not sure if these temporaries actually happen in practice. This
probably only affects the get_reg()'s compact_relocate_vars fallback path,
which doesn't usually happen for SGPRs.

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/34343>
2025-04-29 15:15:10 +00:00
Rhys Perry
623230a6ef aco/ra: change sorting in compact_relocate_vars
D16 MIMG or pseudo-scalar transcendental instructions might give lower
limits to the maximum register available for their definitions, so just
try to place them earlier.

This is also part of fixing compact_relocate_vars with aligned NPOT
def/killed-op space (the second part is the later commit which changes
get_stride()).

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/34343>
2025-04-29 15:15:10 +00:00
Rob Clark
3f9b8edb1c ci: Re enable fd-farm
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34748>
2025-04-29 14:41:35 +00:00
Erik Faye-Lund
87e143b053 docs/features: mark off missing panvk extensions
Seems we forgot to check these two off.

Fixes: 5ed79c2d2b ("panvk: Advertise support for VK_KHR_shader_terminate_invocation")
Fixes: d4998f7ff3 ("panvk: Advertise VK_EXT_shader_demote_to_helper_invocation support")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34747>
2025-04-29 14:35:20 +00:00
Mary Guillemard
f23f8c2826 panvk: Advertise VK_EXT_depth_bias_control
This gives more details on the hardware depth bias implementation details.

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/34745>
2025-04-29 14:08:37 +00:00
Mary Guillemard
970bdecb50 panvk: Advertise VK_EXT_shader_replicated_composites
This is handled by common code.

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/34745>
2025-04-29 14:08:36 +00:00
Boris Brezillon
d4998f7ff3 panvk: Advertise VK_EXT_shader_demote_to_helper_invocation support
The necessary bits have been added to the bifrost/valhall backend,
so we can advertise support for VK_EXT_shader_demote_to_helper_invocation
now.

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/34676>
2025-04-29 13:31:47 +00:00
Boris Brezillon
83cbac00d3 pan/{bi,va}: Lower terminate to demote
Bifrost/Valhall implementation is actually close to the demote behavior,
where discarded threads will continue execution until explicitly
terminated.

Given we'll need to support the demote behavior for Vulkan, let's use
nir_lower_terminate_to_demote(), which solves the problem, and allows
for extra dead-code elimination when a termination point is guaranteed
to be taken by all threads.

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/34676>
2025-04-29 13:31:47 +00:00
Boris Brezillon
cd4400e27b pan/bi: Lower is_helper_invocation
Needed for VK_EXT_shader_demote_to_helper_invocation.

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/34676>
2025-04-29 13:31:47 +00:00
Boris Brezillon
59c307a3f3 pan/bi: Fix and improve the !abs && !coarse case in bi_emit_derivative()
The lane source passed to CLPER must be wrap-invariant, and we currently
violate this constraint in the !abs && !coarse case. So let's rework
the code to use a XOR modifier on the current lane instead, and adjust
the sign of the (righ - left) operation afterwards.

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/34676>
2025-04-29 13:31:47 +00:00
Boris Brezillon
5ed79c2d2b panvk: Advertise support for VK_KHR_shader_terminate_invocation
This is already supported, we just need to toggle the switch.

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/34676>
2025-04-29 13:31:47 +00:00
Alyssa Rosenzweig
5a55133ce7 hk: advertise VK_KHR_shader_quad_control
we already support this.

Closes: #13067
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34738>
2025-04-29 13:14:07 +00:00
Eric Engestrom
ef1792bea8 amd/ci: document regression in e612e840...e210b79c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34740>
2025-04-29 11:09:35 +02:00
Eric Engestrom
80b1aea705 amd/ci: disable retry on nightly radeonsi-vangogh-glcts-full job
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/75399939 should not have
been retried.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34740>
2025-04-29 09:01:47 +00:00
Ricardo Garcia
bc44d029df radv: Ignore image barrier queue families if equal
The src and dst queue family indices in an image memory barrier may
contain arbitrary values that can be ignored unless both are different.
This fixes a crash in upcoming CTS tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34691>
2025-04-29 08:15:28 +00:00
Samuel Pitoiset
1fccc09abe 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>
2025-04-29 07:00:09 +00:00
Eric Engestrom
4227982326 ci: rename misleading *-postmerge stages to *-nightly
These stages are for the jobs that are skipped in merge pipelines,
automatically run in nightly pipelines, and are available to run
manually in other pipelines.

None of these ever run in post-merge pipelines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34590>
2025-04-29 05:49:00 +00:00
Valentine Burley
26bc35c8f9 ci: Delete the kernel+rootfs jobs
LAVA and baremetal now use the test-* containers as the base for their
rootfs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
13db56320b ci/baremetal: Use container rootfs
Switch baremetal to use the new artifacts from 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/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
e16d422da5 ci/baremetal: Split baremetal_arm64_test to -gl and -vk
While all the arm32 jobs are testing GL, there are both GL and VK arm64
jobs. This is required to be able to use the rootfs from the test-*
containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
a2150a0f56 ci/baremetal: Remove legacy support for unused devices
Clean up unused remnants for old devices that are no longer used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
8296c19817 ci: Add a workaround for finding deqp-runner on Broadcom
Broadcom devices require /usr/local/bin to be unconditionally added to
the PATH in order to locate the binaries installed there.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
55e78ef678 ci/lava: Remove job definitions using kernel+rootfs jobs
These are all unused now and can be removed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
10ea0002a6 ci/intel: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
961498a098 ci/svga: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
be79a2d2d3 ci/lima: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
da27eea9e0 ci/etnaviv: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
4f7c40d5d4 ci/panfrost: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
4d2e5f577a ci/freedreno: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
f8e87fbf50 ci/amd: Convert to using the new container based rootfs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
9870512787 ci/lava: Use the new test-video-based rootfs for VA-API jobs
Add new job definitions using the new debian/x86_64-test-video container,
and convert the radeonsi-raven-va and radeonsi-raven-vaapi-fluster jobs
to use the rootfs derived from this container.
Now that we are no longer downloading the Fluster vectors at runtime, the
parallelsim of the radeonsi-raven-vaapi-fluster job can be greatly
decreased.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
a3fb667b1d ci: Include Fluster vectors in the rootfs
Downloading them at runtime proved too slow and unreliable.
Keep the logic to upload the vectors to S3 as it's faster, the build job
takes around 5-10 minutes when downloading from S3, but 30+ minutes to
using Fluster to download the vectors.
Move this to the build-fluster.sh script to allow re-using it in the
test-video container.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
414e1a22c8 ci/container: Add new container for libva and fluster testing
The new debian/x86_64_test-video container includes va tools and Fluster.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
751ff1a41e ci/va: Add /va/bin to PATH for test-video container
The test-video container requires /va/bin to be in the PATH to locate
necessary binaries.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
82a25daf9d ci/va: Collapse build section for va-tools
Makes the build job easier to look at.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
8448fbae8c ci/lava: Move rootfs handling for Fluster out of build script
Move the logic for installing Fluster into $ROOTFS from build-fluster.sh
into the main lava_build.sh script.
This allows building Fluster in contexts that don't use a rootfs, such as
test containers.
Also move the section inside the build script.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
e80045d23e ci/lava: Use the new container based rootfs for piglit traces
Also change the name of the job defitions to match the other definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
2e8adb9e98 ci/lava: Use rootfs exported from test-* containers
Use the new S3_DISTRIBUTION_TAG variable to find the distribution tag of
the newly created lava-rootfs.tar.zst archive.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
1009613aec ci/lava: Add job definitions using the test-* containers
These definitions use the test-gl and test-vk containers instead of the
kernel+rootfs jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
225ac7f2b2 ci/container: Include SkQP in the test-gl containers
Build SkQP in the arm64 and x86_64 test-gl containers.
One of the third party dependencies requires python-is-python3.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
33d5204ec1 ci/container: Include ANGLE in the x86_64 test-gl container
Build ANGLE in the x86_64 test-gl container.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
16db8b22cc ci: Export the rootfs from the test-* containers
Use the FDO_DISTRIBUTION_POST_EXEC mechanism to run the fdo_cntr_export.sh
script after building the test-* containers. This exports the container
rootfs, creates a lava-rootfs.tar.zst archive, and uploads it to S3.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
53c7a04d12 ci/lava: Ensure firmware directory exists before downloading a660_zap.mbn
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Guilherme Gallo
e9b98b0cc9 ci: Add rootfs export script
Implement new script for container->rootfs extraction.

v2 (Valentine)
 * Adapt script for direct execution in test-* containers through
   ci-templates

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Guilherme Gallo
d4bf1fecb7 ci: Keep important packages for rootfs
Don't remove passwd, because the test-* containers run the
strip-rootfs.sh script before setting up the rootfs, where we need it.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Guilherme Gallo
816b0212a8 ci: Update setup-rootfs.sh for test-* containers
Update the script to make it useable for both container and rootfs jobs.
Move the rootfs-specific logic into the main lava_build.sh script, and
don't install ci-fairy, because that revision can't be used for s3cp
anymore after the migration.

v2 (Valentine)
 * Move the rootfs-specific logic instead of adding a new script

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Daniel Stone
3609dbc061 ci: Add ci-kdl to test-base container
It's useful to monitor things on your devices.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Daniel Stone
a5159ff108 ci: Add packages for hardware CI testing
We need these things in our rootfs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Daniel Stone
73993c2e74 ci: Add firmware to test-base container
We need firmware to run stuff.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Eric Engestrom
580a151642 ci: use https:// to install ci-fairy
There's no reason to try to use http://, not that it would work as it's
301-redirected to https:// anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
7d5f0eebc6 ci: Uprev ci-templates to get FDO_DISTRIBUTION_POST_EXEC and S3 fixes
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
118a4c5872 ci/android: Remove redundant android-tools folder
Since we no longer download the Android build or platform tools,
there's no need for a separate android-tools subfolder. The CTS
archive is now extracted directly to /android-cts.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
3eb61729e3 ci/deqp-runner: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
c1242c15af ci/rust: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
bfe6f50ab4 ci/deqp: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
7686edcb73 ci/angle: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
7d1e34204f ci/android: Collapse more build sections
Add two new build sections, and collapse the existing ones to make the
container build more readable and easier to follow in CI logs.

Also quieten unzipping the Android CTS and NDK, which print thousands of
lines and overflow the logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Valentine Burley
b3c07fe722 ci/android: Use aapt from Debian packages
Switch to using the aapt Debian package, which includes up-to-date
versions of both aapt and aapt2. This removes the need to manually
download and install the Android build-tools, eliminating one of the
blockers for a hypothetical arm64 test-android container.

Verified versions:
aapt: Android Asset Packaging Tool, v0.2-debian
aapt2: Android Asset Packaging Tool (aapt) 2.19-debian

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34451>
2025-04-28 20:08:32 +00:00
Ian Romanick
c2ac7fa77b brw/cmod: Allow integer CMP to ADD propagation only for Z and NZ
No shader-db chnages on any Intel platform.

v2: Add a note about integer types in the saturate handling path.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 210743769 -> 210743727 (-0.00%)
Cycle count: 30377699060 -> 30377700318 (+0.00%); split: -0.00%, +0.00%

Totals from 36 (0.01% of 706776) affected shaders:
Instrs: 17032 -> 16990 (-0.25%)
Cycle count: 291716 -> 292974 (+0.43%); split: -0.01%, +0.44%

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34509>
2025-04-28 19:44:23 +00:00
Ian Romanick
e26270249b 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>
2025-04-28 19:44:23 +00:00
Ian Romanick
0dab520a19 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>
2025-04-28 19:44:23 +00:00
Ian Romanick
8f0fd0e66e brw/cmod: Remove special handling of NOT
The previous commit converts any NOT that might have been affected by
this path into a simple MOV. Those MOVs are handled by other paths.

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

v2: Fix a bad squash. Changes that were accidentally in this commit were
supposed to be in the previous commit. Noticed by Ivan.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34509>
2025-04-28 19:44:23 +00:00
Ian Romanick
08fe7988d7 brw/algebraic: Convert some NOT to MOV
On Xe platforms, many fragment shaders have patterns like:

    asr(8)          g21<2>W         g1.2<0,1,0>W    15D
    ...
    mov(8)          g11<1>UW        g21<16,8,2>UW
    ...
    not.nz.f0.0(8)  null<1>D        g11<8,8,1>W

Converting the NOT.NZ to MOV.Z enables copy propagation to eliminate the
original MOV. Then cmod propagation is able to eliminate the
NOT-converted-to-MOV.

It might be possible to cover this case by adding more opcodes to the
list NOT can propagate to. The next commit will show that just
converting to MOV is a better approach anyway.

v2: Fix a bad squash. Changes that were supposed to be in this commit
were accidentally in the next commit. Noticed by Ivan.

shader-db:

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 20069804 -> 20065167 (-0.02%)
instructions in affected programs: 592450 -> 587813 (-0.78%)
helped: 2300 / HURT: 0

total cycles in shared programs: 884534032 -> 884496201 (<.01%)
cycles in affected programs: 13064194 -> 13026363 (-0.29%)
helped: 1285 / HURT: 790

LOST:   18
GAINED: 15

fossil-db:

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
Totals:
Instrs: 234506495 -> 234468664 (-0.02%)
Cycle count: 24444825202 -> 24445710703 (+0.00%); split: -0.01%, +0.01%
Max live registers: 42349793 -> 42349789 (-0.00%)
Max dispatch width: 7131344 -> 7131744 (+0.01%); split: +0.05%, -0.04%

Totals from 16673 (2.07% of 805781) affected shaders:
Instrs: 6497669 -> 6459838 (-0.58%)
Cycle count: 435877770 -> 436763271 (+0.20%); split: -0.54%, +0.74%
Max live registers: 1122972 -> 1122968 (-0.00%)
Max dispatch width: 151528 -> 151928 (+0.26%); split: +2.19%, -1.92%

No shader-db or fossil-db on any other Intel platforms.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34509>
2025-04-28 19:44:23 +00:00
Ian Romanick
9ce869aef5 brw/cmod: Delete some stale comment text
Stale like the mummified remains of Ötzi, The Iceman.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34509>
2025-04-28 19:44:23 +00:00
Ian Romanick
12a022cf45 brw/algebraic: Greatly simplify brw_opt_constant_fold_instruction
brw_opt_constant_fold_instruction can either do nothing or replace the
instruction with a MOV of an immediate value. Previously each opcode
case would perform this replacement, and code at the bottom of the
function would verify the results.

It is much simpler if each opcode case calculates a result in a brw_reg,
and code at the bottom of the function performs the replacement. There
are two outlier cases that cannot use this pattern: MAD and
BROADCAST. These cases simply return directly from the switch-statement
after performing the replacement.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34707>
2025-04-28 18:33:42 +00:00
Konstantin Seurer
9a946f8125 lavapipe: Fix ray tracing position fetch with multiple geometries
The previous code didn't take into account, that the primitive index is
set back to 0 for each geometry.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34496>
2025-04-28 18:41:22 +02:00
Danylo Piliaiev
dea4bb3757 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>
2025-04-28 15:19:10 +00:00
Christian Gmeiner
42aae5c3fa etnaviv: nir: Legalize txd derivatives src's
The hardware expects textureGrad (txd) derivatives to be specified as
offset coordinates from the base texture coordinate, rather than raw
gradients.

This change fixes the majority of the
dEQP-GLES3.functional.shaders.texture_functions.texturegrad.* tests on
GC7000. Remaining failures are due to shadow sampler handling, which
will be addressed separately.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34704>
2025-04-28 14:14:53 +00:00
Samuel Pitoiset
5841d44f91 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>
2025-04-28 12:43:02 +00:00
Maíra Canal
1eb3a40615 ci: disable Igalia's farm
Spain is suffering a major power outage, which has affected Igalia's farm.
Disable Igalia's farm until the situation stabilizes.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34727>
2025-04-28 09:22:34 -03:00
Romaric Jodin
7112c606ef panvk: Advertise support for VK_KHR_shader_integer_dot_product
This is already supported, we just need to toggle the switch.

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/34695>
2025-04-28 13:17:31 +02:00
Ryan Mckeever
2a16422fab panvk: Advertise KHR_draw_indirect_count for v10+
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34571>
2025-04-28 10:33:32 +00:00
Ryan Mckeever
cebd908bf3 panvk: Implement CmdDraw[Indexed]IndirectCount for v10+
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34571>
2025-04-28 10:33:32 +00:00
Rhys Perry
de896234d8 aco: improve spilling of clobbered operands
We can ignore live_changes for these.

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/34699>
2025-04-28 10:04:43 +00:00
Rhys Perry
7fe84024cb 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>
2025-04-28 10:04:43 +00:00
Job Noorman
656d7a0f88 ir3: don't use VS input regs for binning variant
This isn't necessary anymore since f6f7bc29 ("freedreno/a6xx: Program
VFD_DEST_CNTL from program stateobj").

Allowing the binning variant to allocate its own inputs ensures we don't
needlessly use high register numbers (and thus potentially have a larger
register footprint). Unfortunately, this doesn't have an impact on waves
on shaderdb/fossildb.

Totals from 14669 (8.91% of 164575) affected shaders:
Instrs: 3026564 -> 3024820 (-0.06%); split: -0.33%, +0.28%
CodeSize: 6499538 -> 6496888 (-0.04%); split: -0.19%, +0.15%
NOPs: 452142 -> 451590 (-0.12%); split: -1.76%, +1.64%
MOVs: 67614 -> 66477 (-1.68%); split: -4.92%, +3.24%
Full: 149240 -> 155922 (+4.48%); split: -0.76%, +5.24%
(ss): 56452 -> 56247 (-0.36%); split: -4.58%, +4.22%
(sy): 33366 -> 33535 (+0.51%); split: -2.82%, +3.33%
(ss)-stall: 213221 -> 213992 (+0.36%); split: -0.87%, +1.23%
(sy)-stall: 1391221 -> 1395187 (+0.29%); split: -4.05%, +4.34%
Preamble Instrs: 695820 -> 695661 (-0.02%); split: -0.04%, +0.02%
Cat0: 495109 -> 494450 (-0.13%); split: -1.65%, +1.52%
Cat1: 127072 -> 125925 (-0.90%); split: -2.61%, +1.71%
Cat7: 94725 -> 94787 (+0.07%); split: -0.08%, +0.15%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34651>
2025-04-28 09:10:32 +00:00
Ryan Mckeever
a5a0dd3ccc panvk: Implement multiDrawIndirect for v10+
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-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/34617>
2025-04-28 06:38:09 +00:00
Ryan Mckeever
2bbfcaf01f panvk: Prepare cmd_prepare_shader_res_table() for multiDrawIndirect
This will be needed for indirect draws, where the VS driver desc table
needs to be updated per-draw, which also forces us to have one resource
table per draw.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-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/34617>
2025-04-28 06:38:09 +00:00
Ryan Mckeever
690675748b panvk: Prepare cmd_prepare_push_uniforms() for multiDrawIndirect
With indirect multi draw, we'll need to allocate N times the vertex
FAUs so we can patch each of them with the draw parameters.

Add a repeat_count argument to allow that.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-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/34617>
2025-04-28 06:38:09 +00:00
Tapani Pälli
ed9f135936 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>
2025-04-28 04:45:01 +00:00
Guilherme Gallo
3493500abb ci: Update build-apitrace.sh header with the right tag
The build-apitrace.sh moved from test-gl/vk to test-base script at
175b6d02.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34713>
2025-04-26 14:27:54 +00:00
Guilherme Gallo
b92dd9c573 ci: bump apitrace version
apitrace at commit b6102d10 has a bugfix regarding a recent regression
in GPU frame time calculation that made we miss weeks of performance
data.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34713>
2025-04-26 14:27:54 +00:00
Eric Engestrom
47db31b556 ci: take google-freedreno farm offline
All jobs are currently failing because the gateway ran out of disk space.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34719>
2025-04-26 16:16:40 +02:00
Erik Faye-Lund
d39e2869a8 panvk: re-enable KHR_shader_quad_control on v10+
Now that we support Vulkan 1.2, we can expose KHR_shader_quad_control
again.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34512>
2025-04-25 22:31:34 +00:00
Erik Faye-Lund
b3fd8ddf6a 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>
2025-04-25 22:31:34 +00:00
Caleb Callaway
7f35879738 driconf: Jusant needs force_vk_vendor=-1 on Intel devices
A UE crash reporter is displayed without this wrap

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12782
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34705>
2025-04-25 11:25:59 -07:00
Rhys Perry
3c021b79b4 aco/ra: use a correct stride for subdword get_reg_impl
fossil-db (gfx1201):
Totals from 3 (0.00% of 79377) affected shaders:
Instrs: 1312 -> 1308 (-0.30%)
CodeSize: 7112 -> 7096 (-0.22%)
Latency: 5381 -> 5382 (+0.02%)
InvThroughput: 753 -> 752 (-0.13%)
Copies: 69 -> 68 (-1.45%)
VALU: 836 -> 835 (-0.12%)

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/34679>
2025-04-25 14:43:41 +00:00
Rhys Perry
ae6d4f1195 aco/ra: update_renames() before add_subdword_definition()
The register file tests here should be done after update_renames().

Normally, get_reg() wouldn't have to move anything to make space for a 1-3
byte definition. This was encountered with skip_optimistic_path=true and a
get_reg_impl() bug (fixed in a later commit) which caused suboptimal
register assignment.

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/34679>
2025-04-25 14:43:41 +00:00
Eric Engestrom
9d0cd43a68 ci/build: drop install.tar from gitlab artifacts
Now that everyone uses the S3 url, let's avoid unnecessary uploads of
several GB per pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
630aef6653 ci/test: make generic fdo runner test jobs use the S3 artifacts too
These were the last users of the gitlab artifacts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
1d7cce2700 ci/ci-tron: default HWCI_TEST_SCRIPT to deqp-runner, as it's almost always what's run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
20631a07ca ci/test: rename .b2c-vkd3d-proton-test to .test-vkd3d-proton
It has nothing to do with ci-tron, it just happens that the first vkd3d
job was running on ci-tron.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
ce79b8a799 radv/ci: move radv-kabini-vkd3d out of gitlab-ci-inc.yml
It's currently disabled, which is probably why it was accidentally moved there.

While at it, fix its name to match the rest of the jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
aecdf762ce amd/ci: ci yaml indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
35816d6422 ci/test: fix annoying yamllint warning about 2 spaces before comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
aca1a332c2 ci/build: drop unnecessary shellcheck disables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
ab0e505d7f ci/build: rename variable to avoid changing the meaning of existing variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
8c28f77bd1 ci/build: split git commit sha command out of echo
This prevents errors from being masked, eg. when `git` is not installed.

While at it, use `--short=10` instead of piping through `cut`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
621aebe046 ci/build: drop unused VERSION from python-artifacts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
5be4799734 ci/build: drop lava scripts from builds artifacts
The ones used come from the "python-artifacts" job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
1f08d75272 ci/build: drop expectation files from python-artifacts
The ones used come from the mesa build artifacts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
d35c630483 ci/build: drop b2c files from the builds artifacts
They haven't been used in a long time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Valentine Burley
cd8d8ca795 ci: Update kernel to fix GPU recovery issues on sm8350
This new revision contains one new commit, fixing GPU recovery failures
on sm8350.

dea4d930f2

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34694>
2025-04-25 11:04:16 +00:00
Rhys Perry
b03e071583 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>
2025-04-25 10:41:52 +00:00
Boris Brezillon
d432fd9e32 panvk: Advertise support for VK_EXT_extended_dynamic_state[2]
We added CmdBindVertexBuffers2(), the rest is handled by the core.

Advertising this feature also works around a CTS bug that was
calling CmdSetPatchControlPointsEXT() without checking for this
extension.

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/34696>
2025-04-25 09:04:55 +02:00
Boris Brezillon
e3cbb2c131 panvk: Implement CmdBindVertexBuffers2()
The vk runtime has a helper to help us with the strides, we just
need to use vi_binding_strides[] when emitting the attributes.

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/34696>
2025-04-25 09:02:51 +02:00
Christian Gmeiner
1d11872828 etnaviv: nir: Use nir_shader_tex_pass(..)
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/34706>
2025-04-24 23:12:15 +02:00
Alyssa Rosenzweig
3eb7575679 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>
2025-04-24 19:05:07 +00:00
Christian Gmeiner
614b66529d etnaviv: nir: Add support for txf texture operation
The src[2] value 0x1100 is set based on observed behavior of the blob driver,
though its exact meaning remains to be documented.

Passes all dEQP-GLES3.functional.shaders.texture_functions.texelfetch.*
tests on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
2025-04-24 20:19:37 +02:00
Christian Gmeiner
eefe486533 etnaviv: nir: Legalize txf lod src
The LOD must be a float, unlike the GLSL function, which expects an integer.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
2025-04-24 20:19:37 +02:00
Christian Gmeiner
da90fca609 etnaviv: isa: Add txf instruction
This instruction is used to implement texelfetch.

Blob generates such txf's for
dEQP-GLES3.functional.shaders.texture_functions.texelfetch.+

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
2025-04-24 20:19:37 +02:00
Brian Paul
6325868bbe svga: handle null target pointers in svga_set_stream_output_targets()
Fixes crash in Piglit arb_separate_shader_object-xfb-explicit-location-array
test.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34635>
2025-04-24 17:03:30 +00:00
Georg Lehmann
65411350ac aco/insert_exec: disable empty quads when leaving divergent control, even if not top level
We don't restore exec after uniform top level branches, so nothing disabled
empty quads after a demote in divergent control flow in a uniform branch.

Foz-DB Navi31:
Totals from 17 (0.02% of 79789) affected shaders:
Instrs: 34573 -> 34572 (-0.00%)
CodeSize: 186876 -> 186872 (-0.00%)
Latency: 324145 -> 324141 (-0.00%)
Copies: 1467 -> 1458 (-0.61%)
PreSGPRs: 802 -> 800 (-0.25%)
SALU: 2531 -> 2530 (-0.04%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34670>
2025-04-24 15:43:09 +00:00
Timur Kristóf
3ad385b9cc 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>
2025-04-24 15:13:44 +00:00
Timur Kristóf
3a05477ac6 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>
2025-04-24 15:13:44 +00:00
Lionel Landwerlin
e60416b4e4 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>
2025-04-24 14:47:40 +00:00
Seán de Búrca
3aec638a8b rusticl: remove unnecessary check for device in kernel list
There is no need to verify that `kernel.prog.devs` contains a device
when that device ref was pulled from `kernel.prog.devs` immediately
beforehand.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
4be2a49e02 rusticl: improve use of Rust idioms
Reduce unnecessary function calls, collect from iterators instead of
adding to mutable collections, and remove unnecessary trait bounds.

v2: split change to associated device check into new commit

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
2c202eb787 rusticl: verify validity of property names and values
v2: separate from using type aliases based on signature and reorder
v3: verify validity in two additional locations

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
62d8541f39 rusticl: improve internal typing
Shuffle some integer types to reduce the necessity of casting.

Additionally, clean up some unnecessary use of `Vec` to avoid
allocations.

v2: revert changes to `PipeContext` to avoid hiding truncation errors,
move change to fallible conversions to separate patch

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
ec314aa358 rusticl: align memory utilities with std
Rename `is_alligned()` util to match std naming and move it alongside
similar utilities which copy upstream functionality and annotate those
utilities with their first stable version where applicable.

Replace use of `mesa_rust_util::offset_of!()` in one case where nested
field support is not needed.

v2: revert removal of `offset_of!()` for nested field support

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
26867670b2 rusticl/device: set maximum work dimension to match implicit bounds
Much of the kernel code implicitly depends on a maximum work dimension
of 3, and in practice, gallium will never give a grid dimension of less
than 3, constraining the value to a constant.

v2: use a const for max dimension instead of a `min` call

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Mary Guillemard
845611bb43 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>
2025-04-24 13:28:53 +00:00
Juan A. Suarez Romero
7ec937b81e v3d/vc4/ci: Add -gl suffix to the GL suite names
As we have a -vk suffix for the Vulkan-related suites, add a -gl one for
the OpenGL/ES related suites.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34680>
2025-04-24 12:40:38 +00:00
Juan A. Suarez Romero
9ab13e1ed0 v3d/vc4/ci: update fraction and parallel values
The aim is to increase the coverage as maximum as possible while using
the less possible DuTs, everything under a testing budget of 10 minutes.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34680>
2025-04-24 12:40:38 +00:00
John Anthony
8dd578e2a4 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>
2025-04-24 12:11:32 +00:00
Dmitry Baryshkov
419a9e9d42 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>
2025-04-24 11:40:15 +00:00
Valentine Burley
680752d97f ci: Use hyphens in make-git-archive job name
Spaces in job names make me uncomfortable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34689>
2025-04-24 11:05:23 +00:00
Valentine Burley
b758e49085 ci: Update ci-fairy to use shared ref from ci-templates
The /templates/ci-fairy.yml include was pinned to an old revision of
ci-templates that wasn't able to upload to S3 with s3cp following the
infrastructure transition.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34689>
2025-04-24 11:05:23 +00:00
Eric Engestrom
bf4fa82af9 ci: use curl instead of wget in download-git-cache.sh
Note that this code is executed on the generic FDo gitlab runners, not
in our docker images. This change is merely to avoid the confusion that
lead to the code in the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34684>
2025-04-24 10:36:00 +00:00
Eric Engestrom
74809ce0e3 ci: drop dead wgetrc as there are no uses of wget in our CI images
Note that if you grep, you'll find two instances of `wget`, but those are not
executed in our docker images, but on the generic FDo gitlab runners, so the
/etc/wgetrc file in our docker images cannot affect them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34684>
2025-04-24 10:36:00 +00:00
Mary Guillemard
006f5c20bd panfrost: Allow max effective tile size of 64x64 on v12+
This is supported since v12 and we fixed the last remaining issues
related to it.

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>
2025-04-24 10:11:22 +00:00
Mary Guillemard
943a59c8f9 panvk: Emit sample count and tile size when emitting framebuffer/tiler descriptors
This move the logic around tile size budget to be able to handle
rasterization_samples properly in case no render target is defined.

We now select the tile size right before emitting the tiler and framebuffer
descriptors.

This fixes "dEQP-VK.pipeline.monolithic.multisample.mixed_count.*" on
v12 when 64x64 tile size is allowed.

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>
2025-04-24 10:11:21 +00:00
Mary Guillemard
c7f2bc6bed 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>
2025-04-24 10:11:21 +00:00
Tapani Pälli
765801fd9e intel/dev: add note about PAT entries and Wa_18038669374
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/34665>
2025-04-24 09:48:34 +00:00
Eric Engestrom
a0407a6ecf ci/vkd3d: fail shell pipeline when part of it fails
We use pipes in several places and don't want to ignore their failures.

A couple of exceptions are allowed with explicit `|| true`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:37 +00:00
Eric Engestrom
104f21c27b ci/vkd3d: treat reading undefined variables as an error
This would've prevented the bug in the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:37 +00:00
Eric Engestrom
89d4ddce0e ci/vkd3d: fix RESULTS_DIR variable name
The bug in the previous commit was hiding this bug...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:37 +00:00
Eric Engestrom
3c0d414cbf ci/vkd3d: only keep logs of failed tests
This is what I meant to do from the start but messed up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:36 +00:00
Eric Engestrom
7f0fe34758 ci/vkd3d: quieten the mesa version check
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:36 +00:00
Eric Engestrom
0f8fd5da7a ci/vkd3d: fix test failure list when no test failed
This becomes important once the bugfix in the next commit is applied.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:36 +00:00
Eric Engestrom
d21e300f33 ci/vkd3d: drop misguided "something failed" error message
Luckily the check was broken, but let's not fix it because this would
cause any failure to fail the job, regardless of expectations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34639>
2025-04-24 09:00:36 +00:00
Olivia Lee
e93261f579 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>
2025-04-24 08:20:41 +00:00
Georg Lehmann
6d2190300a radv/nir/lower_cmat: tightly pack 8bit gfx11 acc matrix
Invalid for now, but used by vkd3d-proton, where the use case is to convert
a result matrix to lower precision, followed by a store.

For 16bit accumulation matrices, GFX11 only uses 16bits per 32bit register.
RADV's coop matrix code pads the unused space with undefs and uses a vector
with twice as many elements as the matrix length. Extending that to 8bit by
leaving 24 bits unused is unnecessary as these matrices as there
is no hw unit that requires it. And in wave32, it would also result in
vectors larger than NIR's limit.
So tightly pack 8bit matrices without any undef padding.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34382>
2025-04-24 06:37:44 +00:00
Georg Lehmann
bbc9bc9d24 radv/nir/lower_cmat: use cmat_mul instead of duplicating hw details for type conversion
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34382>
2025-04-24 06:37:44 +00:00
Georg Lehmann
31a3430570 radv/nir/lower_cmat: use radv_nir_cmat_bits consistently
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34382>
2025-04-24 06:37:44 +00:00
Dmitry Osipenko
300b6f7371 util/disk_cache: Re-enable multi-file cache by default
Over past months a performance issue was found with the Mesa-DB cache
implementation that results in a too slow cache startup time when cache is
full. A better indexing strategy will need to be invented to mitigate the
issue. Until then, let's default back to the multi-file cache.

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34199>
2025-04-24 02:43:51 +00:00
Yurii Kolesnykov
9822fa3ef3 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>
2025-04-23 20:18:25 +00:00
Eric Engestrom
6a58bc357b docs: update calendar for 25.1.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34683>
2025-04-23 19:46:07 +00:00
Mel Henning
60452e016e 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>
2025-04-23 19:11:59 +00:00
Lionel Landwerlin
1f6cca0800 intel: fixup a few debugging option checks
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ad328bc58d ("intel: Switch uint64_t intel_debug to a bitset")
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34667>
2025-04-23 18:47:42 +00:00
Rhys Perry
62e50de5d0 aco: use v_perm_b32 for byte swaps within a VGPR on gfx10
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/34636>
2025-04-23 18:23:18 +00:00
Rhys Perry
a43783fd76 aco: use v_perm_b32 for do_pack_2x16 on gfx10+
fossil-db (gfx1201);
Totals from 93 (0.12% of 79377) affected shaders:
Instrs: 373212 -> 372761 (-0.12%)
CodeSize: 2062752 -> 2063704 (+0.05%); split: -0.00%, +0.05%
Latency: 4172059 -> 4171993 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 1299144 -> 1299093 (-0.00%)
Copies: 51268 -> 50831 (-0.85%)
Branches: 10980 -> 10979 (-0.01%)
VALU: 220192 -> 219756 (-0.20%)
VOPD: 48 -> 47 (-2.08%)

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/34636>
2025-04-23 18:23:18 +00:00
Marek Olšák
78a3b48db0 radeonsi: enable nir_io_compaction_groups_tes_inputs_into_pos_and_var_groups
It's only useful when TES culls.

shader-db with ACO:
    143 shaders have -1.44% average decrease in code size.
    There are fewer input loads and more of them are vec4 instead of vec1-3.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32262>
2025-04-23 17:47:37 +00:00
Marek Olšák
0836e9758b radeonsi: initialize use_ngg* sooner
si_init_screen_get_functions determines NIR options, so it should be before
setting caps.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32262>
2025-04-23 17:47:37 +00:00
Marek Olšák
55db7fc18c nir/opt_varyings: group TES inputs based on whether they are used by POS or VAR
If the optional flag is set, compaction groups TES inputs based on which
outputs they are used for:
- inputs generating only POS/CLIP outputs are first
- inputs generating both POS/CLIP and VAR outputs are next
- inputs generating only VAR outputs are last

shader-db with ACO:
    143 shaders have -1.44% average decrease in code size.
    There are fewer input loads and more of them are vec4 instead of vec1-3.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32262>
2025-04-23 17:47:37 +00:00
Marek Olšák
f15399af0f nir: add gathering passes that gather which inputs affect specific outputs
The first pass computes which shader instructions contribute to each
output. It can be used to query how data flows within shaders towards
outputs.

The second pass computes which shader input components and which types of
memory loads are used to compute shader outputs.

The third pass uses the second pass to gather which input components are
used to compute pos and clip dist outputs, which input components are used
to compute all other outputs, and which input components are used to
compute both. This will be used by compaction in nir_opt_varyings for
drivers that split TES into a separate position cull shader and varying
shader to make it less likely that the same vec4 inputs are needed in both.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32262>
2025-04-23 17:47:37 +00:00
Karol Herbst
33965bb21b 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>
2025-04-23 16:59:56 +00:00
Alyssa Rosenzweig
4685d8e2d9 libagx: use common heap alloc for tessellator
this gets us bounds checking.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
d339bf7a98 libagx: rename agx_geometry_state to agx_heap
no other state persists. this cleans up a lot of naming.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
29cc2b6d42 libagx: do not include heap in geometry params
the only dynamic allocation left for geometry shaders is all done in the setup
indirect kernel. so just pass the heap to that kernel directly, so we don't
reserve a heap for direct draws with GS (including pure-VS XFB). this should
reduce our memory footprint a lot in certain apps.

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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
cb52aa58d6 agx/nir_lower_gs: bound static topologies
don't bloat up shader info.

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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
9b1d771747 agx/nir_lower_gs: compact static topologies
use 8-bit index buffer instead of 32-bit to significantly decrease the size of
serialized geometry shaders (agx_gs_info is not dynamic).

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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
5640266eb3 agx/nir_lower_gs: rework gs rast shape handling
rather than a bunch of subtle booleans telling the driver how to invoke the GS
rast shader, collect everything into a common enum, and provide (CL safe)
helpers to do the appropriate calculations rather than duplicating across
GL/VK/indirects.

this fixes suboptimal handling of instancing with list topologies.

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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
2a0314250b agx/nir_lower_gs: don't use nir_def_rewrite_uses
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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
3670f95e12 agx/nir_lower_gs: avoid redundant sr read's
saves 2 SR reads in a SW VS

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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
8b0dca384f agx/nir_lower_gs: fix type confusion
Fixes: b9b6828fda ("agx/nir_lower_gs: optimize static topologies")
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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
d548259b2f agx: plumb vertex_id_zero_base
to accelerate SW VS.

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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
fbb85a8d09 agx: use abi.h defines
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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
6f265ab83f asahi: clang-format
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/34661>
2025-04-23 16:20:59 +00:00
Alyssa Rosenzweig
d31ad329c2 util: optimize bitcount on OpenCL
Fixes: bfc18b6fb1 ("libagx: drop libagx_popcount")
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/34661>
2025-04-23 16:20:59 +00:00
Yinjie Yao
eecfb02463 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>
2025-04-23 15:37:04 +00:00
Faith Ekstrand
1a373edfc5 nak/sm20: Fix legalization of IAdd and IMul
They were both missing subtle cases.  While we're here, fix a bunch of
SrcTypes.  They shouldn't matter in practice since it's just used to
determine how many GPRs to allocate but we may as well get them right.

Fixes: 078ffb860b ("nak/sm20: Add initial SM20 encoding")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34675>
2025-04-23 14:06:27 +00:00
Faith Ekstrand
ca296bf0a9 nak/sm20: Call copy_alu_src_if_fabs() first
Since an FAbs or FNegAbs modifier is going to force the source out to a
register no matter what, we should do this first.  That way we avoid the
unnecessary source swaps or other evictions when we have to evict the
source anyway because it has a modifier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34675>
2025-04-23 14:06:27 +00:00
Christoph Pillmayer
c26273109f panfrost/ci: Update spec@ext_transform_feedback@max-varyings result
After the previous changes to varyings, this test no longer crashes.
Update the expected result from Crash to Fail to reflect that.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34074>
2025-04-23 11:53:27 +00:00
Christoph Pillmayer
a36402afc8 panfrost: Use LD_VAR_BUF if possible on v9+
This logic to enable LD_VAR_BUF[_IMM] is on the conservative side.
For fixed varyings, we would need to know what the VS outputs to correctly
compute the indices the FS has to load from. For general varyings, the
locations are aligned either by the linker or by the application in case
of separable shaders.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34074>
2025-04-23 11:53:27 +00:00
Christoph Pillmayer
49a9c91540 panfrost: Remove fixed_varying_mask from uncompiled_shader
This is no longer used after the previous commit and should therefore
be removed.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34074>
2025-04-23 11:53:27 +00:00
Christoph Pillmayer
cd2ca0ac22 panfrost: Enable more than 16 varyings on v9+
This change removes the limit of 16 varyings caused by the 8-bit offset
value used in LD_VAR_BUF[_IMM]. LD_VAR[_IMM] is used instead and the
necessary ADs are emitted at draw time.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34074>
2025-04-23 11:53:27 +00:00
Boris Brezillon
85b6bd989e panvk: Advertise support for VK_KHR_maintenance5
This is already supported, all we have to do is advertise it.

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>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34648>
2025-04-23 11:31:40 +00:00
Boris Brezillon
9d1262e108 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>
2025-04-23 11:31:40 +00:00
Boris Brezillon
8d1e55a3b5 panvk: Implement GetImageSubresourceLayout2 and GetDeviceImageSubresourceLayoutKHR()
Needed for maintenance5.

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>
2025-04-23 11:31:40 +00:00
Boris Brezillon
7abe32a130 panvk: Call vk_image_finish() in GetDeviceImageMemoryRequirements()
It doesn't do much, but let's call it, just in case this changes at
some point.

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>
2025-04-23 11:31:40 +00:00
Boris Brezillon
1e3acb062a panvk: Don't pass a dev to panvk_image_init()
It's not used, and we could retrieve the device from
image->vk.base.device if we had to anyway.

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>
2025-04-23 11:31:40 +00:00
Boris Brezillon
1b22f6d679 panvk: Pass a const image to is_disjoint()
The image is not supposed to be modified there.

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>
2025-04-23 11:31:40 +00:00
Boris Brezillon
51e46ed57f panvk: Implement CmdBindIndexBuffer2()
This is needed for maintenance5.

While at it, move the buffer offseting opertaion to CmdBindVertexBuffers2()
instead of applying the offset at draw time.

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>
2025-04-23 11:31:40 +00:00
Boris Brezillon
b632ac7e3b panvk: Advertise support for VK_KHR_maintenance4
This is already supported, all we have to do is advertise it.

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>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34648>
2025-04-23 11:31:40 +00:00
Georg Lehmann
dd3e1190a2 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>
2025-04-23 09:37:50 +00:00
Georg Lehmann
13f6be262a 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>
2025-04-23 09:37:50 +00:00
Ella Stanforth
6802d66b50 v3d/ci: move depthstencil-default_fb-drawpixels-24_8 samples=4 to flakes
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Ella Stanforth
08c323951b v3dv: Implement dual source blending
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Ella Stanforth
a72be0f720 v3d: Implement dual source blending
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Ella Stanforth
42154029fc v3d/compiler: Implement software blend lowering
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Ella Stanforth
b38c4e8982 nir/alpha_to_coverage: Add an intrinsic for better dithering
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Ella Stanforth
a6f67d5b69 v3d/compiler: Only lower logic ops for color buffers that exist
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Ella Stanforth
1ec0cdb733 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>
2025-04-23 09:03:41 +00:00
Ella Stanforth
d3aedbfe9d asahi/lib: Move alpha_to_one and alpha_to_coverage lowering to common code.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33942>
2025-04-23 09:03:41 +00:00
Pierre-Eric Pelloux-Prayer
091d52965f radeonsi: init use_aco properly when llvm is disabled
Otherwise shaders are compiled with ACO anyway and we hit the assert
added by 7f7d6deb18 ("radeonsi: add ACO-specific main shader parts").

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34574>
2025-04-23 07:59:10 +00:00
Pierre-Eric Pelloux-Prayer
2ab7ff51b9 radeonsi: skip blit incompatible scenarios
When has_image_opcodes is missing only a subset of tests can
be executed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34574>
2025-04-23 07:59:10 +00:00
Pierre-Eric Pelloux-Prayer
992a340eab ac/nir: init blake3 for cs blit shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34574>
2025-04-23 07:59:10 +00:00
Pierre-Eric Pelloux-Prayer
2a381bbc3c 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>
2025-04-23 07:59:10 +00:00
Sergi Blanch Torne
48bccb7d55 bin/ci: crnm: bug stress mode retry formula
The execution_times structure was filled the same way in all the cases of an
if. As a side effect, the retry evaluation doesn't include the last result and
can lead, as a race condition, into triggering one extra time than the
indication in the stress argument.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
2025-04-23 07:42:37 +00:00
Sergi Blanch Torne
e6843c1705 bin/ci: crnm: bug while stressing a single job
When one launches a stress test on a single job, the script behaves like the
stress number is not set. After this wrong end, relaunch the command works
only if stress is bigger than 2. In case 2, it can confuse the number of
executions.

When in stress mode, don't exit the monitor_pipeline method as if there were
only one job run. One job run, prints in std the job trace, but in stress
mode, there are more than one job execution.

The stress_status_counter structure lost the information about job IDs, and
the bug happens when it counts twice the same job.

Reported-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
2025-04-23 07:42:37 +00:00
Guilherme Gallo
ce200e6a4a bin/ci: crnm: Fix job duration calculation
The former version was problematic because:

- time.perf_counter() returns seconds relative to an arbitrary point in
  time (monotonic clock)
- time.mktime() converts to epoch time (seconds since 1970)

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
2025-04-23 07:42:37 +00:00
Guilherme Gallo
b3a9125014 bin/ci: crnm: Improve timer display formatting
Modify the pretty_wait function to use a two-digit width for seconds
display, ensuring consistent and aligned output when showing the
countdown timer.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
2025-04-23 07:42:37 +00:00
Guilherme Gallo
769c9bf27c bin/ci: crnm: Improve job enabling robustness
Add error handling for job retry/play actions with proper exception
handling and improve status tracking. Introduce a maximum retry
limit with MAX_ENABLE_JOB_ATTEMPTS to prevent infinite loops when
jobs cannot be enabled.

Change enable_job to return a boolean status rather than job objects
to avoid race conditions with stale job state. Update callers to
properly handle the new return value and wait for fresh job data
in the next monitoring loop.
Address race conditions in the CI monitor script:

Reported-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
2025-04-23 07:42:37 +00:00
Guilherme Gallo
6464083a6b ci: Extract target job handling in CI monitor script
Extract the target job processing logic from the monitor_pipeline
function into a dedicated run_target_job helper. This improves
readability and maintainability by reducing the complexity of the
monitor_pipeline function.

Also add type casting to ensure proper typing for the job objects and
import the necessary Callable type.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33750>
2025-04-23 07:42:37 +00:00
Boris Brezillon
098ee11c1c panvk: Set supportsNonZeroFirstInstance=true
We now support non-zero firstInstance when instance attributes have
a divisor != 1.

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>
2025-04-23 07:08:25 +00:00
Boris Brezillon
0a3f1da321 panvk: Advertise support for VK_EXT_vertex_attribute_divisor
This is already supported, nothing to do here.

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>
2025-04-23 07:08:25 +00:00
Boris Brezillon
b2a8e3838d 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>
2025-04-23 07:08:25 +00:00
Boris Brezillon
b093855caa 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>
2025-04-23 07:08:25 +00:00
Karol Herbst
93484bf38a rusticl: allow packagers to enable radeonsi by default
Radeonsi hasn't yet passed conformance, so it's not part of the auto set
at this point in time. But this will allow distribution to enable it if
they feel comfortable enough, or to disable it again, if it causes too
many problems.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34621>
2025-04-23 01:56:22 +00:00
Karol Herbst
6f080ac532 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>
2025-04-23 01:35:21 +00:00
Karol Herbst
e3edc6029b ac/llvm: use mul24 intrinsics
With the current code in clpeak LLVM ended up generating v_mad_u64_u32
instructions, with this we get nice v_mad_u32_s24 ones instead and an 4x
performance increase in the int24 benchmark.

Suggested-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34630>
2025-04-23 01:11:48 +00:00
Michael Cheng
3c267535ae anv: Add new debug flag to show shader stage
Add debug option to show current shader type being
compiled within anv_shader_bin_create.

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/34596>
2025-04-22 23:09:26 +00:00
Michael Cheng
ad328bc58d intel: Switch uint64_t intel_debug to a bitset
We are reaching our limit of adding flags to intel_debug
(apporaching 64 flags). Switch intel_debug to a bitset,
which gives us almost "unlimited" bits to use in the future.

v2(Michael Cheng): Fixed a few ci errors

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/34596>
2025-04-22 23:09:26 +00:00
Michael Cheng
2a1aa129ed intel: Switch debug flags to enums to prep for bitset conversion
Refactored the existing debug flags to use an enum instead of
hardcoded 1ull << N macros. This is a prep step before the
eventual switch of intel_debug to a bitset.

Using enums gives us cleaner indexing and avoids annoying shift
overflow warnings. No functional changes yet.

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/34596>
2025-04-22 23:09:26 +00:00
Faith Ekstrand
ff95e506d9 docs/nvk: Update conformance and hardware support information
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34658>
2025-04-22 22:53:32 +00:00
Collabora's Gfx CI Team
8514452cf7 Uprev Piglit to c50d9aa54f85e0af9d72fab86c73f89356d96399
0ecdebb0f5...c50d9aa54f

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34650>
2025-04-22 21:52:29 +00:00
Collabora's Gfx CI Team
3f49272944 Uprev ANGLE to f355e2b37ed43939e2753fc7dacccf75abb4c1a3
a3f2545f6b...f355e2b37e

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34650>
2025-04-22 21:52:29 +00:00
José Roberto de Souza
fcb6dfb29c 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>
2025-04-22 20:42:25 +00:00
José Roberto de Souza
161c412a82 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>
2025-04-22 20:42:25 +00:00
Danylo Piliaiev
36f22cc951 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>
2025-04-22 19:48:43 +00:00
Connor Abbott
ee10938bee 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>
2025-04-22 19:23:53 +00:00
Eric Engestrom
0a41200f82 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>
2025-04-22 19:20:09 +00:00
Aleksi Sapon
501ed5be49 lp: fix gnu-empty-initializer warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34655>
2025-04-22 18:56:37 +00:00
Mary Guillemard
8d2e16cc11 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>
2025-04-22 17:33:02 +00:00
Caio Oliveira
6901f74fbf intel/executor: Reorganize -h and --help
Using -h will show a summarized view of the options, functions and
macros.  Using --help will open `man` with the longer contets,
which is more convenient to search and gives a little bit of
formatting.

This scheme is similar to what is done for git subcommands, e.g.
`git commit -h` and `git commit --help`.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34268>
2025-04-22 17:14:22 +00:00
Faith Ekstrand
d383d78e8c 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>
2025-04-22 16:54:50 +00:00
Georg Lehmann
8f3489f351 aco/isel: create WMMA with constant C matrix if possible
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34396>
2025-04-22 16:08:57 +00:00
Georg Lehmann
4fa3fb87c7 aco/insert_NOPs: allow WMMA with constant C matrix
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34396>
2025-04-22 16:08:56 +00:00
Georg Lehmann
c3964e87f8 radv: apply fneg/fabs modifiers to wmma
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34396>
2025-04-22 16:08:55 +00:00
Georg Lehmann
6d7e67d986 nir,amd: add neg_lo/hi modifiers to cmat_matmul_amd
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34396>
2025-04-22 16:08:55 +00:00
Georg Lehmann
b0c8f31600 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>
2025-04-22 16:08:54 +00:00
Mike Blumenkrantz
5f3a3740dc zink: use util_dynarray_resize_zero() for descriptor pool
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/34654>
2025-04-22 15:29:34 +00:00
Mike Blumenkrantz
7b17dbd0c0 util/dynarray: add util_dynarray_resize_zero()
convenience function(s) to zero the new allocation and avoid bugs

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/34654>
2025-04-22 15:29:34 +00:00
Tomeu Vizoso
a99e5be446 teflon: Release the arrays of tensors in operations
We were leaking the arrays themselves. Also reorder the dereferencing of
the tensors to get the lifecycle right.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
63251d43ae 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>
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
113143a470 teflon/tests: Read model data with mmap, for speed
It was being a bit uncomfortable testing big models otherwise.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
baafa9172a etnaviv/ml: Rework tensor addition on V8
Though the V7 approach works most of the time on V8, there are some
situations in which we generate incorrect instructions but we don't know
why it doesn't work on V8.

This commit brings this driver's behavior more in line with the
proprietary driver's behavior and fixes those instances.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
104309ede3 etnaviv/ml: Support padding the channels dimension
Extend the TP job for padding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
4a951a73e7 teflon: Support more Pad configurations
Add support for padding along the channels dimension.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
c31ce2d71f etnaviv/ml: Fix depthwise convolutions
Those with padding, stride and input smaller than the kernel size.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627>
2025-04-22 14:58:34 +00:00
Georg Lehmann
3e26fc4498 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>
2025-04-22 14:23:05 +00:00
Georg Lehmann
a60d61cce8 nir: improve fadd is_a_number analysis by using the range
Foz-DB Navi21:
Totals from 145 (0.18% of 79789) affected shaders:
Instrs: 168553 -> 168391 (-0.10%); split: -0.10%, +0.00%
CodeSize: 926708 -> 926684 (-0.00%)
Latency: 2210456 -> 2210329 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 545992 -> 545768 (-0.04%)
SClause: 3084 -> 3085 (+0.03%)
VALU: 129521 -> 129360 (-0.12%)
SALU: 13085 -> 13084 (-0.01%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
2025-04-22 14:23:05 +00:00
Georg Lehmann
a6fd9f488a nir: add is_a_number analysis for ffma
Foz-DB Navi21:
Totals from 508 (0.64% of 79789) affected shaders:
Instrs: 796183 -> 795838 (-0.04%)
CodeSize: 4303420 -> 4303384 (-0.00%); split: -0.00%, +0.00%
Latency: 7806095 -> 7805458 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 1377028 -> 1376824 (-0.01%); split: -0.01%, +0.00%
Copies: 63297 -> 63299 (+0.00%); split: -0.00%, +0.00%
PreVGPRs: 29818 -> 29819 (+0.00%)
VALU: 562067 -> 561885 (-0.03%); split: -0.03%, +0.00%
SALU: 89896 -> 89733 (-0.18%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
2025-04-22 14:23:05 +00:00
Georg Lehmann
cb6d035925 nir: add range analysis for ffmaz
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
2025-04-22 14:23:05 +00:00
Georg Lehmann
8ad695195e nir/opt_algebraic: turn exact fmin(1.0, a) into fsat if a is not NaN and not negative
Foz-DB Navi21:
Totals from 2456 (3.08% of 79789) affected shaders:
Instrs: 3415398 -> 3413352 (-0.06%); split: -0.06%, +0.00%
CodeSize: 18781096 -> 18776092 (-0.03%); split: -0.03%, +0.00%
VGPRs: 158512 -> 158528 (+0.01%)
Latency: 39528900 -> 39526687 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 10612237 -> 10609296 (-0.03%); split: -0.03%, +0.00%
VClause: 71028 -> 71034 (+0.01%)
SClause: 93971 -> 93975 (+0.00%); split: -0.00%, +0.01%
Copies: 257525 -> 257521 (-0.00%); split: -0.01%, +0.01%
VALU: 2483374 -> 2481325 (-0.08%); split: -0.09%, +0.00%
SALU: 348207 -> 348211 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
2025-04-22 14:23:04 +00:00
Georg Lehmann
18a0de1834 nir/opt_algebraic: optimize fmax(ffma(a, b, c), 0.0) to fsat
Foz-DB Navi21:
Totals from 2621 (3.28% of 79789) affected shaders:
MaxWaves: 55744 -> 55736 (-0.01%)
Instrs: 2840180 -> 2832647 (-0.27%); split: -0.27%, +0.00%
CodeSize: 15497364 -> 15464692 (-0.21%); split: -0.21%, +0.00%
VGPRs: 138448 -> 138456 (+0.01%)
Latency: 22319512 -> 22307018 (-0.06%); split: -0.06%, +0.01%
InvThroughput: 5745108 -> 5729197 (-0.28%); split: -0.28%, +0.00%
Copies: 110279 -> 110268 (-0.01%); split: -0.04%, +0.03%
VALU: 2210578 -> 2203211 (-0.33%); split: -0.33%, +0.00%
SALU: 169014 -> 168841 (-0.10%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
2025-04-22 14:23:04 +00:00
Georg Lehmann
f71fc26393 nir/opt_algebraic: generalize fmax(fadd(a, b), 0.0) to fsat by not requiring fneg
Not a large effect, but it's positive and makes the pattern simpler.

Foz-DB Navi21:
Totals from 1 (0.00% of 79789) affected shaders:
Instrs: 145 -> 138 (-4.83%)
CodeSize: 784 -> 756 (-3.57%)
Latency: 1495 -> 1487 (-0.54%)
InvThroughput: 210 -> 196 (-6.67%)
VALU: 103 -> 96 (-6.80%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125>
2025-04-22 14:23:04 +00:00
Alyssa Rosenzweig
1050c69833 libagx: drop libagx_sub_sat
should optimize in nir if needed.

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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
bfc18b6fb1 libagx: drop libagx_popcount
use the common

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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
9c4660d1a6 libagx: use #pragma once in geometry.h
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
63a2831967 agx/nir_lower_tess: drop dead todo
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
41960652e1 agx/nir_lower_tess: drop pointless helpers
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
2a065fc446 agx/nir_lower_gs: use common nir_verts_in_output_prim
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
ea209c98fc agx/nir_lower_gs: drop silly fwd decl
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
ba9f86df51 agx/nir_lower_gs: privatize lower_output_to_var_state
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
d42a92fd93 agx/nir_lower_gs: clean up more state->info
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
470f226ed8 agx/nir_lower_gs: remove silly comment
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
1017095c5a agx/nir_lower_gs: clean up state/info duplication
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
753e3ba55b asahi,hk: use indirect-local dispatches for GS
this gets us good workgroup sizes even for indirect draws with GS.

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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
70c805d863 hk: bump wg sizes for geometry shader
match GL driver, should help perf.

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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
164fc8a158 agx/nir_lower_gs: clean comment
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
b9b6828fda agx/nir_lower_gs: optimize static topologies
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
3da8939197 libagx: factor out _libagx_end_primitive
so we can use from the cpu.

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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
d2cc7f38d3 asahi: optimize out empty dispatches
this occurs with GS lowering.

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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
b916c38c76 hk: optimize out empty dispatches
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
f6ee36a437 agx: add agx_is_shader_empty helper
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/34638>
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
f1aeb46a34 nir: factor out nir_verts_in_output_prim helper
very useful for geometry shader lowering code.

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/34638>
2025-04-22 12:47:54 +00:00
Vignesh Raman
6c33b1e8c1 ci: replace s3_upload wrapper with ci-fairy s3cp
Now that ci-fairy s3cp works, replace the s3_upload curl wrapper with
ci-fairy s3cp command.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34550>
2025-04-22 11:17:16 +00:00
Vignesh Raman
4b3b3d4c70 ci: use MESA_TEMPLATES_COMMIT for ci-fairy install
Use MESA_TEMPLATES_COMMIT instead of hard-coding the commit hash in
pip install ci-fairy.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34550>
2025-04-22 11:17:16 +00:00
Vignesh Raman
c4aeef02e2 ci: bump ci-templates
This is required for ci-fairy s3cp to work.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34550>
2025-04-22 11:17:16 +00:00
Jayanth Vutukuri
ba64e92641 Add libzstd static library.
From AOSP 15, getting linking error as
"ld.lld: error: undefined symbol: ZSTD_*" during compilation.
libzstd will link as static library to libelf and this libelf
is being included in mesa3d.

https://android-review.googlesource.com/c/platform/external/elfutils/+/2826411
is the patch from AOSP which is causing build issue.

Signed-off-by: Jayanth Vutukuri <Jayanth.Vutukuri@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34522>
2025-04-22 11:08:10 +00:00
Boris Brezillon
de78a75f13 panvk: Set .pushDescriptor=true
We already claim support for VK_KHR_push_descriptor, so we de-facto
support pushDescriptor.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34640>
2025-04-22 09:09:57 +02:00
Boris Brezillon
5b7e5db149 panvk: Advertise support for VK_EXT_vertex_input_dynamic_state
This is already supported, nothing to do here.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34640>
2025-04-22 09:09:48 +02:00
Yinjie Yao
2b5ca87927 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>
2025-04-22 06:14:21 +00:00
Mel Henning
0f65c858ea nak: Add test for lea disasm.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334>
2025-04-21 23:42:55 +00:00
Mel Henning
5f5cb088a9 nak: Disable cbuf textures on blackwell
There are bound texture forms on blackwell, but they don't correspond
directly to the cbuf textures we have on sm70. Switch to only bindless
for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334>
2025-04-21 23:42:55 +00:00
Mel Henning
fd90b072f1 nak: sm100+ texture encodings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334>
2025-04-21 23:42:55 +00:00
Mel Henning
f70b7d10c2 nak: Fix sm90+ atomg/redg encoding
and add a test for ld, st, atom

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334>
2025-04-21 23:42:55 +00:00
Mel Henning
869452aaf0 nak: Remove range parameter from set_atom_type
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334>
2025-04-21 23:42:55 +00:00
Mel Henning
2b82184250 nak: Add nvdisasm_tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334>
2025-04-21 23:42:55 +00:00
Mel Henning
d31172d092 nvk: Remove dead function nvk_meta_init_render
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34644>
2025-04-21 22:23:33 +00:00
Mel Henning
2fc4c98aaf 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>
2025-04-21 22:23:33 +00:00
Mel Henning
52085f2a0e 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>
2025-04-21 22:23:33 +00:00
Lina Versace
1bf8542490 anv: Enable VK_EXT_external_memory_acquire_unmodified
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Change-Id: If0480721f7f1fceec093e4ab7b5c9b712eb62ba1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32295>
2025-04-21 13:55:32 -07:00
Lina Versace
3613b9c4f7 anv: Fix comment about external queue transitions
Not all images with DRM format modifiers use
ANV_IMAGE_MEMORY_BINDING_PRIVATE.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Change-Id: Idc6bae70ec7080f96555a85dcdc0ead915b02935
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32295>
2025-04-21 13:55:27 -07:00
Lina Versace
e87a04c6c1 anv: Assert that only external images have private bindings
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Change-Id: If2f18d88d48f70a58e236080632e72afb94f5e0b
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32295>
2025-04-21 13:55:08 -07:00
Sagar Ghuge
0463e14b94 anv: Enable 64bit memory structure mode for RT
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Kevin Chuang
703f29874b intel/bvh/debug: Adapt instance leaf dumping to support 64-bit RT
Adding a boolean "enable_64b_rt" in anv_accel_struct_header for the
interpret.py to properly decode anv_instance_leaf

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Kevin Chuang
cbc8af4555 intel/bvh: Compile and adapt bvh shaders separately into Xe1/2 and Xe3+
This change separate the encode, header, and copy shader into versions
for Xe1/2 and Xe3+, including adding compile options and handling 64bit
version of instance leaf for Xe3+.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Sagar Ghuge
36433e932b intel/rt: Update BVH instance leaf load for Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Sagar Ghuge
5cd0f4ba2f intel/compiler: Update MemRay data structure to 64-bit
Rework: (Kevin)
- Fix miss_shader_index offset
- Handle hit group index

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Kevin Chuang
7b526de18f intel/compiler/rt: Calculate barycentrics on demand
This commit moves the calculation of tri_bary out of
brw_nir_rt_load_mem_hit_from_addr(), and only do the calculation on
demand, since unorm_float_convert can be expensive. We do this for both
Xe1/2 and Xe3+ for consistency.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
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/33047>
2025-04-21 20:10:45 +00:00
Sagar Ghuge
afc23dffa4 intel/compiler: Update MemHit data structure to 64-bit version
Rework (Kevin):
- Fix inst leaf ptr
- Handle 24bit unorm barycentric coord

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Kevin Chuang
40fb95d51a intel/compiler: Use 24bits for hit_kind on Xe3+
For Xe3+, the upper 8 bits of the second dword of a potential hit is
used to store hitGroupIndex0, which is stuffed by the HW. This
hitGroupIndex0 will later be used by the HW again to reconstruct the
whole hitGroupIndex when driver issues a TRACE_RAY_COMMIT.

We were corrupting this hitGroupIndex0 at the driver by setting the
whole dword to hit_kind, which will cause the HW to read a wrong
hitGroupIndex and therefore invoke a wrong closest hit shader. The
behavior can be seen in
dEQP-VK.ray_tracing_pipeline.pipeline_no_null_shaders_flag.gpu.boxes.\*
and dEQP-VK.ray_tracing_pipeline.pipeline_library.configurations.\*

This commit changes the driver to only use lower 24bits to store the
hit_kind, and leave the upper 8bits as it.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
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/33047>
2025-04-21 20:10:45 +00:00
Sagar Ghuge
64fd66407b intel/compiler: Pass around intel_device_info parameter in helper
This will help us to handle code path separately for Xe3+ for updated
64bit memory data structure for RT.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Sagar Ghuge
6deb1950a4 anv: Update RT dispatch globals to use 64bit data structure
Rework (Kevin)
- Fix Hit/Miss/Resume shader group table value

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Sagar Ghuge
fcd5fe4a75 intel/genxml/xe3: Update 3STATE_BTD field
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33047>
2025-04-21 20:10:45 +00:00
Mary Guillemard
92afeb37bf 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>
2025-04-21 19:55:59 +02:00
Eric Engestrom
c643f62633 ci: bump to fedora 42
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34626>
2025-04-21 16:05:11 +00:00
Eric Engestrom
2bcb55f3f6 aco: help clang 20 do some additions and subtractions
clang 20 complains:

    ../src/amd/compiler/aco_assembler.cpp:837:28: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
      837 |       vaddr[num_vaddr + i] = reg(ctx, instr->operands.back(), 8) + i + 1;
          |       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/amd/compiler/aco_assembler.cpp:832:12: note: at offset 5 into destination object ‘vaddr’ of size 5
      832 |    uint8_t vaddr[5] = {0, 0, 0, 0, 0};
          |            ^~~~~
    ../src/amd/compiler/aco_assembler.cpp:837:28: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
      837 |       vaddr[num_vaddr + i] = reg(ctx, instr->operands.back(), 8) + i + 1;
          |       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/amd/compiler/aco_assembler.cpp:832:12: note: at offset 6 into destination object ‘vaddr’ of size 5
      832 |    uint8_t vaddr[5] = {0, 0, 0, 0, 0};
          |            ^~~~~
    ../src/amd/compiler/aco_assembler.cpp:837:28: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
      837 |       vaddr[num_vaddr + i] = reg(ctx, instr->operands.back(), 8) + i + 1;
          |       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/amd/compiler/aco_assembler.cpp:832:12: note: at offset 7 into destination object ‘vaddr’ of size 5
      832 |    uint8_t vaddr[5] = {0, 0, 0, 0, 0};
          |            ^~~~~

But `i < MIN2(instr->operands.back().size() - 1, 5 - num_vaddr)` means `i` is
at most `5 - num_vaddr - 1`, which means `vaddr[num_vaddr + i]` =>
`vaddr[num_vaddr + 5 - num_vaddr - 1]` => `vaddr[5 - 1]` => `vaddr[4]` which
is within the valid indices.

For some reason, using signed `int` instead allows clang to figure this
out, so let's do that since we don't need the extra range.

While at it, use ARRAY_SIZE(vaddr) instead of hard-coding the same `5`
in several places.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34625>
2025-04-21 15:16:02 +00:00
Eric Engestrom
b59b53e824 ci: uprev vkd3d-proton
078f07f588...7eef0a64e3

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34356>
2025-04-21 11:50:57 +00:00
Eric Engestrom
55199d988a turnip/ci: drop skip of test_vrs_depth_write_dxbc as it no longer hangs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34356>
2025-04-21 11:50:57 +00:00
Eric Engestrom
fec01a11d4 ci/vkd3d: drop unused 32-bit build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34356>
2025-04-21 11:50:57 +00:00
David Rosca
5ccf28ce1b radeonsi/uvd_enc: Move all code to radeon_uvd_enc.c
Also get rid of function pointers.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34450>
2025-04-21 10:43:04 +00:00
David Rosca
d9f214001b radeonsi/vce: Move all code to radeon_vce.c
Also get rid of function pointers and remove dump_feedback.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34450>
2025-04-21 10:43:03 +00:00
David Rosca
b0b52d4922 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>
2025-04-21 10:00:29 +00:00
Job Noorman
bde3ab4cd3 ir3/isa: add nop encoding for bary.f/flat.b
We already use it in legalize but the disassembler didn't display it
yet.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34618>
2025-04-21 08:20:49 +00:00
Faith Ekstrand
cd953a7dfa nak/sm20: Use the immediates instead of rZ in OpShfl
For some reason, shfl doesn't seem to like rZ.  I have no idea why but

    shfl.up pt, r5, r5, r3, 0x0

works fine but

    shfl.up pt, r5, r5, r3, rz

does not.  Fortunately, this is pretty easy to handle in the generator
by just using `as_u32()` instead of the AluSrc hack I did before.

Fixes: 608eef01d6 ("nak/sm20: Add subgroup ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34624>
2025-04-20 13:43:24 -05:00
Faith Ekstrand
0b8359e159 nak/sm20: Fix legalization of float source types
Fixes: 142fb563c4 ("nak/sm20: Improve folding of ffma and dfma")
Fixes: a3330f1d46 ("nak/sm20: Add float ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34622>
2025-04-20 09:45:43 -05:00
Faith Ekstrand
a2caf95c50 nak: Handle OpFRnd in is_fp64()
Fixes: b27fc463da ("nak: Record and set DOES_FP64 in the SPH")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34622>
2025-04-20 09:45:43 -05:00
Marek Olšák
4a51089f30 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>
2025-04-19 22:55:00 -04:00
Marek Olšák
2948f7ce96 ac/gpu_info: rename tess ring variables, fold double_offchip_wg
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
d2e016c37d ac/nir: don't store tess levels for TES in TCS if no_varying is set
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
be8977811b ac/nir: remove shader_info parameter from ac_nir_compute_tess_wg_info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
6d9e708642 ac/gpu_info: reduce the tess offchip ring size and compute it proportionately
.. to the CU count. We allocated too much.

This reduces the tess offchip ring size as follows (examples):
- GFX11-12:
  - Navi31, Navi33, and Navi48 get 75% decrease.
  - Navi32 gets 68.75% decrease.
  - Phoenix gets 81.25% decrease.
  - Phoenix2 gets 93.75% decrease.
- GFX10.3:
  - Navi21 and Navi22 get 37.5% decrease.
  - Navi23 and Navi24 get 50% decrease.
  - Rembrandt gets 62.5% decrease.
  - VanGogh gets 75% decrease.
  - Raphael gets 93.75% decrease.
- GFX8-9:
  - Vega10 gets 0% decrease.
  - Vega20 gets 49.6% decrease.
  - Raven gets 65.3% decrease.
  - Raven2 gets 93.7% decrease.
  - Stoney gets 81% decrease.

No difference in performance was measured.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
9333c0a1ed ac/gpu_info: compute the tess factor ring size proportionately to the CU count
No change in the size on GPUs with 16 CUs per SE such as Navi31 and Navi48.
Navi21 and Navi32 get 25% increase. (20 CUs per SE)

APUs get a significant decrease. For example:
- Phoenix gets 25% decrease
- Vangogh gets 50% decrease
- Phoenix2 gets 75% decrease
- Raphael and Stoney get 87.5% decrease

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
5fb2de9454 ac/nir: don't include TCS offchip size in LDS_SIZE
This drastically reduces LDS usage for TCS.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
b8f2fb81f6 ac/gpu_info: print tessellation ring info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
b8d15fee3d ac: minor cleanup of ac_compute_num_tess_patches
No change in behavior.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
a905a17f39 ac: use HS offchip wg size from radeon_info in ac_compute_num_tess_patches
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
d82eda72a1 ac/gpu_info: move HS info into radeon_info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
ea294349bd radv: move the tess factor ring after the tess offchip ring
to match radeonsi

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Marek Olšák
c057d9105f ac/gpu_info: add total_tess_ring_size
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Marek Olšák
97119d980c ac/gpu_info: clean up ac_get_hs_info, use standard terms like workgroup
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Pierre-Eric Pelloux-Prayer
ac6351fd23 radeonsi/tests: use proper skip file
gbm-skips.txt has been renamed all-skips.txt in f9564e1754
("ci/piglit: Consolidate identical skip lists for X11 and gbm")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Janne Grunau
3d3ca9b65e 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>
2025-04-19 21:02:17 +00:00
Yiwei Zhang
2a4675ee9f 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>
2025-04-19 21:02:17 +00:00
Janne Grunau
39e4fd98ce 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>
2025-04-19 21:02:17 +00:00
Faith Ekstrand
7d3a99a46c nak/sm20: Use the correct index field for OpS2R
It's 10 bits, not 6.

Fixes: 078ffb860b ("nak/sm20: Add initial SM20 encoding")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
2025-04-19 14:58:35 -05:00
Lorenzo Rossi
4d8d6a28c8 nak: Use s2r for SV_CLOCK on Kepler
cs2r is new starting with Maxwell.  Prior to that we need to use s2r
which still works just fine, it's just slower.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
2025-04-19 14:58:35 -05:00
Faith Ekstrand
142fb563c4 nak/sm20: Improve folding of ffma and dfma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
2025-04-19 11:06:19 -05:00
David Heidelberg
9855467ed0 docs: Rename distro to distribution
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32880>
2025-04-19 15:52:17 +02:00
David Heidelberg
5251c82404 docs: Drop distro unmaintained and deprecated file.
Pretty much useless.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32880>
2025-04-19 15:52:12 +02:00
Sushma Venkatesh Reddy
4084527876 intel/compiler: Always run opt_algebraic after descriptor_lowering
This change ensures that `brw_opt_algebraic` is always executed after
`brw_lower_send_descriptors` in `brw_opt.cpp`. By doing so, redundant
logical operations are optimized, resulting in cleaner and more
compact assembly output.

fossil-db results on LNL:
- Totals:
  - Instructions: 215857290 -> 215857028 (-0.00%)
  - Cycle count: 32008929636 -> 32008935384 (+0.00%); split: -0.00%, +0.00%
  - Max live registers: 66940643 -> 66940557 (-0.00%)

- Affected shaders (104 out of 713963):
  - Instructions: 31090 -> 30828 (-0.84%)
  - Cycle count: 5955908 -> 5961656 (+0.10%); split: -0.16%, +0.26%
  - Max live registers: 10888 -> 10802 (-0.79%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34615>
2025-04-19 07:05:54 +00:00
Faith Ekstrand
c0f56fc64c nvk: Return an error for Kepler storage images instead of asserting
This lets us fail without restarting dEQP, making CTS runs faster.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
f6b9d13a15 nak/sm20: Implement OpBar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
8401a60840 nak/sm20: Add double ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
608eef01d6 nak/sm20: Add subgroup ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
5a140e7c3e nak/sm20: Add more memory ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Arunpravin Paneer Selvam
84f18f31ad amdgpu: Add queue id support to the user queue wait IOCTL
Add queue id support to the user queue wait IOCTL
drm_amdgpu_userq_wait structure.

This is required to retrieve the wait user queue and maintain
the fence driver references in it so that the user queue in
the same context releases their reference to the fence drivers
at some point before queue destruction.

Otherwise, we would gather those references until we
don't have any more space left and crash.

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34493>
2025-04-18 21:55:53 +00:00
Iván Briano
949d2e507d anv: expose promoted KHR_depth_clamp_zero_one
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34614>
2025-04-18 21:31:37 +00:00
Lorenzo Rossi
ddbf2ec883 nak: Add a new OpFSwz and use it for derivatives on Kepler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
309c48cbb7 nak/sm20: Add texture ops
The current NIR lowering is good for at least SM30+.  When someone
decides to enable Fermi, we'll have to add lowering for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
8d41221158 nak/nir: Use Kepler texture source ordering on SM30
SM30 (i.e. Kepler A) has Fermi's instruction encoding but it uses the
same texture source ordering as Kepler B.  It also supports bindless,
unlike Fermi.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Lorenzo Rossi
b8c7d937fe nak: Add OpTexDepBar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
043995220a nak/sm20: Add control-flow ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
9a62a76c46 nak/sm20: Add shader I/O ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
bdbe6447ed nak/nir: Use Maxwell input interpolation for SM20+
It appears to be the same at least as far back as Kepler A.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
0105a75c53 nak/sm20: Add conversion ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
b27fc463da nak: Record and set DOES_FP64 in the SPH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
d249e7ddac nak: Lower 64-bit shifts in NIR on Kepler A and earlier
SHF is introduced on Kepler B.  Without it, there's nothing we can do
that's more efficient than NIR's lowering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
9fbf63b584 nak/sm20: Add integer ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
a3330f1d46 nak/sm20: Add float ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
078ffb860b nak/sm20: Add initial SM20 encoding
This is enough to get all the hardware unit tests passing and run
dEQP-VK.api.smoke.triangle.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Alyssa Rosenzweig
84505c5d99 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>
2025-04-18 18:34:55 +00:00
Alyssa Rosenzweig
b756e7da65 agx: delete more inots
noticed in dEQP-GLES31.functional.geometry_shading.input.basic_primitive.triangles

total instrs in shared programs: 2852257 -> 2850958 (-0.05%)
instrs in affected programs: 291488 -> 290189 (-0.45%)

total alu in shared programs: 2335534 -> 2334236 (-0.06%)
alu in affected programs: 236924 -> 235626 (-0.55%)

total fscib in shared programs: 2333895 -> 2332597 (-0.06%)
fscib in affected programs: 236924 -> 235626 (-0.55%)

total code size in shared programs: 20529508 -> 20520338 (-0.04%)
code size in affected programs: 2074254 -> 2065084 (-0.44%)

total gprs in shared programs: 901327 -> 901307 (<.01%)
gprs in affected programs: 756 -> 736 (-2.65%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612>
2025-04-18 18:34:55 +00:00
Alyssa Rosenzweig
e541ffcbe8 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>
2025-04-18 18:34:55 +00:00
Daniel Lang
21b12b540f etnaviv: hwdb: update gc_feature_database from NXP
Updates the existing gc_feature_database.h file with changes from
https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/drivers/mxc/gpu-viv/hal/kernel/inc/gc_feature_database.h

git commit: 1bb08951917684136bf0c61ce7391902b2d6518b

Removed fields:
- NN_ZDP18
- NN_TP_SYSTEM_FIX
- DPP_SUPPORT_REF_OUTPUT_CROPING
- RGB_TO_RAW

Renamed fields:
- SHADER_TRIGGER_NN -> TC_SHADER_TRIGGER_NN

Signed-off-by: Daniel Lang <dalang@gmx.at>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34608>
2025-04-18 19:07:52 +02:00
Daniel Lang
d7c957c474 etnaviv: hwdb: update gc_feature_database from ST
Updates the existing gc_feature_database.h file with changes from
https://github.com/STMicroelectronics/gcnano-binaries/blob/gcnano-6.4.19-binaries/gcnano-driver-stm32mp/hal/kernel/inc/gc_feature_database.h

git commit: 359d5007ef19575f6b8ca3071cf90d3848778ae7

Removed fields:
- NN_TP_SYSTEM_FIX
- NN_ZDP18
- NN_FP8

New entry for CNANOULTRA31_VIP2 (GC8000 rev 6205) with EcoID set to 1.

Signed-off-by: Daniel Lang <dalang@gmx.at>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34608>
2025-04-18 19:07:20 +02:00
Job Noorman
e7c6037d12 ir3: use opt_shrink_vectors
This is useful to remove unused components from IO loads. This is not
only helpful for reducing the size of memory loads, but also for reducing
register pressure (as we need smaller vector registers).

Totals from 55567 (33.76% of 164575) affected shaders:
MaxWaves: 665780 -> 666690 (+0.14%); split: +0.15%, -0.01%
Instrs: 30850106 -> 30825516 (-0.08%); split: -0.33%, +0.25%
CodeSize: 62502952 -> 62336580 (-0.27%); split: -0.42%, +0.15%
NOPs: 5468972 -> 5463654 (-0.10%); split: -1.39%, +1.30%
MOVs: 1078607 -> 1060627 (-1.67%); split: -3.48%, +1.81%
Full: 807907 -> 805134 (-0.34%); split: -0.49%, +0.15%
(ss): 755846 -> 747963 (-1.04%); split: -2.51%, +1.46%
(sy): 367032 -> 363947 (-0.84%); split: -1.88%, +1.04%
(ss)-stall: 2907874 -> 2900183 (-0.26%); split: -1.97%, +1.71%
(sy)-stall: 10812082 -> 10599944 (-1.96%); split: -3.43%, +1.47%
STPs: 23062 -> 22980 (-0.36%)
LDPs: 35076 -> 32286 (-7.95%)
Preamble Instrs: 6668422 -> 6612037 (-0.85%); split: -1.35%, +0.51%
Early Preamble: 36055 -> 36169 (+0.32%); split: +0.32%, -0.01%
Cat0: 6015654 -> 6009409 (-0.10%); split: -1.29%, +1.18%
Cat1: 1631110 -> 1610537 (-1.26%); split: -2.54%, +1.28%
Cat2: 11783599 -> 11783634 (+0.00%); split: -0.02%, +0.02%
Cat3: 8198147 -> 8198526 (+0.00%); split: -0.00%, +0.01%
Cat5: 968517 -> 967899 (-0.06%); split: -0.06%, +0.00%
Cat6: 349200 -> 351795 (+0.74%); split: -0.01%, +0.75%
Cat7: 1009072 -> 1008909 (-0.02%); split: -0.58%, +0.56%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34600>
2025-04-18 15:56:02 +00:00
Job Noorman
f269c7b3b5 nir/opt_shrink_vectors: enable for load_ubo_vec4
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34600>
2025-04-18 15:56:02 +00:00
Samuel Pitoiset
792c30dd32 radv/meta: remove redundant parameter to blit_surf_for_image_level_layer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Samuel Pitoiset
a3f2c5f05e radv/meta: remove unnecessary radv_meta_blit2d_buffer::bs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Samuel Pitoiset
78c2feed00 radv/meta: rename more buffer->memory for fill/copy/update operations
Recently, I renamed most of the helpers for future work but I forgot
few things like meta keys, etc.

This is for consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Samuel Pitoiset
43c8cb1ae2 radv/meta: remove unused functions/prototypes
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Samuel Pitoiset
78f03dcf70 radv/meta: simplify dealing with image layouts for blits/resolves
This doesn't do anything useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Alyssa Rosenzweig
0140b7ba57 agx: remove silly cls argument
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34595>
2025-04-18 13:39:27 +00:00
Alyssa Rosenzweig
b1e86b3eae 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>
2025-04-18 13:39:27 +00:00
Alyssa Rosenzweig
b88fe9b0c5 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>
2025-04-18 13:39:27 +00:00
Alyssa Rosenzweig
7fad96d194 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>
2025-04-18 13:39:27 +00:00
Danylo Piliaiev
cc7aa31b30 ir3,tu,freedreno: Allow more tex coord interpolations for prefetch
FS tex prefetch reads tex coords from r0.x, and it doesn't care
what interpolation they have. Thus we can allow all interpolations
which HLSQ_CONTROL_3_REG/HLSQ_CONTROL_4_REG support. Which would
be: (pixel, centroid, sample) x (nopersp, persp). So all but FLAT
are supported.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34422>
2025-04-18 13:12:03 +00:00
Danylo Piliaiev
c4c7482a90 ir3: Move nir_intrinsic_barycentric_sysval to common ir3
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34422>
2025-04-18 13:12:03 +00:00
Eric Engestrom
33caee7dfe glx: drop dead GL_LIB_NAME define
Fixes: 5b89be3545 ("glx: Don't try to dlopen ourselves")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34602>
2025-04-18 12:14:11 +00:00
Rohan Garg
a5033c54e7 anv: use the common function for detecting a mesh shader stage
Signed-off-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/34604>
2025-04-18 10:08:22 +00:00
Rohan Garg
9b477eea19 intel/compiler: use a immediate when doing the shift
We can pass immediates to SHL and don't need to allocate a separate
register here.

Signed-off-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/34604>
2025-04-18 10:08:22 +00:00
Yogesh Mohan Marimuthu
e63b24bee8 ac,radeonsi: clear_state is not supported in user queue
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34370>
2025-04-18 07:45:33 +00:00
Yogesh Mohan Marimuthu
61fd80a42e ac,winsys/amdgpu: get userq_ip_mask supported from kernel info ioctl
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34370>
2025-04-18 07:45:33 +00:00
Yogesh Mohan Marimuthu
b9054115d4 amd: update amdgpu_drm.h for userq info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34370>
2025-04-18 07:45:33 +00:00
Adam Jackson
5b89be3545 glx: Don't try to dlopen ourselves
The intention here, long ago, was to ensure that any symbols the DRI
driver needed from libGL were available. We don't have this problem
anymore, libgallium does not import any symbols from the GLX frontend
(or any other one for that matter).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30417>
2025-04-18 07:14:56 +00:00
Adam Jackson
9a610c5ab9 loader: Use RTLD_LOCAL not RTLD_GLOBAL
The gallium driver does not expose any symbols that anybody else wants
to see. But if we load it with RTLD_GLOBAL that's what happens, along
with all the symbols in the libraries it depends on.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30417>
2025-04-18 07:14:56 +00:00
Samuel Pitoiset
bc811a602e radeonsi: fix configuring compute scratch
Missed the two different variables for graphics vs compute.

Fixes: e433a57650 ("ac,radeonsi: rework computing scratch wavesize and tmpring register")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34586>
2025-04-18 06:50:16 +00:00
Valentine Burley
6b1f30f359 ci: Fix Android container structured tagging checks
Structured tagging is used to verify the checksum of the component we're
building. In Android's case, this is currently only used for ANGLE.

Move the build-time check to the debian/x86_64_test-android container,
where ANGLE is built.

Previously, having this definition in .android-variables meant that every
Android test job inherited the ANGLE_TAG variable, making it impossible to
use Mesa as the GLES driver in CI.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34572>
2025-04-18 06:13:13 +00:00
Valentine Burley
b2490e5816 ci: Uncollapse yaml-toml-shell-py-test log sections
This job checks for errors in various scripts and files, so show its
output in the logs for easier debugging.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34572>
2025-04-18 06:13:11 +00:00
Eric Engestrom
519e329cd6 ci: bump apitrace
More dlopen fixes for !30417.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34599>
2025-04-18 05:24:38 +00:00
Juston Li
762b749f9f driconf: enable custom_border_colors_without_format for ANGLE-on-anv
custom_border_colors_without_format was disabled on android for anv to
add support for VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/12511#note_2749432

ANGLE's vulkan backend needs custom_border_colors_without_format for
EXT_texture_border_clamp which is required for
GL_ANDROID_extension_pack_es31a so enable it when run under ANGLE which
doesn't utilize VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT.

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/34490>
2025-04-17 22:14:57 +00:00
GKraats
995dc61bf5 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>
2025-04-17 21:37:58 +00:00
Konstantin Seurer
76031ba53d radv: Optimize the gfx12 encode shader
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
97f6287827 radv: Use the BVH8 format on GFX12
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
95e7343a7d radv/bvh: Add helpers for encoding
The build and update paths can use the same code.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
3af19f336c radv/bvh: Document GFX12 BVH encoding
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
2942e3affb radv/rra: Set rra_accel_struct_header::rtip_level
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
fa99eeb2b4 radv/rra: Move gfx10_3 specific code to a new file
gfx12 needs completely different code and having them in different files
is cleaner.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
9d157173b2 radv: Refactor create_bvh_descriptor
Make it a bit more extendable since GFX12 introduced more fields.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
978e9b670e aco,nir: Add support for new GFX12 ray tracing instructions
Adds image_bvh_dual_intersect_ray and image_bvh8_intersect_ray which can
handle the new BVH format. Both instructions write up to 10 VGPRs so
they need to use a vec16 definition in nir.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Natalie Vock
ee0f784858 aco/ra: Don't consider precolored ops/defs in get_reg_impl
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Natalie Vock
b9e506afd4 aco: Add support for multiple definitions in emit_mimg
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Natalie Vock
f309d76aab aco: Add support for multiple ops fixed to defs
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
fe739a2da2 ac: Add rt_version
rt_version describes which generation of RT capabilities a chip has.
This matches what PAL does.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
c33e598f39 vulkan: Add vk_ir_header::dst_leaf_node_offset
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
2dee1117b7 vulkan: Add a vk_device parameter to get_encode_key
Useful for selecting different encoding options based on hardware
generation.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Konstantin Seurer
0cc9443e9b util: Add BITSET_EXTRACT
Extracts a <=32 bit range from a bitset.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34273>
2025-04-17 20:20:40 +00:00
Eric Engestrom
c37a468a8a 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>
2025-04-17 20:13:41 +00:00
Jesse Natalie
37e6a8b57f d3d12: Minor fixes to residency algorithm when eviction is needed
Always reset batch_count and batch_memory_size. Proceed to eviction
only if we stopped before filling up the batch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34562>
2025-04-17 19:51:15 +00:00
Jesse Natalie
565980f3c0 d3d12: Add tc memory throttles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34562>
2025-04-17 19:51:15 +00:00
Caio Oliveira
43e521f7a5 hk: Don't expect garbage on shared_size
Talking to Alyssa this looks like an artifact of old ways that the
shader was being produced, so get rid of that zeroing.  Add an
assert as a canary for any problems we might be missing.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34139>
2025-04-17 19:13:18 +00:00
Caio Oliveira
33295b2249 spirv, nir: Allow non-Aliased workgroup memory blocks
Allocate space for the aliased region first, then allocate the
non-Aliased blocks in sequence after that.

SPV_KHR_workgroup_memory_explicit_layout extension added support for
having Blocks of workgroup (shared) memory, which include layout
decoration.  For that extension all such blocks must be decorated with
Aliased.

SPV_KHR_untyped_pointers extension lifts that requirement, allowing
blocks that don't alias in workgroup memory.  They are still explicitly
laid out.

The motivation is that untyped pointers provide a different
mechanism to obtain the same effect as the Aliased blocks.  Instead of
having two Aliased variables with different types, have a single
variable and use an untyped pointer with a different type to access it.

This patch is a preparation for supporting untyped pointers.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34139>
2025-04-17 19:13:18 +00:00
Caio Oliveira
fd0a7efb5a spirv, nir: Delay calculation of shared_size when using explicit layout
Move the calculation to nir_lower_vars_to_explicit_types().  This
consolidates the check of shader_info::shared_memory_explicit_layout
in a single place instead of in all drivers.

This is motivated by SPV_KHR_untyped_pointers.  Before that extension
we had essentially two modes for shared memory variables

- No layout decorations in the SPIR-V, and both internal layout and
  driver location was _given by the driver_.

- Explicitly laid out, i.e. they are blocks, and decorated with Aliased.
  Because they all alias, we could assign them driver location directly
  to the start of the shared memory.

With the untyped pointers extension, there's a third option, to be added
by a later commit

- Explicitly laid out, i.e. they are blocks, and NOT decorated
  with Aliased.  Driver location is _given by the driver_.  Blocks
  with and without Aliased can be mixed.

The driver location of multiple blocks that don't alias depend on
alignment that is driver-specific, which we can more easily do from
the nir_lower_vars_to_explicit_types() that already has access to
a function to obtain such value.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> (hk)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> (v3dv)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (anv/hasvk)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> (panvk)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (radv)
Reviewed-by: Rob Clark <robdclark@gmail.com> (tu)
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34139>
2025-04-17 19:13:17 +00:00
Eric Engestrom
adfe29cb46 ci: give high priority to post-merge jobs as well
Right now, `deploy-docs` (updating the docs.mesa3d.org website) is the
only job that can exist in that pipeline (along with `alpine/x86_64_build`,
but that job is always a no-op).

Right now this job can get stuck for a long time waiting for a runner,
but it's very short, and we kinda want the website to be updated quickly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34554>
2025-04-17 18:39:34 +00:00
José Roberto de Souza
a96e280dfe 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>
2025-04-17 18:11:44 +00:00
Alyssa Rosenzweig
8b068ef6c1 hk: handle HIC with twiddled
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
88bdc27342 asahi: let booleans be your guide
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
551355d4e5 asahi,hk: factor out zls_control pack helper
makes both drivers a lot more readable, but especially gl

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
3a560dd32b asahi: identify ZLS compress load/store bits
obvious in retrospect!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
9757185153 hk: plumb ZLS tiling
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
454a90eaa8 asahi: plumb ZLS tiling bits
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
715f6b3b33 asahi: identify ZLS tiling bits
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
0dca602aff asahi: generalize compression check
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
72f3dcc8da asahi: generalize tiling checks
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
c4130af883 asahi: extend tile width/height in texture desc
we need to support up to 16384x16384 for atomics on twiddled images.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
f21dc4d0cf asahi: pack sample count in s/w texture descriptor
not needed for non-msaa case, and this lets us free up 2 bits.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:06 +00:00
Alyssa Rosenzweig
8f57b5187f ail: support twiddled
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:05 +00:00
Alyssa Rosenzweig
6fdad684da ail: generalize ail_space_bits
for full twiddling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:05 +00:00
Alyssa Rosenzweig
e5006dc6ae hk: fill sparse.write with nonzero values
fuzz for bugs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:05 +00:00
Alyssa Rosenzweig
ffac153bcf hk: reindent/unscope
no functional change, split because the diff is all spacing changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:05 +00:00
Alyssa Rosenzweig
86d3489c35 hk: drop FS null checks
these are all dead now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
2025-04-17 17:54:05 +00:00
Alyssa Rosenzweig
3ab8ce8579 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>
2025-04-17 17:54:05 +00:00
Alyssa Rosenzweig
d959557669 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>
2025-04-17 17:54:05 +00:00
Rhys Perry
427479c040 aco: remove va_vdst/vm_vsrc/sa_sdst variables
Use the "wait" variable instead.

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/34529>
2025-04-17 17:28:22 +00:00
Rhys Perry
3d6fa6996c aco: init vm_vsrc/sa_sdst from depctr_wait
fossil-db (navi31):
Totals from 5805 (7.31% of 79377) affected shaders:
Instrs: 14229621 -> 14207115 (-0.16%); split: -0.16%, +0.00%
CodeSize: 75358724 -> 75268624 (-0.12%); split: -0.12%, +0.00%
Latency: 133637034 -> 133624262 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 22067819 -> 22066213 (-0.01%); split: -0.01%, +0.00%

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/34529>
2025-04-17 17:28:22 +00:00
Rhys Perry
ce2be5ab8e 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>
2025-04-17 17:28:22 +00:00
Mel Henning
eee3c8eab8 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>
2025-04-17 17:10:40 +00:00
Mel Henning
de1ed48325 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>
2025-04-17 17:10:40 +00:00
Eric Engestrom
8744c98fa9 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>
2025-04-17 14:43:30 +00:00
Eric Engestrom
b9472db496 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>
2025-04-17 14:43:30 +00:00
Rohan Garg
cbc1ec4f73 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>
2025-04-17 14:24:11 +00:00
Rhys Perry
4fcf2eb1d7 aco/gfx12: VOPD src0/1 are src bank compatible if they are the same vgpr
fossil-db (gfx1201):
Totals from 66518 (83.80% of 79377) affected shaders:
Instrs: 36939667 -> 36656685 (-0.77%); split: -0.79%, +0.02%
CodeSize: 220575208 -> 220201764 (-0.17%); split: -0.21%, +0.04%
Latency: 258919732 -> 258137974 (-0.30%); split: -0.35%, +0.05%
InvThroughput: 49911351 -> 49643836 (-0.54%); split: -0.55%, +0.02%
VClause: 788661 -> 788430 (-0.03%); split: -0.04%, +0.01%
SClause: 1176416 -> 1176263 (-0.01%); split: -0.02%, +0.01%
VALU: 18014058 -> 17818119 (-1.09%); split: -1.10%, +0.01%
VOPD: 4926983 -> 5122922 (+3.98%); split: +4.01%, -0.04%

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/34246>
2025-04-17 14:00:29 +00:00
Rhys Perry
3446f2059d aco/gfx12: assume VOPD with two v_mov_b32 are src bank compatible
fossil-db (gfx1201):
Totals from 10576 (13.32% of 79377) affected shaders:
(no stats changed)

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/34246>
2025-04-17 14:00:29 +00:00
Rhys Perry
1bd5ae7b14 aco: refactor can_use_vopd so that it returns flags
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/34246>
2025-04-17 14:00:29 +00:00
Rhys Perry
d4b418bbb9 aco: add are_src_banks_compatible helper for VOPD creation
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/34246>
2025-04-17 14:00:29 +00:00
Rhys Perry
4b0da5b51f aco: rename is_opy_only to can_be_opx
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/34246>
2025-04-17 14:00:29 +00:00
Rhys Perry
408fa33c09 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>
2025-04-17 14:00:29 +00:00
Tomeu Vizoso
a9fde960e6 etnaviv/ml: Support FullyConnected with signed weights
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34545>
2025-04-17 13:30:21 +00:00
Tomeu Vizoso
9615d44d6e teflon: Skip unsupported FullyConvolution operations
Drivers don't support these combinations yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34545>
2025-04-17 13:30:21 +00:00
Tomeu Vizoso
9409595c32 etnaviv/ml: All tensors are now 4D, adapt to it
After "teflon: Set unused dimensions to 1", all tensors have 4
dimensions, so change the dim index accordingly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
c728e73d65 etnaviv/ml: Track memory layout of tensors
Improve the decision on when to add transpose and detranspose jobs by
tracking the memory layout that a tensor is in.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
c4a5f8d665 teflon: Set unused dimensions to 1
So drivers don't need to superfluously watch out for zeroes when
multiplying among dimensions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
23ae1c3bff teflon: Actually accept concatenations with different number of channels
It is supported now by Etnaviv.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
bde0e69bcd etnaviv/ml: Consolidate transpose/detranspose
To simplify things, state that all operations as implemented expect
their input tensors to be in the channel order that the hardware
supports, and that the output tensors will be in that same order as
well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
e06265ed3a teflon: Only mark integers as signed
As these are the types that need special handling, eg. not
kTfLiteFloat32.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Samuel Pitoiset
209a0ede98 radv: add a function to emit meshlet registers on GFX11+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
836757bec3 radv: tidy up radv_emit_ps_epilog_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
dca35b7226 radv: tidy up radv_emit_geometry_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
d999afeb7a radv: tidy up radv_emit_vertex_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
85fdf69027 radv: simplify combining TES/VS+GS config registers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
0dd9833348 radv: remove redundant assertion when emitting PS epilog state
It's already checked by radv_emit_32bit_pointer().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
a230d2daa3 radv: use radeon_set_sh_reg() for only 1 DWORD
It's just shorter to write.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Antonio Ospite
4dabc7776f ci/android: show how to add more Android CTS test cases
Show how to add more Android CTS tests cases, using --include-filters

Only CtsNativeHardwareTestCases and CtsSkQPTestCases are actually
enabled for now, because the android-angle-lavapipe-cts job is part of
the pre-merge pipeline and these modules would not be too expensive to
run.

The container size increases by about 60Mb and the test time from 4m to
7 min on a local system, so it's an acceptable compromise to show how
multiple modules can be tested.

A similar mechanism will be used to add CtsDeqpTestCases tests in the
future, probably in nightly or weekly jobs, because that would require
more space in the containers and a lot more time to run the tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34479>
2025-04-17 11:50:07 +00:00
Antonio Ospite
fbc715200e ci/android: strip tailing spaces in Android CTS expectation files
Trailing spaces in include and exclude filters can confuse cts-tradefed,
so make sure to strip those from the lines in Android CTS expectation
files, since those are used to build the filter arguments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34479>
2025-04-17 11:50:07 +00:00
Antonio Ospite
8f41667b37 ci/android: specify EXCLUDE_FILTERS after INCLUDE_FILTERS when launching Android CTS
Specify EXCLUDE_FILTERS after INCLUDE_FILTERS when launching Android
CTS, to make it clearer that exclude filters take the precedence on
include filters.

This change is not strictly necessary, according to the documentation
exclude filters take the precedence anyway, see
https://source.android.com/docs/core/tests/tradefed/testing/through-suite/option-passing#pass_filters_to_the_suite

So this change is added only to document the behavior rather then to
control it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34479>
2025-04-17 11:50:07 +00:00
Antonio Ospite
af96ed09f0 ci/deqp: force overwriting exiting files when compressing with zstd
This does not change the behavior in CI runs where the files are always
created from scratch, but it helps on local invocations when running the
command multiple times on the same rootfs.

It prevents build-deqp.sh to stop at the command line prompt for
questions like:

-----------------------------------------------------------------------
zstd: mustpass/egl-main.txt.zst already exists; overwrite (y/n) ? y
zstd: mustpass/gles2-khr-main.txt.zst already exists; overwrite (y/n) ? y      =>  5%
zstd: mustpass/gles2-main.txt.zst already exists; overwrite (y/n) ? y          =>  6%
-----------------------------------------------------------------------
...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34468>
2025-04-17 11:07:17 +00:00
Antonio Ospite
3e2f43bb13 ci/android: only use custom kernel for venus GPU_MODEs
The venus GPU_MODEs require some patches to the Android 14 kernel to
work, so custom built bzImage and initramfs.img need to be passed to
launch_cvd.

However specifying a custom kernel triggers some image repacking which
is quite expensive in terms of I/O; so, since the custom kernel is only
needed for the venus GPU_MODEs, avoid specifying it for the other modes
to speed up launching cuttlefish in those cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34468>
2025-04-17 11:07:17 +00:00
Antonio Ospite
725acc0b74 meson: bump default value of platform-sdk-version to Android 14
Bump default value of platform-sdk-version to 34 which is Android 14.

This is the API version recommended by Google for new app development
since 31 August 2024, but it does not hurt to strongly suggest it for
mesa as well.

Developers who need to build for older Android SDK versions can always
pass `platform-sdk-version` when configuring the build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34468>
2025-04-17 11:07:17 +00:00
Samuel Pitoiset
11e8a96495 radv: use common scratch tmpring size programming
No logical changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Samuel Pitoiset
710d7ea8b8 radv: compute the optimal scratch wavesize
This might increase the scratch BO sizes but it's supposed to be
faster because scratch waves would be distributed among memory channels.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Samuel Pitoiset
e433a57650 ac,radeonsi: rework computing scratch wavesize and tmpring register
To be re-used by RADV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Samuel Pitoiset
d94f8b4460 ac/gpu_info,radv: add scratch_wavesize_granularity info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Icenowy Zheng
82dda21806 zink: Do not use demote on IMG blobs
The implementation of demote in IMG blobs seems to be a piece of hack,
and the current use of it in Zink leads to assertion failure with
information "Uniflex does not support demote and terminate in the same
shader".

Disable usage of demote for IMG blobs.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33051>
2025-04-17 10:14:45 +00:00
Daniel Stone
8d08cde667 ci/piglit: Use structured tagging for Piglit
Structured tagging (cf. mesa/mesa!33421) captures a checksum of the
thing we think we're building, and verifies this through the chain.

When we run container builds, we check that the tag we've captured in
the CI variables matches the calculated checksum, to make sure the
declared tags are consistent and we always have traceability.

When we run tests, we check the tags again between what was declared in
the CI variables and what we're actually running from the test
container. This makes sure that we're always testing what we think we're
testing.

As a side advantage, the rule inheritance we need to make this work
means that we can start doing more optional downloads via overlays,
instead of pulling a whole container full of stuff we might not ever
use.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34539>
2025-04-17 09:22:39 +00:00
Samuel Pitoiset
e616761fb2 radv: re-introduce the compute vs CP DMA heuristic for copy/fill operations
This caused a -5% performance regression in Control because using
compute always eats resources.

This new approach introduces a flag called RADV_COPY_FLAGS_DEVICE_LOCAL
which can be used to indicate if the underlying memory is device local.
This should also help for future work.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12639
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Samuel Pitoiset
5e2508e7c4 radv: simplify radv_fill_xxx() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Samuel Pitoiset
8ba94d8263 radv: add radv_fill_image() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Samuel Pitoiset
0fa43b5bfb radv: use radv_fill_memory() in the accel struct path
It's now possible to remove the NULL BO check.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Tapani Pälli
6d70ec449f 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>
2025-04-17 06:17:53 +00:00
Tapani Pälli
c2a4657862 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>
2025-04-17 06:17:53 +00:00
Tomeu Vizoso
aa73767f5e etnaviv/ml: Support per-channel quantized weights
Dequantize the weights, calculate new quantization values based on the
minimum and maximum values and requantize again.

This causes a loss of accuracy when compared to proper per-axis
quantization as we don't have the original data from training any more.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Philipp Zabel
ce9030740a teflon: Allow per-axis quantization
Allow per-axis quantization in the output channel dimension.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Tomeu Vizoso
7dfcca9007 etnaviv/ml: Fix zero point values for signedness
Take into account the signedness for FullyConnected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Tomeu Vizoso
d88f0b8f3c etnaviv/ml: Reorder dimensions in convolutions
The blob does this, and doesn't seem to just be for performance as I see
some tests being fixed by it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Thomas H.P. Andersen
d55a69e769 nak: make is_fneg_zero detect -rZ
fold_imm starts with this check:
        let SrcRef::Imm32(mut u) = self.src_ref else {
            return *self;
        };

For -rZ we thus return early and the matching in is_fneg_zero does not
find it. This MR adds a match for SrcRef::Zero + SrcMod::FNeg.

This lets copy propagation fold this:

r3  = shfl.bfly r2 0x2 0x1c03
r3  = fswzadd.ftz r3 r2 [sub, sub, subr, subr]
r3  = fadd.ftz -rZ |r3|
r16 = shfl.bfly r2 0x1 0x1c03
r16 = fswzadd.ftz r16 r2 [sub, subr, sub, subr]
r16 = fadd.ftz -rZ |r16|
r3  = fadd.ftz r16 r3

into:

r3  = shfl.bfly r2 0x2 0x1c03
r3  = fswzadd.ftz r3 r2 [sub, sub, subr, subr]
r16 = shfl.bfly r2 0x1 0x1c03
r16 = fswzadd.ftz r16 r2 [sub, subr, sub, subr]
r3  = fadd.ftz |r16| |r3|

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12480
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
2025-04-17 02:22:02 +00:00
Faith Ekstrand
47fc468944 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>
2025-04-17 02:22:02 +00:00
Faith Ekstrand
328112c6bc 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>
2025-04-17 02:22:02 +00:00
Faith Ekstrand
22a30bfa4f 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>
2025-04-17 02:22:02 +00:00
Eric Engestrom
269b09c449 docs: add sha sum for 25.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34564>
2025-04-17 02:22:24 +02:00
Eric Engestrom
71c1acfaf2 docs: add release notes for 25.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34564>
2025-04-17 02:22:24 +02:00
Eric Engestrom
f74a585dbb docs: update calendar for 25.0.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34564>
2025-04-17 02:22:23 +02:00
Caio Oliveira
d5ad798140 spirv, radv, intel: Add NIR intrinsic for cmat conversion
A cooperative matrix conversion operation was represented in NIR by the
cmat_unary_op intrinsic with an nir_alu_op as extra parameter,
that was already lowered to a specific conversion operation
based on the matrix types.

Instead of that, add a new intrinsic `cmat_convert` that is specific
for that conversion.  In addition to the src/dst matrix descriptions
already available, also include the signedness information in the
intrinsic (reuse nir_cmat_signed for that).  This is needed because
different Convert operations define different interpretations for
integers, regardless their original type.

In this patch, both radv and intel were changed to use the same logic
that was previously used to pick the lowered ALU op.

This change will help represent cmat conversions involving BFloat16,
because it avoids having to create new NIR ALU ops for all the
combinations involving BFloat16.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34511>
2025-04-16 23:13:36 +00:00
Valentine Burley
2f02fa5db4 intel/ci: Start using the new 6.14 kernel on JSL
The new 6.14 kernel in gfx-ci linux is now stable on Jasper Lake, so drop
the kernel override from the anv-jsl-vk job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34553>
2025-04-16 22:13:19 +00:00
Valentine Burley
da71656dd9 ci/lava: Merge and deduplicate log sections
Drop the duplicated rootfs preparation sections, and combine the
TEST_SUITE and TEST_DUT_SUITE sections.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34523>
2025-04-16 21:34:35 +00:00
Valentine Burley
70b033d2ad ci/lava: Don't include the timeout in the log sections
Reduces visual clutter in the job logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34523>
2025-04-16 21:34:35 +00:00
Valentine Burley
f7224dd159 ci/lava: Collapse more log sections
These sections were not collapsed, causing the setup sections to clutter
the job logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34523>
2025-04-16 21:34:35 +00:00
Patrick Lerda
60a31156b0 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>
2025-04-16 20:19:14 +00:00
Mike Blumenkrantz
de6efc01c1 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>
2025-04-16 18:26:32 +00:00
Tomeu Vizoso
251d1e2551 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>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
1f5bc6ddbf etnaviv/tests: Add comment on why the SSDLite MobileDet test fails
So we don't waste time debugging it again.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
0213eef3b3 teflon/tests: Dump output buffers to disk
It can be convenient to compare the outputs from the CPU, proprietary
driver and Mesa to check for convergence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
80e09e9b1f teflon/tests: Divide the tolerance level by a constant
A final tolerance of 0.6 seems to be about right for big models with
per-channel quantization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
15a8c49ad5 teflon/tests: Print shorter negative INT8s
As we know that only the last 8 bits are relevant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
554fb8af11 teflon/tests: Take into account signedness when checking the output tensors
Otherwise, it won't be able to apply the tolerance in all cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
b3746305ea teflon/tests: Test all models in /models
It was becoming quite tedious to add models to testing.

This will also make it easier to locally test with non-redistributable
models.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
68200ac961 teflon/tests: Use a single tolerance value
We have improved our accuracy and can use just a tolerance of 2 for all
the tests we currently have.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Jesse Natalie
7ca4e4d34b microsoft/compiler: Force load_output => undef in tess_ctrl main func
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34541>
2025-04-16 16:02:07 +00:00
José Roberto de Souza
ab591dc642 iris: Fix IRIS_HEAP_SYSTEM_MEMORY_CACHED_COHERENT slab parent allocation
It was using the same switch case from IRIS_HEAP_SYSTEM_MEMORY_UNCACHED
allocating both as uncached.

Cc: stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34533>
2025-04-16 15:43:15 +00:00
Alyssa Rosenzweig
9b55451ea7 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>
2025-04-16 15:24:37 +00:00
Eric Engestrom
dbe6c39270 docs: update calendar for 25.1.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34555>
2025-04-16 15:11:40 +00:00
Mike Blumenkrantz
5844dea316 delete clover
there comes a time when a project has to be declared unfit to remain
in the tree

this frontend hasn't seen actual development in about 6 years

if someone has a pressing need to continue development, there's no
blocker to un-deleting it, but unless that happens, there's now a
more featureful, more conformant, more active CL frontend in the tree

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385>
2025-04-16 10:01:44 -04:00
Pierre-Eric Pelloux-Prayer
555821ff93 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>
2025-04-16 13:22:16 +00:00
Eric Engestrom
3f7345a0ce docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34552>
2025-04-16 14:30:26 +02:00
Eric Engestrom
b8968276e6 VERSION: bump to 25.2
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34552>
2025-04-16 14:30:14 +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
4724 changed files with 355960 additions and 311235 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

@@ -42,7 +42,7 @@ jobs:
[binaries]
llvm-config = '/usr/local/opt/llvm/bin/llvm-config'
EOL
$MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dosmesa=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
$MESON_EXEC . build --native-file=native_config -Dmoltenvk-dir=$(brew --prefix molten-vk) -Dbuild-tests=true -Dgallium-drivers=swrast,zink -Dglx=${{ matrix.glx_option }}
- name: Build
run: $MESON_EXEC compile -C build
- name: Test

View File

@@ -30,46 +30,69 @@ workflow:
# do not duplicate pipelines on merge pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
# merge pipeline
# 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
# post-merge pipeline
# Post-merge pipeline
- if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
# Pre-merge pipeline
- if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
# Pre-merge pipeline (because merge pipelines are already caught above)
- if: &is-merge-request $CI_PIPELINE_SOURCE == "merge_request_event"
# Push to a branch on a fork
- if: &is-fork-push $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
# nightly pipeline
- if: &is-push-to-fork $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
# a pipeline running within the upstream project
- if: &is-upstream-pipeline $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO
# an MR pipeline running within the upstream project, usually true for
# those with the Developer role or above
- if: &is-upstream-mr-pipeline $CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "merge_request_event"
# 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"
# Pipeline for direct pushes to the default branch that bypassed the CI
- if: &is-push-to-upstream-default-branch $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-push-to-upstream-staging-branch $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 c6aeb16f86e32525fa630fb99c66c4f3e62fc3cb
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
bash download-git-cache.sh
rm download-git-cache.sh
curl --silent --location --fail --retry-connrefused --retry 3 --retry-delay 10 \
${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash
set +o xtrace
S3_JWT_FILE: /s3_jwt
S3_JWT_FILE_SCRIPT: |-
echo -n '${S3_JWT}' > '${S3_JWT_FILE}' &&
S3_JWT_FILE_SCRIPT= &&
unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
S3_HOST: s3.freedesktop.org
# This bucket is used to fetch ANDROID prebuilts and images
@@ -84,6 +107,8 @@ variables:
S3_TRACIE_RESULTS_BUCKET: mesa-tracie-results
S3_TRACIE_PUBLIC_BUCKET: mesa-tracie-public
S3_TRACIE_PRIVATE_BUCKET: mesa-tracie-private
# Base path used for various artifacts
S3_BASE_PATH: "${S3_HOST}/${S3_KERNEL_BUCKET}"
# per-pipeline artifact storage on MinIO
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
# per-job artifact storage on MinIO
@@ -102,19 +127,27 @@ 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
KERNEL_IMAGE_BASE: "https://$S3_HOST/$S3_KERNEL_BUCKET/$KERNEL_REPO/$KERNEL_TAG"
# Mesa-specific variables that shouldn't be forwarded to DUTs and crosvm
CI_EXCLUDE_ENV_VAR_REGEX: 'SCRIPTS_DIR|RESULTS_DIR'
CI_TRON_JOB_TEMPLATE_PROJECT: &ci-tron-template-project gfx-ci/ci-tron
CI_TRON_JOB_TEMPLATE_COMMIT: &ci-tron-template-commit ddadab0006e43f1365cd30779f565b444a6538ee
CI_TRON_JOB_TEMPLATE_PROJECT_URL: "https://gitlab.freedesktop.org/$CI_TRON_JOB_TEMPLATE_PROJECT"
default:
timeout: 1m # catch any jobs which don't specify a timeout
id_tokens:
S3_JWT:
aud: https://s3.freedesktop.org
before_script:
- |
if [ -z "${KERNEL_IMAGE_BASE:-}" ]; then
export KERNEL_IMAGE_BASE="https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${EXTERNAL_KERNEL_TAG:-$KERNEL_TAG}"
fi
- >
export SCRIPTS_DIR=$(mktemp -d) &&
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
@@ -148,39 +181,41 @@ stages:
- build-only
- code-validation
- amd
- amd-postmerge
- amd-nightly
- intel
- intel-postmerge
- intel-nightly
- nouveau
- nouveau-postmerge
- nouveau-nightly
- arm
- arm-postmerge
- arm-nightly
- broadcom
- broadcom-postmerge
- broadcom-nightly
- freedreno
- freedreno-postmerge
- freedreno-nightly
- etnaviv
- etnaviv-postmerge
- etnaviv-nightly
- software-renderer
- software-renderer-postmerge
- software-renderer-nightly
- layered-backends
- layered-backends-postmerge
- layered-backends-nightly
- performance
- deploy
include:
- project: 'freedesktop/ci-templates'
ref: 16bc29078de5e0a067ff84a1a199a3760d3b3811
file:
- '/templates/ci-fairy.yml'
- project: 'freedesktop/ci-templates'
ref: *ci-templates-commit
file:
- '/templates/alpine.yml'
- '/templates/debian.yml'
- '/templates/fedora.yml'
- '/templates/ci-fairy.yml'
- project: *ci-tron-template-project
ref: *ci-tron-template-commit
file: '/.gitlab-ci/dut.yml'
- local: '.gitlab-ci/image-tags.yml'
- local: '.gitlab-ci/lava/lava-gitlab-ci.yml'
- local: '.gitlab-ci/bare-metal/gitlab-ci.yml'
- local: '.gitlab-ci/ci-tron/gitlab-ci.yml'
- local: '.gitlab-ci/lava/gitlab-ci.yml'
- local: '.gitlab-ci/container/gitlab-ci.yml'
- local: '.gitlab-ci/build/gitlab-ci.yml'
- local: '.gitlab-ci/test/gitlab-ci.yml'
@@ -193,7 +228,7 @@ include:
# Rules applied to every job in the pipeline
.common-rules:
rules:
- if: *is-fork-push
- if: *is-push-to-fork
when: manual
.never-post-merge-rules:
@@ -202,7 +237,59 @@ include:
when: never
.container+build-rules:
# Note: make sure the branches in this list are the same as in
# `.build-only-delayed-rules` below.
.container-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]
# Only rebuild containers in merge pipelines if any tags have been
# changed, else we'll just use the already-built containers
- if: *is-merge-attempt
changes: &image_tags_path
- .gitlab-ci/image-tags.yml
when: on_success
# Skip everything for pre-merge and merge pipelines which don't change
# anything in the build; we only do this for marge-bot and not user
# pipelines in a MR, because we might still need to run it to copy the
# container into the user's namespace.
- if: *is-merge-attempt
when: never
# Any MR pipeline which changes image-tags.yml needs to be able to
# rebuild the containers
- if: *is-merge-request
changes: *image_tags_path
when: manual
# ... if the MR pipeline runs as mesa/mesa and does not need a container
# rebuild, we can skip it
- if: *is-upstream-mr-pipeline
when: never
# ... however for MRs running inside the user namespace, we may need to
# run these jobs to copy the container images from upstream
- if: *is-merge-request
when: manual
# Build everything after someone bypassed the CI
- if: *is-push-to-upstream-default-branch
when: on_success
# Build everything when pushing to staging branches
- if: *is-push-to-upstream-staging-branch
when: on_success
# Scheduled pipelines reuse already-built containers
- if: *is-scheduled-pipeline
when: never
# Any other pipeline in the upstream should reuse already-built containers
- if: *is-upstream-pipeline
when: never
# Allow building everything in fork pipelines, but build nothing unless
# manually triggered
- when: manual
# Note: make sure the branches in this list are the same as in
# `.build-only-delayed-rules` below.
.build-rules:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
@@ -235,18 +322,20 @@ include:
- src/**/*
when: on_success
# Same as above, but for pre-merge pipelines
- if: *is-pre-merge
changes:
*all_paths
- if: *is-merge-request
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
- if: *is-merge-request
when: never
# Build everything after someone bypassed the CI
- if: *is-direct-push
- if: *is-push-to-upstream-default-branch
when: on_success
# Build everything when pushing to staging branches
- if: *is-push-to-upstream-staging-branch
when: on_success
# Build everything in scheduled pipelines
- if: *is-scheduled-pipeline
@@ -255,48 +344,58 @@ include:
# manually triggered
- when: manual
.ci-deqp-artifacts:
artifacts:
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
untracked: false
paths:
# Watch out! Artifacts are relative to the build dir.
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
- artifacts
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log
# Git archive
make git archive:
extends:
- .fdo.ci-fairy
stage: git-archive
# 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 [.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
# 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
- !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-merge-request
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-merge-request
when: never
# Build everything after someone bypassed the CI
- if: *is-push-to-upstream-default-branch
when: delayed
start_in: *build-delay
# Build everything when pushing to staging branches
- if: *is-push-to-upstream-staging-branch
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
# Sanity checks of MR settings and commit logs
sanity:
extends:
- .fdo.ci-fairy
stage: sanity
tags:
- placeholder-job
rules:
- if: *is-pre-merge
- if: *is-merge-request
when: on_success
- when: never
variables:
@@ -309,14 +408,14 @@ sanity:
image_tags=(
ALPINE_X86_64_BUILD_TAG
ALPINE_X86_64_LAVA_SSH_TAG
ALPINE_X86_64_LAVA_TRIGGER_TAG
DEBIAN_BASE_TAG
DEBIAN_BUILD_TAG
DEBIAN_PYUTILS_TAG
DEBIAN_TEST_ANDROID_TAG
DEBIAN_TEST_GL_TAG
DEBIAN_TEST_VK_TAG
FEDORA_X86_64_BUILD_TAG
KERNEL_ROOTFS_TAG
FIRMWARE_TAG
KERNEL_TAG
PKG_REPO_REV
WINDOWS_X64_BUILD_TAG
@@ -335,30 +434,4 @@ sanity:
when: on_failure
reports:
junit: check-*.xml
tags:
- placeholder-job
mr-label-maker-test:
extends:
- .fdo.ci-fairy
stage: sanity
rules:
- !reference [.mr-label-maker-rules, rules]
variables:
GIT_STRATEGY: fetch
timeout: 10m
script:
- set -eu
- python3 -m venv .venv
- source .venv/bin/activate
- pip install git+https://gitlab.freedesktop.org/freedesktop/mr-label-maker
- mr-label-maker --dry-run --mr $CI_MERGE_REQUEST_IID
# Jobs that need to pass before spending hardware resources on further testing
.required-for-hardware-jobs:
needs:
- job: rustfmt
optional: true
- job: yaml-toml-shell-py-test
optional: true

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,71 @@
#!/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"
ci_tag_test_time_check "ANDROID_CTS_TAG"
export PATH=/android-tools/build-tools:/android-cts/jdk/bin/:$PATH
export JAVA_HOME=/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 -e 's/\s*$//g' -e 's/.*/--exclude-filter "\0" /g')"
fi
INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
if [ ! -e "$INCLUDE_FILE" ]; then
set +x
echo "ERROR: No include file (${GPU_VERSION}-android-cts-include.txt) found."
echo "This means that we are running the all available CTS modules."
echo "But the time to run it might be too long, please provide an include file instead."
exit 1
fi
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -e 's/\s*$//g' -e 's/.*/--include-filter "\0" /g')"
if [ -n "${ANDROID_CTS_PREPARE_COMMAND:-}" ]; then
eval "$ANDROID_CTS_PREPARE_COMMAND"
fi
uncollapsed_section_switch android_cts_test "Android CTS: testing"
set +e
eval "/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
$INCLUDE_FILTERS \
$EXCLUDE_FILTERS
SUMMARY_FILE=/android-cts/results/latest/invocation_summary.txt
# Parse a line like `x/y modules completed` to check that all modules completed
COMPLETED_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\1/p' "$SUMMARY_FILE")
AVAILABLE_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\2/p' "$SUMMARY_FILE")
[ "$COMPLETED_MODULES" = "$AVAILABLE_MODULES" ]
# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195
MODULES_FAILED=$?
# Parse a line like `FAILED : x` to check that no tests failed
[ "$(grep "^FAILED" "$SUMMARY_FILE" | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195
TESTS_FAILED=$?
[ "$MODULES_FAILED" = "0" ] && [ "$TESTS_FAILED" = "0" ]
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
EXIT_CODE=$?
set -e
cp -r "/android-cts/results/latest"/* $RESULTS_DIR
cp -r "/android-cts/logs/latest"/* $RESULTS_DIR
echo "============================================"
echo "Review the Android CTS test results at: ${ARTIFACTS_BASE_URL}/results/test_result.html"
section_end android_cts_test

110
.gitlab-ci/android-deqp-runner.sh Executable file
View File

@@ -0,0 +1,110 @@
#!/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-gles/modules/gles2/deqp-gles2 /data/deqp
$ADB push /deqp-gles/mustpass/gles2-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/android-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"
DEQP_SKIPS=""
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"
# Print the detailed version with the list of backports and local patches
{ set +x; } 2>/dev/null
for api in vk-main vk gl gles; do
deqp_version_log=/deqp-$api/deqp-$api-version
if [ -r "$deqp_version_log" ]; then
cat "$deqp_version_log"
fi
done
set -x
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

150
.gitlab-ci/android-runner.sh Executable file
View File

@@ -0,0 +1,150 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
set -uex
# 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
$ADB push /android-tools/eglinfo /data
$ADB push /android-tools/vulkaninfo /data
get_gles_runtime_renderer() {
while [ "$($ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile renderer':)" = "" ] ; do sleep 1; done
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile renderer' | head -1
}
get_gles_runtime_version() {
while [ "$($ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile version:')" = "" ] ; do sleep 1; done
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/eglinfo | grep 'OpenGL ES profile version:' | head -1
}
get_vk_runtime_device_name() {
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/vulkaninfo | grep deviceName | head -1
}
get_vk_runtime_version() {
$ADB shell XDG_CACHE_HOME=/data/local/tmp /data/vulkaninfo | grep driverInfo | head -1
}
# Check what GLES & VK implementation is used before uploading the new libraries
get_gles_runtime_renderer
get_gles_runtime_version
get_vk_runtime_device_name
get_vk_runtime_version
# 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*
if [ -n "${ANGLE_TAG:-}" ]; then
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"
fi
# Check what GLES & VK implementation is used after uploading the new libraries
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
get_gles_runtime_renderer
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
get_vk_runtime_device_name
VK_RUNTIME_VERSION="$(get_vk_runtime_version)"
if [ -n "${ANGLE_TAG:-}" ]; then
# Note: we are injecting the ANGLE libs too, so we need to check if the
# new ANGLE libs are being used.
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
fi
if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D Vulkan libs: ${VK_RUNTIME_VERSION}" 1>&2
exit 1
fi
get_surfaceflinger_pid() {
while [ "$($ADB shell dumpsys -l | grep 'SurfaceFlinger$')" = "" ] ; do sleep 1; done
$ADB shell ps -A | grep -i surfaceflinger | tr -s ' ' | cut -d ' ' -f 2
}
OLD_SF_PID=$(get_surfaceflinger_pid)
# restart Android shell, so that services use the new libraries
$ADB shell stop
$ADB shell start
# Check that SurfaceFlinger restarted, to ensure that new libraries have been picked up
NEW_SF_PID=$(get_surfaceflinger_pid)
if [ "$OLD_SF_PID" == "$NEW_SF_PID" ]; then
echo "Fatal: check that SurfaceFlinger restarted" 1>&2
exit 1
fi
if [ -n "${ANDROID_CTS_TAG:-}" ]; 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

@@ -0,0 +1,11 @@
# Skip these tests when running fractional dEQP batches, as the AHB tests are expected
# to be handled separately in a non-fractional run within the deqp-runner suite.
dEQP-VK.api.external.memory.android_hardware_buffer.*
# Skip all WSI tests: the DEQP_ANDROID_EXE build used can't create native windows, as
# only APKs support window creation on Android.
dEQP-VK.image.swapchain_mutable.*
dEQP-VK.wsi.*
# These tests cause hangs and need to be skipped for now.
dEQP-VK.synchronization*

View File

@@ -1,119 +0,0 @@
version: 1
# Rules to match for a machine to qualify
target:
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 }}
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 }}
boot_cycle:
minutes: {{ timeout_boot_minutes | default(0, true) }}
seconds: {{ timeout_boot_seconds | default(0, true) }}
retries: {{ 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) }}
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) }}
console_patterns:
session_end:
regex: >-
{{ session_end_regex }}
{% if session_reboot_regex %}
session_reboot:
regex: >-
{{ session_reboot_regex }}
{% endif %}
job_success:
regex: >-
{{ job_success_regex }}
{% if job_warn_regex %}
job_warn:
regex: >-
{{ job_warn_regex }}
{% endif %}
{% if boot_wd_start_regex and boot_wd_stop_regex %}
watchdogs:
boot:
start:
regex: >-
{{ boot_wd_start_regex }}
reset:
regex: >-
{{ boot_wd_reset_regex | default(boot_wd_start_regex, true) }}
stop:
regex: >-
{{ boot_wd_stop_regex }}
{% endif %}
# Environment to deploy
deployment:
# Initial boot
start:
storage:
http:
- path: "/b2c-extra-args"
data: >
b2c.pipefail b2c.poweroff_delay={{ 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={{ 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('"', '\\\"') }}"
kernel:
{% if kernel_url %}
url: '{{ kernel_url }}'
{% endif %}
# NOTE: b2c.cache_device should not be here, but this works around
# a limitation of b2c which will be removed in the next release
cmdline: >
SALAD.machine_id={{ '{{' }} machine_id }}
console={{ '{{' }} local_tty_device }},115200
b2c.cache_device=auto 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 }}
{% endif %}
{% if initramfs_url or firmware_url %}
initramfs:
{% if firmware_url %}
- url: '{{ firmware_url }}'
{% endif %}
{% if initramfs_url %}
- url: '{{ initramfs_url }}'
{% endif %}
{% endif %}
{% if dtb_url %}
dtb:
url: '{{ dtb_url }}'
{% if dtb_match %}
format:
archive:
match: "{{ dtb_match }}"
{% endif %}
{% endif %}

View File

@@ -1,55 +0,0 @@
#!/usr/bin/env python3
# Copyright © 2022 Valve Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from jinja2 import Environment, FileSystemLoader
from os import environ, path
# Pass all the environment variables prefixed by B2C_
values = {
key.removeprefix("B2C_").lower(): environ[key]
for key in environ if key.startswith("B2C_")
}
env = Environment(loader=FileSystemLoader(path.dirname(values['job_template'])),
trim_blocks=True, lstrip_blocks=True)
template = env.get_template(path.basename(values['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:
f.write(template.render(values))

View File

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

View File

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

View File

@@ -1,129 +0,0 @@
#!/bin/bash
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# shellcheck disable=SC2034
# shellcheck disable=SC2086 # we want word splitting
# Boot script for Chrome OS devices attached to a servo debug connector, using
# NFS and TFTP to boot.
# We're run from the root of the repo, make a helper var for our paths
BM=$CI_PROJECT_DIR/install/bare-metal
CI_COMMON=$CI_PROJECT_DIR/install/common
CI_INSTALL=$CI_PROJECT_DIR/install
# Runner config checks
if [ -z "$BM_SERIAL" ]; then
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
echo "This is the CPU serial device."
exit 1
fi
if [ -z "$BM_SERIAL_EC" ]; then
echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
echo "This is the EC serial device for controlling board power"
exit 1
fi
if [ ! -d /nfs ]; then
echo "NFS rootfs directory needs to be mounted at /nfs by the gitlab runner"
exit 1
fi
if [ ! -d /tftp ]; then
echo "TFTP directory for this board needs to be mounted at /tftp by the gitlab runner"
exit 1
fi
# job config checks
if [ -z "$BM_KERNEL" ]; then
echo "Must set BM_KERNEL to your board's kernel FIT image"
exit 1
fi
if [ -z "$BM_ROOTFS" ]; then
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables"
exit 1
fi
if [ -z "$BM_CMDLINE" ]; then
echo "Must set BM_CMDLINE to your board's kernel command line arguments"
exit 1
fi
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_start prepare_rootfs "Preparing rootfs components"
set -ex
# Clear out any previous run's artifacts.
rm -rf results/
mkdir -p results
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
# state, since it's volume-mounted on the host.
rsync -a --delete $BM_ROOTFS/ /nfs/
mkdir -p /nfs/results
. $BM/rootfs-setup.sh /nfs
# Put the kernel/dtb image and the boot command line in the tftp directory for
# the board to find. For normal Mesa development, we build the kernel and
# store it in the docker container that this script is running in.
#
# However, container builds are expensive, so when you're hacking on the
# kernel, it's nice to be able to skip the half hour container build and plus
# moving that container to the runner. So, if BM_KERNEL is a URL, fetch it
# instead of looking in the container. Note that the kernel build should be
# the output of:
#
# make Image.lzma
#
# mkimage \
# -A arm64 \
# -f auto \
# -C lzma \
# -d arch/arm64/boot/Image.lzma \
# -b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \
# cheza-image.img
rm -rf /tftp/*
if echo "$BM_KERNEL" | grep -q http; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
$BM_KERNEL -o /tftp/vmlinuz
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o /tftp/vmlinuz
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "/nfs/"
rm modules.tar.zst &
else
cp /baremetal-files/"$BM_KERNEL" /tftp/vmlinuz
fi
echo "$BM_CMDLINE" > /tftp/cmdline
set +e
STRUCTURED_LOG_FILE=results/job_detail.json
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit "${CI_JOB_STARTED_AT}"
section_end prepare_rootfs
python3 $BM/cros_servo_run.py \
--cpu $BM_SERIAL \
--ec $BM_SERIAL_EC \
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20}
ret=$?
section_start dut_cleanup "Cleaning up after job"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
set -e
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
# will look for them.
cp -Rp /nfs/results/. results/
section_end dut_cleanup
exit $ret

View File

@@ -1,206 +0,0 @@
#!/usr/bin/env python3
#
# Copyright © 2020 Google LLC
# SPDX-License-Identifier: MIT
import argparse
import datetime
import math
import os
import re
import sys
from custom_logger import CustomLogger
from serial_buffer import SerialBuffer
ANSI_ESCAPE="\x1b[0K"
ANSI_COLOUR="\x1b[0;36m"
ANSI_RESET="\x1b[0m"
SECTION_START="start"
SECTION_END="end"
class CrosServoRun:
def __init__(self, cpu, ec, test_timeout, logger):
self.cpu_ser = SerialBuffer(
cpu, "results/serial.txt", ": ")
# Merge the EC serial into the cpu_ser's line stream so that we can
# effectively poll on both at the same time and not have to worry about
self.ec_ser = SerialBuffer(
ec, "results/serial-ec.txt", " EC: ", line_queue=self.cpu_ser.line_queue)
self.test_timeout = test_timeout
self.logger = logger
def close(self):
self.ec_ser.close()
self.cpu_ser.close()
def ec_write(self, s):
print("EC> %s" % s)
self.ec_ser.serial.write(s.encode())
def cpu_write(self, s):
print("> %s" % s)
self.cpu_ser.serial.write(s.encode())
def print_error(self, message):
RED = '\033[0;31m'
NO_COLOR = '\033[0m'
print(RED + message + NO_COLOR)
self.logger.update_status_fail(message)
def get_rel_timestamp(self):
now = datetime.datetime.now(tz=datetime.UTC)
then_env = os.getenv("CI_JOB_STARTED_AT")
if not then_env:
return ""
delta = now - datetime.datetime.fromisoformat(then_env)
return f"[{math.floor(delta.seconds / 60):02}:{(delta.seconds % 60):02}]"
def get_cur_timestamp(self):
return str(int(datetime.datetime.timestamp(datetime.datetime.now())))
def print_gitlab_section(self, action, name, description, collapse=True):
assert action in [SECTION_START, SECTION_END]
out = ANSI_ESCAPE + "section_" + action + ":"
out += self.get_cur_timestamp() + ":"
out += name
if action == "start" and collapse:
out += "[collapsed=true]"
out += "\r" + ANSI_ESCAPE + ANSI_COLOUR
out += self.get_rel_timestamp() + " " + description + ANSI_RESET
print(out)
def boot_section(self, action):
self.print_gitlab_section(action, "dut_boot", "Booting hardware device", True)
def run(self):
# Flush any partial commands in the EC's prompt, then ask for a reboot.
self.ec_write("\n")
self.ec_write("reboot\n")
bootloader_done = False
self.logger.create_job_phase("boot")
self.boot_section(SECTION_START)
tftp_failures = 0
# This is emitted right when the bootloader pauses to check for input.
# Emit a ^N character to request network boot, because we don't have a
# direct-to-netboot firmware on cheza.
for line in self.cpu_ser.lines(timeout=120, phase="bootloader"):
if re.search("load_archive: loading locale_en.bin", line):
self.cpu_write("\016")
bootloader_done = True
break
# The Cheza firmware seems to occasionally get stuck looping in
# this error state during TFTP booting, possibly based on amount of
# network traffic around it, but it'll usually recover after a
# reboot. Currently mostly visible on google-freedreno-cheza-14.
if re.search("R8152: Bulk read error 0xffffffbf", line):
tftp_failures += 1
if tftp_failures >= 10:
self.print_error(
"Detected intermittent tftp failure, restarting run.")
return 1
# If the board has a netboot firmware and we made it to booting the
# kernel, proceed to processing of the test run.
if re.search("Booting Linux", line):
bootloader_done = True
break
# The Cheza boards have issues with failing to bring up power to
# the system sometimes, possibly dependent on ambient temperature
# in the farm.
if re.search("POWER_GOOD not seen in time", line):
self.print_error(
"Detected intermittent poweron failure, abandoning run.")
return 1
if not bootloader_done:
self.print_error("Failed to make it through bootloader, abandoning run.")
return 1
self.logger.create_job_phase("test")
for line in self.cpu_ser.lines(timeout=self.test_timeout, phase="test"):
if re.search("---. end Kernel panic", line):
return 1
# There are very infrequent bus errors during power management transitions
# on cheza, which we don't expect to be the case on future boards.
if re.search("Kernel panic - not syncing: Asynchronous SError Interrupt", line):
self.print_error(
"Detected cheza power management bus error, abandoning run.")
return 1
# If the network device dies, it's probably not graphics's fault, just try again.
if re.search("NETDEV WATCHDOG", line):
self.print_error(
"Detected network device failure, abandoning run.")
return 1
# These HFI response errors started appearing with the introduction
# of piglit runs. CosmicPenguin says:
#
# "message ID 106 isn't a thing, so likely what happened is that we
# got confused when parsing the HFI queue. If it happened on only
# one run, then memory corruption could be a possible clue"
#
# Given that it seems to trigger randomly near a GPU fault and then
# break many tests after that, just restart the whole run.
if re.search("a6xx_hfi_send_msg.*Unexpected message id .* on the response queue", line):
self.print_error(
"Detected cheza power management bus error, abandoning run.")
return 1
if re.search("coreboot.*bootblock starting", line):
self.print_error(
"Detected spontaneous reboot, abandoning run.")
return 1
if re.search("arm-smmu 5040000.iommu: TLB sync timed out -- SMMU may be deadlocked", line):
self.print_error("Detected cheza MMU fail, abandoning run.")
return 1
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
if result:
status = result.group(1)
exit_code = int(result.group(2))
if status == "pass":
self.logger.update_dut_job("status", "pass")
else:
self.logger.update_status_fail("test fail")
self.logger.update_dut_job("exit_code", exit_code)
return exit_code
self.print_error(
"Reached the end of the CPU serial log without finding a result")
return 1
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--cpu', type=str,
help='CPU Serial device', required=True)
parser.add_argument(
'--ec', type=str, help='EC Serial device', required=True)
parser.add_argument(
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
args = parser.parse_args()
logger = CustomLogger("results/job_detail.json")
logger.update_dut_time("start", None)
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60, logger)
retval = servo.run()
# power down the CPU on the device
servo.ec_write("power off\n")
logger.update_dut_time("end", None)
servo.close()
sys.exit(retval)
if __name__ == '__main__':
main()

View File

@@ -1,10 +0,0 @@
#!/bin/bash
relay=$1
if [ -z "$relay" ]; then
echo "Must supply a relay arg"
exit 1
fi
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" off "$relay"

View File

@@ -1,28 +0,0 @@
#!/usr/bin/python3
import sys
import socket
host = sys.argv[1]
port = sys.argv[2]
mode = sys.argv[3]
relay = sys.argv[4]
msg = None
if mode == "on":
msg = b'\x20'
else:
msg = b'\x21'
msg += int(relay).to_bytes(1, 'big')
msg += b'\x00'
c = socket.create_connection((host, int(port)))
c.sendall(msg)
data = c.recv(1)
c.close()
if data[0] == b'\x01':
print('Command failed')
sys.exit(1)

View File

@@ -1,12 +0,0 @@
#!/bin/bash
relay=$1
if [ -z "$relay" ]; then
echo "Must supply a relay arg"
exit 1
fi
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" off "$relay"
sleep 5
"$CI_PROJECT_DIR"/install/bare-metal/eth008-power-relay.py "$ETH_HOST" "$ETH_PORT" on "$relay"

View File

@@ -1,31 +0,0 @@
#!/bin/bash
set -e
STRINGS=$(mktemp)
ERRORS=$(mktemp)
trap 'rm $STRINGS; rm $ERRORS;' EXIT
FILE=$1
shift 1
while getopts "f:e:" opt; do
case $opt in
f) echo "$OPTARG" >> "$STRINGS";;
e) echo "$OPTARG" >> "$STRINGS" ; echo "$OPTARG" >> "$ERRORS";;
*) exit
esac
done
shift $((OPTIND -1))
echo "Waiting for $FILE to say one of following strings"
cat "$STRINGS"
while ! grep -E -wf "$STRINGS" "$FILE"; do
sleep 2
done
if grep -E -wf "$ERRORS" "$FILE"; then
exit 1
fi

View File

@@ -1,171 +0,0 @@
#!/bin/bash
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# shellcheck disable=SC2034
# shellcheck disable=SC2086 # we want word splitting
. "$SCRIPTS_DIR"/setup-test-env.sh
BM=$CI_PROJECT_DIR/install/bare-metal
CI_COMMON=$CI_PROJECT_DIR/install/common
if [ -z "$BM_SERIAL" ] && [ -z "$BM_SERIAL_SCRIPT" ]; then
echo "Must set BM_SERIAL OR BM_SERIAL_SCRIPT in your gitlab-runner config.toml [[runners]] environment"
echo "BM_SERIAL:"
echo " This is the serial device to talk to for waiting for fastboot to be ready and logging from the kernel."
echo "BM_SERIAL_SCRIPT:"
echo " This is a shell script to talk to for waiting for fastboot to be ready and logging from the kernel."
exit 1
fi
if [ -z "$BM_POWERUP" ]; then
echo "Must set BM_POWERUP in your gitlab-runner config.toml [[runners]] environment"
echo "This is a shell script that should reset the device and begin its boot sequence"
echo "such that it pauses at fastboot."
exit 1
fi
if [ -z "$BM_POWERDOWN" ]; then
echo "Must set BM_POWERDOWN in your gitlab-runner config.toml [[runners]] environment"
echo "This is a shell script that should power off the device."
exit 1
fi
if [ -z "$BM_FASTBOOT_SERIAL" ]; then
echo "Must set BM_FASTBOOT_SERIAL in your gitlab-runner config.toml [[runners]] environment"
echo "This must be the a stable-across-resets fastboot serial number."
exit 1
fi
if [ -z "$BM_KERNEL" ]; then
echo "Must set BM_KERNEL to your board's kernel vmlinuz or Image.gz in the job's variables:"
exit 1
fi
if [ -z "$BM_DTB" ]; then
echo "Must set BM_DTB to your board's DTB file in the job's variables:"
exit 1
fi
if [ -z "$BM_ROOTFS" ]; then
echo "Must set BM_ROOTFS to your board's rootfs directory in the job's variables:"
exit 1
fi
if echo $BM_CMDLINE | grep -q "root=/dev/nfs"; then
BM_FASTBOOT_NFSROOT=1
fi
section_start prepare_rootfs "Preparing rootfs components"
set -ex
# Clear out any previous run's artifacts.
rm -rf results/
mkdir -p results/
if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
# Create the rootfs in the NFS directory. rm to make sure it's in a pristine
# state, since it's volume-mounted on the host.
rsync -a --delete $BM_ROOTFS/ /nfs/
mkdir -p /nfs/results
. $BM/rootfs-setup.sh /nfs
# Root on NFS, no need for an inintramfs.
rm -f rootfs.cpio.gz
touch rootfs.cpio
gzip rootfs.cpio
else
# Create the rootfs in a temp dir
rsync -a --delete $BM_ROOTFS/ rootfs/
. $BM/rootfs-setup.sh rootfs
# 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
pushd rootfs
find -H . | \
grep -E -v "external/(openglcts|vulkancts|amber|glslang|spirv-tools)" |
grep -E -v "traces-db|apitrace|renderdoc" | \
grep -E -v $EXCLUDE_FILTER | \
cpio -H newc -o | \
xz --check=crc32 -T4 - > $CI_PROJECT_DIR/rootfs.cpio.gz
popd
fi
if echo "$BM_KERNEL $BM_DTB" | grep -q http; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"$BM_KERNEL" -o kernel
# FIXME: modules should be supplied too
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"$BM_DTB" -o dtb
cat kernel dtb > Image.gz-dtb
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o kernel
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
if [ -n "$BM_DTB" ]; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_DTB}.dtb" -o dtb
fi
cat kernel dtb > Image.gz-dtb || echo "No DTB available, using pure kernel."
rm kernel
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "$BM_ROOTFS/"
rm modules.tar.zst &
else
cat /baremetal-files/"$BM_KERNEL" /baremetal-files/"$BM_DTB".dtb > Image.gz-dtb
cp /baremetal-files/"$BM_DTB".dtb dtb
fi
export PATH=$BM:$PATH
mkdir -p artifacts
mkbootimg.py \
--kernel Image.gz-dtb \
--ramdisk rootfs.cpio.gz \
--dtb dtb \
--cmdline "$BM_CMDLINE" \
$BM_MKBOOT_PARAMS \
--header_version 2 \
-o artifacts/fastboot.img
rm Image.gz-dtb dtb
# Start background command for talking to serial if we have one.
if [ -n "$BM_SERIAL_SCRIPT" ]; then
$BM_SERIAL_SCRIPT > results/serial-output.txt &
while [ ! -e results/serial-output.txt ]; do
sleep 1
done
fi
section_end prepare_rootfs
set +e
$BM/fastboot_run.py \
--dev="$BM_SERIAL" \
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20} \
--fbserial="$BM_FASTBOOT_SERIAL" \
--powerup="$BM_POWERUP" \
--powerdown="$BM_POWERDOWN"
ret=$?
set -e
if [ -n "$BM_FASTBOOT_NFSROOT" ]; then
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
# will look for them.
cp -Rp /nfs/results/. results/
fi
exit $ret

View File

@@ -1,159 +0,0 @@
#!/usr/bin/env python3
#
# Copyright © 2020 Google LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import argparse
import subprocess
import re
from serial_buffer import SerialBuffer
import sys
import threading
class FastbootRun:
def __init__(self, args, test_timeout):
self.powerup = args.powerup
self.ser = SerialBuffer(
args.dev, "results/serial-output.txt", "R SERIAL> ")
self.fastboot = "fastboot boot -s {ser} artifacts/fastboot.img".format(
ser=args.fbserial)
self.test_timeout = test_timeout
def close(self):
self.ser.close()
def print_error(self, message):
RED = '\033[0;31m'
NO_COLOR = '\033[0m'
print(RED + message + NO_COLOR)
def logged_system(self, cmd, timeout=60):
print("Running '{}'".format(cmd))
try:
return subprocess.call(cmd, shell=True, timeout=timeout)
except subprocess.TimeoutExpired:
self.print_error("timeout, abandoning run.")
return 1
def run(self):
if ret := self.logged_system(self.powerup):
return ret
fastboot_ready = False
for line in self.ser.lines(timeout=2 * 60, phase="bootloader"):
if re.search("[Ff]astboot: [Pp]rocessing commands", line) or \
re.search("Listening for fastboot command on", line):
fastboot_ready = True
break
if re.search("data abort", line):
self.print_error(
"Detected crash during boot, abandoning run.")
return 1
if not fastboot_ready:
self.print_error(
"Failed to get to fastboot prompt, abandoning run.")
return 1
if ret := self.logged_system(self.fastboot):
return ret
print_more_lines = -1
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
if print_more_lines == 0:
return 1
if print_more_lines > 0:
print_more_lines -= 1
if re.search("---. end Kernel panic", line):
return 1
# The db820c boards intermittently reboot. Just restart the run
# when if we see a reboot after we got past fastboot.
if re.search("PON REASON", line):
self.print_error(
"Detected spontaneous reboot, abandoning run.")
return 1
# db820c sometimes wedges around iommu fault recovery
if re.search("watchdog: BUG: soft lockup - CPU.* stuck", line):
self.print_error(
"Detected kernel soft lockup, abandoning run.")
return 1
# If the network device dies, it's probably not graphics's fault, just try again.
if re.search("NETDEV WATCHDOG", line):
self.print_error(
"Detected network device failure, abandoning run.")
return 1
# A3xx recovery doesn't quite work. Sometimes the GPU will get
# wedged and recovery will fail (because power can't be reset?)
# This assumes that the jobs are sufficiently well-tested that GPU
# hangs aren't always triggered, so just try again. But print some
# more lines first so that we get better information on the cause
# of the hang. Once a hang happens, it's pretty chatty.
if "[drm:adreno_recover] *ERROR* gpu hw init failed: -22" in line:
self.print_error(
"Detected GPU hang, abandoning run.")
if print_more_lines == -1:
print_more_lines = 30
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
if result:
status = result.group(1)
exit_code = int(result.group(2))
return exit_code
self.print_error(
"Reached the end of the CPU serial log without finding a result, abandoning run.")
return 1
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
'--dev', type=str, help='Serial device (otherwise reading from serial-output.txt)')
parser.add_argument('--powerup', type=str,
help='shell command for rebooting', required=True)
parser.add_argument('--powerdown', type=str,
help='shell command for powering off', required=True)
parser.add_argument('--fbserial', type=str,
help='fastboot serial number of the board', required=True)
parser.add_argument('--test-timeout', type=int,
help='Test phase timeout (minutes)', required=True)
args = parser.parse_args()
fastboot = FastbootRun(args, args.test_timeout * 60)
retval = fastboot.run()
fastboot.close()
fastboot.logged_system(args.powerdown)
sys.exit(retval)
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,129 @@
.baremetal-test:
extends:
- .test
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
before_script:
- !reference [.download_s3, before_script]
variables:
BM_ROOTFS: /rootfs-${DEBIAN_ARCH}
artifacts:
when: always
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
paths:
- results/
- serial*.txt
exclude:
- results/*.shader_cache
reports:
junit: results/junit.xml
# ARM testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm32-gl:
extends:
- .baremetal-test
- .use-debian/baremetal_arm32_test-gl
variables:
DEBIAN_ARCH: armhf
S3_ARTIFACT_NAME: mesa-arm32-default-debugoptimized
needs:
- job: debian/baremetal_arm32_test-gl
optional: true
- job: debian-arm32
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm64-gl:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-gl
variables:
DEBIAN_ARCH: arm64
S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
needs:
- job: debian/baremetal_arm64_test-gl
optional: true
- job: debian-arm64
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM64 testing of bare-metal boards attached to an x86 gitlab-runner system
.baremetal-test-arm64-vk:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-vk
variables:
DEBIAN_ARCH: arm64
S3_ARTIFACT_NAME: mesa-arm64-default-debugoptimized
needs:
- job: debian/baremetal_arm64_test-vk
optional: true
- job: debian-arm64
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
.baremetal-arm32-asan-test-gl:
variables:
S3_ARTIFACT_NAME: mesa-arm32-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- job: debian/baremetal_arm32_test-gl
optional: true
- job: debian-arm32-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test-gl:
variables:
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- job: debian/baremetal_arm64_test-gl
optional: true
- job: debian-arm64-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test-vk:
variables:
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- job: debian/baremetal_arm64_test-vk
optional: true
- job: debian-arm64-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test-gl:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-gl
variables:
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
needs:
- job: debian/baremetal_arm64_test-gl
optional: true
- job: debian-arm64-ubsan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test-vk:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test-vk
variables:
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
needs:
- job: debian/baremetal_arm64_test-vk
optional: true
- job: debian-arm64-ubsan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-deqp-test:
variables:
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
FDO_CI_CONCURRENT: 0 # Default to number of CPUs

View File

@@ -1,10 +0,0 @@
#!/bin/bash
relay=$1
if [ -z "$relay" ]; then
echo "Must supply a relay arg"
exit 1
fi
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py off "$relay"

View File

@@ -1,19 +0,0 @@
#!/usr/bin/python3
import sys
import serial
mode = sys.argv[1]
relay = sys.argv[2]
# our relays are "off" means "board is powered".
mode_swap = {
"on": "off",
"off": "on",
}
mode = mode_swap[mode]
ser = serial.Serial('/dev/ttyACM0', 115200, timeout=2)
command = "relay {} {}\n\r".format(mode, relay)
ser.write(command.encode())
ser.close()

View File

@@ -1,12 +0,0 @@
#!/bin/bash
relay=$1
if [ -z "$relay" ]; then
echo "Must supply a relay arg"
exit 1
fi
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py off "$relay"
sleep 5
"$CI_PROJECT_DIR"/install/bare-metal/google-power-relay.py on "$relay"

View File

@@ -1,569 +0,0 @@
#!/usr/bin/env python3
#
# Copyright 2015, The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Creates the boot image."""
from argparse import (ArgumentParser, ArgumentTypeError,
FileType, RawDescriptionHelpFormatter)
from hashlib import sha1
from os import fstat
from struct import pack
import array
import collections
import os
import re
import subprocess
import tempfile
# Constant and structure definition is in
# system/tools/mkbootimg/include/bootimg/bootimg.h
BOOT_MAGIC = 'ANDROID!'
BOOT_MAGIC_SIZE = 8
BOOT_NAME_SIZE = 16
BOOT_ARGS_SIZE = 512
BOOT_EXTRA_ARGS_SIZE = 1024
BOOT_IMAGE_HEADER_V1_SIZE = 1648
BOOT_IMAGE_HEADER_V2_SIZE = 1660
BOOT_IMAGE_HEADER_V3_SIZE = 1580
BOOT_IMAGE_HEADER_V3_PAGESIZE = 4096
BOOT_IMAGE_HEADER_V4_SIZE = 1584
BOOT_IMAGE_V4_SIGNATURE_SIZE = 4096
VENDOR_BOOT_MAGIC = 'VNDRBOOT'
VENDOR_BOOT_MAGIC_SIZE = 8
VENDOR_BOOT_NAME_SIZE = BOOT_NAME_SIZE
VENDOR_BOOT_ARGS_SIZE = 2048
VENDOR_BOOT_IMAGE_HEADER_V3_SIZE = 2112
VENDOR_BOOT_IMAGE_HEADER_V4_SIZE = 2128
VENDOR_RAMDISK_TYPE_NONE = 0
VENDOR_RAMDISK_TYPE_PLATFORM = 1
VENDOR_RAMDISK_TYPE_RECOVERY = 2
VENDOR_RAMDISK_TYPE_DLKM = 3
VENDOR_RAMDISK_NAME_SIZE = 32
VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE = 16
VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE = 108
# Names with special meaning, mustn't be specified in --ramdisk_name.
VENDOR_RAMDISK_NAME_BLOCKLIST = {b'default'}
PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT = '--vendor_ramdisk_fragment'
def filesize(f):
if f is None:
return 0
try:
return fstat(f.fileno()).st_size
except OSError:
return 0
def update_sha(sha, f):
if f:
sha.update(f.read())
f.seek(0)
sha.update(pack('I', filesize(f)))
else:
sha.update(pack('I', 0))
def pad_file(f, padding):
pad = (padding - (f.tell() & (padding - 1))) & (padding - 1)
f.write(pack(str(pad) + 'x'))
def get_number_of_pages(image_size, page_size):
"""calculates the number of pages required for the image"""
return (image_size + page_size - 1) // page_size
def get_recovery_dtbo_offset(args):
"""calculates the offset of recovery_dtbo image in the boot image"""
num_header_pages = 1 # header occupies a page
num_kernel_pages = get_number_of_pages(filesize(args.kernel), args.pagesize)
num_ramdisk_pages = get_number_of_pages(filesize(args.ramdisk),
args.pagesize)
num_second_pages = get_number_of_pages(filesize(args.second), args.pagesize)
dtbo_offset = args.pagesize * (num_header_pages + num_kernel_pages +
num_ramdisk_pages + num_second_pages)
return dtbo_offset
def write_header_v3_and_above(args):
if args.header_version > 3:
boot_header_size = BOOT_IMAGE_HEADER_V4_SIZE
else:
boot_header_size = BOOT_IMAGE_HEADER_V3_SIZE
args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
# kernel size in bytes
args.output.write(pack('I', filesize(args.kernel)))
# ramdisk size in bytes
args.output.write(pack('I', filesize(args.ramdisk)))
# os version and patch level
args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
args.output.write(pack('I', boot_header_size))
# reserved
args.output.write(pack('4I', 0, 0, 0, 0))
# version of boot image header
args.output.write(pack('I', args.header_version))
args.output.write(pack(f'{BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE}s',
args.cmdline))
if args.header_version >= 4:
# The signature used to verify boot image v4.
args.output.write(pack('I', BOOT_IMAGE_V4_SIGNATURE_SIZE))
pad_file(args.output, BOOT_IMAGE_HEADER_V3_PAGESIZE)
def write_vendor_boot_header(args):
if filesize(args.dtb) == 0:
raise ValueError('DTB image must not be empty.')
if args.header_version > 3:
vendor_ramdisk_size = args.vendor_ramdisk_total_size
vendor_boot_header_size = VENDOR_BOOT_IMAGE_HEADER_V4_SIZE
else:
vendor_ramdisk_size = filesize(args.vendor_ramdisk)
vendor_boot_header_size = VENDOR_BOOT_IMAGE_HEADER_V3_SIZE
args.vendor_boot.write(pack(f'{VENDOR_BOOT_MAGIC_SIZE}s',
VENDOR_BOOT_MAGIC.encode()))
# version of boot image header
args.vendor_boot.write(pack('I', args.header_version))
# flash page size
args.vendor_boot.write(pack('I', args.pagesize))
# kernel physical load address
args.vendor_boot.write(pack('I', args.base + args.kernel_offset))
# ramdisk physical load address
args.vendor_boot.write(pack('I', args.base + args.ramdisk_offset))
# ramdisk size in bytes
args.vendor_boot.write(pack('I', vendor_ramdisk_size))
args.vendor_boot.write(pack(f'{VENDOR_BOOT_ARGS_SIZE}s',
args.vendor_cmdline))
# kernel tags physical load address
args.vendor_boot.write(pack('I', args.base + args.tags_offset))
# asciiz product name
args.vendor_boot.write(pack(f'{VENDOR_BOOT_NAME_SIZE}s', args.board))
# header size in bytes
args.vendor_boot.write(pack('I', vendor_boot_header_size))
# dtb size in bytes
args.vendor_boot.write(pack('I', filesize(args.dtb)))
# dtb physical load address
args.vendor_boot.write(pack('Q', args.base + args.dtb_offset))
if args.header_version > 3:
vendor_ramdisk_table_size = (args.vendor_ramdisk_table_entry_num *
VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE)
# vendor ramdisk table size in bytes
args.vendor_boot.write(pack('I', vendor_ramdisk_table_size))
# number of vendor ramdisk table entries
args.vendor_boot.write(pack('I', args.vendor_ramdisk_table_entry_num))
# vendor ramdisk table entry size in bytes
args.vendor_boot.write(pack('I', VENDOR_RAMDISK_TABLE_ENTRY_V4_SIZE))
# bootconfig section size in bytes
args.vendor_boot.write(pack('I', filesize(args.vendor_bootconfig)))
pad_file(args.vendor_boot, args.pagesize)
def write_header(args):
if args.header_version > 4:
raise ValueError(
f'Boot header version {args.header_version} not supported')
if args.header_version in {3, 4}:
return write_header_v3_and_above(args)
ramdisk_load_address = ((args.base + args.ramdisk_offset)
if filesize(args.ramdisk) > 0 else 0)
second_load_address = ((args.base + args.second_offset)
if filesize(args.second) > 0 else 0)
args.output.write(pack(f'{BOOT_MAGIC_SIZE}s', BOOT_MAGIC.encode()))
# kernel size in bytes
args.output.write(pack('I', filesize(args.kernel)))
# kernel physical load address
args.output.write(pack('I', args.base + args.kernel_offset))
# ramdisk size in bytes
args.output.write(pack('I', filesize(args.ramdisk)))
# ramdisk physical load address
args.output.write(pack('I', ramdisk_load_address))
# second bootloader size in bytes
args.output.write(pack('I', filesize(args.second)))
# second bootloader physical load address
args.output.write(pack('I', second_load_address))
# kernel tags physical load address
args.output.write(pack('I', args.base + args.tags_offset))
# flash page size
args.output.write(pack('I', args.pagesize))
# version of boot image header
args.output.write(pack('I', args.header_version))
# os version and patch level
args.output.write(pack('I', (args.os_version << 11) | args.os_patch_level))
# asciiz product name
args.output.write(pack(f'{BOOT_NAME_SIZE}s', args.board))
args.output.write(pack(f'{BOOT_ARGS_SIZE}s', args.cmdline))
sha = sha1()
update_sha(sha, args.kernel)
update_sha(sha, args.ramdisk)
update_sha(sha, args.second)
if args.header_version > 0:
update_sha(sha, args.recovery_dtbo)
if args.header_version > 1:
update_sha(sha, args.dtb)
img_id = pack('32s', sha.digest())
args.output.write(img_id)
args.output.write(pack(f'{BOOT_EXTRA_ARGS_SIZE}s', args.extra_cmdline))
if args.header_version > 0:
if args.recovery_dtbo:
# recovery dtbo size in bytes
args.output.write(pack('I', filesize(args.recovery_dtbo)))
# recovert dtbo offset in the boot image
args.output.write(pack('Q', get_recovery_dtbo_offset(args)))
else:
# Set to zero if no recovery dtbo
args.output.write(pack('I', 0))
args.output.write(pack('Q', 0))
# Populate boot image header size for header versions 1 and 2.
if args.header_version == 1:
args.output.write(pack('I', BOOT_IMAGE_HEADER_V1_SIZE))
elif args.header_version == 2:
args.output.write(pack('I', BOOT_IMAGE_HEADER_V2_SIZE))
if args.header_version > 1:
if filesize(args.dtb) == 0:
raise ValueError('DTB image must not be empty.')
# dtb size in bytes
args.output.write(pack('I', filesize(args.dtb)))
# dtb physical load address
args.output.write(pack('Q', args.base + args.dtb_offset))
pad_file(args.output, args.pagesize)
return img_id
class AsciizBytes:
"""Parses a string and encodes it as an asciiz bytes object.
>>> AsciizBytes(bufsize=4)('foo')
b'foo\\x00'
>>> AsciizBytes(bufsize=4)('foob')
Traceback (most recent call last):
...
argparse.ArgumentTypeError: Encoded asciiz length exceeded: max 4, got 5
"""
def __init__(self, bufsize):
self.bufsize = bufsize
def __call__(self, arg):
arg_bytes = arg.encode() + b'\x00'
if len(arg_bytes) > self.bufsize:
raise ArgumentTypeError(
'Encoded asciiz length exceeded: '
f'max {self.bufsize}, got {len(arg_bytes)}')
return arg_bytes
class VendorRamdiskTableBuilder:
"""Vendor ramdisk table builder.
Attributes:
entries: A list of VendorRamdiskTableEntry namedtuple.
ramdisk_total_size: Total size in bytes of all ramdisks in the table.
"""
VendorRamdiskTableEntry = collections.namedtuple( # pylint: disable=invalid-name
'VendorRamdiskTableEntry',
['ramdisk_path', 'ramdisk_size', 'ramdisk_offset', 'ramdisk_type',
'ramdisk_name', 'board_id'])
def __init__(self):
self.entries = []
self.ramdisk_total_size = 0
self.ramdisk_names = set()
def add_entry(self, ramdisk_path, ramdisk_type, ramdisk_name, board_id):
# Strip any trailing null for simple comparison.
stripped_ramdisk_name = ramdisk_name.rstrip(b'\x00')
if stripped_ramdisk_name in VENDOR_RAMDISK_NAME_BLOCKLIST:
raise ValueError(
f'Banned vendor ramdisk name: {stripped_ramdisk_name}')
if stripped_ramdisk_name in self.ramdisk_names:
raise ValueError(
f'Duplicated vendor ramdisk name: {stripped_ramdisk_name}')
self.ramdisk_names.add(stripped_ramdisk_name)
if board_id is None:
board_id = array.array(
'I', [0] * VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE)
else:
board_id = array.array('I', board_id)
if len(board_id) != VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE:
raise ValueError('board_id size must be '
f'{VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE}')
with open(ramdisk_path, 'rb') as f:
ramdisk_size = filesize(f)
self.entries.append(self.VendorRamdiskTableEntry(
ramdisk_path, ramdisk_size, self.ramdisk_total_size, ramdisk_type,
ramdisk_name, board_id))
self.ramdisk_total_size += ramdisk_size
def write_ramdisks_padded(self, fout, alignment):
for entry in self.entries:
with open(entry.ramdisk_path, 'rb') as f:
fout.write(f.read())
pad_file(fout, alignment)
def write_entries_padded(self, fout, alignment):
for entry in self.entries:
fout.write(pack('I', entry.ramdisk_size))
fout.write(pack('I', entry.ramdisk_offset))
fout.write(pack('I', entry.ramdisk_type))
fout.write(pack(f'{VENDOR_RAMDISK_NAME_SIZE}s',
entry.ramdisk_name))
fout.write(entry.board_id)
pad_file(fout, alignment)
def write_padded_file(f_out, f_in, padding):
if f_in is None:
return
f_out.write(f_in.read())
pad_file(f_out, padding)
def parse_int(x):
return int(x, 0)
def parse_os_version(x):
match = re.search(r'^(\d{1,3})(?:\.(\d{1,3})(?:\.(\d{1,3}))?)?', x)
if match:
a = int(match.group(1))
b = c = 0
if match.lastindex >= 2:
b = int(match.group(2))
if match.lastindex == 3:
c = int(match.group(3))
# 7 bits allocated for each field
assert a < 128
assert b < 128
assert c < 128
return (a << 14) | (b << 7) | c
return 0
def parse_os_patch_level(x):
match = re.search(r'^(\d{4})-(\d{2})(?:-(\d{2}))?', x)
if match:
y = int(match.group(1)) - 2000
m = int(match.group(2))
# 7 bits allocated for the year, 4 bits for the month
assert 0 <= y < 128
assert 0 < m <= 12
return (y << 4) | m
return 0
def parse_vendor_ramdisk_type(x):
type_dict = {
'none': VENDOR_RAMDISK_TYPE_NONE,
'platform': VENDOR_RAMDISK_TYPE_PLATFORM,
'recovery': VENDOR_RAMDISK_TYPE_RECOVERY,
'dlkm': VENDOR_RAMDISK_TYPE_DLKM,
}
if x.lower() in type_dict:
return type_dict[x.lower()]
return parse_int(x)
def get_vendor_boot_v4_usage():
return """vendor boot version 4 arguments:
--ramdisk_type {none,platform,recovery,dlkm}
specify the type of the ramdisk
--ramdisk_name NAME
specify the name of the ramdisk
--board_id{0..15} NUMBER
specify the value of the board_id vector, defaults to 0
--vendor_ramdisk_fragment VENDOR_RAMDISK_FILE
path to the vendor ramdisk file
These options can be specified multiple times, where each vendor ramdisk
option group ends with a --vendor_ramdisk_fragment option.
Each option group appends an additional ramdisk to the vendor boot image.
"""
def parse_vendor_ramdisk_args(args, args_list):
"""Parses vendor ramdisk specific arguments.
Args:
args: An argparse.Namespace object. Parsed results are stored into this
object.
args_list: A list of argument strings to be parsed.
Returns:
A list argument strings that are not parsed by this method.
"""
parser = ArgumentParser(add_help=False)
parser.add_argument('--ramdisk_type', type=parse_vendor_ramdisk_type,
default=VENDOR_RAMDISK_TYPE_NONE)
parser.add_argument('--ramdisk_name',
type=AsciizBytes(bufsize=VENDOR_RAMDISK_NAME_SIZE),
required=True)
for i in range(VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE):
parser.add_argument(f'--board_id{i}', type=parse_int, default=0)
parser.add_argument(PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT, required=True)
unknown_args = []
vendor_ramdisk_table_builder = VendorRamdiskTableBuilder()
if args.vendor_ramdisk is not None:
vendor_ramdisk_table_builder.add_entry(
args.vendor_ramdisk.name, VENDOR_RAMDISK_TYPE_PLATFORM, b'', None)
while PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT in args_list:
idx = args_list.index(PARSER_ARGUMENT_VENDOR_RAMDISK_FRAGMENT) + 2
vendor_ramdisk_args = args_list[:idx]
args_list = args_list[idx:]
ramdisk_args, extra_args = parser.parse_known_args(vendor_ramdisk_args)
ramdisk_args_dict = vars(ramdisk_args)
unknown_args.extend(extra_args)
ramdisk_path = ramdisk_args.vendor_ramdisk_fragment
ramdisk_type = ramdisk_args.ramdisk_type
ramdisk_name = ramdisk_args.ramdisk_name
board_id = [ramdisk_args_dict[f'board_id{i}']
for i in range(VENDOR_RAMDISK_TABLE_ENTRY_BOARD_ID_SIZE)]
vendor_ramdisk_table_builder.add_entry(ramdisk_path, ramdisk_type,
ramdisk_name, board_id)
if len(args_list) > 0:
unknown_args.extend(args_list)
args.vendor_ramdisk_total_size = (vendor_ramdisk_table_builder
.ramdisk_total_size)
args.vendor_ramdisk_table_entry_num = len(vendor_ramdisk_table_builder
.entries)
args.vendor_ramdisk_table_builder = vendor_ramdisk_table_builder
return unknown_args
def parse_cmdline():
version_parser = ArgumentParser(add_help=False)
version_parser.add_argument('--header_version', type=parse_int, default=0)
if version_parser.parse_known_args()[0].header_version < 3:
# For boot header v0 to v2, the kernel commandline field is split into
# two fields, cmdline and extra_cmdline. Both fields are asciiz strings,
# so we minus one here to ensure the encoded string plus the
# null-terminator can fit in the buffer size.
cmdline_size = BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE - 1
else:
cmdline_size = BOOT_ARGS_SIZE + BOOT_EXTRA_ARGS_SIZE
parser = ArgumentParser(formatter_class=RawDescriptionHelpFormatter,
epilog=get_vendor_boot_v4_usage())
parser.add_argument('--kernel', type=FileType('rb'),
help='path to the kernel')
parser.add_argument('--ramdisk', type=FileType('rb'),
help='path to the ramdisk')
parser.add_argument('--second', type=FileType('rb'),
help='path to the second bootloader')
parser.add_argument('--dtb', type=FileType('rb'), help='path to the dtb')
dtbo_group = parser.add_mutually_exclusive_group()
dtbo_group.add_argument('--recovery_dtbo', type=FileType('rb'),
help='path to the recovery DTBO')
dtbo_group.add_argument('--recovery_acpio', type=FileType('rb'),
metavar='RECOVERY_ACPIO', dest='recovery_dtbo',
help='path to the recovery ACPIO')
parser.add_argument('--cmdline', type=AsciizBytes(bufsize=cmdline_size),
default='', help='kernel command line arguments')
parser.add_argument('--vendor_cmdline',
type=AsciizBytes(bufsize=VENDOR_BOOT_ARGS_SIZE),
default='',
help='vendor boot kernel command line arguments')
parser.add_argument('--base', type=parse_int, default=0x10000000,
help='base address')
parser.add_argument('--kernel_offset', type=parse_int, default=0x00008000,
help='kernel offset')
parser.add_argument('--ramdisk_offset', type=parse_int, default=0x01000000,
help='ramdisk offset')
parser.add_argument('--second_offset', type=parse_int, default=0x00f00000,
help='second bootloader offset')
parser.add_argument('--dtb_offset', type=parse_int, default=0x01f00000,
help='dtb offset')
parser.add_argument('--os_version', type=parse_os_version, default=0,
help='operating system version')
parser.add_argument('--os_patch_level', type=parse_os_patch_level,
default=0, help='operating system patch level')
parser.add_argument('--tags_offset', type=parse_int, default=0x00000100,
help='tags offset')
parser.add_argument('--board', type=AsciizBytes(bufsize=BOOT_NAME_SIZE),
default='', help='board name')
parser.add_argument('--pagesize', type=parse_int,
choices=[2**i for i in range(11, 15)], default=2048,
help='page size')
parser.add_argument('--id', action='store_true',
help='print the image ID on standard output')
parser.add_argument('--header_version', type=parse_int, default=0,
help='boot image header version')
parser.add_argument('-o', '--output', type=FileType('wb'),
help='output file name')
parser.add_argument('--gki_signing_algorithm',
help='GKI signing algorithm to use')
parser.add_argument('--gki_signing_key',
help='path to RSA private key file')
parser.add_argument('--gki_signing_signature_args',
help='other hash arguments passed to avbtool')
parser.add_argument('--gki_signing_avbtool_path',
help='path to avbtool for boot signature generation')
parser.add_argument('--vendor_boot', type=FileType('wb'),
help='vendor boot output file name')
parser.add_argument('--vendor_ramdisk', type=FileType('rb'),
help='path to the vendor ramdisk')
parser.add_argument('--vendor_bootconfig', type=FileType('rb'),
help='path to the vendor bootconfig file')
args, extra_args = parser.parse_known_args()
if args.vendor_boot is not None and args.header_version > 3:
extra_args = parse_vendor_ramdisk_args(args, extra_args)
if len(extra_args) > 0:
raise ValueError(f'Unrecognized arguments: {extra_args}')
if args.header_version < 3:
args.extra_cmdline = args.cmdline[BOOT_ARGS_SIZE-1:]
args.cmdline = args.cmdline[:BOOT_ARGS_SIZE-1] + b'\x00'
assert len(args.cmdline) <= BOOT_ARGS_SIZE
assert len(args.extra_cmdline) <= BOOT_EXTRA_ARGS_SIZE
return args
def add_boot_image_signature(args, pagesize):
"""Adds the boot image signature.
Note that the signature will only be verified in VTS to ensure a
generic boot.img is used. It will not be used by the device
bootloader at boot time. The bootloader should only verify
the boot vbmeta at the end of the boot partition (or in the top-level
vbmeta partition) via the Android Verified Boot process, when the
device boots.
"""
args.output.flush() # Flush the buffer for signature calculation.
# Appends zeros if the signing key is not specified.
if not args.gki_signing_key or not args.gki_signing_algorithm:
zeros = b'\x00' * BOOT_IMAGE_V4_SIGNATURE_SIZE
args.output.write(zeros)
pad_file(args.output, pagesize)
return
avbtool = 'avbtool' # Used from otatools.zip or Android build env.
# We need to specify the path of avbtool in build/core/Makefile.
# Because avbtool is not guaranteed to be in $PATH there.
if args.gki_signing_avbtool_path:
avbtool = args.gki_signing_avbtool_path
# Need to specify a value of --partition_size for avbtool to work.
# We use 64 MB below, but avbtool will not resize the boot image to
# this size because --do_not_append_vbmeta_image is also specified.
avbtool_cmd = [
avbtool, 'add_hash_footer',
'--partition_name', 'boot',
'--partition_size', str(64 * 1024 * 1024),
'--image', args.output.name,
'--algorithm', args.gki_signing_algorithm,
'--key', args.gki_signing_key,
'--salt', 'd00df00d'] # TODO: use a hash of kernel/ramdisk as the salt.
# Additional arguments passed to avbtool.
if args.gki_signing_signature_args:
avbtool_cmd += args.gki_signing_signature_args.split()
# Outputs the signed vbmeta to a separate file, then append to boot.img
# as the boot signature.
with tempfile.TemporaryDirectory() as temp_out_dir:
boot_signature_output = os.path.join(temp_out_dir, 'boot_signature')
avbtool_cmd += ['--do_not_append_vbmeta_image',
'--output_vbmeta_image', boot_signature_output]
subprocess.check_call(avbtool_cmd)
with open(boot_signature_output, 'rb') as boot_signature:
if filesize(boot_signature) > BOOT_IMAGE_V4_SIGNATURE_SIZE:
raise ValueError(
f'boot sigature size is > {BOOT_IMAGE_V4_SIGNATURE_SIZE}')
write_padded_file(args.output, boot_signature, pagesize)
def write_data(args, pagesize):
write_padded_file(args.output, args.kernel, pagesize)
write_padded_file(args.output, args.ramdisk, pagesize)
write_padded_file(args.output, args.second, pagesize)
if args.header_version > 0 and args.header_version < 3:
write_padded_file(args.output, args.recovery_dtbo, pagesize)
if args.header_version == 2:
write_padded_file(args.output, args.dtb, pagesize)
if args.header_version >= 4:
add_boot_image_signature(args, pagesize)
def write_vendor_boot_data(args):
if args.header_version > 3:
builder = args.vendor_ramdisk_table_builder
builder.write_ramdisks_padded(args.vendor_boot, args.pagesize)
write_padded_file(args.vendor_boot, args.dtb, args.pagesize)
builder.write_entries_padded(args.vendor_boot, args.pagesize)
write_padded_file(args.vendor_boot, args.vendor_bootconfig,
args.pagesize)
else:
write_padded_file(args.vendor_boot, args.vendor_ramdisk, args.pagesize)
write_padded_file(args.vendor_boot, args.dtb, args.pagesize)
def main():
args = parse_cmdline()
if args.vendor_boot is not None:
if args.header_version not in {3, 4}:
raise ValueError(
'--vendor_boot not compatible with given header version')
if args.header_version == 3 and args.vendor_ramdisk is None:
raise ValueError('--vendor_ramdisk missing or invalid')
write_vendor_boot_header(args)
write_vendor_boot_data(args)
if args.output is not None:
if args.second is not None and args.header_version > 2:
raise ValueError(
'--second not compatible with given header version')
img_id = write_header(args)
if args.header_version > 2:
write_data(args, BOOT_IMAGE_HEADER_V3_PAGESIZE)
else:
write_data(args, args.pagesize)
if args.id and img_id is not None:
print('0x' + ''.join(f'{octet:02x}' for octet in img_id))
if __name__ == '__main__':
main()

View File

@@ -103,29 +103,11 @@ if [ -f "${BM_BOOTFS}" ]; then
BM_BOOTFS=/tmp/bootfs
fi
# If BM_KERNEL and BM_DTS is present
if [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
if [ -z "${BM_KERNEL}" ] || [ -z "${BM_DTB}" ]; then
echo "This machine cannot be tested with external kernel since BM_KERNEL or BM_DTB missing!"
exit 1
fi
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o "${BM_KERNEL}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_DTB}.dtb" -o "${BM_DTB}.dtb"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst" -o modules.tar.zst
fi
date +'%F %T'
# Install kernel modules (it could be either in /lib/modules or
# /usr/lib/modules, but we want to install in the latter)
if [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C /nfs/
rm modules.tar.zst &
elif [ -n "${BM_BOOTFS}" ]; then
if [ -n "${BM_BOOTFS}" ]; then
[ -d $BM_BOOTFS/usr/lib/modules ] && rsync -a $BM_BOOTFS/usr/lib/modules/ /nfs/usr/lib/modules/
[ -d $BM_BOOTFS/lib/modules ] && rsync -a $BM_BOOTFS/lib/modules/ /nfs/lib/modules/
else
@@ -136,7 +118,7 @@ fi
date +'%F %T'
# Install kernel image + bootloader files
if [ -n "${EXTERNAL_KERNEL_TAG}" ] || [ -z "$BM_BOOTFS" ]; then
if [ -z "$BM_BOOTFS" ]; then
mv "${BM_KERNEL}" "${BM_DTB}.dtb" /tftp/
else # BM_BOOTFS
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
@@ -144,33 +126,6 @@ fi
date +'%F %T'
# Set up the pxelinux config for Jetson Nano
mkdir -p /tftp/pxelinux.cfg
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra210-p3450-0000
PROMPT 0
TIMEOUT 30
DEFAULT primary
MENU TITLE jetson nano boot options
LABEL primary
MENU LABEL CI kernel on TFTP
LINUX Image
FDT tegra210-p3450-0000.dtb
APPEND \${cbootargs} $BM_CMDLINE
EOF
# Set up the pxelinux config for Jetson TK1
cat <<EOF >/tftp/pxelinux.cfg/default-arm-tegra124-jetson-tk1
PROMPT 0
TIMEOUT 30
DEFAULT primary
MENU TITLE jetson TK1 boot options
LABEL primary
MENU LABEL CI kernel on TFTP
LINUX zImage
FDT tegra124-jetson-tk1.dtb
APPEND \${cbootargs} $BM_CMDLINE
EOF
# Create the rootfs in the NFS directory
. $BM/rootfs-setup.sh /nfs

View File

@@ -87,12 +87,11 @@ class PoERun:
self.print_error("nouveau jetson tk1 network fail, abandoning run.")
return 1
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
result = re.search(r"hwci: mesa: exit_code: (\d+)", line)
if result:
status = result.group(1)
exit_code = int(result.group(2))
exit_code = int(result.group(1))
if status == "pass":
if exit_code == 0:
self.logger.update_dut_job("status", "pass")
else:
self.logger.update_status_fail("test fail")

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
filter_env_vars | tee $rootfs_dst/set-job-env-vars.sh
set -x

View File

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

View File

@@ -0,0 +1,95 @@
.meson-build-for-tests:
extends:
- .build-linux
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
# Shared between windows and Linux
.build-common:
extends: .build-rules
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
variables:
# 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: 16m
# We don't want to download any previous job's artifacts
dependencies: []
artifacts:
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
when: always
paths:
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log
- artifacts
.build-run-long:
variables:
BUILD_JOB_TIMEOUT: 18m
timeout: 25m
# Just Linux
.build-linux:
extends: .build-common
variables:
C_ARGS: >
-Wno-error=deprecated-declarations
CCACHE_COMPILERCHECK: "content"
CCACHE_COMPRESS: "true"
CCACHE_DIR: /cache/mesa/ccache
# Use ccache transparently, and print stats before/after
before_script:
- !reference [default, before_script]
- |
export PATH="/usr/lib/ccache:$PATH"
export CCACHE_BASEDIR="$PWD"
if test -x /usr/bin/ccache; then
section_start ccache_before "ccache stats before build"
ccache --show-stats
section_end ccache_before
fi
after_script:
- if test -x /usr/bin/ccache; then ccache --show-stats | grep "Hits:"; fi
- !reference [default, after_script]
.build-windows:
extends:
- .build-common
- .windows-docker-tags
cache:
key: ${CI_JOB_NAME}
paths:
- subprojects/packagecache
.ci-deqp-artifacts:
artifacts:
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME_SLUG}"
when: always
untracked: false
paths:
# Watch out! Artifacts are relative to the build dir.
# https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521
- artifacts
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log

View File

@@ -1,102 +1,31 @@
# Shared between windows and Linux
.build-common:
extends: .container+build-rules
# 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
RUN_MESON_TESTS: "true"
timeout: 1h
# We don't want to download any previous job's artifacts
dependencies: []
artifacts:
name: "{CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
paths:
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log
- artifacts
include:
- local: '.gitlab-ci/build/gitlab-ci-inc.yml'
# Just Linux
.build-linux:
extends: .build-common
variables:
CCACHE_COMPILERCHECK: "content"
CCACHE_COMPRESS: "true"
CCACHE_DIR: /cache/mesa/ccache
# Use ccache transparently, and print stats before/after
before_script:
- !reference [default, before_script]
- |
export PATH="/usr/lib/ccache:$PATH"
export CCACHE_BASEDIR="$PWD"
if test -x /usr/bin/ccache; then
section_start ccache_before "ccache stats before build"
ccache --show-stats
section_end ccache_before
fi
after_script:
- if test -x /usr/bin/ccache; then ccache --show-stats | grep "Hits:"; fi
- !reference [default, after_script]
# Git archive
.build-windows:
make-git-archive:
extends:
- .build-common
- .windows-docker-tags
cache:
key: ${CI_JOB_NAME}
paths:
- subprojects/packagecache
.meson-build:
extends:
- .build-linux
- .use-debian/x86_64_build
stage: build-only
- .fdo.ci-fairy
stage: git-archive
rules:
- !reference [.scheduled_pipeline-rules, rules]
script:
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} .gitlab-ci/meson/build.sh
# Compactify the .git directory
- git gc --aggressive
# Download & cache the perfetto subproject as well.
- 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
# 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
debian-testing:
debian-x86_64:
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
@@ -105,7 +34,6 @@ debian-testing:
-D glx=dri
-D platforms=x11,wayland
GALLIUM_ST: >
-D gallium-nine=false
-D gallium-rusticl=true
-D gallium-va=enabled
GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,iris,svga"
@@ -117,43 +45,38 @@ debian-testing:
-D tools=drm-shim
-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
RUN_MESON_TESTS: "false" # debian-build-x86_64 already runs these
artifacts:
reports:
junit: artifacts/ci_scripts_report.xml
debian-testing-asan:
debian-x86_64-asan:
extends:
- debian-testing
stage: build-for-tests
- debian-x86_64
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "swrast"
GALLIUM_DRIVERS: "llvmpipe,softpipe"
C_ARGS: >
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
EXTRA_OPTION: >
-D b_sanitize=address
-D gallium-va=false
-D gallium-nine=false
-D gallium-rusticl=false
-D mesa-clc=system
-D tools=dlclose-skip
-D valgrind=disabled
S3_ARTIFACT_NAME: ""
S3_ARTIFACT_NAME: mesa-x86_64-asan-${BUILDTYPE}
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc (asan complains not being loaded as
# the first library)
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-rusticl=false
-D gallium-nine=false
-D gallium-drivers=
-D glx=disabled
-D install-mesa-clc=true
@@ -162,19 +85,20 @@ debian-testing-asan:
-D video-codecs=
-D vulkan-drivers=
debian-testing-msan:
debian-x86_64-msan:
# https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
# 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:
@@ -183,13 +107,26 @@ debian-testing-msan:
MESON_TEST_ARGS: "--suite glcpp --suite format"
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
C_ARGS: >
-Wno-error=constant-conversion
-Wno-error=enum-conversion
-Wno-error=initializer-overrides
-Wno-error=sometimes-uninitialized
-Werror=misleading-indentation
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=c99-designator
-Wno-error=overloaded-virtual
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=unused-private-field
-Wno-error=vla-cxx-extension
-Wno-error=deprecated-declarations
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc and precomp-compiler (msan complains about uninitialized
# values in the LLVM libs)
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=
@@ -197,34 +134,35 @@ 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:
debian-x86_64-ubsan:
extends:
- debian-testing
stage: build-for-tests
timeout: 40m
- debian-x86_64
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=array-bounds
GALLIUM_DRIVERS: "swrast"
GALLIUM_DRIVERS: "llvmpipe,softpipe"
VULKAN_DRIVERS: "swrast"
EXTRA_OPTION: >
-D b_sanitize=undefined
-D mesa-clc=system
-D gallium-rusticl=false
-D gallium-va=false
-D gallium-nine=false
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
RUN_MESON_TESTS: "false" # just too slow
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-rusticl=false
-D gallium-drivers=
-D vulkan-drivers=
@@ -234,80 +172,49 @@ debian-testing-ubsan:
-D mesa-clc=enabled
-D install-mesa-clc=true
debian-build-testing:
extends: .meson-build
stage: build-for-tests
debian-build-x86_64:
extends:
- .meson-build-for-tests
- .use-debian/x86_64_build
variables:
BUILDTYPE: debug
UNWIND: "enabled"
C_ARGS: >
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
-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
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=true
-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
S3_ARTIFACT_NAME: debian-build-x86_64
# 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: >
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -318,40 +225,35 @@ debian-release:
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
-D gallium-rusticl=false
-D llvm=enabled
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
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"
S3_ARTIFACT_NAME: "mesa-x86_64-default-${BUILDTYPE}"
script:
- *meson-build
- !reference [.meson-build-only, script]
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
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=deprecated-declarations
DRI_LOADERS: >
-D glx=disabled
-D gbm=enabled
@@ -363,8 +265,6 @@ alpine-build-testing:
-D gallium-extra-hud=true
-D gallium-vdpau=disabled
-D gallium-va=enabled
-D gallium-xa=disabled
-D gallium-nine=true
-D gallium-rusticl=false
-D gles1=disabled
-D gles2=enabled
@@ -373,15 +273,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
@@ -392,9 +293,11 @@ fedora-release:
-Wno-error=stringop-overread
-Wno-error=array-bounds
-Wno-error=maybe-uninitialized
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=dangling-reference
-Wno-error=overloaded-virtual
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -402,7 +305,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
@@ -413,8 +315,6 @@ fedora-release:
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
-D gallium-rusticl=true
-D gles1=disabled
-D gles2=enabled
@@ -430,9 +330,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"
@@ -442,11 +340,13 @@ debian-android:
-Wno-error=enum-conversion
-Wno-error=initializer-overrides
-Wno-error=sometimes-uninitialized
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=c99-designator
-Wno-error=unused-variable
-Wno-error=unused-but-set-variable
-Wno-error=self-assign
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=disabled
-D gbm=disabled
@@ -455,23 +355,22 @@ debian-android:
-D platforms=android
FORCE_FALLBACK_FOR: llvm
EXTRA_OPTION: >
-D amd-use-llvm=false
-D android-stub=true
-D platform-sdk-version=${ANDROID_SDK_VERSION}
-D cpp_rtti=false
-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
-D gallium-xa=disabled
-D gallium-nine=false
-D gallium-rusticl=false
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
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=
@@ -479,26 +378,32 @@ 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:
# x86_64 build:
- export CROSS=x86_64-linux-android
- export GALLIUM_DRIVERS=iris,radeonsi,softpipe,virgl,zink
- export VULKAN_DRIVERS=amd,intel,swrast,virtio
- .gitlab-ci/create-llvm-meson-wrap-file.sh
- !reference [.meson-build-for-tests, script]
# 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
# 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 VULKAN_DRIVERS=intel,virtio,swrast
- .gitlab-ci/create-llvm-meson-wrap-file.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
- !reference [.meson-build-only, script]
.meson-cross:
extends:
- .meson-build
- .meson-build-only
- .use-debian/x86_64_build
variables:
UNWIND: "disabled"
DRI_LOADERS: >
@@ -506,31 +411,24 @@ 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
-D gallium-xa=disabled
-D gallium-nine=false
.meson-arm:
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 +440,32 @@ 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-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:
@@ -567,18 +477,19 @@ debian-arm32-asan:
-D tools=dlclose-skip
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm32-asan-${BUILDTYPE}
debian-arm64:
extends:
- .meson-arm
- .ci-deqp-artifacts
stage: build-for-tests
- .meson-build-for-tests
variables:
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
DRI_LOADERS:
@@ -590,20 +501,19 @@ debian-arm64:
-D teflon=true
GALLIUM_ST:
-D gallium-rusticl=true
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
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"
C_ARGS: >
-Wno-error=deprecated-declarations
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@@ -612,21 +522,22 @@ debian-arm64-asan:
-D tools=dlclose-skip
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
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: >
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=array-bounds
-fno-var-tracking-assignments
@@ -636,16 +547,14 @@ debian-arm64-ubsan:
-D b_sanitize=undefined
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm64-ubsan-${BUILDTYPE}
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,47 +566,40 @@ 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}
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
script:
- *meson-build
- !reference [.meson-build-only, script]
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
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"
BUILDTYPE: release
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
-Wno-error=stringop-overread
-Wno-error=deprecated-declarations
EXTRA_OPTION: >
-D freedreno-kmds=kgsl
-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"
@@ -707,12 +609,14 @@ debian-clang:
-Wno-error=initializer-overrides
-Wno-error=sometimes-uninitialized
-Werror=misleading-indentation
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=c99-designator
-Wno-error=overloaded-virtual
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=unused-private-field
-Wno-error=vla-cxx-extension
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -723,24 +627,22 @@ debian-clang:
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=true
-D gles1=enabled
-D gles2=enabled
-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,11 +650,25 @@ 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"
C_ARGS: >
-Wno-error=constant-conversion
-Wno-error=enum-conversion
-Wno-error=initializer-overrides
-Wno-error=sometimes-uninitialized
-Wno-error=deprecated-declarations
CPP_ARGS: >
-Wno-error=c99-designator
-Wno-error=overloaded-virtual
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=unused-private-field
-Wno-error=vla-cxx-extension
-Wno-error=deprecated-declarations
DRI_LOADERS: >
-D glx=xlib
-D platforms=x11,wayland
@@ -760,14 +676,11 @@ debian-clang-release:
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=true
-D gles1=disabled
-D gles2=disabled
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D shared-glapi=disabled
windows-msvc:
extends:
@@ -783,12 +696,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,12 +711,9 @@ 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
-D gallium-xa=disabled
-D gallium-nine=false
-D gallium-rusticl=false
-D b_sanitize=undefined
-D c_args=-fno-sanitize-recover=all
@@ -814,6 +722,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 +731,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
@@ -835,6 +743,8 @@ debian-x86_32:
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D mesa-clc=system
CPP_ARGS: >
-Wno-error=deprecated-declarations
C_LINK_ARGS: >
-Wl,--no-warn-rwx-segments
CPP_LINK_ARGS: >
@@ -842,7 +752,6 @@ debian-x86_32:
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
@@ -858,11 +767,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,29 +782,11 @@ 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
# This job emits our scripts into artifacts so they can be reused for
# job submission to hardware devices.
python-artifacts:
stage: build-for-tests
extends:
- .use-debian/x86_64_pyutils
- .build-common
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

@@ -0,0 +1,268 @@
# For CI-tron based testing farm jobs.
.ci-tron-test:
extends:
- .ci-tron-b2c-job-v1
variables:
GIT_STRATEGY: none
B2C_VERSION: v0.9.15.1 # Linux 6.13.7
SCRIPTS_DIR: install
CI_TRON_PATTERN__JOB_SUCCESS__REGEX: 'hwci: mesa: exit_code: 0\r$'
CI_TRON_PATTERN__SESSION_END__REGEX: '^.*It''s now safe to turn off your computer\r$'
CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__MINUTES: 2
CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__RETRIES: 3
CI_TRON_TIMEOUT__CONSOLE_ACTIVITY__MINUTES: 5
CI_TRON__B2C_ARTIFACT_EXCLUSION: "*.shader_cache,install/*,*/install/*,*/vkd3d-proton.cache*,vkd3d-proton.cache*,*.qpa"
CI_TRON_HTTP_ARTIFACT__INSTALL__PATH: "/install.tar.zst"
CI_TRON_HTTP_ARTIFACT__INSTALL__URL: "https://$PIPELINE_ARTIFACTS_BASE/$S3_ARTIFACT_NAME.tar.zst"
CI_TRON__B2C_MACHINE_REGISTRATION_CMD: "setup --tags $CI_TRON_DUT_SETUP_TAGS"
CI_TRON__B2C_IMAGE_UNDER_TEST: $MESA_IMAGE
CI_TRON__B2C_EXEC_CMD: "curl --silent --fail-with-body {{ job.http.url }}$CI_TRON_HTTP_ARTIFACT__INSTALL__PATH | tar --zstd --extract && $SCRIPTS_DIR/common/init-stage2.sh"
# Assume by default this is running deqp, as that's almost always true
HWCI_TEST_SCRIPT: install/deqp-runner.sh
# Keep the job script in the artifacts
CI_TRON_JOB_SCRIPT_PATH: results/job_script.sh
needs:
- !reference [.required-for-hardware-jobs, needs]
tags:
- farm:$RUNNER_FARM_LOCATION
- $CI_TRON_DUT_SETUP_TAGS
# Override the default before_script, as it is not compatible with the CI-tron environment. We just keep the clearing
# of the JWT token for security reasons
before_script:
- |
set -eu
eval "$S3_JWT_FILE_SCRIPT"
for var in CI_TRON_DUT_SETUP_TAGS; do
if [[ -z "$(eval echo \${$var:-})" ]]; then
echo "The required variable '$var' is missing"
exit 1
fi
done
# Open a section that will be closed by b2c
echo -e "\n\e[0Ksection_start:`date +%s`:b2c_kernel_boot[collapsed=true]\r\e[0K\e[0;36m[$(cut -d ' ' -f1 /proc/uptime)]: Submitting the CI-tron job and booting the DUT\e[0m\n"
# 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_SLUG}"
paths:
- results
reports:
junit: results/**/junit.xml
.ci-tron-x86_64-test:
extends:
- .ci-tron-test
variables:
CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_amd64.cpio.xz'
CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64'
# Set the following variables if you need AMD, Intel, or NVIDIA support
# CI_TRON_INITRAMFS__DEPMOD__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.depmod.cpio.xz"
# CI_TRON_INITRAMFS__GPU__URL: "https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-x86_64.gpu.cpio"
# CI_TRON_INITRAMFS__GPU__FORMAT__0__ARCHIVE__KEEP__0__PATH: "(lib/(modules|firmware/amdgpu)/.*)"
S3_ARTIFACT_NAME: "mesa-x86_64-default-debugoptimized"
.ci-tron-x86_64-test-vk:
extends:
- .use-debian/x86_64_test-vk
- .ci-tron-x86_64-test
needs:
- job: debian/x86_64_test-vk
artifacts: false
optional: true
- job: debian-x86_64
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-vk-manual:
extends:
- .use-debian/x86_64_test-vk
- .ci-tron-x86_64-test
variables:
S3_ARTIFACT_NAME: "debian-build-x86_64"
needs:
- job: debian/x86_64_test-vk
artifacts: false
optional: true
- job: debian-build-x86_64
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-gl:
extends:
- .use-debian/x86_64_test-gl
- .ci-tron-x86_64-test
needs:
- job: debian/x86_64_test-gl
artifacts: false
optional: true
- job: debian-x86_64
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-x86_64-test-gl-manual:
extends:
- .use-debian/x86_64_test-gl
- .ci-tron-x86_64-test
variables:
S3_ARTIFACT_NAME: "debian-build-x86_64"
needs:
- job: debian/x86_64_test-gl
artifacts: false
optional: true
- job: debian-build-x86_64
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test:
extends:
- .ci-tron-test
variables:
CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_arm64.cpio.xz'
CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-arm64'
S3_ARTIFACT_NAME: "mesa-arm64-default-debugoptimized"
.ci-tron-arm64-test-vk:
extends:
- .use-debian/arm64_test-vk
- .ci-tron-arm64-test
needs:
- job: debian/arm64_test-vk
artifacts: false
optional: true
- job: debian-arm64
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-asan-vk:
extends:
- .use-debian/arm64_test-vk
- .ci-tron-arm64-test
variables:
S3_ARTIFACT_NAME: "mesa-arm64-asan-debugoptimized"
DEQP_FORCE_ASAN: 1
needs:
- job: debian/arm64_test-vk
artifacts: false
optional: true
- job: debian-arm64-asan
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-ubsan-vk:
extends:
- .use-debian/arm64_test-vk
- .ci-tron-arm64-test
variables:
S3_ARTIFACT_NAME: "mesa-arm64-ubsan-debugoptimized"
needs:
- job: debian/arm64_test-vk
artifacts: false
optional: true
- job: debian-arm64-ubsan
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-gl:
extends:
- .use-debian/arm64_test-gl
- .ci-tron-arm64-test
needs:
- job: debian/arm64_test-gl
artifacts: false
optional: true
- job: debian-arm64
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-asan-gl:
extends:
- .use-debian/arm64_test-gl
- .ci-tron-arm64-test
variables:
S3_ARTIFACT_NAME: "mesa-arm64-asan-debugoptimized"
DEQP_FORCE_ASAN: 1
needs:
- job: debian/arm64_test-gl
artifacts: false
optional: true
- job: debian-arm64-asan
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm64-test-ubsan-gl:
extends:
- .use-debian/arm64_test-gl
- .ci-tron-arm64-test
variables:
S3_ARTIFACT_NAME: "mesa-arm64-ubsan-debugoptimized"
needs:
- job: debian/arm64_test-gl
artifacts: false
optional: true
- job: debian-arm64-ubsan
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm32-test:
extends:
- .ci-tron-test
variables:
CI_TRON_INITRAMFS__B2C__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/initramfs.linux_arm.cpio.xz'
CI_TRON_KERNEL__URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/$B2C_VERSION/downloads/linux-arm'
S3_ARTIFACT_NAME: "mesa-arm32-default-debugoptimized"
.ci-tron-arm32-test-vk:
extends:
- .use-debian/arm32_test-vk
- .ci-tron-arm32-test
needs:
- job: debian/arm32_test-vk
artifacts: false
optional: true
- job: debian-arm32
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm32-test-gl:
extends:
- .use-debian/arm32_test-gl
- .ci-tron-arm32-test
needs:
- job: debian/arm32_test-gl
artifacts: false
optional: true
- job: debian-arm32
artifacts: false
- !reference [.ci-tron-test, needs]
.ci-tron-arm32-test-asan-gl:
extends:
- .use-debian/arm32_test-gl
- .ci-tron-arm32-test
variables:
S3_ARTIFACT_NAME: "mesa-arm32-asan-debugoptimized"
DEQP_FORCE_ASAN: 1
needs:
- job: debian/arm32_test-gl
artifacts: false
optional: true
- job: debian-arm32-asan
artifacts: false
- !reference [.ci-tron-test, needs]

View File

@@ -1,139 +0,0 @@
#!/bin/bash
VARS=(
ACO_DEBUG
ARTIFACTS_BASE_URL
ASAN_OPTIONS
BASE_SYSTEM_FORK_HOST_PREFIX
BASE_SYSTEM_MAINLINE_HOST_PREFIX
CI_COMMIT_BRANCH
CI_COMMIT_REF_NAME
CI_COMMIT_TITLE
CI_JOB_ID
S3_JWT_FILE
CI_JOB_STARTED_AT
CI_JOB_NAME
CI_JOB_URL
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
CI_MERGE_REQUEST_TITLE
CI_NODE_INDEX
CI_NODE_TOTAL
CI_PAGES_DOMAIN
CI_PIPELINE_ID
CI_PIPELINE_URL
CI_PROJECT_DIR
CI_PROJECT_NAME
CI_PROJECT_PATH
CI_PROJECT_ROOT_NAMESPACE
CI_RUNNER_DESCRIPTION
CI_SERVER_URL
CROSVM_GALLIUM_DRIVER
CROSVM_GPU_ARGS
CURRENT_SECTION
DEQP_BIN_DIR
DEQP_FORCE_ASAN
DEQP_FRACTION
DEQP_RUNNER_MAX_FAILS
DEQP_SUITE
DEQP_TEMP_DIR
DEVICE_NAME
DRIVER_NAME
EGL_PLATFORM
ETNA_MESA_DEBUG
FDO_CI_CONCURRENT
FDO_HTTP_CACHE_URI
FDO_UPSTREAM_REPO
FD_MESA_DEBUG
FLAKES_CHANNEL
FLUSTER_CODECS
FLUSTER_FRACTION
FLUSTER_VECTORS_VERSION
FREEDRENO_HANGCHECK_MS
GALLIUM_DRIVER
GALLIVM_PERF
GPU_VERSION
GTEST
GTEST_FAILS
GTEST_FRACTION
GTEST_RUNNER_OPTIONS
GTEST_SKIPS
HWCI_FREQ_MAX
HWCI_KERNEL_MODULES
HWCI_KVM
HWCI_START_WESTON
HWCI_START_XORG
HWCI_TEST_ARGS
HWCI_TEST_SCRIPT
IR3_SHADER_DEBUG
JOB_ARTIFACTS_BASE
JOB_RESULTS_PATH
JOB_ROOTFS_OVERLAY_PATH
KERNEL_IMAGE_BASE
KERNEL_IMAGE_NAME
LD_LIBRARY_PATH
LIBGL_ALWAYS_SOFTWARE
LP_NUM_THREADS
MESA_BASE_TAG
MESA_BUILD_PATH
MESA_DEBUG
MESA_GLES_VERSION_OVERRIDE
MESA_GLSL_VERSION_OVERRIDE
MESA_GL_VERSION_OVERRIDE
MESA_IMAGE
MESA_IMAGE_PATH
MESA_IMAGE_TAG
MESA_LOADER_DRIVER_OVERRIDE
MESA_SPIRV_LOG_LEVEL
MESA_TEMPLATES_COMMIT
MESA_VK_ABORT_ON_DEVICE_LOSS
MESA_VK_IGNORE_CONFORMANCE_WARNING
S3_HOST
S3_RESULTS_UPLOAD
NIR_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_ARTIFACTS_BASE_URL
PIGLIT_REPLAY_DEVICE_NAME
PIGLIT_REPLAY_EXTRA_ARGS
PIGLIT_REPLAY_LOOP_TIMES
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE
PIGLIT_REPLAY_SUBCOMMAND
PIGLIT_RESULTS
PIGLIT_RUNNER_OPTIONS
PIGLIT_TESTS
PIGLIT_TRACES_FILE
PIPELINE_ARTIFACTS_BASE
RADEON_DEBUG
RADV_DEBUG
RADV_PERFTEST
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
ZINK_DEBUG
LVP_POISON_MEMORY
# Dead code within Mesa CI, but required by virglrender CI
# (because they include our files in their CI)
VK_DRIVER_FILES
)
for var in "${VARS[@]}"; do
if [ -n "${!var+x}" ]; then
echo "export $var=${!var@Q}"
fi
done

View File

@@ -3,6 +3,10 @@
# Very early init, used to make sure devices and network are set up and
# reachable.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# ALPINE_X86_64_LAVA_TRIGGER_TAG
set -ex
cd /
@@ -23,3 +27,8 @@ echo "nameserver 8.8.8.8" > /etc/resolv.conf
# Set the time so we can validate certificates before we fetch anything;
# however as not all DUTs have network, make this non-fatal.
for _ in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true
# Create a symlink from /dev/fd to /proc/self/fd if /dev/fd is missing.
if [ ! -e /dev/fd ]; then
ln -s /proc/self/fd /dev/fd
fi

View File

@@ -76,9 +76,7 @@ fi
# - vmx for Intel VT
# - svm for AMD-V
#
# Additionally, download the kernel image to boot the VM via HWCI_TEST_SCRIPT.
#
if [ "$HWCI_KVM" = "true" ]; then
if [ -n "$HWCI_ENABLE_X86_KVM" ]; then
unset KVM_KERNEL_MODULE
{
grep -qs '\bvmx\b' /proc/cpuinfo && KVM_KERNEL_MODULE=kvm_intel
@@ -91,11 +89,6 @@ if [ "$HWCI_KVM" = "true" ]; then
echo "WARNING: Failed to detect CPU virtualization extensions"
} || \
modprobe ${KVM_KERNEL_MODULE}
mkdir -p /lava-files
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${KERNEL_IMAGE_NAME}" \
"${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}"
fi
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
@@ -109,6 +102,9 @@ export LIBGL_DRIVERS_PATH=/install/lib/dri
# telling it to look in /usr/local/lib.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
# The Broadcom devices need /usr/local/bin unconditionally added to the path
export PATH=/usr/local/bin:$PATH
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
export XDG_CACHE_HOME=/tmp
@@ -227,16 +223,12 @@ 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;
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst
fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such
# as the python ones inside the bare-metal folder
[ ${EXIT_CODE} -eq 0 ] && RESULT=pass || RESULT=fail
set +x
section_end post_test_cleanup
@@ -244,6 +236,6 @@ section_end post_test_cleanup
# the result of our run, so try really hard to get it out rather than losing
# the run. The device gets shut down right at this point, and a630 seems to
# enjoy corrupting the last line of serial output before shutdown.
for _ in $(seq 0 3); do echo "hwci: mesa: $RESULT, exit_code: $EXIT_CODE"; sleep 1; echo; done
for _ in $(seq 0 3); do echo "hwci: mesa: exit_code: $EXIT_CODE"; sleep 1; echo; done
exit $EXIT_CODE

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,7 @@
variables:
CONDITIONAL_BUILD_ANDROID_CTS_TAG: b018634d732f438027ec58c0383615e7
CONDITIONAL_BUILD_ANGLE_TAG: f62910e55be46e37cc867d037e4a8121
CONDITIONAL_BUILD_CROSVM_TAG: 0f59350b1052bdbb28b65a832b494377
CONDITIONAL_BUILD_FLUSTER_TAG: 3bc3afd7468e106afcbfd569a85f34f9
CONDITIONAL_BUILD_PIGLIT_TAG: 827b708ab7309721395ea28cec512968
CONDITIONAL_BUILD_VKD3D_PROTON_TAG: 82cadf35246e64a8228bf759c9c19e5b

View File

@@ -0,0 +1,70 @@
# Build the CI Alpine docker images.
#
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
# image doesn't exist yet, the container stage job generates it.
#
# In order to generate a new image, one should generally change the tag.
# While removing the image from the registry would also work, that's not
# recommended except for ephemeral images during development: Replacing
# an image after a significant amount of time might pull in newer
# versions of gcc/clang or other packages, which might break the build
# with older commits using the same tag.
#
# After merging a change resulting in generating a new image to the
# main repository, it's recommended to remove the image from the source
# repository's container registry, so that the image from the main
# repository's registry will be used there as well.
# Alpine based x86_64 build image
.alpine/x86_64_build-base:
extends:
- .fdo.container-build@alpine
- .container
variables:
FDO_DISTRIBUTION_VERSION: "3.21"
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
# Alpine based x86_64 build image
alpine/x86_64_build:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
LLVM_VERSION: &alpine-llvm_version 19
rules:
- !reference [.container, 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 `deploy-docs`
# exclude them.
- !reference [linkcheck-docs, rules]
- !reference [deploy-docs, rules]
- !reference [test-docs, rules]
.use-alpine/x86_64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "alpine/x86_64_build"
MESA_IMAGE_TAG: *alpine-x86_64_build
LLVM_VERSION: *alpine-llvm_version
needs:
- job: sanity
optional: true
- job: alpine/x86_64_build
optional: true
# Alpine based x86_64 image for LAVA SSH dockerized client
alpine/x86_64_lava_ssh_client:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
# Alpine based x86_64 image to run LAVA jobs
alpine/x86_64_lava-trigger:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_lava_trigger ${ALPINE_X86_64_LAVA_TRIGGER_TAG}

View File

@@ -20,31 +20,28 @@ DEPS=(
bison
ccache
"clang${LLVM_VERSION}-dev"
cmake
clang-dev
cmake
coreutils
curl
elfutils-dev
expat-dev
flex
gcc
g++
git
gcc
gettext
git
glslang
graphviz
linux-headers
"llvm${LLVM_VERSION}-static"
"llvm${LLVM_VERSION}-dev"
meson
mold
musl-dev
expat-dev
elfutils-dev
libclc-dev
libdrm-dev
libva-dev
libpciaccess-dev
zlib-dev
python3-dev
libva-dev
linux-headers
"llvm${LLVM_VERSION}-dev"
"llvm${LLVM_VERSION}-static"
mold
musl-dev
py3-clang
py3-cparser
py3-mako
@@ -52,20 +49,25 @@ DEPS=(
py3-pip
py3-ply
py3-yaml
vulkan-headers
spirv-tools-dev
python3-dev
samurai
spirv-llvm-translator-dev
spirv-tools-dev
util-macros
wayland-dev
wayland-protocols
vulkan-headers
zlib-dev
)
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
. .gitlab-ci/container/install-meson.sh
EXTRA_MESON_ARGS='--prefix=/usr' \
. .gitlab-ci/container/build-wayland.sh
############### Uninstall the build software

View File

@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# This is a ci-templates build script to generate a container for triggering LAVA jobs.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# ALPINE_X86_64_LAVA_TRIGGER_TAG
# shellcheck disable=SC1091
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
uncollapsed_section_start alpine_setup "Base Alpine system setup"
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
git
py3-pip
)
# We only need these very basic packages to run the LAVA jobs
DEPS=(
curl
python3
tar
zstd
)
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages -r bin/ci/requirements-lava.txt
cp -Rp .gitlab-ci/lava /
cp -Rp .gitlab-ci/bin/*_logger.py /lava
cp -Rp .gitlab-ci/common/init-stage1.sh /lava
. .gitlab-ci/container/container_pre_build.sh
############### Uninstall the build software
uncollapsed_section_switch alpine_cleanup "Cleaning up base Alpine system"
apk del "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end alpine_cleanup

View File

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

View File

@@ -0,0 +1,67 @@
#!/usr/bin/env bash
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# This script runs in a container to:
# 1. Download the Android CTS (Compatibility Test Suite)
# 2. Filter out unneeded test modules
# 3. Compress and upload the stripped version to S3
# Note: The 'build-' prefix in the filename is only to make it compatible
# with the bin/ci/update_tag.py script.
set -euo pipefail
section_start android-cts "Downloading Android CTS"
# xtrace is getting lost with the section switching
set -x
# 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 "ANDROID_CTS_TAG"
# List of all CTS modules we might want to run in CI
# This should be the union of all modules required by our CI jobs
# Specific modules to run are selected via the ${GPU_VERSION}-android-cts-include.txt files
ANDROID_CTS_MODULES=(
"CtsDeqpTestCases"
"CtsGraphicsTestCases"
"CtsNativeHardwareTestCases"
"CtsSkQPTestCases"
)
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
ANDROID_CTS_DEVICE_ARCH="x86"
# Download the stripped CTS from S3, because the CTS download from Google can take 20 minutes
CTS_FILENAME="android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}"
ARTIFACT_PATH="${DATA_STORAGE_PATH}/android-cts/${ANDROID_CTS_TAG}.tar.zst"
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found Android CTS at: ${FOUND_ARTIFACT_URL}"
curl-with-retry "${FOUND_ARTIFACT_URL}" | tar --zstd -x -C /
else
echo "No cached CTS found, downloading from Google and uploading to S3..."
curl-with-retry --remote-name "https://dl.google.com/dl/android/cts/${CTS_FILENAME}.zip"
# Disable zipbomb detection, because the CTS zip file is too big
# At least locally, it is detected as a zipbomb
UNZIP_DISABLE_ZIPBOMB_DETECTION=true \
unzip -q -d / "${CTS_FILENAME}.zip"
rm "${CTS_FILENAME}.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
# Using zstd compressed tarball instead of zip, the compression ratio is almost the same, but
# the extraction is faster, also LAVA overlays don't support zip compression.
tar --zstd -cf "${CTS_FILENAME}.tar.zst" /android-cts
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${CTS_FILENAME}.tar.zst" \
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
fi
section_end android-cts

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
)
@@ -114,6 +118,4 @@ if [ -n "$CI" ]; then
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
fi
rm -rf "$LLVM_INSTALL_PREFIX"
apt-get purge -y "${EPHEMERAL[@]}"

146
.gitlab-ci/container/build-angle.sh Normal file → Executable file
View File

@@ -2,20 +2,38 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
set -uex
uncollapsed_section_start angle "Building angle"
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="c39f4a5c553cbee39af8f866aa82a9ffa4f02f5b"
DEPOT_REV="5982a1aeb33dc36382ed8c62eddf52a6135e7dd3"
# 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
mkdir /depot-tools
pushd /depot-tools
git init
git remote add origin https://chromium.googlesource.com/chromium/tools/depot_tools.git
git fetch --depth 1 origin "$DEPOT_REV"
git checkout FETCH_HEAD
export PATH=/depot-tools:$PATH
export DEPOT_TOOLS_UPDATE=0
popd
mkdir /angle-build
mkdir /angle
@@ -25,37 +43,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 +91,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

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

View File

@@ -1,9 +1,14 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
# FEDORA_X86_64_BUILD_TAG
uncollapsed_section_start bindgen "Building bindgen"
BINDGEN_VER=0.65.1
BINDGEN_VER=0.71.1
CBINDGEN_VER=0.26.0
# bindgen

View File

@@ -4,24 +4,25 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BASE_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
# 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 "CROSVM_TAG"
set -uex
uncollapsed_section_start crosvm "Building crosvm"
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=4a6b4316155742fbfa1be7087c2ee578cfee884d
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=06d43ce974b664f9dc521b706a0ad7f91dbf2866
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 +31,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

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

View File

@@ -6,14 +6,13 @@
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ue -o pipefail
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
uncollapsed_section_start deqp-$deqp_api "Building dEQP $DEQP_API"
section_start deqp-$deqp_api "Building dEQP $DEQP_API"
set -x
@@ -24,10 +23,10 @@ set -x
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_MAIN_COMMIT=a9988483c0864d7190e5e6264ccead95423dfd00
DEQP_MAIN_COMMIT=9cc8e038994c32534b3d2c4ba88c1dc49ef53228
DEQP_VK_VERSION=1.4.1.1
DEQP_GL_VERSION=4.6.5.0
DEQP_GLES_VERSION=3.2.11.0
DEQP_GL_VERSION=4.6.6.0
DEQP_GLES_VERSION=3.2.12.0
# Patches to VulkanCTS may come from commits in their repo (listed in
# cts_commits_to_backport) or patch files stored in our repo (in the patch
@@ -37,8 +36,8 @@ DEQP_GLES_VERSION=3.2.11.0
# shellcheck disable=SC2034
main_cts_commits_to_backport=(
# If you find yourself wanting to add something in here, consider whether
# bumping DEQP_MAIN_COMMIT is not a better solution :)
# If you find yourself wanting to add something in here, consider whether
# bumping DEQP_MAIN_COMMIT is not a better solution :)
)
# shellcheck disable=SC2034
@@ -47,6 +46,8 @@ main_cts_patch_files=(
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Stop querying device address from unbound buffers
046343f46f7d39d53b47842d7fd8ed3279528046
)
# shellcheck disable=SC2034
@@ -55,47 +56,31 @@ vk_cts_patch_files=(
# shellcheck disable=SC2034
gl_cts_commits_to_backport=(
# Add #include <cmath> in deMath.h when being compiled by C++
71808fe7d0a640dfd703e845d93ba1c5ab751055
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
# This also adds an alternative fix along with the revert.
6164879a0acce258637d261592a9c395e564b361
# Add testing for GL_PRIMITIVES_SUBMITTED_ARB query.
e075ce73ddc5973aa46a5236c715bb281c9501fa
)
# shellcheck disable=SC2034
gl_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
build-deqp-gl_Revert-Add-missing-context-deletion.patch
build-deqp-gl_Revert-Fix-issues-with-GLX-reset-notification-strate.patch
build-deqp-gl_Revert-Fix-spurious-failures-when-using-a-config-wit.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=(
# Add #include <cmath> in deMath.h when being compiled by C++
71808fe7d0a640dfd703e845d93ba1c5ab751055
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
# This also adds an alternative fix along with the revert.
6164879a0acce258637d261592a9c395e564b361
)
# shellcheck disable=SC2034
gles_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
build-deqp-gl_Revert-Add-missing-context-deletion.patch
build-deqp-gl_Revert-Fix-issues-with-GLX-reset-notification-strate.patch
build-deqp-gl_Revert-Fix-spurious-failures-when-using-a-config-wit.patch
)
if [ "${DEQP_TARGET}" = 'android' ]; then
gles_cts_patch_files+=(
build-deqp-gles_Allow-running-on-Android-from-the-command-line.patch
build-deqp-gles_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
### Careful editing anything below this line
@@ -124,8 +109,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-with-retry -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
exit 1
fi
@@ -144,8 +129,7 @@ for commit in "${!cts_commits_to_backport}"
do
PATCH_URL="https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch"
echo "Apply patch to ${DEQP_API} CTS from $PATCH_URL"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
curl-with-retry $PATCH_URL | GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
done
cts_patch_files="${prefix}_cts_patch_files[@]"
@@ -173,6 +157,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
@@ -286,7 +278,7 @@ if [ "$DEQP_API" != tools ]; then
# Compress the caselists, since Vulkan's in particular are gigantic; higher
# compression levels provide no real measurable benefit.
zstd -1 --rm mustpass/*.txt
zstd -f -1 --rm mustpass/*.txt
fi
if [ "$DEQP_API" = tools ]; then
@@ -297,6 +289,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

@@ -4,21 +4,40 @@
# shellcheck disable=SC2034 # Variables are used in scripts called from here
# shellcheck disable=SC2086 # we want word splitting
# Install fluster in /usr/local.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_VIDEO_TAG
# Install fluster in /fluster.
set -uex
section_start fluster "Installing Fluster"
# 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 "FLUSTER_TAG"
FLUSTER_REVISION="e997402978f62428fffc8e5a4a709690d9ca9bc5"
git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
pushd fluster || exit
git checkout ${FLUSTER_REVISION}
git checkout "${FLUSTER_REVISION}"
popd || exit
if [ "${SKIP_UPDATE_FLUSTER_VECTORS}" != 1 ]; then
ARTIFACT_PATH="${DATA_STORAGE_PATH}/fluster/${FLUSTER_TAG}/vectors.tar.zst"
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found fluster vectors at: ${FOUND_ARTIFACT_URL}"
mv fluster/ /
curl-with-retry "${FOUND_ARTIFACT_URL}" | tar --zstd -x -C /
else
echo "No cached vectors found, rebuilding..."
# Download the necessary vectors: H264, H265 and VP9
# When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
# fluster-runner will report Missing results.
fluster/fluster.py download \
fluster/fluster.py download -j ${FDO_CI_CONCURRENT:-4} \
JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-SVC_V1 \
JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
@@ -26,15 +45,8 @@ 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"
touch /lava-files/done
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done "https://${S3_PATH_FLUSTER}/done"
# Don't include the vectors in the rootfs
rm -fr fluster/resources/*
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
mv fluster/ /
fi
mkdir -p "${ROOTFS}/usr/local/"
mv fluster "${ROOTFS}/usr/local/"
section_end fluster

View File

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

View File

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

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
set -ex -o pipefail
uncollapsed_section_start ninetests "Building Nine tests"
### Careful editing anything below this line
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
git clone https://github.com/axeldavy/Xnine.git /Xnine
mkdir /Xnine/build
pushd /Xnine/build
git checkout c64753d224c08006bcdcfa7880ada826f27164b1
cmake .. -DBUILD_TESTS=1 -DWITH_DRI3=1 -DD3DADAPTER9_LOCATION=/install/lib/d3d/d3dadapter9.so
make
mkdir -p /NineTests/
mv NineTests/NineTests /NineTests/
popd
rm -rf /Xnine
section_end ninetests

View File

@@ -2,15 +2,18 @@
# shellcheck disable=SC2086 # we want word splitting
set -uex
uncollapsed_section_start piglit "Building piglit"
section_start piglit "Building piglit"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
REV="631b72944f56e688f56a08d26c8a9f3988801a08"
# Do a very early check to make sure the tag is correct without the need of
# setting up the environment variables locally
ci_tag_build_time_check "PIGLIT_TAG"
REV="a0a27e528f643dfeb785350a1213bfff09681950"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit

View File

@@ -5,16 +5,10 @@
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
section_start rust "Building Rust toolchain"
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
RUST_VERSION=1.78.0-2024-05-02
RUST_VERSION=1.81.0-2024-09-05
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
# version of the compiler, rather than whatever the container's Debian comes
@@ -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

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

View File

@@ -1,12 +1,13 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
# DEBIAN_TEST_VIDEO_TAG
set -uex
uncollapsed_section_start va-tools "Building va-tools"
section_start va-tools "Building va-tools"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
@@ -19,7 +20,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,41 +3,45 @@
# 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"
section_start vkd3d-proton "Building vkd3d-proton"
VKD3D_PROTON_COMMIT="b121e6d746341e0aaba7663e3d85f3194e8e20e1"
# 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 "VKD3D_PROTON_TAG"
VKD3D_PROTON_COMMIT="6be781076617cb2cb3038710618acc3b57a674db"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
VKD3D_PROTON_WINE_DIR="/vkd3d-proton-wine64"
VKD3D_PROTON_S3_ARTIFACT="vkd3d-proton.tar.zst"
function build_arch {
local arch="$1"
meson setup \
-Denable_tests=true \
--buildtype release \
--prefix "$VKD3D_PROTON_DST_DIR" \
--strip \
--bindir "x${arch}" \
--libdir "x${arch}" \
"$VKD3D_PROTON_BUILD_DIR/build.${arch}"
ninja -C "$VKD3D_PROTON_BUILD_DIR/build.${arch}" install
install -D -m755 -t "${VKD3D_PROTON_DST_DIR}/x${arch}/bin" "$VKD3D_PROTON_BUILD_DIR/build.${arch}/tests/d3d12"
}
if [ ! -d "$VKD3D_PROTON_WINE_DIR" ]; then
echo "Fatal: Directory '$VKD3D_PROTON_WINE_DIR' does not exist. Aborting."
exit 1
fi
git clone https://github.com/HansKristian-Work/vkd3d-proton.git --single-branch -b master --no-checkout "$VKD3D_PROTON_SRC_DIR"
pushd "$VKD3D_PROTON_SRC_DIR"
git checkout "$VKD3D_PROTON_COMMIT"
git submodule update --init --recursive
git submodule update --recursive
build_arch 64
build_arch 86
meson setup \
-D enable_tests=true \
--buildtype release \
--prefix "$VKD3D_PROTON_DST_DIR" \
--strip \
--libdir "lib" \
"$VKD3D_PROTON_BUILD_DIR/build"
ninja -C "$VKD3D_PROTON_BUILD_DIR/build" install
install -m755 -t "${VKD3D_PROTON_DST_DIR}/" "$VKD3D_PROTON_BUILD_DIR/build/tests/d3d12"
mkdir "$VKD3D_PROTON_DST_DIR/tests"
cp \
"tests/test-runner.sh" \
@@ -45,6 +49,18 @@ cp \
"$VKD3D_PROTON_DST_DIR/tests/"
popd
# Archive and upload vkd3d-proton for use as a LAVA overlay, if the archive doesn't exist yet
ARTIFACT_PATH="${DATA_STORAGE_PATH}/vkd3d-proton/${VKD3D_PROTON_TAG}/${CI_JOB_NAME}/${VKD3D_PROTON_S3_ARTIFACT}"
if FOUND_ARTIFACT_URL="$(find_s3_project_artifact "${ARTIFACT_PATH}")"; then
echo "Found vkd3d-proton at: ${FOUND_ARTIFACT_URL}, skipping upload"
else
echo "Uploaded vkd3d-proton not found, reuploading..."
tar --zstd -cf "$VKD3D_PROTON_S3_ARTIFACT" -C / "${VKD3D_PROTON_DST_DIR#/}" "${VKD3D_PROTON_WINE_DIR#/}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "$VKD3D_PROTON_S3_ARTIFACT" \
"https://${S3_BASE_PATH}/${CI_PROJECT_PATH}/${ARTIFACT_PATH}"
rm "$VKD3D_PROTON_S3_ARTIFACT"
fi
rm -rf "$VKD3D_PROTON_BUILD_DIR"
rm -rf "$VKD3D_PROTON_SRC_DIR"

View File

@@ -3,13 +3,12 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# KERNEL_ROOTFS_TAG
set -uex
uncollapsed_section_start 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 +16,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,15 +7,16 @@ 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
# DEBIAN_TEST_VK_TAG
# FEDORA_X86_64_BUILD_TAG
# 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
@@ -35,10 +38,29 @@ chmod +x /usr/local/bin/ninja
# flags (doesn't apply to non-container builds, but we don't run make there)
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
# make wget to try more than once, when download fails or timeout
echo -e "retry_connrefused = on\n" \
"read_timeout = 300\n" \
"tries = 4\n" \
"retry_on_host_error = on\n" \
"retry_on_http_error = 429,500,502,503,504\n" \
"wait_retry = 32" >> /etc/wgetrc
# Ensure that rust tools are in PATH if they exist
CARGO_ENV_FILE="$HOME/.cargo/env"
if [ -f "$CARGO_ENV_FILE" ]; then
# 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,6 +1,10 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
@@ -67,7 +71,6 @@ DEPS=(
libwayland-egl-backend-dev
"llvm-${LLVM_VERSION}-dev"
ninja-build
meson
openssh-server
pkgconf
python3-mako
@@ -76,8 +79,11 @@ DEPS=(
python3-pycparser
python3-requests
python3-setuptools
python3-venv
shellcheck
u-boot-tools
xz-utils
yamllint
zlib1g-dev
zstd
)
@@ -86,9 +92,15 @@ apt-get update
apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
pip3 install --break-system-packages -r bin/ci/test/requirements.txt
. .gitlab-ci/container/install-meson.sh
arch=armhf
. .gitlab-ci/container/cross_build.sh
. .gitlab-ci/container/container_pre_build.sh
@@ -101,8 +113,6 @@ arch=armhf
. .gitlab-ci/container/build-libclc.sh
. .gitlab-ci/container/install-meson.sh
. .gitlab-ci/container/build-rust.sh
. .gitlab-ci/container/build-bindgen.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

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

View File

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

View File

@@ -0,0 +1,577 @@
# Build the CI Debian docker images.
#
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
# image doesn't exist yet, the container stage job generates it.
#
# In order to generate a new image, one should generally change the tag.
# While removing the image from the registry would also work, that's not
# recommended except for ephemeral images during development: Replacing
# an image after a significant amount of time might pull in newer
# versions of gcc/clang or other packages, which might break the build
# with older commits using the same tag.
#
# After merging a change resulting in generating a new image to the
# main repository, it's recommended to remove the image from the source
# repository's container registry, so that the image from the main
# repository's registry will be used there as well.
.debian-container-version:
variables:
FDO_DISTRIBUTION_VERSION: bookworm-slim
.debian-container:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
# Debian based x86_64 build image base
debian/x86_64_build-base:
extends:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
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"
MESA_BASE_TAG: *debian-x86_64_build-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- job: sanity
optional: true
- job: debian/x86_64_build-base
optional: true
# Debian based x86_64 main build image
debian/x86_64_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
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"
MESA_IMAGE_TAG: *debian-x86_64_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- job: sanity
optional: true
- job: debian/x86_64_build
optional: true
# Debian based x86_32 cross-build image
debian/x86_32_build:
extends:
- .use-debian/x86_64_build-base
variables:
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:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/x86_32_build"
MESA_IMAGE_TAG: *debian-x86_32_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- job: sanity
optional: true
- job: debian/x86_32_build
optional: true
# Debian based ppc64el cross-build image
debian/ppc64el_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
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:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/ppc64el_build"
MESA_IMAGE_TAG: *debian-ppc64el_build
LLVM_VERSION: *debian-ppc64el-llvm
needs:
- job: sanity
optional: true
- job: debian/ppc64el_build
optional: true
# Debian based s390x cross-build image
debian/s390x_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: &debian-s390x-llvm 19
.use-debian/s390x_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/s390x_build"
MESA_IMAGE_TAG: *debian-s390x_build
LLVM_VERSION: *debian-s390x-llvm
needs:
- job: sanity
optional: true
- job: debian/s390x_build
optional: true
# Android NDK cross-build image
.android-variables:
variables:
ANDROID_VERSION: 14
ANDROID_NDK_VERSION: "r27c"
ANDROID_SDK_VERSION: 34
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.
LLVM_VERSION: &debian-android-llvm 19
CUTTLEFISH_PROJECT_PATH: ao2/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS: mesa-venus
CUTTLEFISH_BUILD_NUMBER: 20250701.001
AOSP_KERNEL_PROJECT_PATH: ao2/aosp-kernel-manifest
AOSP_KERNEL_BUILD_VERSION_TAGS: common-android14-6.1-venus
AOSP_KERNEL_BUILD_NUMBER: 20241107.001
debian/android_build:
extends:
- .android-variables
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
.use-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"
MESA_IMAGE_TAG: *debian-android_build
needs:
- job: sanity
optional: true
- job: debian/android_build
optional: true
# Debian based ARM build image
debian/arm64_build:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
variables:
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BUILD_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-arm64-llvm 19
.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
MESA_ARTIFACTS_TAG: *debian-arm64_build
LLVM_VERSION: *debian-arm64-llvm
needs:
- job: sanity
optional: true
- job: debian/arm64_build
optional: true
# Debian based x86_64 test image base
debian/x86_64_test-base:
extends:
- .debian-container
- .container-builds-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
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"
MESA_BASE_TAG: *debian-x86_64_test-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- job: sanity
optional: true
- job: debian/x86_64_test-base
optional: true
# Debian based ARMv7/armhf test image base
debian/arm32_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .debian-container
- .container-builds-base
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:
- job: sanity
optional: true
- job: debian/arm32_test-base
optional: true
# Debian based aarch64 test image base
debian/arm64_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .debian-container
- .container-builds-base
variables:
MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: *debian-arm64-llvm
.use-debian/arm64_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/arm64_test-base"
MESA_BASE_TAG: *debian-arm64_test-base
LLVM_VERSION: *debian-arm64-llvm
needs:
- job: sanity
optional: true
- job: debian/arm64_test-base
optional: true
# Debian based x86_64 test image for GL
debian/x86_64_test-gl:
extends:
- .use-debian/x86_64_test-base
- .container-builds-gl
- .export-container
variables:
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-gl"
MESA_IMAGE_TAG: *debian-x86_64_test-gl
needs:
- job: sanity
optional: true
- job: debian/x86_64_test-gl
optional: true
# Debian based x86_64 test image for VK
debian/x86_64_test-vk:
extends:
- .use-debian/x86_64_test-base
- .container-builds-vk
- .export-container
variables:
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-vk"
MESA_IMAGE_TAG: *debian-x86_64_test-vk
needs:
- job: sanity
optional: true
- job: debian/x86_64_test-vk
optional: true
# Debian based x86_64 test image for Android
debian/x86_64_test-android:
extends:
- .android-variables
- .use-debian/x86_64_test-base
- .container-builds-android
- .export-container
variables:
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"
MESA_IMAGE_TAG: *debian-x86_64_test-android
needs:
- job: sanity
optional: true
- job: debian/x86_64_test-android
optional: true
# Debian based x86_64 test image for video
debian/x86_64_test-video:
extends:
- .use-debian/x86_64_test-base
- .container-builds-video
- .export-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-video ${DEBIAN_TEST_VIDEO_TAG}
.use-debian/x86_64_test-video:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_test-base
MESA_IMAGE_PATH: "debian/x86_64_test-video"
MESA_IMAGE_TAG: *debian-x86_64_test-video
needs:
- job: sanity
optional: true
- job: debian/x86_64_test-video
optional: true
# 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
- .container-builds-arm32
- .export-container
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:
- job: sanity
optional: true
- job: debian/arm32_test-gl
optional: true
# 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
- .container-builds-arm32
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:
- job: sanity
optional: true
- job: debian/arm32_test-vk
optional: true
# Debian based aarch64 test image for GL
debian/arm64_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm64_test-base
- .container-builds-gl
- .export-container
variables:
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/arm64_test-gl:
tags:
- $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-gl"
MESA_IMAGE_TAG: *debian-arm64_test-gl
needs:
- job: sanity
optional: true
- job: debian/arm64_test-gl
optional: true
# Debian based aarch64 test image for VK
debian/arm64_test-vk:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm64_test-base
- .container-builds-vk
- .export-container
variables:
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/arm64_test-vk:
tags:
- $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-vk"
MESA_IMAGE_TAG: *debian-arm64_test-vk
needs:
- job: sanity
optional: true
- job: debian/arm64_test-vk
optional: true
# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
.debian/baremetal_arm_test:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
variables:
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARTIFACTS_TAG: *debian-arm64_build
debian/baremetal_arm32_test-gl:
extends:
- .debian/baremetal_arm_test
needs:
- job: debian/arm32_test-gl
optional: true
variables:
MESA_IMAGE_TAG: &baremetal-arm32_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LAVA_DISTRIBUTION_TAG: "debian/arm32_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
debian/baremetal_arm64_test-gl:
extends:
- .debian/baremetal_arm_test
needs:
- job: debian/arm64_test-gl
optional: true
variables:
MESA_IMAGE_TAG: &baremetal-arm64_test-gl "${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LAVA_DISTRIBUTION_TAG: "debian/arm64_test-gl:${DEBIAN_TEST_GL_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
debian/baremetal_arm64_test-vk:
extends:
- .debian/baremetal_arm_test
needs:
- job: debian/arm64_test-vk
optional: true
variables:
MESA_IMAGE_TAG: &baremetal-arm64_test-vk "${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LAVA_DISTRIBUTION_TAG: "debian/arm64_test-vk:${DEBIAN_TEST_VK_TAG}--${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${MESA_TEMPLATES_COMMIT}"
.use-debian/baremetal_arm32_test-gl:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm32_test-gl"
MESA_IMAGE_TAG: *baremetal-arm32_test-gl
needs:
- job: sanity
optional: true
- job: debian/baremetal_arm32_test-gl
optional: true
.use-debian/baremetal_arm64_test-gl:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm64_test-gl"
MESA_IMAGE_TAG: *baremetal-arm64_test-gl
needs:
- job: sanity
optional: true
- job: debian/baremetal_arm64_test-gl
optional: true
.use-debian/baremetal_arm64_test-vk:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm64_test-vk"
MESA_IMAGE_TAG: *baremetal-arm64_test-vk
needs:
- job: sanity
optional: true
- job: debian/baremetal_arm64_test-vk
optional: true

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,43 +47,66 @@ 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
openssh-server
patch
pkgconf
protobuf-compiler
python3-dev
python3-pip
python3-setuptools
python3-venv
python3-wheel
spirv-tools
wayland-protocols
xz-utils
)
DEPS=(
apt-utils
clinfo
curl
dropbear
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
libproc2-0
libpython3.11
libubsan1
libvulkan1
@@ -91,23 +114,45 @@ 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
sntp
socat
spirv-tools
sysvinit-core
vulkan-tools
waffle-utils
weston
xwayland
xinit
xserver-xorg-video-amdgpu
xserver-xorg-video-ati
xauth
xvfb
zlib1g
)
HW_DEPS=(
netcat-openbsd
mount
python3-distutils
python3-serial
tzdata
zstd
)
@@ -117,30 +162,23 @@ apt-get dist-upgrade -y
apt-get install --purge -y \
sysvinit-core libelogind0
apt-get install -y --no-remove "${DEPS[@]}"
apt-get install -y --no-remove "${DEPS[@]}" "${HW_DEPS[@]}"
apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_pre_build.sh
# Needed for ci-fairy, this revision is able to upload files to MinIO
# and doesn't depend on git
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
# Needed for ci-fairy s3cp
pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesktop.org/freedesktop/ci-templates@$MESA_TEMPLATES_COMMIT"
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
section_end debian_setup
############### Download prebuilt kernel
############### Build ci-kdl
if [ "$DEBIAN_ARCH" = amd64 ]; then
uncollapsed_section_start kernel "Downloading kernel"
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /lava-files/
. .gitlab-ci/container/download-prebuilt-kernel.sh
section_end kernel
fi
. .gitlab-ci/container/build-kdl.sh
############### Build mold
@@ -164,19 +202,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

@@ -27,51 +27,37 @@ EPHEMERAL=(
libcap-dev
"libclang-cpp${LLVM_VERSION}-dev"
libdrm-dev
libfontconfig-dev
libgl-dev
libgles2-mesa-dev
libgtest-dev
libglu1-mesa-dev
libglx-dev
libpciaccess-dev
libpng-dev
libudev-dev
libvulkan-dev
libwaffle-dev
libwayland-dev
libx11-xcb-dev
libxcb-dri2-0-dev
libxcb-dri3-dev
libxcb-present-dev
libxfixes-dev
libxkbcommon-dev
libxrandr-dev
libxrender-dev
"llvm-${LLVM_VERSION}-dev"
"lld-${LLVM_VERSION}"
make
meson
ocl-icd-opencl-dev
patch
pkgconf
python-is-python3
python3-distutils
xz-utils
)
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
libfontconfig1
libglu1-mesa
libvulkan-dev
)
apt-get update
@@ -84,6 +70,13 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
section_end debian_setup
############### Build ANGLE
if [ "$DEBIAN_ARCH" != "armhf" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
fi
############### Build piglit
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
@@ -118,17 +111,16 @@ 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
############### Build nine tests
. .gitlab-ci/container/build-ninetests.sh
############### Build SKQP
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-skqp.sh
fi
############### Uninstall the build software
@@ -139,3 +131,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

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

View File

@@ -48,13 +48,10 @@ DEPS=(
"llvm-${LLVM_VERSION}-dev"
ocl-icd-opencl-dev
python3-pip
python3-venv
procps
spirv-tools
shellcheck
strace
time
yamllint
zstd
)
@@ -87,8 +84,6 @@ rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/build-bindgen.sh
python3 -m pip install --break-system-packages -r bin/ci/requirements.txt
############### Uninstall the build software
apt-get purge -y "${EPHEMERAL[@]}"

View File

@@ -1,67 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_PYUTILS_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get install -y ca-certificates
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
# Ephemeral packages (installed for this script and removed again at
# the end)
EPHEMERAL=(
binutils
build-essential
cpp
dpkg-dev
g++
gcc
libc6-dev
perl
python3-dev
)
DEPS=(
apt-utils
curl
file
findutils
git
python3-pil
python3-pip
python3-ply
python3-setuptools
python3-venv
python3-yaml
shellcheck
xz-utils
yamllint
zstd
)
apt-get update
apt-get install -y --no-remove --no-install-recommends "${DEPS[@]}" "${EPHEMERAL[@]}" \
"${EXTRA_LOCAL_PACKAGES:-}"
# Needed for ci-fairy, this revision is able to upload files to S3
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
pip3 install --break-system-packages -r bin/ci/test/requirements.txt
############### Uninstall ephemeral packages
apt-get purge -y "${EPHEMERAL[@]}"
apt-get autoremove --purge -y
. .gitlab-ci/container/container_post_build.sh

View File

@@ -12,19 +12,21 @@ set -e
set -o xtrace
section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
build-essential:native
ccache
cmake
config-package-dev
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
)
DEPS=(
@@ -37,15 +39,52 @@ apt-get install -y --no-remove --no-install-recommends \
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
############### Downloading Android tools
section_start android-tools "Downloading Android tools"
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o eglinfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/eglinfo-android-x86_64"
chmod +x eglinfo
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o vulkaninfo "https://${S3_HOST}/${S3_ANDROID_BUCKET}/mesa/mesa/${DATA_STORAGE_PATH}/vulkaninfo-android-x86_64"
chmod +x vulkaninfo
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-tools
############### Downloading NDK for native builds for the guest ...
section_start android-ndk "Downloading Android NDK"
# Fetch the NDK and extract just the toolchain we want.
ndk="android-ndk-${ANDROID_NDK_VERSION}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "$ndk.zip" "https://dl.google.com/android/repository/$ndk-linux.zip"
unzip -d / "$ndk.zip"
unzip -q -d / "$ndk.zip"
rm "$ndk.zip"
section_end android-ndk
############### Build ANGLE
ANGLE_TARGET=android \
DEBIAN_ARCH=amd64 \
. .gitlab-ci/container/build-angle.sh
############### Build dEQP runner
export ANDROID_NDK_HOME=/$ndk
@@ -53,24 +92,19 @@ 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" \
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=VK \
@@ -82,33 +116,27 @@ rm -rf /VK-GL-CTS
############### Downloading Cuttlefish resources ...
CUTTLEFISH_PROJECT_PATH=ao2/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS=mesa-venus
CUTTLEFISH_BUILD_NUMBER=20250115.001
section_start cuttlefish "Downloading, building and installing Cuttlefish"
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 "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_only_phone-img-${CUTTLEFISH_BUILD_NUMBER}.tar.zst"
unzip aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
rm aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
tar --zstd -xvf aosp_cf_x86_64_only_phone-img-"$CUTTLEFISH_BUILD_NUMBER".tar.zst
rm aosp_cf_x86_64_only_phone-img-"$CUTTLEFISH_BUILD_NUMBER".tar.zst
ls -lhS ./*
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o cvd-host_package.tar.gz "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package.tar.gz"
tar -xzvf cvd-host_package.tar.gz
rm cvd-host_package.tar.gz
AOSP_KERNEL_PROJECT_PATH=ao2/aosp-kernel-manifest
AOSP_KERNEL_BUILD_VERSION_TAGS=common-android14-6.1-venus
AOSP_KERNEL_BUILD_NUMBER=20241107.001
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package-x86_64.tar.zst"
tar --zst -xvf cvd-host_package-x86_64.tar.zst
rm cvd-host_package-x86_64.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o bzImage "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/bzImage"
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/bzImage"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o initramfs.img "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/initramfs.img"
-O "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/initramfs.img"
popd
@@ -133,8 +161,16 @@ rm -rf android-cuttlefish
addgroup --system kvm
usermod -a -G kvm,cvdnetwork root
section_end cuttlefish
############### Downloading Android CTS
. .gitlab-ci/container/build-android-cts.sh
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
rm -rf "/${ndk:?}"
export SUDO_FORCE_REMOVE=yes
@@ -142,4 +178,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

@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# The relative paths in this file only become valid at runtime.
# shellcheck disable=SC1091
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_VIDEO_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y gstreamer1.0-vaapi # This interferes with systemd deps, install separately
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
g++
libdrm-dev
libva-dev
meson
pkgconf
)
DEPS=(
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good
gstreamer1.0-plugins-ugly
gstreamer1.0-tools
libgstreamer1.0-0
libva-drm2
libva-wayland2
libva2
)
apt-get update
apt-get install -y --no-remove --no-install-recommends \
"${DEPS[@]}" "${EPHEMERAL[@]}" "${EXTRA_LOCAL_PACKAGES:-}"
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
############### Build libva tests
. .gitlab-ci/container/build-va-tools.sh
############### Install Fluster
. .gitlab-ci/container/build-fluster.sh
############### Uninstall the build software
section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup
############### Remove unused packages
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,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

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

View File

@@ -0,0 +1,41 @@
# Build the CI Fedora docker images.
#
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
# image doesn't exist yet, the container stage job generates it.
#
# In order to generate a new image, one should generally change the tag.
# While removing the image from the registry would also work, that's not
# recommended except for ephemeral images during development: Replacing
# an image after a significant amount of time might pull in newer
# versions of gcc/clang or other packages, which might break the build
# with older commits using the same tag.
#
# After merging a change resulting in generating a new image to the
# main repository, it's recommended to remove the image from the source
# repository's container registry, so that the image from the main
# repository's registry will be used there as well.
# Fedora based x86_64 build image
fedora/x86_64_build:
extends:
- .fdo.container-build@fedora
- .container
variables:
FDO_DISTRIBUTION_VERSION: 42
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
LLVM_VERSION: &fedora-x86_64-llvm 20
.use-fedora/x86_64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "fedora/x86_64_build"
MESA_IMAGE_TAG: *fedora-x86_64_build
LLVM_VERSION: *fedora-x86_64-llvm
needs:
- job: sanity
optional: true
- job: fedora/x86_64_build
optional: true

View File

@@ -28,9 +28,7 @@ EPHEMERAL=(
)
DEPS=(
bindgen
bison
cbindgen
ccache
clang-devel
flex
@@ -107,6 +105,8 @@ rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/install-meson.sh
. .gitlab-ci/container/build-bindgen.sh
. .gitlab-ci/container/build-mold.sh
. .gitlab-ci/container/build-libdrm.sh

View File

@@ -1,53 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2046 # we want to arg-split FIRMWARE_FILES
# shellcheck disable=SC2086 # as above
# shellcheck disable=SC2116 # as above
set -e
ROOTFS=$1
FIRMWARE_FILES=$2
if [ -n "${FIRMWARE_FILES:-}" ]; then
FIRMWARE=$(jq -s '.' $(echo "$FIRMWARE_FILES"))
else
FIRMWARE=""
fi
if ! echo "$FIRMWARE" | jq empty; then
echo "FIRMWARE contains invalid JSON."
fi
for item in $(echo "$FIRMWARE" | jq -c '.[]'); do
src=$(echo "$item" | jq -r '.src')
git_hash=$(echo "$item" | jq -r '.git_hash')
dst=$(echo "$item" | jq -r '.dst')
if [ "$src" = "null" ] || [ "$dst" = "null" ]; then
echo "Missing src or dst for $item."
continue
fi
# Remove any trailing slashes from src and dst
src=${src%/}
dst=${dst%/}
# Remove any leading slash
dst=${dst#/}
if [ "$(echo "$item" | jq '.files | length')" -eq 0 ]; then
echo "No files specified for $item."
continue
fi
for file in $(echo "$item" | jq -r '.files[]'); do
FIRMWARE_SRC_PATH="${src}/${file}"
if [ "$git_hash" != "null" ]; then
FIRMWARE_SRC_PATH="${FIRMWARE_SRC_PATH}?h=${git_hash}"
fi
FIRMWARE_DST_DIR="${ROOTFS}/${dst}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 --create-dirs --output-dir "${FIRMWARE_DST_DIR}" -o "${file}" "${FIRMWARE_SRC_PATH}"
done
done

View File

@@ -0,0 +1,113 @@
# Docker image tag helper templates
.incorporate-templates-commit:
variables:
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
.incorporate-base-tag+templates-commit:
variables:
FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
.set-image:
extends:
- .incorporate-templates-commit
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
image: "$MESA_IMAGE"
.set-image-base-tag:
extends:
- .set-image
- .incorporate-base-tag+templates-commit
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
.container:
stage: container
timeout: 1h
extends:
- .container-rules
- .incorporate-templates-commit
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
before_script:
- !reference [default, before_script]
# Undoing the `eval "$S3_JWT_FILE_SCRIPT"` from the default before_script,
# because container_job_trampoline.sh and fdo_cntr_export.sh both need it.
- S3_JWT=$(cat "${S3_JWT_FILE}")
- export S3_JWT_FILE_SCRIPT="echo -n '${S3_JWT}' > '${S3_JWT_FILE}' && S3_JWT_FILE_SCRIPT= && unset CI_JOB_JWT S3_JWT"
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
CI_BUILD_COMPONENTS: "$CI_BUILD_COMPONENTS_ANDROID_CTS $CI_BUILD_COMPONENTS_ANGLE $CI_BUILD_COMPONENTS_CROSVM $CI_BUILD_COMPONENTS_FLUSTER $CI_BUILD_COMPONENTS_PIGLIT $CI_BUILD_COMPONENTS_VKD3D_PROTON"
.container-builds-angle:
variables:
ANGLE_TAG: "${CONDITIONAL_BUILD_ANGLE_TAG}"
CI_BUILD_COMPONENTS_ANGLE: angle
.container-builds-crosvm:
variables:
CROSVM_TAG: "${CONDITIONAL_BUILD_CROSVM_TAG}"
CI_BUILD_COMPONENTS_CROSVM: crosvm
.container-builds-fluster:
variables:
FLUSTER_TAG: "${CONDITIONAL_BUILD_FLUSTER_TAG}"
CI_BUILD_COMPONENTS_FLUSTER: fluster
.container-builds-piglit:
variables:
PIGLIT_TAG: "${CONDITIONAL_BUILD_PIGLIT_TAG}"
CI_BUILD_COMPONENTS_PIGLIT: piglit
.container-builds-vkd3d-proton:
variables:
VKD3D_PROTON_TAG: "${CONDITIONAL_BUILD_VKD3D_PROTON_TAG}"
CI_BUILD_COMPONENTS_VKD3D_PROTON: vkd3d-proton
.container-builds-android-cts:
variables:
ANDROID_CTS_TAG: "${CONDITIONAL_BUILD_ANDROID_CTS_TAG}"
CI_BUILD_COMPONENTS_ANDROID_CTS: android-cts
.container-builds-android:
extends:
- .container-builds-android-cts
- .container-builds-angle
.container-builds-arm32:
extends:
- .container-builds-piglit
.container-builds-base:
extends:
- .container-builds-crosvm
.container-builds-gl:
extends:
- .container-builds-angle
- .container-builds-piglit
.container-builds-video:
extends:
- .container-builds-fluster
.container-builds-vk:
extends:
- .container-builds-piglit
- .container-builds-vkd3d-proton
# Export the container rootfs and upload it to S3
.export-container:
variables:
FDO_DISTRIBUTION_PACKAGES: zstd
FDO_DISTRIBUTION_POST_EXEC: 'bash .gitlab-ci/container/fdo_cntr_export.sh'
.use-base-image:
extends:
- .container
- .incorporate-base-tag+templates-commit

View File

@@ -1,28 +1,3 @@
# Docker image tag helper templates
.incorporate-templates-commit:
variables:
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_TEMPLATES_COMMIT}"
.incorporate-base-tag+templates-commit:
variables:
FDO_BASE_IMAGE: "${CI_REGISTRY_IMAGE}/${MESA_BASE_IMAGE}:${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
.set-image:
extends:
- .incorporate-templates-commit
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
image: "$MESA_IMAGE"
.set-image-base-tag:
extends:
- .set-image
- .incorporate-base-tag+templates-commit
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${FDO_DISTRIBUTION_TAG}"
# Build the CI docker images.
#
# MESA_IMAGE_TAG is the tag of the docker image used by later stage jobs. If the
@@ -40,622 +15,6 @@
# repository's container registry, so that the image from the main
# repository's registry will be used there as well.
.debian-container-version:
variables:
FDO_DISTRIBUTION_VERSION: bookworm-slim
.debian-container:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
.container:
stage: container
extends:
- .container+build-rules
- .incorporate-templates-commit
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
.use-base-image:
extends:
- .container
- .incorporate-base-tag+templates-commit
# Debian based x86_64 build image base
debian/x86_64_build-base:
extends:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-x86_64-llvm 19
.use-debian/x86_64_build-base:
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: ${DEBIAN_X86_64_BUILD_BASE_IMAGE}
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_ARTIFACTS_BASE_TAG: *debian-x86_64_build-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build-base
# Debian based x86_64 main build image
debian/x86_64_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: *debian-x86_64-llvm
.use-debian/x86_64_build:
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_TAG: *debian-x86_64_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build
# Debian based x86_32 cross-build image
debian/x86_32_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
.use-debian/x86_32_build:
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/x86_32_build"
MESA_IMAGE_TAG: *debian-x86_32_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_32_build
# Debian based ppc64el cross-build image
debian/ppc64el_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: &debian-ppc64el-llvm 15 # no LLVM packages for PPC
.use-debian/ppc64el_build:
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/ppc64el_build"
MESA_IMAGE_TAG: *debian-ppc64el_build
LLVM_VERSION: *debian-ppc64el-llvm
needs:
- debian/ppc64el_build
# Debian based s390x cross-build image
debian/s390x_build:
extends:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: &debian-s390x-llvm 19
.use-debian/s390x_build:
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/s390x_build"
MESA_IMAGE_TAG: *debian-s390x_build
LLVM_VERSION: *debian-s390x-llvm
needs:
- debian/s390x_build
# Android NDK cross-build image
.android-variables:
variables:
ANDROID_NDK_VERSION: "r27c"
ANDROID_SDK_VERSION: 34
ANDROID_LLVM_VERSION: llvmorg-18.1.8
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250103
# 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.
LLVM_VERSION: &debian-android-llvm 19
debian/android_build:
extends:
- .android-variables
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
.use-debian/android_build:
extends:
- .android-variables
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/android_build"
MESA_IMAGE_TAG: *debian-android_build
needs:
- debian/android_build
# Debian based ARM build image
debian/arm64_build:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
tags:
- aarch64
variables:
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-arm64-llvm 19
.use-debian/arm64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "debian/arm64_build"
MESA_IMAGE_TAG: *debian-arm64_build
MESA_ARTIFACTS_TAG: *debian-arm64_build
LLVM_VERSION: *debian-arm64-llvm
needs:
- debian/arm64_build
# Alpine based x86_64 build image
.alpine/x86_64_build-base:
extends:
- .fdo.container-build@alpine
- .container
variables:
FDO_DISTRIBUTION_VERSION: "edge" # switch to 3.20 when gets released
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
# Alpine based x86_64 build image
alpine/x86_64_build:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
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`
# exclude them.
- !reference [linkcheck-docs, rules]
- !reference [pages, rules]
- !reference [test-docs, rules]
- !reference [.container, rules]
.use-alpine/x86_64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "alpine/x86_64_build"
MESA_IMAGE_TAG: *alpine-x86_64_build
LLVM_VERSION: *alpine-llvm_version
needs:
- alpine/x86_64_build
# Alpine based x86_64 image for LAVA SSH dockerized client
alpine/x86_64_lava_ssh_client:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
# Fedora based x86_64 build image
fedora/x86_64_build:
extends:
- .fdo.container-build@fedora
- .container
variables:
FDO_DISTRIBUTION_VERSION: 41
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
LLVM_VERSION: &fedora-x86_64-llvm 19
.use-fedora/x86_64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "fedora/x86_64_build"
MESA_IMAGE_TAG: *fedora-x86_64_build
LLVM_VERSION: *fedora-x86_64-llvm
needs:
- fedora/x86_64_build
# Debian based x86_64 test image base
debian/x86_64_test-base:
extends:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}"
LLVM_VERSION: *debian-x86_64-llvm
.use-debian/x86_64_test-base:
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: ${DEBIAN_X86_64_TEST_BASE_IMAGE}
MESA_BASE_TAG: *debian-x86_64_test-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_test-base
# Debian based aarch64 test image base
debian/arm64_test-base:
tags:
- aarch64
extends:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: *debian-arm64-llvm
.use-debian/arm64_test-base:
tags:
- aarch64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: ${DEBIAN_ARM64_TEST_BASE_IMAGE}
MESA_BASE_TAG: *debian-arm64_test-base
LLVM_VERSION: *debian-arm64-llvm
needs:
- debian/arm64_test-base
# Debian based x86_64 test image for GL
debian/x86_64_test-gl:
extends: .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/x86_64_test-gl:
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_TAG: *debian-x86_64_test-gl
needs:
- debian/x86_64_test-gl
# Debian based x86_64 test image for VK
debian/x86_64_test-vk:
extends: .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/x86_64_test-vk:
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_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:
extends:
- .android-variables
- .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
.use-debian/x86_64_test-android:
extends:
- .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_TAG: *debian-x86_64_test-android
needs:
- debian/x86_64_test-android
# Debian-based x86_64 image to run Python utilities
debian/x86_64_pyutils:
extends:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_pyutils "${DEBIAN_PYUTILS_TAG}"
.use-debian/x86_64_pyutils:
extends:
- .fdo.container-build@debian
- .debian-container-version
- .set-image
variables:
MESA_IMAGE_PATH: ${DEBIAN_PYUTILS_IMAGE}
MESA_IMAGE_TAG: *debian-x86_64_pyutils
needs:
- debian/x86_64_pyutils
# Debian based aarch64 test image for GL
debian/arm64_test-gl:
tags:
- aarch64
extends: .use-debian/arm64_test-base
variables:
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/arm64_test-gl:
tags:
- 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_TAG: *debian-arm64_test-gl
needs:
- debian/arm64_test-gl
# Debian based aarch64 test image for VK
debian/arm64_test-vk:
tags:
- 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
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm64_test-base
MESA_IMAGE_PATH: ${DEBIAN_ARM64_TEST_IMAGE_VK_PATH}
MESA_IMAGE_TAG: *debian-arm64_test-vk
needs:
- debian/arm64_test-vk
# Get firmware directly rather than using package versions.
# Change KERNEL_ROOTFS_TAG to add firmware changes.
# FIRMWARE_FILES is a list of json files arranged by vendor in .gitlab-ci/firmware/*
.firmware_x86_64:
variables:
FIRMWARE_FILES: |
.gitlab-ci/firmware/i915/mtl-fw.json
.firmware_arm64:
variables:
FIRMWARE_FILES: |
.gitlab-ci/firmware/arm/mali/arch10.8/mali-fw.json
.firmware_arm32:
variables:
FIRMWARE_FILES: |
.kernel+rootfs:
extends:
- .container+build-rules
- .debian-container-version
stage: container
timeout: 120m
variables:
GIT_STRATEGY: fetch
MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
DISTRIBUTION_TAG: &distribution-tag-arm "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
script:
- .gitlab-ci/container/lava_build.sh
kernel+rootfs_x86_64:
extends:
- .use-debian/x86_64_build-base
- .kernel+rootfs
- .firmware_x86_64
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-x86_64 "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
LLVM_VERSION: *debian-x86_64-llvm
kernel+rootfs_arm64:
extends:
- .use-debian/arm64_build
- .kernel+rootfs
- .firmware_arm64
tags:
- aarch64
variables:
DEBIAN_ARCH: "arm64"
LLVM_VERSION: *debian-arm64-llvm
kernel+rootfs_arm32:
extends:
- kernel+rootfs_arm64
- .firmware_arm32
variables:
DEBIAN_ARCH: "armhf"
LLVM_VERSION: &debian-arm32-llvm 15 # no armhf builds for LLVM
# Cannot use anchors defined here from included files, so use extends: instead
.use-kernel+rootfs-arm:
variables:
DISTRIBUTION_TAG: *distribution-tag-arm
MESA_ROOTFS_TAG: *kernel-rootfs
.use-kernel+rootfs-x86_64:
variables:
DISTRIBUTION_TAG: *distribution-tag-x86_64
MESA_ROOTFS_TAG: *kernel-rootfs
# x86_64 image with ARM64 & ARM32 kernel & rootfs for baremetal testing
.debian/baremetal_arm_test:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
# Don't want the .container rules
- .container+build-rules
variables:
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
ARTIFACTS_PREFIX: "https://${S3_HOST}/${S3_KERNEL_BUCKET}"
ARTIFACTS_SUFFIX: "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARTIFACTS_TAG: *debian-arm64_build
MESA_ROOTFS_TAG: *kernel-rootfs
debian/baremetal_arm32_test:
extends:
- .debian/baremetal_arm_test
needs:
- kernel+rootfs_arm32
variables:
MESA_IMAGE_TAG: &debian-arm32_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
debian/baremetal_arm64_test:
extends:
- .debian/baremetal_arm_test
needs:
- kernel+rootfs_arm64
variables:
MESA_IMAGE_TAG: &debian-arm64_test "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
.use-debian/baremetal_arm_test:
variables:
MESA_ROOTFS_TAG: *kernel-rootfs
.use-debian/baremetal_arm32_test:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
extends:
- .use-debian/baremetal_arm_test
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm32_test"
MESA_IMAGE_TAG: *debian-arm32_test
needs:
- debian/baremetal_arm_test
.use-debian/baremetal_arm64_test:
image: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
extends:
- .use-debian/baremetal_arm_test
variables:
MESA_IMAGE_PATH: "debian/baremetal_arm64_test"
MESA_IMAGE_TAG: *debian-arm64_test
needs:
- debian/baremetal_arm_test
# Native Windows docker builds
#
# Unlike the above Linux-based builds - including MinGW builds which
# cross-compile for Windows - which use the freedesktop ci-templates, we
# cannot use the same scheme here. As Windows lacks support for
# Docker-in-Docker, and Podman does not run natively on Windows, we have
# to open-code much of the same ourselves.
#
# This is achieved by first running in a native Windows shell instance
# (host PowerShell) in the container stage to build and push the image,
# then in the build stage by executing inside Docker.
.windows-docker-msvc:
variables:
MESA_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_IMAGE_PATH}:${MESA_IMAGE_TAG}"
MESA_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MESA_IMAGE_PATH:${MESA_IMAGE_TAG}"
extends:
- .windows-docker-tags
.windows_container_build:
inherit:
default: [retry]
extends:
- .container
- .windows-docker-msvc
- .windows-shell-tags
rules:
- !reference [.common-rules, rules]
- !reference [.microsoft-farm-container-rules, rules]
- !reference [.container+build-rules, rules]
variables:
GIT_STRATEGY: fetch # we do actually need the full repository though
MESA_BASE_IMAGE: None
script:
- .\.gitlab-ci\windows\mesa_container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $MESA_IMAGE $MESA_UPSTREAM_IMAGE ${DOCKERFILE} ${MESA_BASE_IMAGE}
windows_msvc:
inherit:
default: [retry]
extends:
- .windows_container_build
variables:
MESA_IMAGE_PATH: &windows_msvc_image_path ${WINDOWS_X64_MSVC_PATH}
MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
DOCKERFILE: Dockerfile_msvc
MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
windows_build_msvc:
inherit:
default: [retry]
extends:
- .windows_container_build
rules:
- !reference [.common-rules, rules]
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
MESA_IMAGE_PATH: &windows_build_image_path ${WINDOWS_X64_BUILD_PATH}
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
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
timeout: 2h 30m # LLVM takes ages
needs:
- windows_msvc
windows_test_msvc:
inherit:
default: [retry]
extends:
- .windows_container_build
rules:
- !reference [.common-rules, rules]
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
MESA_IMAGE_PATH: &windows_test_image_path ${WINDOWS_X64_TEST_PATH}
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
MESA_BASE_IMAGE: "$CI_REGISTRY_IMAGE/${MESA_BASE_IMAGE_PATH}:${WINDOWS_X64_MSVC_TAG}"
timeout: 2h 30m
needs:
- windows_msvc
.use-windows_build_msvc:
inherit:
default: [retry]
extends: .windows-docker-msvc
image: "$MESA_IMAGE"
variables:
MESA_IMAGE_PATH: *windows_build_image_path
MESA_IMAGE_TAG: *windows_build_image_tag
needs:
- windows_build_msvc
.use-windows_test_msvc:
inherit:
default: [retry]
extends: .windows-docker-msvc
image: "$MESA_IMAGE"
variables:
MESA_IMAGE_PATH: *windows_test_image_path
MESA_IMAGE_TAG: *windows_test_image_tag
include:
- local: '.gitlab-ci/container/gitlab-ci-inc.yml'
- local: '.gitlab-ci/container/*/gitlab-ci.yml'

View File

@@ -2,10 +2,11 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# ALPINE_X86_64_BUILD_TAG
# DEBIAN_BUILD_TAG
# FEDORA_X86_64_BUILD_TAG
rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED
# We need at least 1.4.0 for rusticl
pip3 install 'meson==1.4.0'
# We need at least 1.7.0 for proper rust binding generation
pip3 install 'meson==1.7.0'

View File

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

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

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