Compare commits

...

7385 Commits

Author SHA1 Message Date
Eric Engestrom
8a3d5aed64 docs: add sha sum for 25.1.5 2025-07-02 17:57:21 +02:00
Eric Engestrom
fe77ae26db VERSION: bump for 25.1.5 2025-07-02 17:46:17 +02:00
Eric Engestrom
1bf5e50bb2 docs: add release notes for 25.1.5 2025-07-02 17:46:17 +02:00
Rob Clark
1a85ddb514 rusticl: Fix work group size validation
For each dimension, we `threads *= lws`.. which is still zero if threads
is initialized to zero.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

No fossils-db changes.

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

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

Fixes the build on non-KMS/DRM system.

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

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

cc: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes vkd3d-proton's test_sampler_border_color

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

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

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

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

    option `-' is invalid: ignored

cc: mesa-stable

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

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

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

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

cc: mesa-stable

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

Also amend the missing ChromaSiting cases.

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

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

cc: mesa-stable

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

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

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

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

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

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

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

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

Cc: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

Cc: mesa-stable

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35590>
(cherry picked from commit a676ba9294)
2025-07-02 16:19:29 +02:00
José Roberto de Souza
b09fcbc09b Revert "anv: Enable preemption due 3DPRIMITIVE in GFX 12"
Enabling preemption in 3DPRIMITIVE is causing glitches on Dota 2,
so reverting this until the issue with preemption is fixed.

This reverts commit 3cd972a2d3.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13289
Fixes: 12ddaa6b8b ("anv: Enable preemption due 3DPRIMITIVE in GFX 12")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35586>
(cherry picked from commit 37f4182ac3)
2025-07-02 16:19:29 +02:00
Georg Lehmann
5afe7c8f1a nir/opt_intrinsic: fix inclusive scan rewrite with multiple uses
Modifying the iterated list is a footgun, so just create a new instruction.

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

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

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

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

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

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

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

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW <=> EGL_YUV_NARROW_RANGE_EXT

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

- VK_SAMPLER_YCBCR_RANGE_ITU_NARROW <=> EGL_YUV_NARROW_RANGE_EXT

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

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

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

cc: mesa-stable

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

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

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

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

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

Fixes OpenCL-CTS test_buffers.

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

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

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

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

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

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

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

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

This fixes rendering issues with RADV_DEBUG=nohiz.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes consistent hangs in DOOM: The Dark Ages.

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

(cherry picked from commit d4cedcd362)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.0
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34978>
(cherry picked from commit 62a9b4b976)
2025-06-18 17:55:44 +02:00
Alyssa Rosenzweig
b2b0f17d80 hk: fix texture state count
default is 256 which is not what we want! perf issue maybe.

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

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

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

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

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

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

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

This seems to break gtk4 and other stuff.

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

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

Fixes: 47f5d25f93 ("radv,radeonsi: emit UPDATE_DB_SUMMARIZER_TIMEOUT on GFX12")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13312
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35370>
(cherry picked from commit babeb975c4)
2025-06-07 15:44:17 +02:00
Eric Engestrom
a3c110e9d6 .pick_status.json: Update to 16dbcd9b04 2025-06-07 15:44:14 +02:00
Eric Engestrom
98320e5ca2 docs: add sha sum for 25.1.2 2025-06-04 20:12:14 +02:00
Eric Engestrom
02d708024f VERSION: bump for 25.1.2 2025-06-04 17:10:29 +02:00
Eric Engestrom
504560fe3c docs: add release notes for 25.1.2 2025-06-04 17:10:29 +02:00
Iago Toral Quiroga
39603d3b9d broadcom/compiler: handle moving last ubo load in the block correctly
Before we move a UBO load to a previous location in the block we take a
reference to the instruction after it so we can continue the loop from
there, however, if the load we just moved was already the last instruction
in the block we just want to break the loop right there.

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

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

Cc: mesa-stable

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

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

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

Cc: mesa-stable

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

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

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

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

into this :

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

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

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

 Conflicts:
	android/Android.mk

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

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

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

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

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

cc: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

Fixes hangs in DOOM: The Dark Ages.

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

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

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

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

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

This must be emitted when the GFX queue is idle.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  - pipe_reference_described
  - pipe_reference
  - radeon_bo_reference
  - radeon_ws_bo_reference
  - radeon_lookup_or_add_real_buffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This also fixes CL_KERNEL_EXEC_INFO_SVM_PTRS with param_value being null.

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

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

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

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

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

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

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

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

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

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

Reported by Baldur.

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

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

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

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

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

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

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

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

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

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

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

This case is still unhandled on JM.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This commit removes this unnecessary allocation.

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

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

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

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

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

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

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

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

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

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

cc: mesa-stable

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

fixes dEQP-VK.conditional_rendering.conditional_ignore.resolve_image*

cc: mesa-stable

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

  pipeline_layout_A :
     set0 : NULL
     set1 : descriptor_set_layout_A

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

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

swrast driver name is still used for lavapipe vulkan driver

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

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

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

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

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

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

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

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

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

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

CC: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35044>
(cherry picked from commit 5828612da2)
2025-05-20 20:18:08 +02:00
Tapani Pälli
ad159bbd93 intel/compiler: provide a helper for null any-hit shader
Xe driver will be disabling the HW functionality for null any-hit
shaders, drivers need to take care of it instead. This commit brings
back parts of older workaround (see b0624e414f) we used to have to
handle the null any-hit case.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35044>
(cherry picked from commit 0f591425c9)
2025-05-20 20:18:08 +02:00
Georg Lehmann
4fa2dbdf55 aco: assume sram ecc is enabled on Vega20
There are D16 load issues on Vega20 that are expected if sram ecc is enabled.
It's a professional class chip and I found mentions of it supporting ecc,
so assume it's enabled.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This fixes rendering issue with Blender.

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

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

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

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

This fixes new VKCTS coverage.

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

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

cc: mesa-stable

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

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

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

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

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

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

This probably also fixed splitting with 8-bit stores.

Fixes arb_copy_buffer-overlap

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

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

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

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

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

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

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

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

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

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

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

This change fixes this check.

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

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

Fixes recent VKCTS coverage.

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

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

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

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

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

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

This fixes rendering issues with scanout in Indiana Jones.

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

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

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

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

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

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

cc: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

cc: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

shader-db:

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

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

fossil-db:

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

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

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

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

shader-db:

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

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

fossil-db:

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

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

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

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

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

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

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

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

Fixes: 76096d04bb ("anv: relax restriction on variable count descriptors")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34671>
(cherry picked from commit ed9f135936)
2025-04-30 14:15:45 +02:00
Eric Engestrom
d06fb6fb4b .pick_status.json: Update to eeffb4e674 2025-04-30 14:15:30 +02:00
Erik Faye-Lund
7926758a78 panvk: support vulkan 1.2 on v10+
While not yet officially conformant, we support all the required
features, and we pass the CTS. Let's mark off Vulkan 1.2, to make things
easier for applications.

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

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

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

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

Fixes: 1f3b8bb918 ("panvk: Add support for Draw[Indexed]Indirect")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34674>
(cherry picked from commit c7f2bc6bed)
2025-04-27 11:50:23 +02:00
Olivia Lee
3c85516be1 panfrost: allow promoting sysval UBO to push constants
We already had a path for sysvals in panfrost_emit_const_buf, but it was
unused because we only allowed pushing the default UBO 0. Improves
glmark2 score on G610 from 3051 to 3071, but mostly we need it as a
prerequisite for dynamic blend constants.

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

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

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

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

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

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

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

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

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

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

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

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

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

The fix is two-fold:

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

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

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

Similar to 576a2e798c

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

combined stats from this commit and the previous commit:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

resolve_all_gfx11() is also finished.

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

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

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

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

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

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

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

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

   Wa_14018443005
   Wa_18038669374

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

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

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

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

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

cc: mesa-stable

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

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

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

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

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

Fixes: 8c91624614 ("winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT allocations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34547>
(cherry picked from commit 555821ff93)
2025-04-17 02:28:14 +02:00
Eric Engestrom
7a48ce1ed4 .pick_status.json: Update to d5ad798140 2025-04-17 02:28:11 +02:00
Eric Engestrom
b2f79a5e1a VERSION: bump for 25.1.0-rc1 2025-04-16 15:29:25 +02:00
Mark Collins
93547d45ce ir3/a7xx: Add post-RA pass to track liveness and insert (last)
Introduces a backwards dataflow analysis pass to determine when a
certain register is always written to prior to being read in a
similar manner to SSA liveness but performed after RA which we can
use to determine when we can insert (last) on src regs on A7XX.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

See also 3f782cdd25.

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

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

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

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

See also 3f782cdd25.

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

No shader-db changes on any Intel platform.

fossil-db:

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

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

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

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

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

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

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

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

shader-db:

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

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

fossil-db:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34032>
2025-04-15 13:36:07 +02:00
Mary Guillemard
0bcd8f08a9 pan/earlyzs: Default to FORCE_EARLY for ZS update on v11+
This rule changed with v11 and is needed for
"dEQP-VK.fragment_operations.early_fragment.discard_early_fragment_tests_stencil"
to pass.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Add ACO-specific main shader parts to fix that.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

this makes total sense and is very obvious

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

cc: mesa-stable

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

cc: mesa-stable

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34457>
2025-04-11 18:35:49 +00:00
José Roberto de Souza
68a617076d intel/perf: Update intel_perf to match xe_drm.h
There was a mismatch between drm-next version of xe_drm.h and the one
in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142.
So this does the necessary changes to build with current and new
xe_drm.h

Fixes: 2a828c35a1 ("intel/perf: add eu stall sampling support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34457>
2025-04-11 18:35:49 +00:00
Timur Kristóf
371b1bf789 radv: Don't call nir_opt_varyings a second time when unnecessary.
When nir_opt_varyings doesn't make progress the first time,
it should not be necessary to call it a second time.

No Fossil DB changes.

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

No Fossil DB changes.

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

No Fossil DB changes.

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

No Fossil DB changes.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Erik Faye-Lund
b4ebffa1aa panfrost: fixup typo in 16x sample-pattern
This is an n-queen pattern, where no two values should be on the same
row or column. But this and the second to last element has the same y
component, and neither has the negative one.

Let's fix this up by setting the first value to the negative value. This
matches the D3D 16x sample pattern.

Fixes: a61fb62966 ("panfrost: Upload sample positions on device init")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33925>
2025-04-11 08:01:08 +00:00
Valentine Burley
b49eaf0966 ci/lava: Consolidate piglit trace job definitions
Clean up LAVA job definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:07 +00:00
Valentine Burley
f9564e1754 ci/piglit: Consolidate identical skip lists for X11 and gbm
The tests skipped in x11-skips.txt and gbm-skips.txt were identical,
so consolidate them into the common all-skips.txt file.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
b8a9aa8487 ci/piglit: Remove piglit-runner.sh script
This is no longer used, since all jobs migrated to using deqp-runner
suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
87d58ea57a ci/piglit: Consolidate HWCI_TEST_SCRIPT for piglit traces
The HWCI_TEST_SCRIPT variable was always getting overwritten for these
definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
1aeedddbb6 ci/piglit: Drop redundant PIGLIT_PROFILES variable
PIGLIT_PROFILES was only used with the piglit-runner.sh script, which no
jobs were using anymore.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Valentine Burley
09f86df938 intel/ci: Convert iris-kbl-piglit to deqp-runner suite
This was the last job using the piglit-runner.sh script.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34424>
2025-04-11 07:05:06 +00:00
Benjamin Lee
a02b6e6bef panvk: don't advertise VK_KHR_float_controls2 on bifrost
This extension requires vulkan 1.1. Fixes
dEQP-VK.api.info.extension_core_versions.extension_core_versions on
bifrost.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 22fa3e88dd ("panvk: advertise VK_KHR_float_controls2")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34463>
2025-04-10 20:12:21 +00:00
Konstantin Seurer
b218c45973 radv: Handle nir_intrinsic_printf
Makes it possible to use printf statements inside glsl meta shaders.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34208>
2025-04-10 19:31:37 +00:00
Konstantin Seurer
ba001626ac nir: Turn the format string index into a const index
It is already expected to be constant.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34208>
2025-04-10 19:31:37 +00:00
Konstantin Seurer
d21926bc04 spirv: Emit code for NonSemantic.DebugPrintf if supported
This can be useful for debugging code in situations where VVL cannot be
used. (DGC, meta shaders)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34208>
2025-04-10 19:31:37 +00:00
Benjamin Lee
28e2d9088c panvk: enable uniformAndStorageBuffer8BitAccess and storagePushConstant8
8-bit loads are already supported by bi_emit_load_ubo and
bi_emit_load_push_constant, so the only necessary changes were fixing
swizzle lowering issues uncovered by these CTS tests.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:16:02 -07:00
Benjamin Lee
b683a59438 panfrost/va: valhall-specific swizzle lowering
For most swizzled instructions that are different between valhall and
bifrost, valhall allows more values than bifrost does, so we can avoid
some unnecessary lowering.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
168c96816a panfrost: use bifrost instruction table for bi_lower_swizzle
Fixes two known issues:

 - We did not lower invalid swizzles for IADD.v4s8, triggered in the CTS by
   enabling uniformAndStorageBuffer8BitAccess and storageBuffer8BitAccess in
   panvk.
 - We did not lower invalid swizzles for IMUL.v4i8, triggered by
   dEQP-VK.spirv_assembly.instruction.compute.mul_extended.(un)signed_8bit
   on bifrost.

The old logic was missing several other instructions, so there may be
additional bugs that we don't know about.

There are no cases where the new behavior will keep swizzles that would
have been lowered previously, so this change should not introduce any
new bugs with valhall.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
f513ddfc1c panfrost/va: use 'lane' modifier for MKVEC.v2i8
Previously we were using 'swizzle', with special handling in va_pack.
This does not work if we want to use va_src_info to determine allowed
swizzles in bi_lower_swizzle. The allowed set of swizzle values for
'lane' is correct for this instruction.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
f2c8267962 panfrost: add bi_swizzle values for unused swizzles
This makes codegen using bifrost/ISA.xml swizzle values simpler because
we don't need to special-case the values that we don't emit.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Benjamin Lee
4abd75c7d1 panfrost: define bi_swizzle alias values
Primary reason to do this is to make codegen using the swizzle names in
bifrost/ISA.xml simpler. A secondary benefit is that dependent code can
now use the swizzle name that matches the context, making things a
little more readable.

We may want to consider giving widens separate values later, so that
va_lower_constants and bi_opt_constant_fold can fold them correctly, but
I don't know of current bugs caused by this.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33416>
2025-04-10 10:15:46 -07:00
Lionel Landwerlin
06ad9a25e5 brw: fix Wa_22013689345 emission
2 problems :
  - not detecting null destination correctly
  - applied too late using SHADER_OPCODE_MEMORY_FENCE, when lowering
    already happened

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34319>
2025-04-10 16:44:28 +00:00
Benjamin Lee
22fa3e88dd panvk: advertise VK_KHR_float_controls2
This is all supported by the common nir code, no changes needed on our
end.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
7612dc4713 panvk: advertise VK_KHR_shader_float_controls
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
95056fa75a panvk/va: don't advertise independent denorm behavior
Valhall supports all combinations of ftz/preserve denorm behavior
between FP16 and FP32 except FP16=ftz, FP32=preserve. Because of this,
we can't advertise independent denorm behavior.

Even with INDEPENDENCE_NONE, it is still possible for shaders to set
denorm behavior for one size and leave the other size unspecified.
Previously we were defaulting to preserve for any unspecified size, but
with FP16=ftz, we need to default unspecified FP32 to preserve.

When advertising INDEPENDENCE_NONE, the CTS checks that the
shaderDenormFlushToZeroFloat* and shaderDenormPreserveFloat* features
are equal for all sizes, so we need to advertise the same supported
denorm behavior for FP64 even though we don't support FP64 at all.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
b6406c179b pan/bi: implement denorm behavior float controls
On bifrost independent float controls are implementable, just
potentially expensive because it requires scheduling FP16 and FP32
instructions in separate clauses.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
9737c1fa15 pan/bi: ignore ftz mode when scheduling int instructions
This allows more efficient scheduling by putting a 16-bit int
instruction in the same clause as a 32-bit float instruction even when
the 16-bit and 32-bit float controls are different.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
08765d53c9 pan/bi: refactor bi_instr_ftz to allow dontcare FTZ states
The current behavior is identical, but we can express that some
instructions may be packed in either FTZ and no-FTZ clauses in the
future.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
5bb85e965e pan/va: preserve signed zero in f32->f16 conversions
Using 'FADD.f32 x, +0' for f32->f16 conversions strips signed zero,
which we can't do if we advertise shaderSignedZeroInfNanPreserveFloat16.
Adding -0 instead preserves the original sign.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: b63ef74e73 ("pan/bi: Stop using V2F32_TO_V2F16 on Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
239c6b833a panfrost: implement float controls rounding mode
Many float instructions do not have a rounding mode modifier, but all of
the operations that are listed as requiring correct rounding in the
vulkan spec are supported in hardware.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Benjamin Lee
6f68649400 pan/va: add roundmode modifier to additional instructions
These are needed to implement VK_KHR_shader_float_controls rounding
mode.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33660>
2025-04-10 16:21:09 +00:00
Lars-Ivar Hesselberg Simonsen
20c0d169e4 vk/sync: Fix execution only barriers
With vkCmdPipelineBarrier, it's possible to specify a barrier with
pipeline stages but without any memory barriers. These might not be
practical, but are legal Vulkan code.

Barriers like this are currently ignored in mesa, as we only convert
barriers with passed memory barriers into vkCmdPipelineBarrier2.

This commit adds handling of execution only barriers by converting them
into a memory barrier without access masks.

Fixes: 97f0a4494b ("vulkan: implement legacy entrypoints on top of VK_KHR_synchronization2")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34187>
2025-04-10 15:28:22 +00:00
Daniel Stone
7c73b9a498 doc/ci: Update nginx caching snippets
Fix the nginx cache snippets - I'd missed the file nesting somehow.
Tested on a debian:bookworm image with nginx-full installed, checked
that we could pull an arbitrary external site, as well as S3, as well
as GitLab artifacts.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34341>
2025-04-10 15:21:51 +00:00
Ludvig Lindau
6393ebbdbb panvk: Get flush_id once per submit
Get flush_id once per command buffer in the submit and use it for all
subqueues instead of getting a new flush_id for every subqueue.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34448>
2025-04-10 15:00:57 +00:00
Tapani Pälli
30d78dc942 mesa: various fixes for ClearTexImage/ClearTexSubImage
Fixes some upcoming CTS tests for texture clears.

* some drivers will attempt to issue clears with zero range
  and hit asserts/crashes (spec clarification for negative
  values)

* fix error thrown with negative values to match spec

* fix cases for clearing generic compressed formats

* fix negative case of using color format while having
  depth/stencil internalformat and vice versa

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34428>
2025-04-10 14:32:56 +00:00
Tapani Pälli
3bc016bb6c mesa: clamp texbuf query size to MAX_TEXTURE_BUFFER_SIZE
Fixes upcoming CTS test checking for clamping.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34428>
2025-04-10 14:32:56 +00:00
Boris Brezillon
24b1aa6c28 panvk/csf: Optimize read-only tile buffer access
When the color/input attachment map is known at compile time, we can
determine the set of read-only render targets and replace .wait by
.wait_resource flows, in order to avoid read-after-read serialization.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:54 +00:00
Boris Brezillon
4f4ac56145 pan/va: Support relaxed waits on read-only render targets
On Valhall we can optimize lower waits, which waits for both readers and
writers, into resource_waits which only wait for writers, allowing
threads accessing read-only resources to execute concurrently.

Let's use that on LD_TILE instructions so we can optmize the read-only
case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
fbb2805575 panvk: Advertise KHR_dynamic_rendering_local_read support
Now that we support local reads we can safely advertise
KHR_dynamic_rendering_local_read.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
7a2b23b0bd panvk: Skip BY_REGION barriers if we're in a render pass
If we are in a render pass, the intra-draw synchronization happens
through the FPK parameters, shader waits and draw dependencies, so we
can safely skip the barrier in that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
bfd5ddbf32 panvk: Optimize input attachment loads when we can
When we know the input attachment is also an active color attachment
we can load the value from the tile buffer instead of going back to
the texture.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
20275d6521 pan/bi: Introduce two intrinsics to support input attachment remapping
In order to dynamically load the content of the tile buffer, we need
to know the target (color, depth or stencil) and the conversion to
apply. Let's define the load_input_attachment_{target,conv}_pan
intrinsics so we can dissociate the logic lowering input attachment
loads into load_converted_output_pan, and the part optimizing the shader
when input attachment map is passed at compile time.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
244995e4af panvk: Support color attachment remapping
We take the color attachment remapping into account when emitting
blend descriptors, and we make sure we re-emit those when this color
attachment map is dirty.

We also need to take the remapping into account when checking the
render targets written by the fragment shader, hence the addition of
a color_attachment_written_mask() helper.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
9d5d03bf78 panvk/jm: Move cmd_prepare_draw_sysvals() out of the layer loop
The only sysval that changes is the layer_id, so let's call
cmd_prepare_draw_sysvals() outside of the layer loop, and manually
update the sysval there.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
fe21da08ed pan/earlyzs: Support the shader ZS read-only case and its optimization on v10+
We are about to allow ZS tile buffer reads in panvk in order to support
VK_KHR_dynamic_rendering_local_read, and this requires dealing with
a new case in the early ZS logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
d2cd5ca609 panvk: Generate the earlyzs LUT at shader creation time
Do what the gallium driver does and generate the LUT when creating the
shader to avoid regenerating this LUT in the draw path.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
b8174b21d2 panvk: Isolate CS specific bits in panvk_shader
We are about to add FS specific info there, so let's make sure all the
per-stage bits are part of a union and are conditionally
filled/[de]serialized based on the shader type.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
8a16636444 panvk: Re-order things in panvk_deserialize_shader()
Re-order things in panvk_deserialize_shader() to avoid declaring local
variables for stuff we feed the panvk_shader with. The only exception
is pan_shader_info, because we need to know the shader stage to call
vk_shader_zalloc(), which if part of pan_shader_info.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
864ea81dcf panvk/csf: Set invalidate_inherited_ctx only if the render pass is inherited
Secondary command buffers don't necessarily inherit their render
context. If we flush draws, we should only set invalidate_inherited_ctx
when the render context is inherited, otherwise is messes up with the
primary command buffer state.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
f3be0836b7 pan/bi: Pass an explicit sampleid to load_converted_output_pan
Needed if we want to lower multisample input attachment loads to
tile buffer loads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
cdeda45282 pan/bi: Pass load_converted_output_pan target through a source
This allows us to pass a dynamic render target which will be needed
to support VK_KHR_dynamic_rendering_local_read.

While at it, we also enable support for depth/stencil tile loads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
2e8829f54a pan/bi: Allow depth/stencil tile buffer access using LD_TILE
LD_TILE has a .z_stencil modifier we can use to access the depth/stencil
tile buffer.

This will be needed for native depth/stencil input attachments support in
panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
08307ecf3c panvk/jm: Don't force a preload if the previous batch didn't have draws
We should only force a preload after a batch split if the batch we
flush had draws, otherwise we might lose the effect of clears asked
by the user.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
3669cc66c6 vulkan/state: Fix default input attachment map values
When no input attachment location info is provided, the depth/stencil
attachment are supposed to be NO_INDEX, not UNUSED, and we should also
set the color_attachment_count to UNKNOWN.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Lionel Landwerlin
e321c438dc anv: fix self dependency computation
Some upcoming changes in the runtime will make it impossible to rely
on the pipeline or runtime information to know whether a fragment
shader has input attachments.

Instead we gather that information at compile time and store it in our
shader bind_map.

At runtime we check whether the fragment shader has input attachments
and whether those map to the runtime depth/stencil input attachments
to set the 3DSTATE_PS_EXTRA::PixelShaderKillsPixel.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d2f7b6d5a7 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
be2532fc00 vk/pass: Add input attachment location info
For drivers using the render pass emulation provided by the
runtime, it's important to express the mapping between
depth/stencil/color attachments and input attachments using
VkRenderingInputAttachmentIndexInfoKHR, otherwise those drivers
have to special-case emulated render passes in their
CmdBeginRendering() implementation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Boris Brezillon
38e546c202 vulkan/state: Fix input attachment map state initialization/copy
vk_dynamic_graphics_state_copy() is not copying the input attachment
map, and color_attachment_count is not initialized in
vk_dynamic_graphics_state_init_ial().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32540>
2025-04-10 13:17:53 +00:00
Corentin Noël
34a5f4ac7c virgl: Use drmCloseBufferHandle instead of calling dmIoctl directly
Makes the code a bit lighter.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34437>
2025-04-10 12:55:51 +00:00
Corentin Noël
5144a4f56c virgl: Close handle on resource info failure
We just opened the GEM handle a few line before (or used drmPrimeFDToHandle to
acquire it), on failure it is just better to close it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34437>
2025-04-10 12:55:51 +00:00
Martin Krastev
60d815d1bf docs/svga: Add steps how to get VMware Workstation Pro on Linux
Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12829
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34429>
2025-04-10 10:38:56 +00:00
Caterina Shablia
e5bdb41200 panfrost: move the comment closer to what it's about
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Caterina Shablia
83383cb4b8 panfrost: require buffer_count and pushed_words to be passed to panfrost_emit_const_buf
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Alyssa Rosenzweig
59a3e12039 panfrost: do not push "true" UBOs
Panfrost supports pushing uniforms to hardware uniform registers (RMU/FAU for
Midgard/Bifrost respectively). Since OpenGL uniforms are lowered to UBO #0, it
does this with a pass that pushes UBOs. That's good!

The pass also pushes 'true' OpenGL UBOs, since they look the same in the backend
at this point. This is where the trouble comes in:

- True UBOs are allocated in GPU BOs, not CPU allocated buffers. That means it's
  write-combine memory, which we cannot read from efficiently (at least
  depending on coherency details that were never plumbed through panfrost.ko and
  unlikely to be replumbed now that panthor is the new hot stuff). So, pushing
  true UBOs reduces GPU overhead at the cost of tremendous CPU overhead. This is
  dubious... When I benchmarked this on MT8192 in early 2023, this pushing
  improved FPS in SuperTuxKart but hurt FPS in Dolphin.

- True UBOs can be written on the GPU. In OpenGL, we have batch tracking
  infrastructure to sort this mess out in theory. What this means is that
  pushing UBOs requires us to flush writers AND STALL at draw-time. If this is
  ever hit, our performance is utterly trashed. But it gets worse.

- True UBOs can be written in the same batch that reads them. For example, we
  could bind a buffer as a transform feedback buffer, do a draw with XFB, then
  rebind as a UBO and do a draw reading. This is where we collapse -- our logic
  will flush the writer, which is the same batch we were in the middle of
  enqueueing a draw to. When we try to push words, we'll crash with theatrics.
  This could be solved by smartening the batch tracking logic but it's not
  trivial by any means.

So, pushing true UBOs on the CPU is broken and can hurt performance. Stop doing
it!

Long term, the solution will be to push on the GPU instead. This avoids all of
these issues. This can be done with a compute kernel or with CSF instructions.
The Vulkan driver will likely have to do this for performance, since pushing
UBOs from the CPU is utterly broken in Vulkan for the above reasons.

I have a branch somewhere doing this on v9 but I'm doing this on NIR time to
unblock a core change that was crashing piglit due to this pile of unsoundness.
Let's fix the correctness issues first, then someone can look at recovering
performance later when we're not blocking unrelated work.

Fixes corruption in Piglit test
gles-3.0-transform-feedback-uniform-buffer-object, which writes a UBO with
transform feedback. (I suspect the test still doesn't pass for the same reason
it's broken on other tilers. But that's a better place to be than oodles of
memory corruption.)

According to CI, fixes spec@arb_uniform_buffer_object@rendering{-dsa}-offset.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Caterina Shablia
2c75b6bb01 panfrost: update nr_uniform_buffers before dispatching XFB
Currently nr_uniform_buffers will be whatever the previous draw set
for its vertex shader, which is not what the XFB shader usually
expects.

Fixes: c246af0d ("panfrost: Only upload UBOs when needed")

Cc: mesa-stable

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Caterina Shablia
6948ab727f panfrost: don't overwrite push uniforms and sysvals UBO with user's UBO
ss->info.ubo_mask includes the push+sysval UBO so if there's a user
UBO bound at the same index as the push+sysval UBO, without this
change we end up writing a descriptor for the user UBO at that index.

Fixes: 3b3cd59f ("panfrost: Launch transform feedback shaders")

Cc: mesa-stable

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Alyssa Rosenzweig
f179f6952f panfrost: invert and rename no_ubo_to_push flag
only the GL driver actually wants this, neither panvk nor internal shaders do.

Cc'd as a prereq to the next patch

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34193>
2025-04-10 08:05:21 +00:00
Samuel Pitoiset
2f00daf67a radv: tidy up radv_emit_hw_ngg()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
1290b38f57 radv: tidy up radv_emit_raster_state()
Better isolation between configuration and emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
4b2d119d90 radv: reduce the number of emitted DWORDS for MSAA 8x user sample locs
From 24 DWORDS to 16 DWORDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
c1ebf82700 radv: track redundant DB_RENDER_OVERRRIDE register writes on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
7f5727b313 radv: use consecutive registers for PA_SC_WINDOW_SCISSOR_{TL,BR}
For less DWORDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
32ea7df586 radv: move emitting more fb registers when rendering begins
No need to delay the emission of these registers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34420>
2025-04-10 06:56:25 +00:00
Samuel Pitoiset
001fa1cf11 radv: move the disable_trunc_coord drirc at instance/pdev level
It no longer relies on enabled device features.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34425>
2025-04-10 06:36:09 +00:00
Samuel Pitoiset
65d717b45a radv: remove an old workaround for D3D9 with DXVK 2.3.0 and older
Proton 8.x+ uses this DXVK version but Proton 9.x+ is the default now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34425>
2025-04-10 06:36:09 +00:00
Dave Airlie
0df8c4f20c nvk: add hopper support to nv_push_dump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34442>
2025-04-10 00:37:45 +00:00
Dave Airlie
725e84974e nvk: add ADA compute class to nv_push_dump
now we have the classes use them in the push dump.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34442>
2025-04-10 00:37:45 +00:00
Faith Ekstrand
a441bd3c7e nvk: Call vk_device_finish() last in nvk_DestroyDevice()
We initialize it first so we should destroy it last.  Otherwise, things
we call in our own destroy code might reference a dead vk_device and
blow up.

Fixes: d2ea532528 ("vulkan: Use syncobj shim")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34444>
2025-04-10 00:18:47 +00:00
Patrick Lerda
f0cfc1bbdc i915: fix draw_create_fragment_shader() related memory leak
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -fbo":
Direct leak of 16400 byte(s) in 5 object(s) allocated from:
    #0 0xb720689a in __interceptor_calloc (/usr/lib/libasan.so.6+0xb289a)
    #1 0xaf10f896 in draw_create_fragment_shader ../src/gallium/auxiliary/draw/draw_fs.c:47
    #2 0xaef64619 in i915_create_fs_state ../src/gallium/drivers/i915/i915_state.c:550
    #3 0xae16a955 in ureg_create_shader ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2194
    #4 0xae17f45f in ureg_create_shader_with_so_and_destroy ../src/gallium/auxiliary/tgsi/tgsi_ureg.h:150
    #5 0xae17f45f in ureg_create_shader_and_destroy ../src/gallium/auxiliary/tgsi/tgsi_ureg.h:159
    #6 0xae17f45f in util_make_fs_blit_zs ../src/gallium/auxiliary/util/u_simple_shaders.c:365
    #7 0xaf13300e in blitter_get_fs_texfetch_depth ../src/gallium/auxiliary/util/u_blitter.c:1157
    #8 0xaf13300e in util_blitter_cache_all_shaders ../src/gallium/auxiliary/util/u_blitter.c:1322
    #9 0xaef6b738 in i915_create_context ../src/gallium/drivers/i915/i915_context.c:233
    #10 0xacb33c49 in st_api_create_context ../src/mesa/state_tracker/st_manager.c:986
    #11 0xac845740 in dri_create_context ../src/gallium/frontends/dri/dri_context.c:178
    #12 0xac854d97 in driCreateContextAttribs ../src/gallium/frontends/dri/dri_util.c:631
    #13 0xb6ce79a3 in dri2_create_context_attribs ../src/glx/dri2_glx.c:240
    #14 0xb6c9606f in dri_common_create_context ../src/glx/dri_common.c:665
    #15 0xb6ca4f00 in CreateContext ../src/glx/glxcmds.c:322
    #16 0xb6ca5c0b in glXCreateNewContext ../src/glx/glxcmds.c:1449

Fixes: 1a69b50b3b ("i915g: Fix point sprites.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
2025-04-09 23:54:52 +00:00
Patrick Lerda
5af5f508b1 i915: fix nir_to_tgsi() related memory leak
For instance, this issue is triggered with "piglit/bin/glx-multithread-texture -auto -fbo":
Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0xb71eda62 in __interceptor_realloc (/usr/lib/libasan.so.6+0xb2a62)
    #1 0xadd5a32f in tokens_expand ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:239
    #2 0xadd5a32f in get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:262
    #3 0xadd62519 in copy_instructions ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2079
    #4 0xadd62519 in ureg_finalize ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2129
    #5 0xadd64bde in ureg_get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2206
    #6 0xade377d0 in nir_to_tgsi_options ../src/gallium/auxiliary/nir/nir_to_tgsi.c:4043
    #7 0xade3da63 in nir_to_tgsi ../src/gallium/auxiliary/nir/nir_to_tgsi.c:3831
    #8 0xaeb606c9 in i915_create_vs_state ../src/gallium/drivers/i915/i915_state.c:662
    #9 0xac781a2c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:720
    #10 0xac78e8a4 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:773
    #11 0xac78fc10 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1259
    #12 0xac78fc10 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
    #13 0xac790b1a in st_program_string_notify ../src/mesa/state_tracker/st_program.c:1378
    #14 0xace457a9 in _mesa_get_fixed_func_vertex_program ../src/mesa/main/ffvertex_prog.c:1397
    #15 0xac5ef8db in update_program ../src/mesa/main/state.c:281
    #16 0xac5f0ece in _mesa_update_state_locked ../src/mesa/main/state.c:560
    #17 0xac5f1653 in _mesa_update_state ../src/mesa/main/state.c:593
    #18 0xacdf9fe2 in _mesa_DrawArrays ../src/mesa/main/draw.c:1403

Fixes: 487a493325 ("i915g: Add support for per-vertex point size.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
2025-04-09 23:54:52 +00:00
Patrick Lerda
92802ea90a i915: fix slab_create() related memory leaks
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -fbo":
Direct leak of 836 byte(s) in 1 object(s) allocated from:
    #0 0xb71eb6f2 in malloc (/usr/lib/libasan.so.6+0xb26f2)
    #1 0xaefadc78 in slab_add_new_page ../src/util/slab.c:179
    #2 0xaefadc78 in slab_alloc ../src/util/slab.c:221
    #3 0xaef7d461 in i915_texture_transfer_map ../src/gallium/drivers/i915/i915_resource_texture.c:789
    #4 0xac9e931e in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:555
    #5 0xac9e931e in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
    #6 0xad49c5e4 in readpixels_memcpy ../src/mesa/main/readpix.c:260
    #7 0xad49c5e4 in _mesa_readpixels ../src/mesa/main/readpix.c:898
    #8 0xad5d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
    #9 0xad4a0caf in read_pixels ../src/mesa/main/readpix.c:1199
    #10 0xad4a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
    #11 0xad4a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231

or "piglit/bin/fcc-read-to-pbo-after-clear -auto":
Direct leak of 772 byte(s) in 1 object(s) allocated from:
    #0 0xb726b6f2 in malloc (/usr/lib/libasan.so.6+0xb26f2)
    #1 0xaf0adc88 in slab_add_new_page ../src/util/slab.c:179
    #2 0xaf0adc88 in slab_alloc ../src/util/slab.c:221
    #3 0xaf07aad7 in i915_buffer_transfer_map ../src/gallium/drivers/i915/i915_resource_buffer.c:75
    #4 0xad10de74 in pipe_buffer_map_range ../src/gallium/auxiliary/util/u_inlines.h:398
    #5 0xad10de74 in _mesa_bufferobj_map_range ../src/mesa/main/bufferobj.c:499
    #6 0xad5677ce in _mesa_map_pbo_dest ../src/mesa/main/pbo.c:308
    #7 0xad59be3b in _mesa_readpixels ../src/mesa/main/readpix.c:894
    #8 0xad6d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
    #9 0xad5a0caf in read_pixels ../src/mesa/main/readpix.c:1199
    #10 0xad5a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
    #11 0xad5a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231

Fixes: e7a73b75a0 ("gallium: switch drivers to the slab allocator in src/util")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
2025-04-09 23:54:52 +00:00
Mike Blumenkrantz
cf40099730 meson: deprecate gallium-xa
this is not maintained and will be removed in a future version

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34216>
2025-04-09 23:16:42 +00:00
Mike Blumenkrantz
6b6cb825e9 meson: deprecate gallium-nine
this is not maintained and will be removed in a future version

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34216>
2025-04-09 23:16:41 +00:00
Paulo Zanoni
fdbdfaed01 anv: add ANV_SYS_MEM_LIMIT for debugging system memory restrictions
If you suspect a workload is failing because it needs more memory, you
can set ANV_SYS_MEM_LIMIT=100 to give it all the memory available.
This could make, for example, certain games start working (it really
depends on how much RAM you have and how much the game wants).

If you suspect a workload is too resource hungry, you can try to limit
it with ANV_SYS_MEM_LIMIT=30 (or some other value) to see if it can
deal with the more restricted environment and behave accordingly.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Paulo Zanoni
ec4b2ce664 anv: restore the old behavior of up to 75% of RAM for the system heap
"We paid for sixteen gigs of RAM, so we gonna use the whole damn
   sixteen gigs of RAM!"
     - My Mom

First, some history:

The Anv 50%-or-75% rule was originally added in 2017 by 060a6434ec
("anv: Advertise larger heap sizes"). When i915.ko started reporting
memory sizes in its ioctls, it didn't impose any restrictions: 100% of
SRAM was reported as available, so the restriction was in Mesa. When
xe.ko was introduced, it only reported 50% of the SRAM as available
through its ioctls, so commit b571ae6e7a ("intel: Make memory heaps
consistent between KMDs") adapted the code to not take an extra 25% of
the 50% that was already cut, and restricted i915.ko to 50% instead of
the 50%-or-75%. In Kernel commit d2d5f6d57884 ("drm/xe: Increase the
XE_PL_TT watermark"), xe.ko changed to reporting 100% of SRAM through
its ioctls, so we adapted Mesa to do the right thing depending on
which Kernel version was running.

While this was all happening, we were discussing about which behavior
was actually the best: restrict everything to 50% in order to avoid
issues when many things are running in parallel, or keep the
restriction only at 75% in order to allow high demanding workloads to
make full use of the hardware.

The way I see, if parallel applications are causing the system to run
out of resources, the user always has the option to kill applications
and use one thing at a time. On the other hand, if a single
application needs more than 50% of the SRAM and we don't allow it in
our heaps, the application will never work (unless, of course, the
user patches Mesa). So in this commit we go back to allowing
high-demanding applications to work by restoring the 50%-or-75% rule.

This commit is especially useful in systems with integrated graphics,
like LNL, where the option to upgrade RAM is not present.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Paulo Zanoni
02e896bc49 anv/xe: detect the newer xe.ko memory reporting model and act accordingly
Kernel commit d2d5f6d57884 ("drm/xe: Increase the XE_PL_TT watermark")
changed how xe.ko reportes memory: its ioctls now report 100% of the
system RAM as available. Since our policy is to report 50% of the SRAM
as available for the heaps, add some code to check the amount reported
by xe.ko against the amount reported by the system, then act
accordingly.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Paulo Zanoni
3db8931d4a intel/i915: restrict the RAM size restrictions to Anv
Before commit b571ae6e7a ("intel: Make memory heaps consistent
between KMDs"), we had the following policy for reporting Sytem RAM
memory sizes:

- For OpenGL, we reported the total available RAM.
- For Vulkan, we reported the total available RAM as:
  - 50% of the total RAM if the total RAM was <= 4GB,
  - 75% otherwise
  - In addition, the Memory Budget (for VK_EXT_memory_budget) is 90%
    of the "free" memory, which can be an extra 10% off of the 50% or
    75%.

When xe.ko was added, one key difference was noted: while i915.ko
reported the "real" RAM memory sizes in its ioctls, xe.ko reported
only 50% of the system RAM as available. Because of that (and other
reasons, see this discussion on MR 28513), commit b571ae6e7a decided
to unify the behavior by changing the Anv i915.ko rule to "always 50%"
instead of "50% or 75%". This also changed the Iris rule to 50%
instead of 100%.

In my research, I couldn't find any reason why this restriction should
also apply to Iris, so here we revert back to handling these size
restrictions on Anv only.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28513>
2025-04-09 22:48:18 +00:00
Ian Romanick
cb69d019cf brw/nir: Use offset() for all uses of offs in emit_pixel_interpolater_alu_at_offset
This is necessary to appropriately uniformize the first component
access of a convergent vector. Without this, this is produced:

    load_payload(16) %18:D, 0d, 0d NoMask group0
    add(32) %21:F, %18+0.0:F, 0.5f
    add(32) %22:F, %18+2.0<0>:F, 0.5f

This is the correct code:

    load_payload(16) %18:D, 0d, 0d NoMask group0
    add(32) %21:F, %18+0.0<0>:F, 0.5f
    add(32) %22:F, %18+2.0<0>:F, 0.5f

Without 38b58e286f, the code generated was more incorrect, but happened
to work for this test case:

    load_payload(16) %18:D, 0d, 0d NoMask group0
    add(32) %21:F, %18+0.0<0>:F, 0.5f
    add(32) %22:F, %18+0.4<0>:F, 0.5f

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 38b58e286f ("brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset")
Closes: #12969
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34427>
2025-04-09 22:21:18 +00:00
Dave Airlie
b5d1b0d7e3 nvk: update nvidia class header files.
This adds Ada/Hopper compute headers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34440>
2025-04-09 22:03:18 +00:00
Caleb Callaway
64b5ee3001 intel/tools: fix 32b build for EU stall tool
Fixes: 610ad8d3 ("intel/tools: create intel_monitor for sampling eu stalls")

Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34439>
2025-04-09 21:40:46 +00:00
Benjamin Lee
fdf43f9152 panfrost: add core mask driconf options
These options are equivalent to the corresponding panvk options.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34374>
2025-04-09 21:09:20 +00:00
Benjamin Lee
e8cc44f4bd panvk: add core mask driconf options
These can be used to pin an application to specific cores. A tiler mask
option is not included because there is no current hardware that
includes more than one tiler.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34374>
2025-04-09 21:09:20 +00:00
Benjamin Lee
d46e76be02 driconf: add uint64 type
This is needed for panvk, where we want to expose uint64 core masks. The
previous int parsing logic was technically UB rather than guaranteed
truncate-on-overflow, but was likely compiled to truncate in practice.
It is very unlikely that anyone was relying on this.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34374>
2025-04-09 21:09:20 +00:00
Alyssa Rosenzweig
141f0ef4e4 asahi: fix i/a queries with tess
fixes new CTS additions to KHR-GL46.pipeline_statistics_query_tests_ARB.functional_tess_queries

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:50 +00:00
Alyssa Rosenzweig
27d2bd5925 gallium: wire up asahi driver
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:50 +00:00
Alyssa Rosenzweig
1a76310fb7 asahi: remove unstable uapi header
now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:50 +00:00
Alyssa Rosenzweig
c64a2bbff5 asahi: port to stable uAPI
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:49 +00:00
Alyssa Rosenzweig
3e110005a6 asahi: disable virtio gpu for upstream
until the wire protocol is stable.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:49 +00:00
Alyssa Rosenzweig
2db1ae16f3 drm-uapi: add asahi uapi
from drm-misc-next:
https://cgit.freedesktop.org/drm-misc/commit/?id=12a2bf6765c2a61eb7f20870452bb915eb28fdcc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984>
2025-04-09 20:25:49 +00:00
Caio Oliveira
7457c4ecfd brw: Make brw_range use half-open ranges
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
6509f8139d brw: Use brw_range::last() to explicit get the last valid IP
This is a preparation to change what is stored in brw_range::end.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
596bbb2c95 brw: Use brw_range to store Vars ranges
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
0b4a3c0ff6 brw: Use brw_range to store VGRF ranges
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
e644b42e59 brw: Use brw_range when operating with live ranges
Makes the intention of some comparisons clearer by using the named
helper functions.  Add commentary when the straightforward range is not
the one used, e.g. VGRF interference.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
f56a5cf1eb brw: Use brw_range in IP ranges analysis
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:49 +00:00
Caio Oliveira
fb50461220 brw: Add brw_range struct
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:48 +00:00
Caio Oliveira
8d9155e34d brw: Clean up saturate propagation after non-defs version removal
Remove now unused analysis and no need to walk blocks in reverse
after the non-defs version of the pass was removed.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:48 +00:00
Caio Oliveira
cfc4067b0e brw: Add a few basic tests for register coalesce
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34253>
2025-04-09 19:06:48 +00:00
Patrick Lerda
22c399320b i915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redundancies
Indeed, this resource was assigned twice and was not properly freed.

For instance, this issue is triggered with:
"piglit/bin/glsl-fs-pointcoord -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 0278d1fa32 ("gallium: add unbind_num_trailing_slots to set_vertex_buffers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27572>
2025-04-09 18:47:33 +00:00
Bo Hu
0d3355e41b gfxstream: update code generator for simplified dep graph
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
6cd7b4953c gfxstream: Wrap vkEnumerateInstanceExtensionProperties for host
Due to AMD driver issues on linux, we need to serialize
multithreaded calls.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
c46e8ca4e6 gfxstream: Add dispatcher validity checks
Add conditioning before making driver calls to be
able to workaround some of the fatal errors, such
as unboxing issues during or after snapshot load.
This enables invalidating a host dispatcher based
on the application state. A default error will be
returned for vulkan calls.

Builtin expectation function is used to reduce
performance cost of the checks.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Jeongik Cha
284a1d5cb6 gfxstream: Add AHARDWAREBUFFER_FORMAT_B8G8R8A8_UNORM in android_format_is_yuv
To avoid warning message, I added that.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Jason Macnak
11bec23bba gfxstream: Remove extra dispatch variable
... to addresss variable shadowing warnings and handle the 2 global
commands that do not require a dispatch.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Jason Macnak
e458641516 gfxstream: Update variable names to avoid -Wshadow error
... as vkCmdUpdateBuffer() uses these param names.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
425fe5edf8 gfxstream: wrap semaphore functions on the host
Codegen changes to be able to alter the behavior of vkSignalSemaphores
and vkWaitSemaphores calls on the host side.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Serdar Kocdemir
af8b08281b gfxstream: track pipeline layouts on decoder
Track pipeline layout creation and destroy calls
to cleanup them correctly on device teardown.

Pipeline layouts require delayed delete operations for
VulkanQueueSubmitWithCommands feature which modifies order
of commands and they need to stay valid during recording.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34418>
2025-04-09 18:29:57 +00:00
Caio Oliveira
b148f57dad spirv: Take a separate data_type when creating a new vtn_variable
This will be useful for untyped pointers.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34436>
2025-04-09 16:33:03 +00:00
Faith Ekstrand
18b2bef45a nak: Add a NAK_DEBUG=panic option
This tells it to actually panic instead of unwinding and returning NULL.
I find myself commenting out the unwind code pretty frequently so I can
get GDB to break at the panic.  This should help avoid that extra debug
step.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34435>
2025-04-09 16:14:00 +00:00
Tapani Pälli
0750c4c5f1 intel/dev: update mesa_defs.json from internal database
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34430>
2025-04-09 15:44:22 +00:00
Faith Ekstrand
4d1399629b nak: Allow predicates in nir_intrinsic_as_uniform
As of 76e542e92a ("nak: Add nak_nir_mark_lcssa_invariants"), we can
now get predicates as inputs to as_uniform.  We can't assume the result
will always be a UGPR.

Fixes: 76e542e92a ("nak: Add nak_nir_mark_lcssa_invariants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12970
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34434>
2025-04-09 15:26:35 +00:00
Natalie Vock
916d7277c0 radv/ci: Test FP16 for GFX8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Natalie Vock
f0f4ae1713 radv: Add radv_enable_float16_gfx8 drirc and enable for Indiana Jones TGC
This is a hard requirement from the game preventing it to start on GFX8.
Adding this allows playing it on GFX8.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Natalie Vock
e385cb1750 radv: Add radv_emulate_rt drirc and enable for Indiana Jones TGC
There have been various people successfully trying it out on GFX9-GFX10.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Natalie Vock
3d8db3cbbb aco: Make private_segment_buffer/scratch_offset per-resume
We need different Temps for each resume shader, because registers aren't
preserved across resume boundaries.

This was likely fine in practice because arg registers are the same for
each shader, but resulted in invalid IR and asserts.

Fixes crashes in Indiana Jones RT with assertions enabled on GFX8.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34114>
2025-04-09 14:21:37 +00:00
Lionel Landwerlin
76096d04bb anv: relax restriction on variable count descriptors
VUID-VkDescriptorSetAllocateInfo-pSetLayouts-09380 says that :

   "If pSetLayouts[i] was created with an element of pBindingFlags
   that includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT,
   and VkDescriptorSetVariableDescriptorCountAllocateInfo is included
   in the pNext chain, and
   VkDescriptorSetVariableDescriptorCountAllocateInfo::descriptorSetCount
   is not zero, then
   VkDescriptorSetVariableDescriptorCountAllocateInfo::pDescriptorCounts[i]
   must be less than or equal to
   VkDescriptorSetLayoutBinding::descriptorCount for the corresponding
   binding used to create pSetLayouts[i]"

But applications like are not following the spec. RADV doesn't apply
that limit and allocates if there is enough space in the pool. Let's
just do the same.

Note that this issue got resolved with a vkd3d-proton change :

a7ac1a7d2f

But since this change is deleting more code than it adds, might as
well go with it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12185
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32305>
2025-04-09 16:29:21 +03:00
K900
3d7bfcf984 meson: support building with system libgbm
This is the next step towards making libgbm just a loader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33890>
2025-04-09 12:15:33 +00:00
Natalie Vock
d1ff9e951a aco: Fix RT VGPR limit on Navi31/32, GFX11.5, GFX12
Since 128 is not a multiple of the VGPR allocation granule, we will
actually allocate 134 VGPRs. No reason not to use the extra 6.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34265>
2025-04-09 10:02:52 +00:00
Benjamin Lee
c0be0a845d panfrost/va: remove dead code for packing BRANCHZI.i16 lane mod
As of 839f15259a, we no longer use 'lane'
for BRANCHZI.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34416>
2025-04-09 07:39:23 +00:00
Alyssa Rosenzweig
3e82395306 bin: add rebase mode
when we need to apply trailers to a whole MR at once, it's convenient to
do something like `git rebase --exec "rb faith" origin/main`. This adds that
operation into the script itself, so that can be done with simply
`rb -r origin/main faith`.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34409>
2025-04-08 17:05:58 -04:00
Lionel Landwerlin
19e4dda9a2 brw: fix shuffle with scalar/uniform index
The fixes commit isn't actually the source of the bug but likely the
biggest enabler because it creates scalar values that more easily end
up in the shuffle operations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1b24612c57 ("brw/nir: Treat load_*_uniform_block_intel as convergent")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12927
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12688
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12570
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12905
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12734
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34393>
2025-04-08 20:14:11 +00:00
Felix DeGrood
610ad8d378 intel/tools: create intel_monitor for sampling eu stalls
Created stand alone tool for sampling gfx data on regular
intervals. Tool has inner loop that performs sampling every N
useconds. Press any key to end sampling. Results will be dumped
when intel_monitor exits.

First application of intel_monitor will be to collect eu stall
data. Perhaps more applications can be added at a later date.

How to use:
 0. Set sysctl dev.xe.observation_paranoid=0
 1. Clean shader cache and launch gfx INTEL_DEBUG=shaders-lineno.
    Redirect stderr to asm.txt.
 2. When gfx app ready to monitor, begin capturing eustall data by
    launching `intel_monitor -e > eustall.csv` in separate console.
 3  When done collected, close intel_monitor by pressing any key.
 4. Correlate eustall data in eustall.csv with shader instructions in
    asm.txt by matching instruction offsets. Use data to determine which
    instructions are stalling and why.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
2fcebf2f1e util: add hash functions for u64 data type
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
2a828c35a1 intel/perf: add eu stall sampling support
Xe2+ GPUs have support for eu stall sampling perf debug feature.
This feature allows driver to collect count and reasons for why
EUs are stalled on GPU. Stall data is cross referenced with ip
address within individual shaders so it is possible to know which
instructions in which shaders are generating stalls. This should
be a very useful feature for debugging performance of slow shaders.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
d6a379f7a7 intel/perf: remove unnused argument from xe_perf_stream_read_error
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
6e16e92532 drm-uapi: add eu_stall uapi
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
69b73e807f iris: add INTEL_DEBUG=shaders-lineno
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
a09ddc3b77 anv: add INTEL_DEBUG=shaders-lineno
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Felix DeGrood
7a3de9e877 intel/brw: support for dumping shader line numbers
Add support for dumping shader asm containing instruction line numbers
matching offsets within instruction state pool buffer. Offsets
should match values collected from eu stall sampling. This is
required for match eu stall data with individual shader instructions.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30142>
2025-04-08 19:39:53 +00:00
Alyssa Rosenzweig
1dc90e3f8b hk: advertise maintenance8
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
ab8adb8438 hk: advertise maintenance7
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
af6646c3ce hk: advertise VK_EXT_queue_family_foreign
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12904
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
0da52e1fd8 hk: support colour <--> z/s copies
dEQP-VK.api.ds_color_copy.* for maint8, but there's more to maint8

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
f0e6746ffa hk: fix last VGT output component limits
per discussion.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
56fc62c1ea hk: drop dead todo
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
4f1d08b234 agx: optimize nonuniform offset
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
924075cd56 asahi,hk: disentangle logicop_enable
logicop_func=COPY is different from logicop_enable due to overriding blending.
maintain the info we need to implement properly. fixes

dEQP-VK.pipeline.shader_object_unlinked_binary.logic_op_na_formats.r32g32b32a32_sfloat.copy_blend

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
045880c8a6 vk/meta: generalize 3D blit code
This handles the 3D->2D Array case that we hit with maintenance8. Fixes tests
like
dEQP-VK.api.copy_and_blit.dedicated_allocation.blit_image.simple_tests.3d_to_2d_array.max_slices_linear

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
c2a3c70086 nir/lower_tex: use vector_insert_imm
was in the area.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
c23201ad8a nir/lower_blend: disable logic ops for unsupported formats
Fixes new Vulkan CTS cases on Honeykrisp (and probably panvk and whatever)

dEQP-VK.pipeline.shader_object_unlinked_binary.logic_op_na_formats.*

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:47 +00:00
Alyssa Rosenzweig
54ccc8ed0b nir/lower_blend: refactor logicop variables
This pulls out the logicop_func variable from the options struct, so we can
modify it in the next commit in a central place. It then refactors out the
format variable from the options struct since we end up duplicating
options->format[rt] a zillion times and passing in both an options struct and a
logicop func override is confusing so this will just make everything neater and
self-contained next commit.

no functional change.

Cc'd to make the next commit cherrypickable.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34426>
2025-04-08 19:04:46 +00:00
Renato Pereyra
7190949927 perfetto/android: align datasource names with tooling expectations
A few Android tools are based on/assume the datasource names
gpu.renderstages and gpu.counters. It is less effort to align with that
naming for Android builds than to chase down those tools and fix them,
not to mention account for new tools that may be created in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34330>
2025-04-08 18:29:10 +00:00
Felix DeGrood
b895c0ec05 vk/overlay-layer: fix regression in non-control pathway
Fixes regression introduced by prior commit. Prior commit fixed
the control pathway to starting overlay-layer but broke non-
control pathway. Now both pathways should be working.

Fixes: 06423b1792 ("defer log creation to swapchain creation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12884
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34413>
2025-04-08 17:52:57 +00:00
Erik Faye-Lund
5c11b4a039 docs/features: update panvk support
We were missing panvk in two places here, and missing that one ext is
only supported on v10 and later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34310>
2025-04-08 16:44:27 +00:00
Corentin Noël
ab2c8e8fa6 ci: Uprev virglrenderer to latest version on time
This includes version 1.1.1

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34377>
2025-04-08 16:11:49 +00:00
Rob Clark
ea6e69e9d3 tu: vdrm vtest support
In a few places, we need to deal with not having direct access to the
rendernode device.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
bf0e3d6274 virtio/vdrm: Add vtest backend
This allows for testing drm native ctx support without spinning up a VM.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
d2ea532528 vulkan: Use syncobj shim
This will allow syncobj use in cases where the process does not have
direct rendernode access (ex, vtest).

An alternative would be an alternate vk_sync_type implementation, but
the WSI code was also directly using drm syncobjs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
3f5dc6329a panvk: Remove dependency on vk_device::drm_fd
Move to panvk_device so we can remove drm_fd from the base class.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:39 +00:00
Rob Clark
e76b1acbfe util: Add drmSyncobj shim
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
28ad8fd5b1 tu: Add some func traces
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
db88a490b8 tu: Avoid extraneous set_iova
The GEM_NEW ccmd already passes the iova, so we don't need an extra
SET_IOVA for newly created BOs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
081869e591 tu/vdrm: Fix userspace fence cmds
Somehow the update of the fence value to write was dropped, so the
cmdstream that wrote the fence value would simply write zero over and
over again.

Fixes: 84d6eedd5e ("tu: Refactor the submit path")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Rob Clark
471961d0ca ir3: Comment re-indent
To make this more readable.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33433>
2025-04-08 15:38:38 +00:00
Patrick Lerda
e4a60c216a r600: clean up not used fields detected by clang
../src/gallium/drivers/r600/sfn/sfn_shader_gs.h:54:9: warning: private field 'm_first_vertex_emitted' is not used [-Wunused-private-field]
   54 |    bool m_first_vertex_emitted{false};
      |         ^
...

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34153>
2025-04-08 13:23:47 +00:00
Patrick Lerda
bd88a92dde r600: enable ARB_compute_variable_group_size
This change was tested and passes the piglit tests (20/20)
on cypress, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34404>
2025-04-08 13:04:17 +00:00
Patrick Lerda
58ddf6aaf0 r600: fix points clipping
This is the backport of eca57f85ee ("radeonsi: fix
gl_ClipDistance and gl_ClipVertex for points").

This change was tested on rv770, palm, barts and cayman. It
fixes 450 khr-gl tests and 64 khr-gles tests on evergreen
and cayman gpus. Here is the list:
spec/glsl-1.20/execution/clipping/vs-clip-vertex-primitives: fail pass
spec/glsl-1.30/execution/clipping/vs-clip-distance-primitives: fail pass
spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-primitives-points: fail pass
khr-gl(3[0-3]|4[0-5])/clip_distance/functional: fail pass
khr-gl(33|4[0-5])/cull_distance/functional_test_item_[0-8]_primitive_mode_points_max_culldist_[0-7]: fail pass
khr-gles3/clip_distance/functional: fail pass
khr-gles3/cull_distance/functional_test_item_[0-8]_primitive_mode_points_max_culldist_[0-7]: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403>
2025-04-08 12:41:10 +00:00
Patrick Lerda
8fc01db1ac r600: fix pa_su_vtx_cntl rounding mode
This is the backport of 9c49550163. This rounding functionality
is available on all the gpus of the r600 family.

This change was tested on rv770, palm and cayman. This change fixes
at least the "turn-on-off" tests on all these gpus and it does not
add any regression. Here are the tests fixed on palm:
spec/ext_framebuffer_multisample/interpolation 6 centroid-edges: fail pass
spec/ext_framebuffer_multisample/interpolation 8 centroid-edges: fail pass
spec/ext_framebuffer_multisample/turn-on-off 2: fail pass
spec/ext_framebuffer_multisample/turn-on-off 4: fail pass
spec/ext_framebuffer_multisample/turn-on-off 6: fail pass
spec/ext_framebuffer_multisample/turn-on-off 8: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403>
2025-04-08 12:41:10 +00:00
Patrick Lerda
4d17f8d10a r600: fallback to util_blitter_draw_rectangle when required
This is the backport of dc293ffe50 ("radeonsi:
fallback to util_blitter_draw_rectangle").

This change was tested on rv770, palm and cayman. Here is
the test fixed:
spec/ext_framebuffer_blit/fbo-blit-check-limits: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34403>
2025-04-08 12:41:10 +00:00
Patrick Lerda
9b95e4181e r600: remove deprecated NIR_PASS_V
This change is done in two steps:
find src/gallium/drivers/r600 -type f -exec grep -l NIR_PASS_V {} + | xargs sed -r -i "s/NIR_PASS_V[(]/NIR_PASS(_, /"
git clang-format <previous_commit>

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33976>
2025-04-08 12:21:24 +00:00
Xaver Hugl
0c1f2b90c9 vulkan/wsi: warn once when HDR metadata is skipped because of protocol errors
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34000>
2025-04-08 10:30:42 +00:00
Xaver Hugl
cb7726bb2c vulkan/wsi: validate HDR metadata to not cause protocol errors
If it would trigger a protocol error, we must not use it.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34000>
2025-04-08 10:30:42 +00:00
Valentine Burley
0f8753ffb8 ci/container: Drop unnecessary variables for image paths
Some (and not all) MESA_IMAGE_PATH and MESA_BASE_IMAGE entries used
variables set in image-tags.yml, but these weren't too useful.
Drop them for simplicity.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
8339598f07 ci/android: Add build section for uninstalling build software
This was missing compared to the test-gl and test-vk containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
f9b6403d46 ci/container: Move calling strip-rootfs.sh to common scripts
No functional changes with the move, this is a cleanup for consistency.
Also, add the usual image tags to the header.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
427c7f382a ci/container: Remove double build sections in test-* containers
These sections were redundant since the respective scripts already set
them.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Valentine Burley
15d94c60cb ci/container: Disable debian/arm32_test-vk container
There are currently no arm32 VK jobs, so disable this build to save some
resources. It can be re-enabled if needed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34405>
2025-04-08 09:52:28 +00:00
Georg Lehmann
64cae5c48d aco: form mixed MTBUF/MUBUF clauses
This should be one clause (all of the instructions load from the same vertex buffer)

s_clause 0x2                                                ; bfa10002
tbuffer_load_format_xyzw v[8:11], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] idxen offset:36 ; e9c32024 80010805
tbuffer_load_format_xyzw v[12:15], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] idxen offset:16 ; e9c32010 80010c05
tbuffer_load_format_xyzw v[16:19], v5, s[4:7], 0 format:[BUF_FMT_8_8_8_8_UNORM] idxen offset:12 ; e9c3200c 80011005
s_clause 0x2                                                ; bfa10002
buffer_load_dwordx3 v[20:22], v5, s[4:7], 0 idxen           ; e03c2000 80011405
buffer_load_dwordx3 v[23:25], v5, s[4:7], 0 idxen offset:20 ; e03c2014 80011705
buffer_load_dwordx4 v[28:31], v5, s[4:7], 0 idxen offset:48 ; e0382030 80011c05
tbuffer_load_format_xy v[0:1], v5, s[4:7], 0 format:[BUF_FMT_8_8_UNORM] idxen offset:32 ; e8712020 80010005

Foz-DB Navi21:
Totals from 5624 (7.08% of 79395) affected shaders:
MaxWaves: 149894 -> 149898 (+0.00%)
Instrs: 3032697 -> 3034853 (+0.07%); split: -0.05%, +0.12%
CodeSize: 15907852 -> 15915752 (+0.05%); split: -0.05%, +0.10%
VGPRs: 216248 -> 216144 (-0.05%)
Latency: 10955137 -> 11008760 (+0.49%); split: -0.22%, +0.70%
InvThroughput: 2032857 -> 2033916 (+0.05%); split: -0.03%, +0.08%
VClause: 50120 -> 41778 (-16.64%); split: -16.66%, +0.02%
SClause: 62034 -> 62004 (-0.05%); split: -0.33%, +0.29%
Copies: 253836 -> 254505 (+0.26%); split: -0.17%, +0.43%
VALU: 1621606 -> 1622274 (+0.04%); split: -0.03%, +0.07%
SALU: 653251 -> 653252 (+0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34379>
2025-04-08 09:22:04 +00:00
Georg Lehmann
babe7f3e12 aco/gfx10: simpler solution to avoid store instructions in clauses
Foz-DB Navi21 has no changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34379>
2025-04-08 09:22:04 +00:00
Samuel Pitoiset
0ba3a8b3cc radv: add clip rects state bit for emitting discard rectangles
Better match the hw naming.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
08918f0880 radv: regroup emitting all MSAA states in one function
All register writes are optimized out. Also this will allow to use
paired context register writes on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
e8d787e1ef radv: track more MSAA related register writes
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
a327bc677a radv: configure COVERAGE_TO_SHADER_SELECT only if conservative rast is enabled
When conservative rasterization isn't enabled, FullyCoveredEXT is
expected to return 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
6e9782b39c radv: emit conservative raster mode as part of the MSAA state
From the hw perspective, it's more like a MSAA state.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Samuel Pitoiset
ed744b5c68 radv: move emitting raster and depth/stencil state slightly earlier
To avoid a redundant chekc if no dynamic states are dirtied.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34361>
2025-04-08 08:42:17 +00:00
Lars-Ivar Hesselberg Simonsen
37595775a0 panvk: Add barrier for interleaved ZS copy cmds
When executing CopyBufferToImage or CopyImage with multiple regions of
both depth and stencil aspects targeting an interleaved depth stencil
image, we must split the regions into one copy-command for each aspect
and add a barrier between them to avoid a write-after-write race.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 5067921349 ("panvk: Switch to vk_meta")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34384>
2025-04-08 08:08:35 +00:00
Samuel Pitoiset
ef9e7cb3f5 radv: add before/after draw functions for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:15:05 +02:00
Samuel Pitoiset
d2da54e6f3 radv: apply the workaround for buggy HiZ/HiS on GFX12 for DGC
Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:15:04 +02:00
Samuel Pitoiset
6388db03c8 radv: add a workaround for buggy HiZ/HiS on GFX12
HiZ/HiS is buggy and can cause random GPU hangs when stencil is enabled.
There are basically two alternatives but RADV follows RadeonSI and emit
a dummy RELEASE_MEM packet after every draw which should workaround the
issue and maintain performance.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12944
Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:09:13 +02:00
Samuel Pitoiset
11b6d2ba60 radv: determine if HiZ/HiS is enabled earlier on GFX12
To lower CPU overhead of the hardware workaround.

Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34381>
2025-04-08 08:03:11 +02:00
Faith Ekstrand
2ff22de626 nak: Use suld.b on Kepler if we have a format
This works on all GPU generations but we don't actually need it since we
have formatted image loads on everything Maxwell+.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Faith Ekstrand
6aa2c152b8 nak,nir: Add an image_load_raw_nv intrinsic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Faith Ekstrand
e7843720c2 nak: Add support for suld/st.b
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Faith Ekstrand
3d9185f17e nak: Add a ChannelMask type
We use this for tex and image ops instead of a u8.  This lets us assert
some variants up-front as well as pretty print them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34336>
2025-04-08 04:06:45 +00:00
Lars-Ivar Hesselberg Simonsen
c2570055d5 vulkan/wsi/wayland: Avoid duplicate colorspace entry
The colorspace SRGB_NONLINEAR could be added twice when querying
available formats, leading to duplicate entries and VulkanCTS WSI test
failures.

Fixes: 789507c99c ("vulkan/wsi: implement the Wayland color management protocol")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34410>
2025-04-07 23:55:25 +00:00
Faith Ekstrand
436f175187 intel/compiler: Use nir_split_conversions()
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34266>
2025-04-07 17:45:21 -05:00
Caio Oliveira
bf9ad36f2d brw: Properly handle cooperative matrices created with constants
Expand constant sources to cover the region read by DPAS, and also
use NULL register as accumulator when possible.

Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34373>
2025-04-07 14:27:43 -07:00
Mel Henning
16e3e0d93b nvk: Support blackwell in max_warps_per_mp_for_sm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34161>
2025-04-07 20:28:48 +00:00
Mel Henning
f2aac0f96a nvk: SET_PS_{REGISTER,WARP}_WATERMARKS
Brings Baldur's Gate 3 from 32 to 35 fps on the character creator. (+9%)
Brings Horizon Zero Dawn from 7098 to 7872 points in its bencmark. (+11%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34161>
2025-04-07 20:28:48 +00:00
Marek Olšák
39d2a1e773 radeonsi: add a VOP3P swizzle requirement for 16-bit packed math
Otherwise ACO fails an assertion.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:23 +00:00
Marek Olšák
15b0198d7f radeonsi: lower load/store bit sizes before load/store vectorization
to match RADV and also to reduce code size by -2.33% in 178 affected shaders.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:23 +00:00
Marek Olšák
5e5b04cb27 radeonsi/ci: don't run GTF tests (they have been removed from glcts)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
5039feb192 radeonsi/ci: update gfx11 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
a4b71e5b2d radeonsi: expose 16-bit NIR types for ALU, MEM, and LDS (no inputs/outputs)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
58f3d6fa20 radeonsi: always use ACO callbacks to scalarize/vectorize 16-bit ALU
This fixes 16-bit ALU with LLVM.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
a82705911e radeonsi: work around a primitive restart bug on gfx10-10.3
Using the GE instead of the VGT register has no effect because it's
the same value. SQ_NON_EVENT is the fix.

Discovered by Samuel Pitoiset.

Cc: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
e4a30b7241 ac/surface: remove 64K_2D modifier with 64B max compressed blocks for gfx12
It has no use and is slower.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
27d5be13c6 ac/nir/cull: always do frustum culling, skip only small prim culling
Only small prim culling uses the viewport state, so only that must be
disabled when there are multiple viewports.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
0f97dc707d ac/nir/cull: rename skip_viewport_culling -> skip_viewport_state_culling
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
bc27ad8064 ac: define physical VGPRs for fake hw overrides
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Alyssa Rosenzweig
e5097a7c9d glsl_to_nir: upcast array indices
array indices need to match the pointer size, otherwise we fail NIR assertions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6075
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Marek Olšák
1d5c42528b nir/opt_algebraic: lower 16-bit imul_high & umul_high
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34016>
2025-04-07 19:44:22 +00:00
Mike Blumenkrantz
b14c8128bf tu: check for valid descriptor set when binding descriptors
these pointers can be null, and they are checked as null in
pipeline layout creation, but here if the pointer is null it will crash

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34412>
2025-04-07 18:49:10 +00:00
Sergi Blanch Torne
3ef0eac21c Uprev Piglit to ebdf60e0d4b0dc23e79373cb923fdee023eb3b2b
68658566da...ebdf60e0d4

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34378>
2025-04-07 18:16:00 +00:00
Collabora's Gfx CI Team
fcf19bf335 Uprev ANGLE to 3818d37d5e94317f01810053b8f28c1f1e8b98e6
1b34d2a18a...3818d37d5e

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34378>
2025-04-07 18:16:00 +00:00
Ian Romanick
f33faa4648 brw/nir: Allow b2f(not(X)) optimization on Gfx12.5+
Since there are no type conversions, no restrictions are violated.

No shader-db or fossil-db changes on any Gfx12 or older Intel
platforms.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 16956077 -> 16944933 (-0.07%)
instructions in affected programs: 1957573 -> 1946429 (-0.57%)
helped: 4629 / HURT: 35

total cycles in shared programs: 915668518 -> 915684808 (<.01%)
cycles in affected programs: 341925598 -> 341941888 (<.01%)
helped: 3040 / HURT: 1305
helped stats (abs) min: 2 max: 23034 x̄: 205.36 x̃: 16
helped stats (rel) min: <.01% max: 41.21% x̄: 1.28% x̃: 0.48%
HURT stats (abs)   min: 2 max: 68820 x̄: 490.88 x̃: 22
HURT stats (rel)   min: <.01% max: 103.69% x̄: 2.29% x̃: 0.37%
95% mean confidence interval for cycles value: -50.28 57.78
95% mean confidence interval for cycles %-change: -0.35% -0.07%
Inconclusive result (value mean confidence interval includes 0).

LOST:   40
GAINED: 42

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 209828027 -> 209790349 (-0.02%); split: -0.03%, +0.01%
Cycle count: 30504938008 -> 30514045408 (+0.03%); split: -0.06%, +0.09%
Spill count: 512182 -> 512168 (-0.00%)
Fill count: 623432 -> 623426 (-0.00%); split: -0.00%, +0.00%
Max live registers: 65465029 -> 65464959 (-0.00%)

Totals from 57895 (8.19% of 706589) affected shaders:
Instrs: 50144907 -> 50107229 (-0.08%); split: -0.11%, +0.03%
Cycle count: 7549692606 -> 7558800006 (+0.12%); split: -0.25%, +0.37%
Spill count: 58834 -> 58820 (-0.02%)
Fill count: 102324 -> 102318 (-0.01%); split: -0.01%, +0.01%
Max live registers: 9129045 -> 9128975 (-0.00%)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
853ead2073 brw/nir: Optimize b2f(not(X)) using logical operations instead of arithmetic
Funny story... this is how regular b2f was implemented before Curro
implmented the `MOV dst:F -src:D` method 9 years ago (see
3ee2daf23d).

Eliminating the type conversion in the arithmetic operation enables the
next commit.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
3d23496fd9 brw/copy: Copy prop -X into Y&1
This commit prevents code quality regressions in the next
commit. Without this, some fragment shaders in Batman: Arkham Origins
have code like:

    shr(8)          g51<1>UW        g1.28<1,8,0>UB  0x76543210V
    ...
    and(8)          g52<1>UD        ~g51<8,8,1>UW   0x0001UW
    ...
    add(8)          g56<1>D         -g52<8,8,1>D    1D

transformed to

    shr(8)          g51<1>UW        g1.28<1,8,0>UB  0x76543210V
    ...
    and(8)          g52<1>UD        ~g51<8,8,1>UW   0x0001UW
    ...
    mov(8)          g56<1>D         -g52<8,8,1>D
    ...
    and(8)          g57<1>UD        ~g56<8,8,1>D    0x00000001UD

Propagating through the negation allows the added MOV to be deleted.

shader-db:

All Intel platforms had simlar results. (Lunar Lake shown)
total instructions in shared programs: 16968020 -> 16968019 (<.01%)
instructions in affected programs: 281 -> 280 (-0.36%)
helped: 1 / HURT: 0

total cycles in shared programs: 914598850 -> 914598832 (<.01%)
cycles in affected programs: 5398 -> 5380 (-0.33%)
helped: 1 / HURT: 0

A single Blender vertex shader was affected.

fossil-db:

Lunar Lake, Tiger Lake, Ice Lake, and Skylake had similar results. (Lunar Lake shown)
Totals:
Instrs: 209894650 -> 209894651 (+0.00%)
Cycle count: 30545958586 -> 30545952860 (-0.00%)

Totals from 2 (0.00% of 706657) affected shaders:
Instrs: 3582 -> 3583 (+0.03%)
Cycle count: 1875100 -> 1869374 (-0.31%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Subgroup size: 9906400 -> 9906416 (+0.00%)

Totals from 2 (0.00% of 805770) affected shaders:
Subgroup size: 16 -> 32 (+100.00%)

Two compute shaders in Hogwarts Legacy were affected.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
e82464e6e0 brw/copy: Refactor source modifier type checking
This simplifies the next commit.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33931>
2025-04-07 17:42:05 +00:00
Ian Romanick
dee49f4206 brw/algebraic: Optimize derivative of convergent value
This is mostly defensive. If a convergent value ever ended up as a
source of a DDX or DDY, the eu_emit code will ignore the stride. This
will result in bad code being generated.

No shader-db or fossil-db changes on any Intel platform.

v2: DDX and DDY will always be float, but brw_imm_for_type only works
with integer types.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Suggested-by: Ken
Fixes: d5d7ae22ae ("brw/nir: Fix up handling of sources that might be convergent vectors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
2025-04-07 17:16:34 +00:00
Ian Romanick
5656682344 brw/nir: Eliminate default parameter to get_nir_src
The vast majority of the callers want channel = 0. During the
development process, using this default parameter value saved a lot of
pain in rebasing. However, it seems to be more trouble than it's worth.

Issue #12464 occurred because LNL was merged while this code was in
review. As a result, one caller of get_nir_src that wanted channel = -1
was not inspected closely, and it got the default channel = 0 instead.

To prevent this happening in the future (with possible branches still
yet to be merged, for example), remove the default parameter. This will
force the inspection of any callers that don't have an explicit channel
parameter. Hopefully that will prevent more problems.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
2025-04-07 17:16:34 +00:00
Ian Romanick
38b58e286f brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset
The source of nir_intrinsic_load_barycentric_at_offset is a vector, so
-1 should be passed to get_nir_src. This is also done for texture
sampling intrinsics.

I skimmed the other user of get_nir_src, and I believe they are
correct. This one was just missed as LNL support landed an many, many
rebases of the original MR occurred.

v2: Fix another get_nir_src call. Suggested by Lionel.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: d5d7ae22ae ("brw/nir: Fix up handling of sources that might be convergent vectors")
Closes: #12464
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
2025-04-07 17:16:34 +00:00
Eric R. Smith
739da17f6e panfrost,lima: use index size in panfrost minmax_cache
Bifrost keeps a cache of information about buffers being
used as indices. Unfortunately, it was not keeping information
about the size of the indices (probably because this rarely
changes). If a program deliberately re-interprets the indices
as a different type (e.g. UNSIGNED_INT instead of UNSIGNED_SHORT)
then we will use incorrect values from the cache. This actually
showed up in a test program we were running.

Fix by saving the index size in the cache key.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34011>
2025-04-07 16:53:22 +00:00
Patrick Lerda
6fab29d37e r600: implement EXT_window_rectangles
This is a backport of 0ca8294ece ("radeonsi:
implement EXT_window_rectangles")

This change was tested and passes the piglit tests (20/20)
on rv770, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34295>
2025-04-07 16:31:21 +00:00
Ashley Smith
c1ce2dcc66 pan/bi: Enable ARB_shader_clock extension support
Introduces GCLK instruction to read the system timer/counter. Currently
only counter is supported.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34342>
2025-04-07 15:58:45 +00:00
Patrick Lerda
f0c0997277 r600: fix textures with swizzles limited to zero and one
This issue seems to be specific to textureGather() which could
fail when processing some surfaces. These surfaces are configured
with non-standard one and zero swizzles. The gpu doesn't support
this very specific setup with all the possible hardware formats.
This change selects a compatible configuration when this is
possible.

This change was tested on palm, barts and cayman. This change
fixes the 216 remaining arb_texture_gather tests:
spec/arb_texture_gather/texturegather/.*-zero-.*: fail pass
spec/arb_texture_gather/texturegather/.*-one-.*: fail pass
spec/arb_texture_gather/texturegatheroffset/.*-zero-.*: fail pass
spec/arb_texture_gather/texturegatheroffset/.*-one-.*: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34293>
2025-04-07 15:38:44 +00:00
Samuel Pitoiset
e3c3fa8b9a radv: add a fuction to emit the VRS surface on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
00354f0a74 radv: do not emit the VRS surface VA when it's not enabled
This shouldn't be necessary because VRS_SURFACE_ENABLE is the toggle
bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
9b11caee40 radv: stop emitting CB_FDCC_CONTROL to zero on GFX11-GFX11.5
It's already emitted by the CLEAR_STATE packet on these GPUs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
17e5fd856f radv: split null framebuffer state emission for GFX12
For consistency with color/ds states emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
c608a601bf radv: split framebuffer depth/stencil state emission for GFX12
It's also really simpler on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
d5eb1f6833 radv: split framebuffer color state emission for GFX12
It's really simpler on GFX12.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
9dec80d8cf radv: tidy up radv_emit_db_shader_control()
To separate packet construction and emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
4bc6335e3c radv: restore DB_DFSM_CONTROL properly when POPS isn't used
It looks safer to restore this register to its initial value when POPS
isn't used. Only VEGA10 and RAVEN are concerned.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
cb390ca234 radv: tidy up radv_emit_raster_state()
To separate packet construction and emission.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Samuel Pitoiset
62e4b1130a radv: remove useless FDCC_ENABLE bitfield clear on GFX12
This bit doesn't exist.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34357>
2025-04-07 15:09:18 +00:00
Sergi Blanch Torne
ba935c6ce6 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit d22fe48a58.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34402>
2025-04-07 14:17:11 +02:00
Patrick Lerda
8c8b178899 r600: fix clear_depth_stencil refcnt imbalance
After ca09c173f6, util_blitter_clear_render_target() requires
a call to util_blitter_save_fragment_constant_buffer_slot().
The r600 implementation was using the same sequence with
util_blitter_clear_depth_stencil() which does not need this
call. This was the cause of the refcnt imbalance.

For instance, this issue is triggered with:
"piglit/bin/ext_clear_texture-stencil -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: ca09c173f6 ("gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34292>
2025-04-07 11:30:05 +00:00
Patrick Lerda
4c2b2c82b0 r600: move stores to the end of shader when required
This change is inspired from 1e0e521a7d ("broadcom/compiler:
move stores to the end of shader") and makes the khr cull_distance
tests which were broken after dae57e184a functionals again.

Fixes: dae57e184a ("glsl,st/mesa: always lower IO for GLSL, unlower IO for drivers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34154>
2025-04-07 11:08:09 +00:00
Juan A. Suarez Romero
8742927d8f v3dv: don't check if DRM device is master
This was added to ensure we can get its resources, but they can be
obtained also from non master.

Fixes: 2af12c5b36 ("v3dv: Check multiple DRM primary nodes before picking the display fd")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12641
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34366>
2025-04-07 10:10:57 +00:00
Georg Lehmann
0cad7b0968 spirv: fix cooperative matrix by value function params
The vtn_ssa_value for a cmat is not backed by a nir_def, but by a nir_variable, so
can't be used directly when calling a function.  In most cases the cmat is used by
reference so code will take the value of deref for it (which is a `nir_def`).

When passing a cooperative matrix to a function by value, let the caller pass the deref
value, and the callee copy to a new local variable from that deref.

Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34364>
2025-04-07 07:53:44 +00:00
Antonio Ospite
864ae91392 meson: pass --no-pager to meson configure command
The `meson configure` command is used in `.gitlab-ci/meson/build.sh` to
show a summary of the build configuration, however when the script is
re-used locally on systems when there is a pager the commands blocks
for user input, which can be annoying.

Pass the `--no-pager` option to `meson configure`, so that it never
blocks for user input.

This does not change the behavior in the CI, it just makes the script run
uninterrupted also on local invocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34289>
2025-04-07 09:22:06 +02:00
Samuel Pitoiset
8b3056343f ac/gpu_info: bump required DRM minor version to 3.42.0 (kernel 5.15+)
Linux 5.15+ (LTS) has been released in October 31 and it's supported
until December 2026. Linux 4.x are very old at this point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34375>
2025-04-07 06:44:23 +00:00
Samuel Pitoiset
042770ceea ac,radv: remove has_scheduled_fence_dependency
This isn't used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34375>
2025-04-07 06:44:22 +00:00
Sergi Blanch Torne
d22fe48a58 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-04-07 07:00 UTC
* End: 2025-04-07 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34149>
2025-04-07 06:01:28 +00:00
Caio Oliveira
6a55581d41 intel/executor: Fix check for open() failure
Fixes: 71ae31dbd8 ("intel/executor: Allow selecting a device to use")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34400>
2025-04-06 19:43:51 -07:00
Marek Olšák
78c73a4aeb st/mesa: don't do nir_remove_dead_variables on in/out twice
It's already done before this.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:53 -04:00
Marek Olšák
3b0a616024 glsl: move code after link_varyings into link_varyings
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
b3f01773ac glsl: always return true at the end of link_varyings
Require that the function returns false before we get to the end if there
is any linker error.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
4fe3ea1427 glsl: remove a deprecated comment about nir_compact_varyings
We don't use nir_compact_varyings anymore.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
74dd799cc2 glsl: stop calling nir_opt_combine_stores (redundant with nir_opt_vectorize_io)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
9ce89f69b0 glsl: return failure from remove_unused_io_vars
to stop linking if we fail here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
063df44e0d glsl: return failure from varying_matches_assign_locations
to stop linking if we fail here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Marek Olšák
b2d215ac84 glsl: return failure from gl_nir_validate_first_and_last_interface_explicit_locations
to stop linking if we fail here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34307>
2025-04-06 16:15:52 -04:00
Timothy Arceri
d8782db3a4 glsl: fix regression in ubo cloning
Fixes KHR-GL46.layout_binding.block_layout_binding_block_VertexShader
with radeonsi.

Fixes: 2b2132d2ac ("nir: fix uniform cloning helper")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34337>
2025-04-06 19:43:47 +10:00
Caio Oliveira
9845693912 brw: Fix memory leak in EU validation tests
Fixes: 62323a934b ("brw: Add BRW_TYPE_BF validation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34395>
2025-04-06 06:26:03 +00:00
Caio Oliveira
c33ee4adae brw: Fix invalid memory access in scoreboard test
Fixes: 03aca2d248 ("brw: Use new bld/exp style in scoreboard tests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34394>
2025-04-05 22:58:23 -07:00
Valentine Burley
9f9233c033 ci/android: Add section for downloading Android CTS
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34320>
2025-04-05 09:28:21 +00:00
Valentine Burley
9d11a8304e ci/android: Remove platform-tools from test-android container
Cuttlefish comes with the required tools (under /cuttlefish/bin),
downloading platform-tools isn't necessary.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34320>
2025-04-05 09:28:21 +00:00
Guilherme Gallo
70f10dc327 ci/lava: Fetch kernel modules from overlay
LAVA supports overlays in the deploy action, so there is no need to
download them in lava_build.sh and bloat the rootfs file with it.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34352>
2025-04-05 08:42:20 +00:00
Benjamin Lee
2a7c38b48e panfrost: fix libpan_v4 header include
In addition to including the wrong version potentially causing runtime
issues, it can cause intermittent build failures because v4 libpanfrost
does not have a dependency on the libpan_v5.h in meson.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 20970bcd96 ("panfrost: Add base of OpenCL C infrastructure")
Reviewed-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34391>
2025-04-05 08:23:08 +00:00
Benjamin Lee
3b66e4a438 panfrost/pps: fix omitting several counters
The cid loop in the previous implementation stopped at n_counters for a
given category, even though cid is a global id that does not start
counting from zero at the beginning of each category. As a result, we
missed most of the counters outside of the first category.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 513d1baaea ("pps: Panfrost pps driver")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34202>
2025-04-05 08:06:00 +00:00
Valentine Burley
b411310b12 radv/ci: Update ANGLE version used for traces
The updated ANGLE version fixed the fog rendering in the minetest trace.

The PIGLIT_REPLAY_ANGLE_ARCH was also changed in the new artifact to
match ANGLE's own naming.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7916

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34308>
2025-04-05 09:13:54 +02:00
Valentine Burley
1668feefb4 ci: Make it possible to use ANGLE traces on other architectures
Don't hardcode amd64 architecture, use PIGLIT_REPLAY_ANGLE_ARCH to make
it easier to opt in for ANGLE traces on arm64 in the future.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34308>
2025-04-05 09:13:53 +02:00
Eric Engestrom
3041440bcb zink+tu/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
d49b38059f zink+radv/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
e3a5a181a1 zink+nvk/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
ecaa3392d3 lvp/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
d1922ef7ea nvk/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
90844640a1 freedreno/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
e65d0d2250 radv/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Eric Engestrom
6a86683ef8 radeonsi/ci: update expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34386>
2025-04-04 23:49:23 +00:00
Caio Oliveira
7ae638c0fe brw: Add brw_builder::uniform()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34355>
2025-04-04 23:07:21 +00:00
Caio Oliveira
f33d93da11 brw: Remove HSW specific code from brw_compile_cs.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34355>
2025-04-04 23:07:21 +00:00
Connor Abbott
536b2b13c8 tu: Implement VK_EXT_fragment_density_map_offset
Implement support for dynamic rendering, including suspending and
resuming render passes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34159>
2025-04-04 22:35:20 +00:00
Connor Abbott
f5ac3c452d vk/runtime: Add common CmdEndRendering
Similar to the common CmdEndRenderPass, add a default implementation for
drivers that implement VK_EXT_fragment_density_map_offset.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34159>
2025-04-04 22:35:19 +00:00
Connor Abbott
4947436da7 vk/runtime: Use vk_command_buffer in renderpass wrappers
The comment is out of date, and all drivers using the runtime use
vk_command_buffer. Let's use it directly.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34159>
2025-04-04 22:35:19 +00:00
Sushma Venkatesh Reddy
8f90b10b63 intel/tools: Improve memory allocation failure handling in aubinator_error_decode_xe
Ensure proper cleanup when memory allocation fails during HWCTX and VMA
parsing in `read_xe_data_file`. This ensures graceful error handling by
preventing potential memory leaks.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34371>
2025-04-04 22:09:27 +00:00
LingMan
9ddc160012 meson: Sync subproject version numbers in packagefiles with their .wrap equivalents
These tell meson which version the `.wrap` file downloads and should therefore always stay in sync.
No dependency is actually being updated here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34368>
2025-04-04 21:22:27 +00:00
LingMan
83bf45b0ce meson: Update pest subproject family
Starting with Rust 1.83 this benign warning is show when compiling the pest dependency:

```
warning: elided lifetime has a name
   --> pest/src/iterators/pairs.rs:330:70
    |
89  | impl<'i, R: RuleType> Pairs<'i, R> {
    |      -- lifetime `'i` declared here
...
330 |     ) -> Filter<FlatPairs<'i, R>, impl FnMut(&Pair<'i, R>) -> bool + '_> {
    |                                                                      ^^ this elided lifetime gets resolved as `'i`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default
```

Meson, at least as of version 1.7.0, unfortunately does not suppress warnings originating in dependencies.
Upstream has resolved the warning in 2.8.0, so update to that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34368>
2025-04-04 21:22:27 +00:00
Caio Oliveira
03aca2d248 brw: Use new bld/exp style in scoreboard tests
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
7ee673c195 brw: Add parser of SWSB annotations to use in tests
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
81dd3e1527 brw: Return actual progress in brw_lower_scoreboard
This will be useful later for tests to be used in conjunction with the
EXPECT_PROGRESS / EXPECT_NO_PROGRESS helpers.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
3e727000dd brw: Stop setting SFID in scoreboard tests
They won't affect the scoreboard, and will get in the
way of a later change.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:53 +00:00
Caio Oliveira
bcea076aca brw: Use SIMD16 shaders in scoreboard tests for Xe2+
Some tests changed to avoid unintended overlap between operands which
would change the SWSB assigned.  In some cases also changed the Gfx12
matching test so they remain equal.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:52 +00:00
Caio Oliveira
cd486cda48 brw: Use control flow helpers in scoreboard tests
Also update WHILE to optionally take a predicate (default to NONE).  And
make the predicate in the IF optional (default to NORMAL).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
2025-04-04 20:14:52 +00:00
Eric Engestrom
7c5389695b ci/fluster: don't overwrite FLUSTER_VECTORS_HOST_PATH to a different meaning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34362>
2025-04-04 19:36:09 +00:00
Eric Engestrom
8ec11893d9 ci/fluster: use http proxy when checking for the vector files
It's done properly when downloading it, but not when checking for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34362>
2025-04-04 19:36:09 +00:00
Konstantin
e7a44de184 nir/tests: Do not rely on __LINE__
__LINE__ can be inconsistent when using different compilers. This patch
changes the test runner to do a simple string find/replace of the test
source file instead of looking for the line where the reference string
starts.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33980>
2025-04-04 19:01:01 +00:00
Danylo Piliaiev
c496774c35 freedreno/a6xx: Implement ARB_shader_clock
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:49 +00:00
Danylo Piliaiev
0e9854a894 tu: Implement VK_KHR_shader_clock
There is a special address defined in kernel from which ALWAYSON
counter could be read.

Blob uses this sequence to read it:
  getone #l15
  mov.s32s32 r2.y, -4096
  mov.s32s32 r2.z, 131071
  (rpt5)nop
  ldg.u32 r2.w, g[r2.y], 1
  ldg.u32 r2.y, g[r2.y+4], 1
  (sy)(ss)mov.s32s32 r48.x, (last)r2.w
  mov.s32s32 r48.y, (last)r2.y
  l15:

Passes:
 dEQP-VK.glsl.shader_clock.*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:49 +00:00
Danylo Piliaiev
4b1b4ee10c freedreno,tu: Read and pass to compiler uche_trap_base
KGSL always exposed uche_trap_base, and MSM only recently
got support for it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:49 +00:00
Danylo Piliaiev
6a448ca08b freedreno: Bump kernel uapi (linux 6.14)
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
2025-04-04 18:22:48 +00:00
Benjamin Otte
0941af995a lavapipe: Don't advertise support for multiplane drm formats
Fixes: bd4f69a0fe
Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34190>
2025-04-04 17:59:43 +00:00
Robert Mader
8b76f521a0 meson: Bump minimum version to 1.3.0
Builds currently fail on older versions since the commit
below.

Fixes: f35172b6a4 (meson: make CL args common)
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34313>
2025-04-04 17:15:34 +00:00
Mark Collins
e4359cc49c tu/kgsl: Fix KGSL syncobj lifetime in no CB submit
The temporary syncobj created in the fast path of kgsl_queue_submit was
not being destroyed, and potentially being assigned to multiple syncobjs
without being properly duplicated. This could lead to a use-after-free
or double-free since multiple syncobjs could be assigned the same FD.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34328>
2025-04-04 16:54:17 +00:00
Mark Collins
cf4bd2e412 tu/kgsl: Revert "Remove zero CB queue submission fast path"
This reverts commit 0342d34bdb which
introduced a regression in the Turnip's KGSL backend, causing various
sync issues since KGSL doesn't advance the GPU timeline when a submit
without cmdbufs is made. A comment explaining the issue was added to the
code, and the fast path is reintroduced.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34328>
2025-04-04 16:54:17 +00:00
Georg Lehmann
c70dcd1451 aco/gfx9+: use d16 global/scratch/buffer loads
Full register loads are not nessecary and prevent packing optimizations.
Global/Scratch is GFX9+ so D16 loads are always supported.
We already used LDS D16 loads.

Foz-DB Navi31(mostly RA noise):
Totals from 716 (0.90% of 79789) affected shaders:
Instrs: 3854176 -> 3854238 (+0.00%); split: -0.00%, +0.00%
CodeSize: 20034440 -> 20035220 (+0.00%); split: -0.00%, +0.00%
Latency: 24410951 -> 24411120 (+0.00%)
InvThroughput: 5181276 -> 5181301 (+0.00%)
Copies: 320258 -> 320317 (+0.02%)
VALU: 2207307 -> 2207366 (+0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34346>
2025-04-04 16:20:39 +00:00
Juan A. Suarez Romero
f5e36e382f broadcom/compiler: initialize register
This fixes issue detected by static analyzer: passed-by-value struct
argument contains uninitialized data (e.g., field: 'file').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
0e50b09d4a broadcom/compiler: don't use VLA on emit alu
Using constant-size array instead of variable-length array is preferred
due several issues with the latter.

Particularly, for this case using VLA generates several warnings by
static analyzer: passed-by-value struct argument contains uninitialized
data (e.g., field: 'file').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
01151f045f broadcom/compiler: use safe iterator to remove instructions
The current approach has an issue detected by static analyzer: use of
memory after it is freed.

Using a proper iterator makes things safer.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
0b0d6a36f2 vc4: use safe iterator to remove instructions
The current approach has an issue detected by static analyzer: use of
memory after it is freed.

Using a proper iterator makes things safer.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
baa4fefe74 broadcom/cle: assert attribute has a value
This assertions helps to fix several warnings detected by static
analyzer regarding passing null pointers to functions that expects
non-null pointer.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
47f280778e vc4: assert there are sources when emitting texture
This assertion fixes an issue detected by static analyzer:
passed-by-value struct argument contains uninitialized data (e.g.,
field: 'file').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
8f5423820a vc4: add assertion on constant_fold
This fixes an issue detected by static analyzer: the right operand of
'>>' is a garbage value due to array index out of bounds.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:13 +00:00
Juan A. Suarez Romero
54db7c46fa vc4: initialize register
While this is likely not necessary, it fixes an issue detected by static
analyzer: the left operand of '<=' is a garbage value.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
6d6a3ab679 v3dv: asserts push constants data is valid
When pushing constants.

This fixes an issue detected by static analyzer: null pointer passed to
1st parameter expecting 'nonnull'.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
665df034e7 v3dv: check dynamic offset output
The output variable must be non NULL when descriptor type is dynamic.

This fixes an issue detected by static analyzer: dereference of null
pointer (loaded from variable 'dynamic_offset').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
ede3feb16d v3dv: asserts struct is always non null
This fixes an issue detected by static analyzer: access to field 'pNext'
results in a dereference of a null pointer (loaded from variable
'rs_info').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Juan A. Suarez Romero
2c8411e9d2 vc4: check instruction before setting flags
This fixes an issue detected by static analyzer: access to field 'sf'
results in a dereference of a null pointer (loaded from variable
'last_inst').

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
2025-04-04 15:55:12 +00:00
Lionel Landwerlin
72bc74f0be anv: add shader-hash debug option
Emits a dummy MI_STORE_DATA_IMM with the shader hash in front of :
   - 3DSTATE_VS
   - 3DSTATE_HS
   - 3DSTATE_DS
   - 3DSTATE_HS
   - 3DSTATE_PS
   - COMPUTE_WALKER / GPGPU_WALKER

Example :

0x00000000:  0x10000002:  MI_STORE_DATA_IMM
0x00000000:  0x10000002 : Dword 0
    DWord Length: 2
    Force Write Completion Check : false
    Store Qword: 0
    Use Global GTT: false
0x00000004:  0xffffe0c0 : Dword 1
    Core Mode Enable: 0
0x00000008:  0x0000effe : Dword 2
    Address: 0xeffeffffe0c0
0x0000000c:  0x126e815a : Dword 3  <------------ shader hash
0x00000010:  0x78100007 : Dword 4
    Immediate Data: 309231962
0x00000000:  0x78100007:  3DSTATE_VS
0x00000000:  0x78100007 : Dword 0
    DWord Length: 7
0x00000004:  0x00000000 : Dword 1
0x00000008:  0x00000000 : Dword 2
    Kernel Start Pointer: 0x00000000
0x0000000c:  0x00040000 : Dword 3
    Software Exception Enable: false
    Accesses UAV: false

It'll correlate with the value emitted in the pipeline stats from fossil replay :

  $ grep -i 126e815a /tmp/stats.csv
  fossilize.aab93c5c3f965151.1.foz,GRAPHICS,de1b925dec8a8083,507378,498283,303434,vertex,8,50,4,0,1826,0,0,0,8,17,0,0x00000000126e815a,15

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
789f13359a anv: consolidate environment variables
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
713cb0fdc1 anv/hasvk: sort out debug options
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
8a51e097af docs: remove unused env variable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Lionel Landwerlin
43e0f02391 anv/hasvk: consider timeline semaphore support stable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34332>
2025-04-04 15:18:28 +00:00
Vlad Zahorodnii
c57da522fa vulkan/wsi/wayland: Document why wl_surface_damage() code path ignores provided damage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34227>
2025-04-04 14:38:44 +00:00
Vlad Zahorodnii
0c943bbb64 vulkan/wsi/wayland: Damage whole surface using wl_surface_damage_buffer()
Most compositors work with damage in the buffer local coordinate space.
This change spares the compositors some work converting the provided
INT32_MAX x INT32_MAX damage region to the buffer local coordinate
space. It has no significant performance impact, but it'd still be nice
to use wl_surface_damage_buffer() if possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34227>
2025-04-04 14:38:44 +00:00
Vlad Zahorodnii
fd146d04d1 egl/wayland: Damage whole surface using wl_surface_damage_buffer()
Most compositors work with damage in the buffer local coordinate space.
This change spares the compositors some work converting the provided
INT32_MAX x INT32_MAX damage region to the buffer local coordinate
space. It has no significant performance impact, but it'd still be nice
to use wl_surface_damage_buffer() if possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34227>
2025-04-04 14:38:43 +00:00
Job Noorman
78ef51aa04 ir3/opt_preamble: take alias.rt into account for rewrite cost
FS outputs can use const registers in alias.rt without a mov so take
this into account when calculating the rewrite cost of instructions.

Totals:
MaxWaves: 2765084 -> 2765130 (+0.00%); split: +0.00%, -0.00%
Instrs: 56289002 -> 56285073 (-0.01%); split: -0.01%, +0.00%
CodeSize: 118071672 -> 118076808 (+0.00%); split: -0.00%, +0.01%
NOPs: 9491112 -> 9492474 (+0.01%); split: -0.00%, +0.02%
MOVs: 1790085 -> 1786768 (-0.19%); split: -0.19%, +0.00%
Full: 2156693 -> 2156607 (-0.00%); split: -0.00%, +0.00%
(ss): 1329812 -> 1329546 (-0.02%); split: -0.03%, +0.01%
(sy): 686396 -> 686386 (-0.00%); split: -0.00%, +0.00%
(ss)-stall: 4995295 -> 4995185 (-0.00%); split: -0.02%, +0.01%
(sy)-stall: 19828966 -> 19828624 (-0.00%); split: -0.01%, +0.01%
Cat0: 10450369 -> 10451731 (+0.01%); split: -0.00%, +0.02%
Cat1: 2787946 -> 2784566 (-0.12%); split: -0.12%, +0.00%
Cat2: 21265787 -> 21264447 (-0.01%)
Cat3: 16207098 -> 16206536 (-0.00%)
Cat7: 1597849 -> 1597840 (-0.00%); split: -0.00%, +0.00%

Totals from 730 (0.36% of 200220) affected shaders:
MaxWaves: 6308 -> 6354 (+0.73%); split: +0.79%, -0.06%
Instrs: 258235 -> 254306 (-1.52%); split: -1.59%, +0.07%
CodeSize: 698806 -> 703942 (+0.73%); split: -0.28%, +1.02%
NOPs: 21040 -> 22402 (+6.47%); split: -1.85%, +8.33%
MOVs: 9426 -> 6109 (-35.19%); split: -35.52%, +0.33%
Full: 8914 -> 8828 (-0.96%); split: -1.03%, +0.07%
(ss): 5118 -> 4852 (-5.20%); split: -6.58%, +1.39%
(sy): 2118 -> 2108 (-0.47%); split: -1.18%, +0.71%
(ss)-stall: 17360 -> 17250 (-0.63%); split: -4.57%, +3.94%
(sy)-stall: 34921 -> 34579 (-0.98%); split: -5.90%, +4.92%
Cat0: 24734 -> 26096 (+5.51%); split: -1.58%, +7.09%
Cat1: 12311 -> 8931 (-27.46%); split: -27.70%, +0.24%
Cat2: 106329 -> 104989 (-1.26%)
Cat3: 100547 -> 99985 (-0.56%)
Cat7: 3646 -> 3637 (-0.25%); split: -0.91%, +0.66%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34279>
2025-04-04 14:17:10 +00:00
Vignesh Raman
7959250d1e s3_upload: improve url validation and error message
Ensure s3_upload correctly validates the S3 folder url by requiring it
to end with /. This prevents wrong uploads to invalid paths, such as
file urls. Also improve the error message.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34255>
2025-04-04 13:32:45 +00:00
Zan Dobersek
248edb43c3 tu: allow D3D-compatible texture coordinate rounding
When running under DXVK or vkd3d, the texture coordinate rounding behavior
should match D3D expectations. On Adreno, this behavior can be toggled
through the SP_TP_MODE_CNTL register.

A driconf-based option is introduced to help set the relevant register flag
that enables this behavior.

This fixes the cause of test_sampler_rounding test case failure in vkd3d on
Turnip's side, but a small change in vkd3d is also required, so the test
failure expectation isn't removed yet.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33987>
2025-04-04 10:09:47 +00:00
Zan Dobersek
3b1ca55b40 freedreno/registers: add useful A6XX_SP_TP_MODE_CNTL bitfields
Add additional bitfields for the A6XX_SP_TP_MODE_CNTL registers, ones that
we already use and the texcoord rounding mode bitfield that we'll need for
D3D-over-Vulkan implementations.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33987>
2025-04-04 10:09:47 +00:00
Benjamin Lee
e183650aa4 panvk/csf: fix uninitialized read in utrace_clone_init_builder
Previous code assumed that the caller of utrace_clone_init_builder would
fill some parameters of the builder config, but we were not. Instead,
initialize these from the csif props the same as all the other builder
instances.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 3096cf2a5d ("panvk/csf: flush and process trace events for all cmdbufs")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34270>
2025-04-04 09:43:02 +00:00
Hyunjun Ko
2b0df6c564 anv: Use vk_video_derive_h265_scaling_list
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:48 +00:00
MaciejDziuban
f31a33905a radv: Use vk_video_derive_h265_scaling_list
This commit makes radv use vk_video_derive_h265_scaling_list, which properly
applies default scaling lists whenever they're needed. It also simplifies
update_h265_scaling function into a simple memcpy. The firmware interface
struct and Vulkan's StdVideoH265ScalingLists struct both have identical memory
layouts, so it's not neccessary divide it into multiple copies with offsets.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:48 +00:00
MaciejDziuban
4072286f07 vulkan: Add default scaling lists for H265
H265 specification defines default scaling lists to use whenever scaling lists
are not specified in neither sps nor pps. Currently drivers ignore this
requirement and set the lists to zero. This commits adds a helper function
vk_video_derive_h265_scaling_list (similar to its h264 counterpart) that
selects either sps or pps lists and falls back to default values if neither
were specified. The default values were taken from ITU-T H265 specification
(revision 8), section 7.4.5.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:48 +00:00
MaciejDziuban
a1bf7192e5 vulkan: handle use_default_scaling_matrix_mask in h264 decoder
H264 specification defines this field to force usage of the default
scaling lists even if they are specified in ScalingList4x4 and
ScalingList8x8.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34096>
2025-04-04 07:23:47 +00:00
Ian Romanick
20cce95ce5 brw/opt: Don't call brw_opt_copy_propagation before brw_lower_load_reg
On a 36c/72t Xeon system, performance of replaying
hogwarts_legacy.dx12vk-ultra.foz was improved 1.3% +/- 0.77% (n=10).

I picked MTL for the fossil-db results because it was the most negative.

shader-db:

All Intel platforms had fairly similar results. (Lunar Lake)
total instructions in shared programs: 16964217 -> 16964216 (<.01%)
instructions in affected programs: 51777 -> 51776 (<.01%)
helped: 20 / HURT: 27

total cycles in shared programs: 892934916 -> 893041912 (0.01%)
cycles in affected programs: 51245298 -> 51352294 (0.21%)
helped: 96 /HURT: 78

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 233678547 -> 233678944 (+0.00%); split: -0.00%, +0.00%
Cycle count: 24398049850 -> 24400490877 (+0.01%); split: -0.01%, +0.02%
Max live registers: 42145052 -> 42145038 (-0.00%); split: -0.00%, +0.00%

Totals from 1141 (0.14% of 805934) affected shaders:
Instrs: 1546001 -> 1546398 (+0.03%); split: -0.01%, +0.03%
Cycle count: 1201746062 -> 1204187089 (+0.20%); split: -0.14%, +0.34%
Max live registers: 84247 -> 84233 (-0.02%); split: -0.03%, +0.01%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
991a2f510b brw/sat: Eliminate non-defs saturate propagation
The intervening_saturating_copy test is removed. The defs version of the
pass does not handle this case. It should not occur often in practice
anyway. Copy propagation and brw_nir_opt_fsat should prevent this
scenario from happening.

No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 212677275 -> 212677278 (+0.00%)
Cycle count: 30466062848 -> 30466056040 (-0.00%)

Totals from 1 (0.00% of 706300) affected shaders:
Instrs: 1343 -> 1346 (+0.22%)
Cycle count: 411664 -> 404856 (-1.65%)

v2: Stop counting ip. The non-defs part of the pass was the only thing
that used it.

v3: Also delete "if (block != def->block) continue;" code. I noticed
this while working on some other changes to this function. It's the last
thing in the loop, so it's totally useless. Delete some other spurious
continues too.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
cc5a6a5ae8 brw/sat: Convert tests to use load_reg
This is in prepartion for a commit that removes the non-defs version of
the pass.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
2d13acf9d9 brw: Add passes to generate and lower load_reg
v2: Add support for WE_all instructions... this already just worked, so
I only had to delete the check and the FINISHME comment.

v3: Use logic more like def_analysis::update_for_reads to determine when
to not insert LOAD_REG instructions. Based on a suggestion by Ken.

v4: Eliminate "store" from all the names since STORE_REG does not exist
anymore. Fold insert_load_reg into brw_insert_load_reg. Elminate extra
call to s.def_analysis.require() after progress. Pull a loop-invariant
check out of the inst->srouces loop. Drop call to
brw_opt_split_virtual_grfs after lowering load_reg. All suggested by
Caio.

v5: Assert that LOAD_REG doesn't already exist in
brw_insert_load_reg. Update comment before fully_defines. Both
suggested by Caio.

v6: Don't explicitly special-case SHADER_OPCODE_MEMORY_STORE_LOGICAL.
Move the inst->dst.file != VGRF check earlier to avoid the loop over
sources. Both suggested by Ken. Move the call the brw_insert_load_reg
a little bit later, and explain why it's at that location. Suggested
by Caio.

v7: Many changes to the for-each-source loop in brw_insert_load_reg.
Removes incorrect multiplication of s.alloc.sizes with reg_unit. Adds
checks for matching SIMD size and NoMask in the search for pre-existing
LOAD_REG of same value.

v8: Add some unit tests. Suggested by Caio.

shader-db:

Lunar Lake
total instructions in shared programs: 16923237 -> 16921895 (<.01%)
instructions in affected programs: 450565 -> 449223 (-0.30%)
helped: 251 / HURT: 377

total cycles in shared programs: 910428418 -> 889920590 (-2.25%)
cycles in affected programs: 719248184 -> 698740356 (-2.85%)
helped: 9076 / HURT: 9082

total fills in shared programs: 2242 -> 2218 (-1.07%)
fills in affected programs: 116 -> 92 (-20.69%)
helped: 2 / HURT: 0

total sends in shared programs: 848635 -> 848421 (-0.03%)
sends in affected programs: 810 -> 596 (-26.42%)
helped: 10 / HURT: 0

LOST:   82
GAINED: 78

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19875784 -> 19871694 (-0.02%)
instructions in affected programs: 1050091 -> 1046001 (-0.39%)
helped: 251 / HURT: 2403

total cycles in shared programs: 905328238 -> 882446458 (-2.53%)
cycles in affected programs: 682736344 -> 659854564 (-3.35%)
helped: 7869 / HURT: 7911

total spills in shared programs: 5512 -> 5032 (-8.71%)
spills in affected programs: 1830 -> 1350 (-26.23%)
helped: 8 / HURT: 0

total fills in shared programs: 5648 -> 4782 (-15.33%)
fills in affected programs: 3312 -> 2446 (-26.15%)
helped: 8 / HURT: 0

total sends in shared programs: 1032942 -> 1032722 (-0.02%)
sends in affected programs: 572 -> 352 (-38.46%)
helped: 10 / HURT: 0

LOST:   138
GAINED: 53

Tiger Lake
total instructions in shared programs: 19711930 -> 19715591 (0.02%)
instructions in affected programs: 1040623 -> 1044284 (0.35%)
helped: 317 / HURT: 2474

total cycles in shared programs: 862988990 -> 860573870 (-0.28%)
cycles in affected programs: 612392461 -> 609977341 (-0.39%)
helped: 7447 / HURT: 7686

total sends in shared programs: 1034763 -> 1034555 (-0.02%)
sends in affected programs: 784 -> 576 (-26.53%)
helped: 8 / HURT: 0

LOST:   56
GAINED: 143

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20545461 -> 20545220 (<.01%)
instructions in affected programs: 422405 -> 422164 (-0.06%)
helped: 180 / HURT: 459

total cycles in shared programs: 872697345 -> 866874523 (-0.67%)
cycles in affected programs: 573117917 -> 567295095 (-1.02%)
helped: 6783 / HURT: 6980

total spills in shared programs: 4335 -> 4336 (0.02%)
spills in affected programs: 90 -> 91 (1.11%)
helped: 1 / HURT: 2

total fills in shared programs: 4194 -> 4196 (0.05%)
fills in affected programs: 463 -> 465 (0.43%)
helped: 1 / HURT: 2

total sends in shared programs: 1079446 -> 1079238 (-0.02%)
sends in affected programs: 784 -> 576 (-26.53%)
helped: 8 / HURT: 0

LOST:   117
GAINED: 37

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209708136 -> 209695617 (-0.01%); split: -0.02%, +0.01%
Send messages: 10927753 -> 10927640 (-0.00%)
Cycle count: 30540172048 -> 30427084732 (-0.37%); split: -0.99%, +0.62%
Spill count: 511621 -> 510932 (-0.13%); split: -0.22%, +0.08%
Fill count: 621166 -> 618440 (-0.44%); split: -0.56%, +0.12%
Scratch Memory Size: 35574784 -> 35648512 (+0.21%); split: -0.06%, +0.26%
Max live registers: 65453860 -> 65453140 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 75374990 -> 35195764 (-53.31%)

Totals from 503284 (71.25% of 706391) affected shaders:
Instrs: 180203778 -> 180191259 (-0.01%); split: -0.02%, +0.01%
Send messages: 9699732 -> 9699619 (-0.00%)
Cycle count: 30080349592 -> 29967262276 (-0.38%); split: -1.01%, +0.63%
Spill count: 511584 -> 510895 (-0.13%); split: -0.22%, +0.08%
Fill count: 621120 -> 618394 (-0.44%); split: -0.56%, +0.12%
Scratch Memory Size: 35443712 -> 35517440 (+0.21%); split: -0.06%, +0.27%
Max live registers: 52566092 -> 52565372 (-0.00%); split: -0.01%, +0.00%
Non SSA regs after NIR: 70110949 -> 29931723 (-57.31%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
8b2be206f3 brw/algebraic: Constant folding for BROADCAST and SHUFFLE
This prevents assertion failures in brw_eu_emit in a later commit in
this MR. Even though they have not been previously observed, these
assertion failures could happen even without that commit.

No shader-db or fossil-db changes on any Intel platform.

Fixes: 04e1783278 ("brw: Call brw_fs_opt_algebraic less often")

v2: Add SHUFFLE. Suggested by Ken. Fixed indentation.

v3: Update BROADCAST exec_size after rebasing on "brw/build: Use SIMD8
temporaries in emit_uniformize".

v4: Explain why munging the exec_size is correct.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
1b997c7bcc brw/coalesce: Prepare brw_opt_register_coalesce for load_reg
v2: Explain the problematic situation a little better in the
comment. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
15637334ce brw/copy: Prepare copy_propagation for load_reg
The changes to try_copy_propagate will be removed later in the series.

v2: Fix up some comments to note that offset != 0 is allowed only when
stride == 0. Apply same offset=0 restriction in try_copy_propagate_def
too. Allow copy propagation if the source is either a def or
UNIFORM. Don't copy prop a load_reg through a non-def value.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
cfc50390fb brw: Add basic infrastructure for load_reg pseudo op
load_reg is something like load_payload except it has a single
source. It copies the entire source to the destination. Its purpose is
to convert a non-SSA VGRF into an SSA value. This copy is marked as
volatile so that it will act as a scheduling barrier.

v2: Fix some typos in the commit message. Eliminate the
brw_builder::LOAD_REG overload that returns a brw_inst*. This is
unlikely to ever be used. Add some checks to brw_validate. All
suggested by Caio.

v3: Force the source and destination types of the LOAD_REG to by
integer. This will (eventually) simplify the creating of unit tests for
the pass that adds LOAD_REG instructions.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Ian Romanick
b9656d51c0 brw/opt: Move non-SSA register accounting after first brw_opt_split_virtual_grfs
v2: Move to immediately before the main optimization loop. Most
importantly, this is after the first call to DCE.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Non SSA regs after NIR: 237045283 -> 100183460 (-57.74%); split: -58.12%, +0.39%

Totals from 701423 (99.26% of 706657) affected shaders:
Non SSA regs after NIR: 236868848 -> 100007025 (-57.78%); split: -58.17%, +0.39%

Suggested-by: Ken
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31497>
2025-04-04 06:45:02 +00:00
Kenny Levinsen
cd4820d6ac device-select: Support linux-dmabuf feedback
device-select-layer needs to obtain the display server's preferred
display device, and has so far relied on wl_drm for this. wl_drm is
superseded by linux-dmabuf with some Wayland servers having dropped
support for wl_drm entirely.

Implement linux-dmabuf as preferred mechanism for obtaining the main
device, with wl_drm support retained as a fallback for now.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34219>
2025-04-04 06:00:17 +00:00
llyyr
dc90e33ad2 vulkan/wsi/wayland: initialize surface colorspace with PASS_THROUGH_EXT
Starting with sRGB meant we would refcount to -1 if an application
chooses PASS_THROUGH. Instead, just initialize with PASS_THROUGH so the
initial refcount of 0 reflects reality.

Previously, we would segfault if an application chose PASS_THROUGH at
swapchain initialization then switched to a color managed colorspace
later in the runtime, because we would increment refcount from -1 -> 0
and this would result in not creating a new color managed surface.

Fixes: 789507c99c ("vulkan/wsi: implement the Wayland color management protocol")
Signed-off-by: llyyr <llyyr.public@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34353>
2025-04-04 05:10:08 +00:00
David Rosca
1610841f0f egl/x11: Fix swap interval setup
Calling dri2_x11_setup_swap_interval with swap_available = false
sets the min/max/default swap interval values to zero.
EGL_MIN/MAX_SWAP_INTERVAL is always reported as 0 and the interval
value set by eglSwapInterval gets clamped to 0.

Set swap_available to true before calling dri2_x11_setup_swap_interval,
as was done before.

Fixes: c00701c83a ("egl/x11: unify swrast/kopper/dri3 paths a bit")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34235>
2025-04-04 04:15:01 +00:00
Jose Maria Casanova Crespo
efc87e0d6a glapi: import noop_array and public stubs earlier.
After 711fc10ea3 "glapi: merge all shared-glapi source files
into one .c file" the V3D simulator started crashing. After
testing the changes of the merge one by one, it was identified
that previously shared_glapi_mapi_tmp.h was being imported twice
instead of only once as it happens after the merge. Although
the change done in the merge seems to be equivalent it seems
it was breaking the the debug builds.

Here can find an explanation why this problem was affecting debug
builds https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34363#note_2850196

Fixes: 711fc10ea3 ("glapi: merge all shared-glapi source files into one .c file")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12908
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34363>
2025-04-04 00:18:28 +00:00
Mike Blumenkrantz
12b57b34f8 gallium/util: check nr_samples in pipe_surface_equal()
this is otherwise broken

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34367>
2025-04-03 23:41:30 +00:00
Timur Kristóf
a530890e75 nir/print: Fix variable mode for arrayed output load intrinsics.
This helps print the names of varyings correctly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
e258492a8f radv: Remove radv_streamout_info::num_outputs.
This field was never used for determining the number of outputs,
just for determining whether streamout was enabled, which makes
it unnecessary. We can use enabled_stream_buffers_mask for that.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
ce2138d73a radv: Call nir_opt_undef too after nir_opt_varyings.
Shaders may have undefined output stores after nir_opt_varyings.
These must be optimized out, otherwise they hit an assertion.

Fixes: 17f6ab28cc
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
15d0804670 radv: Use buffers_written mask when gathering XFB info.
We need to enable these buffers regardless of whether or not the
shader actually writes any outputs to them, otherwise we break
XFB queries.

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
96d11d0f56 nir/opt_varyings: Fix assertion when deduplicating TCS outputs.
When deduplicating TCS outputs, we may find outputs that aren't
loaded by the shader itself. This previously hit a bad assertion.

Fixes: c66967b5cb
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12410
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Timur Kristóf
a29b5857f7 nir/xfb: Preserve some xfb information when gathering from intrinsics.
We need to remember which streamout buffers and streams were enabled,
even if the shader doesn't actually write any outputs to them,
because the API requires that we count vertices created by this shader
towards queries against those streams.

That information can be gathered by nir_gather_xfb_info_with_varyings
from the original NIR I/O variables that we get from the frontend,
but it isn't included in any intrinsics so would be otherwise lost here.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34317>
2025-04-03 19:54:51 +00:00
Jan Alexander Steffens (heftig)
1deb0536a1 gfxstream: Use proper log format for 32-bit Vulkan
On i686, where VK_USE_64_BIT_PTR_DEFINES is unset and Vulkan handles are
represented as 64-bit integers instead, the code used the wrong format
specifier, causing a build error.

Fixes: 7fb31361f4 ("Handle external fences in vkGetFenceStatus()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34124>
2025-04-03 19:35:20 +00:00
Zan Dobersek
335cc96069 tu: disable logic operations for float and sRGB formats
Per spec, logic operations between fragment values and color attachments
should be disabled when attachments are using float or sRGB formats.
Regardless of attachment's format, enabled logic operations should keep
blending disabled.

Fixes: dEQP-VK.pipeline.*.logic_op_na_formats.*

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34212>
2025-04-03 15:48:19 +00:00
Lucas Stach
d917625226 etnaviv: add context flush sw query
Context flushes can be caused by all kinds of operations that aren't
obvious to a GL API user. As those are quite heavy-weight operations
it is nice to have some insight into how many of those are happening
per frame. Add a sw query to make this information easily accessible.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34350>
2025-04-03 14:27:55 +00:00
Stéphane Cerveau
ee535aa039 radv: video: rework maxActiveReferenceSlot/MaxDpbSlots
For the pReferenceSlots.slotIndex, the max
value should the maxDpbSlots which is
h264: 16 + 1
h265 : 15 + 2
av1: 7+2

Fixing SVA_CL1_E test vector in JVT-AVC_V1
fluster test suite.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33094>
2025-04-03 13:20:45 +00:00
Georg Lehmann
c21a53440f spirv: clamp/sign-extend non 32bit ldexp exponents
GLSL.std.450 allows any integer size here.
OpenCL only allows i32.

Cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34071>
2025-04-03 12:35:59 +00:00
Job Noorman
45a5ccbf07 ir3/ra: create merge sets for splits/collects inserted for shared RA
Since shared RA happens after creating merge sets, newly inserted
splits/collects did not have merge sets created for them. Fix this by
creating merge sets for new instructions after shared RA.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33319>
2025-04-03 12:06:18 +00:00
Job Noorman
0cafd07b0c ir3: add ir3_aggressive_coalesce helper
To allow us to create merge sets outside of ir3_merge_regs.c.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33319>
2025-04-03 12:06:18 +00:00
Job Noorman
a0db2f9737 ir3/ra: assign interval offsets to new defs after shared RA
Shared RA might insert new defs to be handled by regular RA (e.g.,
shared spills). However, their interval offsets were not initialized
which caused their intervals to sometimes be mistakenly matched with
those containing offset 0. Fix this by calling index_merge_sets after
shared RA and modifying that function to only index new defs in that
case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33319>
2025-04-03 12:06:18 +00:00
Eric Engestrom
6331441e24 ci: rename ci-tron priority tag to avoid conflict with the generic fdo runners
Otherwise, ci-tron runners with that tag could pick up jobs meant for the fdo
runners, as happened here:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/73883719

The inverse (fdo runners picking up a job meant for a ci-tron runner) is not
possible though, as ci-tron jobs always include a `farm:$RUNNER_FARM_LOCATION`
tag, so the problem only exists in the other direction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34358>
2025-04-03 11:25:12 +00:00
Eric Engestrom
f84578e308 ci/build: drop LTO from fedora build
It's been broken for a few months by now and nobody has been interested
in fixing it, so let's drop LTO so that we get the rest of the benefits
from having that build at all.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34318>
2025-04-03 10:23:55 +00:00
Samuel Pitoiset
ef3363ef71 radv: rework suspend/resume user conditional rendering
Better to suspend/resume in the top level function.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
2025-04-03 08:54:36 +00:00
Samuel Pitoiset
4bc971a0bd radv: add new helper to suspend/resume user conditional rendering
Instead of duplicating same code everywhere.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
2025-04-03 08:54:36 +00:00
Samuel Pitoiset
4d1d6d4147 radv: fix ignoring conditional rendering with vkCmdResolveImage()
This command isn't supposed to be affected by conditional rendering.

This fixes new VKCTS coverage
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
2025-04-03 08:54:36 +00:00
Job Noorman
dd1ba74777 ir3: make shpe a terminator
shpe is a bit of a special instruction: it's not really a terminator
(i.e., it does not perform a jump) but it does have to stay at the end
of its block. Up to now, we tried to enforce this by creating const
write barriers on shpe; the assumption being that everything that
happens in the preamble ends in a write to the const file so shpe stays
at the end. Alas, it turns out this is not true: things like sampler
prefetches do not write the const file and nothing was preventing those
from being scheduled after shpe.

Instead of trying to create even more barrier dependencies, fix this by
making shpe a terminator. Both sched and postsched treat terminators
specially to make sure they always stay at the end of their block.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34290>
2025-04-03 08:16:59 +00:00
Danylo Piliaiev
f5019ee0d4 ir3: Fix shaders that write only color classified as empty
Shader may have zero instructions and no prefetches but have inputs
that without modifications are used as output.

Fixed vkd3d test:
 test_depth_bias_behaviour

Fixes: b0a98d3b13
("ir3: Detect empty fragment shaders")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34348>
2025-04-03 06:47:43 +00:00
Connor Abbott
75178c4655 tu: Implement VK_QCOM_fragment_density_map_offset
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
7351f8d587 tu/fdm: Skip some patchpoints when binning
In order to implement FDM offset, we will have to offset the viewport
and scissor in the binning pass. In order to do this, we have to pass a
bin with nonsensical negative offsets to the patchpoint function, which
would result in asserts when patching the load/store sequences. But we
don't really need to patch these anyways as they are unused during
binning, so add the ability to skip them when binning. FS params and
some implementations of CmdClearAttachments (that don't contribute to
visibility) can similarly be skipped.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
df0c17f76e tu: Fix CmdClearAttachments with fragment density map
The clear may be a partial clear, in which case we need to make sure
that the clear rectangle is transformed into GMEM space so that it is
clipped correctly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
0d4eed0e46 tu: Split out part of tiling config to vsc config
For FDM offset, we will need to expand the number of bins by 1, which
can change how pipes are allocated. We don't necessarily know whether
FDM offset will be used when creating the VkFramebuffer, so we'll have
to create two different configs when FDM is enabled. Split out the parts
that are affected by the number of bins into a separate "VSC config"
struct that will be duplicated with FDM offset.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Connor Abbott
304af47ba2 tu: Only allow power-of-two fragment areas
Non-power-of-two fragment areas can result in precision loss and missed
fragments, which was seen in an upcoming CTS test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33500>
2025-04-03 05:37:56 +00:00
Caleb Callaway
5ad00bae8b intel/compiler: fix lingering i965 references
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34351>
2025-04-03 03:17:25 +00:00
Job Noorman
02ff26be38 ir3: run opt_if after opt_vectorize
nir_opt_vectorize could replace swizzled movs with vectorized movs in a
different block. If this happens with swizzled movs in a then block, it
could leave this block empty. ir3 assumes only the else block can be
empty (e.g., when lowering predicates) so make sure ifs are in that
canonical form again.

This fixes empty predication blocks in some shaders, for example:

predt
predf
...
prede

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34272>
2025-04-03 00:19:31 +00:00
Job Noorman
ee0ee2a317 ir3: don't sync every TCS/GEOM block
TCS/GEOM shaders need (sy)(ss) on their first instruction but we
accidentally set it on the first instruction of every block.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34257>
2025-04-02 23:37:35 +00:00
Connor Abbott
3ba315f205 ir3: Split mad with scalar ALU
At least on all a6xx/a7xx, mad.f32 and mad.f16 are not fused. This means
that when the sources of a NIR ffma are all uniform we can split it in
two to execute it on the scalar ALU. This is important to reduce
register pressure and make more preambles executed early.

On fossil-db the statistics are mostly a wash as expected, but with
early preambles increasing dramatically:

Totals:
MaxWaves: 2249180 -> 2249230 (+0.00%); split: +0.01%, -0.01%
Instrs: 49668884 -> 49662951 (-0.01%); split: -0.12%, +0.11%
CodeSize: 103662656 -> 103831154 (+0.16%); split: -0.22%, +0.38%
NOPs: 8502571 -> 8495568 (-0.08%); split: -0.61%, +0.53%
MOVs: 1554442 -> 1538804 (-1.01%); split: -2.01%, +1.01%
Full: 1820906 -> 1814292 (-0.36%); split: -0.39%, +0.03%
(ss): 1168628 -> 1165868 (-0.24%); split: -1.01%, +0.78%
(sy): 616751 -> 616521 (-0.04%); split: -0.52%, +0.49%
(ss)-stall: 4384397 -> 4361662 (-0.52%); split: -1.44%, +0.93%
(sy)-stall: 17850227 -> 17858949 (+0.05%); split: -0.58%, +0.63%

Early-preamble: 102262 -> 115702 (+13.14%)
Cat0: 9375820 -> 9367978 (-0.08%); split: -0.57%, +0.48%
Cat1: 2470212 -> 2454318 (-0.64%); split: -1.28%, +0.64%
Cat2: 18673655 -> 18707106 (+0.18%)
Cat3: 14227810 -> 14211106 (-0.12%)
Cat5: 1424184 -> 1424150 (-0.00%)
Cat7: 1404718 -> 1405808 (+0.08%); split: -0.39%, +0.47%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34115>
2025-04-02 23:08:39 +00:00
Sviatoslav Peleshko
64980c4f05 vulkan/wsi/headless: Remove unnecessary wsi_configure_image()
wsi_configure_image() with the same info is already called by
configure_image() in wsi_swapchain_init(), so this second call is
unnecessary. Furthermore, calling it the second time caused a memory
leak of queue family indices array.

Fixes: d4a2c0fc ("vulkan/wsi: add a headless swapchain implementation/option")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12811
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34194>
2025-04-02 21:17:30 +00:00
Rob Clark
2b2bcbb96d ci: Re enable fd-farm
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34263>
2025-04-02 20:13:37 +00:00
Dylan Baker
ff4b1b1e43 intel/decoder: free memory in error case
This was handled in other instances in a previous patch, but this
instance remains, as the zlib decompression routine is slightly
different.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34118>
2025-04-02 19:26:55 +00:00
Dylan Baker
da14c0af67 intel/tools: move ascii85_decode to common code
We have 3 copies of this function, so put it in the shared static
library.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34118>
2025-04-02 19:26:55 +00:00
Dylan Baker
7b791cd0b4 intel/tools: deduplicate zlib_inflate function
There are three copies of this function, all of them have the same
memory leak in them. Instead of fixing them one by one, just use a
common implementation for all three, since they already all have a
shared helper lib.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34118>
2025-04-02 19:26:55 +00:00
Eric Engestrom
a1a9c7cda2 docs: add sha sum for 25.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34349>
2025-04-02 19:18:32 +00:00
Eric Engestrom
d9d8a58475 docs: add release notes for 25.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34349>
2025-04-02 19:18:32 +00:00
Eric Engestrom
6f1d502af7 docs: update calendar for 25.0.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34349>
2025-04-02 19:18:32 +00:00
David Rosca
a5edb9faac radeonsi/vcn: Disable AV1 unidir compound with rate control
It causes significant bitrate overshoot currently.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34237>
2025-04-02 17:55:23 +00:00
Eric Engestrom
2063084903 virgl: fix typo inverting a condition
Fixes: 8513bcbd2f ("virtio: Remove virglrenderer_hw.h entirely")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34340>
2025-04-02 16:28:24 +00:00
Connor Abbott
15660caa90 tu: Fix layer_count with dynamic rendering + multiview
With "classic" renderpasses, the VkFramebuffer's layerCount must be 1 if
multiview is enabled. We accidentally rely on this to not disable GMEM
for multiview, and possibly for other things too. Apparently the dynamic
rendering equivalent, VkRenderingInfo::layerCount, can be anything when
multiview is enabled, and some CTS tests set it to the number of views.
Sanitize it when constructing the internal framebuffer for dynamic
rendering.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34080>
2025-04-02 15:47:47 +00:00
Danylo Piliaiev
c538a9ec6e tu: Use EARLY_Z also for stencil tests
EARLY tests can test and write out stencil values.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33851>
2025-04-02 12:03:30 +00:00
Danylo Piliaiev
534cf4feeb tu/lrz: Improve LRZ around stencil tests and reads_dest cases
We were a bit too conservative and fully disabled LRZ for when stencil
or blending were involved. There is no need to fully disable LRZ
in those cases, only LRZ writes should be disabled.

The final rules are:
 LRZ is DISABLED until depth attachment is cleared when:
   - Depth Write + changing direction of depth test
      e.g. from OP_GREATER to OP_LESS;
   - Depth Write + OP_ALWAYS or OP_NOT_EQUAL;
   - Clearing depth with vkCmdClearAttachments;
   - Depth image is a target of blit commands.
   - (pre-a650) Not clearing depth attachment with LOAD_OP_CLEAR;
   - (pre-a650) Using secondary command buffers;
 LRZ WRITE is DISABLED until depth attachment is cleared when:
   - Depth Write + blending (color blend, logic ops, partial color mask, etc.);
   - Fragment may be killed by stencil;
 LRZ is disabled for CURRENT draw when:
   - Fragment shader side-effects (writing to SSBOs, atomic operations, etc);
   - Fragment shader writes depth or stencil;
 LRZ WRITE is DISABLED (via LATE_Z) for CURRENT draw when:
   - Fragment may be via killed alpha-to-coverage, discard, sample coverage;

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33851>
2025-04-02 12:03:30 +00:00
Juan A. Suarez Romero
0d2ebca39f v3dv: include depth offset on image view creation
When creating the image view in the texel buffer shader copy function,
take in account the region to copy can start in a different Z-offset
than 0.

This fixes several dEQP-VK.image.concurrent_copy.* failing tests.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
2025-04-02 10:31:15 +00:00
Juan A. Suarez Romero
91ee8ab284 v3dv: don't batch regions with different depth offsets
As we will be creating an image view that covers the region to copy,
batch all the regions that share the same depth offset and depth extent.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
2025-04-02 10:31:15 +00:00
Juan A. Suarez Romero
f7de4ad0fb v3dv: remove src_format from blit render pass creation
Source format is not involved at all on creating the blit render pass,
so remove from the function call.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34112>
2025-04-02 10:31:15 +00:00
David Rosca
597f13b244 radv: Add radv_format_description to remap 10/12bit formats to 16bit
Remapping was missing for format description which made these formats
effectively unsupported as zero format features were reported.

Fixes: 0098f8ef35 ("radv: Remap 10 and 12 bit formats to 16 bit formats")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34274>
2025-04-02 08:40:28 +00:00
David Rosca
3ef0ee2241 radv: Use radv_format_to_pipe_format instead of vk_format_to_pipe_format
Fixes: 9af11bf306 ("radv: add initial DCC support on GFX12")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34274>
2025-04-02 08:40:28 +00:00
Samuel Pitoiset
5784a36fd1 Revert "radeonsi/gfx11: program SAMPLE_MASK_TRACKER_WATERMARK optimally for APUs"
This reverts commit 6ce3a95852.

This likely also causes random GPU hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34306>
2025-04-02 07:10:40 +00:00
Samuel Pitoiset
64e6e043b3 Revert "radv: program SAMPLE_MASK_TRACKER_WATERMARK optimally for GFX11 APUs"
This reverts commit 96e9c3fe77.

This actually causes random GPU hangs like on Phoenix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12461
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12426
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12692
Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34306>
2025-04-02 07:10:40 +00:00
Samuel Pitoiset
fac44c0ca0 ac/surface: fix selecting preferred alignments for HiZ/HiS on GFX12
VK_MESA_image_alignment_control is used by vkd3d-proton to set
optimal alignments for images. Though, the preferred alignment was
only applied to the surface (or the stencil aspect) but not to the HiZ
surface due to the NULL check.

This caused rendering issues because swizzle modes didn't match.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12831
Fixes: 079f55d405 ("radv: advertise VK_MESA_image_alignment_control on GFX12")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34322>
2025-04-02 06:47:59 +00:00
Ian Romanick
e210b79ce3 brw/nir: Lower fsign again after last call to brw_nir_optimize
No shader-db or fossil-db changes on any Intel platform.

Fixes: 13332c23 ("intel/brw: Unconditionally run optimizations after nir_opt_uniform_subgroup")
Closes: #12888
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34251>
2025-04-02 01:59:49 +00:00
Ian Romanick
ca95cb8178 brw: Fix typo in comment
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34251>
2025-04-02 01:59:49 +00:00
Erik Faye-Lund
17d254e978 panvk/ci: disable some more slow tests
These tests currently take over 30 seconds, let's disable them to keep
CI performance reasonable.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34315>
2025-04-01 22:44:53 +00:00
Aaron Ruby
8513bcbd2f virtio: Remove virglrenderer_hw.h entirely
Capset definitions replaced by those in virtgpu_drm.h

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34300>
2025-04-01 22:11:10 +00:00
Aaron Ruby
b1ca6a0b43 drm-uapi: Sync virtgpu header
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34300>
2025-04-01 22:11:10 +00:00
Dave Airlie
7a01953a39 nak: Add Ampere and Ada latency information
This adds the latency information provided by NVIDIA.  This is copied
from excel spreadsheets provided to Red Hat.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Dave Airlie
6b8a4e6bb7 nak: Add Turing latency information
This adds the latency information provided by NVIDIA.  This is copied
from excel spreadsheets provided to Red Hat.

This fully passes CTS on Turing TU104 with no regressions.

I'm sure future use of some instructions like IMAD may require some
changes to this, but it should be functionally complete.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Mel Henning
3868855144 nak/instr_sched: Barriers activate after 2 cycles
This mirrors the logic around line 365 of calc_instr_deps.rs

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Dave Airlie
38d2212194 nak: Add an a_has_pred parameter to waw_latency
This affects the HMMA units, among others.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Faith Ekstrand
4914470327 nak: Add an Op::no_scoreboard() helper
Control-flow ops are theoretically variable-latency but we don't
actually want to scoreboard them because of the way NAK dependency
tracking works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Faith Ekstrand
2b569ecdb6 nak: Handle delays > 15
Delays greater than 15 needs to be encoded into a nop following the
instruction.  These delays will start to happen when we add accurate
latency handling and with certain instructions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Faith Ekstrand
348f345238 nak: Put the cycle count assert behind a debug flag
Fixes: c1d64053f2 ("nak: Assert instr_sched matches calc_instr_deps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Dave Airlie
7a55a9afcc nak: add reads after setting writes
Otherwise we schedule this sort of thing wrong,
 r0    = iadd3 r0 c[0x0][0x0] rZ
 r0    = shf.l.w.i32 r0 rZ 0x2
 r0 p0 = iadd3 r0 c[0x1][0x0] rZ

since raw latencies are more important than waw, but we go do a
waw for the first two instructions instead of a raw which is correct.

Fixes: 2d4e445099 ("nak/calc_instr_deps: Rewrite calc_delays() again")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
2025-04-01 21:20:57 +00:00
Autumn Ashton
afa254ad68 ci/zink+radv: Add sample locations fails
These fail on Polaris10 too.

Are these tests even valid? Is this a Zink bug?
Vulkan CTS is happy with our implementation.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:37 +01:00
Autumn Ashton
ae6d24c4ef radv: Expose VK_SAMPLE_COUNT_1_BIT for sample position on GFX10+
This works on GFX10+.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:34 +01:00
Autumn Ashton
693e3b47f7 radv: Expose EXT_sample_locations everywhere
This works and passes CTS now!

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:31 +01:00
Autumn Ashton
343c434c50 radv: Enable fragmentShadingRateWithCustomSampleLocations
We need to expose this, as we support it.

Otherwise 1x1 is assumed and we fail some CTS.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:28 +01:00
Autumn Ashton
3d75082c02 radv: Fix compute resolve rounding
When we are using compute resolve, we can get
values the CTS does not expect due to the value
we end up writing for UNORM in
`nir_image_deref_store`.

Make the compute resolve rounding path match with
the output of the fragment shader resolve path,
by going through the same FP16 RTZ conversion as
we do for UNORM/SNORM formats.

This is why VK_EXT_sample_locations CTS was
failing on > GFX9.
On <= GFX9, I am assuming we are falling back to
RESOLVE_FRAGMENT, due to DCC stuff, which is why
it works there.

I tested a handful of images from the Vulkan CTS
for the sample locations and resolve tests for
diff UNORM formats from the qpa file forcing
FRAGMENT and with this change.
With this change, we now match on the compute
resolve path the same sha for the ones I compared
with ImageMagick `identify`.

CTS passes for: *resolve*, *image_clearing* and
*sample_locations* on RX 7900XTX.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
2025-04-01 21:15:24 +01:00
Lucas Stach
b60d816d6e include: update GL headers from the registry
Taken from OpenGL-Registry commit ca62982097eb
("Remove plural bindings in GL_ARB_shader_texture_image_samples (#637)")

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33356>
2025-04-01 19:08:38 +00:00
Eric Engestrom
66f813ae0f docs: remove the last 24.3 releases
They're not going to happen anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34325>
2025-04-01 18:27:26 +00:00
Alyssa Rosenzweig
bfca178e27 asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
28dbdf2549 asahi: fix depth buffer feedback loops
fixes supertuxkart without the old hack.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
a4677945d2 asahi: fix printf without result buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
1a36d0b5d7 libagx: use common heap allocs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:51 +00:00
Alyssa Rosenzweig
55046d0293 libagx: assert alignment for copies
would have exposed the bug fixed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
f0ee1b1967 libagx: clean up query copy; bug fix
oops.
-      .partial = flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT,

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
b5367dd797 hk: fix unaligned copies
Fixes regression in Deus Ex: Human Revolution (DX11) via DXVK reported by James
Calligeros.

Pending CTS coverage: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5640

Only the alignment check here is load bearing but I clarified the logic while at
it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
f7e706e325 hk: advertise bufferDeviceAddressCaptureReplayEXT
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
8f2dc51e7f hk: advertise semaphore extensions
works on current kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Alyssa Rosenzweig
c068b34013 agx: fix tg4 offset residency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34326>
2025-04-01 17:42:50 +00:00
Tapani Pälli
b93ea155f9 compiler/glsl: check that bias is not used outside fragment stage
This fixes some upcoming CTS tests that attempt bias usage when
it is not valid per spec.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34285>
2025-04-01 16:51:31 +00:00
Marek Olšák
ce716d009f ac/nir/cull: cull small prims using a point-triangle intersection test
This is based on Timur Kristof's code, but there are a lot of differences.
The idea is that it doesn't just compute an intersection between a point
and a triangle. It computes the *distance* between a point and a triangle
and it does so in screen space. It accurately takes the subpixel precision
of the rasterizer into account, so that it works optimally at all
resolutions, all MSAA modes, and all quant modes.

The distance computation is only approximated because it only considers
the infinite lines going through triangle edges. However, it seems to be
more than sufficient in practice because the existing rounding-based small
prim culling compensates for it.

The performance improvement is up to 10% in some geometry-bound tests,
though targeted microbenchmarks can show a lot more than that.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33361>
2025-04-01 16:12:22 +00:00
Valentine Burley
36bf26cf27 panvk/ci: Migrate the G52 VK job to MT8186
Migrate the panfrost-g52-vk job to mt8186-corsola-steelix-sku131072, a
new device in LAVA. This DUT is faster than the Khadas VIM3 device it
replaces, and since more of these devices are available in LAVA, reduce
the DEQP_FRACTION and increase the parallelism for the pre-merge job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33996>
2025-04-01 15:45:28 +00:00
Erik Faye-Lund
eb82d65a20 mesa/main: fix regression in extension-checking
This condition accidentally got inverted when cleaning up code, whoops.

Fixes: 3251f321b8 ("mesa: some cleanups for texparam extension checks")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34248>
2025-04-01 15:18:57 +00:00
Erik Faye-Lund
cbde0ec2dc panvk: expose textureCompressionBC when supported
We can't guarantee that we always support this feature, because support
for each format can be disabled per SoC. But we can check for this, and
expose it when it's supported.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12598
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34206>
2025-04-01 14:55:46 +00:00
Erik Faye-Lund
e4786cf971 panvk: check for texture-compression support
We currently just assume that textureCompressionETC2 and
textureCompressionASTC_LDR are always supported. And while that's true
for all the G52s, G610s abd G310s we've seen out in the wild, it's not
guaranteed to be true. An SoC vendor might disable support for one of
these formats.

So let's check properly, just for good measure.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34206>
2025-04-01 14:55:46 +00:00
Taras Pisetskyi
04962975fd anv,driconf: Add sampler coordinate precision workaround for EVE Online
Signed-off-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12920

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34316>
2025-04-01 14:16:48 +00:00
Erik Faye-Lund
ac4f8c95a6 panfrost: use real array for panfrost_emit_plane
The panfrost_emit_plane function expects an array, and Coverity
complains about passing a pointer instead. Yeah, that's a bit nit-picky,
but it's easy enough to use an actual array here instead of trying to
fudge it.

This should be a non-functional change.

CID: 1636773, 1636744
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34156>
2025-04-01 13:46:33 +00:00
Erik Faye-Lund
fe680844f5 panfrost: fix overflow-debugging
We were using an unsigned instead of a size_t for the size calculation,
which would break large allocations. So let's switch to size_t here,
for good measure.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34156>
2025-04-01 13:46:33 +00:00
Erik Faye-Lund
1471279203 panfrost: avoid accidental aliasing
We already have a variable call "alignment" here, and aliasing it
breaks things. Whoops, let's rename the variable to page_size to
avoid this.

Fixes: 22985caf3f ("panfrost: sanity-check alignment")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34156>
2025-04-01 13:46:33 +00:00
Collabora's Gfx CI Team
1ce0cef6bf Uprev ANGLE to 1b34d2a18af12cc55a3bc74dd679c2937d10cc5c
6abdc11741...1b34d2a18a

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34277>
2025-04-01 12:51:06 +00:00
Daniel Stone
3b6a40af53 ci: Make all job timeouts explicit
Enforce a default job timeout of 1 second, to make jobs which don't
explicitly specify a timeout insta-fail, rather than potentially hanging
around for an hour.

Container builds get the full hour as they can run long and are not run
in pre-merge context, and LAVA jobs also get the full hour as they have
multiple internal timeout mechanisms which aim to fast-fail jobs once
they actually start. However, as they just queue jobs to an external
host (shared with other projects like KernelCI), these timeouts aren't
reflected into the GitLab CI definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
3fee0ef129 ci/microsoft: Add job timeouts and pin Piglit to GSt
quick_shader is for some reason now excruciatingly slow on the Microsoft
runners, but fine on the GStreamer runners. Until we can figure out why
this is happening - 27min runtimes instead of 3min - just keep them over
there.

Dozen is miraculously unaffected.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
370efffe10 ci/docs: Add timeout to doc build
Give these about double the time they usually take to complete.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
1be1af78bf ci/virgl: Add timeout to software jobs
Let's make sure these don't get stuck. They're all good citizens and
turn around in 5min or less, so give them triple that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
3911cb85bf ci/llvmpipe: Add llvmpipe and lavapipe timeouts
These jobs all pretty comfortably complete in 5-7min. Add a timeout for
roughly double that to make sure that jobs don't get stuck.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
cab69e51f3 ci/softpipe: Add timeouts to softpipe jobs
Make sure we don't get stuck somewhere and fail merges.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
afee7921cb ci: Reduce build job timeouts
Most of our build jobs have had a timeout of 1 hour since 6425b6e3d4,
which pushed the timeout as high as possible to allow for LTO building
taking forever. Since then, we've pulled LTO back to only running on the
fedora-release nightly job.

This tries to bring us back to the ideal from 322a83f321, where the
build jobs all have very low timeouts both for the overall job as well
as the build section we run. So if anything goes wrong - apart from
fedora-release - we'll just assume the runner has some environmental
damage, give up, and try again.

Of the build-for-tests jobs, all but the ASan and UBSan jobs regularly
complete in around 5 minutes, apart from debian-testing which is our
critical-path build job for almost all x86-64 testing. This is obviously
not good, but is tracked in mesa#12544.

The build-only jobs not using sanitizers also typically complete in
3-4 minutes, with the exception of debian-clang-release and
debian-x86_32 which are closer to 10 minutes. That's not ideal, but
they're also not currently on the critical path, so we can live with
that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
c793f612fc ci/panfrost: Split inherit definitions into -inc
Follow what everyone else did to have gitlab-ci.yml for concrete job
definitions, and gitlab-ci-inc.yml for things which get inherited.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
777dfb4062 ci/windows: Don't copy non-existent libglapi.dll
It was removed with 44bda7c258.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:01 +00:00
Daniel Stone
a9f87ff0bd ci/amd: Disable radv-fossils
This job is currently broken due to the lack of git in the Vulkan
container; it should really be pulling the fossils from S3 like the
traces anyway.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34280>
2025-04-01 12:21:00 +00:00
Robert Mader
c0ec35bb42 gallivm: Re-add check for passmgr before disposing it
In can be NULL, but on LLVM >= 15 lp_passmgr_dispose() is
a no-op.

Fixes: 47cd0eee26 (gallivm: create a pass manager wrapper.)

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34312>
2025-04-01 11:37:15 +00:00
Lucas Stach
d738b3ea2b etnaviv: split PIPE_BUFFER resources from other types of resources
Buffer resources are quite special as they are only one dimensional,
always linear, don't have miplevels or array slices, never have a
texture or render compatible sibling, don't ever use TS.

The gallium context interface acknowledges this fact by providing
separate entry points for buffer maps/unmaps/flushes.

Provide a specialized etna_buffer_resource as a much more lightweight
alternative to the fullblown etna_resource and implement buffer
maps/unmaps in the same straight forward, direct map manner that is
hidden inside all the tiling, TS and resource sibling handling in
etna_transfer_map/unmap. It is expected that further map optimizations
can be added on top of this simple implementation much more easily
than in the merged buffer/texture transfer code.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34061>
2025-04-01 10:09:28 +00:00
Lucas Stach
d46a8c32b5 etnaviv: use pipe_resource in etna_resource_status
This aligns the prototype with etna_resource_used and allows to
track different resource specializations in the same datastructure.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34061>
2025-04-01 10:09:28 +00:00
Rebecca Mckeever
69a08fd9b2 panvk: Support shaderImageGatherExtended
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34033>
2025-04-01 08:04:32 +00:00
Rebecca Mckeever
f450807b68 panvk: Remove lower_tg4_broadcom_swizzle from panvk_preprocess_nir()
We are already applying the .bagr swizzle in bifrost_preprocess_nir(), so
remove lower_tg4_broadcom_swizzle from nir_lower_tex_options in
panvk_preprocess_nir to avoid applying the swizzle twice.

Fixes: 4050697a8f ("panvk: So more nir_lower_tex before descriptor lowering")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34033>
2025-04-01 08:04:32 +00:00
Marek Olšák
5e02621a8a amd/addrlib: remove the DCC page fault workaround
It doesn't cause page faults anymore.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34099>
2025-04-01 03:23:22 -04:00
Marek Olšák
f0e6d86f4e amd: update addrlib
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34099>
2025-04-01 03:23:22 -04:00
Samuel Pitoiset
902c76b3be radv/ci: remove all skips for STONEY
Seems fine too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34301>
2025-04-01 06:58:50 +00:00
Samuel Pitoiset
cb1144145a radv/ci: stop skipping one memory test due to timeouts
It seems fine now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34301>
2025-04-01 06:58:50 +00:00
Samuel Pitoiset
71b49aecdc radv: switch back radeon_cmdbuf to use 32-bit counters
This has been tested again with vkoverhead on 4 different CPUs and
using 32-bit counters is the fastest combination overall.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34229>
2025-04-01 06:18:28 +00:00
Samuel Pitoiset
f0b3a6f9d4 radv: rework command buffer emission with begin/end sequences
A begin/end sequence is something like (it's all macros based):

   radeon_begin(cs);
   radeon_emit(PKT3(PKT3_DRAW_INDEX_AUTO, 1, cmd_buffer->state.predicating));
   radeon_emit(vertex_count);
   radeon_emit(V_0287F0_DI_SRC_SEL_AUTO_INDEX | use_opaque);
   radeon_end();

This is loosely based on RadeonSI (see !8653 (a0978fff)) and it seems
indeed faster overall.

The main goal of this rework is to re-use the same logic as RadeonSI
for paired packets on GFX12 (also GFX11 dGPUs) because it's supposed
to be way faster, especially on GFX12 where the CP is slow. The other
goal is to share more cmdbuf emission between both drivers in the near
future.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34229>
2025-04-01 06:18:28 +00:00
Jordan Justen
d3ec467031 intel/dev: Add BMG 0xe211 PCI ID
Backport-to: 25.0
Ref: bspec 68090
Ref: https://patchwork.freedesktop.org/series/146769/
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34249>
2025-04-01 04:11:07 +00:00
Faith Ekstrand
e612e840d2 nak: Use is_volta() instead of sm == 70
This is a bug fix but Volta is currently disabled by default and it only
affects fp64 and fp16.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
77eb070465 nak: Add GPU generation helpers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
e2fccc1488 nak: Move sched_common.rs to reg_tracker.rs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
24a8795946 nak: Move latency information into the per-SM files
This is probably a little more code but we're about to add real data for
Turing+ so it's better to have things contained like this.  Since Volta
and earlier will always remain hacks, we might as well have those hacks
in the per-SM files rather than pretending we have a general thing in
sched_common.rs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
64ff3e8cb8 nak: Move exec_latency into the per-SM files
It's split cleanly along the SM70 boundary anyway so there's no code
duplication happening here.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
ae842b5fe1 nak: Move SM70 encoding and legalize to a separate file
We're about to add instruction latencies which are going to be in their
own files because they're also massive.  This makes things follow a bit
more of a module structure where sm70.rs is the thing that ties it all
together, sm70_encode.rs is the encoder, and smXX_instr_latencies.rs
will be the individual latency files.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
8e2e1e43fa nak: Add latency helpers to ShaderModel and use them
For now, these all just call into sched_common.rs but this gives us the
interface we really want going forward.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
3112fbcc56 nak: Add and use a ShaderModel::needs_scoreboard() helper
For now, this is just !Op::has_fixed_latency() but this is actually the
question the scheduling code is asking.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Faith Ekstrand
d134379631 nak: Move has_fixed_latency to Op
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34302>
2025-04-01 00:01:05 +00:00
Dave Airlie
5d6d167a7c gallivm: check for avx512vbmi and tell LLVM the correct answer.
There are some CPUs out there which don't have vbmi and do have
other avx512 and mesa crashes on those with illegal instructions.

This was reported to Red Hat support.

Cc: mesa-stable
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34282>
2025-03-31 21:46:45 +00:00
Lionel Landwerlin
4ac900b5bf anv/genxml: use special genX video pack files
Before:

   30453 ./build/src/intel/genxml/gen125_pack.h

After:

   17026 ./build/src/intel/genxml/gen125_pack.h
   21589 ./build/src/intel/genxml/gen125_video_pack.h

The idea is to have fewer line to parse in each genX_*.c file.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:56 +03:00
Lionel Landwerlin
4fdf5618f9 intel/genxml: add MI_FLUSH_DW to blitter engine
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:53 +03:00
Lionel Landwerlin
79a463e40b intel/genxml: define post-sync operations for MI_FLUSH_DW
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:50 +03:00
Lionel Landwerlin
d4899b0486 intel/genxml: fixup engine filtering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:47 +03:00
Lionel Landwerlin
04b6eeba63 intel/genxml: add more engine tagging on instructions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:42 +03:00
Lionel Landwerlin
891965a471 intel/genxml: remove ISA fields
Those are for the compiler afaict.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34276>
2025-04-01 00:03:07 +03:00
Caio Oliveira
71ae31dbd8 intel/executor: Allow selecting a device to use
Add a command line option `-d DEVICE` to select
a device either by index or by substring of the
name.

Use `-d list` to print available devices.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34267>
2025-03-31 19:20:10 +00:00
Caio Oliveira
9b2b3255e1 intel/executor: Use getopt for command line arguments
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34267>
2025-03-31 19:20:10 +00:00
Patrick Lerda
1db8825597 radeonsi: fix clear_depth_stencil refcnt imbalance
After ca09c173f6, util_blitter_clear_render_target() requires
a call to util_blitter_save_fragment_constant_buffer_slot().
The radeonsi implementation was using the same sequence with
util_blitter_clear_depth_stencil() which does not need this
call. This was the cause of the refcnt imbalance.

For instance, this issue is triggered with:
"piglit/bin/ext_clear_texture-stencil -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: ca09c173f6 ("gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34291>
2025-03-31 18:42:38 +00:00
Christian Gmeiner
042138093f etnaviv: Add multi-planar YUV support
This enables support for NV12, which are really useful when
dealing with hardware video decoders. This patch makes use
of the integrated YUV tiler to convert multi-planar to YUYV.
The binary blob uses the same method to deal with multi-planar
YUV formats. Other formarts will be added in a follow-up patch.

Tested with kmscube (nv12-1img) and the following gstreamer pipeline:

gst-launch-1.0 filesrc location=/tmp/test.mp4 ! qtdemux ! v4l2slh264dec ! video/x-raw,format=NV12 ! glimagesink

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Peter Frühberger
Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3418>
2025-03-31 17:41:04 +00:00
Christian Gmeiner
58f8143da3 mesa/formats: Add MESA_FORMAT_NV12
Needed for st_pipe_format_to_mesa_format() be able to handle the NV12
format directly.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3418>
2025-03-31 17:41:04 +00:00
irql-notlessorequal
5d6b6c376f hasvk: Advertise VK_KHR_maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
b1fe67f118 hasvk: Implement VK calls and formats.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
f08c87e2b0 hasvk: Implement VkPipelineCreateFlags2KHR support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
0d6d23a54f hasvk: Pre-plumbing needed for VK_KHR_maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
255166a349 elk: always write the VUE header
ELK equivalent of !34211, also required to avoid potential rendering errors with hasvk.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
irql-notlessorequal
fe7e0fd4f1 elk: ensure VUE header writes in HS/DS/GS stages
ELK equivalent of !34041, required to avoid potential rendering errors with VK_KHR_maintenance5

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34298>
2025-03-31 16:56:13 +00:00
GKraats
865a43ab4e x11: give error messages if Xorg only supports DRI2 and mesa only DRI3
By default mesa now only supports DRI3.

If Xorg is not activating DRI3, it will show an almost empty screen, which is not working.
No error message is given.
This e.g. happens at  Debian package
xserver-xorg-video-intel at the i915 gallium driver.

This commit generates error messages to explain the problem.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33679>
2025-03-31 16:22:41 +00:00
Pierre-Eric Pelloux-Prayer
7e2c3be454 radeonsi: use composed swizzle in cdna_emu_make_image_descriptor
Otherwise the state swizzle is ignored.

Fixes: 139bc6b813 ("radeonsi: use common build buffer descriptor helpers")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
2025-03-31 15:19:30 +02:00
Pierre-Eric Pelloux-Prayer
a4105365e4 radeonsi/video: require has_image_opcodes for full modifier support
If has_image_opcodes is false, then DRM_FORMAT_MOD_LINEAR is the only
possible option.

Fixes: 7f7206f1a9 ("radeonsi/video: Allocate video buffers with modifiers")
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
2025-03-31 15:19:30 +02:00
Pierre-Eric Pelloux-Prayer
785df1b980 ac/nir: fix nir_metadata value of ac_nir_lower_image_opcodes
This pass can insert new blocks so 'nir_metadata_control_flow' is not
preserved.

Fixes: eaf98b1422 ("ac/nir: implement image opcode emulation for CDNA, enable it in radeonsi")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
2025-03-31 15:19:29 +02:00
Samuel Pitoiset
97e8872f1c radv: only enable HTILE for depth/stencil attachment images
It's really only useful for depth/stencil attachments. vkd3d and DXVK
both always use that usage flag for depth/stencil images.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Samuel Pitoiset
ba9988d230 radv: remove useless use of radv_image_use_comp_to_single()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Samuel Pitoiset
5398ec6356 radv: add queue family assertions when doing decompression passes
This is to make sure the previous functions that are supposed to
trigger a decompression pass work as expected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Samuel Pitoiset
086f529bbe radv: do not trigger FCE or FMASK decompress on compute queue
A pipeline barrier which contains an image layout transition like
COLOR_ATTACHMENT_OPTIMAL -> TRANSFER_DST_OPTIMAL on compute queue
would just hang. Such a barrier is useless in practice but it's legal.

Prevent GPU hangs by skipping FCE or FMASK_DECOMPRESS when it's not
on the graphics queue.

Fixes dEQP-VK.synchronization2.layout_transition.compute_transition*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
2025-03-31 11:55:02 +00:00
Danylo Piliaiev
be481e6615 tu: Disable FS in certain cases even if FS is not empty
If FS doesn't have side-effects and color write mask is zero.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
71238fb4d8 ir3: Detect FS that write only color without other side effects
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
ace933455c tu/a7xx: Bypass invoking empty FS for D/S-only draw calls
It is important to get D/S only draw calls to bypass invoking
the fragment shader. The public documentation for Adreno states:
  "Hint the driver to engage Fast-Z by using an empty fragment
   shader and disabling frame buffer write masks for renderpasses
   that modify Z values only."
  "The GPU has a special mode that writes Z-only pixels at twice
   the normal rate."

We are promised a big performance improvement in this case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
b0a98d3b13 ir3: Detect empty fragment shaders
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Danylo Piliaiev
3d76f307b6 freedreno/regs: Rename BINNING bit to FS_DISABLE in a few regs
In most cases it is used in binning, but it is also used when
FS is empty in order to signal that FS shouldn't be invoked.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33735>
2025-03-31 12:15:56 +02:00
Erik Faye-Lund
aa8fec638f panvk: add basic driconf infrastructure
This hooks up some driconfs for WSI, as well as the force_vk_vendor
DRIconf. Nothing panvk specific for now.

Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33895>
2025-03-31 09:24:04 +00:00
Erik Faye-Lund
4fabd37a3c panvk: enable KHR_line_rasterization support
This allows users to toggle between rectangular and bresenham style
rasterization.

The bresenham style rasterization is performed by disabling
multisampling and changing the end-points to be axis-aligned. This is
similar to what we already do in Gallium.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33844>
2025-03-31 09:03:05 +00:00
Georg Lehmann
de45676efd aco/insert_exec: reset exec temporary after combined p_demote + p_end_wqm
Otherwise the next divergent merge block might re-enable demoted invocations.

Fixes: 90faadae72 ("aco/insert_exec_mask: don't disable dead quads on demote in divergent CF")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12898
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12912
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34278>
2025-03-31 06:43:22 +00:00
Hyunjun Ko
ae75376c8f anv: Move rateControlMode to the video session.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34250>
2025-03-31 04:25:14 +00:00
Trigger Huang
f03b385d4b radeonsi: Fix perfcounter start event in si_pc_emit_start
The original typo caused performance counters to send STOP events
instead of START, leading to incorrect profiling data.

Fixes: 1a1138817c ("radeonsi: add a new PM4 helper radeon_event_write")

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34236>
2025-03-31 02:36:48 +00:00
Faith Ekstrand
59b01dc764 nvk: Disable 32k images on Pascal A
While we're here, add a comment about why we have this restriction in
the first place since NVK and the proprietary driver are different here.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
2025-03-30 20:29:13 -05:00
Faith Ekstrand
65d06d91ca nvk: Use max_image_dimension for maxFramebufferWidth/Height
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
2025-03-30 20:29:07 -05:00
Faith Ekstrand
c1674d4dfe nvk: Disable vulkanMemoryModel on Kepler and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
2025-03-30 20:16:25 -05:00
Marek Olšák
b74a6e05bd glapi: fix x86 32-bit asm dispatch regression
shared_glapi_mapi_tmp.h must be included before asm("x86_entry_end:").

Fixes: fae087770a - glapi: simplify codegen macros
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34269>
2025-03-29 22:36:21 +00:00
Eric Engestrom
359f69ba0c ci: add FDO_RUNNER_JOB_PRIORITY_TAG_* to control priority of generic freedesktop runners
This affects:
- generic jobs (sanity, rustfmt, shader-db, docs, etc.)
- linux image builds
- linux mesa builds
- software renderer tests
- android tests
- virgl & venus tests

Marge pipelines get high priority, nightly pipelines get low priority,
and everything else is in between.

(Hardware test farms have their own mechanisms.)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
88f70e48f5 ci: move android's kvm requirement to .use-debian/x86_64_test-android
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
e45f2e6c46 ci: move aarch64 tag to .use-debian/arm64_build
Like we do in the other `.use-debian/arm64_*`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34264>
2025-03-29 18:17:24 +01:00
Eric Engestrom
76a6ce40e1 ci: drop packet.net tag on git archive job
We are no longer on that infrastructure, and we no longer need to
specify which one we are on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34271>
2025-03-29 10:38:03 +00:00
Aaron Ruby
d64df991bb gbm/dri: Match zink autoloading from egl
Essentially, match the Zink autoloading order that was implemented as
part of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25640

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34163>
2025-03-29 09:18:47 +00:00
Mike Blumenkrantz
49aec32f57 zink: block inferred loading for swrast
this should always load llvmpipe

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34163>
2025-03-29 09:18:47 +00:00
Aaron Ruby
9ee435f92a egl: Remove FallbackZink config item entirely
Its effect was negated as part of: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29771

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34163>
2025-03-29 09:18:47 +00:00
David Rosca
f9d7d131a4 ac/parse_ib: Parse VCN DYNAMIC_REFLIST_BUFFER
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34262>
2025-03-29 08:50:49 +00:00
David Rosca
5275a88174 ac/parse_ib: Fix parsing output format on VCN5
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34262>
2025-03-29 08:50:49 +00:00
Faith Ekstrand
8d45d3bc3d nak: Disable lea64 and f2fp.pack_ab tests pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34129>
2025-03-29 04:33:10 +00:00
Faith Ekstrand
bb43c665dc nak: Add a QMD heap to hw_runner
This is needed prior to Maxwell B to avoid SKED cache issues.

Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34129>
2025-03-29 04:33:10 +00:00
Faith Ekstrand
d8fef0a26c nak: Improve WS abstractions in hw_runner
Reviewed-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34129>
2025-03-29 04:33:10 +00:00
Mel Henning
c1d64053f2 nak: Assert instr_sched matches calc_instr_deps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:05 +00:00
Mel Henning
562504f47c nak: Calc static cycle count in instr_sched
This changes the static cycle count estimate so that it takes into
account estimated variable latency instruction delays. Statistics from
before this commit are not comparable to statistics generated after
this commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:05 +00:00
Mel Henning
79d0f8263d nak: Add a simple postpass instruction scheduler
To get us started, this is designed to be pretty much the simplest thing
possible. It runs post-RA so we don't need to worry about hurting
occupancy and it uses the classic textbook algorithm for local (single
block) scheduling with the usual latency-weighted-depth heuristic.

-14.22% static cycle count on shaderdb

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:05 +00:00
Faith Ekstrand
d06d76a0d4 nak: Box our RegTrackers
RegTracker<T> contains over 300 copies of T.  It's probably best not to
put that on the stack.  We can probably get away with it on Linux but
Windows has small stacks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:04 +00:00
Faith Ekstrand
e9ff848095 nak: Move some calc_instr_deps items to a new file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32311>
2025-03-29 04:05:04 +00:00
Lorenzo Rossi
0ba5d99a61 nak: Simplify shl64 lowering on Maxwell
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34137>
2025-03-29 03:45:49 +00:00
Lorenzo Rossi
139a9ea526 nak: Fix SM50 rounding-mode encoding edge-case
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34137>
2025-03-29 03:45:49 +00:00
Faith Ekstrand
a3935c7aa2 nak,nir: Generalize nak_nir_split_64bit_conversions and move it to NIR
This pass was originally based on a similar pass from Intel but it's
grown support for some fancy stuff like fp64 -> fp16 conversion
splitting with proper rounding.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
2d75e7dced nak/nir: Use correct rounding for fp64 -> fp16 conversions
For up, down, and round towards zero, the rounding accumulates properly
as long as you use the same rounding mode for both.  For RTNE, however,
we need to insert a two-instruction fixup in order to guarantee correct
rounding.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
d826f82ffe nak: Implement nir_intrinsic_convert_alu_types
We can't support every single form of this instruction but at least it's
plumbed through now.  Before this will be OpenCL-ready, we'll need to
call the NIR lowering pass with an appropriate predicate function.
However, for now it lets us use it in NAK-specific NIR lowerings.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
c05565ce7b compiler/rust: Add more NIR intrinsic getters
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Faith Ekstrand
1355c71943 compiler/rust: Add a nir_alu_type wrapper
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
2025-03-29 03:02:17 +00:00
Lionel Landwerlin
47cfc77085 anv: expose VK_KHR_maintenance8 support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:19 +00:00
Lionel Landwerlin
7fca7cc721 anv: wire VkAccessFlagBits3KHR flags in internal helpers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
23de5abcb5 anv: enable non uniform texture offset lowering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
4346210ae6 brw: move texture offset packing to NIR
That way we can deal with upcoming non constant values for
VK_KHR_maintenance8.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
67ae49dede intel: move lower_texture to brw
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
86773b2ba6 brw: don't lower tg4 offsets without LOD
The problem this fixes is currently hidden because of the order in
which we run nir_lower_tex & intel_nir_lower_texture. The issue is
that nir_lower_tex removes the LOD source in some cases and the second
run of nir_lower_tex can add it back.

This is also only needed on Gfx12.5+ if the LOD is present.

Finally move all of the texture lowering to the postprocess phase. No
need to run this multiple times.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
b87dccc64c elk: stop using intel_nir_lower_texture
It's not doing anything.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Lionel Landwerlin
772beb0ebf nir: add support for lowering non uniform texture offsets
Intel HW only has support for non-uniform offsets for TG4 operations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33138>
2025-03-29 02:15:18 +00:00
Timur Kristóf
64c6930bfc ac/nir/ngg: Remove cleanup_culling_shader_after_dce.
Not needed anymore, now that the new concept is there.

No Fossil DB changes on Navi 21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
243a80be44 ac/nir/ngg: Use deferred info for compacted arguments.
This means we don't have to emit dead code anymore and can only
repack the sysvals that are actually used by the deferred part.

No Fossil DB changes on Navi 21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
0b71293358 ac/nir/ngg: Gather info about what the deferred shader part uses.
Now that the deferred shader part is prepared before emitting
the non-deferred part, we can also gather info about what sysvals
it needs.

No Fossil DB changes on Navi 21.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
e4c91c01e3 ac/nir/ngg: Prepare deferred shader part before adding culling code.
The previous concept was to emit the non-deferred shader part
first, including the culling code, and then modify the
non-deferred part accordingly.

This caused some issues because it was really impossible to tell
which sysvals the deferred part needs after DCE, so we had to
run an additional cleanup pass afterwards.

The new concept is to prepare the deferred part first by applying
reusable variables (from the non-deferred part) and run DCE.
This opens the possibility to accurately gather info about what
the deferred part needs.

This idea is further expanded in the next commits.

Fossil DB stats on Navi 21:

Totals from 17 (0.02% of 79377) affected shaders:
Instrs: 18063 -> 18064 (+0.01%)
CodeSize: 93368 -> 93372 (+0.00%)
Latency: 49889 -> 49899 (+0.02%); split: -0.01%, +0.03%
SALU: 2416 -> 2417 (+0.04%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
e9e58fa412 ac/nir/ngg: Remove inputs_needed_by_*
This information will be collected by NIR core better,
no need to do it here. It is also currently unused.

No functional changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
1e7d28a82e ac/nir/ngg: Improve reuse of position value.
Instead of hand-rolled code, use nir_scalar and its
helper functions to reuse the position value.
Results in more copies, which are mitigated by
copy prop from the previous commit.

This helps eliminate some instructions, especially VMEM loads
from the deferred shader part of NGG culling shaders, which
can be reused from the position values calculated by the
non-deferred part.

Fossil DB stats on Navi 21:

Totals from 2472 (3.11% of 79377) affected shaders:
MaxWaves: 78748 -> 78772 (+0.03%)
Instrs: 636342 -> 633739 (-0.41%); split: -0.45%, +0.04%
CodeSize: 3444740 -> 3427172 (-0.51%); split: -0.53%, +0.02%
VGPRs: 62552 -> 62176 (-0.60%)
Latency: 2025711 -> 2019449 (-0.31%); split: -0.73%, +0.42%
InvThroughput: 221140 -> 221946 (+0.36%); split: -0.12%, +0.49%
VClause: 5443 -> 5278 (-3.03%); split: -3.20%, +0.17%
SClause: 8369 -> 8302 (-0.80%); split: -0.82%, +0.02%
Copies: 102435 -> 101652 (-0.76%); split: -0.87%, +0.11%
PreSGPRs: 63714 -> 63533 (-0.28%)
PreVGPRs: 48555 -> 48392 (-0.34%)
VALU: 242165 -> 241457 (-0.29%); split: -0.33%, +0.04%
SALU: 197656 -> 197482 (-0.09%); split: -0.10%, +0.01%
VMEM: 7746 -> 7571 (-2.26%)
SMEM: 10822 -> 10730 (-0.85%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Timur Kristóf
f7a160d501 ac/nir/ngg: Run copy propagation.
Helps eliminate needless copies caused by reusing variables.
Mitigates negative stats from the next commit.

Fossil DB stats on Navi 21:

Totals from 109 (0.14% of 79377) affected shaders:
Instrs: 124480 -> 124486 (+0.00%); split: -0.00%, +0.01%
CodeSize: 651444 -> 651468 (+0.00%); split: -0.00%, +0.00%
Latency: 754120 -> 754116 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 174384 -> 174383 (-0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22073>
2025-03-29 00:47:20 +00:00
Caio Oliveira
63224f64cc brw: Remove adjust_block_ips and brw_inst::remove() with defer
Now that the brw_ip_ranges analysis is being used, there's no
need to track start_ip/end_ips in the blocks as they are mutate.  And
also no need to call adjust_block_ips at the end of some passes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:51 +00:00
Caio Oliveira
8057cfc49d brw: Use brw_ip_ranges in liveness analysis
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:51 +00:00
Caio Oliveira
a6b0783375 brw: Use brw_ip_ranges in scheduling / regalloc
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:51 +00:00
Caio Oliveira
3659d36087 brw: Use brw_ip_ranges in passes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
10660f5adf brw: Add analysis for block IP ranges
Calculate the IP ranges of the shader as an analysis pass.  This will
later replace the existing tracking of start_ip/end_ip as the blocks are
changed (and the defer/adjust scheme to avoid too much churn when that
happen).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
fd6045cca9 brw: Track total_instructions in a shader
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
7224b653b5 brw: Use block's num_instructions in scoreboard tests
Stop using the start_ip / end_ip, these are not really important for
those tests.  What the test care was the number of instructions in the
block to check for changes and ensure we can peek at them by index.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
1139ede508 brw: Track num_instructions in a block
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
abe8d35cb8 brw: Remove brw_cfg::dump()
It was used by the pass tests to verify output with TEST_DEBUG=1,
replace it with brw_print_instructions().

The output is slightly different (not printing IP, not reordering the
blocks), we can add those features as we need, but given the usage was
already very reduced, don't bother with that until need arises.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Faith Ekstrand
e980123293 venus: Set wsi_device::supports_scanout = false
This will cause venus to take the prime blit path if modifiers are not
supported.  This has been an outstanding TODO in venus for a while.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
11ba89097f venus: Only claim modifiers in WSI if the host driver supports it
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
de7cae705d venus: Don't report global priorities if globalPriorityQuery is unsupported
Drivers are expected to ignore unknown structs in pNext chains.  Venus
is a bit weird because we advertise features based on the host driver
and so we have code for all sorts of things which may not be supported
by the host driver.  When globalPriorityQuery is unsupported, we
shouldn't even attempt to return anything.  Currently, we just crash in
this case because vn_physical_device::global_priority_properties is an
uninitialized pointer.  While we're here, initialize it to NULL if it's
invalid.

Fixes: e488b5e45e ("venus: support VK_KHR_global_priority")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
e7bb6df7cb venus: Assume wsi_mem->base_bo != NULL
Now that the WSI code is signaling the correct BO, we don't need this
workaround in venus.

Fixes: a315a64291 ("venus: relax 2 assertions for prime blit path")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
cf23ffcbae vulkan/wsi: Signal buffer memory object when blitting
When we're using the PRIME path and using vkCmdCopyImageToBuffer to copy
to a linear image, the buffer memory is what's shared with the window
system.  For legacy drivers that depend on memory signaling via
wsi_memory_signal_submit_info, we need to tell the driver to signal the
buffer memory, not the image memory or else the window system may wait
on a driver-internal buffer and not wait for the copy to complete.

Cc: mesa-stable
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Natalie Vock
8b0271050a vulkan/bvh: Move first PLOC task_count fetch inside PHASE
Otherwise, the memory fetch is not protected by the global sync and
memory barriers and there is a chance to read a stale (or just wrong)
task count.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
2025-03-28 23:07:17 +00:00
Natalie Vock
c1e1d86bd1 radv/rt: Flush CP writes from the common BVH framework with INV_L2 on GFX12
a1b05991 ("radv/rt: Flush L2 after writing internal node offset on GFX12")
did this for radv-internal CP writes - we also need to do this for PLOC
sync data initialization which is done in the common framework.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
2025-03-28 23:07:17 +00:00
David Rosca
51292976fe frontends/va: Don't ignore rotation and mirror for conversions to RGB
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
David Rosca
962c33cbca gallium/vl: Fix mirror with rotation for compute shaders
The mirror needs to be reversed because the rotation is applied
before the mirroring.

VAAPI docs:
  Mirroring of an image can be performed either along the
  horizontal or vertical axis. It is assumed that the rotation
  operation is always performed before the mirroring operation.

Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
David Rosca
c8a2f0b248 gallium/vl: Fix rotation with scaling for compute shaders
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
Robert Mader
2034c901cc llvmpipe: Free dummy_dmabuf on shutdown
In order to stop ASAN from complaining.

Fixes: d21aa86b54 ("llvmpipe: Implement EGL_ANDROID_native_fence_sync")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34258>
2025-03-28 22:01:29 +00:00
Dave Airlie
737d66379d anv: expose VK_KHR_video_maintenance2
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
dc8e21ce60 radv: expose VK_KHR_video_mainteance2
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
5d61e05e6c vulkan/video: add support for inline session paramters.
This is part of VK_KHR_video_maintenance2

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
af560cd680 anv/video: don't write to params if not set.
This should probably be done different, params should probably be considered immutable,
and this should be moved into the command buffer, also this gets set on decode paths as well
which might not make sense.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
e4981731be anv/video: convert to common parameters retrieval code
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
feef12b2a8 radv/video: convert to using common parameter wrappers.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
03f8425fd4 vulkan/video: add simple parameter retrieval wrappers
These are simple now but maintenance2 adds inline parameter sets,
so I will use them more then.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Samuel Pitoiset
a7d8e5d4ca ac,radv,radeonsi: use PM4 for shadowed registers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34228>
2025-03-28 20:50:22 +00:00
David Rosca
1ba427c4fb radeonsi/video: Allow DCC 256B block size with drm minor >= 63
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34148>
2025-03-28 20:26:39 +00:00
David Rosca
a2b4617c00 radeonsi/vce: Support old VCE firmware
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12866
Fixes: 104f9c6654 ("radeonsi/vce: Remove support for FW 50 and older")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34152>
2025-03-28 20:03:27 +00:00
Samuel Pitoiset
250742519f radv: disable TC-compatible CMASK with {FMASK,DCC}_DECOMPRESS
Because if FMASK_COMPRESS_1FRAG_ONLY is set, the FMASK decompress
operation actually doesn't occur. Note that DCC_DECOMPRESS implicitly
decompresses FMASK.

This fixes an issue on GFX10-GFX10.3 which is uncovered by enabling
VK_EXT_sample_locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
8c96b9e306 radv: make sure to always decompress FMASK before expanding it
This is actually required even for TC-compatible CMASK images.

VKCTS coverage is missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
42b0df447c radv: inline radv_fast_clear_flush_image_inplace()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
09d91837e4 radv: rework radv_handle_color_image_transition()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
7bb3a2363d radv: add radv_fmask_color_expand()
Similar to radv_fmask_decompress()/radv_fast_clear_eliminate() helpers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Samuel Pitoiset
aaf634cc24 radv: rework radv_fast_clear_flush_image_inplace()
FMASK_DECOMPRESS also implies FAST_CLEAR_ELIMINATE, so it can run first.
The only exception is fast-clear for color images that have DCC and
FMASK but without comp-to-single (only GFX10) because FMASK_DECOMPRESS
can't eliminate DCC fast-clears.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Samuel Pitoiset
a452098791 radv: skip FCE for comp-to-single fast clears with DCC MSAA
comp-to-single supports MSAA since a while and it's useless to perform
a fast clear eliminate for these fast color clears.

Only GFX10-GFX10.3 are affected because these are the only GPUs that
support DCC with MSAA with FMASK.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Michael Cheng
169e7acee1 vulkan: add leaves and ir_leaves sizes to encode for utrace.
Expose number of leaves and ir_leaves to the debug marker for encode.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34200>
2025-03-28 18:25:40 +00:00
Antonio Ospite
36aa0bd964 ci/android: strip the artifacts of the debian-android job
The libraries built in the `debian-android` job are not stripped because
the job defines `ARTIFACTS_DEBUG_SYMBOLS: 1`.

However this is not strictly necessary for testing purposes, so stop
defining `ARTIFACTS_DEBUG_SYMBOLS` to reduce the size of the artifacts.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12879
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34234>
2025-03-28 16:35:43 +00:00
Antonio Ospite
ac33831ba4 ci/android: only ship x86_64 artifacts in debian-android build job
Mesa is built twice in the same debian-android job, once for aarch64 and
once for x86_64 to catch as many build regressions as possible.

However the install dir used for the two builds is the same, and this
results in a mix of aarch64 and x86_64 artifacts ending up in
install.tar, because .gitlab-ci/prepare-artifacts.sh is called at the
end of the second build.

Having two separate jobs for aarch64 and x86_64 build would be cleaner
but it would also use more resources.

Since the aarch64 libraries are not used for anything for now, a cheaper
workaround is to build x86_64 first and just call prepare-artifacts.sh
after first build.

This way the aarch64 build will still be done to catch regressions, but
the artifacts won't end up in install.tar which is also more consistent
with the fact that S3_ARTIFACT_NAME only has x86_64 in the name
(mesa-x86_64-android-${BUILDTYPE}).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34234>
2025-03-28 16:35:43 +00:00
Daniel Stone
e3433489f8 ci: Move softpipe issue from fail to flake
Seems to be caused by environmental differences between runners. Keep it
as a flake until Piglit gets properly fixed.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
51c67ad7cf brw: Avoid regioning restrictions for u2u16/i2i16 narrowing conversions
Cuts 0.83% of instructions on Alchemist in affected fossil-db shaders
(nearly all of which are in parallel-rdp).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
86f8b8860e brw: Use a smaller type for masked sub-32-bit shift values
Cuts 0.14% of instructions on Alchemist in affected fossil-db shaders
(all of which are in parallel-rdp).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
2e108afb8c brw: Skip unnecessary UNDEFs for comparisons
For example, SIMD16 W/UW fills an entire REG_SIZE so UNDEF isn't needed.

No change in fossil-db.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
771e65b0db brw: Emit UNDEF as needed in SSA-style builder helpers
Should prevent regressions in a future commit.
fossil-db does show small changes, but it ends up a wash at 0.0%.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
b89e269a46 brw: Make a helper to emit UNDEF for temporaries containing small types
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Eric Engestrom
1b0a358db2 ci: bump apitrace version
This includes the fixes discovered in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30417#note_2810243

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Daniel Stone
f6f085f50a ci: Re-enable trace jobs with updated Piglit
mesa/piglit!996 fixed up Piglit to allow us to do trace downloads again,
so we can now bring these jobs back. The fdno trace jobs hosted at
Google are still disabled whilst we try to fix their nginx.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Daniel Stone
5a2a0ca3c9 ci: Add daniels to restricted-trace users
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Mike Blumenkrantz
5d46e2bf3c zink: implement unsynchronized staging uploads for buffers
similar to images, this comes from unsynchronized texture_subdata
serialization in tc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34186>
2025-03-28 12:35:03 +00:00
Mike Blumenkrantz
c0b1a23e35 zink: block streaming cached uploads on unsynchronized/persistent maps
this is broken

Fixes: e63acdd2b7 ("zink: force cached mem for streaming uploads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34186>
2025-03-28 12:35:03 +00:00
Daniel Stone
d9dffd778a ci/zink: Flake out sparse tests
These were always-crash in CI, had a comment saying they passed locally,
and now seem to be passing in CI. Just hit it as flake until someone
actually looks into it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Daniel Stone
c8c427fb3d ci/amd: Add new radeonsi fail seen in the wild
Unsure how this slipped in, but it sure is failing consistently.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Daniel Stone
9d94e1ed0d etnaviv: Add missing build dependency on generated header
bindings.h pulls in enums.h, so anything using it needs to depend on
enums.h to avoid spurious build failures.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Connor Abbott
8864ee7b0f tu: Fix reported FDM fragment size with multiview
We were never setting has_multiview. It's not actually necessary anyway,
since we can just do the optimization we were trying to do whenever
num_views is 1 instead.

This doesn't affect the actual fragment size, which was already correct,
only gl_FragSizeEXT.

Fixes: 6f2be52487 ("tu, ir3: Handle FDM shader builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
2025-03-28 11:35:22 +00:00
Connor Abbott
122f2c422a tu: Fix size of frag_size_ir3 and frag_offset_ir3 driver params
They are an array, so we have to reserve extra space for extra views.
This bug was being masked by the bug fixed in the next commit.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
2025-03-28 11:35:22 +00:00
Connor Abbott
9775b33d0f tu: Enable GMEM with layered rendering
We accidentally forgot to enable it earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
2025-03-28 11:07:38 +00:00
Connor Abbott
6cadc1baea tu: Fix GMEM offset for multisample layered separate stencil
Fixes a bug uncovered by CTS when enabling GMEM with layered rendering.

Fixes: def56b531c ("tu: Support GMEM with layered rendering and multiview")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
2025-03-28 11:07:38 +00:00
Connor Abbott
b1dcc9a1d7 tu: Fix binning_possible detection with bin merging
When bin merging we maximize instead of minimize the VSC pipe size,
which means that we fail when there are too many pipes instead of when
the pipes are too large. This means that we need to calculate
binning_possible differently, and we need to skip
tu_tiling_config_update_pipes() when binning is impossible because
otherwise we will write out-of-bounds.

Fixes: 3fdaad0948 ("tu: Implement bin merging for fragment density map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34196>
2025-03-28 09:34:06 +00:00
Danylo Piliaiev
abba05e01e tu: Fix NULL deref in trace_end_render_pass
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34238>
2025-03-28 08:14:58 +00:00
Valentine Burley
684c7a61f4 ci: Disable the Google freedreno farm
After a configuration change gone wrong, the farm now returns Error 403.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34254>
2025-03-28 08:11:36 +00:00
Samuel Pitoiset
8032f628ad radv: add a helper to emit PM4 commands to a CS
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
498fc42fa9 radv: add a helper to emit a PKT3_COPY_DATA with an immediate
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
cd08da2f20 radv/video: slightly change radv_vcn_sq_header()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
a2b6b6f1f9 radv: add more helpers to start/stop perfcounters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
6d3ee9d8ad radv: use radv_cs_write_data_imm() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
7affd623c0 radv: slightly change the COND_EXEC for sampling performance counters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
8d12578989 radv: add a helper to emit SPM muxsel
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
f12bf800e3 radv: add a helper to emit indirect buffer for draws/dispatches
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
af5cde7107 radv: apply some cosmetic changes for future begin/end CS sequences
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Samuel Pitoiset
391da996ed radv: rework the shader pointer emit as macros
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34223>
2025-03-28 07:49:04 +00:00
Yiwei Zhang
9d0e7d8722 docs: update venus driver page
Most implementation defined behaviors have been properly defined via
new maintenance extensions, and the mapping support is the only one
left on the table...in a very unfortunate way for historical reasons.

Meanwhile, update the host driver list for the latest that has been
tested working. Two major KVM improvements have also been documented
along with the setups that rely on those.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34225>
2025-03-28 07:40:03 +00:00
Rohan Garg
c6757cb8f0 isl: enable CPB compression
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10760
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
5d2a6b23de anv: separate fast clear handling for compressed CPS
CPS surfaces are marked as stencil compressed internally and
should use the fast clear depth stencil path for clearing when possible

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
dadd84f5a8 anv: no need to handle transitions for CPB surfaces
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
80f9b61f02 anv: CPB surfaces that are used as color attachments or for stores cannot be compressed
This particular scenario indicates that the CPB will be written to using
a fragment shader, disable compression to ensure the correct data is
read back from the surface later.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
ceba312ebd anv,blorp,isl: handle compressed CPS surfaces through the depth stencil hw
Compressed CPS surfaces operations such as copies and clears need to be
handled through the depth stencil hw to ensure that the aux data is
handled correctly.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20741>
2025-03-28 04:38:09 +00:00
Rohan Garg
6f4c23100a anv: refactor add_aux_surface_if_supported to use a common variable
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20741>
2025-03-28 04:38:09 +00:00
Sagar Ghuge
191d1e7345 intel/compiler: Don't lower 64bit data memory access on LSC
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34189>
2025-03-28 03:07:56 +00:00
Jordan Justen
f73132f121 intel/dev: Ignore hwconfig difference due to WA 18040209780
Apparently hwconfig has not implemented this workaround.

This warning was noted on MTL and ADL.

> INTEL_HWCONFIG_TOTAL_GS_THREADS (336) != devinfo->max_gs_threads (312)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
2025-03-27 14:52:59 -07:00
Jordan Justen
cdf95273e1 tools/intel_dev_info: Print hwconfig discrepancies
Previously we were printing this information whenever the driver
started, but that proved to noisy.

For example, if running thousands of tests, this would cause thousands
of warnings messages to be printed. (Assuming the driver was built in
debug mode.)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
2025-03-27 14:52:54 -07:00
Jordan Justen
bc86fd5b1f intel/dev: Stop checking hwconfig values at driver runtime
We will move this check into the `intel_dev_info` tool. Unfortunately,
this means we will be much less likely to notice inconsistencies, but
the current strategy has proven to be far too noisy.

For example, if the driver was built in debug mode, then when test
suites are running thousands of tests, the current approach can lead
to thousands of messages being printed.

Closes: mesa/mesa#12141
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34243>
2025-03-27 14:52:49 -07:00
Daniel Stone
24c86ff345 ci/lava: Fail faster when getting results
Previously we'd burn 4 minutes waiting for curl to bang its head
trying to get results which would never emerge. Change this so we don't
fail on a 404, and also pull the retry down quicker, so we'll spend a
maximum of 2 minutes waiting for a server to come back, and no minutes
when the results aren't there to be fetched.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244>
2025-03-27 20:23:15 +00:00
Daniel Stone
f4de6f503f docs/ci: Fix nginx caching instructions
The new s3-proxy we have on fd.o is just a redirecting agent: it queries
the policy and, if allowed, returns a URL with temporary credentials
where the client can pull the real data from.

This means that nginx would see /fdo-opa/mesa-rootfs/misc?key=foo and
/fdo-opa/mesa-rootfs/misc?key=bar as distinct objects, not knowing that
it could cache only on the base URL.

Strip the query params from the nginx cache key so we can actually do
caching.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244>
2025-03-27 20:23:15 +00:00
Daniel Stone
df97f243e6 ci: Re-enable Collabora CI
Now that all our S3 issues have been resolved, let's start running some
tests again.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34244>
2025-03-27 20:23:15 +00:00
Faith Ekstrand
334a4da5c0 nvk: Bump the conformance version to 1.4.1.3
I've run this on most of the hardware and there's no new fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
f8409f1892 nak: hsetp2 and dsetp are slower on Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
c12583fc4b nvk: Mark the push before an indirect push as incomplete
This fixes dEQP-VK.api.command_buffers.many_indirect_draws_on_secondary
on pre-Turing hardware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
0915b3131f nvk/nvkmd: Add a concept of incomplete pushes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
cbf87e82e8 nvk: Use the right sample mask for 8x/4pass on Maxwell A
Fixes: 48898c47bf ("nvk: Rework setup of sample masks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:44 +00:00
Faith Ekstrand
3354c24169 nouveau/mme/fermi: Don't allow STATE and EMIT on the same op
Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
81986a8523 nvk: Disable sparse buffer binding prior to Maxwell B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
35cd6a1d99 nvk: Don't set filterMinmax properties prior to Maxwell B
We disallow the feature but the CTS still expects the properties to be
false as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
43d35bb63a nvk: Disable VK_EXT_device_generated_commands on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
7939331dde nvk: Allocate QMDs from a heap on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
94787116b1 nvk: Disable VK_EXT_post_depth_coverage on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
79294fb95a nvk: Fix a Volta check
Fixes: e162c2e78e ("nvk: Use VM_BIND for contiguous heaps instead of copying")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Faith Ekstrand
90b2137ac5 nvk: Free owned_gart_mem correctly
Fixes: fbe171638e ("nvk: add gart forced cmd pool side buffer.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
2025-03-27 20:03:43 +00:00
Robert Mader
05e7ac6551 llvmpipe: Take offset into account when importing dmabufs
Which is necessary for many common YCbCr formats.

Fixes: d74ea2c117 (llvmpipe: Implement dmabuf handling)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34240>
2025-03-27 18:47:26 +00:00
Faith Ekstrand
1ee884efd7 nvk: Reduce the size of nvk_image_view_capture
RenderDoc has a hard-coded limit of 16B for descriptor captures and
we're currently burning 24B.  Reducing is pretty easy, though, since
storage doesn't support multi-plane.  Any storage image views will use
VK_IMAGE_ASPECT_PLANE_N_BIT.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34128>
2025-03-27 16:02:40 +00:00
Faith Ekstrand
da0156be1f nouveau/headers: Re-use Rust method types when possible
We detect whenever a method hasn't changed from one generation to the
next and just `pub use` the older generation's method struct and any
enum types associated.  This keeps each mthd module independently usable
with all necessary types while reducing the number of unique Rust types
and associated trait implementations generated.  This drops the size of
libnvidia_headers.rlib from 84 MiB to 22 MiB and will hopefully make
Rust code a little less expensive to build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
e58dd75c0f nouveau/headers: Drop double-underscore from Rust names
There are a couple of these in thea headers and they cause Rust to throw
warnings.  Just fix them instead of disabling the Rust warning.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
51da40d0db nouveau/headers: Drop unused Rust constants
The only users of the Rust crate use the structs and Mthd impls.  This
reduces the size of libnouveau_headers.rlib from 99 MiB to 84 MiB.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
5cbf7f5bd7 nouveau/headers: Refactor class_parser
This adds proper Method and Field classes and uses them instead of
the pile of dictionaries we had before.  This is probably faster and
definitely more readable.  I've verified with cl9097.h that this makes
no differenct to the generated C or Rust besides whitespace.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34136>
2025-03-27 15:28:12 +00:00
Faith Ekstrand
f26cf5633d nak: Turing starts at SM73
The low-end Turing cards (TU117 for sure) are SM73, not SM75.  These are
the cards on which we have tensor cores but they're so slow as to be
almost useless.  We're not back-porting this because nouveau currently
returns 75 for these cards and because Volta binaries work fine on
Turing so they'll just be a little slower.  We have, however, seen this
advertised by NVRM so we want our handling of shader models to be
correct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
5df68ffac1 nak: Check num_regs(UGPR) instead of SM version
This is more explicit and leaves fewer naked version numbers in the
code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
af9d65e8b8 nak: Fix a SM check for OpPCnt
This doens't really fix anything as we don't have any nir_loops on
Volta+ but the code was wrong so we should fix it.

Fixes: 9bbc692064 ("nak/nir: Rework CRS handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
1d1d79bbaa nak: Always copy sources when handling vec/pack/mov ops
It's possible that the source is uniform but the destination is not.  In
this case, we need to insert a copy or else we might accidentally
propagate a uniform into some place we don't expect it.

This fixes a bunch of fp64 KHR-Single-GL46.subgroups.arithmetic.* tests.

Fixes: d09d3f5246 ("nak/from_nir: Emit uniform instructions when !divergent")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
87af55e075 nak: Don't insert empty OpParCopy in assign_regs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Faith Ekstrand
98677294b9 nak: Insert the annotation in the right spot in assign_regs
Fixes: efc4ac0d27 ("nak/sm50: sprinkle OpAnnotate in optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
2025-03-27 14:17:03 +00:00
Martin Krastev
824e1876f0 svga/ci: disable vmware farm
Planned maintenance of the farm host

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34230>
2025-03-27 13:10:04 +00:00
irql-notlessorequal
c0c562cf6e hasvk: Fix non-functioning version override.
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27717 accidentally removed the instance check for the drirc option "hasvk_report_vk_1_3_version", rendering it useless.

Re-add the check and expose Vulkan 1.3 if the user asks.

Fixes: 2d575034f2 ("hasvk: switch to use runtime physical device properties infrastructure")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34232>
2025-03-27 12:48:10 +01:00
Nikolas Zimmermann
1e72fbcfd1 etnaviv: drm: Add DRM_RDWR permissions to drmPrimeHandleToFD() call.
Currently it is not possible to mmap() the exported dma-bufs from etnaviv
for writing, through the GBM APIs, such as gbm_bo_get_fd(). etna_bo_dmabuf()
calls drmPrimeHandleToFD() only with DRM_CLOEXEC flag, omitting DRM_RDWR.

A typical call sequence, ending in etna_bo_dmabuf, for illustration:

gbm_bo_get_fd -> gbm_dri_bo_get_fd -> dri2_query_image ->
dri2_query_image_by_resource_handle -> etna_resource_get_handle
-> etna_bo_dmabuf.

Signed-off-by: Nikolas Zimmermann <nzimmermann@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34213>
2025-03-27 09:49:04 +00:00
Lionel Landwerlin
a88c9ea192 anv: limit implict write with drirc
9f32e1a489 meant to amend 1e80a426c2.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9f32e1a489 ("anv/drirc: Add option to control implicit sync on external BOs")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12629
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33587>
2025-03-27 08:28:20 +00:00
Samuel Pitoiset
09656e3dc4 radv/ci: fix renaming the VKCTS job for tahiti
This one has been missing during the renames.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34226>
2025-03-27 08:00:57 +00:00
Lionel Landwerlin
4db4bd1d04 brw: always write the VUE header
In 35df3925ca ("brw: ensure VUE header writes in HS/DS/GS stages") I
misread the PRMs and thought that the VF would initialize the header.

What actually happens is that the VF does not write valid values in
there and the PRMs explicitly say that the VS shader should overwrite
whatever is in there.

We could avoid writing the header in some cases when no HW is going to
read back the header. For example with rendering disables through
3DSTATE_STREAMOUT::RenderingDisable. But those cases are dynamic and
the compiler is not able to tell. So just always write the header.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 35df3925ca ("brw: ensure VUE header writes in HS/DS/GS stages")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12880
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34211>
2025-03-27 07:42:23 +00:00
Samuel Pitoiset
ae8c0b06a7 radv: add radeon_event_write() macros
Similar to RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
344aa38925 radv: add new helper to emit PKT3_EVENT_WRITE for sampling queries
Everything in one function is easier to share.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
e2e8dca941 radv: rework radeon_set_uconfig_perfctr_reg_seq to use amd_ip_type
To be more generic.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
88df7e709a radv: move the optimized context reg macros with other similar ones
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
30948e63f4 radv: switch all emit helpers to macros
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Samuel Pitoiset
74a5266d8f radv: replace radeon_set_reg_seq by a macro
To be more close to RadeonSI, other similar functions will be replaced
by macros in the next commits.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34145>
2025-03-27 07:09:07 +00:00
Georg Lehmann
8648d7cf75 ac/nir: set has_mul24_relaxed
This is only used by OpenCL.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:16 +00:00
Georg Lehmann
7c6a2b16e0 ac/llvm: support mul24_relaxed
I didn't find dedicated 24bit intrinsics, but I also haven't looked that hard.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:16 +00:00
Georg Lehmann
7631b10984 aco: implement mul24_relaxed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:16 +00:00
Georg Lehmann
2b1fc1a7fe nir: add option to keep mul24_relaxed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33871>
2025-03-27 06:24:15 +00:00
Marek Olšák
47d08dbde7 glx: stop exporting EXT_texture_object functions from libGLX_mesa.so
These aliases of the non-EXT functions have a non-aliased indirect GLX
implementation. Remove it since it's not needed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
25d1be00a2 mesa: inline main/meson.build
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
574c1a70d6 mesa: move dispatch.h and marshal_generated.h generation to glapi/gen
This is where most files are generated. It's a prerequisite for
a future change.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
06a720e1ea glapi: remove the option to set the nop handler
Call the only nop handler that's ever set directly.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
a91c541c5b glapi: remove noop_generic callbacks
There are named and generic noop callbacks. The named ones can print
the GL function being called, while the generic ones can't. Remove
the generic ones.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
1f56a1ac37 glapi: rename dispatch stubs to use function names instead of numbers
it's now _dispatch_stub_Uniform2d instead of shared_dispatch_stub_216

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
d8b8259593 glapi: simplify mapi_abi.py
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
4d643d06c8 glapi: simplify headers of generated files
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
168cf334e8 glapi: remove the GLAPI_PREFIX macro, just use gl as the function prefix
GLAPI_PREFIX always adds the gl prefix.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
b928304732 glx: remove the hack that forced exporting GL functions from libGL
GL functions were exported by luck because we incorrectly used
link_with in meson, which exports functions only if the static lib is
used. link_whole guarantees that the functions are always exported
even if the static lib is unused.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
e6da775506 glapi: get the list of public GL functions from libgl-symbols.txt
It's used by the symbols check test, so let's feed the same file into
python to define public GL functions because the lists are identical.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
dcc805469b glx: add a test to verify exported symbols
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
1e0ce9db94 glapi: remove unused _mesa_glapi_Dispatch
Only _mesa_glapi_tls_Dispatch is used.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
711fc10ea3 glapi: merge all shared-glapi source files into one .c file
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
fae087770a glapi: simplify codegen macros
- include the generated header directly instead of including
  MAPI_ABI_HEADER
- remove the MAPI_MODE_BRIDGE macro
- must move code into .c files since we don't have the macros anymore
- clean up #includes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
16ab7bd5a0 glapi: replace mapi_func type with identical _glapi_proc
there's no need to have 2 types for the same thing

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
d134f97e3f glapi: make a separate copy of entry.c for each lib
Using the same .c file in 4 different static/shared libs is difficult to
read. Having them separate will make it possible to simplify the code.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
9e24940bc7 glx: don't generate indirect GLX dispatch for ARB_imaging functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
219b2cde13 radeonsi: remove clover support
Only Rusticl is supported.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34215>
2025-03-27 01:59:19 +00:00
Eric Engestrom
77fb09c8cd rpi5/ci: drop duplicate flakes
Was not noticed until now because the lines had been added all shuffled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34221>
2025-03-27 01:14:45 +00:00
Eric Engestrom
a910246fff rpi5/ci: sort flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34221>
2025-03-27 01:14:45 +00:00
Yiwei Zhang
315d55db79 venus: support VK_EXT_multisampled_render_to_single_sampled
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
7155ffe275 venus: refactor format properties cache to be extensible
Now the key consists of format + high order index from different pNext
chain structs. To be noted. we still don't want to cache modifiers to
avoid preparing dynamic length internal storage for per format
modifiers. The good thing is that most of the queries against modifier
support are one-time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
8e173230b6 venus: support VK_KHR_shader_relaxed_extended_instruction
This is missed from earlier batches as it was falsely grouped under 1.3
core exts that have been recently fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
5227398a6c venus: support VK_EXT_buffer_device_address
Need a separate feature struct as the capture/replay bit means different
things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Yiwei Zhang
a19b0ccc31 venus: sync latest protocol
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34207>
2025-03-27 00:52:17 +00:00
Gurchetan Singh
8f003dc2e9 gfxstream: follow the semantics desired by distro VK loader
- vkCreateInstance should return VK_SUCCESS absent a few specific
  conditions
- just don't add any physical devices later

Cc: mesa-stable

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34090>
2025-03-27 00:26:17 +00:00
Gurchetan Singh
ef84cd928e gfxstream: refactor device initialization
Don't add unnecessary logspam if virtgpu isn't present.

Cc: mesa-stable
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34090>
2025-03-27 00:26:17 +00:00
Gurchetan Singh
5503d97bf6 gfxstream: check device exists before using it
Segfaults in the error case otherwise.

Cc: mesa-stable
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34090>
2025-03-27 00:26:17 +00:00
José Roberto de Souza
0eab7bfabc intel/dev/xe3: Set max_slices and max_subslices_per_slice using hwconfig
Xe3 different SKUs can have different max_subslices_per_slice and
Xe KMD topology uAPI only provide us the available subslices.
Therefore, to correctly calculate the available slices, we need
max_subslices_per_slice to match the hardware.

This change retrieves this information from hwconfig for Xe3+.
This avoids adding all the PTL intel_device_info variants.
Additionally, the PTL topology values are currently embargoed and
cannot be hard-coded in public source code.

This could be simplified if we decide to apply max_slices and
max_subslices_per_slice to all platforms that hwconfig is required.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33328>
2025-03-26 23:35:14 +00:00
Paulo Zanoni
e72ad49622 drirc/anv: DiggingGame.exe needs force_vk_vendor=-1
Otherwise, it fails with a message:

  "Assertion failed: IsValidIndex(Index)
   [File:D:\\build\\++UE5\\Sync\\Engine\\Source\\Runtime\\Core\\Public\\Containers\\UnrealString.h]
   [Line: 218] \nString index out of bounds: Index 0 from a string with
   a length of 0"

Thanks to the ProtonDB community for having figured this out and
documented it for us.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12695
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34103>
2025-03-26 22:48:37 +00:00
Valentine Burley
55749a5bbb amd/ci: Rename AMD jobs to follow unified naming convention
All AMD jobs now follow the new naming convention: {driver}-{gpu}-{test}.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Valentine Burley
74ebd5d5b2 radv/ci: Delete obsolete vkcts-stoney-valve job
This job won't be re-enabled, so delete it.
Suggested by @mupuf.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
c168fdcd50 radv/ci: delete empty radv-hawaii-skips.txt
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
a78eccdb9b radv/ci: rename radv-gfx1200 to radv-gfx1201
Also create an empty file for flakes, otherwise deqp-runner complains.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
a6d47aeaa3 radv/ci: drop aco suffix for CI files
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:27:00 +00:00
Samuel Pitoiset
b89f45c5d8 radv/ci: remove radv-stoney-flakes.txt
This file was never used because GPU_VERSION is radv-stoney-aco.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:26:59 +00:00
Samuel Pitoiset
7233df3d10 radv/ci: remove vkcts-navi21-llvm-valve completely
This is disabled since a very long time and testing LLVM support with
RADV in CI is kind of pointless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34147>
2025-03-26 22:26:59 +00:00
Eric Engestrom
7e16c10415 meson: move special value all out of the middle of the list
And sort the rest while at it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Eric Engestrom
a39090921e meson: drop deprecated swrast alias for softpipe+llvmpipe
We accidentally kept it one more release cycle than we meant to ^^'

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Eric Engestrom
8ee792a381 ci: remove last uses of deprecated swrast alias for softpipe+llvmpipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Eric Engestrom
84b9aebca4 docs: fix last references to gallium-drivers=swrast
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34217>
2025-03-26 21:44:26 +00:00
Samuel Pitoiset
d73d570fa7 ci: uprev vkd3d-proton to 078f07f588c849c52fa21c8cfdd1c201465b1932
This contains few more tests as usual.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33941>
2025-03-26 21:16:39 +00:00
Rhys Perry
0619cc45b7 radv/winsys: set has_distributed_tess for null winsys
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33978>
2025-03-26 20:52:53 +00:00
Rhys Perry
ee0be147b9 radv/winsys: set gart_page_size for null winsys
Fixes assertion failure when initializing memory types for devices without
dedicated vram.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33978>
2025-03-26 20:52:53 +00:00
Rhys Perry
4632ca258b radv/winsys: increase gfx12 vgprs for null winsys
LLVM has Feature1_5xVGPRs for both gfx1200 and gfx1201.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33978>
2025-03-26 20:52:53 +00:00
Tapani Pälli
694f2bbeeb isl/iris/anv: setup L1CacheControl based on surface and buffer usage
Patch chooses write through mode with storage surfaces when cache policy
is set via ISL_SURF_USAGE_CACHE_POLICY_WT.

This fixes rendering artifacts seen in:

   Space Engineers 2
   Hogwarts Legacy
   Plague Tale: Requiem

This was tested with some workloads on MTL and all on LNL/BMG. It fixes
Space Engineers 2 rendering artifacts but not the crash which is a
separate issue.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12714
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12750
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34044>
2025-03-26 20:19:07 +00:00
Tapani Pälli
84510aea8f anv: pass down buffer usage for isl_buffer_fill_state
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34044>
2025-03-26 20:19:07 +00:00
Tapani Pälli
a57ec756b8 iris: pass down buffer usage for isl_buffer_fill_state
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34044>
2025-03-26 20:19:07 +00:00
Tapani Pälli
cac132f63d isl: add usage field to isl_buffer_fill_state_info
This makes it possible to choose caching mode based on usage.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34044>
2025-03-26 20:19:07 +00:00
Eric Engestrom
e81034c922 ci: document who are the farm admins
I've also included the CI infrastructure used by each farm, in case an
issue is affecting all farms of a kind, like I don't know, a bug in the
http proxy used by lava & baremetal farms :]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34195>
2025-03-26 19:47:09 +00:00
Natalie Vock
d6cb45dbb0 aco/spill: Allow spilling live-through operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Natalie Vock
416a016127 aco: Add RegisterDemand(Temp) constructor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Natalie Vock
ca7ce1fb33 aco/spill: Invert reloads map
So we can quickly look up if an operand was reloaded without having to
check renames.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Natalie Vock
39413ef78f aco: Add get_temp_reg_changes helper
Similar to get_live_changes, but considers live temporary registers
as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29730>
2025-03-26 19:18:30 +00:00
Konstantin Seurer
45fd26c943 hk: Fix building without the gallium driver
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Konstantin Seurer
69cd2cb362 asahi: Only require IOKit for tooling
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Alyssa Rosenzweig
c677ac13b9 agx: fix ctz of zero with address calcs
../src/asahi/compiler/agx_nir_lower_address.c:82:30: runtime error: passing zero to ctz(), which is not a valid argument
    #0 0x56175dca5684 in pass ../src/asahi/compiler/agx_nir_lower_address.c:82
    #1 0x56175dca2eda in nir_function_intrinsics_pass ../src/compiler/nir/nir_builder.h:164
    #2 0x56175dca308c in nir_shader_intrinsics_pass ../src/compiler/nir/nir_builder.h:191
    #3 0x56175dca68ae in agx_nir_lower_address ../src/asahi/compiler/agx_nir_lower_address.c:167
    #4 0x56175dc885c0 in agx_optimize_nir ../src/asahi/compiler/agx_compile.c:3063
    #5 0x56175dc9650d in agx_compile_shader_nir ../src/asahi/compiler/agx_compile.c:3827
    #6 0x56175dc52148 in main ../src/asahi/clc/asahi_clc.c:359
    #7 0x7fdf1c343249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7fdf1c343304 in __libc_start_main_impl ../csu/libc-start.c:360
    #9 0x56175dc44760 in _start (/builds/mesa/mesa/_build/src/asahi/clc/asahi_clc+0xbd0760)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Alyssa Rosenzweig
dfae262ca4 asahi: add assert for max variant count
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Alyssa Rosenzweig
dfe995414f libagx: reduce # of variants of unroll restart
33 variants of this stupid kernel is not worth it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Konstantin Seurer
14f2f1226f ci: Do not build hk on alpine
"hk: Fix building without the gallium driver" will make this do
something which uncovers that the build is broken on alpine. Remove it
for now to unblock this MR.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33685>
2025-03-26 18:35:36 +00:00
Caio Oliveira
72aefea0a0 brw: Fix disassembler trying to decode 3src_hstride in Gfx9
This field is not encoded for Gfx9, so use the fixed value
that makes sense for that platform.

Fixes: 9dfff2cb14 ("brw: Allow generating destination with stride 2 in 3-src instructions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12881
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34197>
2025-03-26 18:12:46 +00:00
Antonio Ospite
4ee3c302ce ci/android: factor out GLES runtime version retrieval to a function
Different versions of Android might have different ways of getting the
GLES runtime version, so factor this out to a function, so that the
mechanism can be changed in a centralized way.

Also rename MESA_RUNTIME_VERSION to GLES_RUNTIME_VERSION because this is
really what is being retrieved, in the future we might have a similar
check for the vulkan Mesa driver.

While at it remove mentions of SurfaceFlinger in some comments since the
mechanism to retrieve the versions is irrelevant for the purposes of the
checks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
3af15abd68 ci/android: handle ANGLE being installed under /system on Android 15+
The ANGLE library is installed under /system rather than /vendor
starting from Android 15, so handle this difference in the
android-runner.sh script.

See also:
d964482310

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
c953e90e23 ci/android: push also the intel vulkan driver
The intel vulkan driver is always built by the `debian-android` job,
since it may be needed for some future job, push it unconditionally, it
does not hurt to have it in the Android system.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
9ce3d9c933 ci/android: always push ANGLE libraries
Since ANGLE is always built for Android, always push it even if it is
not going to be tested directly.

Besides simplifying the script, this is also because ANGLE is going to
be mandatory anyway starting from Android 15+ and not having it in the
Android system might cause unexpected failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
e346b5786d ci/android: remove old mesa and ANGLE libraries before pushing new ones
Remove old mesa and ANGLE libraries before pushing new ones, and do this
using a trailing wildcard, because some versions of Android might have
versioned libraries like /vendor/lib64/egl/libEGL_mesa.so.1 which should
also be removed to avoid any confusion when loading the freshly pushed
ones.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
12a9e0868c ci/android: check for ANGLE_TAG in android-deqp-runner.sh
Check for ANGLE_TAG instead of USE_ANGLE in android-deqp-runner.sh to be
consistent with what deqp-runner.sh does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:56 +00:00
Antonio Ospite
2eaf1818a3 ci/android: remove some unnecessary adb commands from android-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
e774584faa ci/android: factor out a generic android-runner.sh from cuttlefish-runner.sh
Some of the commands in cuttlefish-runner.sh, like updating mesa and
ANGLE, are not specific to cuttlefish, in general they can be executed
on any Android device under test.

So split those commands out of cuttlefish-runner.sh and put them into an
android-runner.sh script.

For example, when testing a physical Android device instead of a virtual
device, a mesa-ci job will call android-runner.sh directly instead of
cuttlefish-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
83b0b07cce ci/android: increase the waiting time to stop the cuttlefish launcher
Increase the timeout of stop_cvd even more, sometimes 20 seconds are not
enough.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Antonio Ospite
6ef9213524 ci/android: don't set EGL_PLATFORM on the host before launching cuttlefish
Setting EGL_PLATFORM on the host system is not really necessary for
running cuttlefish, this is probably a left-over from previous
experiments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
2025-03-26 17:25:55 +00:00
Samuel Pitoiset
c036736e2e radv/video: rework command buffer emission
This is much closer to RadeonSI and could be shared at some point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34150>
2025-03-26 14:59:12 +00:00
Samuel Pitoiset
0e0a393a4a radv/video: use a pointer to write the total task size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34150>
2025-03-26 14:59:12 +00:00
Samuel Pitoiset
2c3b9312cc radv/meta: fix color<->depth/stencil image copies
The color format needs to be compatible with depth or stencil. Also
the depth/stencil format was incorrect when it's the source.

Fixes dEQP-VK.api.ds_color_copy.*
and VKD3D_TEST_FILTER=test_copy_texture.

Fixes: d4ff011b12 ("radv: advertise VK_KHR_maintenance8")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34142>
2025-03-26 13:27:03 +00:00
Erico Nunes
92797683e1 ci: re-enable lima farm
Re-enable after gitlab infrastructure move and caching proxy fix.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34203>
2025-03-26 12:42:50 +00:00
Samuel Pitoiset
ef0a6f59f3 radv: use PM4 for setting specific graphics registers in the preamble
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34172>
2025-03-26 10:14:22 +00:00
Samuel Pitoiset
c5d0764fce radv: remove radv_force_pstate_peak_gfx11_dgpu=true for Helldivers 2
Our QA team extensively tested Helldivers 2 on AMD RX 7800 XT/RX 7600
with many different presents and didn't get any GPU hangs. Few users
also reported the game being very stable without this workaround.

Few other users reported issues with the workaround itself (like
pstate not correctly restored etc), so let's remove it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34164>
2025-03-26 09:33:19 +00:00
Daniel Schürmann
afc605bc9b aco: Remove empty exec skipping after demote
Totals from 858 (1.08% of 79377) affected shaders: (Navi31)

Instrs: 678713 -> 677694 (-0.15%); split: -0.15%, +0.00%
CodeSize: 3732576 -> 3729104 (-0.09%); split: -0.10%, +0.01%
Latency: 4199397 -> 4198632 (-0.02%); split: -0.06%, +0.04%
InvThroughput: 691391 -> 691122 (-0.04%); split: -0.04%, +0.00%
SClause: 14593 -> 14605 (+0.08%)
Copies: 41279 -> 41288 (+0.02%); split: -0.04%, +0.06%
Branches: 13575 -> 13452 (-0.91%)
PreSGPRs: 29069 -> 29039 (-0.10%)
VALU: 426261 -> 426215 (-0.01%); split: -0.01%, +0.00%
SALU: 60458 -> 60471 (+0.02%); split: -0.02%, +0.04%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
90faadae72 aco/insert_exec_mask: don't disable dead quads on demote in divergent CF
Also force-enalbe helpers in case of demote in divergent CF.

Totals from 1305 (1.64% of 79377) affected shaders: (Navi31)

Instrs: 926923 -> 922516 (-0.48%); split: -0.48%, +0.00%
CodeSize: 5045292 -> 5027408 (-0.35%); split: -0.36%, +0.00%
Latency: 6176577 -> 6174708 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 931603 -> 931583 (-0.00%); split: -0.00%, +0.00%
SClause: 22816 -> 22855 (+0.17%); split: -0.17%, +0.34%
Copies: 57347 -> 55170 (-3.80%); split: -3.81%, +0.01%
Branches: 18990 -> 18974 (-0.08%)
PreSGPRs: 42734 -> 43248 (+1.20%)
SALU: 90511 -> 86153 (-4.81%); split: -4.85%, +0.04%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
b872ff6ef2 aco/insert_exec_mask: if applicable, use s_wqm to restore exec after divergent CF
Totals from 4740 (5.97% of 79377) affected shaders: (Navi31)

Instrs: 6273963 -> 6273410 (-0.01%); split: -0.01%, +0.00%
CodeSize: 34306560 -> 34304284 (-0.01%); split: -0.01%, +0.00%
SpillSGPRs: 1793 -> 1797 (+0.22%); split: -0.11%, +0.33%
Latency: 62599300 -> 62598714 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 9117199 -> 9117189 (-0.00%); split: -0.00%, +0.00%
SClause: 223548 -> 223529 (-0.01%); split: -0.02%, +0.01%
Copies: 464248 -> 454711 (-2.05%); split: -2.06%, +0.00%
Branches: 161446 -> 161443 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 226278 -> 225608 (-0.30%)
VALU: 3793235 -> 3793244 (+0.00%); split: -0.00%, +0.00%
SALU: 606184 -> 605759 (-0.07%); split: -0.08%, +0.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
69dcd5be3a aco: don't assume that demote doesn't cause an empty exec mask
Totals from 188 (0.24% of 79377) affected shaders: (Navi31)
Instrs: 209239 -> 209473 (+0.11%); split: -0.01%, +0.12%
CodeSize: 1101124 -> 1101744 (+0.06%); split: -0.02%, +0.07%
Latency: 1672182 -> 1672748 (+0.03%); split: -0.11%, +0.14%
InvThroughput: 237276 -> 237546 (+0.11%); split: -0.00%, +0.12%
SClause: 5694 -> 5690 (-0.07%); split: -0.28%, +0.21%
Copies: 21685 -> 21682 (-0.01%); split: -0.12%, +0.10%
Branches: 5740 -> 5863 (+2.14%)
PreSGPRs: 7004 -> 7034 (+0.43%)
VALU: 123595 -> 123641 (+0.04%); split: -0.00%, +0.04%
SALU: 28418 -> 28411 (-0.02%); split: -0.09%, +0.06%

Fixes: f35e229fae ('aco: skip code if exec is empty')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:12 +00:00
Daniel Schürmann
c1b124ab6c aco/lower_branches: properly consider exec mask needs of branch targets
No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
2025-03-26 08:45:11 +00:00
Caleb Callaway
c37ece75ea anv: add INTEL_DEBUG=rt_notrace
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34169>
2025-03-26 00:52:53 +00:00
Yiwei Zhang
8c6a5250ec venus: support VK_KHR_maintenance7
Need to properly fill layered api properties while adjusting query
wrapping based on maint7 feature enablement. Venus has to conditionally
advertise maint7 support only when renderer side vk is 1.2 or supports
VK_KHR_driver_properties.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33960>
2025-03-26 00:26:22 +00:00
Hyunjun Ko
4236ef31ab anv: Add stdSyntaxFlag values for h264/5 encoders
Closes: mesa/mesa#12834

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34094>
2025-03-25 23:54:32 +00:00
Hyunjun Ko
c22a635938 vulkan/video: Do byte-alignment when building a h264 slice header
Fixes: ff8de6190 ("vulkan/video: adds a bitstream writer of h264 slice header")
Closes: mesa/mesa#12835

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34094>
2025-03-25 23:54:31 +00:00
Kenneth Graunke
890c8714fd intel/decoder: Decode compute shaders in EXECUTE_INDIRECT_DISPATCH
This makes the error state decoder (among other tools) print the
compute shaders referenced by EXECUTE_INDIRECT_DISPATCH.  We just
reuse the existing COMPUTE_WALKER handling as it already looks for
a COMPUTE_WALKER_BODY in a larger struct and then
INTERFACE_DESCRIPTOR_DATA within that.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34198>
2025-03-25 23:26:40 +00:00
Mykhailo Skorokhodov
bc0ceb136f drirc/anv: force_vk_vendor=-1 for Drive Beyond Horizons
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34181>
2025-03-25 21:52:51 +00:00
Valentine Burley
b6fb0fff3f ci/android: Temporarily disable building llvmpipe
Due to the driver's size being inflated by the embedded LLVM, and
uploading to S3 currently being slow, disable building llvmpipe for
Android.
This is meant as a temporary workaround until we can do this more
efficiently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
Valentine Burley
cbbcc765d7 ci/android: Update to LLVM 19 for Android
Use LLVM 19 for Android, which matches the LLVM version used in the rest
of CI.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
Valentine Burley
1cb85c9f23 ci/android: Keep the LLVM install when rebuilding
Previously, when rebuilding LLVM for Android, the script would delete the
freshly built LLVM install. This caused the android_build container to
lack LLVM unless the container was rebuilt again, this time without
rebuilding LLVM, and instead just downloading the tarball.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
Valentine Burley
3053d822b2 ci/android: Don't delete ninja after building LLVM
Ninja was already included in the android_build container, so there's no
need to put it in the Ephemeral packages, which only meant that it was
removed at the end of the LLVM build.

Also, add the usual image tag header at the top of
build-android-x86_64-llvm.sh.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34180>
2025-03-25 20:38:06 +00:00
forbiddenlake
a564415c44 ci/alpine: upgrade sphinx and hawkmoth to the latest versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34165>
2025-03-25 20:05:46 +00:00
forbiddenlake
70473a9ae4 docs: Fix HTML build with Sphinx 8.2
Sphinx 8.2 changed the definition of `depart_admonition`, causing build
failures when building with html-docs=enabled as mesa was only
overloading `visit_admonition`. This adds the old `depart_admonition`
definition to mesa's copy, restoring compatibility and fixing the build.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12725
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34165>
2025-03-25 20:05:46 +00:00
Leonard Göhrs
5d20a17040 ci: re-enable pengutronix farm
All the lava & baremetal farms had to be disabled due to a caching proxy
bug. A fix is proposed in mesa/mesa!34174.

The fix has been applied for the pengutronix farm, so it can be reenabled.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34185>
2025-03-25 19:38:01 +00:00
Samuel Pitoiset
4d68875acd radv: cleanup passing the aspect mask for SDMA operations
Less error prone than it used to be.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Samuel Pitoiset
e60cafa533 radv: remove useless parameter to radv_sdma_get_buf_surf()
Same aspect mask is passed through.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Samuel Pitoiset
114fbdc534 radv: fix compresed depth/stencil copies on transfer queue
HTILE is always pipe aligned.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Samuel Pitoiset
7b15e85b95 radv: fix bpe for the stencil aspect of depth/stencil copies on transfer queue
Using the bpe of depth+stencil when copying the stencil aspect only
doesn't work.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
2025-03-25 19:13:20 +00:00
Rob Clark
75d6af03d8 freedreno/ci: Disable traces job until piglit is fixed
See https://gitlab.freedesktop.org/mesa/piglit/-/issues/113

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34182>
2025-03-25 18:41:42 +00:00
Rob Clark
916ad5d67d ci: Re enable fd-farm
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34182>
2025-03-25 18:41:42 +00:00
Martin Krastev
dea99727d3 svga/ci: update EXTERNAL_KERNEL_TAG to new kernel
Update EXTERNAL_KERNEL_TAG to new SHA. Still the same linux 6.8, just stop
consuming kernel artifacts from mesa-lava, instead start using mesa-rootfs

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34177>
2025-03-25 18:15:04 +00:00
Martin Krastev
b0a86070db svga/ci: enable vmware farm
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34177>
2025-03-25 18:15:04 +00:00
José Roberto de Souza
aec3a72525 intel/hwconfig: Remove ignored intel_hwconfigs from apply_hwconfig_item()
There is no reason to have it in the switch case.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34157>
2025-03-25 17:46:12 +00:00
José Roberto de Souza
512b433172 intel/hwconfig: Sync hwconfig with IGT
intel-gpu-tools have a few more entries in enum intel_hwconfig, so
adding the missing ones to Mesa.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34157>
2025-03-25 17:46:12 +00:00
Jose Fonseca
e3741a5731 glapi: Make _GLAPI_EXPORT a no-op on Windows.
DLL import/export annotations unneeded, now that glapi is statically
linked into libgallium_wgl.

However _mesa_glapi_get_proc_address and _mesa_glapi_get_dispatch need
to be explicitly exported for libEGL and libGLESv2.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12573
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33822>
2025-03-25 17:11:07 +00:00
Rhys Perry
80fef30531 aco/ra: fix free register counting when moving variables
info.bounds might be smaller than the bounds available for the moved
variables.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 626aa7b648 ("aco: workaround GFX9 hardware bug for D16 image instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34158>
2025-03-25 15:14:16 +00:00
Ella Stanforth
53484dc64a v3d: Fix fbfetch with discards.
We can't do earlyz_with_discard when using fbfetch as we can have TLB reads
that occur before the discard. This can result in implicit Z writes which make
the setmsf instruction emitted as a result of the discard invalid.

Fixes: 332b313547 ("v3d: enable framebuffer fetch")

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34151>
2025-03-25 14:44:16 +00:00
Eric Engestrom
ab63b92b3c ci: re-enable igalia (rpi) farm
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34174
for the fix for other lava & baremetal farms to apply too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34175>
2025-03-25 13:44:26 +00:00
Eric Engestrom
e1ed2c3e41 rpi/ci: disable traces jobs
Until piglit's trace download is fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34175>
2025-03-25 13:44:26 +00:00
Samuel Pitoiset
51009e4030 docs: update documentation for RADV_PERFTEST=video_decode,video_encode
Starting from VCN 2+ (ie. RDNA1+), video encode/decode extensions are
enabled by default if the firwmares are up-to-date.

GFX6-9 firmwares will probably never be fixed and video extensions will
remain experimental because it won't be possible to pass VKCTS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Samuel Pitoiset
d712c34a62 radv: add a helpers to know whether video decode/encode queues are enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Samuel Pitoiset
2b2423f100 radv: remove meaningless comment when resetting SQTT trace
It's just a NULL check.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Samuel Pitoiset
b1818a3ca9 radv: add a helper to know whether compute queue is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34144>
2025-03-25 12:49:10 +00:00
Pavel Ondračka
c39c304e32 r300/ci: update expectations
Compressed formats are still broken, this should make the CI work again
until this is fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34087>
2025-03-25 12:13:39 +00:00
Pavel Ondračka
7a2946711e r300: fix crash when creating surfaces
pipe_surface_width and pipe_surface_height helpers actually need
a pipe surface with a texture attached instead of just passing
directly the pipe_surface we get from the st.

The compressed formats are still broken unfortunatelly, so add them
to CI fails for now.

Partial fix for: 9d359c6d10

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34087>
2025-03-25 12:13:39 +00:00
Samuel Pitoiset
85983e060c radv: add more SDMA emit helpers
All SDMA_PACKET are now isolated to radv_sdma.c. It will be easier
for code sharing with RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34146>
2025-03-25 11:48:05 +00:00
Samuel Pitoiset
54060f6dba radv: use radv_sdma_emit_nop() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34146>
2025-03-25 11:48:05 +00:00
Lionel Landwerlin
25a695552a anv: disable replication when we don't have both VS/FS stages
Enabling this with shaders compiled separately through pipeline
libraries fails because we currently only enable it for VS and the
associated FS stage ends up with a non compatible VUE map.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34173>
2025-03-25 11:23:45 +00:00
Christian Gmeiner
722ca57619 etnaviv: Add support for KHR_partial_update
The damage region can be useful to optimize the "resolve" step that we have on
imx6q (GC2000) because there isn't any tiling compatible with both render and
scanout or an any GPU when scanning out a linear buffer since we don't support
linear PE.

This improves fps for e.g `weston-simple-egl` by factor 2 (~30 fps -> ~60 fps).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33226>
2025-03-25 10:59:58 +00:00
Christian Gmeiner
2c3e0b5ac2 etnaviv: rs: Change param etna_get_rs_alignment_mask(..)
This prepares etna_get_rs_alignment_mask(..) for the next commit.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33226>
2025-03-25 10:59:58 +00:00
Christian Gmeiner
98b9cc6d5a etnaviv: rs: Factor out box alignment function
Introduce etna_align_box_for_rs(..) that allows us to apply RS restrictions
to a pipe_box. Switch etna_transfer_map(..) to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33226>
2025-03-25 10:59:58 +00:00
Lionel Landwerlin
6b6a4cb1e2 anv: fix end of pipe timestamp query writes
Currently trying to use PIPE_CONTROL on blitter/video engines.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12833
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34095>
2025-03-25 10:35:19 +00:00
Samuel Pitoiset
29b3d9f0f4 radv: fix creating pipeline binary from the traversal shader
rt_stage_info is NULL.

Fixes: 8802612458 ("radv: advertise VK_KHR_pipeline_binary")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34141>
2025-03-25 10:10:06 +00:00
Job Noorman
84dbd34332 ir3/legalize: take wrmask into account for delay updates
When updating delays, we'd update all dst regs based on reg_elems.
However, when wrmask has gaps, this would update delays for regs that
aren't actually written. Fix this by skipping regs for which the
corresponding wrmask bit is zero.

Note that this wasn't just a performance issue but could result in
illegal code because the delay is reset to zero for tex/sfu
instructions. For example, the following (post-legalization) code was
observed in the wild:

(rpt1)add.f r1.w, (r)r2.w, (r)c3.z
sam.base0 (f32)(w)r2.x, r3.y, s#0, t#1
rcp r2.x, r2.x

Here, the add would result in a required delay for r2.x which would then
be cleared by the sam (even though it doesn't write to it), resulting in
insufficient delay before the rcp.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 61b2bd861f ("ir3: Rewrite nop insertion")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34107>
2025-03-25 09:48:37 +00:00
Job Noorman
fb6d933827 ir3/legalize: fix off-by-one error in kill_sched
kill_sched would consider blocks that start right after the current one
as starting before it due to an off-by-one error. This resulted in
unnecessary branches being inserted.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34110>
2025-03-25 09:19:23 +00:00
Eric Engestrom
8fe25223bd docs: add sha sum for 25.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34097>
2025-03-25 09:12:02 +00:00
Eric Engestrom
a6a68ac0d3 docs: add release notes for 25.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34097>
2025-03-25 09:12:02 +00:00
Eric Engestrom
2bb48af6e6 docs: update calendar for 25.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34097>
2025-03-25 09:12:02 +00:00
Eric Engestrom
e7b2eda39d pick-ui: fix parsing of multiple backport-to: lines
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
f8d07396fa pick-ui: rename s/out/commit_message/ variable to make its contents clearer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
2c9ae634ef pick-ui: add missing field in test expectation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
70665e2df7 pick-ui: fix enum value in test expectation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
9d9e0c9c1b pick-ui: clean up formatting
Makes it easier to see what's what, especially once we have to change
things in the next commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
2025-03-25 09:08:46 +00:00
Eric Engestrom
2769e494c6 meson: do not compile libmesa_util_sse41 unless used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34123>
2025-03-25 08:32:47 +00:00
Eric Engestrom
123627ef65 meson: do not compile libblake3 unless used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34123>
2025-03-25 08:32:47 +00:00
Eric Engestrom
90a84862c6 meson: do not compile libisaspec unless used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34123>
2025-03-25 08:32:47 +00:00
Lionel Landwerlin
32d25075ae anv: relax depth/stencil<->color copy restrictions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:15 +00:00
Lionel Landwerlin
294aa72449 vulkan: add helper for color/depth-stencil capable formats
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:15 +00:00
Lionel Landwerlin
e18431273a blorp: relax depth/stencil<->color copy restriction
Currently blorp assumes that copies of depth/stencil is restricted
to/from depth/stencil formats. We want to allow color<->depth copies.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:15 +00:00
Lionel Landwerlin
fe2f173413 blorp: assert that shaders don't spill
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:14 +00:00
Lionel Landwerlin
4226c50b3f anv: avoid early lower of the fp64 code
Otherwise this will lead to scratch intrinsics for calls/returns.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31983>
2025-03-25 08:01:14 +00:00
Caio Oliveira
e384ccde28 brw: Expand EU validation for DPAS
Allow BFloat16 types when supported and allow destination/accumulator to
match the other source types in Gfx20+.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34035>
2025-03-25 07:38:08 +00:00
Timothy Arceri
2b2132d2ac nir: fix uniform cloning helper
glsl allows for ubos to have the same name but different bindings.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Fixes: b47b8d16d9 ("nir: expose reusable linking helpers for cloning uniform loads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12852
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34138>
2025-03-25 06:54:53 +00:00
Timothy Arceri
786b8b2d34 mesa: fix potential race condition in with Programs
The call looks up a Program and creates it if it doesn't
already exist. However we weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:52 +00:00
Timothy Arceri
4c1e4d7b49 mesa: fix potential race condition in with ATIShaders
The call looks up an ATIShader and creates it if it doesn't
already exist. However we weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
0e61d31e9d mesa: fix potential race condition in with RenderBuffers
The calls look up a renderbuffer and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
c4ee84f3b6 mesa: fix potential race conditions in with FrameBuffers
The calls look up a framebuffer and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
9bb696588d mesa: fix reuse of deleted sampler object
Deleting a sampler object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c9130 ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
95e87f6a6a mesa: fix potential race condition in with TexObjects
The calls look up a texture object and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c9130 ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
9b85142e40 mesa: fix reuse of deleted texture object
Deleting a texture object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12710
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12722
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12830
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Timothy Arceri
0f0834275d mesa: fix reuse of deleted buffer object
Deleting a buffer object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12810
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
2025-03-25 05:53:51 +00:00
Caio Oliveira
5eb1edcf9d intel/executor: Add small example with bfloat
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
6cec413a78 brw: Add EU assembler support for bfloat16
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
e37b707bd0 brw: Consider bfloat16 in scoreboard
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
62323a934b brw: Add BRW_TYPE_BF validation
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
9916cc1050 brw: Add BRW_TYPE_BF for bfloat16
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
d1f4fb8eee brw: Make some integer check more explicit
Use the positive ("is int?") check when applicable.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
c3d2ba6973 brw: Remove prefix gfx10 from enum types
The values already use BRW, make it consistent.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
9dfff2cb14 brw: Allow generating destination with stride 2 in 3-src instructions
Will be useful for testing BFloat16 in later patches.  No change
expected to the compiler itself.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
676b874ca9 brw: Fix decoding of 3-src destination stride in EU validation
Fixes: f1036da345 ("intel/brw: Add vstride/width/hstride to brw_hw_decoded_inst")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33664>
2025-03-25 05:23:37 +00:00
Caio Oliveira
f78a27eb18 spirv: In SpecConstantOp handling don't adjust convert ops bit_size twice
After 8fa70cfcfd ("spirv: Use the right bit-size for spec constant
ops") the bit-size will already be adjusted based on the sources, and
this will take care of Convert operations too.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34119>
2025-03-25 04:50:09 +00:00
Caio Oliveira
5e25ef16d9 vulkan: Update XML and headers to 1.4.311
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34106>
2025-03-25 04:14:06 +00:00
Timothy Arceri
6808486c1b ci: move llvmpipe fails to flakes
Fixes: 0def5682f9 ("ci: document new llvmpipe & softpipe failures since the migration")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34171>
2025-03-25 03:48:41 +00:00
Caio Oliveira
ca72255114 spirv: Update headers and metadata from latest Khronos commit
This corresponds to 0e710677989b4326ac974fd80c5308191ed80965
("Fix json capabilities for RayTracingOpacityMicromapEXT (#498)")
in https://github.com/KhronosGroup/SPIRV-Headers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34092>
2025-03-25 02:29:26 +00:00
Caio Oliveira
89a87fab66 brw: Remove extra SHADER_OPCODE_FLOW emitted during NIR conversion
The DO() helper already emits a FLOW.

Fixes: d2c39b1779 ("intel/brw: Always have a (non-DO) block after a DO in the CFG")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33954>
2025-03-25 02:05:26 +00:00
Caio Oliveira
c01655370d brw: Add assembler support for DPAS
Allow us to parse instructions in a form we currently generate

```
dpas.8x8(8)     g55<1>F         g47<1,1,0>F     g31<1,1,0>HF    g39<1,1,0>HF { align1 WE_all 1Q $4 };
```

Regions are not really needed, but this will be handled in a later patch
(that will also stop printing the regions).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34031>
2025-03-25 01:40:02 +00:00
Yiwei Zhang
5dcb9f918d panvk: fix memory requirement query for aliased disjoint image
The spec allows to create aliased disjoint image for a specific plane of
a multi-planar image, and the format can be R8. When querying memory
requirement of such image, VkImagePlaneMemoryRequirementsInfo is not
required to be chained although it has the disjoint bit.

This change fixes to look for aspect info from plane memory info only
when that's chained. The implementation can be passive here as the spec
VU has sufficient guarantees for the validity around. See below VU for
details:
- VUID-VkImageMemoryRequirementsInfo2-image-01589
- VUID-VkImageMemoryRequirementsInfo2-image-01590
- VUID-VkImageMemoryRequirementsInfo2-image-02279
- VUID-VkImageMemoryRequirementsInfo2-image-02280

Meanwhile, the existing disjoint check for size info is kept as is for
the special handling of VK_FORMAT_D32_SFLOAT_S8_UINT.

Test: dEQP-VK.ycbcr.plane_view.memory_alias.* pass with venus-on-panvk

Fixes: 412c286331 ("panvk: Enable multiplane images and image views")
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34134>
2025-03-25 00:20:54 +00:00
Aaron Ruby
121d163b21 gfxstream: Move virtgpu_gfxstream_protocols.h to the common location for
house protocols

- Remove some duplicate definitions  (replaced with virgl_hw.h include,
which is also represented in gfxstream host code)
- Also removed the capset_ids from virtgpu_gfxstream_protocol.h. They
aren't needed to build guest-side driver, and are planned to be merged
to virtgpu_drm.h

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34116>
2025-03-24 23:25:10 +00:00
Yiwei Zhang
98a5acf352 panvk/csf: rework cache flush reduction
Per Vulkan spec 7.9. Host Write Ordering Guarantees, queue submission
commands automatically perform a domain operation from host to device
for all writes performed before the command executes. That is to say,
host updates to the mappings can occur after the end of the command
recording and must be flushed implicitly at submission boundary.

Before this change, necessary cache flushes could be missed once the
app starts reusing pre-recorded command buffers. e.g. a simple buffer
copy cmd while the app only updates the source buffer mapping in
different submissions. This changes backs out most of the current
version of cache flush reduction while still assigning LATEST_FLUSH_ID
to at least the final batch itself. This aligns with panfrost_batch
submit behavior on the gallium side.

Test: dEQP-VK.synchronization*.timeline_semaphore.* pass w/o flakiness
      via venus-on-panvk

Fixes: 28e4d22497 ("panvk/csf: Pass a non-zero flush-id to benefit from cache flush reduction")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34093>
2025-03-24 22:21:06 +00:00
Yiwei Zhang
488b2d4d25 virgl/venus/vtest: align capset and protocol with virglrenderer
Virgl and venus capsets along with vtest protocol v3 are all stable now.
This change is to align with:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1311

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
25556de759 venus: enable VK_EXT_debug_utils
After adopting common command buffers, venus can safely enable the
extension leveraging the common implementation.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
63cac09d74 venus: improve image memory requirement cache for image aliasing
We can strip the alias bit as the memory requirements are identical
between the bound image and the aliased image per spec.

Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
adcb967c5c venus: fix maint4 multi-planar memory requirements
Fixes: ce1bbd241e ("venus: extend image cache to vkGetDeviceImageMemoryRequirements")
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
ea6dc035d8 venus: fix ahb usage caching
Test: dEQP-VK.api.external.memory.android_hardware_buffer.*

Fixes: fde5cebec5 ("venus: fix image format cache miss with AHB usage query")
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Yiwei Zhang
8b2703fe08 venus: fix unexpected ring alive status expire upon owner thread switch
If the last owner thread has just unset the alive status and released
the watchdog, the new owner thread could have acquired to abort
unexpectedly if the ownership transfer occurs right before the next
owner's warn order. So we must set watchdog alive for new owner so that
it can properly check ring alive status in the next warn order.

Cc: mesa-stable
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
2025-03-24 21:58:10 +00:00
Aaron Ruby
3fb07c5412 gfxstream: No VIRGL_BIND_LINEAR for ColorBuffers
This was added as a temporary measure when the imageDrmFmtMod emulation
was not yet implemented. Accompanies the host-side change:
https://android-review.googlesource.com/c/platform/hardware/google/gfxstream/+/3558263

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34160>
2025-03-24 21:29:03 +00:00
Eric Engestrom
09778670b4 ci: disable llvmpipe & virgl traces jobs
Until piglit's traces download is fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
6cd7b65ac0 ci: run shader-db & zink-lvp on kvm runners
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
0def5682f9 ci: document new llvmpipe & softpipe failures since the migration
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Valentine Burley
a36379d973 ci: Add missing kvm runner tags
A recent change now requires the kvm runner tag to be explicitly listed
for jobs that need to run on runners with KVM capability.
This ensures the jobs are scheduled on compatible runners.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
89ab8a259c ci: drop placeholder-job tags to allow jobs to run
That tag was supposed to allow these jobs to run faster, but these
runners are currently having disk issues, and the normal runners look
like they're plenty fast enough (at least right now since almost nobody
runs ci jobs ^^).

We might revert this later, but for now let's merge this to unblock CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
e38724bd1c ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
7178425ccf ci: replace broken s3cp command with a simple curl call
The current `s3cp` implementation does not work anymore after the
migration, and instead of fixing it and propagating the fix down to us,
it's simpler to directly use `curl`.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
39d68d12f3 ci: do a regular GET request for /done files, instead of HEAD
The s3 proxy bug that required this commit was fixed [1], but since
these /done files are empty, there's no benefit to using HEAD requests.

[1]: 5acad8b02c

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
0a2650b08b ci/baremetal: make sure we can follow redirects on s3 downloads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
d425847793 ci: always abort if the curl download fails
Reported-by: @Valentine
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
213550d2e0 ci/piglit: drop usage of s3cp for a simple download
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
6ee58c19e5 ci/build: no need to list all the files that will go into the uploaded artifact
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
a47b2e3ad7 ci/init-stage2: document that only lava jobs upload results to s3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Eric Engestrom
3b72dca145 ci/container: fix image tags comment in trampoline script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
2025-03-24 20:45:52 +00:00
Yiwei Zhang
d2a7c1c452 docs: demote VK_KHR_shader_relaxed_extended_instruction
It's not part of core 1.3.

Fixes: 8b272c8d8c ("docs: update feature matrix for VK_KHR_shader_relaxed_extended_instruction")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34104>
2025-03-24 20:34:58 +00:00
Eric Engestrom
3c0e0c3d04 ci: document http proxy bug & disable farms relying on it
All the lava & baremetal farms have to be disabled because of this bug,
and until a fix is found and deployed to each of these farms.
2025-03-24 19:54:25 +01:00
Yiwei Zhang
5b11c3ff0a venus: use common cmd pool_link
We only implement the destroy func to leverage the existing link, and we
only give vk_command_buffer the ops but not the pool.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
4c0635ee04 venus: use vk_command_buffer internals
Use common tracking of cmd pool, cmd level and cmd state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
0a324d37da venus: use common vk_command_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
7a3c18fa8e venus: use vk_command_pool internals
No longer need to track allocator, device or queue family.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
58b0d2e234 venus: use common vk_command_pool
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
84b33aa6e1 venus: explicitly get vn_device from vk_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:59 +00:00
Yiwei Zhang
dfcad90240 venus: rename common vk object base member to vk
This way we avoid the confusing base.base or even base.base.base when
venus uses common objects. This also aligns with the naming of the other
drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34083>
2025-03-15 22:14:58 +00:00
Eric R. Smith
2ee3bef252 panfrost: consider xfb shader when calculating thread local storage size
Register spilling can cause us to require thread local storage (tls).
However, we were not adjusting the tls stack size space to account for
the tls needed for the extra xfb shader when transform feedback is
needed. We noticed this when testing register allocation in the
OpenGL CTS (for testing we had forced spilling where none happened
before).

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33935>
2025-03-15 15:04:25 +00:00
Lucas Stach
ed72d97d48 etnaviv/ci: remove fragcoord related fails on GC7000
Both GC7000 GPUs have the RA_WRITES_DEPTH feature, which needs a bit
more prodding to have valid fragcoord.zw components present in the
shader. This has been fixed by the previous commit, so we can remove
the related fails from the CI expectation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34081>
2025-03-15 10:56:21 +00:00
Lucas Stach
030af65603 etnaviv: enable forwarding ZW fragcoord components from RA to SH
On GPUs with the RA_WRITE_DEPTH feature, passing Z and/or W values
to SH can be gated. It doesn't have any impact on performance, so
maybe it's just to be able to free those register slots for other,
currently unknown, values. For now simply enable passing both Z and
W to SH unconditionally to make those GPUs behave like the ones
without the RA_WRITE_DEPTH feature.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34081>
2025-03-15 10:56:21 +00:00
Lucas Stach
b5c9748082 etnaviv: Update headers from rnndb
Update to rnndb commit 51dbdbd9b83a
("rnndb: document RA depth W forwarding gate").

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34081>
2025-03-15 10:56:21 +00:00
Bas Nieuwenhuizen
61feea6954 radv: Move support check out of winsys.
To get the right error code. Mostly shouldn't be winsys dependent
anyway, outside of the idea that if we explicitly emulate a device
we should just assume th euser knows what they're doing.

Fixes: c942d957b0 ("radv: fail to initialize when the AMD GPU generation is unsupported")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12792
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33964>
2025-03-14 23:18:13 +00:00
Lionel Landwerlin
5ba7e00d9f anv: Set limit_trig_input_range option for Company of Heroes 3
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12769
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34078>
2025-03-14 22:40:23 +00:00
Connor Abbott
cc09d5443b ir3: Use needs_full_helper_invocations
require_full_quads is incorrect because it isn't actually enabled by
quad operations. Use the newly-introduced needs_quad_helper_invocations
instead.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: 264d8a6766 ("ir3: Set need_full_quad depending on info.fs.require_full_quads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:58 +00:00
Connor Abbott
1621080df7 compiler,nir: Gather needs_full_quad_helper_invocations info
This is needed on Qualcomm, where there are separate fields to enable
just 3 fragments and all 4 fragments.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: 264d8a6766 ("ir3: Set need_full_quad depending on info.fs.require_full_quads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:58 +00:00
Connor Abbott
7a55e13939 nir, compiler: Rename needs_quad_helper_invocations
This currently treats coarse and fine derivatives the same, but Qualcomm
needs to know whether just coarse derivatives are used or fine
derivatives/quad ops are also used. Rename this to
needs_coarse_quad_helper_invocations make clear the difference from the
new field, needs_full_quad_helper_invocations.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Fixes: 264d8a6766 ("ir3: Set need_full_quad depending on info.fs.require_full_quads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:57 +00:00
Connor Abbott
640a5e28fd compiler/shader_info: Better document require_full_quads
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33862>
2025-03-14 21:55:57 +00:00
Connor Abbott
f244d54953 tu: Expose VK_KHR_maintenance8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
824cc0e933 ir3: Remove ir3_info::data
This isn't useful, and it was getting serialized resulting in garbage in
the blob and tests that check for consistent serialization failing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
9baf5aee1a tu: Handle a pipelineStageCreationFeedbackCount of 0
The spec says this is allowed to be 0.

Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
c3dc4540b5 tu: Handle R8->D24S8 and D24S8->R8 copies
This is now allowed in VK_KHR_maintenance8. Copies that reinterpret
D24S8 as any 32-bit format are also allowed, but they should already
work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
767818d8d9 tu: Handle D32S8 -> R32 and R32 -> D32S8 copies
When we copy the depth aspect of a D32S8 image to or from a R32
image, we don't need to split the copy or modify the aspect mask. Limit
this path to "true" D32S8->D32S8 copies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
12961c2c80 tu: Plumb through VkMemoryBarrierAccessFlags3KHR
We don't use the additional access flags for anything yet, but pass them
through to vk2tu_access in case we will need to for a future extension.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:05 +00:00
Connor Abbott
3800f4c199 tu: Implement VK_KHR_maintenance7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33780>
2025-03-14 21:27:04 +00:00
Alyssa Rosenzweig
8b39b75308 ail: drop fake modifiers
this just existed so upstream could build.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34075>
2025-03-14 20:51:36 +00:00
Alyssa Rosenzweig
ba8eeaee8c drm-uapi: update drm_fourcc.h
adds Apple modifiers from drm-misc-next:
https://cgit.freedesktop.org/drm-misc/commit/?id=c8619f5402cbcccfe58151b53421029852473e4c

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34075>
2025-03-14 20:51:36 +00:00
Pavel Ondračka
1b63ffc31e r300: remove support for tgsi_texcoord
We no longer need finalize_nir and thus we don't need to support
texcoord as well. This is a nice rs state cleanup.

This effectivelly reverts commits
0ac6801970 and
d4b8e8a481. Also import the previous
location fixup from the state tracker, which was removed when the
unconditional nir_opt_varying pass was introduced.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33961>
2025-03-14 20:23:01 +00:00
Pavel Ondračka
20b51133f3 r300: remove finalize_nir
This was added so we could report compile failures. Since we can
now just do that simply from create_vs/fs_state there is no need
for finalize_nir anymore.

Move the optimization loop to the beginning of create_vs/fs_state.
This could be probably optimized a bit more, but right now there
should be no functional change, we can improve the pass order later.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33961>
2025-03-14 20:23:00 +00:00
Ganesh Belgur Ramachandra
ba80a11b69 amd: use 128B compression for scanout images when drm.minor <63
Fixes: 8328e575 ("ac/surface/gfx12: enable DCC 256B compressed blocks and reorder modifiers")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33702>
2025-03-14 19:07:09 +00:00
Yiwei Zhang
04e9431f4f vulkan: update ALLOWED_ANDROID_VERSION for api level 35
Reviewed-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34030>
2025-03-14 18:39:07 +00:00
Yiwei Zhang
a0ea025314 vulkan: update ALLOWED_ANDROID_VERSION for api level 34
Reviewed-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34030>
2025-03-14 18:39:07 +00:00
Mike Blumenkrantz
f5c66e2d4a zink: fix refcounting of zink_surface objects
this was previously a no-op because the pointers were identical,
leading to an extra unref in check_framebuffer_surface_mutable()

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34077>
2025-03-14 18:12:20 +00:00
Mike Blumenkrantz
9d359c6d10 gallium: delete pipe_surface::width and pipe_surface::height
these fields are misleading and should always be replaced by either:
* the framebuffer width/height
* explicit function params to specify width/height

Co-authored-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33946>
2025-03-14 17:37:32 +00:00
Connor Abbott
e06cfa3e08 freedreno: Misc control registers updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34059>
2025-03-14 16:52:06 +00:00
Connor Abbott
be8a2a0aad freedreno/crashdec: Dump CP_BV_SQE_UCODE_DBG
This has the same format as CP_SQE_UCODE_DBG but for BV.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34059>
2025-03-14 16:52:06 +00:00
Connor Abbott
9d62adc0ac freedreno/crashdec: Fix and extend control reg dumping on a750
Handle the rearrangement of control registers, and dump a new section
with the rest of the control registers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34059>
2025-03-14 16:52:06 +00:00
Connor Abbott
92ceff4dce freedreno/crashdec: Handle hangs where the SQE is in RB
This is by far the most common cause of missing an "ESTIMATED HANG
LOCATION" - the SQE is processing kernel commands, even if the rest of
the GPU isn't.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34063>
2025-03-14 16:30:59 +00:00
Connor Abbott
4667ec043b freedreno/crashdec: Use register for RB rptr
The register is usually a few dwords ahead of the memory value used by
the kernel, which can lead to an inaccurate calculation of where the SQE
is.

To compensate for the more accurate rptr, increase the lookback
slightly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34063>
2025-03-14 16:30:59 +00:00
Connor Abbott
0709e87c94 freedreno/decode: Push hostaddr->gpuaddr conversion into highlight_gpuaddr()
For RB, it's not convenient to use a gpuaddr because of how the GPU
addresses wrap around. Instead pass the host address to the renamed
highlight_addr(), so that we can use it directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34063>
2025-03-14 16:30:59 +00:00
Karol Herbst
6181f52089 vtn: Support the UniformDecoration capability.
This is needed for SPIR-V 1.6 support in OpenCL. This capability enables
the Uniform and UniformId decorations which prior were Shader only.

The CTS ends up using those decorations on function arguments, but we can
just ignore handling them there for now.

Fixes the spirv16_uniformdecoration_uniform and
spirv16_uniformdecoration_uniformid CL CTS test inside test_spirv_new.

Fixes: bb6d371c0e ("rusticl: support SPIR-V 1.5 and 1.6")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34004>
2025-03-14 15:42:24 +00:00
Karol Herbst
3a9954c117 nir/serialize: fix decoding of is_return and is_uniform
Fixes: 3321a56d1d ("nir: Serialize all parameter attributes")
Fixes: 26cbb6b933 ("nir: Add parameter divergence info")

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34052>
2025-03-14 15:01:32 +00:00
Mike Blumenkrantz
c00701c83a egl/x11: unify swrast/kopper/dri3 paths a bit
most of this was duplicated, but there were a couple hard conditionals
that made it less obvious

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
0bb1c5e24b egl/x11: consolidate LIBGL_DRI3_DISABLE use on init
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
4e405af61c egl: delete dri2_egl_driver_fail
before refactoring egl init was more complex, but things are simpler
now and with recent hoisting this can all go away

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
b12a929bbe egl/x11: hoist and document dri3_x11_connect() during init
this was split in the dri3 and swrast paths, which made it somewhat
confusing how/when it could be called and what the intended results
might be

moving it up here enables further simplifications

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
1bc3d4a26a egl/x11: hoist up swrast/zink driver_name setting
this will allow streamlining some code in followup commits

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
cfae30147e egl/x11: simplify a kopper check on init
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
eca51b7978 egl/x11: hoist up dri2_get_xcb_connection call
but not out of dri2 init since that's a new display

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
cea4c94d17 egl: move kopper detection to display creation
this will simplify some checks later

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
323bad6b18 egl/x11: split out dri2 init entirely
this will enable simplifying the remaining codepaths with the expectation
that dri2 will be ripped out entirely after the next release

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
5466ff3a43 egl: hoist dri2 display creation up a level
this is always created for dri2 devices, and it can now be
consolidated in one place instead of duplicated all over

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:40 +00:00
Mike Blumenkrantz
c4c07136e6 egl: move _EGLDisplay DriverData association into dri2_display_create
this was duplicated all over

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:39 +00:00
Mike Blumenkrantz
5bcb09d9e7 egl: delete invalidate_available flag
this is unused

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:39 +00:00
Mike Blumenkrantz
8327bca4b1 egl/x11: always expose EXT_swap_buffers_with_damage
this is universally supported now

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33891>
2025-03-14 14:21:39 +00:00
Georg Lehmann
d1dca26941 aco/ra: disallow vcc definitions for pseudo scalar trans instrs
Foz-DB GFX1201:
Totals from 30 (0.04% of 79600) affected shaders:
Instrs: 58843 -> 58820 (-0.04%); split: -0.10%, +0.06%
CodeSize: 302228 -> 301944 (-0.09%); split: -0.13%, +0.04%
Latency: 204566 -> 204432 (-0.07%); split: -0.09%, +0.02%
InvThroughput: 136918 -> 136919 (+0.00%); split: -0.00%, +0.00%
SClause: 1241 -> 1249 (+0.64%); split: -0.56%, +1.21%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34006>
2025-03-14 13:53:55 +00:00
Georg Lehmann
b386659588 nir/opt_algebraic: create ubfe from (a & mask) >> c
Foz-DB Navi21:
Totals from 917 (1.16% of 79188) affected shaders:
Instrs: 2549482 -> 2544997 (-0.18%); split: -0.18%, +0.00%
CodeSize: 13781648 -> 13763616 (-0.13%); split: -0.13%, +0.00%
Latency: 24832087 -> 24825199 (-0.03%); split: -0.04%, +0.01%
InvThroughput: 5921339 -> 5914799 (-0.11%); split: -0.12%, +0.01%
VClause: 59910 -> 59898 (-0.02%); split: -0.02%, +0.00%
SClause: 62294 -> 62293 (-0.00%)
Copies: 221015 -> 220988 (-0.01%); split: -0.02%, +0.01%
VALU: 1717280 -> 1713332 (-0.23%); split: -0.23%, +0.00%
SALU: 359390 -> 358910 (-0.13%)
VMEM: 101966 -> 101924 (-0.04%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33455>
2025-03-14 11:15:04 +00:00
Samuel Pitoiset
b2a2d197f9 radv: track redundant register writes for PA_SC_HISZ_CONTROL on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34070>
2025-03-14 09:46:58 +00:00
Samuel Pitoiset
1e4cfd9dfa radv: emit a dummy PS state for noop FS on GFX12
It seems the hardware requires a dummy PS state with a noop FS,
otherwise it might just hang. This used to work just fine on older
gens.

Note that RadeonSI refuses to draw if VS or PS is missing and AMDVLK
seems to also always emit this state. So, this might be a bug that AMD
didn't encounter at all.

This fixes a GPU hang during loading with Ghostwire: Tokyo.

Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34070>
2025-03-14 09:46:58 +00:00
Lucas Stach
4608eef0a0 etnaviv: fix ETNA_MESA_DEBUG=no_early_z
This feature bit has inverted polarity from most other feature bits:
if the bit is present the driver should not use early Z. So the bit
must be set when the debug option to disable early Z is enabled.

Fixes: d600b45ccc ("etnaviv: Switch to etna_core APIs")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34064>
2025-03-14 09:08:24 +00:00
Samuel Pitoiset
2a07237b6b radv: enable RGP on GFX12
This should be working now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
3bf2f95a91 ac/sqtt: fix registers programming for GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
13836575e3 ac/rgp: bump instrumentation API version to 1.5
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
6b28cd8e0e ac/rgp: bump version to 1.6
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
0d68ede145 ac/rgp: add GFX12 definitions
Based on PAL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
f99e065e96 ac/rgp: few fixes for GFX11.5
Based on PAL.

Cc mesa-stable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34049>
2025-03-14 08:20:57 +00:00
Samuel Pitoiset
79c84e4b9c radv/ci: enable RADV_PERFTEST=video_decode,video_encode on TAHITI,HAWAII and POLARIS10
It's been super stable after 25 runs each in a row.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34069>
2025-03-14 08:12:24 +01:00
Yiwei Zhang
a7ba1291d2 panvk: fix dependency for EXT_display_control
VK_EXT_display_control requires VK_EXT_display_surface_counter, which we
can expose here.

Fixes: f6112a26c5 ("panvk: expose EXT_display_control")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34036>
2025-03-13 16:45:47 -07:00
Yiwei Zhang
305925c439 panvk: disable VK_KHR_shader_quad_control
VK_KHR_shader_quad_control requires VK_KHR_vulkan_memory_model or 1.2,
and neither is there yet.

Fixes: 0c40b1653d ("panvk: Enable VK_KHR_shader_quad_control for v10+")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34036>
2025-03-13 16:44:58 -07:00
Mike Blumenkrantz
773f84ccc9 meson: add i915 to 'all' build for gallium-drivers
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34046>
2025-03-13 22:12:56 +00:00
Mike Blumenkrantz
08450138c2 gallium: delete u_cache
unused

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
H*ck-yes-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34048>
2025-03-13 21:36:23 +00:00
Mike Blumenkrantz
33a98544ec util/tests: move u_half_test into half_float_test
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
H*ck-yes-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34048>
2025-03-13 21:36:23 +00:00
Mike Blumenkrantz
185a3f9105 gallium: delete tests
we have CI now

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
H*ck-yes-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34048>
2025-03-13 21:36:22 +00:00
Patrick Lerda
186fb5e73a r600: update the software fp64 support
This change began by fixing an old regression related to the dceil
functionality. This issue affected palm. Now, this change adjusts
the software fp64 support to make it fully operational.

This change was tested on palm and barts. This change fixes 561
"piglit run all" tests. The khr_gl tests are fixed as well (243 tests).
Here is a summary:
spec/arb_gpu_shader_fp64/execution/built-in-functions/*
spec/arb_gpu_shader_fp64/execution/fs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/execution/vs-isnan-dvec: fail pass
spec/glsl-4.00/execution/built-in-functions/*
spec/glsl-4.10/execution/conversion/*
khr-gl4[3-5]/compute_shader/fp64-case1: fail pass
khr-gl4[0-5]/gpu_shader_fp64/builtin/*

Fixes: aed6a39c10 ("glsl: Retire dround lowering.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33708>
2025-03-13 21:10:39 +00:00
Antonino Maniscalco
0ff322d1d9 freedreno/crashdec: Add check for CP_BV_SQE_STAT_ADDR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34057>
2025-03-13 20:48:47 +00:00
Antonino Maniscalco
ed64e62229 freedreno/crashdec: Avoid crashing on some traces
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34057>
2025-03-13 20:48:47 +00:00
Matt Turner
a6c717d006 anv: Remove ignored qualifier
Reported by clang's `-Wignored-qualifiers`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
5a76ce6a6e intel/isl: Remove ignored qualifier
Reported by clang's `-Wignored-qualifiers`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
53be1a5e5f iris: Remove ignored qualifier
Reported by clang's `-Wignored-qualifiers`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
ed42dc56f5 intel/compiler: Use correct enum type
Fixes: ce7208c3ee ("brw: add support for texel address lowering")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
d5dcc6a5c4 intel/compiler: Add missing breaks
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
e5af71478a intel/decoder: Remove assert(!"...") in recoverable condition
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
f160787038 hasvk: Use unreachable instead of assert(!"...")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
d4a2ed8970 anv: Use unreachable instead of assert(!"...")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
72066928bf intel/isl: Use unreachable instead of assert(!"...")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
0a63d629fe intel/compiler: Use unreachable instead of assert(!"...")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
8d6deb4073 glsl: Add missing break
Reported by clang's `-Wimplicit-fallthrough`.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:10 +00:00
Matt Turner
4953d2a014 glsl: Use FALLTHROUGH
Reported by clang's `-Wimplicit-fallthrough`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
1ab5b4f7db intel/compiler: Use FALLTHROUGH
Reported by clang's `-Wimplicit-fallthrough`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
b05c26f54b iris: Initialize pointer with NULL, not false
Reported by clang's `-Wbool-conversion`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
7534559f2f nir: Return NULL, not false, from functions returning pointers
Reported by clang's `-Wbool-conversion`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Matt Turner
702f554aae gallium: Return NULL, not false, from functions returning pointers
Reported by clang's `-Wbool-conversion`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
2025-03-13 20:11:09 +00:00
Adam Jackson
e06b834dfa loader: Stop looking in ${libdir}/tls/
We don't install there, haven't in a long time.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34058>
2025-03-13 19:45:45 +00:00
Connor Abbott
81f73c89de ir3: Fix const allocation when parsing assembly
This fixes computerator.

Fixes: 68ab25e6d4 ("ir3: split immediate state from rest of const state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34055>
2025-03-13 19:15:46 +00:00
Mike Blumenkrantz
4707e9c8b9 aux/trace: set sampler_view_release pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34045>
2025-03-13 18:31:42 +00:00
Mike Blumenkrantz
7e60e1bbec mesa: remove st_sampler_view::private_refcount
no longer used

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34045>
2025-03-13 18:31:42 +00:00
Mike Blumenkrantz
5ad5f1a93c gallium: make pipe_sampler_view::reference non-atomic
this object is per-context with refcounting performed exclusively in-driver,
so there is no longer a danger of false sharing

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34045>
2025-03-13 18:31:41 +00:00
Caio Oliveira
91feef40db brw: Simplify the test code for brw passes
The key change is to use a builder to write the expected shader result
and compare that.  To make this less error prone, a few helper functions
were added

- a way to allocate VGRFs from both shaders in parallel, that way the
  same brw_reg can be used in both of them;
- assertions that a pass will make progress or not, and proper output
  when the unexpected happens;
- use a common brw_shader_pass_test class so to collect some of the helpers;
- make some helpers work directly with builder.

The idea is to improve the signal in tests, so that the disasm comments
are not necessary anymore.  For example

```
TEST_F(saturate_propagation_test, basic)
{
   brw_reg dst1 = bld.vgrf(BRW_TYPE_F);
   brw_reg src0 = bld.vgrf(BRW_TYPE_F);
   brw_reg src1 = bld.vgrf(BRW_TYPE_F);
   brw_reg dst0 = bld.ADD(src0, src1);
   set_saturate(true, bld.MOV(dst1, dst0));

   /* = Before =
    *
    * 0: add(16)       dst0  src0  src1
    * 1: mov.sat(16)   dst1  dst0
    *
    * = After =
    * 0: add.sat(16)   dst0  src0  src1
    * 1: mov(16)       dst1  dst0
    */

   brw_calculate_cfg(*v);
   bblock_t *block0 = v->cfg->blocks[0];

   EXPECT_EQ(0, block0->start_ip);
   EXPECT_EQ(1, block0->end_ip);

   EXPECT_TRUE(saturate_propagation(v));
   EXPECT_EQ(0, block0->start_ip);
   EXPECT_EQ(1, block0->end_ip);
   EXPECT_EQ(BRW_OPCODE_ADD, instruction(block0, 0)->opcode);
   EXPECT_TRUE(instruction(block0, 0)->saturate);
   EXPECT_EQ(BRW_OPCODE_MOV, instruction(block0, 1)->opcode);
   EXPECT_FALSE(instruction(block0, 1)->saturate);
}
```

becomes

```
TEST_F(saturate_propagation_test, basic)
{
   brw_builder bld = make_shader(MESA_SHADER_FRAGMENT, 16);
   brw_builder exp = make_shader(MESA_SHADER_FRAGMENT, 16);

   brw_reg dst0 = vgrf(bld, exp, BRW_TYPE_F);
   brw_reg dst1 = vgrf(bld, exp, BRW_TYPE_F);
   brw_reg src0 = vgrf(bld, exp, BRW_TYPE_F);
   brw_reg src1 = vgrf(bld, exp, BRW_TYPE_F);

   bld.ADD(dst0, src0, src1);
   bld.MOV(dst1, dst0)->saturate = true;

   EXPECT_PROGRESS(brw_opt_saturate_propagation, bld);

   exp.ADD(dst0, src0, src1)->saturate = true;
   exp.MOV(dst1, dst0);

   EXPECT_SHADERS_MATCH(bld, exp);
}
```

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33936>
2025-03-13 17:43:17 +00:00
David Rosca
bdfb478be1 radeonsi/video: Only allow 64K_S swizzle mode for VCN < 2.2
Fixes: 7f7206f1a9 ("radeonsi/video: Allocate video buffers with modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12766
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34007>
2025-03-13 17:16:18 +00:00
Seán de Búrca
4fc4f3425a rusticl: add debug assertions to avoid truncating casts
v2: reorder commits for cherry-picking

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
474d8b6316 rusticl: mark CheckedPtr::write_checked as unsafe
While nullity of the CheckedPtr object is checked, writing to a raw
pointer safely requires that several other invariants be satisfied, so
it should be marked as unsafe to reflect that.

v2: reorder commits for cherry-picking and remove alignment check

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
1164d39c38 rusticl: rename CheckedPtr::copy_checked to match primitive method
v2: reorder commits for cherry-picking and remove alignment check

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
aa9109f0b5 rusticl/mem: use cl_slice::from_raw_parts in place of std::slice
The cl_slice version of this function checks several invariants for us,
providing a slight safety net.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
5e365f1674 rusticl/mem: don't create svm_pointers slice from null raw pointer
std::slice::from_raw_parts requires that the slice pointer be non-null,
even when the slice contains zero elements. Failing this invariant is
undefined behavior.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Seán de Búrca
faad7a8aad rusticl/mem: don't write more supported image formats than requested
clGetSupportedImageFormats will write as many supported formats as are
discovered at present, regardless of the value of num_image_formats.
This could result in writing out-of-bounds memory.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
2025-03-13 16:54:06 +00:00
Lucas Stach
25338cb295 etnaviv/ci: remove dEQP-GLES2.functional.polygon_offset.default_enable fail
This test already passed when executed standalone, but hit a issue triggered
by switching between fast and slow ZS clears when executed together with other
dEQP tests. This issue has been fixed by the previous commit, so we can drop
the fail from the CI expectation now.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34029>
2025-03-13 16:33:36 +00:00
Lucas Stach
fb0f9e6352 etnaviv: rs: fix slow/fast clear transitions
When a slow/fast/slow clear sequence is executed on a surface, the second
slow clear will not regenerate the clear command if the clear value of the
fast clear is the same as the one used for the second slow clear, as the
current stored surface clear value is the same as the new clear value.
The command generated on the first slow clear however may have used a
different clear value, which is now submitted unchanged to the hardware on
the second slow clear.

Fix this by only generating the clear command if there is no valid one
already. If we already have a valid clear command simply update the fill
value in that command with the new clear value. This has some marginal
overhead, but has been chosen over the alternative of adding more state by
remembering the last slow clear value.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34029>
2025-03-13 16:33:36 +00:00
Lionel Landwerlin
35df3925ca brw: ensure VUE header writes in HS/DS/GS stages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12820
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34041>
2025-03-13 16:06:01 +00:00
Lionel Landwerlin
c60180ba63 brw: fix spilling for Xe2+
The problem occurs with a series of instructions build the subgroup
invocation value :

mov(8)          g23<1>UW        0x76543210V
add(8)          g23.8<1>UW      g23<8,8,1>UW    0x0008UW
add(16)         g23.16<1>UW     g23<16,16,1>UW  0x0010UW

Our register spilling code operates on physical registers (64B on
Xe2+) and using the brw_inst::is_partial_write() helper only considers
32B registers. So the spiller doesn't see that the add(16) instruction
is doing a partial write and ends up discarding the previous value.

You can reproduce the issue by running a test like :

INTEL_DEBUG=spill_fs ./deqp-vk -n dEQP-VK.compute.pipeline.cooperative_matrix.khr_a.subgroupscope.constant.uint8_uint8.buffer.rowmajor.linear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: aa494cbacf ("brw: align spilling offsets to physical register sizes")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33642>
2025-03-13 15:29:22 +00:00
Lionel Landwerlin
602843a881 vulkan/runtime: rely on vk_buffer::device_address
With all the RT-enabled driver setting this field, we can now have the
runtime use it instead of calling into the driver's vfunc.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34026>
2025-03-13 14:44:06 +00:00
Lionel Landwerlin
cbb0211c1e lavapipe: fill buffer address
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34026>
2025-03-13 14:44:06 +00:00
Patrick Lerda
085cfc98cc r600: fix cayman main non-deterministic behavior problem
Cayman has a non-deterministic behavior issue which is
visible with the test below (arb_shader_image_size).
The tests fail randomly at the "fragment" test category.
Anyway, if the "compute" category is removed, the same
tests are working flawlessly.

The "compute" part of the driver was interfering with the
graphic pipeline. The culprit is the packet PKT3_DEALLOC_STATE
which puts the gpu in an incorrect state to perform some
graphic operations.

This change fixes this problem by issuing a PKT3_CLEAR_STATE
packet just after the PKT3_SURFACE_SYNC packet. As explained
by d51dbe048a PKT3_DEALLOC_STATE is mandatory on cayman to
avoid a gpu hang at the PKT3_SURFACE_SYNC stage.

This correction makes tests like
"spec@glsl-4.30@execution@built-in-functions@cs-.*" to pass
in an utterly deterministic way without random failures.
This change removes around 500 random failures for a
"piglit run all".

For instance, this issue is triggered on cayman with
"piglit/bin/arb_shader_image_size-builtin -auto -fbo".

Fixes: d51dbe048a ("r600g/compute: Emit DEALLOC_STATE on cayman after dispatching a compute shader.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33973>
2025-03-13 14:20:43 +00:00
David Rosca
6f35d3768d gallium/vl: Return YUV plane order for single plane formats
The order only matters for multi plane formats, but we still need to
return valid value for single plane formats.

Fixes crash reported here: https://github.com/mpv-player/mpv/issues/15992

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33938>
2025-03-13 13:46:36 +00:00
Yiwei Zhang
b346d8acfc venus: support VK_EXT_image_sliced_view_of_3d
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
638341d709 venus: support VK_EXT_pipeline_library_group_handles
This completes the entire series of ray tracing support.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
5894f35c9c venus: sync latest protocol for 2 more extensions
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
79027caf6f venus: support VK_EXT_debug_report
We use common impl here. Supporting debug utils would require lots of
interceptions in venus, so we'd not go that far but would only expose
debug report. Better than nothing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
cebb8e8c95 venus: back out display control
Venus can only enable VK_EXT_display_control after using common vk_sync,
unless we add new layered implementation in common. Like how I replaced
the common android present impl, but no bandwidth at this point.

Fixes: 89ec6c4d8f ("venus: add a few more trivial extensions")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Yiwei Zhang
f1e7fdc2ef venus: properly enable display platform extensions
Fixes: 673a95e5b4 ("venus: align on wsi frontends support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34037>
2025-03-13 13:24:48 +00:00
Eric Engestrom
466387ce36 zink+radv/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
d791332858 zink+radv/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
ad601a67d3 radv/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
6f3e83d645 zink+nvk/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
d319aa10a3 zink+nvk/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
e9e34fa7b2 zink+nvk/ci: document new failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
a1f72544c8 nvk/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
a33f6910b7 nvk/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
8bf17d122b freedreno/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
ba097261e9 freedreno/ci: document fixed test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
ad742146c4 lvp/ci: document flakes seen over the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
025c83ae28 lvp/ci: remove duplicate flakes (noticed after sorting)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
9da78f0778 lvp/ci: fix sorting of flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
96b79ec4c3 lvp/ci: skip tests that are timing out (>1 min)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
d2bd6b1b9d lvp/ci: document fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34043>
2025-03-13 12:51:51 +00:00
Eric Engestrom
a0b457aca6 meson: announce that clover is deprecated (slated for removal)
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385;
the timeline is not 100% decided yet, but let's warn users already.

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34021>
2025-03-13 12:20:45 +00:00
Samuel Pitoiset
f46830912e aco: do not apply OMOD/CLAMP for pseudo scalar trans instrs
This optimization seems broken because eg. v_s_log_f32 uses SGPRs
for both the source and destination but applying OMOD seems to require
VGPRs.

This fixes a GPU hang when launching Enshrouded on GFX1201.

No fossils db changes on GFX1201.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34027>
2025-03-13 11:22:10 +00:00
Caio Oliveira
ce71f2badd brw: Move defs analysis back to its place in saturate propagation
The premise of the change was wrong: the case where the defs analysis
was required was rare and requiring the analysis inside just the
case we care was being used for another analysis too.  So for now,
the change doesn't really helps.  I'll revisit this whole pass later on.

This backs out commit 6e19215810.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34039>
2025-03-13 10:59:30 +00:00
Valentine Burley
6a7f174fb3 ci/deqp: Delete more uncompressed caselist files
Remove the mustpass caselist files from the assets folder as well,
reducing the x86_64_test-android container size by 130 MB.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34025>
2025-03-13 10:02:12 +00:00
Samuel Pitoiset
e519e0b9e6 radv: update conformance version
A lot of people (including me) misinterpreted the conformanceVersion
field for so long. The Vulkan spec wasn't very clear either but it's
going to be clarified soon.

VkConformanceVersion is actually unrelated to the official CTS
conformance process in Khronos. It just reports the latest CTS version
that the driver can pass, not more.

For GFX8+, RADV should be passing CTS 1.4.0.0 on all GPUs because we
validated this CTS version recently for Vulkan 1.4.

For GFX6-7, which only suppports Vulkan 1.3, RADV should also be
passing CTS 1.4.0.0, because newer versions of the CTS can be used
to validate a driver against an older version of the spec, so
it's perfectly fine to report a higher CTS version than the Vulkan version.

Newer CTS versions likely can't pass 100% due to a DGC bug that I still
need to fix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12799
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34018>
2025-03-13 09:33:33 +00:00
Eric Engestrom
3ea479c584 ci/deqp: backport fix for dEQP-VK.binding_model.buffer_device_address.*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34028>
2025-03-13 07:05:56 +00:00
Caio Oliveira
6e19215810 brw: Get the reference to brw_def_analysis only once in saturate propagation
Instead of calling `require()` every instruction, call it once per pass.
Even though the defs are cached (i.e. we are not re-calculating them every
instruction), this prevents the extra check and the call to analysis
validation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34010>
2025-03-13 04:52:01 +00:00
Guilherme Gallo
fb224e9016 ci/lava: Fix LAVA lima jobs
lima uses a different version from other farms, where some log output
patches were not delivery yet, so let's use a temporary fix to make
those job traces look as nice as the other ones.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33994>
2025-03-13 00:45:59 -03:00
Guilherme Gallo
0330522e99 ci/lava: Fix LAVA lima jobs
lima uses a different version from other farms, where some log output
patches were not delivery yet, so let's use a temporary fix to make
those job traces look as nice as the other ones.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33994>
2025-03-13 03:31:31 +00:00
Faith Ekstrand
ad90dbabe4 egl/kopper: Update the EGLSurface size after kopperSwapBuffers()
Otherwise, the size of the EGLSurface and the drawable may get out of
sync if kopper needs to re-create the swapchain at a different size.
This can cause problems with things like eglSetDamageRegionKHR() where
the core EGL code clamps them to the size in the EGLSurface.

With Wayland, it's up to the client to choose a size and resize by
creating a new EGLSurface with a different size.  Only on X11 can we
get a resize side-band like this.

Normally, without kopper, this goes the other direction where the X11
EGL code will detect a surface size change in dri2_x11_query_surface()
and it invalidates the drawable if they've changed, forcing
re-allocation.  Kopper, however, works more like the DRI2 path where we
just get handed buffers at some size decided by X11 and have to deal
with them.  In the DRI2 path, the size is unconditionally updated by
dri2_x11_get_buffers().  This is roughly equivalent, updating the size
right after every call to kopperSwapBuffers().

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12797
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34015>
2025-03-13 02:02:19 +00:00
Faith Ekstrand
dc8714c568 egl/x11: Re-order an if statement
Switch on kopper first so it's easier to do other, common things on the
kopper path.

Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34015>
2025-03-13 02:02:19 +00:00
Dave Airlie
2e3b23539e radv/video: don't try and send events on UVD devices.
This should fix some hangs on polaris when decode is forced on.

Fixes: 95a980b61f ("radv/video: add event support for VCN4")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34013>
2025-03-12 23:53:39 +00:00
Caio Oliveira
308f56ef82 brw: Add missing dependency classes to various passes
- brw_lower_3src_null_dest: Allocating a new destination, so include
  INSTRUCTION_DATA_FLOW class.

- brw_lower_alu_restriction: Removing instruction, so include
  INSTRUCTION_IDENTITY.  No details are changed so remove
  INSTRUCTION_DETAIL.

- brw_lower_vgrfs_to_fixed_grfs: Changing source and destination
  numbers, so include INSTRUCTION_DETAIL.

- brw_lower_send_gather: Insert new instructions (scalar register) and
  change sources and other information on existing ones.  So include
  INSTRUCTION_DETAIL and INSTRUCTION_IDENTITY.  Promote to INSTRUCTIONS.

- brw_opt_eliminate_find_live_channel: Can change source, so include
  INSTRUCTION_DATA_FLOW.

- brw_opt_copy_propagation_defs and brw_opt_cse_defs: Both can remove
  instructions, so include INSTRUCTION_IDENTITY.  Promote to
  INSTRUCTIONS.

- brw_opt_saturate_propagation: Instruction can have `sat` modified,
  and operands can have type modified, so include INSTRUCTION_DETAIL.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33993>
2025-03-12 22:44:10 +00:00
Valentine Burley
cff40b1512 zink/ci: Work around recent OOM issues in zink-anv-adl
Lower the concurrency for the zink-anv-adl job to avoid the out-of-memory
issues seen recently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34022>
2025-03-12 20:36:45 +00:00
Guilherme Gallo
b3b1e120a1 ci/update_tag: fix linter errors
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Guilherme Gallo
82073f7be3 ci/bin: update_tag: improve tag load
Replace global path variables with ProjectPaths dataclass
- Add explicit file existence check before loading YAML
- Enhance tag retrieval by checking environment variables first
- Add logging for better debugging of tag selection process
- Remove redundant file existence check in main function
- Improve error handling for missing conditional tags file

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Guilherme Gallo
5798f5d05f Revert "ci: setup-test-env: Prefer functions over aliases"
This reverts commit 1cc2c738bb

We originally changed some aliases into functions so scripts could use
them without needing to be sourced, keeping the environment cleaner.

However, this broke `x_off`, which is supposed to stop debug logs
(xtrace output) from showing in the console. The function version still
triggered xtrace before disabling it, while the alias correctly
redirected the logs to `/dev/null`.

It also fixes the `bin/ci/update_tag.py` script to be able to reuse the
aliases via double sourcing the setup-test-env.sh and the respective
build script.

Reported-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33863>
2025-03-12 20:04:20 +00:00
Yiwei Zhang
283866d2fd venus: add a new debug option to revive memory budget support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
3e740211a8 venus: default to passthrough ray tracing support
Already fully tested via cts and multiple real things on a hw impl.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
b2040900d0 venus: support VK_EXT_nested_command_buffer
Venus query records have been properly propagated from nested cmds
already, so no special care is needed here for qfb optimizations.

Test:
- dEQP-VK.api.command_buffers.*nested*
- dEQP-VK.conditional_rendering.*nested*
- dEQP-VK.draw.dynamic_rendering.nested_*
- dEQP-VK.multiview.*nested*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
7b310cb340 venus: support VK_EXT_attachment_feedback_loop_dynamic_state
Test: dEQP-VK.pipeline.*.attachment_feedback_loop_layout.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
edcc7148ba venus: support VK_EXT_depth_clamp_control
Test: dEQP-VK.draw.*clamp_control*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:13 +00:00
Yiwei Zhang
8914447d9e venus: support VK_EXT_depth_bias_control
Test:
- dEQP-VK.rasterization.depth_bias_control.*
- dEQP-VK.rasterization.depth_bias_control.*_secondary_cmd_buffer_inherit_renderpass
- dEQP-VK.rasterization.depth_bias_control.*_secondary_cmd_buffer_unspecified_fb
- dEQP-VK.pipeline.*.extended_dynamic_state.*depth_bias_repr_info*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
b9207d3ad9 venus: support VK_EXT_legacy_dithering
Test: dEQP-VK.*.dithering.v2.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
cb5fa89bc4 venus: support VK_EXT_filter_cubic
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
89ec6c4d8f venus: add a few more trivial extensions
Below are added:
1. VK_GOOGLE_decorate_string
2. VK_GOOGLE_hlsl_functionality1
3. VK_GOOGLE_user_type
4. VK_EXT_display_control
5. VK_EXT_hdr_metadata

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
9e01731bc9 venus: sync latest protocol for more extension support
This sync also drops redundant vn_call_* helpers.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Yiwei Zhang
e2c5435808 venus: drop vn_call usage on apis without any returns
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33992>
2025-03-12 19:41:12 +00:00
Alyssa Rosenzweig
ac0ca63b9d v3dv: use the stats framework
This doesn't "go all the way", ideally we'd plumb stats into the broadcom
compiler and then reuse the generated code for GL. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921 for an
example of that. But this is a step in the right direction by itself.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33922>
2025-03-12 16:49:46 +00:00
John Anthony
8a47ae456c panvk: Avoid division by zero for vkCmdCopyQueryPoolResults
Stride can be zero if there are less than two queries to copy.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 7755c41b3e ("panvk/csf: Rework the occlusion query logic to avoid draw flushes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34020>
2025-03-12 14:22:39 +00:00
David Rosca
43c99d3928 frontends/va: Don't filter supported formats according to config RT format
This matches Intel driver. Chromium always sets RT format to YUV420
which would cause us to not report other formats as supported.
Only check that the RT format is actually supported when creating
config, but don't limit supported surface formats.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34001>
2025-03-12 13:57:54 +00:00
David Rosca
47a9312a5d frontends/va: Use ARGB as default fourcc for RGB32 RT format
This matches Intel driver and is what Chromium expects.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34001>
2025-03-12 13:57:54 +00:00
David Rosca
f87d72152c frontends/va: Support A8R8G8B8 format for processing
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34001>
2025-03-12 13:57:54 +00:00
Ella Stanforth
332b313547 v3d: enable framebuffer fetch
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33766>
2025-03-12 13:28:16 +00:00
Ella Stanforth
6023a46d02 v3d/compiler: Implement load_output
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33766>
2025-03-12 13:28:16 +00:00
Lionel Landwerlin
de2a65ade6 anv: fix non page aligned descriptor bindings on <Gfx12.0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ab7641b8dc ("anv: implement descriptor buffer binding")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33911>
2025-03-12 12:23:24 +00:00
Yiwei Zhang
06369caa40 pan/kmod: set DRM_RDWR for exported dma-bufs
This allows the exported fds to be mapped for writing. This is needed
for virtgpu native ctx support where the fds are mapped rw when the
mappings are added to the guest by kvm. This aligns with other mesa
drivers, and unblocks the extended testing with venus on top.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34017>
2025-03-12 11:54:22 +00:00
Georg Lehmann
cac4287aab aco/validate: fix scalar source validation for DPP and gfx11+ VINTERP
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33969>
2025-03-12 11:31:54 +00:00
Georg Lehmann
3b5e537b09 aco/gfx11.5: remove vinterp ddx/ddy path
While the idea to take advantage of the higher throughput wasn't bad,
the hardware wasn't design with this in mind and doesn't behave like expected
with constant sources.

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33969>
2025-03-12 11:31:54 +00:00
Antonio Ospite
bac77bb30d ci/android: add a job using android-cts instead of deqp-runner
We also want to run Android CTS in the Android jobs.

Since the Android CTS is quite large, download it and strip it down to
only contain the interesting tests, so to reduce the space taken in the
container image.

Eventually we might want to have android-cts be run via deqp-runner
itself, but for now add a proof-of-concept mechanism which calls the
android-cts directly and uses an ad-hoc handling of expectations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
a6a38667f9 ci/android: add an android-deqp-runner.sh script
To run deqp-runner in cuttlefish we do something similar to
deqp-runner.sh but adapted to be used on Android via adb.

Isolate those adapted commands in an android-deqp-runner.sh script so
that in the future it will be easier to compare with deqp-runner.sh and
evaluate if deqp-runner.sh and android-deqp-runner.sh could be possibly
consolidated into a single script.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
e3a941720e ci/android: move all dEQP handling in one place in cuttlefish-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
ef496469bf ci/android: pass -vsock_guest_cid to launch_cvd
This reduces the risk of conflicting ports on the host system.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
074297aea1 ci/android: push /deqp-gles/mustpass/egl-main.txt.zst
Push /deqp-gles/mustpass/egl-main.txt.zst instead of the uncompressed
version which also have a version number in the path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
ae574a08c6 ci/android: use an x86_64_only cuttlefish image
In .gitlab-ci/cuttlefish-runner.sh 32bit libraries were removed but they
were not being replaced with newer ones, however this caused some
problems because by default the x86_64 target in AOSP is still
multi-library and for example the 32bit zygote process ended up crashing
because of the missing 32bit libraries, causing a general system
instability.

Since the CI is only building 64bit libraries for the android target,
use an x86_64_only cuttlefish product which only has components and
libraries built for the 64bit target, this avoids dealing with 32bit
EGL/Vulkan libraries at all, preventing any possible cause of
instability.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
3520ed0f2c ci/android: bump CUTTLEFISH_BUILD_NUMBER
Bump CUTTLEFISH_BUILD_NUMBER to get a newer version that fixes some
issues with the `mesa_swrast_guest_angle` GPU_MODE.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
7b4aa9cf80 ci/android: increase the waiting time to stop the cuttlefish launcher
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
0a267694db ci/android: stop cuttlefish before copying the logs, to log everything
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
6d4ebb3ff4 ci/android: disable modem simulator in cuttlefish, it is not needed
Disable the modem simulator in cuttlefish, it is not needed for testing
the graphics subsystem and avoids opening a few vsock ports which
reduces the chance of collisions in case of multiple instances of
cuttlefish running concurrently.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
e9b98b53b4 ci/android: disable audio in cuttlefish, it is not needed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:17 +00:00
Antonio Ospite
a8f98befe3 ci/android: don't set HOME globally in cuttlefish-runner.sh
Having HOME defined globally could mess up other things like adb config
files.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:16 +00:00
Antonio Ospite
f8fc7297cb ci/android: don't do unnecessary cleanup
Cleaning up and stopping cuttlefish before launching it is not strictly
necessary when using gitlab shared runners.

This can be added back later when we have a better justification.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
2025-03-12 10:29:16 +00:00
Konstantin Seurer
fc12fafb1d radv/meta: Change the return type of get_r32g32b32_format to VkFormat
Gets rid of some compiler warnings.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33983>
2025-03-12 10:07:37 +00:00
Lionel Landwerlin
29865b41fb anv: simplify internal blorp helper
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
900483f13f anv: use addresses for buffer<->image copies
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
02bbe2f9c5 anv: track protection on anv_address
This simplifies the propagation of the protection value, we just set
it on buffer->address at creation time and forget about it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
648d843813 anv: move xfb buffer storage to 64bit address + mocs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
3c0dcfeb0f anv: move vertex buffer storage to 64bit address + mocs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Lionel Landwerlin
d254dc4eaf anv: move index buffer entry point out of genX code
Take the opportunity to move to 64bit address + mocs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33909>
2025-03-12 09:37:50 +00:00
Samuel Pitoiset
60b2e6f8ac radv/tests: add few tests that verify drirc options
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
8abe6beb3c radv/tests: add a test to verify that pipeline hash matches RGP<->Fossilize
Very useful to get the fossil from one RGP capture.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
3da9d6dac9 radv/tests: add a test to verify that pipelineCacheUUID is invariant
This was recently broken because pipelineCacheUUID was computed using
the physical device cache key. This caused SteamOS precompilation to
not happen for games that have shaders-based drirc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
19e62c7abc radv: add a small framework for RADV specific tests
There are a lot of things that can't be tested outside of the driver,
like drirc workarounds, RADV_DEBUG options and debugging stuff.

Writing RADV specific tests would help to avoid introducing regressions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
b8e3f66328 radv/winsys: enable has_timeline_syncobj for the null winsys
For testing the dedicated sparse queue drirc with the null winsys.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:16 +00:00
Samuel Pitoiset
511d2a9c2e ci: enable build-radv-tests for debian-clang and debian-vulkan
Similar to ACO tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:15 +00:00
Samuel Pitoiset
5fe5fb147e meson: add build-radv-tests option
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33875>
2025-03-12 09:07:15 +00:00
Valentine Burley
4a4e0c833c ci: Enable Perfetto in debian-no-libdrm for Turnip build testing
This ensures that the Perfetto-enabled Turnip build is tested, helping to
catch potential breakages that would otherwise go unnoticed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33999>
2025-03-12 07:11:06 +00:00
Lionel Landwerlin
4082e22676 anv: fill runtime buffer device_address field
Might be useful if the runtime starts using that field.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33917>
2025-03-12 06:39:10 +00:00
Mike Blumenkrantz
73da0dcddc gallium: eliminate frontend refcounting from samplerviews
A significant CPU performance bottleneck in mesa GL is refcounting atomics:
even with the current pinning attempts, eliminating them can yield huge
performance gains (easily verified by running drawoverhead with return false at the top of pipe_reference_described()).

This is a proof of concept for removing refcounts from gallium objects,
namely sampler views and resources. Sampler views were smaller in scope,
so I started there. This MR alone is not expected to noticeably affect
performance, though if applied to all drivers/frontends,
it would enable a bunch of code deletion for crazy samplerview
refcounting hacks currently used to try circumventing the existing overhead.

Co-authored-by: Karol Herbst <kherbst@redhat.com
Co-authored-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33813>
2025-03-12 01:37:28 +00:00
Mike Blumenkrantz
f47da0caef st/drawpixels: move sv unref out to callers
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33813>
2025-03-12 01:37:28 +00:00
Mel Henning
8d4a3729a3 vulkan: Relax bda assert for zero-size buffers
Fixes: 73da18b956 ("vulkan: Add device address helpers to vk_buffer")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33988>
2025-03-12 01:09:54 +00:00
Tapani Pälli
de367eec07 intel/dev: reduce warning noise from urb settings II
In 4064b5546b, the idea was to have the minimum value as if all
stages are active, however hwconfig does not follow that for the
tessellation control stage. Ignore min values from hwconfig.

Fixes: 4064b5546b ("intel/dev: reduce warning noise from urb settings");
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33554>
2025-03-12 00:29:05 +00:00
Maaz Mombasawala
f04287c0be svga: Check float type when emitting atomic instructions
When translating atomic instructions, the base type of the imageView can be
float only for image_atomic_exchange. If a float type image is used with other
atomic instructions the results are undefined.
Enforce this check in the shader translator and don't emit any instruction if
it fails.
Fixes crash in piglit test arb_shader_image_load_store@invalid.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Maaz Mombasawala
3da0774be1 nir: Add option to preserve double immediates in tgsi shader.
The nir to tgsi translator flattens all constants in the nir shader into uint32
immediates. In the svga driver, the vgpu10 shader translator then packs all
these immediates into a constant buffer, and also optimizes it to prevent
repetitions by only emitting a 32-bit constant once.
This can cause problems with double sized constants, since either the lower or
higher 32-bits of different 64-bit constant can be identical, and in the constant
buffer that repeating 32-bit value will be emitted only once, so a 64-bit
constant gets split into two non-contiguous 32-bit values.
When this 64-bit constant is then invoked by a double instruction live ddiv or
dmul, the source register can now have invalid swizzles like .xz or .xw since
its 32-bit components are not contiguous.
We have seen this happen in the piglit test -
spec@arb_gpu_shader_fp64@execution@glsl-fs-loop-unroll-mul-fp64
which emits invalid swizzle values for double instructions.

To fix this, introduce a new option in nir to tgsi shader translator that
preserves uint64 constants. When a 64-bit immediate is translated into svga
shader code, its 32-bit components are contiguous and aligned in the constant
buffer, so accessing them only emits valid swizzles .xy and .zw.

Other drivers using the nir to tgsi shader translater should not see any change
in the tgsi shader emitted unless they too explicitly invoke the
keep_double_immediates option like svga.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Maaz Mombasawala
882ad3fa3e svga: Add all tgsi double instructions for shader codegen checks
During translation of tgsi shaders to vgpu10 shader code that is sent to
svga device, we may get as input a double instruction with incorrect
swizzles such as xzxz. In this case we have a workaround to move the value
in that register to a temporary register with an xyzw swizzle.

However the functions that check if the instruction has double source or
destination did not check for all instructions, such as DDIV, so if
incorrect swizzles are sent in the shader tgsi code then the same
incorrect swizzle is also emitted in the vgpu10 shader code.

Fix this by adding all the double instructions in double checking
functions.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Charmaine Lee
73f4980dba svga: remove tgsi semantic in shader compiler key
Change shader image return type in shader compiler key to
VGPU10_RESOURCE_RETURN_TYPE.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33749>
2025-03-11 23:28:33 +00:00
Faith Ekstrand
dcbf5f08eb loader/nouveau: Fix the comment in nouveau_zink_predicate()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34009>
2025-03-11 23:00:09 +00:00
Samuel Pitoiset
c627097841 radv/amdgpu: fix device deduplication
To correctly deduplicate device inside the winsys, it should use the
fd or amdgpu_device_handle. Using the allocated ac_drm_device as key
is obviously broken.

Not deduplicating devices breaks memory budget and a bunch of games
were broken.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12686
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12775
Fixes: a565f2994f ("amd: move all uses of libdrm_amdgpu to ac_linux_drm")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34005>
2025-03-11 22:35:46 +00:00
Sviatoslav Peleshko
bd45b738b7 drirc: Apply assume_full_subgroups_with_shared_memory to Resident Evil 2
The game uses a compute shader for occlusion culling. This shader lacks
proper groupshared memory sync, and needs 32-wide subgroup to work
correctly.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7595
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23408>
2025-03-11 22:06:26 +00:00
Sviatoslav Peleshko
369aec5704 anv: Add full subgroups workaround for the shaders that use shared memory
This workaround is similar to anv_assume_full_subgroups, but it applies
to the shaders that use shared memory. If they rely on the implicit
synchronization, and we choose a smaller group size than the
(broken) shader expects, it will produce incorrect results.

Cc: mesa-stable
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23408>
2025-03-11 22:06:25 +00:00
Faith Ekstrand
7c47a3d0f7 vtn: Support cooperative matrices in OpConstantNull
Cooperative matrix initializers are a single scalar value that gets
broadcasted to the entire matrix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12679
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33747>
2025-03-11 21:35:22 +00:00
Natalie Vock
0e7c94b2b3 ac/llvm: Don't use getTriple() on LLVM21+
setTargetTriple() takes a Triple now.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33981>
2025-03-11 20:54:34 +00:00
Eric Engestrom
1f93dd7d37 meson: simplify video-codecs option parsing
The extra `all_free` that now remains in the list will be ignored in the
loop below anyway so there is no need to have complex code to try to
remove it.

This also means it becomes possible to set things like
`-D video-codecs=all_free,vc1dec`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33949>
2025-03-11 20:21:57 +00:00
Aaron Ruby
95161bb13d gfxstream: Resolve/clean-up inconsistencies with advertising emulated
extensions

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
2e15763686 gfxstream: Full emulation support for VK_EXT_image_drm_format_modifier
- Fix the checks for emulation (based on presence of the extension
on the host)
- Add flag in gfxstream_vk_physical_device, otherwise the real device
extensions are not properly filtered when communicating with the host.
- The "function" version of the check in ResourceTracker can eventually
just check the flag once mesa and gfxstream objects are combined
- Remove the duplicate getPhysicalDeviceFormatProperties2 impl, this is
covered by the ResourceTracker impl
- Add ResourceTracker impl for getImageDrmFormatModifierPropertiesEXT
- Remove isDmaBufImage flag from VkImage_info, and clean up all the code
associated with this flag. In on_vkCreateImage, all required info is
avaialble from the extMemImageCi::handleType. In on_vkAllocateMemory,
this is all associated with the tiling of the dedicatedImage for the
allocation

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
4197081329 gfxstream: Remove vkGetImageSubresourceLayout ResourceTracker entry
... and the linearPeerImage that was backing emulated drmFmtMod images.

With proper drmFmtMod emulation, the VkImage itself will be
linear-tiled.

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:34 +00:00
Aaron Ruby
9447de5dc4 gfxstream: Downgrade log severity when enabling params in LinuxVirtGpu
Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
2025-03-11 20:04:33 +00:00
Alyssa Rosenzweig
cdd7b36faa tu: use the stats framework
This doesn't "go all the way", ideally we'd plumb stats into ir3
compiler and then reuse the generated code for GL. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921 for an
example of that. But this is a step in the right direction by itself.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33923>
2025-03-11 19:35:50 +00:00
Yiwei Zhang
5badd0d101 venus: sync protocol for accel struct indirect build encoding fix
ppMaxPrimitiveCounts also requires the same nested dynamic array special
treatment.

Fixes: 6bac77b75c ("venus: sync protocol for ray tracing support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33995>
2025-03-11 19:14:23 +00:00
Yiwei Zhang
9fb149d4fe venus: sync protocol support for maint7
make a separate sync mainly to isolate the next fix

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33995>
2025-03-11 19:14:23 +00:00
Maíra Canal
7775c79035 v3dv: don't overwrite the primary fd if it's already set
If a valid primary file descriptor is already set (e.g. from vc4),
don't overwrite it with -1.

This prevents losing a valid primary fd and resolves issues arising
when vc4 is the first node returned by `drmGetDevices2()` and v3d is
the second.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12777
Fixes: 188f1c6cbe ("v3dv: rewrite device identification")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33958>
2025-03-11 18:31:58 +00:00
Dave Airlie
2983ca0d20 loader/nouveau: load zink as the GL driver for turing and above.
If the kernel supports modifiers and the GPU is a Turing+ then
force using zink instead of nvc0.

Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29232>
2025-03-11 17:39:14 +00:00
Samuel Pitoiset
d1a2ba57f9 radv: fix a GPU hang with inherited rendering and HiZ/HiS on GFX1201
With secondary command buffers, inherited rendering can be used but
it's basically impossible to know if the depth/stencil attachment
enabled HiZ/HiS. But it's required to disable WALK_ALIGN8 to avoid
GPU hangs.

This assumes that HiZ/HiS is enabled for inherited rendering as long
as a depth/stencil attachment is used. It's not the most optimal
approach but it's not supposed to hurt either.

This fixes a GPU hang with
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_cmdbuffers
and friends.

GFX1200 isn't affected because it doesn't support HiZ/HiS.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33986>
2025-03-11 14:14:25 +00:00
Erik Faye-Lund
c34c7b1f3b panvk: correct VkPhysicalDeviceProperties::deviceName
We currently report a deviceName as e.g. "Mali-G610 (Panfrost)", but
panfrost has nothing to di with the physical device, and the suffix
doesn't belong there at all.

So let's remove that suffix from PanVK. This results in output like this
from vulkaninfo:

---8<---
VkPhysicalDeviceProperties:
---------------------------
        apiVersion        = 1.1.305 (4198705)
        driverVersion     = 25.0.99 (104857699)
        vendorID          = 0x13b5
        deviceID          = 0xa8670000
        deviceType        = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName        = Mali-G610
        pipelineCacheUUID = <snip>
---8<---

We already sort of namedrop Panfrost in the driver properties:

---8<---
VkPhysicalDeviceDriverPropertiesKHR:
------------------------------------
        driverID        = DRIVER_ID_MESA_PANVK
        driverName      = panvk
        driverInfo      = Mesa 25.1.0-devel (git-136dd9f985)
        conformanceVersion:
                major    = 1
                minor    = 4
                subminor = 1
                patch    = 2
---8<---

While this might techically speaking be a regression, PanVK has been
marked as experimental until Mesa 25.0. But to reduce the risk of people
starting to depend on this behavior, let's also backport this change to
the 25.0 release.

The patch looks a bit funny, because we add the " (Panfrost)"-suffix in
common code, and this moves it to the Gallium driver. But effectively,
this means PanVK is the only driver that sees a change of behavior.

Backport-to: 25.0
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33972>
2025-03-11 13:50:05 +00:00
Daniel Stone
69cc8762f0 ci/panfrost: Move G610 testing to pre-merge
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33431>
2025-03-11 12:59:17 +00:00
Daniel Stone
95799845f2 ci: Update kernel for Panthor scheduling fixes
These should make G610 properly stable now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33431>
2025-03-11 12:59:17 +00:00
Karmjit Mahil
80e90150e9 tu: Fix Perfetto build error with vk_buffer
Fixes: 68bbc87063 ("tu: Switch to device address from vk_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33997>
2025-03-11 12:29:59 +00:00
Erik Faye-Lund
f6112a26c5 panvk: expose EXT_display_control
We have a common implementation for this, let's just use that.

Similar to the previous commit, this is a bit silly. But if we ever get
in a situation where VK_EXT_display actually makes sense, this stuff
should "just work", so let's enable it for good measure.

Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33916>
2025-03-11 11:42:08 +00:00
Erik Faye-Lund
8aae7d153d panvk: expose VK_KHR_display
It seems the common WSI code does all that's really needed here for us
already. Enabling this lets me run vkmark on PanVK.

This is a bit silly, because what actually happens here is that we end
up passing -1 as the display_fd to wsi_device_init(). This in turn leads
us to returning zero usable displays, which renders the extension
somewhat useless. But it is better than not supporting the extension, and
not supporting applications who have a hard depdendency on it fail, like
is the case with vkmark.

Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33916>
2025-03-11 11:42:08 +00:00
Erik Faye-Lund
10cbd4f211 panvk: rework how we deal with extension-reqs
We're currently exposing a bunch of extensions that requiring Vulkan
1.1, and we'll soon enough do the same for Vulkan 1.2. Instead of having
to update each of these extensions separately once we add new Vulkan
version support for some gens, let's use a single variable for this
instead.

And while we *could* query the exposed vulkan version and do this a bit
more "automatically", this makes it easy to leave some needless checks
behind if the baseline version changes. Leaving this as a arch check in
this function should make it a bit more obvious when the check can be
removed.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33971>
2025-03-11 11:20:27 +00:00
Erik Faye-Lund
43799d6dcb panvk: fix extension requirement
This extension requires Vulkan 1.1, which we don't yet expose on Bifrost
GPUs.

Fixes: a9592a0c15 ("panvk: enable subgroupExtendedTypes")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33971>
2025-03-11 11:20:27 +00:00
Georg Lehmann
5bfd1547d2 aco: don't assume that v_interp_mov_f32 flushes denorms
Foz-DB Navi21:
Totals from 3 (0.00% of 79789) affected shaders:
Instrs: 1708 -> 1722 (+0.82%)
CodeSize: 9416 -> 9460 (+0.47%)
Latency: 12094 -> 12371 (+2.29%); split: -0.02%, +2.31%
InvThroughput: 1967 -> 1992 (+1.27%)
Copies: 105 -> 106 (+0.95%)
PreVGPRs: 131 -> 132 (+0.76%)
VALU: 1155 -> 1169 (+1.21%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33974>
2025-03-11 09:51:39 +00:00
Pierre-Eric Pelloux-Prayer
dfa725cede radeonsi: guard perfetto support with ifdef in si_draw
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
2e8232521d radeonsi: add pid/tid to the vk_queue_submit event
Without these it's impossible to know which application generated
the event.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
e6a16adbdb radeonsi: tag perfetto conditions as unlikely
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
6c2edb9762 radeonsi: cache u_trace_perfetto_active value
u_trace_perfetto_active uses an atomic read so avoid doing
it too much in hot path.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33207>
2025-03-11 08:30:55 +00:00
Pierre-Eric Pelloux-Prayer
770b5bc757 st/mesa: fix nir_load_per_vertex_input parameter
num_components should be 1 as we're loading an offset value.

Fixes: ec68f0492b ("st/mesa: switch GL_SELECT shader to IO intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12774
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33982>
2025-03-11 07:45:07 +00:00
Valentine Burley
68bbc87063 tu: Switch to device address from vk_buffer
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33965>
2025-03-11 07:12:14 +00:00
Samuel Pitoiset
01f92acf10 radv/winsys: use real info for GFX12 in the null winsys
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33970>
2025-03-11 06:50:49 +00:00
Samuel Pitoiset
dd2e9c11af aco/tests: use GFX1201 instead of GFX1200
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33970>
2025-03-11 06:50:49 +00:00
Kenneth Graunke
cdbedc9eff intel: Move unlit centroid workaround into the elk compiler
This was only needed on Sandybridge.  We can delete the brw code,
and replace the generic devinfo bit with a helper inside the elk
compiler itself.

Thanks to Iván Briano for noticing we still had dead brw code for this.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
1dfed59c49 intel: Use devinfo->urb.min_entries[GS and TCS] for setting URB configs
We were not using the minimum values from devinfo for anything.  For
tessellation control, the minimum value is 0, so we continue taking
MAX2 of that with 1 when tessellation is enabled so we have at least
something guaranteed to be present.  For geometry, the minimum value
is already non-zero (and updated by the previous patch).

This will have the side-effect of raising the minimum number of URB
entries for geometry stages.  This is currently not known to fix
anything, but should be more closely following the documentation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
404ed1d153 intel/dev: Set a higher minimum number of URB entries for GS
We've been programming our minimum number of URB entries for geometry
shaders to 2, but it appears that we should have been setting 8 on
Broadwell and later.  Additionally, there's a workaround on Skylake
and later that requires us to add flushing (which we haven't) or use
a minimum of 16 URB entries.

This alone will not fix anything, as nothing reads this devinfo field
presently (will be fixed in the next commit).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
dc66dee8ad intel/dev: Rework device info macros for Gfx8+
As we added new platforms, the device info macros evolved over time
Most platforms had a "FEATURES" macro, some had a "HW_INFO" macro,
a few had macros for URB entries - some with min entries only, some
with min and max, some including the .urb = { ... } braces, others not.

Thread counts or subslice info was sometimes considered FEATURES,
sometimes HW_INFO, sometimes inserted only in the final structure.

FEATURES macros often inherited from an ancestor platform, but not
necessarily the prior platform - many were based on GFX8_FEATURES.
Many redundantly set the same feature bits as prior platforms.

This patch aims to clean up the situation, so it's a little more
organized, especially if you look at multiple generations.  Macros
are now split into several separate pieces:

1. The FEATURES macro only has architectural features, such as LSC,
   ray tracing support, 64-bit integers, flat CCS, and so on.  Thread
   counts, subslice info, and URB sizes that may vary by SKU are not
   included here.  This makes it easy for one platform to inherit the
   features from the previous, while not pulling in that extra data.

2. THREAD_COUNTS macros contain maximum thread counts from the
   3DSTATE_VS documentation and so on.

3. URB_MIN_MAX_ENTRIES macros contain the entire URB configuration,
   including .urb = { ... }.

4. PAT_ENTRIES macros (on modern platforms) contains our choice of which
   PAT entries to use for various types of resources.

5. CONFIG macros combine all of the above into a tidy bundle for use
   in defining various structures, and may also include the platform
   macro or simulator ID for convenience.

On recent platforms where hwconfig tables exist, items #2-3 could
potentially be dropped and filled in from there instead.  For XEHP+
where we require hwconfig, we instead have a PLACEHOLDER_THREADS_AND_URB
macro that makes it clear that these values are updated from hwconfig.

One nice thing is that the bits that could (or do) come from hwconfig
tables are now cleanly separate from those that do not (i.e. platform
feature support, PAT entry selection, and so on).

This patch does not touch GFX7 or earlier macros.  We could probably
offer a similar treatment there, but they're generally working and not
quite as complex.

To verify that this commit does not have unintentional changes, I
recommend running

   objdump -s build/src/intel/dev/libintel_dev.a.p/intel_device_info.c.o

before and after this commit, and diffing the output.  The devinfo
structures produced are identical.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
20a229bc06 intel/dev: Set max_wm_threads to 0 in the Gfx9+ devinfo structs
intel_device_info_init_common calculates this for Gfx9+ based on
max_threads_per_psd and slice information.  Mark it as zero in the
structures to make clear that the value there isn't useful, and make
it easier to diff binaries for the next commit's refactors.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7ccc786acf intel/dev: Set minimum HS URB entries to 0.
The documentation for 3DSTATE_URB_HS has 0 as the minimum number of HS
URB entries for all platforms.  See BSpecs 32162, 47137, 56271 for
Gfx6-11, Xe, and Xe2-3, respectively.

This should silence warnings about our device info field not matching
the hwconfig tables.

Notably, nothing in our drivers currently uses this value so it cannot
have a functional impact.

Fixes: 4064b5546b ("intel/dev: reduce warning noise from urb settings")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7f6b1dee2c intel: Move devinfo->has_compr4 into the elk compiler
Used in exactly one place in elk.  Off to live there.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
be8ec31e72 intel: Move devinfo->has_negative_rhw_bug into the elk compiler
This is only needed for original 965G/GM clipper code, which only exists
in the legacy compiler.  Send it off to live with the elk.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
0bf779ed31 intel: Delete devinfo->has_surface_tile_offset
This is used in exactly one place in crocus, which already has a comment
indicating that this code is needed for original Gfx4 hardware.  Just
replace that with a verx10 == 40 check.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
7f50f1591b intel: Delete devinfo->must_use_separate_stencil
This is used by a single place in ISL only for sanity checking the
decisions it has already made.  The knowledge is already all centralized
in ISL these days, so we don't need a device info bit.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
59c9bfa8f3 isl: Drop compile time "use separate stencil" checks.
This code is a lot of mess for no real benefit.  It's existed since
the dawn of isl, and serves to let you optimize out a single check
in release builds for Ironlake and Sandybridge systems.  All other
uses are for asserts, which already get compiled out in release mode.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Kenneth Graunke
26418817a7 isl: Delete redundant "use separate stencil?" check
This code, since the dawn of time, has had a redundant check for gen5-6
separate stencil in the final else clause:

   } else if (doing separate stencil on gen5-6) {
       return compact
   } else {
       if (doing separate stencil on gen5-6)
          return compact
       ...
   }

We can eliminate that one.  The else clause then has a single if, so it
can be folded into the "else if" ladder alongside the others.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
2025-03-10 17:23:07 -07:00
Faith Ekstrand
e029d2b45a nvk,nil: Stop panicing in image creation
If an image gets created with unsupported parameters (which is a pretty
complex thing to check), it's probably better to just return an error
rather than panic, especially since Rust panics happen even in release
builds.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
917cecb3c2 nil: Split linear and tiled image creation
They're so different that sharing the code really wasn't buying us
anything.  It's way easier to read if the two are separated.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
3c11da8aea nil: Relax alignment requirements for linear images
Compositors sometime try to import BOs with lower alignments than 128B.
This seems particularly common in the case of cursor images but it can
also happen on other BOs allocated by the old nouveau GL driver.  As
long as we avoid rendering to them (which NVK will do), the
texture/image hardware is fine as long as they're at least 32B-aligned.
Panicing in this case isn't very nice to compositors.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
e36f9d6909 nvk: Allow rendering to linear images with unaligned strides
We can do this by just enabling the fall-back path whenever we detect
something that's not nicely aligned.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Faith Ekstrand
a18c176093 nouveau/winsys: Stop asserting that imported BOs are aligned
This may not be true if it comes from the nouveau GL driver.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
2025-03-10 23:42:19 +00:00
Ivan A. Melnikov
4ad5b8f5bb gallium/radeon: Make sure radeonsi PCI IDs are also included
When importing libdrm_radeon code [1][2] it was somehow missed
that what libdrm has in one r600_pci_ids.h, Mesa has split
into r600_pci_ids.h and radeonsi_pci_ids.h. So, devices
with ids from radeonsi_pci_ids.h were not considered valid for
radeon_surface_manager_new.

This commit changes that, thus fixing radeonsi for these
devices.

[1] commit 1299f5c50a
[2] commit 3aa7497cc0

Fixes: 1299f5c50a
Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33940>
2025-03-10 23:12:54 +00:00
Karol Herbst
d74b3c550b rusticl/mesa: remove Sync from PipeContext
It was never sync and never will be. Luckily we can just remove it now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:14 +00:00
Karol Herbst
7d94fe8c5f rusticl/queue: cache bound CSO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
00e3d75a58 rusticl/queue: make it unncessary to keep QueueContext Send
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
7bbf825b52 rusticl/kernel: rename CSOWrapper to SharedCSOWrapper
Indicate that the CSO can actually be shared across pipe_contexts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Karol Herbst
0c0c10a811 rusticl/program: simplify active_kernels check
This removes one loop, also will allow us to cache the device builds in
the queue to optimize binding compute states.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
2025-03-10 22:09:13 +00:00
Alyssa Rosenzweig
67598775ad libagx: clean up
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
8d338292dc libagx: use indirect draw struct
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
9c057e57b1 hk: do not dispatch count/pre-GS unless needed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
1a68f7fe37 asahi: do not dispatch count/pre-GS unless needed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
927c95e118 asahi/gs: report whether xfb is needed
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
70835ee0c5 asahi/gs: drop unused params
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
dc96093494 libagx,asahi: hoist GS draw generation
for indirect GS, do it in the indirect kernel (not the pre-GS)

for direct, do it on the host (not the pre-GS)

we don't want pre-GS.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
40aa260209 asahi/gs: only prefix sum with XFB
otherwise, an atomic suffices for the count shader.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
184416a5e8 asahi/gs: avoid recalculating
we'd CSE but meh

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
e70544d135 asahi/gs: factor out output info
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
6f47263ad7 asahi/gs: drop non-XFB prefix sums
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
afb53c82bc libagx: do not use prefix sums for GS index buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
4d2ab1d92c asahi: integrate printf/abort support
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:04 +00:00
Alyssa Rosenzweig
3f2dd0e062 hk: fix cull distance confusion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:03 +00:00
Alyssa Rosenzweig
93b84d0d90 libcl: add u_foreach_bit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33901>
2025-03-10 20:16:03 +00:00
Alyssa Rosenzweig
76da759635 bin: add list of Mesa contributors
to make it easier for people (especially newcomers to the project) to add review
tags, we need a database mapping gitlab usernames to author names & emails. that
way, if someone just comments "rb" or whatever, there's a direct way to look
that up. this comimt adds a list of current contributors with the following
methodology:

1. first, I grabbed all names + emails of recent authors, with mailmap applied,
   as proxy for active contributors:

   $ git log --since=2025-01-01 --pretty='%aN,%aE,'|sort | uniq

2. then, I scraped usernames via the gitlab api attempting to match by name. I
   don't want to hammer the gitlab api too much which is why I tried to keep the
   list in #1 as small as possible.

   import gitlab
   import subprocess
   import tempfile
   import sys
   import urllib.request
   import csv

   gl = gitlab.Gitlab('https://gitlab.freedesktop.org', private_token=...)
   names = {}
   with open('dump.csv') as csvfile:
       spamreader = csv.reader(csvfile)
       for row in spamreader:
           if len(row) == 3:
               names[row[0]] = row[1]
   for name in names:
       users = gl.users.list(search=name)
       print(', '.join([name, names[name]] + [u.username for u in users]))

3. finally, I fixed up various data issues by hand. there were cases of both
   people with multiple usernames (I tried to pick the one that's actually in
   use), and people whose name on their profile does not match the name in their
   commits (I tried to determine the username from searching gitlab manually,
   but dropped a number of such authors when it was nontrivial to figure out. I
   am a regular reviewer across the tree so if I don't recognize your name
   you're probably not that active, sorry.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33896>
2025-03-10 20:09:40 +00:00
Alyssa Rosenzweig
f365c2d33b bin: add script for applying review trailers
..or "the one where Alyssa gets jealous by b4".

Those of us who have stuck around a while have a habit of just commenting "rb"
or "ab" on MRs. which raises the question for everyone else of what name/email
to use. I've personally built up a collection of 36 (!!) different
shell aliases to apply different people's trailers. I think other people do
similarly.

This calls for better tooling. This patch adds a little script for applying
review trailers given a fuzzy match on the reviewer's name. I recommend
contributors alias it to something like `mrb`, then you can do things like:

   mrb alyssa
   mrb -a faith

to add a review tag for me or an acked-by tag for Faith.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33896>
2025-03-10 20:09:40 +00:00
Caio Oliveira
1744ecc1ce brw: Remove dead code from control flow
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33957>
2025-03-10 19:23:17 +00:00
Caio Oliveira
89f0db0aaa brw: Remove extra interface in brw_cfg types
The C++ one is more used, so let that one remain.  These data structures
are not used from C sources anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33957>
2025-03-10 19:23:17 +00:00
Job Noorman
c58ba21ba8 ir3: keep inputs at start block when creating empty preamble
It is expected that inputs and prefetches are always in the first block.
However, ir3_create_empty_preamble would create blocks before the first
one, leaving inputs after the preamble. This causes issues with
(probably among others) spilling/RA where precolored inputs could
illegally reuse the spill base register.

Fixes RA validation failures on a7xx for
dEQP-VK.ray_query.multiple_ray_queries.vertex_shader

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: f3026b3d3e ("ir3: add some preamble helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33977>
2025-03-10 18:08:02 +00:00
Natalie Vock
a1b0599105 radv/rt: Flush L2 after writing internal node offset on GFX12
Otherwise the encoder can read a stale value and make internal nodes
point into leaf space (if 0 is read).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
2025-03-10 17:42:05 +00:00
Natalie Vock
cdadda2d51 radv/rt: Guard leaf encoding by leaf node count
For empty BVHs we shouldn't emit any leaf nodes, but there is one
invocation to encode the root node. Guard leaf node encoding so that
invocation doesn't try writing any leaves.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
2025-03-10 17:42:05 +00:00
Yiwei Zhang
a315a64291 venus: relax 2 assertions for prime blit path
Prime blit can be used in setups like venus on lavapipe over vtest. It's
native env so Venus relies on renderer side driver to tell about the pci
info, while lavapipe doesn't implement that extension, which ends up
with mismatched gpu thus prime blit.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33956>
2025-03-10 16:48:31 +00:00
Pavel Ondračka
de91b18be4 r300: fix INV and BIAS presubtract on R300/R400
The swizzle check was too strict, we actually don't care about the
swizzle on the constant source at this point, it is only checked
later whether the constant source actually has the correct form.

So this effectively enables INV and BIAS presub on R300/R400.

RV370 stats:
total instructions in shared programs: 85379 -> 84948 (-0.50%)
instructions in affected programs: 15669 -> 15238 (-2.75%)
helped: 336
HURT: 81
total presub in shared programs: 1318 -> 2991 (126.93%)
presub in affected programs: 797 -> 2470 (209.91%)
helped: 0
HURT: 514
total omod in shared programs: 387 -> 384 (-0.78%)
omod in affected programs: 9 -> 6 (-33.33%)
helped: 3
HURT: 0
total temps in shared programs: 13290 -> 13243 (-0.35%)
temps in affected programs: 1388 -> 1341 (-3.39%)
helped: 91
HURT: 52
total consts in shared programs: 81922 -> 81855 (-0.08%)
consts in affected programs: 173 -> 106 (-38.73%)
helped: 67
HURT: 0
total cycles in shared programs: 126746 -> 126560 (-0.15%)
cycles in affected programs: 30752 -> 30566 (-0.60%)
helped: 255
HURT: 124

LOST:   shaders/godot3.4/22-69.shader_test FS
GAINED: shaders/ck2/172.shader_test FS
GAINED: shaders/tesseract/389.shader_test FS
GAINED: shaders/tesseract/393.shader_test FS
GAINED: shaders/unity/64-DeferredPointShadows.shader_test FS

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33915>
2025-03-10 16:09:12 +00:00
Yiwei Zhang
0543c3a886 venus: extend async descriptor set alloc coverage
Previously asynchronous descriptor set allocation is only enabled when
the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT bit is not set.
However, some engine would use that bit but alloc/free with identical
descriptor set layout. So this change extends the async set alloc to
cover that since the spec has guaranteed no fragmentation there.
Besides, a pool before any descriptor set free is also considered w/o
fragmentation. so this change extends to cover here as well. Both
would also help with dEQP run time since all descriptor pools involved
are with that bit set.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33966>
2025-03-10 15:34:42 +00:00
Ashley Smith
14101ff948 panfrost: Reset syncobj after use to avoid kernel warnings
We get a kernel message "You are adding an unorder point to timeline!"
on many CTS runs. This stems from us SIGNALing the queue syncobj then
WAITing but not reseting it. It is assumed by the time we get to
panvk_queue_submit_init_signals() that the value is 0, however it is 1
due to the previous calls.

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 5544d39f ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33943>
2025-03-10 15:02:58 +00:00
Pavel Ondračka
8d63814d7a r300: remove usage of NIR_PASS_V
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33967>
2025-03-10 13:43:23 +00:00
Samuel Pitoiset
964dc76f87 radv/ci: enable RADV_PERFTEST=video_{decode,encode} on few GFX9+ GPUs
VEGA10, RENOIR, NAVI10, RAPHAEL and NAVI31 are covered, they passed
100% of 25 runs each.

NAVI21 and VANGOGH still don't enable video testing in CI because I
got few hangs during my last stress test. Need to be stress tested
again.

Note that the kernel in Mesa CI is too old and doesn't have latest
firmwares that should fix the remaining failures.

GFX6-8 have different issues like GPU hangs on Polaris10, so it's not
yet enabled in CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33968>
2025-03-10 12:15:27 +00:00
Collabora's Gfx CI Team
94d2cc2531 Uprev Piglit to 708a9e365b18fdd881af989f75e1a6c1409cae8c
04d901e49d...708a9e365b

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33831>
2025-03-10 11:47:52 +00:00
Rhys Perry
b69b9b8eb2 amd/drm-shim: add gfx1201
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33953>
2025-03-10 11:21:36 +00:00
David Rosca
e56b906df9 frontends/vdpau: Fix creating deinterlace filter for interleaved buffers
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12755
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
2025-03-10 10:53:59 +00:00
David Rosca
6b91f13d5d Revert "frontends/vdpau: Alloc interlaced surface for interlaced pics"
This is not needed now when deinterlace can handle non-interlaced
buffers. Also this forces the buffer as interlaced which doesn't work
on radeonsi anymore.

This reverts commit 0ee4506c3a.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
2025-03-10 10:53:59 +00:00
David Rosca
244cfac143 gallium/vl: Fix video buffer supported format check
It needs to check all plane formats.

Fixes: c3ceec6cd8 ("vdpau: Refactor query for video surface formats.")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
2025-03-10 10:53:59 +00:00
David Rosca
ab3c863cfb radeonsi/video: Remove mpeg12 shader decoder support
This would only be used for IDCT and MC entrypoints, but va/vdpau
frontends doesn't use those.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33893>
2025-03-10 09:17:23 +00:00
Samuel Pitoiset
0bc9d59c2e ac,radv: add a workaround for a hw bug with primitive restart on GFX10-GFX10.3
At least, NAVI10, NAVI21 and NAVI24 are affected by this what looks
like a hardware bug when primitive restart is changed and no context
registers are written between draws. It seems the hardware doesn't
consider primitive restart at all in this situation.

Adding SQ_NON_EVENT(0) as suggested by Marek seems to fix it reliably
without introducing any overhead. It's basically a NOP packet that adds
a small delay.

Fixes new VKCTS coverage dEQP-VK.transform_feedback.primitive_restart.*.
Also fixes this old vkd3d-proton issue.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7258
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33929>
2025-03-10 08:44:31 +00:00
Mary Guillemard
7819b103fa pan/bi: Add support for IDVS2 on Avalon
IDVS2 uses a new special FAU value shader_output to determine what the
vertex shader is supposed to store as output.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33910>
2025-03-10 09:12:19 +01:00
Mary Guillemard
3bbef647b1 pan/bi: Use shader_output intrinsic for IDVS
This introduce a new pass that wrap store_output to check for
shader_output bitfield.

bifrost_nir_specialize_idvs nows only lower shader_output to a constant
value and removal of store_output is handled by DCE/dead_cf passes.

This is required for Avalon's deferred new ABI.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33910>
2025-03-10 09:03:35 +01:00
Mary Guillemard
e0be93d881 nir: Add Panfrost specific shader_output intrinsic
On Avalon, this is a bitfield that holds information on what
values a vertex shader should output.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33910>
2025-03-10 07:38:16 +01:00
Guilherme Gallo
8fcc52b8d7 ci/lava: Don't print empty lines when changing sections
Make `print_log` section-aware to stop printing newlines whenever a
section changes.
This also caught a bug: the `handle_exception` was sending an exception
type to the `print_log`, now it is fixed.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Guilherme Gallo
422e65557d ci/lava: Tweak timeouts
LAVA actions follow a hierarchical structure, where most subactions have
their timeouts overridden if the parent action supports a retry
mechanism, such as the `depthcharge-retry` action.

The timeout is calculated as: [1]

```
parent action timeout / failure_retry value
```

To adjust a subaction's timeout, we need to modify the nearest parent
action.

[1]
https://gitlab.collabora.com/lava/lava/-/blob/collabora/production/lava_dispatcher/action.py#L149

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Guilherme Gallo
a33c0e1867 ci/lava: Split boot action into deploy and boot
The boot action was wrapping the deploy action, which could cause
timeout misalignment. For example, the boot `GitlabSection` timeout was
shorter than the deploy timeout in LAVA, leading to cases where LAVA
jobs were canceled during their own retry mechanism.

By splitting these actions, we can align the timeouts properly,
preventing interference and unnecessary job cancellations.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Guilherme Gallo
d85af615f9 ci/lava: Remove depthcharge-start timeout
It has no effect, as it is overridden by depthcharge-retry timeout /
failure_retry.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33906>
2025-03-10 05:44:25 +00:00
Lionel Landwerlin
1835bf3520 brw: avoid calling lower_indirect_derefs multiple times
Lowering the indirect derefs multiple times leads to very inefficient
shaders because of all the control flow inserted.

In particular on some DGC tests with mesh shaders, the tests can spin
for 1hour on an i7 and still not complete compilation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33809>
2025-03-09 20:52:01 +00:00
Yiwei Zhang
c7bc90eaec venus: fix to ignore dstSet for push descriptor
Per push descriptor spec:

Each element of pDescriptorWrites is interpreted as in
VkWriteDescriptorSet, except the dstSet member is ignored.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33948>
2025-03-09 20:25:21 +00:00
Yiwei Zhang
7b228ef877 venus: use common memory report implementation
Looks to be the same, and there's no regression in the cts group
dEQP-VK.memory.device_memory_report.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33955>
2025-03-09 18:51:41 +00:00
Eric Engestrom
551770ccf8 wsi/x11: drop misleading reference to anv in var names
Fixes: ec0bc14a70 ("anv/wsi: remove all anv references from WSI common code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33950>
2025-03-09 12:00:44 +00:00
Pavel Ondračka
28057971d2 r300/ci: add dEQP job with RADEON_DEBUG=notcl
This forces software vertex processing wia the draw module and should
hopefully test the exact same codepaths that the r300 chipsets without
built-in vertex engines use.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28216>
2025-03-09 08:39:53 +00:00
Faith Ekstrand
76883e0b3c vulkan: Update XML and headers to 1.4.309
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33930>
2025-03-08 19:54:19 +00:00
Faith Ekstrand
57818436f8 spirv: Update the JSON and headers
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33930>
2025-03-08 19:54:19 +00:00
Faith Ekstrand
1cdc420065 spirv: OpAsmTargetINTEL is untyped
We need to handle this in order to bump the JSON in the next commit.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33930>
2025-03-08 19:54:19 +00:00
Leonard Göhrs
240585cc6d etnaviv/ci: add pengutronix LAVA lab with one i.MX8MP device
The device is a MBa8MPxL[1]. Once we have verified that the infrastructure
is set up correctly and is operating reliably more devices can be added.

[1]: https://www.tq-group.com/de/produkte/tq-embedded/arm-architektur/mba8mpxl/

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33759>
2025-03-08 10:18:11 +00:00
Timothy Arceri
25e008c639 util/u_idalloc: fix util_idalloc_sparse_alloc_range()
If the allocation didn't fit within the segment the loop incorrectly
freed ids of a range of different segments due to the loop redeclaring
i.

Fixes: d4085aaf56 ("util: add util_idalloc_sparse, solving the excessive virtual memory usage")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33934>
2025-03-08 09:17:07 +00:00
Alyssa Rosenzweig
0568e57d21 pan/lower_helper_invocation: clean up
drive-by.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Alyssa Rosenzweig
bc6b527b52 nir/lower_helper_writes: fix stores after discard
We need to use nir_is_helper_invocation instead of
nir_load_helper_invocation, to correctly predicate stores after demote.

Identified in a Piglit on AGX a year ago but I forgot to upstream this.

Fixes: 586da7b329 ("nir: Add nir_lower_helper_writes pass")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Alyssa Rosenzweig
e90ccf91a3 pan/mdg: call nir_lower_is_helper_invocation
needed to avoid regression from the next patch.

backported because the next patch is too

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Alyssa Rosenzweig
d92304852a agx: call nir_lower_is_helper_invocation
needed for next patch.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
2025-03-08 07:47:40 +00:00
Guilherme Gallo
47659ddf70 ci: Simplify LAVA farm detection
Refactor the LAVA farm detection to use a simpler environment
variable-based approach:
- Remove the complex regex-based farm detection
- Replace LavaFarm enum with a simple string-based farm identification
- Update related tests and job definition logic
- Remove hypothesis testing dependency

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33888>
2025-03-08 02:45:02 +00:00
Guilherme Gallo
4a2717c4bd ci: Specify the FARM variable for DUT jobs
There are some jobs that were missing the FARM variable, which is useful
to lava_job_submitter.py to classify how it should interact with each
LAVA server and how it should assemble the job definition.
Right now, we use a set of regexex with the RUNNER_TAG variable, but
that is error-prone.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33888>
2025-03-08 02:45:02 +00:00
Mel Henning
0dad7857d8 nvk: Add NVK_DEBUG=trash_memory
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33947>
2025-03-08 02:24:18 +00:00
Mel Henning
cab80223fd nvk: Don't zero imported memory
This fixes eg.
dEQP-VK.drm_format_modifiers.export_import_fmt_features2.a8b8g8r8_uint_pack32
with NVK_DEBUG=zero_memory

Fixes: 0399999dec ("nvk: Support dma-buf import")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33947>
2025-03-08 02:24:18 +00:00
Faith Ekstrand
18d206d67c zink: Check queue families when binding image resources
We check for iamge layouts and feedback loops when we bind image
resources but not queue families.  If the resource isn't on the graphics
queue, we need to add it to need_barriers so we can transition it back
to our queue.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
2025-03-08 01:38:00 +00:00
Faith Ekstrand
396ece1ad8 zink: Set needs_barrier after transitioning to QUEUE_FAMILY_FOREIGN
Otherwise, we'll transition to QUEUE_FAMILY_FOREIGN and then forget that
we left it on the foreign queue and never transition back the next time
we use the resource.  This was kind-of okay with Wayland compositors
because they always re-import the BO so it's always fresh and they pick
up on the queue transfer the first time.  X11, on the other hand, does
not re-import BOs so they get stuck in this weird QUEUE_FAMILY_FOREIGN
limbo until something happens to randomly trigger a layout transition
check and then we find it and do the transition.  We should mark them as
needing a barrier the moment we transition to QUEUE_FAMILY_FOREIGN.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
2025-03-08 01:38:00 +00:00
Yiwei Zhang
e538a38017 lavapipe: fix accel struct device query copy
This change:
1. use vulkan flags instead of pipe query flags
2. set the avail bit when requested

Fixes: a26f96ed3d ("lavapipe: Handle accel struct queries in handle_copy_query_pool_results")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
2025-03-08 01:11:44 +00:00
Yiwei Zhang
bc190cab2d lavapipe: set availability bit for accel struct host queries
Fixes: 897ccbd180 ("lavapipe: Implement VK_KHR_acceleration_structure")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
2025-03-08 01:11:44 +00:00
Sagar Ghuge
1bfe2571f5 intel/compiler: Lower sample index into coord for MSRT messages
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32690>
2025-03-07 23:06:14 +00:00
Sagar Ghuge
bea9d79cb9 intel/compiler: Add support for MSAA typed load/store messages
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32690>
2025-03-07 23:06:14 +00:00
Yiwei Zhang
2923945020 venus: support VK_KHR_ray_tracing_maintenance1
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
7902d9ee32 venus: support VK_KHR_ray_tracing_position_fetch
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
7cfdd9e8d4 venus: enable VK_KHR_ray_tracing_pipeline
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
e081621dca venus: implement VK_KHR_ray_tracing_pipeline commands
Implement all commands involved. No need to scrub anything in the RT
pipeline info since it has been well validated by the VUs related.

The nature of VkDeferredOperationKHR plays well with venus multi-ring
support. So later we can properly define our own concurrent limits for
RT pipeline creations.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
9547efa6b0 venus: prepare push template for ray tracing pipeline
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
1e526c555b venus: support VK_KHR_ray_query
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
0deef3d037 venus: enable VK_KHR_acceleration_structure
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
4cb0f99379 venus: implement VK_KHR_acceleration_structure - Part III
Add acceleration structure descriptor type support:
- async set alloc
- descriptor update with and w/o template
- push descriptor with and w/o template

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
1075d03228 venus: implement VK_KHR_acceleration_structure - Part II
Add query cmd integrations.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
c0f4d9861d venus: implement VK_KHR_acceleration_structure - Part I
Implement all cmds except query updates.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
eb0ad64e80 venus: add stubs for accel struct host commands
They won't be implemented, and the host cmds feature will always be
disabled in venus.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
3eb554a2b5 venus: support VK_KHR_deferred_host_operations
Details are at:
https://gitlab.freedesktop.org/virgl/venus-protocol/-/merge_requests/97

For venus and vkr, we'll use pure driver side impl. Start with (1) and
move towards (2) later as things evolve. We'd like renderer side to be
simple and passive.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
90f9a1cca5 venus: add a debug option for ray tracing support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
Yiwei Zhang
6bac77b75c venus: sync protocol for ray tracing support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
2025-03-07 22:44:10 +00:00
sarbes
a3f827319f lima: add genxml for texture descriptor
This commit adds genxml to Lima, by copying mostly from Asahi. The definition of the texture descriptor has been moved there.

v2:
- remove mipaddress handling, use "shr(6)" modifier
- indent TD parser 8 spaces

v3:
- added copyright
- renamed ushort to unorm16

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33385>
2025-03-07 21:10:20 +00:00
Benjamin Lee
871804a494 panfrost: implement 16-bit pack/unpack intrinsics
This significantly improves codegen for the 16-bit ldexp2 lowering.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33781>
2025-03-07 18:56:33 +00:00
Juan A. Suarez Romero
2662b9b71d v3d/v3dv/vc4: review all expected timeouts
Some of these tests are not valid anymore, others can now be executed
under the time budget.

This commit updates all the expected timeouts.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33913>
2025-03-07 17:37:18 +00:00
Daniel Schürmann
795706f3d6 zink: enable CapabilityDemoteToHelperInvocation and extension only if required
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
efaaaf45d1 zink: clean up HelperInvocation code emission
With SPIR-V 1.6 OpIsHelperInvocationEXT was effectively replaced with
Volatile loads of the HelperInvocation built-in variable.

This patch also drops the distinction between is_helper_invocation and
load_helper_invocation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
dbd41e3ddd nir: set SYSTEM_VALUE_HELPER_INVOCATION read for nir_intrinsic_is_helper_invocation
is_helper_invocation is the volatile access of load_helper_invocation.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
a4cffa91b8 nir: remove nir_lower_discard_if_to_cf option
Since removing nir_intrinsic_discard{_if} it has no purpose anymore.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Daniel Schürmann
276dc751ce zink: lower {demote|terminate}_if to CF after lowering point smooth
This must have slipped somehow.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33492>
2025-03-07 15:44:49 +00:00
Erik Faye-Lund
fa91b41f54 docs/features: add VK_EXT_hdr_metadata
This was missed when it was recently added.

Fixes: 4b663d561b ("vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33918>
2025-03-07 15:34:02 +00:00
Erik Faye-Lund
1a1412e66e docs/features: add missing panvk feature
I forgot to document this feature when I added it, whoops!

Fixes: ac05c2a2b8 ("panvk: expose subgroup operations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33918>
2025-03-07 15:34:02 +00:00
Georg Lehmann
55921bd7ef radv/gfx10+: remove null exports if discard isn't used
Foz-DB Navi31:
Totals from 1362 (1.71% of 79789) affected shaders:
Instrs: 9879 -> 8497 (-13.99%)
CodeSize: 52004 -> 41028 (-21.11%)
Latency: 48821 -> 27349 (-43.98%)
InvThroughput: 7475 -> 7474 (-0.01%)
SALU: 274 -> 254 (-7.30%)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
2025-03-07 15:00:37 +00:00
Georg Lehmann
09ff1c28d8 ac/nir/lower_ps_late: consider dcc decompression for null exports
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
2025-03-07 15:00:37 +00:00
Georg Lehmann
ad73af6e68 radv: add dcc_decompress_gfx11 in radv_graphics_state_key
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33835>
2025-03-07 15:00:37 +00:00
Alyssa Rosenzweig
4da7b12000 panfrost: port to common stats framework
this adds full support for executable statistics in panvk.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33921>
2025-03-07 13:48:44 +00:00
Georg Lehmann
7b1f1a107e radv: enable invariant geom for DOOM(2016)
Moving alu reordered some fmuls and since we prefer the closest fmul for ffma,
this causes precision to mismatch between depth write and depth test.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12016

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33933>
2025-03-07 11:48:38 +00:00
Christian Gmeiner
ae21dd4252 etnaviv/ci: Add missing rev to GC3000
A rebase mistake.

Fixes: 71e2ddcede ("etnaviv/ci: Add gles2 run for GC3000")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33937>
2025-03-07 11:14:19 +01:00
Samuel Pitoiset
82ab58f6c6 radv: add RADV_DEBUG=pso_history
This dumps pipeline hash + shader VA to /tmp/radv_pso_history.log. Can
be very useful when investigating GPU hangs using UMR to get the fossils
back with the PC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33912>
2025-03-07 09:14:18 +01:00
Caio Oliveira
ff59013571 brw: Rework label tracking in assembler
For each label store its offset and two lists of uses (for JIP and UIP).
Because the parser itself already restricts what opcodes can use labels
(and which ones), don't re-validate them.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33522>
2025-03-06 17:06:20 -08:00
Caio Oliveira
7b45d31df0 brw: Add support for GOTO/JOIN in the assembler
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33522>
2025-03-06 17:06:20 -08:00
Caio Oliveira
9df254731e brw: Make assembler strict about JIP and UIP order
The "JIP:" and "UIP:" markers were being ignored, so was possible
to switch their order in the text but the parser would act as the
same.  Just fix the order now and enforce it through the parsing.

Since we are here, remove the "Jump:" and "Pop:" that are not used
for Gfx9+ anymore.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33522>
2025-03-06 17:06:19 -08:00
Caio Oliveira
25875f5e79 brw: Remove bblock_t parameters from various passes
These are either unused or can be trivially replaced by
a block stored in an instruction.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
8e2a7cb42d brw: Embed at_end() inside brw_builder(brw_shader *) constructor
All remaining uses of that constructor would also use at_end(),
and vice-versa.  So just implement that behavior in the constructor
itself.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
6f37e6f104 brw: Add explicit way to get an empty brw_builder
And use brw_builder(brw_shader *) and brw_builder() constructors
where possible.

The way tests are written, it is necessary to initialize an "empty"
builder -- which is later replaced by a proper one.  Default parameter
NULL make that initialization implicit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
32e562ae01 brw: Simplify brw_builder "insert before inst" constructor
Since brw_inst now has the block it belongs and the block can
reach the shader, the only necessary information to create a
builder is the brw_inst itself.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
66307811c3 brw: Remove block parameter from brw_inst::remove()
Use brw_inst::block instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
7924d48bcd brw: Use brw_inst::block in CSE
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
b0b0fa8624 brw: Use brw_inst::block in Combine Constants
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
07d0af763d brw: Use brw_inst::block in Def analysis
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
705d448bc3 brw: Add block pointer in brw_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Caio Oliveira
b71ec53048 brw: Remove unused function
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33815>
2025-03-06 23:33:38 +00:00
Mike Blumenkrantz
7167214cab zink: support crazy CL buffer-to-texture extension
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Mike Blumenkrantz
a6d3078c80 zink: extract some samplerview bind/unbind code
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Mike Blumenkrantz
952ec2ab55 zink: extract some shader image resource binding code
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Mike Blumenkrantz
1f6c97f358 zink: disable reordering on compute contexts
in theory reordering shouldn't do anything here other than promote
everything to the reorder cmdbuf, which is harder to debug

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33777>
2025-03-06 23:04:44 +00:00
Samuel Pitoiset
5f177018f7 radv/ci: re-enable ET2C emulation testing on non-native GPUs
This env variable was renamed except for CI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33924>
2025-03-06 22:09:49 +00:00
Samuel Pitoiset
54242f8f04 ci/b2c: fix passing B2C_* variables
Broken search&replace regex.

This fixes GPU hang detection on RADV/CI.

Fixes: bad0197300 ("ci/b2c: pass through all the B2C_* variable without renaming them")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33924>
2025-03-06 22:09:49 +00:00
Lakshman Chandu Kondreddy
2cfe070b3b freedreno: Add support for Adreno623 GPU
Add support to enable basic functionality of Adreno623 GPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33525>
2025-03-06 21:48:05 +00:00
Marek Olšák
40aac0681b ac,radeonsi: define all SDMA DCC fields & use them, enable compressed writes
SDMA supports HTILE, but SURF_TYPE must be set correctly.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:54 +00:00
Marek Olšák
ce0d213ac8 radeonsi: don't cull front/back faces in the hw if the shader culls them
This reduces the number of context rolls by not setting
the CULL_FRONT/CULL_BACK register fields.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:54 +00:00
Marek Olšák
bafab3324e radeonsi: reflect blitter VS in si_context::num_vertex_elements
Set it to 0 if the VS doesn't use VBOs. This fixes an assertion failure.

Fixes: 7bf5d2ce75 - radeonsi: add assertion requiring binding vertex elements before vertex_buffers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12698
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:53 +00:00
Marek Olšák
c662fcfa94 radeonsi: lower IO only if io_lowered == false
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:53 +00:00
Marek Olšák
53ae218dcd radeonsi: use the restrict keyword for draw parameters
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:53 +00:00
Marek Olšák
95a9df811a radeonsi: enable Z/S caching in GL2 by default except FurMark
This improves performance for several workloads.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:52 +00:00
Marek Olšák
36ccc300d8 radeonsi: enable NGG culling when the shader writes the viewport index
Only W and face culling is enabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:52 +00:00
Marek Olšák
356f5b2d2e radeonsi: move buffer reallocation to a separate function
to be used later

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:51 +00:00
Marek Olšák
0f9c972453 radeonsi: use si_is_buffer_idle everywhere
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:50 +00:00
Marek Olšák
c96f7a079f winsys/amdgpu: don't use 32-bit address space for IBs
We run out of the 32-bit address space and then we crash.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:50 +00:00
Marek Olšák
e468321bee ac/cmdbuf: rework CB/DB cache controls for better perf
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:49 +00:00
Marek Olšák
73175ec0b6 ac/cmdbuf: split meta_*_policy to dcc and htile variables
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:49 +00:00
Marek Olšák
d2141e6751 ac/nir/ngg: add an option to skip viewport-based culling
We can do W and face culling when we have multiple viewports, but not
frustum and small prim culling because those are dependent on the viewport.
When a shader writes the viewport index, the new option allows skipping
viewport-based culling while keeping W and face culling.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:48 +00:00
Marek Olšák
d429e35169 ac/nir/cull: extract a helper calling accept_func
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:48 +00:00
Marek Olšák
177c9b173e Revert "ac/nir: clamp vertex color outputs in the right place"
This reverts commit b3fc49686e.

It was a rebase failure.

Fixes: b3fc49686e

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:47 +00:00
Marek Olšák
e99efe7164 ac,radeonsi: don't set num_slots/src/dest_type/write_mask when they're set automatically
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:47 +00:00
Marek Olšák
96722aeda3 ac/gpu_info: use max_good_cu_per_sa for computation of max_scratch_waves
every CU should be able to use scratch

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
2025-03-06 21:10:46 +00:00
Rhys Perry
66130a51d3 radv: don't assume WGP mode in radv_get_max_waves
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33873>
2025-03-06 20:47:20 +00:00
Rhys Perry
17abc5f326 radv: improve radv_get_max_waves for multi-wave workgroups with LDS
LDS isn't divided among SIMDs, and it doesn't make sense to launch a
fraction of a compute workgroup.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33873>
2025-03-06 20:47:20 +00:00
Connor Abbott
076f52285c tu: Remove useless prim_order state merging
We already merged it below, when the library has both fragment output
interface and fragment shader state (which is when we'd compute it
anyway). Setting it twice is probably harmless but also confusing and
useless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33902>
2025-03-06 20:24:22 +00:00
Connor Abbott
413947e2de tu: Fix static blend bandwidth calculation
We were never setting the valid bit, so would never happen. If it did
happen, we forgot to merge in the bandwidth calculation from child
libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33902>
2025-03-06 20:24:22 +00:00
Loïc Minier
c36cd32345 freedreno: check if GPU supported in fd_pipe_new2
fd_pipe_new2 can segfault when trying to set the is_64bit flag on new
pipes. This can happen when the current GPU is not be listed in the
fd_dev_recs table because it's not supported by mesa, but is supported by
the kernel.

Add a helper function to test if the current GPU is in the supported table,
and use it in fd_pipe_new2.

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33830>
2025-03-06 20:00:02 +00:00
Mark Collins
0342d34bdb tu/kgsl: Remove zero CB queue submission fast path
The fast path for kgsl_queue_submit when there are no command buffers
and only sync objects led to breakage for two reasons:
* The fast path was not properly handling duplication of the merged sync
  object assigned to signalled `kgsl_syncobj`(s), which could lead to
  multiple `kgsl_syncobj`s owning the same FD and consequently issues
  such as double close of that FD leading to UB. This is fixed by moving
  to the slow path as it always produces a timestamp sync object which
  can be trivially duplicated.
* The Vulkan specification requires that drivers strictly follow the
  order of submission of command buffers and consequently the order of
  semaphore signal/wait operations. Since no submission was being made
  to the kernel, subsequent submissions could be executed without waiting
  for wait/signal operations from previous submissions to complete.

As both of these issues are fixed by moving to the slow path, this patch
removes the fast path in favor of the more correct slow path.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33894>
2025-03-06 19:40:41 +00:00
Pavel Ondračka
87a90a3b38 r300: fix temps counting for shader-db stats
RC_FILE_INPUT is pretty much just a RC_FILE_TEMPORARY with an initial
value in it. So we regalloc it the same way we do normal temps, however
for unknown reasons (probably to have a bit more readable shader dumps)
we still keep the RC_FILE_INPUT type even though its the same as
temporary. This is handled correctly when emitting the machine code,
however, it was not taken into account in shader stats.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33817>
2025-03-06 19:12:24 +00:00
Martin Krastev
15e0e53b4d svga/ci: enable vmware farm
Farm was down due to infra outage.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33919>
2025-03-06 18:47:49 +00:00
Yiwei Zhang
6868212774 venus: fix a memory corruption in query records recycle
The free list must be re-initialized. Found the bug while running:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.device_compability_khr.gpu_built.top
where it invokes VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT to purge
the cmd pool resources, and the next alloc still gets cache hit with the
"empty" list.

Fixes: e2c4bafccc ("venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33908>
2025-03-06 18:25:20 +00:00
Ruijing Dong
a3c859d9f3 radeonsi/vcn: vcn5 roi fix
Compared to vcn4, vcn5's implementation has changed.
It needs to apply the qp_delta directly instead of
dividing by 5.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33886>
2025-03-06 17:59:22 +00:00
Marek Olšák
171ee1797b glapi: remove extension definitions that will likely never be implemented
If somebody needs these in the future, they can add them back, but a lot
of these extensions are very old (SUN, SGI, ...).

No code is added, though git diff is having trouble detecting that.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
0a330b1660 egl: use the current dispatch to execute glFlush instead of get_proc_address
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
8bb7033095 glx: fix build with -Dlegacy-x11=dri2
Fixes: 71bb62e3c9 - glx: stop exporting GL functions from libGLX_mesa.so

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
0cebfb15b5 glapi: remove duplicated generated header glapitable.h
mesa/main/dispatch.h is exactly the same. We generated the same header
twice.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
db7e49d5ff glapi: remove static glapi (it's dead code now)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
fefb1a6fb3 meson: remove with_shared_glapi variable (it's always true)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
fde53ac020 glx/xlib: switch glapi from static to shared (which is also static)
Shared glapi doesn't make GL functions globally available, so we have
to use the dispatch API.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
e5c76088e9 meson: never use static glapi because shared glapi is also static and better
Shared glapi is already statically linked with libmesa (src/mesa),
and some parts are statically linked with loaders.

Static glapi will be removed after this is merged.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
José Roberto de Souza
f0f896ef21 iris: Replace BO_ALLOC_* macros by a enum
This changes makes it strongly typed and gives more context.
No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:04 +00:00
José Roberto de Souza
a13a6656dd intel: Add function to check if PXP is supported in Xe KMD
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:04 +00:00
José Roberto de Souza
63861472ff iris: Add support to create protected bo and protected exec_queue in Xe KMD
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:04 +00:00
José Roberto de Souza
e146e573f7 anv: Add support to create protected bo and protected exec_queue in Xe KMD
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
a99d90d015 anv: Move code adding protected memory type to common code
Xe KMD now has support for protected memory, so lets move it
to common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
187e65002f intel: Sync xe_drm.h
Sync with:
	commit 33e26f3544a558e7476eb221ff33173759b3a116
	Merge: 16893dd23f6d1 b7b68c6e36776
	Author: Dave Airlie <airlied@redhat.com>

	    Merge tag 'drm-xe-next-2025-02-24' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
4860532f49 anv: Remove protected memory support from compute queue
CCS don't support MI_SET_APPID instruction, that might be the reason
some tests protected memory tests fail on CCS.
Re-enable it if a workaround/solution is found.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:03 +00:00
José Roberto de Souza
008ac818ba intel/common: Retry GEM_CONTEXT_CREATE when PXP have not finished initialization
If PXP initialization is not completed and application requested a
protected context the GEM_CONTEXT_CREATE will wait up to 250ms for
PXP to finish initialization but if that do not happens it will
return a error and set errno to EIO.
This patch add the missing retry handling.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
2025-03-06 16:25:03 +00:00
Karol Herbst
ce60f47e96 rusticl/program: fix building kernels
We ended up with duplicates, but also rebuilt the same kernel over and
over again for multi dev builds.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
57a7e86aa9 rusticl/program: rework build_nirs so it only touches devices we care about
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
241279ac2c rusticl/program: loop over all devices inside Program::build
We want to build the kernels once and atm we are doing it several times
for each device.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
e434ce1559 rusticl/program: pass options by reference
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Karol Herbst
b2f3933c8d rusticl/program: implement CL_INVALID_PROGRAM_EXECUTABLE check in clGetProgramInfo
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
2025-03-06 16:02:43 +00:00
Rob Clark
ee787b64ed freedreno: Wait for imported syncobj fences to be available
Waiting on a fence created from an imported syncobj needs wait for the
fence_fd to become available

Fixes piglit tests added in https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/992

Fixes the following issue for freedreno: #12650

Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724>
2025-03-06 15:12:31 +00:00
Rob Clark
fac2c4af1b tc: Add missing tc_set_driver_thread()
Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724>
2025-03-06 15:12:31 +00:00
Rebecca Mckeever
6df35783cc panvk: Enable shaderStorageImageExtendedFormats
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33459>
2025-03-06 14:45:17 +00:00
Rebecca Mckeever
27037efcfd panvk: Add STORAGE_IMAGE_BIT feature for formats supporting sampled images
All formats that support sampled images should also be suitable for
storage images.

Fixes: d970fe2e ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33459>
2025-03-06 14:45:16 +00:00
Valentine Burley
90f33b217d panfrost/ci: Pin g610-gl job to 4GB DUTs
Use exclusively the 4GB devices for the panfrost-g610-gl job, to preserve
the 8GB+ devices for the Vulkan jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:36 +00:00
Valentine Burley
dceb9a1a9b panfrost/ci: Shorten Piglit job names
Drop extra gl and gles labels from the job names.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:35 +00:00
Valentine Burley
b310a4a13d panfrost/ci: Add a Piglit job on G57
We have more than enough devices available to add a new Piglit job on the
new mt8195-cherry-tomato-r2 device.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:35 +00:00
Valentine Burley
815295e7bb panforst/ci: Migrate the G57 GL job to MT8195
Migrate the panfrost-g57-gl job to a new device in LAVA,
mt8195-cherry-tomato-r2. This DUT is faster than the
mt8192-asurada-spherion-r0 device it replaces.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33865>
2025-03-06 13:48:35 +00:00
Vasily Khoruzhick
dd765da872 lima: ppir: try inserting nodes into successor instr for uncond branch
It is safe to attempt inserting a node into the same instruction as
successor if successor is an unconditional branch.
ppir_instr_insert_node() will take care of conflicts with ALU_COMBINE
slot

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
2025-03-06 13:25:40 +00:00
Vasily Khoruzhick
fa9ddbe82b lima: ppir: optimize branches
Implement 2 optimizations for branches:

1) if unconditional branch target is a block that only has
   unconditional branch, propagate the target
2) optimize following contruction:
   block 1:
   ...
   if (cond) block 3
   block 2:
   branch block N
   block 3:
   ...

   into

   block 1:
   ...
   if (!cond) block N
   block 2:
   block 3:
   ...

Note: optimization 1) significantly improves runtime of if ladders, but
it is not visible in shader-db because we do not track shortest/longest
path and it doesn't always create dead code (usually just a single
instruction)

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
2025-03-06 13:25:40 +00:00
Vasily Khoruzhick
69b119bc00 lima: ppir: assign actual index to discard block
Discard block is always added to the block list after translation from NIR,
so we can just assign it an index that equals to block list size.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33754>
2025-03-06 13:25:40 +00:00
Samuel Pitoiset
2a56afed8d radv: switch to device address from vk_buffer
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:01 +00:00
Faith Ekstrand
c99039e189 vulkan/meta: Use vk_buffer.device_address directly
This saves us jumping through an entrypoing just to fetch a uint64_t.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:01 +00:00
Faith Ekstrand
b808277d09 hk: Use the new buffer device address infrastructure
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:01 +00:00
Faith Ekstrand
8ca0531485 panvk: Use the new buffer device address infrastructure
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:00 +00:00
Faith Ekstrand
7900ff5c56 nvk: Use the new buffer device address infrastructure
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:00 +00:00
Faith Ekstrand
73da18b956 vulkan: Add device address helpers to vk_buffer
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33897>
2025-03-06 09:46:00 +00:00
Job Noorman
c44243099f ir3: lower immediates to const regs in preamble on a7xx
On a7xx, const registers should be loaded via the preamble instead of
uploaded by the driver to the const state. This commit implements this
by adding a new pass that emits the consts created by ir3_cp to a
sequence of stc instructions in the preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
fbe8fc0dae ir3: fix max const size calculation for the binning pass
The binning pass should never exceed the const size of the non-binning
pass.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
434b82469f ir3: make const_imm_index_to_reg helper public
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
68ab25e6d4 ir3: split immediate state from rest of const state
On a7xx, the immediates that get promoted to const registers will be
initialized in the preamble instead of being part of the const state. So
technically, we won't need the immediate state that is part of the const
state anymore on a7xx. However, it is still a convenient place for
ir3_cp to store the immediates that should be promoted to const
registers before they are lowered to the preamble.

This causes one issue: the binning pass isn't allowed to modify the
const state while it's perfectly fine for it to use different immediates
compared to the non-binning pass on a7xx. Even pre-a7xx this is fine as
long as the size of the immediate buffer is the same.

To allow the binning pass to modify its immediate state while keeping
its const state immutable, this commit moves the fields related to
immediates into a new struct. Runtime checks are added to enforce that
the size of the immediate buffer is the same for the binning and
non-binning variant pre-a7xx.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
f9fc0fc8fd ir3/sched: handle dependencies between stc and const reads
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
0f6ec14925 ir3: fix false dependencies of rpt instructions
When merging multiple instructions into one rpt instruction, the false
deps of the rpt instruction should be the union of the false deps of its
parts.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 4c4366179b ("ir3: add post-RA pass to merge repeat groups into rptN instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:54 +00:00
Job Noorman
62d2069617 ir3: add helper to create STC
Creating STC is complicated since we might need to use a1.x for
addressing. Extract the current code into a helper so that it can be
used elsewhere.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Job Noorman
3186443057 ir3: remove hash table for a1.x
Removing duplicates is now supported by ir3_cse so the hash table is
unnecessary. Removing it will make it easier to create instructions
using a1.x without having access to ir3_context.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Job Noorman
06978e0c0c ir3/cse: add support for mov a0.x/a1.x
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Job Noorman
ac18eccd74 ir3: add ir3_cursor_current_block helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
2025-03-06 08:47:53 +00:00
Lorenzo Rossi
69982e6f2f nak: Flatten AttrAccess into instructions
The AttrAccess structure provided inputs for similar instructions, some
inputs were used only in a subset of instructions, needing asserts and
dummy values.
This commit flattens the struct directly in the instructions removing
the unused fields and cleaning up the code.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33899>
2025-03-06 05:29:56 +00:00
Eric Engestrom
2c034470ed docs: add sha sum for 25.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33904>
2025-03-06 04:07:22 +00:00
Eric Engestrom
4fb7c57e29 docs: add release notes for 25.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33904>
2025-03-06 04:07:22 +00:00
Eric Engestrom
487af01696 docs: update calendar for 25.0.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33904>
2025-03-06 04:07:20 +00:00
Corentin Noël
24dbc278f0 tnn: nir: Don't use deprecated NIR_PASS_V macro anymore
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:21 +00:00
Corentin Noël
acd5f2971a ntt: nir: Don't use deprecated NIR_PASS_V macro anymore
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:20 +00:00
Corentin Noël
eb1274ef08 nir: Add bool return value to nir_legacy_trivialize(..)
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:20 +00:00
Corentin Noël
8eae89f3f0 virgl: nir: Don't use deprecated NIR_PASS_V macro anymore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33686>
2025-03-06 03:29:20 +00:00
Christian Gmeiner
71e2ddcede etnaviv/ci: Add gles2 run for GC3000
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33838>
2025-03-06 03:09:12 +00:00
Assadian, Navid
9a88afecbd amd/vpelib: More parameters to the segmentation process and introduce validation hook
Generalization for the following:
1. pass in the scaler output alignment requirement to segment number determination function
2. parameter validation hook

Signed-off-by: Navid Assadian <Navid.Assadian@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Zhao, Jiali
37c244998a amd/vpelib: Fix studio output CSC
Fix studio output CSC.

Signed-off-by: Jiali Zhao <Jiali.Zhao@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Visan, Tiberiu
da04cbca66 amd/vpelib: Apply normalization for full range
[WHY]
The full range needs to have the same brightness normalization like the
studio range.

[HOW]
Apply the same normalization.

Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Visan, Tiberiu
b3d43cea08 amd/vpelib: Fix studio range
[WHY]
Studio signal has an offset.

[HOW]
Subtract that offset.

Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Leder, Brendan Steve
69c331e2c0 amd/vpelib: Reformat index variables and update enum
Reformat index variables to indicate loop specifics and update enum to match formatting guide.

Signed-off-by: Brendan Steve Leder <Brendansteve.Leder@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Evan Damphousse <Evan.Damphousse@amd.com>
Acked-by: Alan Liu <Haoping.Liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33833>
2025-03-06 02:11:53 +00:00
Vasily Khoruzhick
6528ee4228 lima: ppir: reuse load_temp/store_temp nodes if possible
Currently spilling code operates on individual ops rather than on
instructions, and as a result it may create a redundant load_temp op if
an instruction references spilling register several times.

Similarly, it creates multiple stores if there are multiple ops in the
instruction that write different components of the register.

Check whether the instruction already contains a necessary load_temp or
store_temp and reuse it if possible.

shader-db:

total instructions in shared programs: 27718 -> 27673 (-0.16%)
instructions in affected programs: 2786 -> 2741 (-1.62%)
helped: 18
HURT: 0
helped stats (abs) min: 1 max: 8 x̄: 2.50 x̃: 1
helped stats (rel) min: 0.39% max: 5.33% x̄: 2.05% x̃: 0.80%
95% mean confidence interval for instructions value: -3.70 -1.30
95% mean confidence interval for instructions %-change: -3.09% -1.01%
Instructions are helped.

total loops in shared programs: 4 -> 4 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 390 -> 381 (-2.31%)
spills in affected programs: 145 -> 136 (-6.21%)
helped: 9
HURT: 0

total fills in shared programs: 1210 -> 1174 (-2.98%)
fills in affected programs: 149 -> 113 (-24.16%)
helped: 9
HURT: 0

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33753>
2025-03-06 01:48:55 +00:00
Mike Blumenkrantz
7200cf8827 radv: don't unnecessarily flag prolog recalc when binding VBOs
another 25% for vkoverhead@draw_vbo_change_dynamic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
4f71370830 radv: get vbo info directly into dgc upload
don't need this memcpy

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
b78835de13 radv: move non_trivial_format calc to dynamic VI bind
this otherwise gets pointlessly recalculated on every draw when a VBO changes

another 10% for vkoverhead@draw_vbo_change_dynamic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
42db08c275 radv: split out dynamic vertex input descriptor writing
~25% boost to vkoverhead@draw_vbo_change_dynamic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
22434edefc radv: inline some vertex descriptor functions
+5-7% in vkoverhead 16

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
00f51f7215 radv: eliminate a memset in radv_get_vbo_info()
very minor perf cost

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
e2ccd638a8 radv: roll line topology dynamic state changes into existing rast samples flag
this eliminates uploading rast samples whenever prim type changes even
when rast samples will not be changed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
b2123314bd radv: store vertex prolog simple input check to cmdbuf on vs bind
no need to check this again and again

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
881d94a40a radv: store num_attributes to shader info
this eliminates a util_last_bit from the prolog hotpath

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Mike Blumenkrantz
d40dd4bfb7 radv: rewrite radv_get_line_mode() conditional
this was weirdly hard to parse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33806>
2025-03-06 01:26:02 +00:00
Alyssa Rosenzweig
6c24ac7d21 panfrost: clean up CL meson rules
we shouldn't need any of this anymore. I cleared out similar gunk from Asahi, we do the same for Panfrost here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
4d6e37066a meson,clc: set CL standard from meson
this is slightly less weird I think.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
c0022b6603 intel: use common CL args
this contains two behaviour changes:

* NDEBUG no longer set in debug builds (so asserts work in debug, but are still
  stripped out in release as expected).
* macro map set properly for assertions to be reported with proper paths.

together this makes assertions do the right thing on Intel and brings us in
alignment with asahi+panfrost

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
256cc0c927 meson: set NDEBUG appropriately for OpenCL
this strips device-side asserts in release drivers. this is a behaviour change
for asahi/panfrost/nvk, but hopefully a welcome one!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Alyssa Rosenzweig
f35172b6a4 meson: make CL args common
this will let us unify behaviour across drivers a bit more.

no functional change here. (intel is specifically excluded to avoid a functional
change.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33879>
2025-03-06 00:43:59 +00:00
Caio Oliveira
54912281a0 brw: Always verify EU compaction in debug mode
There's already code to verify that any compacted instruction
that we produce is equivalent to the original uncompacted
instruction -- including detailed output if it fails.

This patch enables this verification in debug build and will
abort in case it fails.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33821>
2025-03-06 00:14:14 +00:00
Caterina Shablia
a9592a0c15 panvk: enable subgroupExtendedTypes
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
c4941376a9 pan/bi: lower subgroups before lowering int64
nir_lower_int64 doesn't know how to lower 64-bit imul reductions and
scans. Lowering subgroup operations first leaves us with just 64-bit
ballot and read_invocation, which are easily lowered.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
0f520e3d5a pan/bi: lower non-32-bit ballot{,_relaxed}
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
14cecd0621 pan/bi: ensure src bit sizes of ballot{,_relaxed} and read_invocation
* ballot{,_relaxed}'s src[0] must always be a 32-bit value.

 * read_invocation's src[0] must always be at most 32-bit value. While
   the HW instruction always operates on a 32-bit value, it's important
   to remember that it's just a data movement operation, so garbage in
   the high bits of a 32-bit value representing a narrower value don't
   present an issue.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Caterina Shablia
ca9ff8c8c7 nir: teach nir_lower_bit_size to handle ballot and ballot_relaxed
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33365>
2025-03-05 22:58:15 +00:00
Samuel Pitoiset
279511bea0 ci: update VKCTS main to ba86fb95004331f2cf571dd9adefe2458290ee11
RADV is the only driver using VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33707>
2025-03-05 22:03:33 +00:00
Alyssa Rosenzweig
386e777cad v3dv: fix clang warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33878>
2025-03-05 21:28:53 +00:00
Alyssa Rosenzweig
8b7389b1a9 asahi: port to common stats framework
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33814>
2025-03-05 20:50:17 +00:00
Alyssa Rosenzweig
722b83434a util: add shader statistic framework
All mature drivers report shader statistics in various places. GL drivers use
util_debug for shader-db's report script. VK drivers use executable statistics
feeding the report fossil script. Many drivers also have a magic env var to
dump the stats to stdout/stderr in addition to these standard forms.
Implementing any of these 3 reports requires doing brittle string processing in
C (GL, stdout) or piles of boilerplate (VK). Additionally, the logic gets
duplicated in every driver and duplicated between GL and VK.

And to add insult to injury, the information is duplicated *again* in the report
fossil script :'(

This commit introduces a new 'shader statistic framework' that aims to unify
statistics reporting across all drivers and across GL&VK. With the new approach,
a common XML file defines all the statistics for the tree. The common code
introduced here then autogenerates from that XML file an appropriate C header.
The header contains a C struct for each ISA, and autogenerated print/report
functions. Minimal driver integration is required: just filling out the stats
struct and calling the appropriate functions.

In this MR, 3 driver families are added as examples. Panfrost/PanVK and
Asahi/Honeykrisp are added as "complete" examples. Neither Vulkan driver
reported nontrivial executable statistics; with these changes, both report all
the same statistics that the GL drivers report. Turnip is also added partially -
it's not plumbed into ir3/gallium yet but just using the XML reduces boilerplate
a ton for Vulkan statistics.

[It is intended for this XML to be consumed also by shader-db's python scripts,
but that's not done here.]

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33814>
2025-03-05 20:50:17 +00:00
Alyssa Rosenzweig
2a44266d57 vulkan: add helpers to work with executable statistics
this is a lot of boilerplate in each driver. add helpers for it instead. the
common framework will use these internally, but drivers that don't want the
framework for whatever reason could use these themselves too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33814>
2025-03-05 20:50:17 +00:00
Samuel Pitoiset
682723c0c4 spirv/tests: add a test for lower_terminate_to_discard
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
40ea8c2edc spirv/tests: add a test for force_tex_non_uniform
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
74e1cebd02 spirv/tests: add a test for force_ssbo_non_uniform
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
2e3e3249b8 spirv/tests: add a test for NonSemantic.DebugBreak
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
c9eb0a2db5 spirv/tests: initialize compiler options in constructor
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Samuel Pitoiset
f2eb31b1a2 spirv: move workarounds to an inner struct in spirv_to_nir_options
To be more explicit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33866>
2025-03-05 19:56:50 +00:00
Mike Blumenkrantz
2c6837260e zink: only add fb surf refs on unbind
this only applies to cases where a fb state persists across cmdbufs,
but it's consistent with how other resource binds work

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
c32e67e0d9 zink: use VKCTX for vertex buffer binds and delete unused screen local
also fix weird indentation

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
540d35b27f zink: start using ctx->vertex_state_changed again
SetVertexInput is a heavy call.

also move this call outside zink_bind_vertex_buffers() since it doesn't
use any of the same data and was invoking unnecessary loops

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
f136f8ddd7 zink: split set_vertex_buffers to avoid conditionals
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
7909adcef1 zink: delete zink_batch_state::ref_lock
this kills perf when managing lots of objects per batch and can
be trivially replaced by separate buffer lists for unsync usage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Mike Blumenkrantz
28259584f4 zink: improve precision on changes to depth bias between draws
this cuts calls here from 18k/frame to 18/frame in some synthetic
benchmarks

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33849>
2025-03-05 19:27:22 +00:00
Eric Engestrom
ac638928a8 v3d/ci: mark traces humus/AmbientAperture and humus/DynamicBranching3 as flaky
They've prevented a lot of MRs from being merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33882>
2025-03-05 17:56:48 +00:00
Lionel Landwerlin
199a052481 anv: fixup indentation around Wa_16014912113
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
888b2ec7b0 anv: break down Wa_16014912113 in need/apply parts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
93a327c4e6 anv/brw: move INTEL_MSAA_* flag computation to the compiler
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
beaba53010 brw: make intel_shader_enums.h opencl importable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:12 +00:00
Lionel Landwerlin
02eb26de0a genxml: simplify genX_rt_pack.h
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:11 +00:00
Lionel Landwerlin
374d2168ee intel/genxml: add a genX RT include header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:11 +00:00
Lionel Landwerlin
17ba9a19d1 anv/apply_layout: split binding table building into its own function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33751>
2025-03-05 17:20:11 +00:00
David Rosca
3ea3aa0f90 radeonsi/vcn: Support H264 encode weighted_bipred_idc
Only default (0) and implicit (2) are supported, explicit (1) is not.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33846>
2025-03-05 16:51:32 +00:00
Rhys Perry
0ec174afd5 aco: insert dependency waits in certain situations
This seems to fix some artifacts, but we're not sure why, so it might not
be a correct or optimal solution.

fossil-db (navi31):
Totals from 28424 (35.81% of 79377) affected shaders:
Instrs: 30112910 -> 30348977 (+0.78%); split: -0.00%, +0.78%
CodeSize: 159542980 -> 160485336 (+0.59%); split: -0.00%, +0.59%
Latency: 221438396 -> 221500856 (+0.03%); split: -0.00%, +0.03%
InvThroughput: 38154231 -> 38159984 (+0.02%); split: -0.00%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33853>
2025-03-05 16:22:54 +00:00
Faith Ekstrand
11939a70df zink: Use pipe_box helpers for damage calculations
The old code got the accumulation a bit wrong.  For one thing, it always
accumulates with whatever was there instead of resetting to empty each
time.  For another, it sets with with y and height with x when it writes
back to the resource.  This is also all too complicated because it
converts between pipe_box, u_rect, and VkRect2D on every iteration.

Instead, there are helpers in util/box.h which will do most of this work
for us and they're correct.  Let's just use them to get rid of the bugs
and make everything simpler and more obvious at the same time.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12194
Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
2025-03-05 15:46:23 +00:00
Faith Ekstrand
3346eb55ed iris: Use pipe_box helpers for damage calculations
The old calculations are wrong.  They add width+x and call that a width
the same with y and height.  This is wrong but it's wrong in a way that
only ever increases damage so we never noticed it.  However, util/box.h
has helpers for these operations which don't have this bug.  Let's use
them and make the code simpler, more obvious, and correct.  We also
weren't flipping the damage like we're supposed to and that was most
likely not getting noticed because of the over-damage.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
2025-03-05 15:46:23 +00:00
Faith Ekstrand
8cf921a742 util/box: Add a intersect_2d helper
Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
2025-03-05 15:46:23 +00:00
Danylo Piliaiev
75a85134fa tu: Be more granular in calculating whether blend state reads color
There could be several attachments where none of them are written to.
Happens with pre-2.0 DXVK.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33802>
2025-03-05 15:16:37 +00:00
Michael Cheng
014f376755 anv: Change as_build to show num tlas/blas
As_build now shows the number of tlas/blas that was built.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33720>
2025-03-05 14:19:56 +00:00
Michael Cheng
9ba7005d25 vulkan : Pass in number of tlas/blas being built
Pass the counts for top-level and bottom-level acceleration
structures to the debug_marker.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33720>
2025-03-05 14:19:56 +00:00
Mary Guillemard
2f1ce296d0 pan/bi: Ensure we select b0 with halfswizzle in va_lower_constants
In case of constant lowering with halfswizzle sources, we were selecting
h01 causing an invalid instruction error to be yield later.

This can only be hit by conversion instructions and shouldn't be seen in
the wild (as this should be eliminated before entering the backend).

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d07fb9a67 ("pan/va: Handle 8-bit lane when lowering constants")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
8948b74955 pan/bi: Fix out of range access in bi_instr_replicates
For replicates, we were checking equivalence between two sources on some
instructions but some of them only had one source causing an out of
bound access and check against unrelated data.

Instead we now always return true for those instructions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f7d44a46cd ("pan/bi: Optimize replication")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
01ec34fe57 pan/bi: Lower FREXPE.v2f16 and FREXPM.v2f16 on v11+
This was removed on v11.

Fix dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.*
failures on v11+.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
cbc42abdb3 pan/bi: Run bifrost_nir_lower_algebraic_late while there is progress
With v11 needing specific lowering, we now need to run it multiple time
to ensure every new instructions materialized aren't invalid.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Mary Guillemard
54ce78c4e1 pan/bi: Run nir_lower_bit_size after algebraic
nir_opt_algebraic can possibly materialize instructions with a bit_size that
need to be lowerd.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
2025-03-05 13:19:57 +00:00
Samuel Pitoiset
0da8a6bfd5 docs: adjust NGG culling options description
NGG culling is also enabled by default on GFX10 now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:08 +00:00
Samuel Pitoiset
ab4d2d447a radv: remove redundant radv_instance::drirc::rt_wave64
Use RADV_PERFTEST_RT_WAVE_64 instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:08 +00:00
Samuel Pitoiset
54a62c5c23 radv: use radv_emulate_rt() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:08 +00:00
Samuel Pitoiset
9108c198bb radv: fix trap handler exception options
They are same values.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:07 +00:00
Samuel Pitoiset
df3f2df966 docs: add missing RADV_PERFTEST=video_encode description
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33868>
2025-03-05 12:45:07 +00:00
Tomeu Vizoso
854bc2ee05 kopper: Explicitly choose zink
If we pass zink=false to pipe_loader_drm_probe_fd, it could happen that
a Gallium driver that had been already discarded because of not
supporting the graphics CAP will be chosen.

To avoid that, explicitly ask pipe_loader_drm_probe_fd to choose the
zink Gallium driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Lucas Stach
7e76c67632 kmsro: look for graphics capable screen as renderonly device
Exposing a rendernode from a supported driver is not a sufficient
matching criteria to qualify as the render part of a renderonly
device, as the rendernode might only expose compute or 2D accel
capabilities.

Look for a screen that actually supports gallium graphics operations
to qualify as a renderonly screen.

v2 (Tomeu): Have pipe-loader return a list of FDs for kmsro to choose
            based on capabilities.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Tomeu Vizoso
cfad6fb037 egl/surfaceless: Only choose drivers that expose the graphics capability
This is to prevent applications to try to render to devices that have no
3D hardware (eg. NPUs).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Corentin Noël
45e771f4fb ci: Update CrosVM and Virglrenderer
Update to their latest version on time

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33796>
2025-03-05 10:16:49 +00:00
Tapani Pälli
288f932b78 iris: restrict TessellationDistributionLevel for Wa_16025857284
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33864>
2025-03-05 09:55:05 +00:00
Tapani Pälli
1674cb3665 anv: restrict TessellationDistributionLevel for Wa_16025857284
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33864>
2025-03-05 09:55:05 +00:00
Tapani Pälli
1a5cbbeb47 intel/dev: update mesa_defs.json from internal database
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33864>
2025-03-05 09:55:05 +00:00
Mike Blumenkrantz
3f7b0c3951 mesa: avoid creating incomplete surfaces when multiview goes out of range
some drivers can't handle this, and it can't be used anyway, so don't bother

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Mike Blumenkrantz
89c2639227 mesa: add error handling for OVR_multiview
there's a lot that were missed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Mike Blumenkrantz
2b37f23314 gallium: fix pipe_framebuffer_state::view_mask
this is the mask of the number of views, not the actual views being
selected

llvmpipe previously had this wrong, though I don't understand how
vkcts didn't cover it

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Mike Blumenkrantz
5ef60aef63 llvmpipe: pass layer count to rast clear
this otherwise passes the fb layer, which is not quite right when
using multiview with view indexing

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
2025-03-05 09:15:22 +00:00
Marek Olšák
e19f4c043d gallium/u_blitter: change blitter_attrib from union to struct
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33837>
2025-03-05 08:31:12 +00:00
Marek Olšák
ca09c173f6 gallium/u_blitter: remove UTIL_BLITTER_ATTRIB_COLOR, use a constant buffer
Pass the clear color via a constant buffer instead of a FS input.
This results in less driver code and it could be faster on some GPUs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33837>
2025-03-05 08:31:12 +00:00
Faith Ekstrand
99b5970eb2 egl/wayland: Pass the original wl_surface to kopper
The Vulkan WSI code creates its own proxies so there's no benefit to
passing the proxy in.  It only screws things up.

Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33860>
2025-03-05 07:27:16 +00:00
Faith Ekstrand
fddff0d1b8 egl/dri2: Rework get_wl_surface_proxy()
Instead, just make it a helper for getting the wl_surface from the
wl_egl_window.  We'll want this in the next commit.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33860>
2025-03-05 07:27:16 +00:00
Mike Blumenkrantz
71d949a8c5 svga/ci: disable vmware farm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33872>
2025-03-05 07:15:31 +00:00
Mike Blumenkrantz
534436f863 zink: explicitly check usage in buffer barriers
it's technically possible for a resource to have no usage but for
batch usage to be set; this can occur if a resource is used,
its cmdbuf completes, but the batch state is not reset before the
resource is used again

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Mike Blumenkrantz
c83d459225 zink: alloc bo ids for non-slab bos too
this otherwise breaks perf for buffer lists and triggers full walks
on every lookup

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Mike Blumenkrantz
4d0f79a398 zink: don't reset all batch states when stalling
this makes perf worse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Mike Blumenkrantz
61b0955308 zink: always check submit_count to disambiguate when checking/waiting
this may otherwise erroneously detect usage on a batch state which has
already been reset

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33848>
2025-03-05 06:19:16 +00:00
Faith Ekstrand
78a80b9bf1 zink: Revert "zink: enable single-plane modifiers for generic 2D exports"
This reverts commit df1ff3c711.  When
clients allocate BOs via GBM's gbm_bo_create(), they expect those BOs to
work with KMS without modifiers.  Assigning them a modifier and hoping
that they then query that modifier even though they used the legacy API
to create the BO is pretty mean.  In particular, this breaks KWin which
doesn't use modifiers if the KMS device doesn't support atomic.

Fixes: df1ff3c711 ("zink: enable single-plane modifiers for generic 2D exports")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33887>
2025-03-05 05:52:20 +00:00
Erik Faye-Lund
bcff33ff93 panvk: disable shaderFloat16 on bifrost
We're failing a bunch of tests on G52 otherwise. Let's just disable this
feature on older gens for now, until we've gotten this fixed.

Fixes: 55c476efed ("panvk: advertise shaderFloat16")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33881>
2025-03-05 04:01:45 +00:00
Alyssa Rosenzweig
bf4ba66dbb panfrost,panvk: fix clang warnings
note the kernel reg one is a functional change.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33877>
2025-03-05 02:57:24 +00:00
Vasily Khoruzhick
fdeabf4162 lima: ppir: reuse uniform load in instruction if possible
We clone loads for uniforms for each user, which means that each
ppir_node will have its own, however an instruction may have several
nodes that need to load uniforms. Currently, in this case ppir compiler
will place all but one load uniforms nodes into a new instruction and
create an extra mov.

We can optimize that by checking whether load_uniform node in the instruction
is the same as the one we are trying to insert and reuse it. It is safe
to do so, because successors use pipeline register, so regalloc doesn't
care about it.

shader-db:

total instructions in shared programs: 27808 -> 27718 (-0.32%)
instructions in affected programs: 2652 -> 2562 (-3.39%)
helped: 31
HURT: 0
helped stats (abs) min: 1 max: 8 x̄: 2.90 x̃: 2
helped stats (rel) min: 0.56% max: 33.33% x̄: 5.12% x̃: 4.11%
95% mean confidence interval for instructions value: -3.78 -2.03
95% mean confidence interval for instructions %-change: -7.24% -2.99%
Instructions are helped.

total loops in shared programs: 4 -> 4 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 391 -> 390 (-0.26%)
spills in affected programs: 1 -> 0
helped: 1
HURT: 0

total fills in shared programs: 1213 -> 1210 (-0.25%)
fills in affected programs: 3 -> 0
helped: 1
HURT: 0

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33746>
2025-03-04 22:04:11 +00:00
Georg Lehmann
20dd6dfa12 aco/isel: use s_mul_i32 instead of s_cselect_b32 for a ? b : 0
It doesn't require SCC and this is more consistent with b2f.

Foz-DB Navi21:
Totals from 2107 (2.64% of 79789) affected shaders:
Instrs: 6619774 -> 6619280 (-0.01%); split: -0.01%, +0.00%
CodeSize: 36754448 -> 36752396 (-0.01%); split: -0.01%, +0.00%
Latency: 62207779 -> 62206422 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 13090494 -> 13090204 (-0.00%); split: -0.00%, +0.00%
VClause: 171572 -> 171573 (+0.00%)
SClause: 257528 -> 257530 (+0.00%)
Copies: 607680 -> 607204 (-0.08%); split: -0.10%, +0.02%
VALU: 4189422 -> 4189418 (-0.00%)
SALU: 1001750 -> 1001264 (-0.05%); split: -0.07%, +0.02%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
2d68efd9f3 aco/opt_postRA: remove scc == 0 for more opcodes
Convert special case to s_cselect

Foz-DB Navi21:
Totals from 42 (0.05% of 79789) affected shaders:
Instrs: 91826 -> 91690 (-0.15%)
CodeSize: 496304 -> 495680 (-0.13%)
Latency: 1631974 -> 1631948 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 278772 -> 278766 (-0.00%)
SALU: 10627 -> 10491 (-1.28%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
83247ffa30 aco/opt_postRA: remove scc != 0 with multiple uses
These can always be removed.

Foz-DB Navi21:
Totals from 39 (0.05% of 79789) affected shaders:
Instrs: 138352 -> 138299 (-0.04%)
CodeSize: 710424 -> 710272 (-0.02%)
Latency: 468276 -> 468254 (-0.00%); split: -0.01%, +0.00%
InvThroughput: 108970 -> 108973 (+0.00%)
SALU: 18785 -> 18732 (-0.28%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
6445ba0f05 aco/opt_postRA: allow try_optimize_scc_nocompare for all instructions
If the old SCC source worked, the new one will too.

Foz-DB Navi21:
Totals from 106 (0.13% of 79789) affected shaders:
Instrs: 255233 -> 254825 (-0.16%)
CodeSize: 1337308 -> 1335692 (-0.12%)
Latency: 1455208 -> 1454524 (-0.05%); split: -0.05%, +0.00%
InvThroughput: 385624 -> 385612 (-0.00%); split: -0.00%, +0.00%
SALU: 53976 -> 53568 (-0.76%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
Georg Lehmann
3386ea09d4 aco/opt_postRA: split try_optimize_scc_nocompare in two functions
These are two independent steps, no real reason why they should be in the same
function.

No FOZ-DB changes.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33734>
2025-03-04 21:36:17 +00:00
David Rosca
9d020826ca radeonsi/vcn: Add radeon_enc_av1_picture_type
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
2025-03-04 20:42:41 +00:00
David Rosca
d92781508b radeonsi/vcn: Set all pic params for H264 encode references
Fixes encoding B-frames with I-frame as L1 reference.

Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
2025-03-04 20:42:41 +00:00
David Rosca
24cbc4bfcb pipe: Remove PIPE_AV1_ENC_FRAME_TYPE_SHOW_EXISTING
This frame type can't be encoded.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
2025-03-04 20:42:41 +00:00
Karol Herbst
5c1f61d900 nir: Do not eliminate dead writes to shared memory in called functions.
Fixes regressions in rusticl and c11_atomic OpenCL CTS test.

Fixes: e65c1473de ("nir: Eliminate dead writes to shared memory at the end of the program")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33807>
2025-03-04 19:41:13 +00:00
Konstantin Seurer
44110fe004 lavapipe: Enable debug information if GALLIVM_DEBUG=symbols is set
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:49 +00:00
Konstantin Seurer
3b857064b6 gallivm: Run nir_lower_load_const_to_scalar
Vector defs are annoying to look at in the debugger.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:49 +00:00
Konstantin Seurer
83cac4e7e9 gallivm: Add a debug variable for the exec mask
Makes it show up in GDB.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
3f5a576c9e gallivm: Emit debug info for definitions
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
77e84aba5c gallivm: Handle nir_instr_debug_info
Emits llvm source locations using the nir line numbers provided by
nir_instr_debug_info.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
d6ca378f1b llvmpipe: Annotate functions with debug information
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
95a68076a7 gallivm: Create a debug builder and add GALLIVM_DEBUG=symbols
Also defers destroying the execution engine since destroying it early
looses debug information.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
3aeab4ce40 nir/print: Do not print debug information when gathering it
Referencing a shader string with differend debug information is
confusing.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Konstantin Seurer
a04b5ebd3c nir/sweep: Fix handling instructions with debug info
When debug information is present, the nir_instr pointer is not the
start of the allocation.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
2025-03-04 18:42:48 +00:00
Guilherme Gallo
fbc55afbdf ci/lava: Properly detect VMWARE farm
This will make the job definition default to the UART format for vmware
jobs, as only Collabora's farm relies on the SSH job definition due to
the unreliable Chromebook UART in LAVA.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33874>
2025-03-04 16:46:17 +00:00
David Rosca
5461ed5808 Revert "radeonsi/vcn: Limit size to target size in AV1 decode"
This is now done in frontend.

This reverts commit 3a6513d7c4.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
2025-03-04 16:18:04 +00:00
David Rosca
c60e4f0004 frontends/vdpau: Set AV1 max_width/height to surface size
Ideally this would be passed in pic params as the values are
in sequence header, but using the surface size also works.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
2025-03-04 16:18:04 +00:00
David Rosca
d0414ef7fb frontends/va: Set AV1 max_width/height to surface size
Ideally this would be passed in pic params as the values are
in sequence header, but using the surface size also works.
Also add sanity checks for frame size.

Fixes decoding av1-1-b8-22-svc-L2T1 and av1-1-b8-22-svc-L2T2.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
2025-03-04 16:18:04 +00:00
Lucas Fryzek
b37bcd01ed anv: Expose VK_EXT_device_memory_report
Also mark VK_EXT_device_memory_report as supported by anv in
docs/features.txt

Co-authored-by: shenghualin <shenghua.lin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767>
2025-03-04 15:24:39 +00:00
Lucas Fryzek
f01ad7c34c anv: Implement VK_EXT_device_memory_report
Report device memory events for:
  - command buffers
  - pipelines
  - descriptor sets and descriptor pools
  - device memory

Co-authored-by: shenghualin <shenghua.lin@intel.com>
Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767>
2025-03-04 15:24:39 +00:00
Lucas Fryzek
cfcc522bf8 vulkan/runtime: Add object type to DMR API
radv: Update DMR usage to make use of object type arg

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33767>
2025-03-04 15:24:39 +00:00
Nikita Popov
92638e543b clover: Fix MSVC build
Guard the include of dlfcn.h with HAVE_DLFCN_H. Use the
FALLBACK_CLANG_RESOURCE_DIR if it is not available.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33869>
2025-03-04 14:16:20 +00:00
Patrick Lerda
7cd0ced50d r600: update cayman_convert_border_color()
This change was tested on cayman. This change fixes all the tests fixed by
the evergreen commit, and fixes the 32-bits integer tests as well:
spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled/gl_compressed_rgb_bptc_signed_float, swizzled, border color only: fail pass
spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled/gl_compressed_rgb_bptc_unsigned_float, swizzled, border color only: fail pass
spec/arb_texture_compression_bptc/texwrap formats bordercolor-swizzled/gl_compressed_rgba_bptc_unorm, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r32i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r32ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg32i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg32ui, swizzled, border color only: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33579>
2025-03-04 13:55:19 +00:00
Patrick Lerda
0551e284bb r600: update evergreen_convert_border_color()
This change implements all the possible swizzle permutations
for one and two channel formats.

Note: The border color on integer 32-bits formats is working
only on cayman.

This change was tested on palm. Here are the tests fixed:
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_r16, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_r8, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_rg16, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats bordercolor-swizzled/gl_rg8, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_r16f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_r32f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_rg16f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-float bordercolor-swizzled/gl_rg32f, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r16i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r16ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r8i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_r8ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg16i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg16ui, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg8i, swizzled, border color only: fail pass
spec/arb_texture_rg/texwrap formats-int bordercolor-swizzled/gl_rg8ui, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_red_rgtc1, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_rg_rgtc2, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_signed_red_rgtc1, swizzled, border color only: fail pass
spec/ext_texture_compression_rgtc/texwrap formats bordercolor-swizzled/gl_compressed_signed_rg_rgtc2, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_r16_snorm, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_r8_snorm, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_rg16_snorm, swizzled, border color only: fail pass
spec/ext_texture_snorm/texwrap formats bordercolor-swizzled/gl_rg8_snorm, swizzled, border color only: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33579>
2025-03-04 13:55:18 +00:00
Patrick Lerda
fd874bdd0c r600: fix emit_image_size() range base compatibility
This change fixes a regression introduced with 8b5d41cacb.
Indeed, lookup_resid was not updated.

This change was tested on palm and cayman. Here are the tests fixed:
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-float: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-int: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-uint: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-float: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-int: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-uint: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-float: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-int: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-uint: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-float: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-int: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-uint: fail pass

Fixes: 8b5d41cacb ("r600/sfn: Use range_base for atomics and images")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33352>
2025-03-04 12:05:46 +00:00
Nikita Popov
e4eb5e80c3 clover: Don't include libclc headers
Per https://github.com/llvm/llvm-project/issues/119967 these
headers are internal implementation details of libclc and were
never supposed to be installed. They are not available anymore
since LLVM 20. Instead opencl-c.h should be used.

There already ise a code path for including opencl-c.h, so always
use it.

This didn't work for me out of the box, because the build system
currently hardcodes the clang resource directory, which is incorrect
for Fedora at least. Fix this by using GetResourcePath +
CLANG_RESOURCE_DIR provided by clang instead. This is basically
the same as what is done in clc_helper.c

I've still retained the old behavior as a fallback just in case
(e.g. if clang is linked statically?)

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33805>
2025-03-04 11:32:22 +00:00
Christian Gmeiner
228b516403 etnaviv/ci: Update flakes for gc7000-r6214
This is the result of 50 deqp runs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33857>
2025-03-04 11:08:59 +00:00
Lars-Ivar Hesselberg Simonsen
fe31e7843d panvk: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.

While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.

Fixes: 2ffc05d8d2 ("panvk: Add support for CmdDispatchIndirect")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
2025-03-04 10:01:26 +01:00
Lars-Ivar Hesselberg Simonsen
6bf9ad2610 panfrost: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.

While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
2025-03-04 10:01:18 +01:00
Ivan Avdeev
7271b8ee49 radv,radeonsi: disable compute queue for BC250
BC250 is known to have non-functional compute queue. Thousands
for Vulkan CTS tests fail, and many games are known to have visual
glitches. RADV_DEBUG=nocompute is the known workaround for all these
issues.

Disable compute queue for this chip in both radv and radeonsi.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33116>
2025-03-04 08:07:31 +00:00
Ivan Avdeev
ff6504d4c0 radv: add experimental support for AMD BC-250 board
AMD BC-250 is a mining board based on an AMD APU with an integrated GPU
that kernel recognizes as Cyan Skillfish.

It is basically RDNA1/GFX10, but with added hardware ray tracing
support. LLVM calls it GFX1013, see
https://llvm.org/docs/AMDGPU/AMDGPUAsmGFX1013.html

Support for this GPU hasn't been extensively tested. Some games are
known to work, some non-trivial ray query compute and ray tracing
pipeline rendering works too. Q2RTX works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33116>
2025-03-04 08:07:31 +00:00
Zan Dobersek
72fe9e3fa3 tu: fix zero-index perfcntr collection for derived counters
Skip the zero-index perfcntr collection only if CP_ALWAYS_COUNT is used,
since we want to collect that at the very end/start of collection. But
don't unwittingly ignore that perfcntr if CP_ALWAYS_COUNT isn't being
collected.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 86456cf0e6 ("tu: support exposing derived counters through VK_KHR_performance_query")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33852>
2025-03-04 06:48:57 +00:00
Tapani Pälli
d0b8d7d46c iris: remove dead code that cannot get hit anymore
As of recent changes, MESA_SHADER_GEOMETRY is handled by the if ladder.

CID: 1643918
Fixes: c33ebf09f5 ("iris: fix handling of GL_*_VERTEX_CONVENTION")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33842>
2025-03-04 06:02:17 +00:00
Patrick Lerda
9aea08e1db r600: fix the indirect draw 8-bits path
This change fixes the indirect draw 8-bits path which does
a conversion to 16-bits. This change is implemented to process
the parameters the same way as the other indirect draw paths.

This change was tested on palm and cayman. Here are the tests fixed:
deqp-gles31/functional/draw_indirect/draw_elements_indirect/indices/index_byte: fail pass
deqp-gles31/functional/draw_indirect/random/35: fail pass
deqp-gles31/functional/draw_indirect/random/45: fail pass
khr-gl40/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl41/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl42/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl43/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl44/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl45/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass

Fixes: d80701df8a ("r600g: Implement GL_ARB_draw_indirect for EG/CM")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32802>
2025-03-04 04:13:42 +00:00
Faith Ekstrand
b92117d9bb zink: Don't present to Wayland surfaces asynchronously
Wayland EGL has a driver invariant which requires that any `wl_surface`
(or wp_linux_drm_syncobj_surface_v1) calls happen inside the client's
call to eglSwapBuffers().  Submitting surface messages after
eglSwapBuffers() returns causes serialization issues with the Wayland
surface protocol and can lead to the compositor booting the app.

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12736
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33859>
2025-03-04 03:42:43 +00:00
Patrick Lerda
3cfcb10d8b r600: implement a conformant gl_VertexID with base offset
As explained by d80701df8a, the r600 hardware doesn't implement
the base vertex offset. This change implements this offset as a
constant buffer entry shared with lds.

This change is inspired from 3511a51be0 ("freedreno/ir3: handle
VTXID_BASE for indirect draws").

Note: this feature requires at least evergreen.

This change was tested on palm and cayman. Here are the tests fixed:
spec/arb_draw_indirect/gl_vertexid used with gldrawarraysindirect: fail pass
spec/arb_draw_indirect/gl_vertexid used with gldrawelementsindirect: fail pass
spec/arb_multi_draw_indirect/gl-3.0-multidrawarrays-vertexid -indirect: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32769>
2025-03-04 01:43:19 +00:00
Patrick Lerda
c016f84805 r600: prepare the lds constant buffer to be shared
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32769>
2025-03-04 01:43:19 +00:00
Guilherme Gallo
1dbebd2619 ci/lava: Add U-Boot action timeout for rockchip DUTs
Add a specific timeout for the U-Boot action in LAVA job definitions for
rockchip devices. This ensures sufficient time for U-Boot to download
the kernel and set up early network, preventing potential job failures
due to timeout constraints.

This behavior started to happen since LAVA 2025.02 version.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Guilherme Gallo
2b9e3e2fff ci/lava: xtrace the lava_job_submitter call
To make easier to debug issues and run locally.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Guilherme Gallo
1169f704d3 ci/lava: Propagate errors in SSH tests
The `lava_ssh_test_case` wrapper was missing the `set -e` shell option,
which made LAVA system interpret the job was succeeding, because the
`container` namespace was exiting normally, even though the `dut`
namespace was failing.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Guilherme Gallo
02a86b3284 ci/lava: Drop the repeating quotes on lava-test-case
LAVA was recently patched [1] with a fix on how parameters are parsed in
`lava-test-case`, so we don't need to repeat quotes to send the
arguments properly to it.

[1] 18c9cf7976

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Sergi Blanch Torne
d74b808a87 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 99a7dc3fc4.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
2025-03-04 01:17:50 +00:00
Marek Olšák
027ccd963b Remove osmesa
It's redundant with EGL surfaceless and it doesn't have much use.

It's also available from the amber branch, so distros should get it from
there if they want to continue packaging it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836>
2025-03-04 00:40:39 +00:00
Gurchetan Singh
e8e4022dde lavapipe: use quotes instead of angle bracket
lvp_private.h is in the same directory and lvp_android.c

Other files in the same directory just use
"#include lvp_private.h" too.

Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33854>
2025-03-04 00:18:29 +00:00
Konstantin Seurer
3a69b52d37 nir: Test nir_minimize_call_live_states
Adds a couple of tests for various instructions and controlflow
constructs.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33289>
2025-03-03 23:30:57 +00:00
Marek Olšák
7655826243 mesa: allocate GLmatrix aligned to 16 bytes
The declaration has:

typedef struct {
   alignas(16) GLfloat m[16];   /**< 16 matrix elements (16-byte aligned) */
   alignas(16) GLfloat inv[16]; /**< 16-element inverse (16-byte aligned) */
...
} GLmatrix;

We should honor that.

Fixes: 3175b63a0d - mesa: don't allocate matrices with malloc
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10237

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33856>
2025-03-03 23:08:02 +00:00
Mike Blumenkrantz
1493f88f88 aux/trace: truncate descriptor unbinds
instead of generating the full array of NULLs, just output one

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33858>
2025-03-03 22:42:58 +00:00
Patrick Lerda
c707bb5e8f r600: fix cayman sfn_nir_legalize_image_load_store ssa dominance
After dae57e184a ("glsl,st/mesa: always lower IO for GLSL, unlower
IO for drivers"), the shaders updated by sfn_nir_legalize_image_load_store
on cayman could trigger a segmentation fault. The main issue is that
sfn_nir_legalize_image_load_store does not handle properly the ssa
dominance functionality and this issue is exacerbated by this last
mesa update.

This change makes the ssa dominance functionality operational.

This commit implements pass_flags to avoid an infinite loop.

For instance, this issue is triggered on cayman using this
environment variable NIR_DEBUG=validate_ssa_dominance with:
"piglit/bin/oes_egl_image_external_essl3 -auto -fbo":
NIR validation failed after r600_legalize_image_load_store in ../src/gallium/drivers/r600/sfn/sfn_nir.cpp

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32894>
2025-03-03 22:15:09 +00:00
Marek Olšák
1d5d809818 glapi: remove unused python code
detected by a program called vulture

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
906dcb56e1 glx: make it more obvious what libglapi_bridge is
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
71bb62e3c9 glx: stop exporting GL functions from libGLX_mesa.so
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
628608672c glx: fix hardcoded use of dispatch table index in glAreTexturesResidentEXT
No idea why this exists, and it's dead code with glvnd because it's
exported from libGLX_mesa.so.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
ebf6008434 glx: don't call GL functions directly, use the current dispatch instead
With glvnd, GL functions will not be publicly exported from libGLX_mesa
and we don't even need them privately defined.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
0204609365 glapi: inline entry_current_get()
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
fb16a1121b glapi: remove is_static_entry_point wrapper
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
20aadf4f64 glapi: use static_data.libgl_public_functions directly
also filter_entry_points is unused, so remove that

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
72db4a1e50 glapi: disable python escape sequences in strings that use invalid ones
We use invalid escape sequences in a few string.
r'...' disables escape sequences. This fixes validator errors:

/home/marek/dev/mesa/src/mapi/mapi_abi.py:45: SyntaxWarning: invalid escape sequence '\w'
  '^(?P<type>[\w\s*]+?)(?P<name>\w+)(\[(?P<array>\d+)\])?$')
/home/marek/dev/mesa/src/mapi/glapi/gen/api_exec_init.py:43: SyntaxWarning: invalid escape sequence '\p'
  header = """/**
/home/marek/dev/mesa/src/mapi/glapi/gen/gl_enums.py:64: SyntaxWarning: invalid escape sequence '\c'
  print("""

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
1f75715dae glthread: rename scripts to match the names of generated files
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
9a2974019b glthread: handle glFlush with HasExternallySharedImages more efficiently
Doing finish without flush is more efficient because it executes the unflushed
batch immediately.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
2937d8a961 glapi: just use _gloffset_COUNT_ everywhere, which is always the function count
MAPI_TABLE_NUM_STATIC was just duplicated _gloffset_COUNT.
mesa/main no longer needs to specify the table size.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
057c7f0dd2 glapi: verify that aliased functions don't have entries in dispatch tables
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
02d22dd1f3 glapi: move legacy imaging functions to the end of dispatch tables
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
1fde49d50e glapi: remove unused functions from dispatch tables
We also have to remove __indirect_glVertexAttribPointerNV because nothing
uses it after the removal from dispatch tables.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
c0b0ba1b77 glapi: generate static offsets from the list of GL functions automatically
Since glapi is part of libgallium.so, the offsets don't have to be immutable
anymore, but they still have to be fixed values within a build because both
gl_XML.py and genCommon.py use them and they should match AFAIK.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
e3f9848a5c glapi: remove check_table tests
glapi is now statically built into libgallium or libGL and both must come
from the same Mesa version, so backward compatibility of dispatch tables
is no longer required.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
a8b18dce82 glapi: clarify the meaning of static_data.functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
6c39cc1cc3 glapi: use an assertion in SET_by_offset instead of doing nothing
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
49facd7d54 glapi: remove support for dynamically-registered functions
I think this was for when libglapi was older than DRI drivers and didn't
know all functions.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
3fc52ac0e0 glapi: fix build dependencies by putting all xml/py files into a single list
This fixes missing script dependencies that didn't trigger rebuilds when
those files were changed. To keep it simple stupid, all xml and python
files used by python scripts indirectly are now in a single global list.

All variables holding file names are also inlined, so that we use file
paths everywhere.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
11364cd133 mesa: remove a glapi workaround for Mesa 10.5 and older
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
e4830d6e44 glapi: don't export always-private functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
c13a3de924 glapi: inline functions or use equivalent alternatives
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
142202cd00 glapi: remove dead code
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Marek Olšák
a22e50e6fe mesa: don't build st_format_test on Windows
this is the easiest way to make it build with the glapi changes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:05 +00:00
Caio Oliveira
dd1ca1588d brw: Fix size in assembler when compacting
Calculation was wrongly walking uncompacted instructions, even if we had
some compacted in the middle, generating invalid size.  Since we are
here just drop the instruction count, since in practice the caller will
have to walk the instruction stream anyway.

Fixes: 6267585778 ("intel/brw: Also return the size of the assembled shader")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33532>
2025-03-03 20:43:56 +00:00
Lucas Fryzek
08483e9bfa anv: Release correct bo for RT scratch
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33850>
2025-03-03 20:13:38 +00:00
Martin Roukala (né Peres)
8fb80834ed radv/ci: add hawaii to CI
This GPU is located in the same host as Tahiti, and was kindly donated
to the RADV project by Leonardo Frassetto (@DottorLeo).
It's good to finally making use of it, one year after receiving it \o/

On a side now, the skips are removed since they do not appear to be
reducing the chances of hanging once paired with the updated postamble
flushes.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563>
2025-03-03 19:42:21 +00:00
Martin Roukala (né Peres)
f4b1d62f00 radv/ci: reduce the timeout of vkcts-tahiti to a more sensible time
The current runtime is just over 33 minutes, so no need for
multi-hour-long timeouts.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563>
2025-03-03 19:42:21 +00:00
Timur Kristóf
3f3a5d8068 radv: Use flush postamble on GFX7 with different flags.
Flush caches at the end of each submission on GFX7.
This significantly improves stability on Hawaii
when running the CTS on multiple threads.

Keep previous behaviour on GFX6.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33563>
2025-03-03 19:42:21 +00:00
Samuel Pitoiset
7f6e28db26 radv: fix re-emitting fragment output state when resetting gfx pipeline state
When switching from pipeline to shader objects.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33840>
2025-03-03 19:19:33 +00:00
Xaver Hugl
779c8d1669 vulkan/wsi: don't use sRGB if the compositor doesn't support it
This could realistically happen if the compositor doesn't support parametric image
descriptions at all, in which case we'd get a protocol error for trying to use it.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33804>
2025-03-03 18:55:29 +00:00
Gert Wollny
6da19eafd5 r600/sfn: gather info and set lowering 64 bit after nir_lower_io
After nir_lower_io we need to gather the info about 64 bit usage
to be up-to-date when deciding whether the remaining 64 bit IO ops
be lowered.

Before 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
the info was eventually updated to include the use of 64 bit values
also if only some IO was using this so that SFN was handling the code
correctly. As it seems with above patch this is not always the case
anymore, and we have to take care of it.

Fixes: 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32774>
2025-03-03 18:35:45 +00:00
Sasha Finkelstein
1601668155 vtn_bindgen2: Fix memory corruption
This sometimes causes memory corruption, specifically on 32-bit x86
where it can result in a build failure

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33847>
2025-03-03 17:25:58 +00:00
Mary Guillemard
7c12df63de pan/bi: Add unit tests for FAU special page 3 and WARP_ID
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843>
2025-03-03 17:04:04 +00:00
Mary Guillemard
ef0c7382c7 pan/bi: Disallow FAU special page 3 and WARP_ID on message instructions
This is a constraint that apply on Valhall and later, instructions
should not use FAU special page 3 or WARP_ID if running
on the message unit.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843>
2025-03-03 17:04:04 +00:00
Rob Clark
6df9591905 tu: Don't emit SP_PS_2D_WINDOW_OFFSET on a6xx
This register isn't there.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33823>
2025-03-03 16:44:24 +00:00
Konstantin Seurer
4348253db5 llvmpipe: Skip draw_mesh if the ms did not write gl_Position
There is nothing to be done and the code will hit "assert(pos != -1);"
otherwise.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12684
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33812>
2025-03-03 15:18:28 +00:00
Patrick Lerda
ee1cb894d6 r600: fix evergreen_emit_vertex_buffers() related cl regression
For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags":
Segmentation fault

Fixes: 81889f4d5c ("r600: ensure that the last vertex is always processed on evergreen")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33351>
2025-03-03 14:54:32 +00:00
Danylo Piliaiev
264d8a6766 ir3: Set need_full_quad depending on info.fs.require_full_quads
The info from NIR is more granular, so that we don't have to
enable full quad for coarse derivatives.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33801>
2025-03-03 13:42:33 +00:00
Konstantin Seurer
6e3fc37d47 radv: Implement multidimensional ray query arrays
This is technically a bug fix, but no sane developer would use this.
It's still nice to implement all corner cases.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32334>
2025-03-03 12:07:47 +00:00
Konstantin Seurer
febc923a46 radv: Lower ray query vars to structs
This is much cleaner than passing an index around it will allow
implementing multidimensional ray query arrays.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32334>
2025-03-03 12:07:47 +00:00
Zan Dobersek
86456cf0e6 tu: support exposing derived counters through VK_KHR_performance_query
Turnip's current VK_KHR_performance_query implementation only exposed raw
perfcounters. These aren't exactly trivial to evaluate on their own.

This mode can still be used with the new TU_DEBUG_PERFCRAW flag. Existing
TU_DEBUG_PERFC now enables performance query mode where Freedreno's derived
counters are exposed instead. These default to using the command scope,
making them usable with RenderDoc's performance counter capture.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
27fd2d1ad1 freedreno: add common implementation of perfcntr-based derived counters
Freedreno's derived counters combine multiple perfcntrs into a more
sensible, human-friendly metric. This change picks up the counters
currently used in Freedreno's Perfetto producer and rolls them into a
more genericallly usable form.

First place of their use will be through VK_KHR_performance_query, but
the Perfetto producer should also be able to use this interface instead
of having the logic duplicated. For now the counters are available only
for a7xx devices.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
b8338dee39 tu/a7xx: disable preemption during performance query measurement
Use CP_SCOPE_CNTL to disable preemption when beginning performance query
and enable it back when that performance query is ended. This way the
collected perfcounter measurements will only cover work that's encompassed
by the query.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
c964a96ab2 tu: performance query result writes must use dedicated union type
When using vkGetQueryPoolResults for performance queries, the result of
each query is the VkPerformanceCounterResultKHR union, and the result of
each query should be written into that union according to the storage type
of the corresponding counter.

This fixes current behavior of using the generic write procedure, where
either 32-bit or 64-bit value is written depending on the specified query
result flags.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Zan Dobersek
1cf5cf6da3 tu: use query index when retrieving performance query iovas
Query index should be used to calculate the correct iova for various
performance query fields used to store counter values at the beginning
and ending of performance queries.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33208>
2025-03-03 11:38:28 +00:00
Emmanuel Gil Peyrot
b4a82110ce panvk: Initialize out array with the correct length
This avoids reading past the buffer’s end in the client afterward, because the
drmFormatModifierCount hasn’t been changed from what the client passed, if it
wasn’t zero at first.

GTK triggers that bug by setting it to the length of the static array (see this
bug[0] though), but other Vulkan programs might have the same issue if they
don’t first query the count before allocating the array.

This has been tested on a Radxa ROCK 5B board running a Mali-G610 GPU.

[0] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8222

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 252ddaf51b ("panvk: fix VkDrmFormatModifierPropertiesListEXT query")
Fixes: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/issues/127
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33657>
2025-03-03 11:09:14 +01:00
Julia Zhang
79bb8e3455 radv: advertise VK_EXT_device_memory_report
Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
f504ed9e73 radv: emit device memory report for device memory events
Emit device memory report when radv create memory or free memory.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
313aa44bf1 radv: add obj_id to radeon_winsys_bo
mem->bo->obj_id will be used by device memory report.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
900be035c8 radv: add import and export handle_type in radv_alloc_memory
The import_handle_type and export_handle_type will be used to set the
memoryObjectId for memory report.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Julia Zhang
273e00bffe vulkan: handle device memory report requests
Add memory_report to vk_device and init it when create vk
device to handle device memory report requests.

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33088>
2025-03-03 08:26:51 +00:00
Job Noorman
c24373d907 ir3/sched: unblock a0.x/a1.x after last use
We currently keep a0.x/a1.x unnecessarily blocked until we have to spill
it, even if all its uses have been scheduled already. This causes
unnecessary spills and potentially schedules address writes later than
we'd like.

Fix this by keeping track of the number of uses that are still
unscheduled, unblocking address writes when it drops to zero.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33816>
2025-03-03 07:48:16 +00:00
Job Noorman
9728b31e65 ir3: clear instruction uses when cloned
Clones do not share the uses of the cloned instruction.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33816>
2025-03-03 07:48:15 +00:00
Sergi Blanch Torne
99a7dc3fc4 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-03-03 08:00 UTC
* End: 2025-03-03 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33595>
2025-03-03 07:25:15 +00:00
Hyunjun Ko
f80e5c2ce5 anv/ci: remove some expected failures of dEQP-VK.video.formats.*
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33784>
2025-03-03 04:36:21 +00:00
Hyunjun Ko
f7ff9b240d anv: Do not support the tiling of DRM modifier if DECODE_DST
Fixes: 04709e4f ("anv: fix video profile lists");

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33784>
2025-03-03 04:36:21 +00:00
Yiwei Zhang
b6b8193534 venus: fix an obsolete protocol sync earlier
luckily it doesn't hurt anything and won't break anything

Fixes: 785f44adc8 ("venus: sync protocol for the passthrough extensions")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33834>
2025-03-02 16:58:21 +00:00
Yiwei Zhang
c35b52638c venus: relax the requirement for sync2
The current requirement for sync is only to support WSI, and it is not
necessarily needed at all per the comment added. Will drop it later.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33829>
2025-03-02 16:40:14 +00:00
Eric Engestrom
cf7fa16f8c ci/b2c: use more readable "long" argument names
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
a3ad54adf0 ci/b2c: set the registry proxy from the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
314e023960 ci/b2c: pass through all the CI_* variables as well
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
bad0197300 ci/b2c: pass through all the B2C_* variable without renaming them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
d41d2874ef ci/b2c: rename IMAGE_UNDER_TEST to B2C_IMAGE_UNDER_TEST
Makes things mildly clearer, but more importantly gets rid of the
last variable used that doesn't start with `B2C_*` or `CI_*`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
6394cdde6c ci/b2c: split B2C_JOB_VOLUME_EXCLUSIONS in the jinja template
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
215dac82c3 ci/b2c: set default value for B2C_KERNEL_CMDLINE_EXTRAS in the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
61c76a3b36 ci/b2c: set default value for B2C_TELEGRAF_IMAGE in the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
ee050d7af3 ci/b2c: set default value for B2C_MACHINE_REGISTRATION_IMAGE in the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
37ab59afce ci/b2c: use B2C_JOB_TEMPLATE directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
1310b75cbf ci/b2c: explain better why we don't clone mesa
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Eric Engestrom
c0b4b132d3 ci/b2c: fix comment location
I think the `after_script:` was simply inserted in the middle.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33825>
2025-03-01 22:50:51 +00:00
Christian Gmeiner
3f95531d39 etnaviv/ci: Start using the revision number for GPU_VERSION
This step is needed to support the same GPU model, but with a
different revision. A good example is the gc7000.

 - imx8mp: model gc7000 with revision 6204 (uses RS)
 - imx8mq: model gc7000 with revision 6214 (uses BLT)

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33811>
2025-03-01 22:14:28 +00:00
Alyssa Rosenzweig
d2edb15454 radv: use VK_COPY_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
aa2f1138e6 v3dv: switch to common VK_COPY/PRINT_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
0b4ccac83e anv,hasvk: switch to common VK_COPY/PRINT_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
0bca84c3a1 hk: switch to common VK_COPY/PRINT_STR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
e331efd4fe vulkan: add common VK_PRINT_STR/VK_COPY_STR macros
every vk driver wants these macros for executable statistics, so make them
common. there are two variants floating in-tree, a pure copy (radv) and a
formatted print (everyone else). we add both variants and then convert most
prints to copies where formatting isn't actually used. that has the benefit of
cleaning up trivial "%s" format strings in a bunch of places.

I didn't bother cleaning up the formatting in non-automatic-formatted drivers
because it's tedious and I'm planning to delete a lot of this driver code with
upcoming runtime work anyway. This is a step towards those runtime improvements.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Alyssa Rosenzweig
7ce8f1ebb0 asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33826>
2025-03-01 20:27:26 +00:00
Georg Lehmann
975be7ac5d ac/nir/mem_access_bit_sizes: split unaligned vec3 lds access to allow more read2/write2
Foz-DB Navi21:
Totals from 77 (0.10% of 79377) affected shaders:
Instrs: 69787 -> 68745 (-1.49%); split: -1.51%, +0.02%
CodeSize: 367256 -> 360060 (-1.96%); split: -1.97%, +0.01%
VGPRs: 3896 -> 3880 (-0.41%)
Latency: 335403 -> 335297 (-0.03%); split: -0.11%, +0.08%
InvThroughput: 102766 -> 102931 (+0.16%); split: -0.09%, +0.25%
VClause: 1645 -> 1643 (-0.12%); split: -0.18%, +0.06%
SClause: 1434 -> 1433 (-0.07%)
Copies: 4280 -> 4283 (+0.07%); split: -0.56%, +0.63%
PreVGPRs: 2408 -> 2421 (+0.54%); split: -0.08%, +0.62%
VALU: 45557 -> 45646 (+0.20%); split: -0.10%, +0.29%
SALU: 6458 -> 6474 (+0.25%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33448>
2025-03-01 18:26:54 +00:00
Georg Lehmann
8b2b3e5704 radv: remove outdated vectorize TODO
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33448>
2025-03-01 18:26:54 +00:00
Valentine Burley
2dfbade2d8 ci: Update kernel to include i.MX8MP dtb
The only change since the previous kernel is that the new one includes
the device tree blob for the NXP i.MX8MP development board.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33800>
2025-03-01 09:19:56 +00:00
Faith Ekstrand
47ca264dc2 nak: Set .NODEP on tex ops based on nir_opt_tex_skip_helpers()
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Faith Ekstrand
a65009e808 nir: Add a nir_opt_tex_skip_helpers optimization
Arm and NVIDIA hardware both have this as a bit you can set on the
texture instruction so we may as well have a shared pass for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Faith Ekstrand
7ac6ec2ceb nir: Add a get_io_index_src() helper
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Faith Ekstrand
61108eb1b5 compiler/rust: Add u_printf_info to the rust bindings
This both adds it to the compiler allowlist and adds it to the user
denylist.  This gets rid of a Rust compiler warning in NAK.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33402>
2025-03-01 08:44:15 +00:00
Georg Lehmann
7eb43c3b1c aco/optimizer: delete combine_and_subbrev
This is now done in NIR. No Foz-DB changes on Navi21.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:28 +00:00
Georg Lehmann
d272a6e261 nir/opt_algebraic: optimize d3d a ? b : 0
Foz-DB Navi21:
Totals from 3466 (4.34% of 79789) affected shaders:
MaxWaves: 73163 -> 73161 (-0.00%); split: +0.02%, -0.02%
Instrs: 3993862 -> 3987633 (-0.16%); split: -0.19%, +0.04%
CodeSize: 21747420 -> 21725620 (-0.10%); split: -0.15%, +0.05%
VGPRs: 190736 -> 190728 (-0.00%); split: -0.04%, +0.03%
SpillSGPRs: 489 -> 478 (-2.25%); split: -2.86%, +0.61%
Latency: 48169718 -> 48159068 (-0.02%); split: -0.05%, +0.02%
InvThroughput: 12132999 -> 12128721 (-0.04%); split: -0.05%, +0.01%
VClause: 78063 -> 78052 (-0.01%); split: -0.09%, +0.08%
SClause: 109095 -> 108996 (-0.09%); split: -0.13%, +0.04%
Copies: 265784 -> 264530 (-0.47%); split: -0.72%, +0.25%
Branches: 84533 -> 84553 (+0.02%)
PreSGPRs: 172577 -> 172531 (-0.03%); split: -0.19%, +0.16%
PreVGPRs: 165776 -> 165825 (+0.03%); split: -0.06%, +0.09%
VALU: 2851544 -> 2850426 (-0.04%); split: -0.08%, +0.04%
SALU: 413543 -> 408408 (-1.24%); split: -1.45%, +0.21%
VMEM: 139890 -> 139887 (-0.00%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:28 +00:00
Georg Lehmann
2e7f34af6b nir/opt_algebraic: optimize more ine/ieq(umin(b2i, ), 0)
Foz-DB Navi21:
Totals from 76 (0.10% of 79789) affected shaders:
MaxWaves: 1050 -> 1062 (+1.14%)
Instrs: 113754 -> 113691 (-0.06%); split: -0.11%, +0.06%
CodeSize: 605096 -> 605216 (+0.02%); split: -0.03%, +0.05%
VGPRs: 6024 -> 5976 (-0.80%)
Latency: 1776501 -> 1777519 (+0.06%); split: -0.06%, +0.12%
InvThroughput: 379644 -> 376751 (-0.76%)
SClause: 2132 -> 2134 (+0.09%)
Copies: 4131 -> 4128 (-0.07%); split: -1.77%, +1.69%
PreSGPRs: 4275 -> 4270 (-0.12%)
PreVGPRs: 5568 -> 5526 (-0.75%)
VALU: 86732 -> 86581 (-0.17%); split: -0.24%, +0.07%
SALU: 7112 -> 7198 (+1.21%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:28 +00:00
Georg Lehmann
7bc3062a3b nir/opt_algebraic: push comparisons with constants into bcsel with constant
Foz-DB Navi21:
Totals from 1657 (2.08% of 79789) affected shaders:
MaxWaves: 30275 -> 30261 (-0.05%); split: +0.01%, -0.05%
Instrs: 3316251 -> 3315701 (-0.02%); split: -0.04%, +0.02%
CodeSize: 17831924 -> 17832020 (+0.00%); split: -0.06%, +0.06%
SpillSGPRs: 815 -> 859 (+5.40%)
SpillVGPRs: 3335 -> 3293 (-1.26%)
Scratch: 231424 -> 230400 (-0.44%)
Latency: 33413310 -> 33402751 (-0.03%); split: -0.04%, +0.01%
InvThroughput: 9116062 -> 9112904 (-0.03%); split: -0.04%, +0.00%
VClause: 65587 -> 65560 (-0.04%); split: -0.05%, +0.01%
SClause: 86208 -> 86261 (+0.06%); split: -0.02%, +0.08%
Copies: 356158 -> 356439 (+0.08%); split: -0.07%, +0.15%
PreSGPRs: 101710 -> 101806 (+0.09%); split: -0.01%, +0.11%
PreVGPRs: 89293 -> 89286 (-0.01%); split: -0.04%, +0.04%
VALU: 2220900 -> 2218839 (-0.09%); split: -0.11%, +0.01%
SALU: 472988 -> 474567 (+0.33%); split: -0.08%, +0.42%
VMEM: 118401 -> 118347 (-0.05%)
SMEM: 123597 -> 123592 (-0.00%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Georg Lehmann
3837bc6d16 nir/opt_algebraic: optimize ~a == ~b and ~a == #b
Foz-DB Navi21:
Totals from 2 (0.00% of 79789) affected shaders:
Instrs: 8343 -> 8323 (-0.24%)
CodeSize: 43884 -> 43764 (-0.27%)
Latency: 19390 -> 19363 (-0.14%)
InvThroughput: 3380 -> 3356 (-0.71%)
VALU: 5413 -> 5393 (-0.37%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Georg Lehmann
8759223498 nir/opt_algebraic: optimize b2i/b2f comparision with non 0/1 constants
Foz-DB Navi21:
Totals from 28 (0.04% of 79789) affected shaders:
MaxWaves: 732 -> 728 (-0.55%)
Instrs: 23425 -> 22559 (-3.70%)
CodeSize: 137740 -> 132292 (-3.96%)
VGPRs: 1128 -> 1144 (+1.42%)
Latency: 94604 -> 92423 (-2.31%)
InvThroughput: 19166 -> 18814 (-1.84%); split: -2.38%, +0.54%
VClause: 429 -> 423 (-1.40%)
SClause: 937 -> 926 (-1.17%)
Copies: 1199 -> 914 (-23.77%); split: -24.52%, +0.75%
Branches: 451 -> 421 (-6.65%)
PreSGPRs: 1043 -> 996 (-4.51%)
PreVGPRs: 992 -> 973 (-1.92%); split: -3.53%, +1.61%
VALU: 17566 -> 16865 (-3.99%)
SALU: 1254 -> 1157 (-7.74%)
VMEM: 619 -> 609 (-1.62%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Georg Lehmann
2bfcfef5da nir/opt_algebraic: optimize bcsel of b2f and constants
Foz-DB Navi21:
Totals from 212 (0.27% of 79789) affected shaders:
MaxWaves: 4024 -> 4030 (+0.15%)
Instrs: 1314134 -> 1313894 (-0.02%); split: -0.03%, +0.02%
CodeSize: 7033216 -> 7026888 (-0.09%); split: -0.10%, +0.01%
VGPRs: 14224 -> 14176 (-0.34%)
Latency: 7402062 -> 7399180 (-0.04%); split: -0.06%, +0.02%
InvThroughput: 1724879 -> 1723773 (-0.06%); split: -0.07%, +0.00%
VClause: 37741 -> 37711 (-0.08%); split: -0.11%, +0.03%
SClause: 29266 -> 29268 (+0.01%); split: -0.01%, +0.01%
Copies: 123810 -> 123786 (-0.02%); split: -0.19%, +0.17%
Branches: 42370 -> 42407 (+0.09%); split: -0.03%, +0.11%
PreSGPRs: 13149 -> 13196 (+0.36%); split: -0.05%, +0.40%
PreVGPRs: 12407 -> 12395 (-0.10%)
VALU: 884471 -> 883475 (-0.11%); split: -0.12%, +0.01%
SALU: 177671 -> 178408 (+0.41%); split: -0.03%, +0.45%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33761>
2025-03-01 07:49:27 +00:00
Sil Vilerino
4a62f8bc75 d3d12: Cache the texture array cap requirement in encoder creation for calls to d3d12_video_create_dpb_buffer
Previously, the caps were not queried until after the first DPB buffer
was created. That causes the AOT path to be triggered even when the
device does report a requirement for texture array.

Tested-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33824>
2025-02-28 20:35:13 +00:00
Juston Li
7dd81ac9c2 wsi/common: android: disable KHR_present_[wait/id]
Android's Vulkan loader provides KHR_android_surface and intercepts
during instance creation; it does not implement KHR_present_[wait/id]
nor does it pass the enablement of KHR_android_surface to the driver
so this check wasn't actually disabling KHR_present_[wait/id] for
Android.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33677>
2025-02-28 19:49:59 +00:00
Mike Blumenkrantz
6a29d2ed66 anv: support all dimensions of image for LINEAR dmabufs
> Allowing 1D and 3D images, and array images too, with DRM_FORMAT_MOD_LINEAR, is ok
> because VkImageDrmFormatModifierExplicitCreateInfoEXT::pPlaneLayouts is able to fully
> describe the image layout. IF miplevels == 1, which this patch continues to enforce.

Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33668>
2025-02-28 19:04:33 +00:00
Pavel Ondračka
a3504b79fb r300,i915: update CI expectations
spec@glsl-1.10@execution@loops@glsl-fs-loop-shadow-variables now pass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33820>
2025-02-28 18:41:55 +00:00
Georg Lehmann
b90826736d nir/opt_algebraic: optimize bit_count(a) != 0
vkd3d-proton will emit
b = ballot(!gl_HelperInvocation);
(subgroupBallotBitCount(b) != 0u) ? subgroupShuffle(a, subgroupBallotFindLSB(b)) : 0u;

for WaveReadFirstLane(a) in fragment shaders

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33808>
2025-02-28 18:03:04 +00:00
Mike Blumenkrantz
b04eaa8589 zink: clamp UBO sizes instead of asserting
this is a nice idea, but there are apps/games that do not respect
hardware capabilities and yolo-bind fixed size buffers

fixes Ballionaire (2667120) launch on non-desktop drivers

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33819>
2025-02-28 17:42:42 +00:00
Mike Blumenkrantz
df1ff3c711 zink: enable single-plane modifiers for generic 2D exports
this should be fine; multi-plane ones won't work because not all callers
expect to get multiple fds back

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33675>
2025-02-28 16:48:18 +00:00
Natalie Vock
237d8799be radv/rt: Limit monolithic pipelines to 50 stages
Beyond that, monolithic pipelines just bloat to incredible sizes,
destroying compile times for questionable, if any, runtime perf benefit.

Indiana Jones: The Great Circle has more than 100 stages and takes
several minutes to compile its RT pipeline on Deck when using monolithic
compilation, and yet separate shaders still end up faster (probably
because instruction cache coherency in traversal is better).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33818>
2025-02-28 16:22:45 +00:00
Natalie Vock
d5a2666ad9 aco/ra: Assert operands only clear their own id
This is useful for debugging register assignment, as this case would
usually result in RA silently assigning the same register to multiple
temps at the same time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
1967b0f0c4 aco/tests: Add tests for precolored operands in different regs
The first test verifies that, if possible, we don't emit unnecessary
renames/copies for temporaries where it's possible for them to stay
in their current register (if an operand is precolored to the register
the temporary is currently residing in).

The second test verifies that we correctly choose a non-clobbered
operand even if there is one fixed to the temporary's current register.
To minimize copies, we'll want to have the live copy of
%tmp0 in v[2] there, because v[0-1] gets overwritten.

The third test verifies that we add a copy to another free register and
rename if all possible precolored operands are clobbered.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
b8bcc8e5c5 aco/ra: Handle temps fixed to different regs in different operands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
7a4775b396 aco/ra: Add option to skip renaming for parallelcopies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
b339bcfa38 aco/ra: Use struct for parallelcopies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Natalie Vock
3f182bc1fa aco/ra: Use iterators for linear VGPR copy extraction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29576>
2025-02-28 16:00:48 +00:00
Georg Lehmann
ea3c04b535 radv/nir_lower_ray_queries: use nir_foreach_function_impl
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
2025-02-28 14:38:14 +00:00
Georg Lehmann
dec60f3337 radv/nir_apply_pipeline_layout: clean up progress handling
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
2025-02-28 14:38:14 +00:00
Georg Lehmann
f595bcfe78 nir/opt_varyings: clean up nir_progress usage
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
2025-02-28 14:38:14 +00:00
Konstantin Seurer
c8fd0298e4 vulkan: Add utilities for triggering renderdoc captures
This can be useful for adding custom triggers for renderdoc.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31300>
2025-02-28 12:40:43 +01:00
David Rosca
79a3786453 radeonsi/video: Fix crash when creating buffers without modifiers support
Fixes: 7f7206f1a9 ("radeonsi/video: Allocate video buffers with modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12701
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33788>
2025-02-28 10:12:04 +00:00
Valentine Burley
7a3cfb57e5 anv/ci: Append -vk suffix to VKCTS job names
This aligns the naming with VKCTS jobs for other vendors and makes the
purpose of these jobs more explicit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33793>
2025-02-28 09:26:29 +00:00
Valentine Burley
b6dcbef0e2 zink/ci: Add trace testing on Alder Lake
ADL uses the new Xe KMD. Compared to TGL, some traces crash and need to
be skipped.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33793>
2025-02-28 09:26:29 +00:00
Valentine Burley
6b766c1cee zink/ci: Run more traces on Tiger Lake
These traces are now stable enough to start running them again on TGL.

Additionally, add new lines between traces in preparation for adding
ADL coverage, and update zink-anv-tgl-traces-restricted to no longer
inherit rules from zink-anv-tgl-traces.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33793>
2025-02-28 09:26:29 +00:00
Rebecca Mckeever
0c40b1653d panvk: Enable VK_KHR_shader_quad_control for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Rebecca Mckeever
13a3d70258 panvk: Enable VK_KHR_shader_maximal_reconvergence for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Rebecca Mckeever
7d81704640 panvk: Enable VK_KHR_shader_subgroup_uniform_control_flow for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Rebecca Mckeever
80309e53f1 panfrost: Add BI_OPCODE_WMASK to bi_instr_uses_helpers
Helper invocations are needed to support voting subgroup operations in
fragment shaders.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33615>
2025-02-28 08:55:32 +00:00
Samuel Pitoiset
3c81961c2e radv: enable DCC fast clears for 8bpp/16bpp on GFX11
This was disabled during GFX11 bringup few years ago to follow RadeonSI,
but this is working just fine and RadeonSI also enabled it recently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33756>
2025-02-28 08:33:39 +00:00
Samuel Pitoiset
aa476f4b52 radv: check HTILE compression for depth/stencil images per level
This might avoid some useless decompression passes/cache levels for
levels that can't be compressed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33665>
2025-02-28 08:05:14 +00:00
Samuel Pitoiset
77913edd99 radv/meta: remove useless assertion in when copy VRS to HTILE
The caller already checks that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33665>
2025-02-28 08:05:13 +00:00
Samuel Pitoiset
0f0d471154 radv/meta: inline radv_meta_get_view_layer()
The comment for 3D is also incorrect now because meta should never
bind a 3D image to the framebuffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Samuel Pitoiset
9c70cee4dc radv: handle OOM error properly when selecting image modifier
Do not need a "dumber solution".

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Samuel Pitoiset
dd7dbbb0c9 radv: remove meaningless TODOs in radv_GetDeviceImageMemoryRequirements()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Samuel Pitoiset
b8d070eeab radv: replace radv_image::shareable by vk_image::external_handle_types
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33758>
2025-02-28 07:40:56 +00:00
Job Noorman
2d540b8074 ir3/ra: prevent reusing parent interval of reloaded sources
We would set the `src` flag on the interval of reloaded sources.
However, the interval might be merged with its parent when inserted and
the parent wouldn't have this flag set. This caused the parent interval
to potentially be reused to reload later sources. Fix this by setting
the `src` flag on the top-level interval after insertion.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33810>
2025-02-28 07:09:52 +00:00
Guilherme Gallo
9da1af6eb2 ci/docs: add structured tagging documentation
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
11f8dffec4 ci/angle: remove USE_ANGLE variable
Now that every ANGLE use is covered by tag consistency checks
(structured tagging), we don't need the USE_ANGLE flag anymore, because
if we have ANGLE_TAG set, it means that ANGLE is required in this job.

In detail, it means that the test job has inherited ANGLE_TAG from
`.container-builds-angle`.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
94f5cf901e ci/angle: condense angle variables in one job
Use .test-angle as a full-featured job to be extended to enable angle
usage in the job. Right now, it comes with USE_ANGLE=1 flag and the
respective structural tag.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
3b01d6e900 ci/angle: test-time structured tag checks
Let's setup the CI to enable runner script to check if the ANGLE
binaries from the container/rootfs are matching the intended version.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
74cb5105b4 ci/angle: add structured tag check to ANGLE build time
Now everytime the ANGLE is built, we check if the conditional tag
declared in the .gitlab-ci/conditional-build-image-tags.yml is matching
the current version of the build script and its inputs

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
6827133592 ci: copy structural tag files to rootfs
Enhance the LAVA build script to copy tag files into the rootfs directory.
This allows test jobs to verify they are using the intended version by
having access to the tag files during testing.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
f13b95ad5c ci: add support for structural tagging
Make structural tagging functions available for both test and build
scripts.

Introduces the update_tag.sh helper for listing, checking, and updating
deterministic tags.

Also adds the ci_tag_build_time_check and ci_tag_test_time_check
functions to validate tags during build and test phases, ensuring
consistent component versioning.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
775c2c3254 ci: add _error_msg for internal messaging
So it can be reused in functions that wants to print errors without
dealing with GitLab sections.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
1cc2c738bb ci: setup-test-env: Prefer functions over aliases
Alias are not exportable, in the current situation of the build scripts,
we use alias to deal with sections, but it infers that all build scripts
will be included in a bigger one that has already included
`setup-test-env.sh`.

With the structured tagging, we do a dry run of all build scripts, to
early check if the tagging is valid, before building stuff.

So changing alias to functions will not have an effect on the current
setup, but it also removes the need to reinclude library bash scripts in
some situations, as described above.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Guilherme Gallo
8f20eb849b ci/android: add missing pre/post build scripts
The android_build.sh script was not calling the container_pre_build.sh
and container_post_build.sh, we will need that to make the structural
tagging early checking to work. And also do the same cleanup and
configuration made for other container build jobs.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33421>
2025-02-28 01:33:34 +00:00
Faith Ekstrand
7b82e26e3c nak: Don't spill/fill const values
When spilling values, we can detect when a value is known to be constant
and avoid spilling it out to memory and/or GPRs by just re-materializing
the constant value instead of filling.

Shader-db stats:

    Totals:
    CodeSize: 30101168 -> 30052896 (-0.16%); split: -0.19%, +0.03%
    SLM size: 146536 -> 146524 (-0.01%)
    Static cycle count: 6952994 -> 6939532 (-0.19%); split: -0.30%, +0.10%
    Spills to memory: 174139 -> 173625 (-0.30%)
    Fills from memory: 174139 -> 173625 (-0.30%)

    Totals from 555 (8.05% of 6891) affected shaders:
    CodeSize: 18945520 -> 18897248 (-0.25%); split: -0.30%, +0.04%
    SLM size: 128952 -> 128940 (-0.01%)
    Static cycle count: 4344118 -> 4330656 (-0.31%); split: -0.47%, +0.16%
    Spills to memory: 174139 -> 173625 (-0.30%)
    Fills from memory: 174139 -> 173625 (-0.30%)

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
0f4c7e0c0d nak: Add a new ConstTracker struct
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
7180d56118 nak: Handle any->Mem parallel copies
We already handle Mem->Mem and GPR->Mem, this just enables more options
including UGPR, CBuf, and immediates.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
43d2b149ad nak: Fix NAK_DEBUG=spill for large FS outputs
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
07fb0ce238 nvk: Fix capitalization of statistics
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:42 +00:00
Faith Ekstrand
13c77d7cfc nvk/image: Drop some unneeded initializers
Using designated initializers gives us a default of 0 for these which is
also the NIL default for "ignore this, please".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:41 +00:00
Faith Ekstrand
af406dccfd nvk/image: Prefer vk_image values over pCreateInfo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33785>
2025-02-27 21:52:41 +00:00
Lionel Landwerlin
02341733df anv/iris: add drirc keys to disable VF/TE distribution
This is a request from debug engineers to be able to trace the HW
better when analyzing hangs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33795>
2025-02-27 21:10:59 +00:00
Lionel Landwerlin
37939d3c4c iris: remove duplicate TessellationDistributionMode programming
This is already programmed in the state emission. No need to have it
on the shader too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33795>
2025-02-27 21:10:59 +00:00
Lionel Landwerlin
bbade676f4 anv/iris: centralize TBIMR drirc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33795>
2025-02-27 21:10:59 +00:00
Yiwei Zhang
af1b4f61b5 venus: added passthrough extension support - Part V
Below extensions are added:
1. VK_KHR_fragment_shader_barycentric
2. VK_EXT_legacy_vertex_attributes
3. VK_EXT_ycbcr_image_arrays

Test:
- dEQP-VK.fragment_shading_barycentric.*
- dEQP-VK.pipeline.*.vertex_input.legacy_vertex_attributes.*
- dEQP-VK.ycbcr.format.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:36 +00:00
Yiwei Zhang
b02e8a9f1d venus: added passthrough extension support - Part IV
Below extensions are added:
1. VK_EXT_shader_atomic_float
2. VK_EXT_shader_atomic_float2
3. VK_EXT_shader_image_atomic_int64
4. VK_EXT_shader_replicated_composites

Test:
- dEQP-VK.glsl.atomic_operations.*
- dEQP-VK.image.atomic_operations.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
1fe8be9215 venus: added passthrough extension support - Part III
Below are added:
1. VK_KHR_shader_maximal_reconvergence
2. VK_KHR_shader_subgroup_uniform_control_flow
3. VK_KHR_shader_quad_control
4. VK_EXT_shader_subgroup_vote

Test:
- dEQP-VK.reconvergence.*
- dEQP-VK.subgroups.subgroup_uniform_control_flow.*
- dEQP-VK.subgroups.shader_quad_control.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
f16345b2f6 venus: added passthrough extension support - Part II
Below are added:
1. VK_KHR_compute_shader_derivatives
2. VK_NV_compute_shader_derivatives
3. VK_KHR_workgroup_memory_explicit_layout

Test:
- dEQP-VK.compute.*workgroup_memory_explicit_layout.*
- dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
48b50c77df venus: added passthrough extension support - Part I
Below are added:
1. VK_KHR_depth_clamp_zero_one
2. VK_EXT_depth_clamp_zero_one
3. VK_EXT_depth_range_unrestricted
4. VK_EXT_post_depth_coverage
5. VK_ARM_rasterization_order_attachment_access

Test: dEQP-VK.depth.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Yiwei Zhang
785f44adc8 venus: sync protocol for the passthrough extensions
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33783>
2025-02-27 20:35:35 +00:00
Kevin Chuang
87ff7b061f anv/bvh: Fix copy shader handling sparse buffer
Fixes: 692b5fa9f2 ("anv: Add shader to copy acceleration structures")

This commit fixes the future test "sparse_binding_structures" for
"header_bottom_address" for ray tracing pipeline.

Even on 48-bit ray tracing (Xe1/2), the software-defined part
instance_leaf_part1.bvh_ptr has to be in canonical form for copy.comp
to deference a bvh, which means we have to preserve the upper 16bits.
This is especially relevant in cases where the acceleration structure buffer
is located high, such as sparse buffer.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
2025-02-27 20:10:10 +00:00
Kevin Chuang
b9a980ea73 anv/bvh: Fix encoder handling sparse buffer
Fixes: 2fe57947e3 ("anv: Implement encode shader to fit in ANV BVH")

This commit resolves the failures in the future tests
"sparse_binding_structures" for rayquery. Sparse buffers' heaps are
located high, and since it's in canonical form, the higher 16bits are
all set to 1. However, the existing encoder did not expect any non-zero
values at the higher 16bits. As a result, the instance flags got
corrupted, causing most triangle tests to fail.

Thanks for Paulo providing insights about sparse buffer properties.

Co-developed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
2025-02-27 20:10:10 +00:00
Sagar Ghuge
2c8148a76e anv: CPS LOD Compensation Enable is deprecated on Xe2+
On Xe2+, Hardware will always have scale.x and scale.y as 1.0.
This is not fixing any issues.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33726>
2025-02-27 19:49:02 +00:00
Job Noorman
739ca77e66 nir/lower_subgroups: use build_cluster_mask for quad mask
build_subgroup_quad_mask can now be written in terms of
build_cluster_mask.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31732>
2025-02-27 18:53:19 +00:00
Jason Macnak
14bc2e2d39 gfxstream: Remove duplicated boxed handle func declarations
... and fix up include paths.

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Jason Macnak
039e64264a gfxstream: Move the handle replay buffer into BoxedHandleManager
... since `BoxedHandleManager` should, well, manager the handles.

This simplifies `VkDecoderGlobalState` a little bit and should also
allow us to remove a bunch of functions that no longer need to
depend on `VkDecoderGlobalState`.

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: cvd snapshot_take --force \
                        --auto_suspend \
                        --snapshot_path=/tmp/snapshot1
Test: cvd reset -y
Test: cvd create --snapshot_path=/tmp/snapshot1

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Jason Macnak
4ddd8bd96e gfxstream: Remove unused handling mappers
Not used.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Serdar Kocdemir
6bf253b8e8 gfxstream: Add VK_KHR_multiview support
Enable the extension to be advertised for the guest.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Serdar Kocdemir
35dd4b4fc2 gfxstream: Track more fence functions on host
Add vkGetFenceStatus and vkWaitForFences functions to the
global state tracking list for the host.
This will allow adding more functionality to the fences
and perform additional operations before waiting for and
signaling them.

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Sergii Ushakov
3449c3c98a gfxstream: Emulate DMABUF with OPAQUE_FD
Enables software rendering via swiftshader on host side and angle
on guest when using DMABUF based framebuffers.

TEST=Run internal application successfully

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Jason Macnak
18afdaa168 gfxstream: Move snapshot decoder replay into VkDecoderGlobalState
... to break the recursive behavior of the replay calling into
VkDecoderSnapshot so that locking and thread safety annotations can be
preserved in VkDecoderSnapshot.

Follow up to aosp/3412302.

Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: cvd snapshot_take --snapshot_path=<>
Test: cvd create --snapshot_path=<>

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Aditya Kumar
63de837a8b gfxstream: Fix compiling gfxstream for musl libs
musl has the unistd.h in top level.

Test: m USE_HOST_MUSL=true

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Bo Hu
0a0a350499 gfxstream: Adding support for VK_KHR_global_priority extension
According to
https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_global_priority.html

This device extension allows applications to query
the global queue priorities supported by a queue
family, and then set a priority when creating queues

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33740>
2025-02-27 17:37:55 +00:00
Benjamin Lee
55c476efed panvk: advertise shaderFloat16
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
252c59602e panfrost: implement 16-bit ldexp
Bifrost LDEXP.v2f16 takes a 16-bit exponent, which requires messy
lowering. The codegen for this is quite bad currently, but would be
improved by implementing unpack_32_2x16_split_*, and by fusing
comparisons with CSEL.

The main alternative is converting to F32, then LDEXP.f32, then
converting back to F16. This has better codegen for dynamic exponents
currently, but worse in the common case with a constant exponent where
all the saturating cast logic can be folded.

Fixes dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec2
when shaderFloat16 is enabled in panvk.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
2a70665df7 panfrost/va: remove swizzle mod from LDEXP
This instruction does not support swizzles. This information is not used
for anything, but will be if we use the instruction tables for
bi_lower_swizzle.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 316486dd9f ("pan/va: Add initial ISA.xml for Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
810351ad03 panfrost: fix condition in bi_nir_is_replicated
The original implementation of this returned false when the src was
replicated, and true when it was not.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 21bdee7bcc ("pan/bi: Switch to lower_bool_to_bitsize")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
fb9583cd53 panfrost: reorder lower_bit_size pass
nir_lower_int64 may generate 16-bit fexp2 instructions, which need to be
lowered.

Fixes dEQP-VK.spirv_assembly.instruction.compute.convertstof.int64_to_float16_m1234
when shaderFloat16 is enabled in panvk. I don't believe it's possible to
trigger this with mediump, so it's not a bug without shaderFloat16.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Benjamin Lee
a33cd3def2 panfrost: fix large int32->float16 conversions
On vulkan, truncating to S/U16 before converting is not valid, because
out-of-range conversions are specified to be correctly rounded. IEEE 754
requires that out-of-range values round to ±inf with RTNE and ±F16_MAX
with RTZ.

On gl, truncating is valid for U16->F16, because out-of-range int->float
conversions are undefined behavior. For S16->F16, it is not valid
because S16_MAX < F16_MAX, so some in-range values will be truncated as
well.

Instead, just handle S/U16->F16 as S/U16->F32->F16.

Fixes dEQP-VK.spirv_assembly.instruction.compute.convertstof.int32_to_float16_*
when shaderFloat16 is enabled in panvk.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: be74b84e6f ("pan/bi: Fill in some more conversions")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
2025-02-27 16:49:11 +00:00
Alejandro Piñeiro
142311258d nir: aliasing checks should be also done with index != 0
Right now the aliasing/overlapping checks are only done with index
0. I guess that was done because variables don't get a different
internal location even if you have a different index.

But doing that, the checks would not detect a case like this:
  layout(location = 0, index = 1) out vec4 color;
  layout(location = 0, index = 1) out vec4 factor;

That was used on the following piglit parser test:
spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag

And as the spec included on that test, is a link error case:

" * if more than one varying out variable is bound to the same
    number and index; or"

This commit executes the aliasing checks for index 1 too, and moves
the skip down, to only skip if the current variable and all previous
location-assigned variables has different index and location.

The bad news is that now such assigned variables need to be tracked on
OpenGL-ES. Before that commit that was avoided.

With this commit the mentioned parser test properly fails to link in
any driver.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33093>
2025-02-27 15:10:52 +00:00
Job Noorman
2619d576e7 nir/lower_phis_to_scalar: don't create moves for undef sources
Creating moves out of undefs makes it more difficult for other passes to
detects undefs without having to chase moves. Instead, just create a new
1-component undef.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29889>
2025-02-27 13:18:14 +00:00
Job Noorman
5ae12b6a5a nir/lower_phis_to_scalar: use nir_builder API where possible
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29889>
2025-02-27 13:18:14 +00:00
Job Noorman
66407e3d24 nir/lower_phis_to_scalar: remove unused mem_ctx
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29889>
2025-02-27 13:18:14 +00:00
Job Noorman
9b9ed564c2 ir3: add reformatting commits to .git-blame-ignore-revs
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33714>
2025-02-27 13:10:53 +00:00
Lionel Landwerlin
f8af4b597e vulkan/runtime: store flags on descriptor set layouts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33799>
2025-02-27 13:26:58 +02:00
Peyton Lee
9c97b2bf9b radeonsi/vpe: fix background issue
Fixed the issue where the background color was specified but not displayed.
Fixed the issue where the color would be different from the expected.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33790>
2025-02-27 11:02:19 +00:00
Daniel Schürmann
3c27a9f0e2 aco/tests: add more tests for chained branches
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
2025-02-27 10:40:01 +00:00
Daniel Schürmann
713396ec8e aco/assembler: Don't insert chained branches into otherwise empty blocks
No fossil changes, but keeps block offsets of the empty blocks intact.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
2025-02-27 10:40:01 +00:00
Daniel Schürmann
6659db285a aco/assembler: Fix short jumps over chained branches
If we insert

   <code>
   s_branch 1
   s_branch Target

at the end of some block, and later hide an additional chained branch
after the existing one, then we have to update the 's_branch 1' to
also jump over the newly added branch.

Fixes: cab5639a09 ('aco/assembler: chain branches instead of emitting long jumps')
Closes: #12673
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
2025-02-27 10:40:01 +00:00
Christian Gmeiner
dd896828ba etnaviv/ci: Bring back GC7000
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33768>
2025-02-27 10:18:13 +00:00
Yiwei Zhang
acd5497067 venus: support wsi maintenance1 extensions
Venus has long supported creating swapchain image alias via binding. So
below are exposed without extra work needed:
- VK_EXT_surface_maintenance1
- VK_EXT_swapchain_maintenance1

Test: dEQP-VK.wsi.*.maintenance1.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33782>
2025-02-27 09:53:57 +00:00
Yiwei Zhang
673a95e5b4 venus: align on wsi frontends support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33782>
2025-02-27 09:53:57 +00:00
Job Noorman
1673824908 ir3/opt_prefetch_descriptors: fix crash after nir_progress rewrite
nir_progress was being called on the preamble even if it was NULL.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 9a58a8257e ("treewide: Switch to nir_progress")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33791>
2025-02-27 09:25:06 +00:00
Kenneth Graunke
88309a9818 brw: Rename shared function enums for clarity
Our name for this enum was brw_message_target, but it's better known as
shared function ID or SFID.  Call it brw_sfid to make it easier to find.

Now that brw only supports Gfx9+, we don't particularly care whether
SFIDs were introduced on Gfx4, Gfx6, or Gfx7.5.  Also, the LSC SFIDs
were confusingly tagged "GFX12" but aren't available on Gfx12.0; they
were introduced with Alchemist/Meteorlake.

GFX6_SFID_DATAPORT_SAMPLER_CACHE in particular was confusing.  It sounds
like the SFID to use for the sampler on Gfx6+, however it has nothing to
do with the sampler at all.  BRW_SFID_SAMPLER remains the sampler SFID.
On Haswell, we ran out of messages on the main data cache data port, and
so they introduced two additional ones, for more messages.  The modern
Tigerlake PRMs simply call these DP_DC0, DP_DC1, and DP_DC2.  I think
the "sampler" name came from some idea about reorganizing messages that
never materialized (instead, the LSC came as a much larger cleanup).

Recently we've adopted the term "HDC" for the legacy data cluster, as
opposed to "LSC" for the modern Load/Store Cache.  To make clear which
SFIDs target the legacy HDC dataports, we use BRW_SFID_HDC0/1/2.

We were also citing the G45, Sandybridge, and Ivybridge PRMs for a
compiler that supports none of those platforms.  Cite modern docs.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33650>
2025-02-27 08:49:24 +00:00
Lionel Landwerlin
dcb5cfbfcc vulkan/runtime: add a multialloc vk_shader allocator
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792>
2025-02-27 10:01:17 +02:00
Lionel Landwerlin
009ef67c8d vulkan/runtime: pass robustness state to preprocess vfunc
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792>
2025-02-27 10:01:16 +02:00
Lionel Landwerlin
4dba1ad93f vulkan/runtime: ensure robustness state is fully initialized
This is part of the hashing key :

==25753== Uninitialised byte(s) found during client check request
==25753==    at 0x93D29AE: blob_write_bytes (blob.c:164)
==25753==    by 0x93A62C6: vk_pipeline_precomp_shader_serialize (vk_pipeline.c:722)
==25753==    by 0x93AC55E: vk_pipeline_cache_add_object (vk_pipeline_cache.c:433)
==25753==    by 0x93A691B: vk_pipeline_precompile_shader (vk_pipeline.c:875)
==25753==    by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753==    by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)
==25753==  Address 0xf1adf82 is 82 bytes inside a block of size 152 alloc'd
==25753==    at 0x64FA858: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25753==    by 0x99AAC38: vk_default_alloc (vk_alloc.c:26)
==25753==    by 0x93A403B: vk_alloc (vk_alloc.h:48)
==25753==    by 0x93A406B: vk_zalloc (vk_alloc.h:56)
==25753==    by 0x93A60A0: vk_pipeline_precomp_shader_create (vk_pipeline.c:680)
==25753==    by 0x93A689D: vk_pipeline_precompile_shader (vk_pipeline.c:866)
==25753==    by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753==    by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementations")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792>
2025-02-27 10:01:02 +02:00
Tapani Pälli
78e5157a9c intel/compiler: add a spec note about L1WT types being uncached
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33755>
2025-02-27 05:38:35 +00:00
Peyton Lee
7c8d58c26c radeonsi/vpe: vpe support hdr input
when an application asks for supported formats
will return HDR formats(2020, explicit) is supported.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731>
2025-02-27 03:15:17 +00:00
Peyton Lee
43ce5b1138 radeonsi/vpe: vpe support tonemapping
if input source is HDR stream, vpe can use gmlib generating tonemapping
table to convert HDR image to SDR image.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731>
2025-02-27 03:15:17 +00:00
Peyton Lee
2e46c41448 amd/gmlib: add gmlib for radeonsi
radeonsi drivers can use gmlib to generate 3dlut used to do tonemapping.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33731>
2025-02-27 03:15:16 +00:00
Marek Olšák
2e124dd389 util: remove glthread enablement from app profiles
It's mature, so if you want it, just enable it for your driver by default.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33480>
2025-02-27 02:28:58 +00:00
Faith Ekstrand
8fffcdb18b nak/nir: Re-materialize load_const instructions in use blocks
This is useful both for correctness (to ensure that things we think are
constant stay constant) and it improves performance a bit by reducing
register pressure and avoiding spilling.

Pipeline-db stats:

    CodeSize: 29665072 -> 29437344 (-0.77%); split: -0.92%, +0.16%
    Number of GPRs: 157124 -> 156082 (-0.66%)
    SLM Size: 148900 -> 146436 (-1.65%)
    Static cycle count: 6840286 -> 6805711 (-0.51%); split: -0.98%, +0.47%
    Spills to memory: 177779 -> 173337 (-2.50%)
    Fills from memory: 177779 -> 173337 (-2.50%)
    Spills to reg: 17692 -> 16731 (-5.43%)
    Fills from reg: 12013 -> 11897 (-0.97%)
    Max warps/SM: 309128 -> 309456 (+0.11%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
8de37b142e nvk: Only support compute shader derivatives on Turing+
Fixes: e0e7d8d910 ("nvk: Advertise VK_NV/KHR_compute_shader_derivatives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
bd04fdcb2b nvk: Only support deviceGeneratedCommandsMultiDrawIndirectCount on Turing+
Indirect draws on Maxwell involve patching pushbufs together and doing
that isn't possible with device generated commands.

Fixes: 83b220f833 ("nvk: Advertise VK_EXT_device_generated_commands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
7e12ba8709 nvk: Handle pre-Turing dispatch indirect commands
The QMD layout is a bit different.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
c540e5e2cc nak/qmd: Add a nak_get_qmd_cbuf_desc_layout() helper
Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
755a6884d3 nak/qmd: Drop some unnecessary .try_into().unwrap()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
59f7f76166 nouveau/class_parser: Make strided element functions const
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Faith Ekstrand
0c4be9e0ff nvk: Fix indentation in begin_end_query()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
2025-02-27 00:26:54 +00:00
Mel Henning
2a0302967f nak: Add spill/fill statistics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Mel Henning
0480d8294c nak/spill_values: Make Spill take &mut self
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Mel Henning
ae0576a7f8 nak: Add an occupancy statistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Mel Henning
890bab86b4 nak: Add static cycle count statistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33773>
2025-02-26 23:52:31 +00:00
Lionel Landwerlin
b72c772f83 spirv: fix racy build
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Ki'sak
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33769>
2025-02-26 23:09:51 +00:00
Dave Airlie
8a64eee4d7 nvk: enable float16 on turing.
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33521>
2025-02-26 22:48:49 +00:00
Dave Airlie
b45feed3b2 nak: adjust latencies on fp16/64 instructions on Turing
These instructions on Turing require longer latencies,

this fixes the float16 tests on Turing.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33521>
2025-02-26 22:48:49 +00:00
Paulo Zanoni
fd10764cff brw: extend the NOP+WHILE workaround
It turns out that we need to add a NOP not only in between two
consecutive WHILE instructions, but also after every control flow
instruction that immediately precedes a WHILE.

v2: Rebase after the renames.

Fixes: 5ca883505e ("brw: add a NOP in between WHILE instructions on LNL")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021>
2025-02-26 22:23:16 +00:00
Paulo Zanoni
3596b4e325 brw: add instructions missing from is_control_flow()
I'm not aware of any workloads that will be impacted by this change,
but let's keep our list of control flow instructions complete. A
shader-db run on MTL tells me nothing changes.

v2: "The scheduler relies on HALT not being considered control flow to
be able to move code past HALT instructions. Doing this would prevent
such optimization from happening and would reduce performance
dramatically in some cases." - Francisco.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021>
2025-02-26 22:23:16 +00:00
Mike Blumenkrantz
0e87acb2f3 dri: delete INVALIDATE extension
this shouldn't be needed anymore since it doesn't do anything

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33774>
2025-02-26 21:46:06 +00:00
Erik Faye-Lund
6ab4a0b5c9 panfrost: respect pipe_rasterizer_state::line_rectangular
The state-tracker already tells us if we should use rectangular ends or
not on our lines, so we don't need to manually infer this from
combination of states.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33382>
2025-02-26 21:11:06 +00:00
Erik Faye-Lund
6bb4971497 pan/genxml: rename field
This field is really about the line-shape, not multisampling or not.

Yeah, in OpenGL, these two concepts are kinda intertwined. But this is
what the state actually does, so let's name it based on that.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33382>
2025-02-26 21:11:06 +00:00
Karol Herbst
dad5ee1039 intel/brw, lp: enable lower_pack_64_4x16
The compiler won't be able to emit pack_64_4x16, so we should prevent
nir_opt_algebraic to optimize to it. This fixes an infinite optimization
loop inside brw_nir_optimize:

nir_copy_prop
    16x4     %77 = @load_global (%80)
    32    %61995 = pack_32_2x16_split %77.x, %77.y
    32    %61998 = pack_32_2x16_split %77.z, %77.w
    64    %61999 = pack_64_2x32_split %61995, %61998
    64       %76 = iadd %100, %79
                   @store_global (%61999, %76)

nir_opt_algebraic
    16x4     %77 = @load_global (%80)
    32    %61995 = pack_32_2x16_split %77.x, %77.y
    32    %61998 = pack_32_2x16_split %77.z, %77.w
    16x4  %62000 = vec4 %77.x, %77.y, %77.z, %77.w
    64    %62001 = pack_64_4x16 %62000
    64       %76 = iadd %100, %79
                   @store_global (%62001, %76)

nir_lower_pack
    16x4     %77 = @load_global (%80)
    16x4  %62000 = vec4 %77.x, %77.y, %77.z, %77.w
    16    %62002 = mov %62000.y
    16    %62003 = mov %62000.x
    32    %62004 = pack_32_2x16_split %62003, %62002
    16    %62005 = mov %62000.w
    16    %62006 = mov %62000.z
    32    %62007 = pack_32_2x16_split %62006, %62005
    64    %62008 = pack_64_2x32_split %62004, %62007
    64       %76 = iadd %100, %79
                   @store_global (%62008, %76)

// brw_nir_optimize loops here

nir_copy_prop
    16x4     %77 = @load_global (%80)
    32    %62004 = pack_32_2x16_split %77.x, %77.y
    32    %62007 = pack_32_2x16_split %77.z, %77.w
    64    %62008 = pack_64_2x32_split %62004, %62007
    64       %76 = iadd %100, %79
                   @store_global (%62008, %76)

llvmpipe has a similar issue inside lp_build_opt_nir

Fixes: b1bc691b0f ("nir/algebraic: add and improve pack/unpack patterns")
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33347>
2025-02-26 20:43:39 +00:00
Mike Blumenkrantz
480d8bea2b zink: put zink_program::reference on separate cacheline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738>
2025-02-26 20:19:50 +00:00
Mike Blumenkrantz
08dc6aa354 zink: use a separate ralloc ctx for zink_program objects
I considered removing ralloc at all here but it was more deeply embedded
than I realized. maybe a project for another time

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33738>
2025-02-26 20:19:50 +00:00
Ian Romanick
495812d8e0 brw/print: Don't let SHADER_OPCODE_FLOW affect indentation
In `fossilize-replay --pipeline-hash 375a63e14afa96c4
fossils/fossil-db/steam-dxvk/f1_22_abu_dhabi.dx12vk-ultra.foz`,
`cf_count` would get decremented below zero. This would lead trying to
print `UINT_MAX` levels of indentation just a few lines below. I ran
out of disk space and patience before that finished. 🤣

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33748>
2025-02-26 19:50:30 +00:00
Yiwei Zhang
bef1c23a23 venus: re-enable 1.4 support
Have made core venus protocol update to be able to support host image
copy.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
577fa1793d venus: enable VK_EXT_host_image_copy support
Fill the core features and properties properly, and conditionally pass
through support of the extension based on the renderer venus protocol
spec version.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
f3da8167d6 vulkan/util: clean up copy_property and fix for setter
For setters, e.g. vk_set_physical_device_properties_struct used by venus
to fill all props, the out array storage comes from the driver, so we'd
assign directly. This change also fixes the template indent and drops an
unused arg.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
c13da1c744 venus: implement host image copy commands
The img-2-img and layout transition are trivial passthrough. For
img-2-mem and mem-2-img copies, host pointer has to be sized for proper
protocol encoding and decoding, and we have to either query or calculate
on our own based on VK_HOST_IMAGE_COPY_MEMCPY_EXT flag being used or
not.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
036493f43d venus: extend image format cache for host copy props
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
2eb5a75d51 venus: sync latest protocol v3 support for host copy
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
fde5cebec5 venus: fix image format cache miss with AHB usage query
should skip updating cache key instead of marking as a miss

Fixes: e48645250c ("venus: image format properties cache")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
15777727c9 venus: use sharing_mode from common vk_image
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
f9afd65695 venus: drop unnecessary struct
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Yiwei Zhang
bcb0b8c7f6 venus: suppress a few -Wmaybe-uninitialized
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
2025-02-26 19:16:48 +00:00
Mike Blumenkrantz
f9fe08740a zink: always fully unwrap contexts
threaded_context_unwrap_sync() can be called safely on non-threaded
contexts

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33742>
2025-02-26 18:54:25 +00:00
Lionel Landwerlin
d0c980caa7 brw: avoid setting up the sampler header bits when unused
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704>
2025-02-26 17:19:04 +00:00
Lionel Landwerlin
8b4f997168 brw: optimize load payload with immediate headers
Currently the condition to use a single MOV is failing on immediate
values, so we emit 2 MOVs in SIMD8 instead of a single SIMD16.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33704>
2025-02-26 17:19:04 +00:00
Rob Clark
513184fa44 tu: Suballoc VkEvent BOs
No need to burn an entire PAGE_SIZE BO for an event.  And in particular
the pattern of allocate + immediate mmap is expensive in a VM.
Suballocating cuts down the # of times we do this in
dEQP-VK.api.command_buffers.execute_large_primary from 10000 to 157,
avoiding problems with the test running up against watchdog timeout.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33721>
2025-02-26 16:51:08 +00:00
Alyssa Rosenzweig
c3cc756cf9 ir3: clean up progress manually
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
266638d10a nir: clean up progress
semantic patch made a few bad choices.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
593308a685 nir: eliminate nir_metadata_preserve
Everybody uses the wrapper now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
24d088104f nir,nak: update comments referencing nir_metadata_preserve
in prep for removing this method.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
ff94b155ab treewide: port remaining nir_metadata_preserve users
apply our semantic patch manually to the remaining users. Coccinelle bailed on
these files for whatever reason, I guess.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
9a58a8257e treewide: Switch to nir_progress
Via the Coccinelle patch at the end of the commit message, followed by

sed -ie 's/progress = progress | /progress |=/g' $(git grep -l 'progress = prog')
ninja -C ~/mesa/build clang-format
cd ~/mesa/src/compiler/nir && clang-format -i *.c
agxfmt

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    -return prog;
    +return nir_progress(prog, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    @@

    -if (prog_expr) {
    -nir_metadata_preserve(impl, metadata);
    -return true;
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -return false;
    -}
    +bool progress = prog_expr;
    +return nir_progress(progress, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, prog ? (metadata) : nir_metadata_all);
    -return prog;
    +return nir_progress(prog, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, prog ? (metadata) : nir_metadata_all);
    +nir_progress(prog, impl, metadata);

    @@
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, metadata);
    -return true;
    +return nir_progress(true, impl, metadata);

    @@
    expression impl;
    @@

    -nir_metadata_preserve(impl, nir_metadata_all);
    -return false;
    +return nir_no_progress(impl);

    @@
    identifier other_prog, prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    -other_prog |= prog;
    +other_prog = other_prog | nir_progress(prog, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +nir_progress(prog, impl, metadata);

    @@
    identifier other_prog, prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -other_prog = true;
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +other_prog = other_prog | nir_progress(prog, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    identifier prog;
    @@

    -if (prog_expr) {
    -nir_metadata_preserve(impl, metadata);
    -prog = true;
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +bool impl_progress = prog_expr;
    +prog = prog | nir_progress(impl_progress, impl, metadata);

    @@
    identifier other_prog, prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -other_prog = true;
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +other_prog = other_prog | nir_progress(prog, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    identifier prog;
    @@

    -if (prog_expr) {
    -prog = true;
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +bool impl_progress = prog_expr;
    +prog = prog | nir_progress(impl_progress, impl, metadata);

    @@
    expression prog_expr, impl, metadata;
    @@

    -if (prog_expr) {
    -nir_metadata_preserve(impl, metadata);
    -} else {
    -nir_metadata_preserve(impl, nir_metadata_all);
    -}
    +bool impl_progress = prog_expr;
    +nir_progress(impl_progress, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, metadata);
    -prog = true;
    +prog = nir_progress(true, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -}
    -return prog;
    +return nir_progress(prog, impl, metadata);

    @@
    identifier prog;
    expression impl, metadata;
    @@

    -if (prog) {
    -nir_metadata_preserve(impl, metadata);
    -}
    +nir_progress(prog, impl, metadata);

    @@
    expression impl;
    @@

    -nir_metadata_preserve(impl, nir_metadata_all);
    +nir_no_progress(impl);

    @@
    expression impl, metadata;
    @@

    -nir_metadata_preserve(impl, metadata);
    +nir_progress(true, impl, metadata);

squashme! sed -ie 's/progress = progress | /progress |=/g' $(git grep -l 'progress = prog')

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
91872c9c51 nir: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:53 +00:00
Alyssa Rosenzweig
298788bfde asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:52 +00:00
Alyssa Rosenzweig
469b8bbf3c nir: add nir_progress/nir_no_progress helpers
These will replace nir_metadata_preserve as more ergonomic replacements that
convey a notion of impl progress instead of simply updating metadata.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
2025-02-26 15:19:52 +00:00
Corentin Noël
a17d286dc4 lavapipe: Change lvp_cmd_type to anonymous enum
Fixes a build failure when using -Wenum-conversion.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33713>
2025-02-26 14:47:34 +00:00
Corentin Noël
1befb22ebb lavapipe: Remove doubly initialized features
They are now part of Vulkan 1.4

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33713>
2025-02-26 14:47:34 +00:00
Yogesh Mohan Marimuthu
5b02378c6f winsys/amdgpu: userq non imported fence can be ignored for same ip_type
Since there is only one userq per process there is no need to add
glWaitSync to cs->seq_no_dependencies if the fence is not imported
and ip type is same.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
224c0cfbdd winsys/amdgpu: userqueue multi ctx jobs are guaranteed to be in sequence
Jobs from multiple context are submitted to aws->cs_queue are executed in order. Jobs
in aws->cs_queue are directly added to userqueue ring, hence userqueue execution order
between context is guaranteed in case of userqueue.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
659a41293b winsys/amdgpu: same_queue variable should be set if there is only one queue
Fixes: 45fa34284f ("winsys/amdgpu: don't add fence dependency of other queues for userq")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
901f1ea8bd winsys/radeon: struct radeon_cmdbuf is rcs instead of cs for consistency
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
06691b9f39 winsys/amdgpu: amdgpu_cs_context is csc, amdgpu_cs is acs
radeon_cmdbuf is rcs instead of rws, probably earlier renaming of
rws was agressive.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
fc36840c04 winsys/amdgpu: make csc context as array
Instead of csc1 and csc2, make it as an array. Use current_cs_index
to point to csc that will be getting filled with commands.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:44 +00:00
Yogesh Mohan Marimuthu
eb5bd057a1 winsys/amdgpu: do not use rcs->csc
Use amdgpu_cs(rcs)->csc. This will give more code readability with
next cleanup patches.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
2025-02-26 13:53:43 +00:00
Valentine Burley
fe4d8d422f anv/ci: Remove fixed test from xfails
This Vulkan Video test was fixed in the commit referenced below.

Fixes: ee52885aec ("anv: Add one more flag of VideoCapability for encoding.")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33765>
2025-02-26 13:32:24 +00:00
David Rosca
0e68a2655f radeonsi/vcn: Rework decode ref handling
The issue with using video buffer associated data is that the data will
not be cleared when the buffer is removed from DPB. This will cause
issues if application tries to reuse such buffer (buffer that was
valid buffer in DPB in the past, but is currently not active in DPB)
as a dummy buffer for missing reference.
With Tier2 this works correctly because we allocate the DPB buffers
internally, but with UDT we use the video buffers directly for
references and so we need to make sure to only use the valid buffer
for a given index.

Instead of storing the buffer index as video buffer associated data,
use the render_pic_list array that we already have for keeping track
of active buffers in DPB.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33641>
2025-02-26 13:07:10 +00:00
David Rosca
fd3f297eb5 radeonsi/vcn: Add UDT support for VCN5
UDT uses decode target buffers directly as references.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33641>
2025-02-26 13:07:10 +00:00
Juan A. Suarez Romero
826acf5dce Revert "v3dv/ci: disable rpi5 job"
This reverts commit 68db5481f4.

Now that we are skipping tests causing OOM, we shouldn't have the
original problems that motivated the disablement.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33763>
2025-02-26 12:39:36 +00:00
Juan A. Suarez Romero
167347212a v3dv/ci: Skip tests causing OOM
There are some tests that reaches out of memory (OOM) on purpose to
cover some fail cases.

But others that shouldn't are actually causing OOM too because we run
multiple tests in parallel, which increases the memory pressure.

This can affects other tests running in parallel, causing an increase of
the flakiness.

It is better to skip all of them

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33763>
2025-02-26 12:39:36 +00:00
David Rosca
7f7206f1a9 radeonsi/video: Allocate video buffers with modifiers
This enables tiling (and DCC on GFX12) for video buffers.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:28 +00:00
David Rosca
58a6be0f1e radeonsi/vcn: Fix chroma pitch for JPEG decode
This used to work fine with linear only, but now we need to use the
actual chroma surface pitch. For JPEG this value is in bytes.
Also swap 64KB_R_X addr mode with 256KB_S_X.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:27 +00:00
David Rosca
6695eeaf42 ac/surface: Allow DCC for multi-plane formats on GFX12
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:27 +00:00
David Rosca
e9341be246 ac/surface: Only allow linear modifier for subsampled 422 formats
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33598>
2025-02-26 11:31:27 +00:00
Benjamin Lee
094177b9b5 meson: update wayland-protocols source_hash
This was missed when updating to 1.41.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 53b40a40f4 ("increase required wayland-protocols version to 1.41")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33752>
2025-02-26 10:53:25 +00:00
Mary Guillemard
e9d1e2b61e pan/genxml: Use DCD Flags in Draw struct on v9+
The first bits of the Draw struct were moved to DCD flags since v10.
To keep things in sync, we now use DCD flags instead on v10 and define
it on v9 to avoid uneeded PAN_ARCH if/else in preload logics.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
3aa1687829 panfrost: Rename CS ADD_IMMEDIATEXX to ADD_IMMXX
This is required map more closely to newer generation definition and avoid
needless PAN_ARCH blocks.

As the opcode is actually named ADD_IMMEDIATEXX on v12 and lower, this
wasn't changed.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
e970d440a2 panfrost: Fix FLUSH_CACHE2 other definition
This actually use the same format as L2/LSC flush mode.

This change is here to ease new generation definitions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
0eca4b87f0 panfrost: Rename CSF MOVE into MOVE48
We name it move48 on our helpers and new generations renamed it too.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
6603e519c9 panfrost: Avoid hard crash when major arch is unknown
This allows enumerating other Gallium screens.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
9a70754ebd panfrost: Use CSIF info for CSF registers count
Instead of hardcoding 96 everywhere, we can get that information from
the kernel. This is useful for newer generations that increased the
count of registers present.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
90bf48829a panfrost: Switch Gallium driver to use cs_sr_regXX
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
4c2e2eb445 panfrost: Rework cs_sr_regXX to be a macro
This move cs_sr_regXX in cs_builder.h and make usage less verbose.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
bbecaacc3f pan/genxml: Define RUN_FRAGMENT staging registers in an enum
This makes it more clear what is what.

It will also reduce the pain of migration on newer gen.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
c8882d83fd pan/genxml: Define RUN_COMPUTE staging registers in an enum
This makes it more clear what is what.

It will also reduce the pain of migration on newer gen.

RUN_COMPUTE_INDIRECT also use the same SRs so we also map to RUN_COMPUTE
there.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
11beea6242 panfrost: Remove write to TSD_3 in Gallium driver
This was set but never actually used.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Mary Guillemard
e0696b80d0 pan/genxml: Define RUN_IDVS staging registers in an enum
This makes it more clear what is what.

It will also reduce the pain of migration on newer gen as most values
only moved place.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33736>
2025-02-26 10:17:11 +00:00
Juan A. Suarez Romero
6f4af54aac vc4/ci: update expected results
Add new flakes

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33760>
2025-02-26 09:52:51 +00:00
Eric Engestrom
007998db14 ci/build: build-test the dri2 code
To prevent things like https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33669

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33692>
2025-02-26 09:14:39 +00:00
Tapani Pälli
41a7b58214 iris: wait for imported fences to be available in iris_fence_await
This ensures shared fence is available before we submit (and fail)
a batch with it, this fixes following issue on iris driver:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12650

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33662>
2025-02-26 04:32:29 +00:00
Hyunjun Ko
ee52885aec anv: Add one more flag of VideoCapability for encoding.
Adds VK_VIDEO_ENCODE_H264/5_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR.
This also fixes dEQP-VK.video.capabilities.h265_encode_capabilities_query.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33729>
2025-02-26 01:38:55 +00:00
Rebecca Mckeever
b85c94fc89 panvk: Allow 3-byte formats
We are now using the vk_meta buffer <-> image copy helpers, which do
support 3-byte formats.

Fixes: 50679213 ("panvk: Switch to vk_meta")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33437>
2025-02-26 01:17:51 +00:00
Simon Ser
26d90674c2 vulkan/wsi/x11: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
e4ff98bacb libsync: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
42509180d4 panvk: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
8f9a390f33 venus: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
d951ca056a lavapipe: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
0be6b65f41 iris: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
bbb3069d05 freedreno: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Simon Ser
9859283aa0 pvr: replace dup() with os_dupfd_cloexec()
dup() will leak the new FD into any child process after fork().

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26203>
2025-02-26 00:45:51 +00:00
Sagar Ghuge
6f7a76e9d9 intel/compiler: Zero out the header for texel fetch
It looks like even if we pass the header not present in the sampler descriptor,
it's not helping with the correct behavior of texelFetch.

Experiment on real HW shows that if we just zero out the header and include it
in the message, it helps with the correct behavior. I'm not sure if there is a
valid HW workaround for this one.

We can skip masking the sampler message header bits 4:0 but masking them out
doesn't hurt in this case.

Increasing number of parameter impact sampler performance, For example,
a sample message using 5 parameters will not be able to sustain the same
throughput as a sample message with only 4 valid parameters. We should
look out for any perf impact with respect to texel fetch.

This patch fixes ~3k tests involving texelFetch instruction on Xe3+

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33562>
2025-02-26 00:23:49 +00:00
Alyssa Rosenzweig
c0beb79145 hk: drop silly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
c8ee0895e3 asahi: drop silly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
1100c2328a asahi: rename wip modifier
this is gpu-tiled, not twiddled.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
42bc9f6400 ail: split compression up
this better describes the hw.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
99e346ef15 ail: rename twiddled -> gpu tiled
got the names flipped >_<

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Alyssa Rosenzweig
9da6e99b99 docs/asahi: clarify twiddled vs GPU-tiled
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33743>
2025-02-26 00:03:52 +00:00
Lionel Landwerlin
91f36ba5b6 anv: fix missing 3DSTATE_PS:Kernel0MaximumPolysperThread programming
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 815d2e3e8b ("anv: move 3DSTATE_PS to partial packing")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33712>
2025-02-25 23:42:01 +00:00
Benjamin Lee
3b5d5c072a panfrost: remove NIR_PASS_V usage for noperspective lowering
The rest of the NIR_PASS_V usage in panfrost was dropped in
34beb93635, but this one was added in an
MR that was merged after.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 081438ad39 ("panfrost: add nir pass to lower noperspective varyings")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33728>
2025-02-25 23:17:43 +00:00
Caio Oliveira
a030acd7c3 brw: Reformat brw_gram.y and brw_lex.l
Change to use Mesa space indentation.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33739>
2025-02-25 22:57:51 +00:00
Vasily Khoruzhick
2eb34c86f2 lima: ppir: add compactification pass
If we have a single instruction that uses only combiner unit and previous
instruction doesn't use this unit, two instructions can be safely merged.

Implement compactification pass to do that.

The pass doesn't update instruction dependencies, so it should be run
right before codegen.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33570>
2025-02-25 21:59:18 +00:00
Xaver Hugl
1433955420 vulkan/wsi: handle the compositor not supporting extended target volume better
Instead of unconditionally ignoring the HDR metadata, just attempt to create the image
description, and if it fails, fall back to creating it without HDR metadata.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Xaver Hugl
4b663d561b vulkan/wsi: implement support for VK_EXT_hdr_metadata on Wayland
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Colin Marc
789507c99c vulkan/wsi: implement the Wayland color management protocol
This allows applications to use color spaces other than sRGB, if the compositor
supports them.

The color management surface is only created if a non-sRGB and non-passthrough
colorspace is set on the surface, so applications can still use the protocol
directly if they prefer.

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Xaver Hugl
53b40a40f4 increase required wayland-protocols version to 1.41
This version contains the color management protocol.

This commit also adjusts the build-wayland script to mention
that the DEBIAN_BASE_TAG also has to be bumped.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Georg Lehmann
9f40d06d2d radv: use nir_opt_phi_to_bool
Foz-DB Navi21:
Totals from 5238 (6.60% of 79377) affected shaders:
MaxWaves: 112653 -> 112805 (+0.13%)
Instrs: 8008658 -> 8008518 (-0.00%); split: -0.18%, +0.18%
CodeSize: 42632748 -> 42650584 (+0.04%); split: -0.16%, +0.20%
VGPRs: 293296 -> 292672 (-0.21%); split: -0.22%, +0.01%
SpillSGPRs: 1958 -> 2066 (+5.52%); split: -0.66%, +6.18%
SpillVGPRs: 2934 -> 2896 (-1.30%)
Latency: 77959669 -> 77957296 (-0.00%); split: -0.10%, +0.10%
InvThroughput: 20650753 -> 20585680 (-0.32%); split: -0.39%, +0.08%
VClause: 164769 -> 164979 (+0.13%); split: -0.14%, +0.27%
SClause: 237718 -> 237731 (+0.01%); split: -0.03%, +0.03%
Copies: 643403 -> 634147 (-1.44%); split: -1.83%, +0.39%
Branches: 234353 -> 233990 (-0.15%); split: -0.30%, +0.15%
PreSGPRs: 291935 -> 293893 (+0.67%); split: -0.01%, +0.68%
PreVGPRs: 245802 -> 245241 (-0.23%); split: -0.23%, +0.00%
VALU: 5145144 -> 5133006 (-0.24%); split: -0.38%, +0.14%
SALU: 1178442 -> 1189578 (+0.94%); split: -0.19%, +1.13%
VMEM: 343288 -> 343994 (+0.21%); split: -0.02%, +0.23%
SMEM: 354275 -> 354273 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
a237a3def8 nir/opt_algebraic: optimize b2i(a) != -b2i(b)
Foz-DB Navi21:
Totals from 4 (0.01% of 79377) affected shaders:
Instrs: 881 -> 861 (-2.27%)
CodeSize: 4968 -> 4836 (-2.66%)
Latency: 6127 -> 6006 (-1.97%)
InvThroughput: 1128 -> 1068 (-5.32%)
VALU: 564 -> 534 (-5.32%)
SALU: 111 -> 121 (+9.01%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
4141043295 nir/opt_algebraic: optimize constant shift of DXBC booleans
Can be combined with further iand.

Foz-DB Navi21:
Totals from 190 (0.24% of 79377) affected shaders:
Instrs: 100628 -> 100225 (-0.40%); split: -0.41%, +0.01%
CodeSize: 567828 -> 565884 (-0.34%); split: -0.35%, +0.00%
Latency: 968415 -> 968052 (-0.04%); split: -0.09%, +0.06%
InvThroughput: 285804 -> 285210 (-0.21%); split: -0.25%, +0.04%
VClause: 1959 -> 1958 (-0.05%)
Copies: 5696 -> 5711 (+0.26%)
PreSGPRs: 7567 -> 7569 (+0.03%)
VALU: 77161 -> 76751 (-0.53%); split: -0.54%, +0.01%
SALU: 7831 -> 7840 (+0.11%); split: -0.09%, +0.20%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
1e522e7d75 nir/opt_algebraic: optimize dxbc boolean not
Foz-DB Navi21:
Totals from 237 (0.30% of 79377) affected shaders:
Instrs: 486690 -> 486146 (-0.11%); split: -0.11%, +0.00%
CodeSize: 2629516 -> 2626052 (-0.13%); split: -0.13%, +0.00%
VGPRs: 18744 -> 18736 (-0.04%)
Latency: 7404763 -> 7399806 (-0.07%); split: -0.07%, +0.01%
InvThroughput: 1800282 -> 1798388 (-0.11%); split: -0.11%, +0.00%
VClause: 12101 -> 12106 (+0.04%); split: -0.01%, +0.05%
Copies: 34225 -> 34170 (-0.16%); split: -0.21%, +0.05%
PreSGPRs: 14634 -> 14639 (+0.03%)
PreVGPRs: 16713 -> 16706 (-0.04%)
VALU: 317523 -> 316693 (-0.26%); split: -0.26%, +0.00%
SALU: 53814 -> 54097 (+0.53%); split: -0.38%, +0.90%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
f9722e35be nir/opt_algebraic: optimize more boolean bcsel with constants
Foz-DB Navi21:
Totals from 667 (0.84% of 79377) affected shaders:
Instrs: 3890980 -> 3886878 (-0.11%); split: -0.11%, +0.00%
CodeSize: 21088576 -> 21065848 (-0.11%); split: -0.11%, +0.00%
SpillSGPRs: 458 -> 446 (-2.62%); split: -3.49%, +0.87%
Latency: 26160728 -> 26162856 (+0.01%); split: -0.02%, +0.02%
InvThroughput: 6999254 -> 7000593 (+0.02%); split: -0.01%, +0.03%
VClause: 103745 -> 103743 (-0.00%)
SClause: 93113 -> 93109 (-0.00%)
Copies: 344097 -> 344794 (+0.20%); split: -0.05%, +0.25%
Branches: 134546 -> 134764 (+0.16%); split: -0.01%, +0.17%
PreSGPRs: 40677 -> 40298 (-0.93%); split: -0.93%, +0.00%
PreVGPRs: 40185 -> 40190 (+0.01%)
VALU: 2584477 -> 2584468 (-0.00%); split: -0.00%, +0.00%
SALU: 573587 -> 569353 (-0.74%); split: -0.75%, +0.01%
SMEM: 124794 -> 124790 (-0.00%)

v2 (idr): Remove a pattern that is made redundant by this commit
combined with the previous commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
9785fa460c nir/opt_algebraic: optimize DXBC boolean bcsel
Foz-DB Navi21:
Totals from 1749 (2.20% of 79377) affected shaders:
Instrs: 1695408 -> 1685149 (-0.61%); split: -0.68%, +0.07%
CodeSize: 9241312 -> 9174180 (-0.73%); split: -0.79%, +0.06%
VGPRs: 90688 -> 90664 (-0.03%); split: -0.04%, +0.01%
SpillSGPRs: 278 -> 298 (+7.19%)
Latency: 9560167 -> 9540386 (-0.21%); split: -0.29%, +0.08%
InvThroughput: 2236022 -> 2220411 (-0.70%); split: -0.72%, +0.02%
VClause: 29910 -> 29917 (+0.02%)
Copies: 146365 -> 145230 (-0.78%); split: -1.03%, +0.25%
Branches: 59545 -> 59560 (+0.03%)
PreSGPRs: 78858 -> 79242 (+0.49%); split: -0.10%, +0.59%
PreVGPRs: 78643 -> 78560 (-0.11%); split: -0.11%, +0.00%
VALU: 1127861 -> 1113990 (-1.23%); split: -1.24%, +0.01%
SALU: 249535 -> 253237 (+1.48%); split: -0.15%, +1.63%

v2 (idr): Remove a pattern that is now redundant.

v3 (idr): Don't undistribute ineg from bcsel. On platforms where ineg
is a free source modifier, this can be harmful.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
674d970861 nir/opt_algebraic: 0 >= a -> 0 == a
Foz-DB Navi21:
Totals from 2179 (2.75% of 79377) affected shaders:
MaxWaves: 40987 -> 40917 (-0.17%); split: +0.00%, -0.18%
Instrs: 5950981 -> 5949310 (-0.03%); split: -0.04%, +0.01%
CodeSize: 32120808 -> 32110328 (-0.03%); split: -0.04%, +0.00%
VGPRs: 141704 -> 141768 (+0.05%); split: -0.01%, +0.05%
SpillSGPRs: 1750 -> 1746 (-0.23%)
Latency: 56667295 -> 56562916 (-0.18%); split: -0.19%, +0.00%
InvThroughput: 13292128 -> 13288691 (-0.03%); split: -0.03%, +0.00%
VClause: 151845 -> 151755 (-0.06%); split: -0.06%, +0.00%
SClause: 172316 -> 172443 (+0.07%); split: -0.02%, +0.09%
Copies: 458724 -> 458951 (+0.05%); split: -0.08%, +0.13%
Branches: 195239 -> 195351 (+0.06%); split: -0.00%, +0.06%
PreSGPRs: 135304 -> 135317 (+0.01%); split: -0.01%, +0.02%
PreVGPRs: 122430 -> 122428 (-0.00%); split: -0.01%, +0.01%
VALU: 3924585 -> 3924062 (-0.01%); split: -0.02%, +0.01%
SALU: 820666 -> 819414 (-0.15%); split: -0.17%, +0.02%
SMEM: 247036 -> 247142 (+0.04%); split: -0.00%, +0.04%

v2 (idr): Remove a pattern that is now redundant. This was originaly
removed in a commit later in the MR.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:09 +00:00
Georg Lehmann
000f14f7fd nir/opt_algebraic: optimize ineg(a) == #b
No Foz-DB changes.

v2 (idr): Remove some patterns that are now redundant. These were
originally removed in a commit later in the MR.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:08 +00:00
Georg Lehmann
3e4ac92298 nir/opt_algebraic: optimize ineg(a) == ineg(b)
DXBC boolean cleanup.

Foz-DB Navi21:
Totals from 19 (0.02% of 79188) affected shaders:
Instrs: 9720 -> 9652 (-0.70%)
CodeSize: 54056 -> 53640 (-0.77%)
Latency: 95357 -> 94377 (-1.03%); split: -1.03%, +0.00%
InvThroughput: 17331 -> 16939 (-2.26%)
Copies: 604 -> 605 (+0.17%)
PreSGPRs: 832 -> 838 (+0.72%)
PreVGPRs: 701 -> 699 (-0.29%)
VALU: 6551 -> 6485 (-1.01%)
SALU: 893 -> 891 (-0.22%); split: -1.68%, +1.46%

v2 (idr): Remove a pattern that is now redundant. The version without
ineg already exists much earlier in the file. Search for b2iN.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:08 +00:00
Georg Lehmann
dd1a7f0e8c nir: add a pass to optimize phis to 1bit
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33498>
2025-02-25 20:38:08 +00:00
Gurchetan Singh
a5f5d26080 gallium: drop const qualifier on return type
Observed the following error with -Werror enabled:

nir_to_tgsi.c:550:8: error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33741>
2025-02-25 19:39:37 +00:00
Dylan Baker
c33ebf09f5 iris: fix handling of GL_*_VERTEX_CONVENTION
By actually setting the state packets according to the program data.
Also ensure that we correctly flag that the program may be dirty when
the geometry shader state changes

Fixes piglit tests: `spec@!opengl 3.2@gl-3.2-adj-prims * pv-first`

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
2025-02-25 19:18:25 +00:00
Dylan Baker
0477ee660f iris: Correctly set NOS for geometry shader state changes
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
2025-02-25 19:18:25 +00:00
Vasily Khoruzhick
aefe6cca8d lima: ci: update deqp CI expectations
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:56 +00:00
Vasily Khoruzhick
9c1a31cb55 lima: ppir: try scheduling root nodes into the same instruction
Root nodes do not have dependencies, so it is safe to attempt scheduling
them into the same instruction

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:56 +00:00
Vasily Khoruzhick
d6987daef9 lima: ppir: introduce an optimizer
Introduce an optimizer for ppir with 3 passes:

1) remove empty blocks: this one currently doesn't have any effect on
   code generation, but it's required by other passes
2) remove redundant mov that is generated for store_output intrinsic when
   possible
3) dead code elimination

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:56 +00:00
Vasily Khoruzhick
0471b438d6 lima: ppir: assign an index for discard block
Discard block is the only block that we generate internally, and it
currently just gets an index of 0 which collides with the very first
block. It is not an issue for compiler, but an eyesore for debug output
for a program with discard_if.

Assign INT_MAX index for it.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:55 +00:00
Vasily Khoruzhick
8905ee3a03 lima: ppir: fix regalloc bugs
Currently regalloc doesn't mark write destinations in the single
instructions as conflicting, as a result regalloc may assign the same
register to a multiple write destinations.

Before we started scheduling multiple root nodes into a single instruction
it was pretty much hidden. Fix it by marking destination registers as
conflicting if instruction has multiple writes.

Also stop handling a special case for output registers in regalloc and just
mark them as live in the last instruction of "stop" block(s)

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33636>
2025-02-25 18:51:55 +00:00
Samuel Pitoiset
c58655b999 vulkan: filter duplicate pNext struct at device creation
Recently, Indiana Jones and The Great Circle messed up this by adding
duplicates and this was causing the game to crash at launch.

Of course, this was an application bug that VVL was also able to catch
but I think maybe Mesa should ignore those instead of failing to create
the logical device.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33705>
2025-02-25 16:55:03 +00:00
Christian Gmeiner
eb1f163848 zink/ntv: Only emit GeometryStreams cap if multiple streams are used
From the SPIR-V spec:
  GeometryStreams: Uses multiple numbered streams for geometry-stage output.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33723>
2025-02-25 16:20:04 +00:00
Pavel Ondračka
6b7b8738b3 r300: do not include newline in the error messages
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33529>
2025-02-25 15:57:35 +00:00
Pavel Ondračka
62507a2aa7 r300: forward all compile failures to state tracker
Additionally an environment variable RADEON_DEBUG=dummysh is introduced
to force the old behavior, i.e., to just silently use a dummy shader (or
skip the draw altogether) instead.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33529>
2025-02-25 15:57:35 +00:00
Pavel Ondračka
5e0369d8bb r300: stop reporting compile failures in finalize_nir
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33529>
2025-02-25 15:57:35 +00:00
Valentine Burley
b88b7f9294 lavapipe: Update driverVersion
Use vk_get_driver_version instead of hardcoding the driver version to 1.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33730>
2025-02-25 14:14:54 +00:00
Samuel Pitoiset
c3884f7f1e radv: reserve bits explicitly for cache key structs
Having explicit reserved bits for those structs will make compiler
change backports easier and more robust regarding precompiled shaders
on SteamDeck.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33706>
2025-02-25 13:52:18 +00:00
Martin Krastev
a3818adca5 svga/ci: enable vmware farm
Reinstate vmware farm after infrastructure maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33733>
2025-02-25 13:31:14 +00:00
Zan Dobersek
710e74a082 tu: make tu_debug_flags enum 64-bit
Soon tu_debug_flags will overgrow its 32-bit capacity. To avoid issues the
enum is resized to 64 bits and handling of these flag values is adjusted
accordingly.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33663>
2025-02-25 13:05:48 +00:00
Hans-Kristian Arntzen
13a3f9a972 radv: Always set 0 dispatch offset for indirect CS.
Fixes severe glitching in Avowed.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33732>
2025-02-25 12:17:11 +00:00
Erik Faye-Lund
21aa58e9b6 pan/bi: remove unused debug output
There's no more users left of this switch or macro, so let's just get
rid of it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33710>
2025-02-25 11:08:24 +00:00
Erik Faye-Lund
fee6e51c14 pan/bi: use unreachable instead of DBG + assert
This error isn't particularly interesting to be able to toggle at
runtime. Let's just use the unreachable macro instead.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33710>
2025-02-25 11:08:24 +00:00
Samuel Pitoiset
67c150bf9e radv: fix missing SQTT barriers for fbfetch color/depth decompressions
SQTT layout transitions need to be inside SQTT barrier. Otherwise, this
throws an assertion in RADV and might also crash when the capture is
opened with RGP.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12664
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33719>
2025-02-25 10:18:42 +00:00
Marek Olšák
aff6b63d10 radeonsi: print why draws are rejected
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
695cd8f41a radeonsi: simplify bind_vertex_elements due to being before set_vertex_buffers
The unaligned checking is unnecessary because si_bind_vertex_elements
always unbinds all vertex buffers.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
c4414324a1 radeonsi: don't set num_vertex_buffers and don't unbind in set_vertex_buffers
The number of bound vertex buffers is now always equal to the number of
used buffers in the vertex elements state even if some buffers are NULL.

set_vertex_buffers doesn't unbind [count..last_count-1] buffers anymore.
bind_vertex_elements_state does that. It lets us remove code from
si_set_vertex_buffers.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
0f54898583 radeonsi: require that count in set_vertex_buffers matches vertex elements state
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
7bf5d2ce75 radeonsi: add assertion requiring binding vertex elements before vertex_buffers
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
1638d486ff gallium/u_threaded,st/mesa: add a merged set_vertex_elements_and_buffers call
Setting vertex elements before vertex buffers is a new requirement of gallium.

This is the only way to set the vertex elements state after vertex buffers
in st/mesa while setting the state before vertex buffers in tc_batch_execute.

A new TC call is added to set both vertex elements and vertex buffers.
Vertex buffers are filled by st/mesa first, and then the vertex elements
state is set in the same call. When TC calls it, it binds vertex elements
before vertex buffers.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
2606ceacdd cso_context: add cso_get_vertex_elements_for_bind, letting the caller bind it
for st/mesa

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
58b3d24b25 nine: bind exactly the number of vertex buffers as vertex elements need
gallium will require this (radeonsi won't work otherwise).

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
05fa8391b9 nine: remove unused last_vtxbuf_count
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
ecbbbae5c3 nine: always update vertex buffers after updating vertex elements
gallium will require this. (radeonsi won't work otherwise)

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Marek Olšák
36d8191176 nine: change the vtxbuf dirty mask to bool
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27736>
2025-02-25 09:24:25 +00:00
Samuel Pitoiset
c64b8c8401 radv: stop computing the UUID using the physical device cache key
Otherwise, the UUID changes for games that have shader-based drirc
workarounds and this breaks precompiled shaders on SteamDeck.

Instead, use this pdev cache key to compute the logical device hash
which is common to all pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33717>
2025-02-25 07:59:02 +00:00
Peyton Lee
4fe586f71e radeonsi/vpe: support geometric scaling
When the reduction ratio exceeds the hardware limit,
enable the geometric scaling mechanism.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33528>
2025-02-25 07:29:46 +00:00
Peyton Lee
e85a6b6a63 radeonsi/vpe: check reduction ratio
Check the reduction ratio is within the hardware capablity.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33528>
2025-02-25 07:29:46 +00:00
Faith Ekstrand
c9ba28da55 nak/nir: Don't provide dummy backend2 tex srcs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
ff0a82e785 nak: Handle tex ops with only one source
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
58218c7349 nvk: Do not set INVALIDATE_SKED_CACHES pre-MaxwellB
The other two uses of this are behind guards but we forgot this one.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
c145147871 nvk: Don't bind a fragment shading rate image pre-Turing
Fixes: 75bcb656d9 ("nvk: Add support for binding fragment shading rate images")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Faith Ekstrand
f441ed1f7b nvk/nvkmd: Fix logging of VA bind addresses
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
2025-02-25 01:43:22 +00:00
Timothy Arceri
5ad508d743 util/disk_cache: dont create multidisk cache dir if unused
As reported in issue #11825 the code that is meant to clean up old
cache dirs actually ends up creating an empty dir due to reusing
existing code to create the cache path required for the potential
cleanup.

Here we make the code more flexible allowing cache path strings
to be returned by the helpers if the directory already exists
or returning NULL if we don't want to create a new directory.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11825
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33699>
2025-02-25 00:11:03 +00:00
Lorenzo Rossi
4d36528d04 nak: Fold bool-int-bool conversions
As explained in https://gitlab.freedesktop.org/mesa/mesa/-/issues/10204
there are places in the NAK backend where we emit i2b(b2i(x))
conversions that cannot be folded by NIR passes.

This commit adds to the copy propagation pass the ability to track
boolean conversions, folding them whenever possible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10204
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33646>
2025-02-24 23:50:52 +00:00
Caio Oliveira
7311bcfd6a intel/brw: Don't need to repair CFG in brw_opt_combine_constants
Since a previous change ensured that a DO-block is guaranteed to not be
followed by a DO-block, it is sufficient to pick the next block without
requiring to repair the CFG.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33536>
2025-02-24 23:25:06 +00:00
Caio Oliveira
d2c39b1779 intel/brw: Always have a (non-DO) block after a DO in the CFG
Make the "block after DO" more stable so that adding instructions after
a DO doesn't require repairing the CFG.  Use a new SHADER_OPCODE_FLOW
instruction that is a placeholder representing "go to the next block"
and disappears at code generation.

For some context, there are a few facts about how CFG currently works

- Blocks are assumed to not be empty;
- DO is always by itself in a block, i.e. starts and ends a block;
- There are no empty blocks;
- Predicated WHILE and CONTINUE will link to the "block after DO";
- When nesting loops, it is possible that the "block after DO" is
  another "DO".

Reasons and further explanations for those are in the brw_cfg.c comments.

What makes this new change useful is that a pass might want to add
instructions between two DO instructions.  When that happens, a new
block must be created and any predicated WHILE and CONTINUE must be
repaired.

So, instead of requiring a repair (which has proven to be tricky in
the past), this change adds a block that can be "virtually" empty but
allow instructions to be added without further changes.

One alternative design would be allowing empty blocks, that would be
a deeper change since the blocks are currently assumed to be not empty
in various places.  We'll save that for when other changes are made to
the CFG.

The problem described happens in brw_opt_combine_constants, and a
different patch will clean that up.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33536>
2025-02-24 23:25:06 +00:00
Caio Oliveira
d32a5ab0e4 intel/brw: Use the builder DO() function in all places
Shorter and a preparation to add some functionality to DO().

Had to make it const since that's the convention for builder, so
just made all the sibling helpers const too.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33536>
2025-02-24 23:25:06 +00:00
Stéphane Cerveau
5f8f3db475 anv: fix error code in GetPhysicalDeviceVideoFormatProperties
If no video profile format found, we should return
the custom error code
VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33709>
2025-02-24 23:03:43 +00:00
Natalie Vock
14b902c825 radv/rt: Don't allocate the traversal shader in a capture/replay range
We never write the traversal shader address out to shader group handles,
so this is not necessary. On the flipside, it can cause conflicts if the
traversal shader is allocated in a range occupied by a replayed shader.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33711>
2025-02-24 22:41:19 +00:00
Alyssa Rosenzweig
feedd427b3 nvk: rewrite query copy shader in CL C
as previously discussed.

this is using "library CL" instead of kernel CL, which is the older way of doing
things. it works, it just has more boilerplate per-kernel than we'd want
otherwise. but library CL is basically free to integrate into a driver, whereas
kernel CL requires a lot more upfront investment. (I'm working on cleaning that
up but we're not quite there yet.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33362>
2025-02-24 21:15:26 +00:00
Georg Lehmann
c249556bf4 aco/insert_exec: fix continue_or_break on gfx6-7
s_cmp_lg_u64 is gfx8+

Fixes: 115ff5f95b ("aco/insert_exec_mask: don't restore exec in continue_or_break blocks")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33715>
2025-02-24 20:41:17 +00:00
Alyssa Rosenzweig
904760ff8e radv/nir_lower_fs_intrinsics: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
184557932f radv/nir_lower_intrinsics_early: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
a589bae3aa radv/nir_lower_fs_barycentric: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
88587a3839 radv/nir_lower_view_index: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
c025a211f2 radv/nir_lower_viewport_to_zero: intrinsic pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33655>
2025-02-24 20:19:10 +00:00
Alyssa Rosenzweig
2504e7951b treewide: use nir_shader_tex_pass
Adapted the Coccinelle rules from the nir_shader_intrinsics_pass commit a while
ago, which was buggy then and buggy now, so then I fixed stuff up manually
(including formatting).

Via Coccinelle patch:

    @def@
    typedef bool;
    typedef nir_builder;
    typedef nir_instr;
    typedef nir_def;
    identifier fn, instr, intr, x, builder, data;
    @@

    static fn(nir_builder* builder,
    -nir_instr *instr,
    +nir_tex_instr *intr,
    ...)
    {
    (
    -   if (instr->type != nir_instr_type_tex)
    -      return false;
    -   nir_tex_instr *intr = nir_instr_as_tex(instr);
    |
    -   nir_tex_instr *intr = nir_instr_as_tex(instr);
    -   if (instr->type != nir_instr_type_tex)
    -      return false;
    )

    <...
    (
    -instr->x
    +intr->instr.x
    |
    -instr
    +&intr->instr
    )
    ...>

    }

    @pass depends on def@
    identifier def.fn;
    expression shader, progress;
    @@

    (
    -nir_shader_instructions_pass(shader, fn,
    +nir_shader_tex_pass(shader, fn,
    ...)
    |
    -NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
    +NIR_PASS_V(shader, nir_shader_tex_pass, fn,
    ...)
    |
    -NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
    +NIR_PASS(progress, shader, nir_shader_tex_pass, fn,
    ...)
    )

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v3d]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Georg Lehmann
940e87f225 nir/opt_remove_phis: use nir_shader_phi_pass
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Georg Lehmann
e4f0de89a5 nir/opt_phi_precision: use nir_shader_phi_pass
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Georg Lehmann
5a0702f351 nir/builder: add nir_shader_phi_pass
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
Alyssa Rosenzweig
dda2dadb98 nir/builder: add nir_shader_tex_pass
after the intrinsic and ALU passes. why not?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33672>
2025-02-24 19:33:26 +00:00
David Rosca
367735551d frontends/vdpau: Use extra reference buffer for AV1 film grain
AV1 applies film grain to decode target only, references in DPB must be
stored without film grain.
Fixes film grain decoding on drivers that use decode target buffers
directly for references.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33640>
2025-02-24 19:04:53 +00:00
Georg Lehmann
5da76df4cd nir/search_helpers: check tex source type in is_only_used_as_float
Foz-DB Navi21:
Totals from 164 (0.21% of 79377) affected shaders:
Instrs: 197477 -> 197035 (-0.22%); split: -0.23%, +0.01%
CodeSize: 1052944 -> 1051140 (-0.17%); split: -0.18%, +0.01%
VGPRs: 8104 -> 8080 (-0.30%)
Latency: 1115663 -> 1115567 (-0.01%); split: -0.06%, +0.05%
InvThroughput: 265822 -> 265158 (-0.25%); split: -0.26%, +0.01%
VClause: 3792 -> 3789 (-0.08%); split: -0.11%, +0.03%
SClause: 5738 -> 5744 (+0.10%); split: -0.02%, +0.12%
Copies: 12223 -> 12200 (-0.19%); split: -0.53%, +0.34%
PreVGPRs: 6807 -> 6801 (-0.09%); split: -0.15%, +0.06%
VALU: 139206 -> 138785 (-0.30%); split: -0.31%, +0.01%
SALU: 27852 -> 27853 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33674>
2025-02-24 16:34:53 +00:00
Georg Lehmann
3d8585e4fc nir/search_helpers: look through vecs in is_only_used_as_float
Will be useful with the next commit, or for backends that don't lower
alu to scalar.

No changes on Navi21.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33674>
2025-02-24 16:34:53 +00:00
Georg Lehmann
e0cebac14f nir/opt_algebraic: optimize b2f(a != 0) * a
Just D3D9 things.

Foz-DB Navi21:
Totals from 137 (0.17% of 79377) affected shaders:
MaxWaves: 3366 -> 3370 (+0.12%); split: +0.24%, -0.12%
Instrs: 76462 -> 72091 (-5.72%)
CodeSize: 411584 -> 380792 (-7.48%)
Latency: 279472 -> 275505 (-1.42%); split: -2.01%, +0.59%
InvThroughput: 71311 -> 65369 (-8.33%)
VClause: 1587 -> 1612 (+1.58%); split: -1.01%, +2.58%
SClause: 1111 -> 1105 (-0.54%); split: -1.08%, +0.54%
Copies: 5621 -> 5602 (-0.34%); split: -1.39%, +1.05%
PreSGPRs: 5266 -> 5241 (-0.47%); split: -0.51%, +0.04%
PreVGPRs: 4249 -> 4236 (-0.31%); split: -0.35%, +0.05%
VALU: 50049 -> 45901 (-8.29%)
SALU: 8948 -> 8818 (-1.45%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33674>
2025-02-24 16:34:53 +00:00
Mike Blumenkrantz
e63acdd2b7 zink: force cached mem for streaming uploads
it was previously possible to hit a path where an idle buffer with
non-cached mem could be directly mapped for streaming data uploads,
which kills perf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33678>
2025-02-24 15:55:21 +00:00
Job Noorman
7210054db8 ir3: reformat after previous commit
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33701>
2025-02-24 15:27:12 +00:00
Job Noorman
2fedc82c0c ir3: don't use deprecated NIR_PASS_V anymore
Also replace OPT_V with OPT while we're at it.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33701>
2025-02-24 15:27:12 +00:00
Job Noorman
0f69ada3b5 ir3/lower_tess: make all NIR passes report progress
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33701>
2025-02-24 15:27:11 +00:00
Thomas H.P. Andersen
7276191d59 nvk: use a valid allocation scope
VK_OBJECT_TYPE_DESCRIPTOR_POOL is used in vk_zalloc2 as allocation scope.
This should probably have been object scope.

Fixes: 607686f6bf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33697>
2025-02-24 14:44:33 +00:00
Rhys Perry
2a3dce1b59 ac/nir: fix tess factor optimization when workgroup barriers are reduced
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b49eab68a8 ("ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12632
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33645>
2025-02-24 14:07:40 +00:00
Valentine Burley
5a510aede7 anv/ci: Increase parallelism of zink-anv-adl
With some of the jobs migrated to the new brask and nissa devices, we can
increase zink-on-anv coverage on brya. Reduce the fraction of Piglit
tests and introduce fractional GLESCTS testing.

Also increase the parallelism of the zink nightly job, but lower its
FDO_CI_CONCURRENT variable to avoid OOMkills. To accommodate this,
decrease the parallelism of the anv-adl-full job.

Additionally, drop redundant HWCI_START_WESTON from full runs that
inherit the variable from their pre-merge jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
318bc2ef03 intel/ci: Migrate intel-adl-cl and intel-adl-skqp to nissa
Move the piglit CL and SKQP jobs to the new nissa devices. Nissa is
significantly slower than brya, so increase parallelism and timeout
accordingly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
cb9875ce1b anv/ci: Migrate anv-adl-angle job to brask
Move the ANGLE job to the new brask devices. Brask is significantly
slower than brya, so increase the parallelism accordingly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
2a3c373824 intel/ci: Add brask and nissa
Add two new device types in LAVA, brask and nissa. These ADL devices will
be used to offload some of the jobs from brya.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
85f9088d13 intel/ci: Honor device-specific FDO_CI_CONCURRENT variables
FDO_CI_CONCURRENT was getting overwritten by .intel-common-test
inheriting FDO_CI_CONCURRENT: 6 from .lava-test, so change the order of
these definitions to fix that.

This change unfortunantely means that GPU_VERSION has to be overwritten
in some cases.

Additionally, drop redundant .anv-test where .anv-angle-test is used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Valentine Burley
38fc58107a anv/ci: Update expectations from latest nightly
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33671>
2025-02-24 13:36:10 +00:00
Daniel Schürmann
ea765162c3 aco/ssa_elimination: create a single parallelcopy instruction for linear and logical phis
Totals from 6651 (8.38% of 79377) affected shaders: (Navi31)

Instrs: 14722896 -> 14722290 (-0.00%); split: -0.01%, +0.00%
CodeSize: 77992072 -> 77989284 (-0.00%); split: -0.01%, +0.00%
Latency: 160542885 -> 160541215 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 24543177 -> 24542710 (-0.00%); split: -0.00%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
0e98388614 aco/ssa_elimination: refactor scratch_sgpr handling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
302678df91 aco/ssa_elimination: insert parallelcopies for p_phi immediately before branch
Totals from 2499 (3.15% of 79377) affected shaders: (Navi31)
Instrs: 6011729 -> 6011761 (+0.00%); split: -0.00%, +0.00%
CodeSize: 31573216 -> 31574236 (+0.00%); split: -0.00%, +0.00%
Latency: 83364734 -> 83365781 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 13545643 -> 13545783 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
794c2b7e2f aco/lower_branches: allow other instructions after s_andn2 in break blocks
We are about to insert parallelcopies from phis there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
115ff5f95b aco/insert_exec_mask: don't restore exec in continue_or_break blocks
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Daniel Schürmann
7f7c1d463a aco/insert_exec_mask: Don't immediately set exec to zero in break/continue blocks
Instead, only indicate that exec should be zero and do
so in the successive helper block. This allows to insert
the parallelcopies from logical phis directly before the
branch in break and continue blocks.

Totals from 56 (0.07% of 79377) affected shaders: (Navi31)
Latency: 2472367 -> 2472422 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 253053 -> 253055 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
2025-02-24 13:11:20 +00:00
Karol Herbst
4975ac79ef rusticl/util: add missing comment and assert to char_arr_to_cstr
I forgot to push those changes...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33703>
2025-02-24 12:23:21 +00:00
Lionel Landwerlin
e4f31b8744 intel/ds: rework RT tracepoints
That way we can identify single dispatch within each step.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33684>
2025-02-24 08:08:02 +00:00
Lionel Landwerlin
31c5c386d1 u_trace: pass tracepoint flags to the read_timestamp callback
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33684>
2025-02-24 08:08:02 +00:00
Yiwei Zhang
43c3270c26 venus: temporarily disable 1.4 support
Will implement VK_EXT_host_image_copy via custom venus protocol support
and then re-enable 1.4.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33698>
2025-02-24 00:11:55 +00:00
Yiwei Zhang
ac13146092 venus: limit second queue emulation to android framework
A proper emulation of a second queue requires handling of
wait-before-signal behavior of timeline semaphore. It's doable in Venus
but not that much useful since 1.4 requires a second transfer queue
family if not implementing hostImageCopy. So this change has limited
the second queue emulation as a workaround for android framework on
Android 14 and above.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33698>
2025-02-24 00:11:55 +00:00
Karol Herbst
0fd70ee9de rusticl/platform: advertise all extensions supported by all devices
There is a spec issue about this to clarify this behavior, but the current
wording can be interpreted that the platform always lists all extensions
supported by all drivers.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33667>
2025-02-23 19:39:58 +00:00
Mi, Yanfeng
ed77f67e44 anv: add emulated 64bit integer storage support
By turning a R64 into R32G32

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:51 +00:00
Mi, Yanfeng
723e52cbcc anv: Support putting image base address and image params in surface state
images params including pitch, width, height and tile mode
for image address caculation

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:51 +00:00
Lionel Landwerlin
0a42afb262 anv: add a is_sparse for image format support checks
We'll want to disable some support for software detiled accesses on
sparse 64bit images because we'll pick a single optimized tiling for
shader detiling which is not going to be block shape compliant for
sparse resources.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
5c7397c751 anv: add mapping for VBO formats in format mapping
We're about to introduce R64_(S|U)INT support for some images. This
will use a different HW format than what we want for VBOs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
eda9422cfc anv: rename compressed format emulation helpers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
ce7208c3ee brw: add support for texel address lowering
The expectations are :
  - no MSAA images
  - a single tiling mode is used when not linear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
b25e050ec7 brw: add support for 64bit storage images load/store
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
3bd4c5a166 brw: include UGM fence when TGM + lowered image->global
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
23e14ac41e nir: track lowered image intrinsics to globals
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
38fa9e144c isl: add a helper to report what dimensions a tiling supports
For shader detiling, it's useful to know if we avoid bothering trying
to detile a 1D image.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
cfa1d40be5 isl: add support for R64 storage image lowering
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
ba03e6734c isl: select a tiling for shader detiling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
8e1cad8d8f isl: centralize supported tilings in a single function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
f22f53cfe8 isl: add usage for software detiling
Need to ensure miptails are not used in that case.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Lionel Landwerlin
50176b83e9 isl: report tiling address swizzles
This will be useful for software detiling.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32676>
2025-02-23 15:16:50 +00:00
Eric Engestrom
06391759f0 lavapipe/ci: add vkd3d job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33693>
2025-02-23 14:55:27 +00:00
Yiwei Zhang
ed4e2fac86 venus: fix sample location info validity
Only look for sample location info when MSAA state is valid.

Test: dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics

Fixes: ff64092ff3 ("venus: support VK_EXT_sample_locations")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33696>
2025-02-22 22:29:43 -08:00
Eric Engestrom
dd7bac4e31 vtn_bindgen2: keep the printf blob local to avoid LTO issues
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33442>
2025-02-23 01:25:23 +00:00
Yiwei Zhang
33bb47388f venus: fix 2 entry points from maint6
This is surprisingly not caught by maint6 tests or the entire
binding_model group.

Fixes: 0fa2758103a ("venus: support VK_KHR_maintenance6")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33695>
2025-02-22 16:48:17 -08:00
Eric Engestrom
8364782222 docs: update gitlab docs urls
GitLab finally dropped the split between "docs for paid users" and
"docs for free users", and in the process re-shuffled some things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33694>
2025-02-23 00:31:59 +01:00
Yiwei Zhang
a9da750388 venus: advertise 1.4 support
This change:
- adds the core 1.4 support
- handles partially promoted dynamicRenderingLocalRead feature
- properly scrubs host copy related features and properties if needed

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
e651dc0b2b venus: deprecate a few useless micros
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
b282e49d67 venus: update second queue emulation for 1.4 requirement
Venus picks the option to always advertise an additional queue that
supports transfer.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
d26643c6c2 venus: support VK_KHR_maintenance6
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
e46bb404bd venus: a few tiny naming fixes
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Yiwei Zhang
015dd37931 venus: support VK_KHR_dynamic_rendering_local_read
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33690>
2025-02-22 21:14:47 +00:00
Mike Blumenkrantz
ecb107deef egl/x11: delete some dri2 remnants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33669>
2025-02-22 20:38:24 +00:00
Eric Engestrom
a66e227748 ci/build: lower the delay to start build-only jobs
What we need is a way to tell GitLab "queue `build-only` jobs after
`build-for-tests` jobs have started", to make sure that `build-only`
jobs don't start before `build-for-tests` jobs and thus delays test jobs
and the overall pipeline.

The best I had found was "queue `build-only` jobs after *all* the
`build-for-tests` jobs have finished", but this introduces a larger
delay than we want, and causes `build-only` jobs to often be the last
ones to finish in a pipeline, after test jobs that respect the 15min
runtime limit.

Instead, we can tell GitLab "queue `build-only` jobs after the
`build-for-tests` jobs have been queued for X minutes", which is closer
to what we want, and in particular this ensures the correct order of
*starting* jobs as long as the CI is not overwhelmed and doesn't manage
to actually start a queued `build-for-tests` job within 5min, in which
case I'd argue we don't care about job order anymore because we have
bigger problems anyway and likely everything's going to timeout.

This also gets rid of the hard-to-maintain `.build-for-tests-jobs` list
of `needs:`, which also needed to be manually merged in half the jobs.

The trade-off is that we need to make a (shallow) copy of the
`.container+build-rules` list, that replaces all the `when: on_success`
with `when: delayed` + `start_in: 5 minutes`. This means that we'll need
to make sure the two lists of conditions remain identical, but this
seems more manageable; nevertheless, I added a comment to remind us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
38cf205f67 ci/build: add explicit build-for-tests or build-only to all jobs
This prevents mistakes when moving one job and not realising another job
was extending from it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
c20984a5ad ci/build: split meson-build into build-for-tests and build-only
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
d0d28eaa0c ci/build: move .use-debian/x86_64_build out of the generic .meson-build and into the debian/x86_64 jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
b29ba5637e ci/build: remove a couple of unnecessary "override needs: to the same value"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Eric Engestrom
2c79c1be4a ci: move shader-db test job from build jobs yaml to test jobs yaml
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33564>
2025-02-22 19:18:08 +00:00
Jose Maria Casanova Crespo
b474fbe129 v3dv/ci: add new flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33689>
2025-02-22 12:48:47 +00:00
Eric Engestrom
64e68b1ac0 ci/alpine: control wayland & wayland-protocols versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33659>
2025-02-22 09:58:49 +00:00
Eric Engestrom
3695a6d3fe ci/alpine: pin the release to avoid random unexpected changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33659>
2025-02-22 09:58:49 +00:00
Lionel Landwerlin
84f96a0199 anv: switch to use brw's prog_data source_hash
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
2025-02-22 08:30:22 +00:00
Lionel Landwerlin
da098b76a4 brw: store source_hash in prog_data
This is a debug feature that we kind of manage in the driver atm. It's
better that we move this completely to the compiler and can load it
from the cache.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
2025-02-22 08:30:22 +00:00
Lionel Landwerlin
2f156ddb50 brw: factor out base prog_data setting
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
2025-02-22 08:30:22 +00:00
Timur Kristóf
754752865a nvk: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
2540e45e1a nak: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
d74d316f60 glsl: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
2ebb3c3e37 hk: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:39 +01:00
Timur Kristóf
91d9dfe123 vulkan/runtime: Don't use deprecated NIR_PASS_V macro.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:23 +01:00
Timur Kristóf
093e68b518 compiler/clc: Stop using deprecated NIR_PASS_V macro.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:23 +01:00
Timur Kristóf
ce8317194c radv: Don't use deprecated NIR_PASS_V macro for AMD common NIR passes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
b8797180e9 ac/nir/ngg: Add bool return value to ac_nir_lower_ngg_mesh.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
cd01e17e81 ac/nir/ngg: Add bool return value to ac_nir_lower_ngg_gs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
25adf353cc ac/nir/ngg: Add bool return value to ac_nir_lower_ngg_nogs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
fad58a99e8 ac/nir: Add bool return value to ac_nir_lower_legacy_gs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
d8ad068968 ac/nir: Add bool return value to ac_nir_lower_legacy_vs.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
407aedeff8 ac/nir: Add bool return value to ac_nir_lower_mesh_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
9e7609b0ff ac/nir: Add bool return value to ac_nir_lower_task_outputs_to_mem.
And fixup its NIR counterparts too.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
65645f6841 ac/nir: Add bool return value to ac_nir_lower_gs_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
c593110f5f ac/nir: Add bool return value to ac_nir_lower_es_outputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
6e9ede61c4 ac/nir: Add bool return value to ac_nir_lower_tes_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
6e78aef0e9 ac/nir: Add bool return value to ac_nir_lower_hs_outputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
bb3f33014d ac/nir: Add bool return value to ac_nir_lower_hs_inputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
0438cc0afb ac/nir: Add bool return value to ac_nir_lower_ls_outputs_to_mem.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:17 +01:00
Timur Kristóf
65902ded29 radv: Add bool return value to ray tracing NIR lowerings.
And don't use them with the deprecated NIR_PASS_V macro anymore.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
bf1a968a11 radv: Add bool return value to radv_nir_apply_pipeline_layout.
And stop using it with the deprecated NIR_PASS_V macro.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
e3e2ba4eb5 radv: Add bool return value to radv_nir_lower_abi.
And stop using it with the deprecated NIR_PASS_V macro.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
7147559156 radv: Stop using deprecated NIR_PASS_V with core NIR passes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
65139305e2 nir: Don't use deprecated NIR_PASS_V macro anymore.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
7222bb397d nir: Add bool return value to nir_fixup_deref_types.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
2fa7711a2b nir: Add bool return value to nir_fixup_deref_modes.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Timur Kristóf
4f744998ef nir: Add comment to indicate that NIR_PASS_V is deprecated.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33609>
2025-02-22 08:54:16 +01:00
Alyssa Rosenzweig
e34443205f asahi: support sparse in virtgpu
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
175b3bd4b1 agx: handle sparse buffer images
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
3f1082877a hk: ban sparse RGB32
dumb corner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
583978a8ee agx: handle rgb32 residency queries
so silly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
839b01bd2d hk: fake min/max filtering for proton
this gets us to fl12_0.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
383a3065b8 asahi: fix null deref in error path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
580aff179c libagx: use 64-bit multiply for image atomic calculation
lets use the hw address mode. oops!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
5a122768b7 hk: do not clamp txf for copy shaders
save a few instrs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
0a43be6d4f agx: fix botched address fuses
identified in
dEQP-VK.robustness.robustness2.push.notemplate.rgba32f.unroll.nonvolatile.sampled_image.no_fmt_qual.img.samples_1.2d.comp.
owwie.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
b589285468 agx: assert shift bounds
would've saved me a lot of dbg trouble..

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
de424846f0 asahi: drop trivial depends
meson can infer since these are inputs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
5d1f69e250 asahi,libagx,hk: don't set custom_target names
Per meson docs:

   This posarg is optional since 0.60.0. It defaults to the basename of the first output.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
7f5271e42d hk: perf debug sparse binding
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
e84c5b3a07 libagx: vectorize tess level loads
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
5046dd48b6 libagx: fix ia_primitives with tessellation
fixes new CTS

dEQP-VK.query_pool.statistics_query*input_assembly_primitives.*_patch_list_*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
2eb5040ca8 hk: pass cmdbuf to perf_debug
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
debdb26167 hk: accelerate buffer copies with CL
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
be18473d33 hk: assert more
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
dc111c128c hk: pass cmdbuf, not control stream, into precomp dispatch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
29d80221db hk: ensure space with the dispatch
cleaner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
ed7d11e389 agx: fix uniform atomic opts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
6c3d7a2821 asahi: drop cargo culted disk cache disable
we don't have a disk cache to disable with clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:29 +00:00
Alyssa Rosenzweig
678134add5 hk: implement sparse
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3e7297a297 hk: ban sparse host-image-copy
WTF?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
739807944d agx: implement sparse residency queries
hw matches NIR well - just an extra destination on the texture instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
93bccc0914 asahi: support unbinding VA in agx_va_free
useful for more sparse-y things.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c02235124f asahi: assert page alignment in vm_bind
kernel should check but it's easier to debug on the userspace side.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
d0a7bff906 ail: unit test ail_get_twiddled_block_B
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
b842a7732d ail: add ail_get_twiddled_block_B helper
this is useful for sparse updates.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
78ca483940 ail: add ail_bytes_to_pages helper
this happens a bunch with sparse

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
56cd20ddea ail: expose ail_get_max_tile_size
useful for sparse block size calculation

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
8e20875651 ail: extract a blocksize helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
aebecb2886 ail: move helpers to layout.h for sharing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
7d27fd84d5 ail: report miptail stride
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
2cac211946 ail: report mip_tail_first_lod for sparse
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
09cd1bf000 ail: unit test sparse_table_size_B
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
bc448fe88b ail: model sparse page tables
see the docs previously added for the aux image layout described here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
ca60908bf1 asahi: add sparse block XML
this xml (and the sparse page table structure itself) was r/e'd blackbox since
that was easier than writing tests, lol. but it seems to work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c7f7496da1 asahi: identify image mode enum
this controls sparse.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
2cc88430f1 asahi: rename Null layout
this isn't a Null layout only, it's also used with sparse. update the name to
reduce confusion. Unsure if we have a use case yet but maybe as an optimization
later?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
102bd7127b docs/asahi: describe sparse page tables
some things are better in prose than code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
5acf398b5a docs/asahi: add some section headers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
dfebd94259 docs/asahi: update varying info
These docs are pretty old and we've learned a lot since then.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
7b717805bf hk: enable bufferDeviceAddressCaptureReplay
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
f50edbd696 hk: fix buffer binding
clamp sizes to avoid kernel complaints, and check the return.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
1114fbcdb7 hk: unbind VAs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
1e043ed67d hk: unstub UnmapMemory2KHR
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
dc3669a837 hk: reject non-2D modifiers
via nvk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
db7cb681bf asahi: add more alignment asserts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
bffb90f42c libagx: use assert instead of 0xdeadbeef writes
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
479d2ab53e libagx: fix wraparound issue with robust draw kernel
fixes dEQP-VK.robustness.index_access.draw_multi_indexed_2 with hard faults.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
bec073d3ca libagx: fix subgroup id confusion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
4949ae3920 asahi: switch tib lower to intrinsic pass
fixes metadata issue.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
e203d04f43 asahi: use NIR_PASS to validate more
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
290b8da8b6 asahi: perf debug indirect tess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3060b471b5 libagx: add missing null pointer check
fixes KHR-GL46.pipeline_statistics_query_tests_ARB.functional_tess_queries
with hard fault

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c7a8200dcd hk: don't allocate zero sink
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
f0d680437f hk: use zero sink for null index buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
eff6b884cb asahi: use zero sink for vbuf
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
c14df405b9 libagx: use zero page
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
04eb91c68b asahi: bind zero-page
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3adbf53ed6 hk: do not incorrectly offset host-image-copy sources
the source is indexed from layer 0, the dest image is indexed from whatever the
base layer is. fixes new CTS dEQP-VK.image.host_image_copy.array.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
4559cdb94b hk: fix increment CS invs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Janne Grunau
27d27e08ea hk: Use rowPitch from VkImageDrmFormatModifierExplicitCreateInfoEXT
Imported linear images may have an arbitrary row pitch. As long as it is
aligned to 16 agx can support. Initialize `.linear_stride_B` from the
supplied parameter and let ail verify it.

Fixes gtk dmabuf based tests with a pitch aligned to 256.

Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
5d9e600ce9 hk: implement calibrated timestamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Janne Grunau
9c704dd759 hk: Replace alloca with malloc in queue_submit
`command_count` is under control of the vulkan application and can
become quite large. At a command count around 30000 the size of the
alloca() allocated buffers exceeds the default stack size of 16MB.

Fixes fixes segfaults in 'gtk:compare vulkan lots-of-offscreens-nogl*'
gtk 4 test cases which end up with a `command_count` around 32768.

Fixes: https://gitlab.freedesktop.org/asahi/mesa/-/issues/47
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
3e9f70570a asahi: fix cull distance with GS
no, I don't know how this worked before.

fixes KHR-GL46.cull_distance.functional with nir_opt_varyings changes but
this seemed to be passing just by luck otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
cc04a65828 asahi: fix libwrap.dylib
libwrap.dylib is helpful to trace control streams on macOS. When it was
originally implemented, we..

* supported macOS in our OpenGL driver and needed to actually exercise these
  interfaces
* didn't have Linux support or hypervisor support or anything so needed the
  traces to be utterly thorough
* only had a single macOS version to worry about

The landscape today is very different

* no macOS support in our driver stack
* we can trace registers via the hypervisor - libwrap.dylib is no longer
  "correctness" bearing, it's just a convenience tool
* what counts is the hardware side - tracing all the macOS software structs is
  not actually useful, the hypervisor is the right place to grab control regs
* piles of macOS versions, this code only ever worked properly on 11.x and 12.x,
  but with m4 r/e coming up soon we need a lot more versions working.

So... we keep around libwrap.dylib, but slim it down to only decode the bare
minimum of macOS versioned structures, just enough to grab the control stream
pointer and dump that. This is a loss of functionality around CRs (but we have the
hypervisor as a much better way to grab CRs). In exchange it makes the code much
more manageable and less likely to break every 6 months.

So in exchange for all this deletion we also get things working again, this time
on 13.x. But porting back to 12.x or 11.x would be a very small diffstat given
the reduced focus of the new code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Alyssa Rosenzweig
07a2abd14d asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33682>
2025-02-22 02:24:28 +00:00
Paulo Zanoni
1d23cf192b brw: don't mark instructions read from text assembly as compacted
I dumped assembly generated by our driver with INTEL_DEBUG=shaders,
copied and pasted it into a lua file, tried to run it with
src/intel/executor, but the disassembler started telling me some
instructions were invalid.

This happened because we print the "compacted" flag in our assembly
text, so when brw_gram.y parses our assembly flag, it sees the
"compacted" flag and sets it to the instruction by calling
add_instruction_option(). But the executor tool never sets the
BRW_ASSEMBLE_COMPACT flag when it calls brw_assemble(), so when
brw_assemble() calls dump_assembly(), which calls brw_disassbemble(),
the disassembler gets confused and prints misinterpreted instructions
and calls them invalid.

It is not the job of brw_gram.y (our text assembly parser) to mark
instructions as compacted.  Whatever is later assembling the
instruction is the entity that should decide if the instructions are
compacted or not. So in this patch we just ignore this flag.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33614>
2025-02-22 00:38:53 +00:00
Dave Airlie
c49423ca2c vulkan/wsi/x11: don't use update_region for damage if not created
If we don't have a region in the X no MIT-SHM case don't go using
the damage call set region.

Fixes: bbdf7e45b1 ("wsi/x11: Hook up KHR_incremental_present")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33592>
2025-02-21 21:41:58 +00:00
Valentine Burley
b331713f20 ci: Use new kernel that supports more Mediatek devices
The only change since the previous kernel is that the new one includes
the device tree blobs for the mt8195-cherry-tomato-r2 and
mt8186-corsola-steelix-sku131072 devices.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:57 +00:00
Valentine Burley
c45d7dffca intel/ci: Update GuC firmware for ADL-S and ADL-N
Certain ADL devices, like nissa, use the tgl_guc_70.bin firmware.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:56 +00:00
Valentine Burley
eb5bd3bee2 ci: Don't download the kernel image in lava_build.sh
The kernel+rootfs jobs previously downloaded the prebuilt kernel iamge,
but this was unnecessary as LAVA doesn't use them here, and the images
were never uploaded to S3. LAVA acquires the kernel in lava_submit.sh,
and baremetal downloads the required images and dtbs in baremetal_build.sh.

The kernel modules are still required for some devices.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:56 +00:00
Valentine Burley
5b65bbf72c ci: Simplify downloading kernel for crosvm
Directly download the kernel instead of using the
download-prebuilt-kernel.sh script.
Save the kernel to /kernel for clarity, replacing the previous
/lava-files directory.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33606>
2025-02-21 14:52:56 +00:00
Mike Blumenkrantz
d979cd8d9d zink: support cl_gl_sharing if dmabuf is supported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Mike Blumenkrantz
93cd4ae0c0 zink: verify that adding a dmabuf bind actually chooses a modifier
this at least provides some checking to catch cases where something
stupid happens and it does a fallback to linear

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Mike Blumenkrantz
5176370694 zink: handle buffer import/export
just noping out of some image codepaths

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Mike Blumenkrantz
f7002369fa zink: wait on tc fence before checking for fd semaphore
this forces sync with pending flushes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
2025-02-21 14:18:44 +00:00
Daniel Schürmann
df2697c9ab aco/scheduler: remove unused include of unordered_set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
93872270f0 aco/scheduler: keep track of RegisterDemand at DownwardsCursor::insert_idx{_clause}
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
f58654e98f aco/scheduler: keep track of RegisterDemand at UpwardsCursor::insert_idx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
52253da783 aco: unify get_addr_sgpr_from_waves() and get_addr_vgpr_from_waves() into one function
which returns the limit as RegisterDemand.

Also remove the unused get_extra_sgprs() from aco_ir.h.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
6ea9443726 aco/scheduler: stop rounding down the target number of waves on GFX10+
This way, it can make use of uneven wave numbers.

Totals from 4078 (5.14% of 79395) affected shaders: (Navi21)
MaxWaves: 58715 -> 65460 (+11.49%); split: +11.49%, -0.01%
Instrs: 5033684 -> 5048244 (+0.29%); split: -0.09%, +0.38%
CodeSize: 26833884 -> 26898780 (+0.24%); split: -0.07%, +0.32%
VGPRs: 302360 -> 265312 (-12.25%); split: -12.26%, +0.01%
Latency: 34636448 -> 36044242 (+4.06%); split: -0.08%, +4.14%
InvThroughput: 7999403 -> 7662697 (-4.21%); split: -4.55%, +0.34%
VClause: 105403 -> 111996 (+6.26%); split: -0.40%, +6.66%
SClause: 132996 -> 133460 (+0.35%); split: -0.81%, +1.16%
Copies: 297036 -> 308122 (+3.73%); split: -0.64%, +4.37%
Branches: 89376 -> 89390 (+0.02%); split: -0.00%, +0.02%
VALU: 3477621 -> 3488510 (+0.31%); split: -0.05%, +0.36%
SALU: 484211 -> 484191 (-0.00%); split: -0.08%, +0.08%

Totals from 1840 (2.32% of 79395) affected shaders: (Navi31)

MaxWaves: 30714 -> 34182 (+11.29%)
Instrs: 3102955 -> 3131001 (+0.90%); split: -0.05%, +0.95%
CodeSize: 16160564 -> 16273100 (+0.70%); split: -0.04%, +0.74%
VGPRs: 174540 -> 150600 (-13.72%)
Latency: 23521914 -> 24515055 (+4.22%); split: -0.07%, +4.29%
InvThroughput: 4373397 -> 4202912 (-3.90%); split: -4.40%, +0.50%
VClause: 59087 -> 64091 (+8.47%); split: -0.24%, +8.71%
SClause: 74844 -> 75366 (+0.70%); split: -0.53%, +1.22%
Copies: 184396 -> 197747 (+7.24%); split: -0.25%, +7.49%
Branches: 46015 -> 46028 (+0.03%); split: -0.00%, +0.03%
VALU: 1929286 -> 1942709 (+0.70%); split: -0.02%, +0.71%
SALU: 216126 -> 215983 (-0.07%); split: -0.18%, +0.12%
VOPD: 1216 -> 1217 (+0.08%); split: +1.40%, -1.32%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:41 +00:00
Daniel Schürmann
676b39d31f aco/scheduler: always respect min_waves on GFX10+
It could theoretically happen that for large workgroups,
the scheduler used more registers than allowed.

No fossil changes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
2025-02-21 13:49:40 +00:00
Collabora's Gfx CI Team
9befbf54a6 Uprev Piglit to 04d901e49de6b650f9dceaf73220371273d87f73
fc8179d319...04d901e49d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33457>
2025-02-21 11:53:36 +00:00
Danylo Piliaiev
763ddd0fd3 nir/nir_lower_multiview: Don't assert if load_deref doesn't have var
If deref chain has nir_deref_type_cast nir_intrinsic_get_var will
return null, which is valid for e.g. shader inputs, since the pass
only care about outputs.

NIR excerpt that caused issues:

```
    32x3    %6 = deref_cast (block *)%5 (ubo block)  (ptr_stride=0, align_mul=0, align_offset=0)
    32x3    %7 = deref_struct &%6->field0 (ubo vec4[4])  // &((block *)%5)->field0
    32      %8 = load_const (0x00000001)
    32x3    %9 = deref_array &(*%7)[1] (ubo vec4)  // &((block *)%5)->field0[1]
    32x4   %10 = @load_deref (%9) (access=none)
```

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33647>
2025-02-21 11:09:22 +00:00
Daniel Stone
4f11b8d950 ci/zink: Expand flake definition on radv
We've seen a few variants of this now, so just mark them all as flaky.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33546>
2025-02-21 09:22:03 +00:00
Erik Faye-Lund
fde6aeb886 mesa/main: wire up glapi bits for EXT_multi_draw_indirect
Turns out we were missing the glapi bits, making it impossible to use get
the function pointers for this extension. Whoops?!

[daniels: Squashed in a618 SkQP fails, presumably caused by these not
          being skipped anymore.]

Fixes: 9f5af68995 ("mesa/main: expose `EXT_multi_draw_indirect`")
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33546>
2025-02-21 09:22:03 +00:00
Emma Anholt
2f57cf0323 egl: Retire NV_post_sub_buffer support.
It's never been ported to DRI3, but nobody seems to care.  Since DRI2 is
untested at this point, just drop the code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Emma Anholt
f6aa27a294 egl: Retire NOK_swap_region support.
It's never been ported to DRI3, but nobody seems to care.  Since DRI2 is
untested at this point, just drop the code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Emma Anholt
58e73e792f egl: Apply autopep8.
My editor does this on save, so let's just apply it to EGL's python for
consistency.  The only exception is that the genCommon import needs the
sys.path.insert, so that part of autopep8 was reverted.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Emma Anholt
34fe896715 docs: Drop some weird unhelpful text about DRI2.
Both instructions for building were the same, and there's not much sense
in calling out just xcb-dri2 out of all the deps there are.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33517>
2025-02-21 02:50:56 +00:00
Lorenzo Rossi
a3ddb223e2 nvk, nak: Implement shaderSharedInt64Atomics
Current nvidia devices miss support for 64-bit arithmetic atomics, we
replace them with compare-and-swap loops using nir_lower_atomics.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10330
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33572>
2025-02-21 00:33:17 +00:00
Lorenzo Rossi
26079c1a93 nir: support shared atomics in nir_lower_atomics
Add support to rewrite shared atomics into compare-and-swap loops,
previously the nir_lower_atomics pass only supported global and ssbo
atomics.

Only freedreno irc3 reuses nir_lower_atomics, this change does not
impact their usage since they do not support shared atomics.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33572>
2025-02-21 00:33:16 +00:00
Ian Romanick
15544ed858 nir/algebraic: Undistribute b2i from logic-ops
shader-db:
All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16973309 -> 16973173 (<.01%)
instructions in affected programs: 13780 -> 13644 (-0.99%)
helped: 31 / HURT: 0

total cycles in shared programs: 915620550 -> 915618604 (<.01%)
cycles in affected programs: 185962 -> 184016 (-1.05%)
helped: 30 / HURT: 1

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209748003 -> 209745278 (-0.00%)
Cycle count: 30514920400 -> 30514716506 (-0.00%); split: -0.00%, +0.00%
Max live registers: 65477183 -> 65477584 (+0.00%)
Non SSA regs after NIR: 237334710 -> 237333632 (-0.00%)

Totals from 1257 (0.18% of 706651) affected shaders:
Instrs: 693039 -> 690314 (-0.39%)
Cycle count: 39792504 -> 39588610 (-0.51%); split: -0.97%, +0.46%
Max live registers: 194170 -> 194571 (+0.21%)
Non SSA regs after NIR: 821978 -> 820900 (-0.13%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Ian Romanick
a48a044cf6 nir/algebraic: Simplify equality comparisons of b2T with 1 or 0
Adding the b2i(a) == 1 and b2i(a) != 1 patterns also helps prevent
regressions when spurious negations are removed from integer equality
comparisons, as is done in !33498.

v2: Make all variables part of the iteration instead of calculating some
of them. Suggested by Alyssa.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16973331 -> 16973309 (<.01%)
instructions in affected programs: 266 -> 244 (-8.27%)
helped: 2 / HURT: 0

total cycles in shared programs: 915620774 -> 915620550 (<.01%)
cycles in affected programs: 4360 -> 4136 (-5.14%)
helped: 2 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209748011 -> 209748003 (-0.00%)
Cycle count: 30514920286 -> 30514920400 (+0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 237334726 -> 237334710 (-0.00%)

Totals from 8 (0.00% of 706651) affected shaders:
Instrs: 16956 -> 16948 (-0.05%)
Cycle count: 261052 -> 261166 (+0.04%); split: -0.92%, +0.96%
Non SSA regs after NIR: 20000 -> 19984 (-0.08%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Ian Romanick
3f39d8f4ff nir/algebraic: Optimize zero comparisons of umax or umin
I observered some of the existing patterns stopped being applied after
some of the ult-to-ieq optimizations in !33498. It turns out that these
patterns occur even without those changes.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16973339 -> 16973331 (<.01%)
instructions in affected programs: 7977 -> 7969 (-0.10%)
helped: 2 / HURT: 0

total cycles in shared programs: 915620938 -> 915620774 (<.01%)
cycles in affected programs: 136022 -> 135858 (-0.12%)
helped: 2 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 209748173 -> 209748011 (-0.00%); split: -0.00%, +0.00%
Cycle count: 30514361348 -> 30514920286 (+0.00%); split: -0.00%, +0.00%
Spill count: 511813 -> 511808 (-0.00%)
Fill count: 622537 -> 622533 (-0.00%)
Max live registers: 65477033 -> 65477183 (+0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 237334728 -> 237334726 (-0.00%); split: -0.00%, +0.00%

Totals from 26 (0.00% of 706651) affected shaders:
Instrs: 332073 -> 331911 (-0.05%); split: -0.05%, +0.00%
Cycle count: 959758560 -> 960317498 (+0.06%); split: -0.03%, +0.09%
Spill count: 10293 -> 10288 (-0.05%)
Fill count: 23784 -> 23780 (-0.02%)
Max live registers: 9682 -> 9832 (+1.55%); split: -0.08%, +1.63%
Non SSA regs after NIR: 232135 -> 232133 (-0.00%); split: -0.03%, +0.03%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 233538532 -> 233536113 (-0.00%); split: -0.00%, +0.00%
Cycle count: 24428142259 -> 24426705655 (-0.01%); split: -0.01%, +0.00%
Spill count: 513128 -> 512923 (-0.04%)
Fill count: 557329 -> 557108 (-0.04%)
Max live registers: 42129806 -> 42129881 (+0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 256711720 -> 256711718 (-0.00%); split: -0.00%, +0.00%

Totals from 26 (0.00% of 805759) affected shaders:
Instrs: 325629 -> 323210 (-0.74%); split: -0.74%, +0.00%
Cycle count: 893896782 -> 892460178 (-0.16%); split: -0.21%, +0.05%
Spill count: 10467 -> 10262 (-1.96%)
Fill count: 24291 -> 24070 (-0.91%)
Max live registers: 4946 -> 5021 (+1.52%); split: -0.08%, +1.60%
Non SSA regs after NIR: 232980 -> 232978 (-0.00%); split: -0.03%, +0.03%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 237289818 -> 237289714 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22959586058 -> 22960049302 (+0.00%); split: -0.00%, +0.00%
Max live registers: 42182257 -> 42182337 (+0.00%)
Non SSA regs after NIR: 255579974 -> 255579970 (-0.00%); split: -0.00%, +0.00%

Totals from 23 (0.00% of 802019) affected shaders:
Instrs: 27051 -> 26947 (-0.38%); split: -0.39%, +0.01%
Cycle count: 10545917 -> 11009161 (+4.39%); split: -0.09%, +4.49%
Max live registers: 2198 -> 2278 (+3.64%)
Non SSA regs after NIR: 31741 -> 31737 (-0.01%); split: -0.20%, +0.19%

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Ian Romanick
4311121e73 nir/algebraic: More (a == 0 || a == 1 || ...) patterns
At least some Total War: Warhammer3 vertex shaders associate the
comparisons differntly, so the existing patterns were not triggered.

No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209748654 -> 209748173 (-0.00%)
Cycle count: 30514333964 -> 30514361348 (+0.00%); split: -0.00%, +0.00%
Fill count: 622688 -> 622537 (-0.02%)
Max live registers: 65477039 -> 65477033 (-0.00%)
Non SSA regs after NIR: 237334768 -> 237334728 (-0.00%)

Totals from 512 (0.07% of 706651) affected shaders:
Instrs: 1000693 -> 1000212 (-0.05%)
Cycle count: 42174312 -> 42201696 (+0.06%); split: -0.15%, +0.21%
Fill count: 11456 -> 11305 (-1.32%)
Max live registers: 121599 -> 121593 (-0.00%)
Non SSA regs after NIR: 1253445 -> 1253405 (-0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33648>
2025-02-21 00:01:11 +00:00
Eric R. Smith
414dba9f5c panfrost: use an accessor function to read from bi_opcode_props
Use an accessor function to read opcode properties or to change the
opcode. This would allow for different instruction descriptions to
be used for different architectures. Not necessary now, but may
be useful groundwork.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29765>
2025-02-20 23:33:00 +00:00
Faith Ekstrand
651864151f zink: Use persistent semaphores for PIPE_FD_TYPE_SYNCOBJ
These are persistant objects that you can use to signal and wait over.
We need to import without VK_SEMAPHORE_IMPORT_TEMPORARY_BIT and we can't
throw away the Vulkan semaphore after each submit.

Fixes: 32597e116d ("zink: implement GL semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33549>
2025-02-20 23:09:00 +00:00
Faith Ekstrand
1ffa782227 zink: Use the correct array size for signal_values[]
When the size of the signals[] array was changed to 3, the
signal_values[] array was not updated accordingly.  If we have a
signal_semaphore and are presenting at the same time, this can lead to
an array overflow and the driver will read some random stack value as
the signal value.  This is causing chromium to lock up when running
WebGL.

Fixes: 7f56fd9655 ("zink: it's kopperin' time")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33549>
2025-02-20 23:09:00 +00:00
Casey Bowman
111faf2158 vulkan/screenshot-layer: Correct queueFamilyIndex source
From the Vulkan documentation, the queueFamilyIndex value will be
created with VkDeviceQueueCreateInfo. So let's avoid counting the
index value and just refer to the already-created value.

This will resolve crashes on some GPUs for various workloads.

v2: Needed to use GetDeviceQueue() in order to map the queueFamilyIndex
values. These values can be different when obtaining the queue used
for presentation, so we need to ensure we update the mapped
queueFamilyIndex value for the associated queue_data struct.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33487>
2025-02-20 22:36:44 +00:00
Georg Lehmann
67d03033e4 radv: remove separate discard peephole select
This allows removing control flow with a mix of alu and discard.

Foz-DB Navi21 (ignore throughput/latency because of single iteration loops):
Totals from 1251 (1.58% of 79377) affected shaders:
Instrs: 1459317 -> 1457751 (-0.11%); split: -0.14%, +0.04%
CodeSize: 8350856 -> 8352408 (+0.02%); split: -0.03%, +0.05%
VGPRs: 53056 -> 53328 (+0.51%)
SpillSGPRs: 66 -> 62 (-6.06%)
Latency: 19784315 -> 15649290 (-20.90%); split: -21.26%, +0.36%
InvThroughput: 4080229 -> 3122717 (-23.47%); split: -23.56%, +0.09%
VClause: 29293 -> 29294 (+0.00%); split: -0.01%, +0.01%
SClause: 56060 -> 55941 (-0.21%); split: -0.23%, +0.02%
Copies: 129794 -> 127880 (-1.47%); split: -1.51%, +0.04%
Branches: 52039 -> 51275 (-1.47%); split: -1.47%, +0.01%
PreSGPRs: 50221 -> 50024 (-0.39%); split: -0.64%, +0.25%
PreVGPRs: 44058 -> 44053 (-0.01%); split: -0.02%, +0.00%
VALU: 984915 -> 984993 (+0.01%); split: -0.01%, +0.02%
SALU: 177126 -> 177184 (+0.03%); split: -0.62%, +0.65%
SMEM: 79565 -> 79525 (-0.05%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:18 +00:00
Georg Lehmann
f26069fdd9 nir: replace nir_opt_conditional_discard with nir_opt_peephole_select
Foz-DB Navi21:
Totals from 118 (0.15% of 79377) affected shaders:
Instrs: 208001 -> 207355 (-0.31%); split: -0.33%, +0.01%
CodeSize: 1080428 -> 1078432 (-0.18%); split: -0.20%, +0.02%
SpillSGPRs: 202 -> 211 (+4.46%)
Latency: 1923508 -> 1919093 (-0.23%); split: -0.62%, +0.39%
InvThroughput: 407475 -> 407081 (-0.10%); split: -0.12%, +0.02%
SClause: 7050 -> 7033 (-0.24%); split: -0.31%, +0.07%
Copies: 12156 -> 11821 (-2.76%); split: -3.04%, +0.28%
PreSGPRs: 8198 -> 8331 (+1.62%); split: -0.02%, +1.65%
PreVGPRs: 7628 -> 7528 (-1.31%)
VALU: 155747 -> 155657 (-0.06%); split: -0.06%, +0.00%
SALU: 18295 -> 17782 (-2.80%); split: -2.98%, +0.18%
SMEM: 10521 -> 10519 (-0.02%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:17 +00:00
Georg Lehmann
8251a5b846 nir/peephole_select: don't completely ignore ifs with dont_flatten
Apps are misusing this for cases where the if-else are empty (except for phis)
or for conditional discard which will become relevant in the next commit.

Foz-DB Navi21:
Totals from 173 (0.22% of 79188) affected shaders:
Instrs: 1465214 -> 1464987 (-0.02%); split: -0.04%, +0.03%
CodeSize: 7960472 -> 7965188 (+0.06%); split: -0.01%, +0.07%
Latency: 10001176 -> 10012782 (+0.12%); split: -0.01%, +0.12%
InvThroughput: 2336017 -> 2338979 (+0.13%); split: -0.00%, +0.13%
Copies: 140105 -> 138225 (-1.34%)
Branches: 49746 -> 49732 (-0.03%)
VALU: 975632 -> 976322 (+0.07%); split: -0.01%, +0.08%
SALU: 201369 -> 200688 (-0.34%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:16 +00:00
Georg Lehmann
cfee9e1d9f nir/peephole_select: add option to allow discard without ~0 limit
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:16 +00:00
Georg Lehmann
ca8147edbe nir/peephole_select: add options struct
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:16 +00:00
Georg Lehmann
edd82bd03a nir/peephole_select: don't include nir_search_helpers.h
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Georg Lehmann
c31fadd25e nir/peephole_select: don't special case nir_opt_collapse_if + limit = ~0
Not sure if this was intentionally left when block_check_for_allowed_instrs's
param was changed from bool to int, but it certainly was broken without the
previous commit for discards. Now those should work, so the (unintentional?)
special case can be removed.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Georg Lehmann
40f96460ee nir/peephole_select: handle demote and terminate in nir_opt_collapse_if
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Georg Lehmann
58d6243f62 nir/peephole_select: support demote for non CF HW
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33590>
2025-02-20 21:59:15 +00:00
Karol Herbst
e0b62d7e2e rusticl/mem: set num_samples and num_mip_levels to 0 when importing from GL
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33653>
2025-02-20 21:37:56 +00:00
Mike Blumenkrantz
d1d2afa3ac zink: apply layer/depth to clear handling
this can avoid flushing/discarding some unnecessary clears

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33355>
2025-02-20 20:01:19 +00:00
Faith Ekstrand
2b1a97b742 nak: Use MemScope::GPU instead of MemScop::System
MemScope::System has to synchronize with everything in the system,
including across PCIe so it's horribly slow.  MemScope::GPU, on the
other hand, only has to synchronize within the GPU.  This is way faster
and still satisfies all of Vulkan's requirements because Vulkan never
allows CPU<->GPU access without full semaphores and barriers.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33649>
2025-02-20 19:32:24 +00:00
Faith Ekstrand
13f7ea7b3d nak: Only use suld.constant on Ampere+
Turing doesn't support it so we'll use suld.weak instead.  While we're
here, get rid of an accidental copy+paste condition.

Fixes: ffdc0d8e98 ("nak: Use suld.constant when ACCESS_CAN_REORDER is set")
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33649>
2025-02-20 19:32:24 +00:00
Roland Scheidegger
61911b6a4b llvmpipe: Fix alpha-to-coverage without dithering
Implementing alpha-to-coverage dithering broke the non-dithering case.
(Discovered by accident, not really a big deal since it's almost always
enabled and can only be disabled by using a Nvidia GL extension, and
can't be disabled with Vulkan.)

Fixes: ad4635d6ef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33586>
2025-02-20 18:59:21 +00:00
Adam Jackson
244c9cc45e mapi/glx: Remove FASTCALL/PURE
This isn't worth the complexity.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
32a10ccbdd glx: Remove (almost) all usage of _X_HIDDEN / _X_INTERNAL
It's redundant at this point. The one exception is for GLX_PUBLIC when
building for glvnd, because then we really do want the GLX API to be
hidden.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
43fb26f8ea mapi/glx: Remove xserver code generation
This hasn't been hooked up to the build since we deleted autotools back
in 2019. It's effectively dead code anyway, as GLX is not a moving
target, and at this point is it easier to modify the generated code
directly than to modify the generator. xserver is encouraged to copy
the generators from 2019 into its own build if it wants, or -
preferably, in this GLX greybeard's opinion - find a prettier codegen
solution in the process of finishing GL 3.0 support.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
09bbf71e68 glx: Make #undef GLX_INDIRECT_RENDERING do something
Not that meson lets you reach this state yet, but if you did, you'd
still build all of the indirect code but the linker would gc most of it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Daniel Schürmann
259b73a3ae nir/print: print phi sources sorted by predecessor blocks
We already print the predecessors sorted. Just do the same with
phi sources.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33574>
2025-02-20 14:22:14 +00:00
Juan A. Suarez Romero
2d91798561 broadcom/simulator: use string copy instead of memcpy
Using memcpy with the max size generates a global-buffer-overflow, as
the performance counter strings are smaller than the max size.

Instead, use a string copy function to get a copy.

This was detected with address sanitizer enabled and running vulkaninfo.

Fixes: 3e8b2fe053 ("broadcom/simulator: Add DRM_IOCTL_V3D_GET_COUNTER to simulator")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33627>
2025-02-20 13:15:01 +00:00
Juan A. Suarez Romero
351bf1e524 vc4/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33627>
2025-02-20 13:15:01 +00:00
Juan A. Suarez Romero
eb8017ca68 v3dv: duplicate key for texel_buffer cache
We can't use the local variable key to insert in the hashtable, as the
key needs to be persistent for future searches.

This makes a copy of the key in the pipeline, which is kept persistent
in the hashtable.

This fixes a stack-buffer-overflow.

Backport-to: 25.0
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33630>
2025-02-20 08:56:55 +00:00
Pierre-Eric Pelloux-Prayer
5980d60cf1 tc: flag closed batches
When tc_add_call_end is called the batch should never receive
new commands until it's executed.
Add a new assert to validate this expectation to help detect
failures.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
2025-02-20 08:25:42 +00:00
Pierre-Eric Pelloux-Prayer
f062c83f3a mesa/st: call _mesa_glthread_finish before _mesa_make_current
_mesa_make_current will use st_flush(ctx) to execute pending
commands before switching to the new context.

Since we can't have multiple threads using a pipe_context at
the same time, we must finish glthread to avoid having the
unmarshalling thread executing at the same time.

It's fixing random crashes where a thread would do:
  st_destroy_context ->
      _mesa_make_current ->
          st_glFlush(save_ctx) ->
            tc_execute_batch
While there's a glthread unmarshalling thread that's still
adding commands to TC.

Fixes: 08d97aadd1 ("st/mesa: fix texture deletion context mix-up issues (v2)")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
2025-02-20 08:25:42 +00:00
Pierre-Eric Pelloux-Prayer
a893a87625 tc: add missing TC_SENTINEL for TC_END_BATCH
Fixes: c2983d93da ("gallium/u_threaded: use TC_END_BATCH to terminate the loop")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
2025-02-20 08:25:41 +00:00
Samuel Pitoiset
5ba10cc57f radv/video: fix adding the query pool BO to the cmdbuf list
Video queries work differently but the BO still need to be added to the
cmdbuf list.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33620>
2025-02-20 07:51:33 +00:00
David Rosca
d8b91b72b9 winsys/amdgpu: Add assert for secure submissions on compute ring
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33601>
2025-02-20 07:28:46 +00:00
David Rosca
57228c12d5 radeonsi: Use gfx for TMZ buffer clears
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33601>
2025-02-20 07:28:46 +00:00
Mohamed Ahmed
dfd5e3da7b nvk: Implement VK_MESA_image_alignment_control
This is needed by VKD3D in order to satisfy D3D12's image alignment
requirements.  Otherwise, it has to pad things out weirdly in order to
re-align images behind the app's back.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12637
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33633>
2025-02-20 05:31:08 +00:00
Mohamed Ahmed
bb310ff457 nil: Add an API to clamp max image alignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33633>
2025-02-20 05:31:08 +00:00
Faith Ekstrand
63e3bce602 ci: Remove some NVK vkd3d fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33633>
2025-02-20 05:31:08 +00:00
Sagar Ghuge
536ef0b546 anv: Exclude non-standard block shapes on Xe2+
Xe2 and Xe3 are using the same TILE64 format. So reject the non-standard
MSAA shapes on Xe3 as well.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33565>
2025-02-20 02:18:19 +00:00
Natalie Vock
91075d823d mailmap: Update my name
Egg-crAcked-By: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33631>
2025-02-19 21:57:26 +00:00
Christian Gmeiner
662e901165 etnaviv: nir: Don't use deprecated NIR_PASS_V macro anymore.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
131e30d8b9 etnaviv: nir: Return progress for etna_lower_io(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
0c30468c78 etnaviv: nir: Return progress for etna_lower_alu(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
09fa418b7d nir: Add bool return value to nir_lower_texcoord_replace(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Christian Gmeiner
13e750aabe nir: Add bool return value to nir_lower_clip_halfz(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33621>
2025-02-19 21:16:05 +00:00
Eric Engestrom
1686cef3a2 docs/release-calendar: add 25.1 branchpoint & rc dates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
918291b039 docs/releasing: fix "release schedule" subsections nesting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
73376e62cc docs: add release calendar for 25.0.x cycle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
98ac066601 docs: update calendar for 25.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
40999edb96 docs: add sha sum for 25.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:23 +00:00
Eric Engestrom
577260dfcc docs: add release notes for 25.0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33626>
2025-02-19 21:03:22 +00:00
Corentin Noël
b6917cd62a ci: Update CrosVM and Virglrenderer
Update to their latest version on time

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33617>
2025-02-19 20:35:02 +00:00
Mary Guillemard
4f989c2cc3 pan/bi: Properly extract primitive facing on v11+
Since v11, the primitive flags preloaded register define more data.
This changes load_front_face lowering to only use the first bit for
primitive facing.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:21 +00:00
Mary Guillemard
20d7c93368 pan/bi: Handle LD_VAR_BUF_IMM encoding changes on v11+
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:20 +00:00
Mary Guillemard
be64a5ae27 pan/bi: Lower hadd on v11+
HADD is not present on v11 and later.
This lower hadd in NIR options and add asserts around hadd NIR opcodes
to ensure those are properly lowered.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:20 +00:00
Mary Guillemard
207b4af0ce pan/bi: Lower FROUND.v2s16 in nir_lower_bit_size on v11+
FROUND.v2s16 is gone since v11.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
d79a31bf81 pan/bi: Lower removed instructions in algebraic on v11+
This lower all instructions that were removed on v11 to
equivalents in algebraic and assert in BIR emission to ensure
they are never rematerialize.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
be011e8675 pan/bi: Stop using V2F16_TO_V2S16 for barycentric_at_offset on v11+
This was removed on v11.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
60b2920575 pan/bi: Stop using S16_TO_F32 in nir_texop_lod computation on v11+
This was removed on v11.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
1481b14fcb pan/bi: Lower SWZ.v4i8 to multiple MKVEC.v2i8 on v11+
IADD.v4u8 was removed on v11, as a result we now need to lower SWZ.v4i8
to multiple MKVEC.v2i8 to reproduce this behaviour.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
b63ef74e73 pan/bi: Stop using V2F32_TO_V2F16 on Valhall
On v11+, V2F32_TO_V2F16 doesn't exist anymore.

This commit ensure we stop using it on every codepath except when a
vectored conversion is prefered. (v9-v10)

Instead, we use FADD.F32 to handle data conversion thanks to the
swizzle defined for the destination.

This also work on older Valhall gens, so let's follow that
logic when we only have one component used.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:19 +00:00
Mary Guillemard
947264e18a pan/bi: Add round mode modifier to FADD
This is a modifier that is allowed on FADD, we are going to need it for
F16 convertions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Mary Guillemard
7b81312c23 pan/bi: Disallow dst swizzle optimization in case of conversion
Some instructions like FADD do a conversion when the swizzle is
specified while their immediate counterpart do not.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Mary Guillemard
cabd9a0a33 pan/bi: Do not run bi_fuse_small_int_to_f32 on v11+
Those instructions are gone now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Mary Guillemard
5d393ff20b pan/bi: Document removed instructions on v11
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Iago Toral Quiroga
e504825813 pan/va: fix FAU validation
Validation was checking that if an instruction was accessing FAU RAM,
only one 64-bit slot was accessed, and if it was accessing a FAU special
value, only one was accessed, however it was not checking if both  RAM
and special were used, which is only allowed in messaging instructions
except ATEST and BLEND.

Fixes Piglit:
spec/ati_fragment_shader/ati_fragment_shader-render-ops/mov c0.r

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
2025-02-19 20:13:18 +00:00
Lorenzo Rossi
bce9e851c6 nvk: Fix MSAA sparse residency lowering crash
Previously deqp tests with *.multisampled_image_sparse_residency.* would
crash with "Unknown image intrinsic" because
nir_intrinsic_bindless_image_sparse_load was not handled in the lowring
code.

This commits handles MSAA sparse residency lowering as with other cases.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Fixes: 7604697ec6 ("nvk: Implement shaderStorageImageMultisample")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33625>
2025-02-19 19:46:14 +00:00
James Hogan
be106bd6c6 mesa: Handle getting GL_MAX_VIEWS_OVR
Add support for GL_OVR_multiview's GL_MAX_VIEWS_OVR which can be
accessed with glGetIntegerv().

MaxViews is accessed via the hash table set up by get_hash_params.py as
a constant (MAX_VIEWS_OVR) using GL_MAX_VIEWS_OVR.

v2: Add this patch (thanks to Mike's guidance)
v3: Drop unnecessary enum size element in OVR_multiview.XML
v4: Switch to CONST(MAX_VIEWS_OVR) instead of gl_constants::MaxViews
    (Marek's suggestion)

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
a282a130fb mesa: OVR_multiview framebuffer attachment parameters
Implement the OVR_multiview framebuffer attachment parameters in
get_framebuffer_attachment_parameter():
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: This reads the
  attachment's NumViews.
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: This reads the
  attachment's Zoffset, but only if NumViews is non-zero.

This allows apitrace (PR 937[1]) to show the correct layers for
multiview framebuffer attachment surfaces, as well as to show this
information in the framebuffer attachments state.

[1]: https://github.com/apitrace/apitrace/pull/937

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
60509e187f mesa: Check views don't exceed GL_MAX_ARRAY_TEXTURE_LAYERS
The OVR_multiview spec specifies the INVALID_VALUE error to be generated
by FramebufferTextureMultiviewOVR if:
"- <texture> is a two-dimensional array texture and <baseViewIndex> +
   <numViews> is larger than the value of MAX_ARRAY_TEXTURE_LAYERS."

Implement this in check_multiview_texture_target(), similar to the test
in check_layer().

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
7819d322c4 mesa: Handle GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR
The OVR_multiview spec adds the following condition for framebuffer
completeness:
  "The number of views is the same for all populated attachments.
  { FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR }"

So add a condition to _mesa_test_framebuffer_completeness to check that
all attachments have identical NumViews. This avoids an infinite
recursion between zink_clear() and zink_clear_depth_stencil() in the
event of an incomplete FBO.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
James Hogan
65f18c4787 mesa: Consider NumViews to reuse FBO attachments
NumViews needs considering along with the other attachment data when
reusing a multiview framebuffer texture attachment (i.e. shared depth
and stencil texture).

The depth and stencil attachments should match in all respects including
NumViews before reusing the existing one, and NumViews should also be
copied when reusing.

This avoids an infinite recursion between zink_clear() and
zink_clear_depth_stencil() in the case of reuse of a multiview
depth/stencil attachment.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
2025-02-19 19:12:33 +00:00
Lionel Landwerlin
e22ab01dc7 nir: add options to lower only some image atomics to global
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33616>
2025-02-19 18:41:05 +00:00
Alyssa Rosenzweig
656422df8a nir: default-initialize next_stage
this avoids printing `next_stage: VERTEX` for internal compute shaders which is
all kinds of silly!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33605>
2025-02-19 18:08:07 +00:00
Faith Ekstrand
8536760016 nvk: Constify instance and pdev pointers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33624>
2025-02-19 17:36:37 +00:00
Pavel Ondračka
32b20a3f38 nine: set pipe_shader_state.report_compile_errors
Just set it explicitly to false to keep the old behavior before
the recent core changes in dc1b719e1f.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33545>
2025-02-19 15:44:43 +00:00
Pavel Ondračka
9b06b5db70 mesa: properly signal report_compile_error to drivers
This was already done in the fp paths, but was missed here.
With this in place drivers can report compile failures also from other
shader stages besides fragment shaders.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33545>
2025-02-19 15:44:42 +00:00
Pierre-Eric Pelloux-Prayer
6b20b06584 radeonsi: disable dcc when external shader stores are used
See comment.

Fixes: 666a6eb871 ("radeonsi/gfx12: disable display dcc for front buffer rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12552
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33469>
2025-02-19 12:35:37 +00:00
Juan A. Suarez Romero
18c3b296a6 vulkan: don't leak debug utils label name
Label names are duplicated, so free them before resetting or deleting
the cmdbuffer/queue.

Fixes leaks when testing dEQP-VK.api.debug_utils.long_labels.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33611>
2025-02-19 11:03:39 +00:00
Samuel Pitoiset
7c4a919f19 radv/meta: rename image<->buffer copies helpers
They operate on VAs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
89ea983df9 radv/meta: inline radv_copy_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
0323ed1022 radv: use radv_copy_memory() for accel structure updates
VK_KHR_acceleration_structure requires the BDA feature to be enabled
and this enables the global BO list.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
a659771e68 radv/meta: use radv_copy_memory() for the FMASK copy
The BOs are already added in radv_CmdCopyImage2KHR().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
361a598b4c radv: use radv_CmdDispatchIndirect() in the accel struct path
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Samuel Pitoiset
a03e391aa3 vulkan: constify vk_acceleration_structure_get_va()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33599>
2025-02-19 10:30:36 +00:00
Konstantin Seurer
e93592dc62 lavapipe: Remove uniform inlining
This broke with the descriptor rework and it will never work because
uniform buffers are bindless now.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
00e98d74b1 gallivm/nir/soa: Properly skip empty else branches
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
08b972781a gallivm/nir/soa: Skip bounds checking for in-bounds access
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
bd88edcf81 gallivm: Only guard tex/image ops if the exec mask can be zero
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
d9db40208d lavapipe: Lower push constants in NIR
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
a57e8b2e97 gallivm/nir/soa: Use divergence analysis
Emitting scalar instructions reduces compile time.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
8225ad3c89 nir/divergence_analysis: Handle load_const_buf_base_addr_lvp
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
b5a3caf17c gallivm/nir/soa: Do not lower vectors to llvm arrays
There are no dynamic swizzles so it is enough to apply them during
translation. This also gets rid of the extract/insertvalue spam.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
a576e7ca9c lavapipe: Optimize buffer robustness
Annotating access that does not need bounds checking allows the backend
to omit bounds checking which results in code that compiles and runs
faster.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
c60b39d8ac nir: Do not emit amul if it is unsupported
The driver woiuld have to run nir_opt_algebraic before instruction
selection.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
7905029629 nir: Rename in-bounds-agx to in-bounds
This will be used by lavapipe for skipping bounds checking when
robustness is disabled.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
92083fc70d llvmpipe: Do not use coroutines when they are unnecessary
Speeds up compilation and it should also run faster.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
28c594701e lavapipe: Initialize the compiler options of the noop fs
Crashes divergence analysis.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
cc6e43c049 lavapipe: Lower descriptor sets in NIR
This moves lowering vulkan resource indices out of gallivm into
lavapipe where it should be.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
66b3879618 lavapipe: Move nir passes to a new directory
The number of lavapipe nir passes keeps growing so it's a good idea to
add some separation before it becomes a mess.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
2208379628 gallivm/nir/soa: Select more IO to gather/scatter intrinsics
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:11 +00:00
Konstantin Seurer
29a4886cc8 gallivm/nir/soa: Implement robusst uniform loads without controlflow
Loading from a "zero" address instead speeds up compilation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
178e91956c gallivm/nir/soa: Lower bools to i1
Lowering them to 32 bit integers increases compile time by a lot because
llvm will optimize them to i1.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
ce0d8b7038 gallivm/nir/soa: Remove the dependency on lp_bld_nir.c
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
e88190a09f gallivm/nir/aos: Remove the dependency on lp_bld_nir.c
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Konstantin Seurer
daad0f8a91 gallivm: Split nir prepasses into aos/soa
The soa backend will work on very different looking NIR in the future.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
2025-02-19 09:54:10 +00:00
Samuel Pitoiset
efa23ef664 radv: fix adding the BO for unaligned SDMA copies to the cmdbuf list
It shouldn't be only added at creation time.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33600>
2025-02-19 07:29:27 +00:00
Guilherme Gallo
8af7f8b7fe ci: Remove cargo symlink workaround
Symlinking $CARGO_HOME to /usr/local/bin made rustup uninstaller delete
the entire folder, causing mysterious build errors, so let's do the
traditional .cargo/env sourcing to make rustup available to the rest of
the build scripts.

Also make sure that required scripts run the shell's rcfile to be able
to setup the PATH correctly.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33519>
2025-02-19 05:08:53 +00:00
Guilherme Gallo
a663f97d2d ci: Properly clean up rustup
Use `rustup self uninstall -y` instead of manually removing folders to
ensure a proper cleanup of the rustup installation, including cargo and
init command injections in shell rc files.

Failing to do so can cause issues, such as bash failing to run in a `set
-e` environment due to a missing `$HOME/.cargo/env`, for example.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33519>
2025-02-19 05:08:53 +00:00
Yiwei Zhang
e488b5e45e venus: support VK_KHR_global_priority
as well as the prior versions promoted from.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:58 +00:00
Yiwei Zhang
696ee859ef venus: support VK_KHR_map_memory2
This is purely on the driver side.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:58 +00:00
Yiwei Zhang
f69a0201da venus: support VK_EXT_pipeline_robustness
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:57 +00:00
Yiwei Zhang
e027f2afc1 venus: support VK_EXT_pipeline_protected_access
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:57 +00:00
Yiwei Zhang
ea8a396b91 venus: support VK_KHR_shader_float_controls2
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:56 +00:00
Yiwei Zhang
82408f81b4 venus: support VK_KHR_shader_subgroup_rotate
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33594>
2025-02-19 04:06:56 +00:00
Faith Ekstrand
eb27cbf25a nvk: Use suld.constant for EDB uniform texel buffers
In 2183bc73a6 ("nvk: Use suld for EDB uniform texel buffers"), we
started using suld instead of tld for EDB uniform texel buffers because
we needed it for correctness.  However, it's slow as mud.  Using
suld.constant seems to fix the performance regression.  I don't know if
it's quite tld performance, but it's close.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33612>
2025-02-18 19:53:52 -06:00
Faith Ekstrand
ffdc0d8e98 nak: Use suld.constant when ACCESS_CAN_REORDER is set
This is way faster than suld.sys, which is what we're using today.  So
far I haven't seen it matter for anything but texel buffers but it
likely helps some app somewhere.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33612>
2025-02-18 19:47:00 -06:00
Faith Ekstrand
5762586c6d nvk: Align UBO/SSBO addresses down rather than up
This should never happen as the client should always give us aligned
addresses.  However, in the off chance that it does, aligning down is
probably safer than aligning up as it won't cause the top end of the
range increase and potentially fault.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
2183bc73a6 nvk: Use suld for EDB uniform texel buffers
The tricks we play for texel buffers with VK_EXT_descriptor_buffer don't
work with tld with very large buffers.  suld, on the other hand, doesn't
seem to have these limitations.

Fixes: 3b94c5c22a ("nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
1c7a4c4f38 nak: Handle sparse texops with unused color destinations
Fixes: b17f139281 ("nak: Wire up sparse residency for texture ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
0ec760af66 nvk: Allow sparse loads on EDB buffers
Fixes: 3b94c5c22a ("nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
ca06a57702 nvk: Handle shader==NULL in nvk_cmd_upload_qmd()
We can theoretically hit this if CmdProcessGeneratedCommandsEXT is
called with a state command buffer that doesn't have compute shader set
if execute commands bind a shader.  We do, however, need to still call
nvk_cmd_upload_qmd() because it also uploads push constants and we need
those regardless of whether or not there's a shader bound.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Faith Ekstrand
39ae06e153 nvk: Pull shaders from the state command buffer in nvk_cmd_process_cmds()
Found by the VKD3D test suite.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
2025-02-19 00:20:43 +00:00
Paulo Zanoni
55bdae03cc brw: don't always set cond_modifier on parsed assembly instructions
For the instructions we parse with brw_gram.y, don't unconditionally
call brw_eu_inst_set_cond_modifier(). Do it like we do in
brw_generator::generate_code() and only call it if we have a
cond_modifier to set.

Why? Because for ONE_SRC instructions, CondCtrl (bits 95:92) only
exists if Src.IsImm is false. If Src.Imm is true, then bits 95:64 are
actually Src0.ImmValue[63:32]. If we unconditionally call
brw_eu_inst_set_cond_modifier(), we'll end up zeroing bits 95:92 for
ONE_SRC instructions with 64bit immediates. See BSpec page
Structure_EU_INSTRUCTION_BASIC_ONE_SRC (56880).

This issue can be reproduced with src/intel/executor if you try to
have the following instruction:

    mov(16)         g10<1>Q          0xfedcba9876543210:Q             { align1 WE_all 1H };

our parser will end up zeroing the top bits, so the value of the
immediate will be 0x0edcba9876543210.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33559>
2025-02-18 23:44:32 +00:00
lcagustini
fb51252953 panvk: Advertise support for VK_EXT_border_color_swizzle
Advertise support for border color swizzle as we support it just fine
Passes all dEQP-VK*border_swizzle*

v2: Added feature to features.txt and vk_features struct

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33232>
2025-02-18 22:13:44 +00:00
Georg Lehmann
56aac9fdec nir/opt_algebraic: optimize ffract(ffract(a))
Foz-DB Navi21:
Totals from 163 (0.21% of 79377) affected shaders:
Instrs: 233933 -> 233685 (-0.11%)
CodeSize: 1252492 -> 1251500 (-0.08%); split: -0.08%, +0.00%
Latency: 1227625 -> 1227405 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 266954 -> 266668 (-0.11%)
VClause: 4193 -> 4191 (-0.05%)
Copies: 20935 -> 20932 (-0.01%); split: -0.02%, +0.01%
PreSGPRs: 10395 -> 10391 (-0.04%)
VALU: 163725 -> 163475 (-0.15%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:57 +00:00
Georg Lehmann
317d07484e nir: improve fsqrt range analysis
Foz-DB Navi21:
Totals from 3 (0.00% of 79377) affected shaders:
MaxWaves: 88 -> 96 (+9.09%)
Instrs: 1058 -> 951 (-10.11%)
CodeSize: 5964 -> 5368 (-9.99%)
VGPRs: 104 -> 96 (-7.69%)
Latency: 15283 -> 14099 (-7.75%); split: -8.37%, +0.62%
InvThroughput: 4951 -> 4238 (-14.40%)
Copies: 81 -> 76 (-6.17%)
PreVGPRs: 93 -> 84 (-9.68%)
VALU: 820 -> 737 (-10.12%)
SALU: 115 -> 91 (-20.87%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:57 +00:00
Georg Lehmann
81b4629636 nir: fix frsq range analysis
Foz-DB Navi21:
Totals from 98 (0.12% of 79377) affected shaders:
Instrs: 157311 -> 157675 (+0.23%); split: -0.03%, +0.26%
CodeSize: 844296 -> 846648 (+0.28%); split: -0.00%, +0.28%
Latency: 1275467 -> 1276259 (+0.06%); split: -0.00%, +0.06%
InvThroughput: 266980 -> 267098 (+0.04%); split: -0.03%, +0.07%
Copies: 11094 -> 11093 (-0.01%)
PreVGPRs: 5945 -> 5977 (+0.54%)
VALU: 110585 -> 110953 (+0.33%); split: -0.04%, +0.38%
SALU: 18481 -> 18476 (-0.03%)

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:56 +00:00
Georg Lehmann
25300ac18a nir: fix range analysis for frcp
Foz-DB Navi21:
Totals from 448 (0.56% of 79377) affected shaders:
Instrs: 669306 -> 669318 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3736580 -> 3738840 (+0.06%); split: -0.00%, +0.06%
Latency: 5860916 -> 5860961 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 1344094 -> 1344135 (+0.00%); split: -0.00%, +0.00%
VClause: 13878 -> 13879 (+0.01%)
Copies: 58538 -> 58532 (-0.01%)
VALU: 479807 -> 479820 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:56 +00:00
Georg Lehmann
1f3494b886 nir: range analysis for ffract
Foz-DB Navi21:
Totals from 75 (0.09% of 79377) affected shaders:
Instrs: 69239 -> 68383 (-1.24%)
CodeSize: 385088 -> 379532 (-1.44%)
Latency: 427188 -> 421729 (-1.28%); split: -1.28%, +0.00%
InvThroughput: 103086 -> 101926 (-1.13%)
VClause: 785 -> 753 (-4.08%)
SClause: 1624 -> 1598 (-1.60%)
Copies: 5679 -> 5671 (-0.14%); split: -0.72%, +0.58%
PreSGPRs: 3961 -> 3937 (-0.61%)
VALU: 51107 -> 50457 (-1.27%)
SALU: 9034 -> 8950 (-0.93%)
VMEM: 1123 -> 1091 (-2.85%)
SMEM: 2862 -> 2830 (-1.12%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
2025-02-18 20:38:56 +00:00
Aaron Ruby
030c8b57b0 gfxstream: Add reference counting for GEM handles in LinuxVirtGpuBlob
It's entirely possible that the same GEM handle is referenced across
different Vulkan object instances. As per the warnings in xf86drm.h,
the caller is responsible for reference counting.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33451>
2025-02-18 20:03:28 +00:00
Aaron Ruby
a630efb645 gfxstream: Fix precedence and ownership issues on Linux for imported FD
and the VirtGpuResource

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33451>
2025-02-18 20:03:27 +00:00
Paulo Zanoni
927d7b322b brw: increase brw_reg::subnr size to 6 bits
Since Xe2, the registers are bigger and even the instruction
structures got updated to have 6 bits.

The way I detected this issue was when I tried to use
src/intel/executor to add the following instruction:

    add(8)          g6.8<1>UD      g4<8,8,1>UD    0x00000008UD    { align1 WE_all 1Q I@1 };

Executor would read this and end up emitting an add with dst being
g6<1>UD instead of what we wanted. It turns out that inside
brw_gram.y, at dstoperand and dstoperandex we do:

    $$.subnr = $$.subnr * brw_type_size_bytes($4);

which would overflow subnr back to 0.

The overflow doesn't seem to be a problem with code we emit directly
(unlike the code we parse, like above) due to the fact that we seem to
treat Xe2 registers as smaller all the way until we call phys_nr() and
phys_subnr() during code generation. The phys_subnr() function can
generate a value that would overflow reg.subnr, but this value is
never written back to reg.subnr, it's just returned as an unsigned
int.

Fixes: e9f63df2f2 ("intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33539>
2025-02-18 19:38:46 +00:00
Lionel Landwerlin
cf3a343800 anv: fixup compute walker storage length
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9aef4ceb13 ("anv: hold a prepacked COMPUTE_WALKER instruction on CS pipelines")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33593>
2025-02-18 18:34:51 +00:00
Lionel Landwerlin
66bbb79df9 anv/ci/adl: update fail expectation for video
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33593>
2025-02-18 18:34:51 +00:00
Tapani Pälli
765f3b78d5 anv: apply cache flushes on pipeline select with gfx20
This fixes rendering artifacts seen with Hogwarts Legacy and Black
Myth Wukong. Assumption is that we can get rid of these flushes once
RESOURCE_BARRIER work lands but until then we need them.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12540
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12489
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33397>
2025-02-18 18:04:45 +00:00
Lionel Landwerlin
252cac1e5c anv: avoid memory type changes with INTEL_DEBUG=noccs
Otherwise replay of renderdoc captures don't work.

Instead avoid passing the flag down the allocator.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33583>
2025-02-18 17:35:44 +00:00
Job Noorman
891132c3ec ir3/legalize: use (sy) for ray_intersection WAR hazards
It seems like (ss) is not enough to resolve WAR hazards for
ray_intersection.

Fixes CTS tests:
- dEQP-VK.ray_query.stress.fragment_shader.aabbs
- dEQP-VK.ray_query.stress.fragment_shader.triangles

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33597>
2025-02-18 17:13:33 +00:00
Job Noorman
3f0894df8d ir3: don't create SRC2 for isam without .v
We would create an immed 0 SRC2 for, for example, load_uav. Even though
this src would be dismissed in the final assembly, it would still waste
a register or alias.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33596>
2025-02-18 16:13:53 +00:00
Connor Abbott
f39679199b tu: Fix vertical tile merging check
The intent here was to check if the tile we're trying to merge
vertically (prev_y_tile) has already been merged horizontally into a
neighboring tile, but I used the slot_mask which also contains the tiles
that have been merged into the prev_y_tile, so the check was too
conservative and would fail even if another tile had been merged into
prev_y_tile. This meant that we would fail to ever create 2x2 regions of
tiles. Fix this by just testing prev_y_tile's bit in the mask.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33534>
2025-02-18 14:41:56 +00:00
Connor Abbott
928a857496 tu: Make sure tiles being merged are adjacent
Even though we always try to merge a horizontally or vertically adjacent
tile, when we try to merge a vertically adjacent tile it may not
actually be adjacent because it was merged horizontally and the current
tile wasn't or vice versa. We have to detect this and reject merging it.

Fixes: 3fdaad0948 ("tu: Implement bin merging for fragment density map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33534>
2025-02-18 14:41:56 +00:00
Natalie Vock
f01623ea75 radv/bvh: Add custom leaf node builder
This custom builder implements fine-grained instance node bounds
calculation by looking at all AABBs at tree depth 2.

Shaves off 0.3ms in the start scene for Indiana Jones: The Great Circle
on Deck (roughly 29.1ms->28.7ms).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:53 +00:00
Natalie Vock
90c3450621 radv/bvh: Prefix RADV-specific node functions with radv_
Avoids naming conflicts when including both the common leaf shader and
RADV's build_helpers.h.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:53 +00:00
Natalie Vock
444bd02255 radv/bvh: Remove unused build_instance helper
This is in common code now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:53 +00:00
Natalie Vock
b1f6d3b6b7 radv/bvh, vulkan/bvh: Move AccelerationStructureInstance to vk_build_helpers
Remove duplications.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Natalie Vock
28ed283e81 vulkan/bvh: Add optional fine-grained instance node bounds calculation
This allows drivers to inject custom functions to calculate the bounds
of instance nodes. For example, this can be used to determine instance
bounds by transforming the AABBs of all child nodes at some level in the
BVH. When instance transforms contain rotations of close to 45°, this
can yield a tighter AABB than just taking the instance's top-level AABB
and rotating it.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Natalie Vock
e39994088a vulkan/bvh: Add option to override leaf builder SPIR-Vs
With this, drivers can compile and use custom leaf builder versions
instead of the generic common shader.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Natalie Vock
40b0ad0f45 vulkan/bvh: Move leaf builder code to header
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32797>
2025-02-18 13:00:52 +00:00
Rhys Perry
d2907d271e ac/nir: set higher alignment for some swizzled store_buffer_amd
No fossil-db changes (navi31, navi21, polaris10).

fossil-db (vega10):
Totals from 37 (0.06% of 62962) affected shaders:
MaxWaves: 189 -> 180 (-4.76%)
Instrs: 45607 -> 45616 (+0.02%); split: -0.16%, +0.18%
CodeSize: 241980 -> 234908 (-2.92%)
VGPRs: 2524 -> 2784 (+10.30%)
Latency: 152476 -> 151948 (-0.35%); split: -0.38%, +0.03%
InvThroughput: 74441 -> 78360 (+5.26%); split: -0.21%, +5.47%
VClause: 902 -> 1044 (+15.74%); split: -1.55%, +17.29%
Copies: 4989 -> 6745 (+35.20%)
PreVGPRs: 2044 -> 2334 (+14.19%)
VALU: 31634 -> 33389 (+5.55%)
SALU: 2601 -> 2602 (+0.04%)
VMEM: 5774 -> 3991 (-30.88%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33531>
2025-02-18 12:31:19 +00:00
Rhys Perry
8fd862499a ac/nir: don't cross swizzle elements when vectorizing buffer_amd intrinsic
This can happen for mesh shader outputs.

No fossil-db changes (navi31, navi21, polaris10).

fossil-db (vega10):
Totals from 37 (0.06% of 62962) affected shaders:
MaxWaves: 183 -> 189 (+3.28%)
Instrs: 45037 -> 45607 (+1.27%); split: -0.09%, +1.36%
CodeSize: 231472 -> 241980 (+4.54%)
VGPRs: 2656 -> 2524 (-4.97%)
Latency: 151199 -> 152476 (+0.84%); split: -0.02%, +0.87%
InvThroughput: 75148 -> 74441 (-0.94%); split: -1.44%, +0.50%
VClause: 882 -> 902 (+2.27%); split: -4.31%, +6.58%
Copies: 6465 -> 4989 (-22.83%)
PreVGPRs: 2265 -> 2044 (-9.76%)
VALU: 33109 -> 31634 (-4.45%)
SALU: 2602 -> 2601 (-0.04%)
VMEM: 3711 -> 5774 (+55.59%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: c3d27906d8 ("radv: vectorize lowered shader IO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33531>
2025-02-18 12:31:19 +00:00
David Rosca
ebd8893710 radv/video: Move IB header from begin/end to encode_video
For decode this is also done in decode_video.

This breaks if app doesn't call vkCmdEncodeVideoKHR before end, eg:

  vkCmdBeginVideoCodingKHR
  vkCmdControlVideoCodingKHR
  vkCmdEndVideoCodingKHR

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33582>
2025-02-18 11:12:22 +00:00
David Rosca
77ff18aa3b radv/video: Fix setting balanced preset for HEVC encode with SAO enabled
FW disables SAO in speed preset, so we need to switch to balanced.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12615
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33582>
2025-02-18 11:12:22 +00:00
Danylo Piliaiev
49191f46e6 tu/a6xx: Emit VSC addresses for each bin to restore after preemption
KGSL unconditionally supports preemption so we cannot ignore it.

On a6xx, we have to emit VSC addresses per-bin or make the amble include
these registers, because CP_SET_BIN_DATA5_OFFSET will use the
register instead of the pseudo register and its value won't survive
across preemptions. The blob seems to take the second approach and
emits the preamble lazily. We chose the per-bin approach but blob's
should be a better one.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12627

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33580>
2025-02-18 10:23:09 +00:00
Samuel Pitoiset
9427df23b4 radv: use radv_image::bindings::addr more
Also remove radv_image::bindings::offset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:49:14 +01:00
Samuel Pitoiset
066467cf98 radv: compute radv_image::bindings::addr at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:24 +01:00
Samuel Pitoiset
f234099d6d radv: rename radv_image::bindings::bo_va to addr
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:24 +01:00
Samuel Pitoiset
0f8b3bf489 radv: remove redundant zero initialization when creating images
The struct is already zero-allocated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:24 +01:00
Samuel Pitoiset
63b5bce396 radv: stop using image binding offset when exporting BO metadata
The offset must be zero for dedicated allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33524>
2025-02-18 09:47:23 +01:00
Samuel Pitoiset
50851f17d1 radv/meta: remove the buffer dependency for image copy operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
ae5d2bfd36 radv/meta: use radv_copy_memory() instead of radv_copy_buffer()
To remove the buffer dependency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
70bd4fe621 radv/meta: pass the buffer addr to SDMA image buffer copy operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
6e2da49e92 radv/meta: add BOs to cmdbuf list earlier for image copy operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33526>
2025-02-18 08:40:30 +01:00
Samuel Pitoiset
e0070bc68b radv: fix adding the VRS image BO to the cmdbuf list on GFX11
This might cause random faults.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33584>
2025-02-18 07:13:07 +00:00
Tapani Pälli
d8381415a6 anv: tighten condition for changing barrier layouts
Assertion (or attempting the layout change) is causing crash when
launching Steel Rats. Tighten the condition for change so that it should
affect only when runtime has made changes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12602
Fixes: eed788213b ("anv: ensure consistent layout transitions in render passes")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33523>
2025-02-18 06:30:14 +00:00
Vasily Khoruzhick
b6fba15bd7 lima: ppir: duplicate fneg and fabs if its source is an intrinsic
fneg and fabs are folded later in ppir, but having them in nir as a
separate instructions prevents duplicate_intrinsics pass from duplicating
load_input and load_uniform. Duplicate fneg and fabs, so subsequent
duplicate_intrinsic pass can duplicate the loads

shader-db:

total instructions in shared programs: 27698 -> 27675 (-0.08%)
instructions in affected programs: 2752 -> 2729 (-0.84%)
helped: 21
HURT: 2
helped stats (abs) min: 1 max: 4 x̄: 1.19 x̃: 1
helped stats (rel) min: 0.38% max: 6.67% x̄: 2.75% x̃: 0.75%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 1.89% max: 1.89% x̄: 1.89% x̃: 1.89%
95% mean confidence interval for instructions value: -1.39 -0.61
95% mean confidence interval for instructions %-change: -3.67% -1.03%
Instructions are helped.

total loops in shared programs: 2 -> 2 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 372 -> 368 (-1.08%)
spills in affected programs: 27 -> 23 (-14.81%)
helped: 4
HURT: 0

total fills in shared programs: 1224 -> 1205 (-1.55%)
fills in affected programs: 81 -> 62 (-23.46%)
helped: 4
HURT: 0

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33569>
2025-02-18 02:38:26 +00:00
Faith Ekstrand
86e217e7df nvk: Implement descriptorBufferPushDescriptors
The only thing we really need to do here is to make sure we don't try
to use the EDB path for push descriptors since those aren't really
descriptor buffers.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33589>
2025-02-17 23:38:17 +00:00
José Roberto de Souza
7d4c91efef intel/dev: Call intel_device_info_update_after_hwconfig() from common code
Avoid backends duplication.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33585>
2025-02-17 20:52:31 +00:00
José Roberto de Souza
e170252d97 intel/dev: Improve max_cs_threads documentation
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33585>
2025-02-17 20:52:31 +00:00
Vasily Khoruzhick
dde084d688 lima: ppir: use combiner unit for mul
Combiner unit runs after fmul/smul/fadd/sadd units and it can consume
the results that previous units wrote to the registers. So prefer
placing scalar mul into combiner unit and predecessors (if any)
into other units

shader-db:

total instructions in shared programs: 29072 -> 27698 (-4.73%)
instructions in affected programs: 11237 -> 9863 (-12.23%)
helped: 163
HURT: 0
helped stats (abs) min: 1 max: 42 x̄: 8.43 x̃: 4
helped stats (rel) min: 0.64% max: 30.00% x̄: 13.03% x̃: 11.76%
95% mean confidence interval for instructions value: -9.89 -6.96
95% mean confidence interval for instructions %-change: -14.09% -11.97%
Instructions are helped.

total loops in shared programs: 2 -> 2 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 367 -> 372 (1.36%)
spills in affected programs: 16 -> 21 (31.25%)
helped: 1
HURT: 2

total fills in shared programs: 1208 -> 1224 (1.32%)
fills in affected programs: 51 -> 67 (31.37%)
helped: 2
HURT: 2

LOST:   0
GAINED: 0

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33568>
2025-02-17 12:25:01 -08:00
Vasily Khoruzhick
bc9fca2fb1 lima: ppir: add codegen for mov and mul on combiner unit
Combiner unit support scalar by vector multiplication and scalar mov.
Implement it for codegen

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33568>
2025-02-17 12:25:01 -08:00
Vasily Khoruzhick
5937d12d29 lima: ppir: assert on unexpected pipeline dest for fmul and vmul
Assert on unexpected pipeline dest for fmul and vmul to catch scheduler
bugs early

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
c6c37b516d lima: ppir: fix diassembling atan and combiner codegen definition
Fix multiple issues with atan in disassembler:

- arg1_en field in combiner unit actually seems to be a bit indicating
  that one of sources is vector (e.g. for atan_pt2, or multiplication)
- atan2 has 2 arguments, not one
- properly handle all instruction variants

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
f90df9a39e lima: ppir: print index of the node that breaks node_to_instr
Print index of the node that breaks node_to_instr to make debugging
easier

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
7621f9beda lima: ppir: fixup src node when replacing src for select and load_reg
Fixup src node when replacing src for select and load_reg

It doesn't affect compiler functionality, but affects printing ppir
representation.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Vasily Khoruzhick
2ea27f41e3 lima: ppir: improve readability of ppir represantation dump
Improve readability of ppir representation dump

- adopt "dest = op src1[, srcN]"
- use symbolic names of pipeline registers
- print destination writemask
- print destination modifier (if any)
- print source(s) swizzle
- print constants
- print load node base index
- print branch condition(s)

With these modifications it's actually possible to follow the program

-------block   0-------
 $0008 = mov ^texture ($0005) // NIR: new
  ($0005) ^texture = ld_tex ^discard ($0006).xyzx, $0004.xxxx // NIR: ssa4
    ($0006) ^discard = ld_coords_reg $0002.xyzx // NIR: new
       $0004.x = ld_var 0 // NIR: ssa6
       $0002.xyz = mov $0001.yzwx // NIR: ssa5
         $0001 = ld_var 0 // NIR: ssa7

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33540>
2025-02-17 19:51:30 +00:00
Eric Engestrom
8771762bcd llvmpipe/ci: drop fraction for asan tests that takes 1.5 min without fraction
The fraction was making it run for only 10-12 seconds, which is wasteful
considering the huge overhead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33581>
2025-02-17 19:10:57 +00:00
Lionel Landwerlin
2361ed27f3 runtime: sort push constant layouts
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33548>
2025-02-17 18:39:53 +00:00
Danylo Piliaiev
97f851e7c5 tu: Handle mismatched mutability when resolving from GMEM
Apparently fast path cannot handle mismatched mutability and we
should use CP_BLIT which has SP_PS_2D_SRC_INFO.MUTABLEEN to signal
src mutability. Previously it was partially handled by
tu_attachment_store_mismatched_swap.

Fixes: a104a7ca1a
("tu: Handle non-identity GMEM swaps when resolving")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
2025-02-17 17:56:17 +00:00
Danylo Piliaiev
4c918603e0 freedreno/fdl: Log mutability when dumping layout
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
2025-02-17 17:56:17 +00:00
Danylo Piliaiev
bdf0f61d4a tu: Get correct src view when storing gmem attachment
Fixes: a104a7ca1a
("tu: Handle non-identity GMEM swaps when resolving")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
2025-02-17 17:56:17 +00:00
Samuel Pitoiset
7b5efb4c0b radv: remove radv_buffer_view_{init,finish}() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 16:53:28 +01:00
Samuel Pitoiset
3c98a336cf radv: remove radv_buffer_{init,finish}() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 16:53:08 +01:00
Samuel Pitoiset
84ba15eb05 radv/meta: switch to descriptor buffers
The main advantage is to use BDA for texel buffer descriptors.
It might also be slightly faster on the CPU.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 16:52:49 +01:00
Samuel Pitoiset
bb7f86a9e4 vulkan: add descriptor buffer support to compute astc decoder
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33505>
2025-02-17 15:03:43 +01:00
Kenneth Graunke
e65c1473de nir: Eliminate dead writes to shared memory at the end of the program
If the program writes to shared variables after all reads, in the last
block of the program, no one will ever read the value we write.  We can
just eliminate these dead writes.

(Thanks to Faith Ekstrand for improving the ends_program() conditions.)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33452>
2025-02-17 12:46:07 +00:00
Samuel Pitoiset
9af11bf306 radv: add initial DCC support on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255>
2025-02-17 12:03:09 +00:00
Samuel Pitoiset
827cef7f7f ac/gpu_info: add gfx12_supports_dcc_write_compress_disable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255>
2025-02-17 12:03:09 +00:00
Valentine Burley
53c1b15f53 anv/ci: Don't start X11 for ANGLE
This is no longer required.

Also document a flake seen recently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33578>
2025-02-17 11:31:01 +00:00
Valentine Burley
72b8ba4851 radv/ci: Don't start X11 for ANGLE
This is no longer required.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33578>
2025-02-17 11:31:01 +00:00
Yiwei Zhang
0b908bb27e venus: updated to use core types for promoted extensions
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33567>
2025-02-17 10:46:35 +00:00
Yiwei Zhang
207c9ec65a venus: sync protocol for v1.4.307 release and update promoted entries
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33567>
2025-02-17 10:46:35 +00:00
Yiwei Zhang
ae2830e520 venus: drop unused codes
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33567>
2025-02-17 10:46:34 +00:00
Konstantin Seurer
af375c6756 radv: Optimize fs builtins using static gfx state
The values of some builtins are known at compile time when the
application creates pipelines with static state.

Stats for graphics pipelines:

Totals from 568 (0.71% of 80536) affected shaders:
MaxWaves: 12364 -> 12502 (+1.12%); split: +1.26%, -0.15%
Instrs: 515696 -> 501182 (-2.81%); split: -2.85%, +0.04%
CodeSize: 2815736 -> 2741464 (-2.64%); split: -2.69%, +0.05%
VGPRs: 29528 -> 29160 (-1.25%); split: -1.71%, +0.46%
SpillSGPRs: 212 -> 215 (+1.42%)
Latency: 5515421 -> 5409125 (-1.93%); split: -2.05%, +0.13%
InvThroughput: 1293512 -> 1277913 (-1.21%); split: -1.27%, +0.06%
VClause: 10570 -> 10295 (-2.60%); split: -2.74%, +0.14%
SClause: 19040 -> 18531 (-2.67%); split: -2.83%, +0.16%
Copies: 37189 -> 35431 (-4.73%); split: -5.31%, +0.58%
Branches: 11391 -> 11070 (-2.82%); split: -2.92%, +0.11%
PreSGPRs: 27848 -> 27313 (-1.92%); split: -1.95%, +0.03%
PreVGPRs: 24847 -> 24106 (-2.98%); split: -3.00%, +0.02%
VALU: 359356 -> 348779 (-2.94%); split: -2.97%, +0.03%
SALU: 59135 -> 57448 (-2.85%); split: -3.11%, +0.26%
VMEM: 14674 -> 14313 (-2.46%)
SMEM: 30901 -> 30342 (-1.81%); split: -1.84%, +0.03%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32793>
2025-02-17 09:45:15 +00:00
Valentine Burley
bbfbd16580 turnip/ci: Add a nightly ANGLE job on a750
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Valentine Burley
bd2563eb02 turnip/ci: Rename valve-freedreno-turnip-manual-rules
The valve-freedreno-turnip-manual-rules naming would suggest
freedreno + turnip rules, but in fact this rule is meant to only
impact turnip.
Change the name to match .google-turnip-manual-rules and
.collabora-turnip-manual-rules.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Valentine Burley
612f56cb5e ci/container: Include ANGLE in the arm64 test-gl container
Build ANGLE in the arm64 test-gl containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Valentine Burley
45fe200222 turnip/ci: Add nightly ANGLE jobs on a618 and a660
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33542>
2025-02-17 09:07:48 +00:00
Samuel Pitoiset
f828695e46 radv: stop relying on VkBuffer for VBO
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33543>
2025-02-17 07:37:50 +00:00
Samuel Pitoiset
06e47e8776 radv: compute VBO addr at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33543>
2025-02-17 07:37:49 +00:00
Valentine Burley
464c97b588 ci: Update expectations from latest nightly
Update expectations from https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1364513.
Created with ci-collate.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33547>
2025-02-17 06:56:30 +00:00
Qiang Yu
d2348daf55 llvmpipe/ci: change for oes_egl_image_external_essl3
Subtest name is not used anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
42068643e9 dri,egl,glx: remove redundant usage of HAVE_X11_DRM
These files are build or used only when drm platform is
available, no need to check this macro inside them.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
a52d4876d9 kopper: remove unused function definition
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
2a1ae6d94b glx/egl/x11: fix x11_dri3_check_multibuffer
glx/egl "multibuffers" denotes if server side support DRI3
multi plane and modifiers which is version >= 1.2. But now
it returns true just when DRI3 version >= 1.

This causes problem when xserver with amdgpu DDX which only
support DRI3 1.0, so "multibuffers" gets set unexpectedly,
and client send DRI3 >= 1.2 request to server which gets
unimplemented error.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
746381f870 dri: dmabuf cap does not rely on winsys multibuffer support
dmabuf cap is client side cap, should not rely on whether window
system support multibuffer (i.e. DRI2 multi plane with modifier).

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
354dc800d2 egl: decouple dmabuf import/export cap from xserver support
multibuffers_available denotes xserver side support for
DRI3 and Present protocols which should not affect client
side support for dmabuf import/export.

This is for xserver with amdgpu DDX in which case
multibuffers_available will be false, but dmabuf import/export
should be enabled to support applications like mpv which use
dmabuf import for vaapi decoded buffer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Faith Ekstrand
607686f6bf nvk: Respect VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT
This is part of VK_EXT_mutable_descriptor_type but we never did anything
with it.  Since we use local memory for descriptor sets, copying from
them means reading VRAM through a WC map and it's pretty expensive.
Using malloc() for HOST_ONLY should be a nice perf boost for things
which give us the hint.

This massively improves the performance Dragon Age: The Veilguard,
taking it from 7 FPS to 25 FPS on an RTX 4060.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12622
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33571>
2025-02-17 00:41:36 +00:00
Faith Ekstrand
b8508726f0 nvk: Rename nvk_descriptor_set::mapped_ptr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33571>
2025-02-17 00:41:36 +00:00
Yiwei Zhang
8741be3365 venus: fix maintenance5 props init and create flags2
More are found missed from prior maint5 support. This change has
properly initialized the maint5 props as well as fixing its new
VkPipelineCreateFlags2CreateInfo integrations.

Verified with dEQP-VK.*maintenance5*

Fixes: be6fece6e1 ("venus: enable VK_KHR_maintenance5")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33566>
2025-02-15 22:55:55 -08:00
Yiwei Zhang
dfd2af5da1 Support 5 more promoted extensions
VK_KHR_calibrated_timestamps
VK_KHR_index_type_uint8
VK_KHR_line_rasterization
VK_KHR_load_store_op_none
VK_KHR_vertex_attribute_divisor

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33561>
2025-02-16 00:23:48 +00:00
Yiwei Zhang
5603b78779 venus: sync protocol to v1.3.302
and update extensions being promoted

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33561>
2025-02-16 00:23:48 +00:00
Yiwei Zhang
2026e4a262 venus: fix sampler locations feats and props scrub
Fixes: ff64092ff3 ("venus: support VK_EXT_sample_locations")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33561>
2025-02-16 00:23:48 +00:00
Matt Turner
06d8afff64 vulkan: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
da6971f865 mapi: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
49bc323866 intel: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
388e9e6b33 glx: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
a9139e0f97 glsl: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Matt Turner
ec9c7a1ef8 gallium: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Lionel Landwerlin
d75849aaea anv: make compute state flush helper visible
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:24 +02:00
Lionel Landwerlin
ed18353e2a anv: make gfx state flushing available externally
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:21 +02:00
Lionel Landwerlin
9aef4ceb13 anv: hold a prepacked COMPUTE_WALKER instruction on CS pipelines
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:18 +02:00
Lionel Landwerlin
82b6a6f0b9 anv: move reg_mask push constant field to gfx
This is used only for gfx stages as those are the only ones that can
promote UBOs to push constants.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:14 +02:00
Lionel Landwerlin
456d691310 anv: move RT stage bits to main header
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33550>
2025-02-15 18:38:12 +02:00
Martin Roukala (né Peres)
71050f6314 r300g/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:29:19 +02:00
Martin Roukala (né Peres)
9a491a2c3f i915g/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:29:19 +02:00
Martin Roukala (né Peres)
88377ed295 freedreno/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:28:54 +02:00
Martin Roukala (né Peres)
3ebe512f1f nvk/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:28:45 +02:00
Martin Roukala (né Peres)
a5b5942276 etnaviv/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
0a3a2f278e radv/ci: opt-in the new mars setup command
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
06b5aa9965 ci/b2c: allow jobs to opt-in into the new mars setup command
This machine registration command makes it possible to check for the
specified list of machine tags rather than just doing a full comparison
of tags between the expected state and the current state.

This is beneficial for multiple reasons:

 * It enables having more than one GPU in a host, and we let the machine
   registration container unbind the unwanted GPU before Mesa CI even
   executes anything

 * It makes it possible to alter the boot process so as to use a kernel
   with a different architecture than the default kernel of CI-Tron uses

 * Adding or modifying tags which are unused by a job won't fail the
   first job after the new machine registration container lands.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
81d55e0866 zink/ci: document more NVK GA106 flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:22:24 +02:00
Martin Roukala (né Peres)
c6d40205e6 zink/ci: document more RADV flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:12:12 +02:00
Martin Roukala (né Peres)
e9bb49732e radv/ci: mark a whole subset of tests as flaky on tahiti
Let's stop this game of whack-a-mole, and just mark the whole subset
of tests as flacky.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:12:12 +02:00
Martin Roukala (né Peres)
94b8430e8e zink/ci: increase the a750 job's timeout to 18 minutes
The DUT boots more reliably now that we are using the latest kernel,
so no need to allocate 5 minutes to multiple boot attempts.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33551>
2025-02-15 14:12:12 +02:00
Mel Henning
8621d036c1 nouveau/mme: Print ip in mme_tu104_dump
This matches mme_tu104_print

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33560>
2025-02-15 11:20:09 +00:00
Konstantin Seurer
0ff66fe1be lavapipe: Use the common BVH framework
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
2f823a54ea lavapipe: Implement some functions required by the common BVH framework
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
ac0f643d4b gallivm: Remove loop limiting
This is not conformant and it can cause hard to debug issues or hide
existing bugs. Getting rid of this limit will allow lavapipe to use the
common bvh building framework since the ploc build shader has a loop
that waits to start the next phase.

cc: mesa-stable

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
d6244049a1 vulkan/radix_sort: Stop force-unrolling loops
This is really bad for compile times in lavapipe. Compiling a shader
with all loops unrolled can take 2 seconds. nir and llvm should be smart
enough to unroll thos themselves if it's beneficial.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
c387699c7b vulkan/cmd_queue: Add VK_CMD_TYPE_COUNT
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Konstantin Seurer
5543272ceb vulkan/cmd_queue: Simplify freeing cmd_queue entries
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
2025-02-15 09:55:52 +00:00
Rebecca Mckeever
55f4da7bbf panvk: Use vk_image_can_be_aliased_to_yuv_plane() helper
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33460>
2025-02-15 05:39:33 +00:00
Rebecca Mckeever
f419a0bc4e vk/image: Add vk_image_can_be_aliased_to_yuv_plane() helper
vk_image_can_be_aliased_to_yuv_plane() checks whether an image has a
format that is compatible with a plane of a multiplane image and can be
aliased to it.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33460>
2025-02-15 05:39:33 +00:00
Roland Scheidegger
24076eb3f9 llvmpipe: Fix overflow issues calculating loop iterations for aniso
iceil can return bogus (negative) values in case there's an overflow
(or a NaN). This would then take forever to run due to a couple billion
loop iterations.
Use unsigned minimum instead which will clamp iterations to max aniso
(not sure if that makes more sense than clamping negative values to 0,
probably doesn't really matter).

Fixes: 350a0fe632 ("llvmpipe: Use a simpler and faster AF implementation")

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33537>
2025-02-15 04:08:02 +00:00
Lorenzo Rossi
cc30e35306 nvk: fix preprocess buffer alignment
Previously DGC alignment requirements declared by
getGeneratedCommandsMemoryRequirementsExt were not also reported by
getDeviceBufferMemoryRequirements for preprocess buffers.

This fixes 1554 dEQP-VK failures related to device-generated commands
that previously failed with "DGC alignment requirement larger than
preprocess buffer alignment requirement".

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33555>
2025-02-14 22:56:59 +00:00
Lionel Landwerlin
a9b6a54a8c brw: fix component packing starting index
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6845dede59 ("brw: add support for no VF input slot compaction")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33553>
2025-02-14 20:17:54 +00:00
Caterina Shablia
94093f58fb panvk: enable uniformBufferStandardLayout
We already implement scalarBlockLayout, which is more general than
uniformBufferStandardLayout, so this is a trivial enable for us.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33291>
2025-02-14 18:06:44 +00:00
Caterina Shablia
7a7f01bda0 panvk: enable imagelessFramebuffer
This is handled by mesa vk runtime so is a trivial enable for us.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33291>
2025-02-14 18:06:44 +00:00
Simon Ser
5a19323d0e gbm: fix get_back_bo() failure with gbm_surface and implicit modifiers
Before 361f362258 ("dri: Unify createImage and
createImageWithModifiers"), gbm_surface_create_with_modifiers() would
fail with ENOSYS on drivers missing explicit modifiers support. After
that commit, it succeeds and fails later when it tries to allocate a
new back buffer.

Restore the previous behavior.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 105fcb9cfd ("dri: revert INVALID modifier special-casing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12283
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32726>
2025-02-14 16:41:07 +00:00
Aaron Ruby
d926704183 gfxstream: Clean up the gfxstream_vk device and instance init
Reviewed-by: Serdar Kocdemir <kocdemir@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33449>
2025-02-14 15:38:35 +00:00
David Rosca
4e4cfa682d frontends/va: Use transfer stride and offset in DeriveImage
This should use the stride and offset from transfer, because
the values from resource_get_info may not match the mapped
memory if the driver uses staging texture for transfer.
This also gives us data size and we don't need to calculate
it for each format.

Unfortunately we only know the values when mapping the buffer,
but VAAPI requires the values when creating the image and at
that point we don't know the usage yet (read/write).
Do a dummy map of all planes first time DeriveImage is called
for each surface and cache the values for subsequent calls.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32326>
2025-02-14 15:20:52 +00:00
Erik Faye-Lund
63c6f3e0f0 panvk: rename helper
This function is no longer the only concept we have of "Vulkan version",
so let's rename it to reflect that it's only about the API-versin. We
don't really need to specify that it's about Vulkan versions, that seems
pretty obvious here.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33254>
2025-02-14 15:13:09 +01:00
Erik Faye-Lund
2653a3988f panvk: report passing the VK CTS
This will be needed in order to check off passing the VK CTS properly.

Please note, this does *not* mean that we are formally conformant, only
that we have passed the VK CTS at least once. Those are not the same
thing.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33254>
2025-02-14 15:13:04 +01:00
David Rosca
56b2742814 ci/amd: Remove VAAPI skips
Not needed anymore.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33544>
2025-02-14 13:47:45 +00:00
Konstantin Seurer
3ded0051b5 lavapipe: Fix maintainance7 descriptor set limits
Fixes dEQP-VK.api.maintenance7.total_dynamic_buffers_properties.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31749>
2025-02-14 13:16:12 +00:00
Michael Cheng
9ad427c000 Revert "anv: Fix missing Perfetto trace for as build"
When collecting Perfetto traces on ANV, we should always be
running with MESA_GPU_TRACES=perfetto, and not rely on dynamic
enablement via pps-producer.

This reverts commit 873ad6b6d5.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33530>
2025-02-14 08:10:11 +00:00
Hyunjun Ko
9f9e95e9d5 anv: fix maxDpbSlots and maxActiveReferencePictures for AV1 decoding.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33535>
2025-02-14 07:47:05 +00:00
Emma Anholt
98efca9207 ci/anv: Enable testing with Vulkan video encode/decode.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25384>
2025-02-14 01:21:20 +00:00
Emma Anholt
d62610778a mesa/ffvs: Skip doing redundant stores of .xyz when doing lighting calculation.
Previously, we stored the full color output before lighting, then compute
lighting and store just the .xyz of the result to .xyz.

We can save followup optimization work to clean up the unused .w
calculations during lighting, and DCEing the first .xyz store if we just
store .w when it's done, and only do lighting on .xyz.  Some of that
redundant store work may not have been happening on all backends.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33501>
2025-02-13 22:23:02 +00:00
Eric R. Smith
18a14c4522 panfrost: fix backward propagation of values in loops
bi_opt_mod_prop_backward tries to propagate values backwards, but
stops checking for uses when it reaches the SSA definition. For
ordinary blocks that's fine, but for loops the definition can come
after a PHI that uses the value. This causes incorrect code to be
generated in shaderdb test `shaders/skia/2134.shader_test`. Fix this
by special casing PHI instructions, in a manner similar to done in
asahi/compiler/agx_optimizer.c.

This bug has been present a long time, so we want it back-ported to
stable.

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33483>
2025-02-13 21:48:43 +00:00
Mel Henning
11b8c8b8e6 nak,nir: Add 64-bit lea_nv
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Mel Henning
c92a92e72b nak: Add OpLeaX
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Mel Henning
0470643047 nak,nir: Add 32-bit nir_op_lea_nv and use it
Changes code size by -0.80% on shaderdb.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Mel Henning
54fcc63d3e nak: Add OpLea
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32517>
2025-02-13 17:36:41 +00:00
Yiwei Zhang
ff64092ff3 venus: support VK_EXT_sample_locations
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
ae3bc10d58 venus: refactor to share more codes between pipeline state fillings
A lot of codes can be shared for filling states of fragment shader and
fragment output interface.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
7c28f614a4 venus: support VK_EXT_blend_operation_advanced
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
a7fccbbf85 venus: fix to handle pipeline flags2 from maint5
Fixes: be6fece6e1 ("venus: enable VK_KHR_maintenance5")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
a7adf8db67 venus: group private data together with other 1.3 exts
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Yiwei Zhang
f656ca6a13 venus: sync venus protocol for below extensions
VK_EXT_blend_operation_advanced
VK_EXT_sample_locations

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
2025-02-13 17:12:58 +00:00
Andrew Wolfers
92370f63ab vulkan: Add BGRA format support
This change adds handling to convert between the VULKAN and
AHARDWAREBUFFER enum values for the BGRA_8888 buffer format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33485>
2025-02-13 16:10:57 +00:00
Mohamed Ahmed
8a71b21c2e nvk: Set NIL_IMAGE_USAGE_VIDEO_BIT for images meant for video usage
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
7d21d17b01 nil: Force smallest block size for images meant for Vulkan Video
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
54fed0536d nil: Use multiplanar init_info during image creation
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
b2ca04ec78 nvk: Add NVK_MAX_SAMPLER_PLANES for samplers
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Mohamed Ahmed
8c70c8f60f nvk: Add NVK_MAX_IMAGE_PLANES for images
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33453>
2025-02-13 15:16:36 +00:00
Lionel Landwerlin
db53e53bf6 brw: add documentation about slot compaction & component packing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
6845dede59 brw: add support for no VF input slot compaction
Normally the driver & compiler work together to use as few
3DSTATE_VERTEX_ELEMENTS/VERTEX_BUFFER_ELEMENT data as possible.

The compiler ignores unused bits and driver avoids emitting the
corresponding elements in 3DSTATE_VERTEX_ELEMENTS.

For device generated commands, we want an 3DSTATE_VERTEX_ELEMENTS
programming that is independent from the shader so that we can
implement indirect pipeline binding without complicating the
generation shader as well as emitting fewer generated commands.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
f19c5f4fcc brw: use meaningful io locations for system values
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
6b99bf76ca anv: ensure Wa_16012775297 interacts correctly with Wa_18020335297
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dddd765553 ("anv: implement VF_STATISTICS emit for Wa_16012775297")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
a85717f313 anv: enable vertex fetching component packing
DG2 a/b testing:
   Borderlands3	 -0.55%
   Cyberpunk     +0.38%
   Superposition -0.67%

The shader stats mostly don't look like an improvement :

DG2 shader stats:

  Blackops 3:
  Totals from 265 (16.44% of 1612) affected shaders:
  Instrs: 109055 -> 109080 (+0.02%); split: -0.01%, +0.04%
  Cycle count: 6166549 -> 6021371 (-2.35%); split: -2.53%, +0.17%

  Cyberpunk 2077:
  Totals from 297 (23.50% of 1264) affected shaders:
  Instrs: 197305 -> 197297 (-0.00%); split: -0.03%, +0.02%
  Cycle count: 3374325 -> 3356562 (-0.53%); split: -1.23%, +0.70%

  Fortnite:
  Totals from 2090 (27.97% of 7471) affected shaders:
  Instrs: 1777944 -> 1781070 (+0.18%); split: -0.01%, +0.18%
  Cycle count: 25188758 -> 25162910 (-0.10%); split: -0.86%, +0.76%
  Spill count: 1439 -> 1729 (+20.15%); split: -0.69%, +20.85%
  Fill count: 1226 -> 1395 (+13.78%); split: -0.82%, +14.60%
  Scratch Memory Size: 122880 -> 138240 (+12.50%); split: -1.67%, +14.17%

  Hitman 3:
  Totals from 490 (9.09% of 5392) affected shaders:
  Instrs: 407489 -> 407486 (-0.00%); split: -0.00%, +0.00%
  Cycle count: 1831149 -> 1831890 (+0.04%); split: -0.33%, +0.38%

  Metro Exodus:
  Totals from 4169 (9.68% of 43076) affected shaders:
  Instrs: 817730 -> 817726 (-0.00%); split: -0.00%, +0.00%
  Cycle count: 4646954 -> 4641559 (-0.12%); split: -0.61%, +0.50%

Xe2 shader stats :

  Blackops 3:
  Totals from 283 (19.46% of 1454) affected shaders:
  Cycle count: 7662980 -> 7916316 (+3.31%); split: -0.38%, +3.69%

  Cyberpunk 2077:
  Totals from 329 (26.79% of 1228) affected shaders:
  Instrs: 203312 -> 203327 (+0.01%); split: -0.01%, +0.02%
  Cycle count: 4415812 -> 4434906 (+0.43%); split: -0.69%, +1.12%

  Fortnite:
  Totals from 1981 (30.18% of 6565) affected shaders:
  Instrs: 1709583 -> 1711379 (+0.11%); split: -0.00%, +0.11%
  Cycle count: 26882682 -> 26914014 (+0.12%); split: -0.66%, +0.78%
  Spill count: 863 -> 1020 (+18.19%)
  Fill count: 1195 -> 1271 (+6.36%)
  Scratch Memory Size: 116736 -> 122880 (+5.26%)

  Hitman 3:
  Totals from 540 (10.56% of 5115) affected shaders:
  Instrs: 478993 -> 478994 (+0.00%)
  Cycle count: 3198740 -> 3198416 (-0.01%); split: -0.27%, +0.26%

  Metro Exodus:
  Totals from 4554 (12.28% of 37071) affected shaders:
  Cycle count: 6460340 -> 6475666 (+0.24%); split: -0.38%, +0.62%

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
462d8e3fab anv: disable VF statistics for memcpy
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
ca66f22e90 blorp: emit 3DSTATE_VF
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
4f892ae4f7 brw: enable vertex fetching component packing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
9b8d75c95c brw: add a max HW vertices attribute limit
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
fae8d325a7 brw: update vulkan max attribute limit
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
bae9344baf brw: port vs input to lower_64bit_to_32_new
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
e9e4aa0f29 brw: remove nr_attribute_slots from vs_prog_data
It's not used outside of the compiler.

We add a new nr_attribute_regs which now seems useless but will be
useful in a later change.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
c00830083e brw: fix indentation
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
2a8dddb519 genxml: add convenience dwords for packing components
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Lionel Landwerlin
e40f47abd3 genxml: make component packing an array
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
2025-02-13 14:36:15 +00:00
Eric R. Smith
c7fed8b053 panfrost: fix YUV center information for 422
It turns out that the change from CENTER_Y to CENTER_X for
422 YUV didn't actually happen until generation 14 of the
hardware, not generation 10 as some documents claimed. This
fixes the failing piglit tests ext_image_dma_buf_import-sample_yuv
associated with 422 formats (which apparently we aren't running on CI).

Fixes: 23aa784c
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33516>
2025-02-13 14:06:59 +00:00
Valentine Burley
2e48bcf064 ci/angle: Uprev ANGLE
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33513>
2025-02-13 13:21:10 +00:00
Valentine Burley
5eea8f6fe8 intel/ci: Fix manual rules for ANGLE jobs
Disable auto-retry for .intel-manual-rules to prevent unnecessary reruns
and switch ANGLE jobs from this rule to .anv-manual-rules, as there’s no
point in running anv-on-angle jobs on iris changes.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33513>
2025-02-13 13:21:09 +00:00
Valentine Burley
93569f3a8f ci/angle: Use lld-19 for linking ANGLE
This fixes the linking issues on newer ANGLE versions.

Fixes: 9707746b2d ("ci/lava: Build ANGLE for arm64")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33513>
2025-02-13 13:21:09 +00:00
Samuel Pitoiset
e977c6968f radv/meta: add radv_{copy,fill,update}_memory() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:48:09 +01:00
Samuel Pitoiset
7aa4c81744 radv: rename fill/copy memory helpers
memory seems more appropriate than buffer because they operate on VAs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:47:14 +01:00
Samuel Pitoiset
69bf2a13f8 radv/meta: inline copy_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:43:30 +01:00
Samuel Pitoiset
5684c1687c radv/meta: disable conditional rendering for fill/update buffer operations
These commands shouldn't be affected by conditional rendering, similar
to the copy buffer operation.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:43:30 +01:00
Samuel Pitoiset
5d6e4d3b25 radv/meta: remove the heuristic that prefers CP DMA for GTT BOs
This is actually slower on my side. Tested the copy_buffer/fill_buffer
benchmarks from crucible on NAVI31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
2025-02-13 13:43:30 +01:00
Mary Guillemard
7881e48321 panvk: Switch JM clear queries to CLC
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32721>
2025-02-13 11:50:06 +00:00
Mary Guillemard
3ed5557baf panvk: Switch JM copy queries to CLC
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32721>
2025-02-13 11:50:06 +00:00
Alyssa Rosenzweig
c51a2e85d8 libcl/vk: add common query copy write routine
every VK driver ends up wanting this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32721>
2025-02-13 11:50:06 +00:00
Maíra Canal
db4d7a3032 v3dv: VK_EXT_acquire_drm_display doesn't require a DRM master fd
When using VK_EXT_acquire_drm_display, the Vulkan API user must provide
the DRM master fd that will be used. This operation is performed through
`vkAcquireDrmDisplayEXT()` in which `drmFd` will be assigned to
`wsi->fd` and will be used for privileged operations.

This means that, when we are creating the physical device, we need to
open a DRM primary node (as the specification states that "The provided
drmFd must correspond to the one owned by the physicalDevice."), but it
doesn't need to be the DRM master.

Therefore, when using VK_EXT_acquire_drm_display, keep the primary fd
open and don't check if the fd is the DRM master.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33096>
2025-02-13 11:28:42 +00:00
Daniel Schürmann
6395c6d6d1 nir/validate: validate divergence metadata
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:44 +00:00
Daniel Schürmann
bc810e98d4 nir/serialize: don't serialize divergence information
We don't serialize metadata.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:44 +00:00
Daniel Schürmann
63a656797b nir: only print divergence information if metadata is valid
This disables printing of vertex divergence as well as outdated
divergence information. Also remove info::divergence_analysis_run
and use nir_metadata_divergence instead.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:44 +00:00
Daniel Schürmann
1d6082bf56 nouveau: switch to nir_metadata_divergence
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
175c06e5cd intel: switch to nir_metadata_divergence
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
067478358f amd: switch to nir_metadata_divergence
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
86fd673ade nir: require nir_metadata_divergence if needed
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Daniel Schürmann
01f2d494d0 nir: make divergence information metadata
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Rhys Perry
de4320d45d radeonsi: fix invalidation of metadata in si_nir_lower_abi
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30814>
2025-02-13 10:08:43 +00:00
Christian Gmeiner
e1cc8ffd5f etnaviv: isa: Add swizzle instruction
Based on observations of the generated assembly, this instruction appears to:
 - Swizzle the 8/16 component vector in src0 according to the pattern defined in src1.
 - Apply a enable mask from src2 to selectively modify elements.

I encountered this instruction while experimenting with _viv_asm and
packed types.

Here is one exmaple kernel:

kernel void k(global int* out, int a, int b) {
  _viv_char2_packed s;

  _viv_asm(MOV, s.x, s, a);
  _viv_asm(MOV, s.y, s, b);

  out[0] = s.x + s.y;
}

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33474>
2025-02-13 09:23:49 +00:00
Job Noorman
96887a5ec1 ir3/isa: fix (dis)asm of ldg.a/stg.a on a6xx
We currently assume the implicit offset shift is always 2. However, this
shift is actually based on the type, making sure the offset fields are
in units of the type size. The full offset calculation is as follows:

    ((SRC2<<SRC2_SHIFT) + OFF)<<TYPE_SHIFT

Where SRC2, SRC2_SHIFT, and OFF are instruction fields while TYPE_SHIFT
is implicit and derived from the TYPE field.

This commit implements (dis)assembly support for this, adopting the
syntax used by the blob.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33503>
2025-02-13 08:01:58 +00:00
Job Noorman
5a8193e657 ir3/parser: add helper to generate syntax errors based on gen
The assembly syntax of certain instructions differs significantly
between generations (e.g., ldg.a/stg.a) so it's useful to be able to
generate syntax error based on the generation we are assembling for.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33503>
2025-02-13 08:01:58 +00:00
Samuel Pitoiset
605f94520f radv: simplify determining VBO size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33506>
2025-02-13 08:35:21 +01:00
Timur Kristóf
89cc4d9807 nir: Remove struct keyword from nir.h where possible.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 23:20:15 +01:00
Timur Kristóf
99054350ec nir: Don't include u_format.h in nir.h, it's not actually used.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 23:20:15 +01:00
Timur Kristóf
76061b7fa3 nir: Don't include u_printf.h in nir.h, only where necessary.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 23:20:12 +01:00
Timur Kristóf
05df30f95a nir: Don't include bitscan.h in nir.h, it's not actually used.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
e75eeaf2bd nir: Don't include xxhash.h in nir.h, only where it is used.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
8260de6170 nvk: Don't include full nir.h in nvk_shader.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
64887de2af nak: Don't include full nir.h in nak.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
5fd809b195 ttn: Don't include full nir.h where not necessary.
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
e0107f4ffb zink: Don't include full nir.h where not necessary.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
b412e29027 hk: Don't include full nir.h in hk_shader.h
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
666f10c174 radv: Add missing includes and remove unnecessary NIR includes.
RADV won't compile without the added includes after we
stop including the full nir.h from the VK common functions.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
a91f105e5b ac: Don't include full nir.h anymore.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
147e17e999 aco: Don't include nir.h in aco_interface.h anymore.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
91c28f67e6 ac/nir: Move surface related NIR functions to separate file.
This is to stop including nir related stuff in places that
actually don't need that.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
305944def9 ac/nir: Don't include nir.h in headers anymore.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
480c7100d8 glsl: Don't include full nir.h where not necessary.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f0966f7ac8 vk: Don't include full nir.h in headers.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
23222346f3 spirv: Don't include full nir.h in nir_spirv.h
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
94996d546c nir: Don't include the full nir.h when not necessary.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
1ebe06f8f0 nir: Don't include full nir.h in nir_xfb_info.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
2385ac06fc nir: Move nir_shader_compiler_options to separate file.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
cccd3aa45c nir: Move nir_tcs_info to separate file.
The nir_tcs_info struct is like nir_xfb_info in the sense that
it's very specialized and not often used, so it deserves its own
header too.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
a6247319e7 nir: Move some enums and structs to nir_defines.h
These are necessary if we want to stop including the full nir.h
in most places accross the code base.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f699ceecc7 nir: Add forward declarations of relevant structs to nir_defines.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f1292bd03e nir: Add missing extern "C" to nir_defines.h
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
f4c80b419f nir: Add struct names where they were missing.
This will allow forward declaring these in a subsequent commit.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:07 +01:00
Timur Kristóf
c58c9e0359 util/enum_operators: Don't define anything for OpenCL
This file is going to be included in some headers that are shared
between normal C++ and OpenCL. And sadly OpenCL can't handle this.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33439>
2025-02-12 22:33:06 +01:00
Connor Abbott
a724e1571f tu: Implement "absolute" bin mask on a750
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
faafcdf0be freedreno: Add a750+ "absolute" VSC bin mask
This will let us avoid some corner cases where bin merging isn't
possible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
3fdaad0948 tu: Implement bin merging for fragment density map
This will let us merge compatible bins with a larger-than-1 fragment
area, reducing tile load/store overhead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
ab79e0de82 freedreno: Add VSC mask parameter to CP_SET_BIN_DATA5
This was added on a730, and specifies a mask of extra bins to include.
It's used to implement bin merging, creating larger bins out of
compatible smaller bins.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
b1756665a6 tu: Refactor fragment density map sampling
For bin merging, we will have to first sample all bins in the pipe, then
determine which bins can be merged, then iterate over bins. Combine all
of the information required to render a bin into a tu_tile_config struct
and pass it down to tu6_emit_tile_select(). This will let us more
flexibly construct a list of bins later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:34 +00:00
Connor Abbott
469ba3a07b tu: Constify frag_areas argument of tu_fdm_bin_apply_t
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33230>
2025-02-12 19:08:33 +00:00
Eric Engestrom
e41438275e ci: debian-testing-ubsan is used by tests
Fixes: 37ee035e42 ("ci/build: add ubsan build jobs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33509>
2025-02-12 17:19:45 +00:00
Martin Roukala (né Peres)
dc7660d852 zink/ci: document more GA106 flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
3c370aa572 zink/ci: document more radv flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
c70a2526de radv/ci: document more flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
8097c002d1 radv/ci: set a tight timeout on vkcts-navi31
These jobs need to run in pre-merge, so let's make sure their execution
time remains in check so as not to block merges due to non-merge
pipelines.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
7f75ad546d radv/ci: reduce Renoir concurrency in vkcts
Deqp randomly dies at the beginning of VKCTS, which fails most
pipelines.

Reducing the job concurrency fixes the issue, so let's roll with that
until I go buy more RAM for this machine.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Martin Roukala (né Peres)
82a41bb8e3 radv/ci: add testing on RAPHAEL
This is the RDNA2 iGPU integrated in all the 7000 series of AMD CPU.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33486>
2025-02-12 16:51:19 +00:00
Eric Engestrom
c56835e470 docs: update calendar for 25.0.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33515>
2025-02-12 16:39:27 +00:00
Mary Guillemard
154c7b0d23 pan/bi: Fix scratch access optimization
This was causing a crash on
"dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp" where the
test was trying to allocate ~6GB of TLS.

Considering we were already doing something identical before those changes,
we can just add nir_lower_scratch_to_var before nir_lower_vars_to_scratch
to get the expected behavior (Cleaning LLVM spilling mess around pan_pack)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 1619fc596a ("bi: Optimize scratch access")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33510>
2025-02-12 17:02:32 +01:00
Eric Engestrom
55bd96d038 ci: rename generate-env.sh to export-gitlab-job-env-for-dut.sh
This makes it clearer what this script does.

Reviewed-by: Vignesh Raman <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33037>
2025-02-12 14:25:30 +00:00
Eric Engestrom
49a04bb41e ci: finish sorting vars
A few stragglers were slightly out of place, and a couple (S3 & LVP)
were completely off.

Reviewed-by: Vignesh Raman <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33037>
2025-02-12 14:25:30 +00:00
Eric Engestrom
7b018945e8 ci/yaml-toml-shell-py-test: run on direct push pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33412>
2025-02-12 13:36:13 +00:00
Eric Engestrom
c8ad134d46 ci/yaml-toml-shell-py-test: don't run on post-merge pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33412>
2025-02-12 13:36:13 +00:00
Iago Toral Quiroga
45f9208cca v3dv: improve handling of trailing barriers
When a command buffer ends with pending barriers we were emitting a
serialized noop job, but this only works to ensure serialization of
follow-up CL jobs, it won't do what we want if the barrier was
intended for compute or TFU transfers for example. Fix this by
merging the barrier state into follow-up jobs in the same queue
submission.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33507>
2025-02-12 13:15:12 +00:00
Iago Toral Quiroga
c6264c641d v3dv: make cmd_buffer_serialize_job_if_needed take a barrier state
Instead of the cmd_buffer. Also, rename it to drop the cmd_buffer
reference, make it a public helper, make it accumulate the
barrier state instead of overwriting it and make it return whether
it actually applies a barrier into the job.

We will use this new public helper in a follow-up change from the
queue to better handle barriers at the end of a command buffer.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33507>
2025-02-12 13:15:12 +00:00
Iago Toral Quiroga
71b711ad82 v3dv: rename v3dv_cmd_buffer_merge_barrier_state
This helper doesn't use a command buffer, so drop that from the name.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33507>
2025-02-12 13:15:12 +00:00
Timur Kristóf
df0798a40c radv: Add missing copyright info to radv_meta_buffer.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
6b57cc2fbf radv: Rename get_global_ids to radv_meta_nir_get_global_ids.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
09db738c9a radv: Move NIR specific function declarations to radv_meta_nir.h
Also rename some functions for consistency with other functions,
and slightly change the includes.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
f6a02d034b radv: Move NIR helpers from radv_meta.c to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
c093b03213 radv: Move resolve NIR fs to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
b360474821 radv: Move resolve NIR fragment shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
16f6123c1e radv: Move resolve NIR compute shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
538c391022 radv: Move FMASK expand NIR shader to radv_nir_meta.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
dccf698e1b radv: Move FMASK copy NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
6ceafe2afa radv: Move DCC decompress NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
b6eb2f52ce radv: Move expand depth stencil NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
4837d1c457 radv: Move DCC retile NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
113c8d0e77 radv: Move VRS HTILE copy NIR shader to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
ea182f797a radv: Move clear NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
59517d9aa6 radv: Move buffer-image copy and clear NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
1c3585021c radv: Move blit2d NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
f599a2e435 radv: Move blit NIR shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Timur Kristóf
c8842d19ed radv: Move buffer related NIR meta shaders to radv_meta_nir.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33494>
2025-02-12 11:44:18 +00:00
Danylo Piliaiev
85b5eec159 tu: Add info about debug options to command buffer tracepoint
That way it's much easier to understand which debug options
are applied to specific process.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:31 +00:00
Danylo Piliaiev
d9f054320a tu: Add gmem disable reason to renderpass tracepoint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:31 +00:00
Danylo Piliaiev
5c87616d96 util: Add dump_debug_control_string to dump debug_control
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:30 +00:00
Danylo Piliaiev
0886eda4f1 util: Make debug_dump_flags thread safe
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
2025-02-12 10:57:30 +00:00
Zan Dobersek
30a3d567c8 tu/a750: invalidate vertex state before CP_DRAW_INDIRECT_MULTI
For devices that load shader consts through preamble, HLSQ_INVALIDATE_CMD
should be used to invalidate VS state before CP_DRAW_INDIRECT_MULTI. This
avoids previous consts loaded through CP_LOAD_STATE6_GEOM for non-indirect
draws to affect the consts needed for the current indirect draw.

Fixes two failing vkd3d-proton test cases on a750:
  test_vertex_id_dxbc
  test_vertex_id_dxil

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32924>
2025-02-12 10:30:50 +00:00
Mel Henning
f887ae2f3c driconf: force_vk_vendor on Deep Rock Galactic+NVK
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33502>
2025-02-12 09:54:29 +00:00
Valentine Burley
ffdfb0539b ci/android: Add build section for Cuttlefish
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Valentine Burley
9707746b2d ci/lava: Build ANGLE for arm64
We're going to introduce arm64 ANGLE jobs shortly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Valentine Burley
05021a1786 ci/angle: Rework building ANGLE (again)
Make setting the ANGLE_ARCH variable optional by providing a default
based on DEBIAN_ARCH, while keeping it possible to override it, which is
expected to be necessary for the Android-arm64 build.

Exclude unnecessary third party dependencies in the .gclient file, which
allows us to delete our first local patch. Thanks to Yuly Novikov for the
suggestion.

Use -no-history for gclient sync, which is equivalent to git's --depth=1
argument. This greatly speeds up the process of fetching sources.

Thanks to this speedup fetching third_party/catapult is no longer an
issue, allowing us to remove our second local patch.

Since we're no longer applying local patches, use ANGLE_REV and
/angle/version as the base for our version check on Android.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Daniel Stone
f535d5d591 ci/angle: Use native toolchain for builds
ANGLE really wants to use its own toolchain and sysroot by default.
Unfortunately, for AArch64, that toolchain is actually a cross-compiling
toolchain designed to be hosted on x64, which is ... not what we want.

Use the system toolchain, and since we're not using the bundled
compiler, also don't use LLVM's libc++ and abseil, since those don't
always work with the system toolchain.

v2 (Valentine)
 * Only use native toolchain on linux
 * Contain clang-19 environment variables within a subshell

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33467>
2025-02-12 09:03:48 +00:00
Samuel Pitoiset
4306831a4a radv: use BDA for the uploaded parameters with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33493>
2025-02-12 08:02:30 +00:00
Samuel Pitoiset
990244f7e2 radv/meta: use BDA for copying VRS rates to HTILE
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33493>
2025-02-12 08:02:30 +00:00
Samuel Pitoiset
e3cd101c17 radv/meta: use BDA for clear HTILE mask
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33493>
2025-02-12 08:02:30 +00:00
Samuel Pitoiset
13e987669c radv/video: fix missing image offset when computing VA
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33496>
2025-02-12 07:38:29 +00:00
Eric Engestrom
b08f9a2dbd ci: run containers builds on staging branches
Fixes: 7152f343d6 ("ci: only trigger the CI for release managers when pushing to staging branch")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33468>
2025-02-12 07:06:02 +00:00
Job Noorman
c6a932d4b3 ir3/ra: handle phis with preferred regs first
Handle phis in two groups: first those which already have a preferred
reg set and then those without. The second group should be rare but by
handling them last, they don't accidentally occupy a preferred reg of
another phi, preventing excessive copying in some cases.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33489>
2025-02-12 06:38:30 +00:00
Job Noorman
922bfe4b6e ir3: add braces around complex if/else block
Will need to add code to one of the blocks in the next commit.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33489>
2025-02-12 06:38:30 +00:00
Sagar Ghuge
2e0d5ccd91 intel/compiler: Drop primitive leaf desc load code
Looks like we are not using the primitive leaf desc loading code part at
all. Let's just drop it.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33497>
2025-02-12 05:23:05 +00:00
Mike Blumenkrantz
52dfe1e955 zink: never try to oom flush during unsync texture upload
this is very broken

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33484>
2025-02-12 02:35:45 +00:00
Mike Blumenkrantz
2304078261 zink: only enable unsynchronized_texture_subdata with HIC
this is otherwise useless

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33484>
2025-02-12 02:35:45 +00:00
Michael Cheng
873ad6b6d5 anv: Fix missing Perfetto trace for as build
The as_build and related functions only appear when MESA_GPU_TRACES=
perfetto is set. By default, when running an RT workload for profiling,
these traces should be recorded alongside other trace points. This
commit ensures that acceleration structure build events are properly
captured when running an RT workload.

v2(Michael Cheng): Move this logic up to anv_device_init_accel_struct_build_state

v3(Michael Cheng): Set emit_markers = true and let the generated
functions handle the check for u_trace_enable and intel_gpu_tracepoint

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33461>
2025-02-12 00:13:39 +00:00
David Rosca
441252e9e1 radeonsi/uvd: Set correct chroma format for H264 decode
Fixes decoding monochrome (chroma_format_idc = 0).

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
2025-02-11 23:38:26 +00:00
David Rosca
110d406302 radeonsi/vcn: Set correct chroma format for H264 decode
Fixes decoding monochrome (chroma_format_idc = 0).

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
2025-02-11 23:38:26 +00:00
David Rosca
c28702c35a frontends/vdpau: Set H264 chroma_format_idc
We don't get the actual value from VDPAU, so hardcode to 4:2:0.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
2025-02-11 23:38:26 +00:00
Rhys Perry
d946a753e3 aco/ra: unconditionally call undo_renames
There's no real reason to not do this more.

fossil-db (navi21):
Totals from 2615 (3.29% of 79377) affected shaders:
Instrs: 4729505 -> 4729484 (-0.00%); split: -0.00%, +0.00%
CodeSize: 25210992 -> 25210036 (-0.00%); split: -0.00%, +0.00%
Latency: 31572966 -> 31572435 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 6918552 -> 6918560 (+0.00%); split: -0.00%, +0.00%
VClause: 132152 -> 132116 (-0.03%); split: -0.03%, +0.00%
SClause: 98595 -> 98575 (-0.02%); split: -0.04%, +0.02%

fossil-db (polaris10):
Totals from 1039 (1.68% of 61794) affected shaders:
Instrs: 708761 -> 708766 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3588772 -> 3588792 (+0.00%); split: -0.00%, +0.00%
Latency: 7458892 -> 7459513 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 3494669 -> 3494722 (+0.00%); split: -0.00%, +0.00%
VClause: 16754 -> 16737 (-0.10%)
SClause: 18190 -> 18156 (-0.19%); split: -0.49%, +0.31%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33444>
2025-02-11 23:10:37 +00:00
Rhys Perry
b94b4188a6 aco/ra: reverse renaming of operands outside update_renames
This lets us remove some special casing from update_renames and make it
simpler. Doing this in update_renames was also fragile, since the
parallelcopies vector is not final when update_renames is called, so it
might not have been safe to do so in the end.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33444>
2025-02-11 23:10:37 +00:00
Rhys Perry
ebc7355962 aco: validate operands fixed to definitions
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33444>
2025-02-11 23:10:37 +00:00
Lionel Landwerlin
4864c0a5fc anv,driconf: Add sampler coordinate precision workaround for Dynasty Warriors
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12584
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33488>
2025-02-11 22:33:24 +00:00
Lionel Landwerlin
57efd752fb anv: support protected surfaces with display platform
Because our buffer are flagged as protected at the GEM level, we can
just passed them to the display driver and it'll do the right thing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
2025-02-11 22:03:09 +00:00
Lionel Landwerlin
53762e75e8 vulkan: allow support for protected surfaces
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
2025-02-11 22:03:09 +00:00
Lionel Landwerlin
e722665d65 vulkan/wsi: propagate protected swapchain to images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26182>
2025-02-11 22:03:09 +00:00
Christian Gmeiner
513ba040fc docs: Add perfetto driver specifics for V3D
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33348>
2025-02-11 21:01:40 +00:00
Christian Gmeiner
9b6525809e docs: Update the list of drivers with CPU tracepoints
Turnip has supported this feature for some time, and v3dv recently added support.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33348>
2025-02-11 21:01:40 +00:00
Christian Gmeiner
5880a4bb55 docs: Update perfetto with the latest status
v3dv supports PPS counters.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33348>
2025-02-11 21:01:40 +00:00
Juan A. Suarez Romero
68db5481f4 v3dv/ci: disable rpi5 job
It seems we have some issue with the driver, due the high number of
(random) flakes that appear in different jobs, and that eventually are
causing issues with Marge.

While we don't identify where is the problem, let's disable the job to
avoid interferences with Marge.

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33490>
2025-02-11 18:54:05 +00:00
Boris Brezillon
4ae12cc6ff panvk: Initialize device virtual address space after the VM creation
Make sure we're not lacking a lock/heap destroy when we fail to
create the VM.

Fixes: 53fb1d99ca ("panvk: Transition to explicit VA assignment on v10+")
Reported-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33471>
2025-02-11 18:26:31 +00:00
Boris Brezillon
5f3c6a0f27 panvk/csf: Don't free the resources twice when init_render_desc_ringbuf() fails
init_queue() calls cleanup_queue() if anything fails in the middle, which
means finish_render_desc_ringbuf() will be automatically called if
init_render_desc_ringbuf() failed. Get rid of the the error path and
return directly instead. The one exception we have is the dev_addr
allocation, which needs to be explicitly freed if an error occurs between
util_vma_heap_alloc() and pan_kmod_vm_bind().

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33471>
2025-02-11 18:26:31 +00:00
Faith Ekstrand
a4f3ec207d nak/repair_ssa: Use a worklist for get_ssa_or_phi()
Between Rust's love of the stack, the size of Rust objects, and the
number of parameters we have to pass in order to sort out lifetime
issues, Rust recursion can be quite expensive.  Combine that witn
Windows' tiny stack sizes and this call is blowing out the stack on
games running on DXVK and VKD3D-Proton.  This gets rid of this bit of
recursion and replaces it with a loop and a worklist.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33472>
2025-02-11 18:06:03 +00:00
Faith Ekstrand
dc82d7edff nvk: Fix a typo in a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33478>
2025-02-11 17:35:29 +00:00
Faith Ekstrand
6f64962f27 nvk: Fix scissor bounds
This code is old, copied from the old nouveau GL driver.  As of Pascal,
we have have 32k images so we need 32k scissors as well.  Use the
max_image_dimension() helper instead of hard-coding it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33478>
2025-02-11 17:35:29 +00:00
David Rosca
18f0807408 radeonsi/video: Fix creating video buffers with AMD_DEBUG=tmz
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:21 +00:00
David Rosca
b241a24724 radeonsi/vcn: Use texture instead of video buffer for DPB buffers
Video buffer would be allocated encrypted with AMD_DEBUG=tmz.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:21 +00:00
David Rosca
fcec81363e frontends/va: Switch to graphics context when creating protected surface
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:20 +00:00
David Rosca
62919ef9d0 frontends/va: Require protected context for VAProtectedSliceDataBuffer
Instead of switching the protected playback flag on when processing
first VAProtectedSliceDataBuffer, require the context to be created as
protected.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:20 +00:00
David Rosca
33c47da3fe frontends/va: Add CreateContext flag to enable protected context
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:19 +00:00
David Rosca
f83faf83e7 frontends/va: Don't try to switch to protected buffer in EndPicture
It doesn't work because the buffer was already allocated in BeginPicture.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
2025-02-11 16:01:19 +00:00
David Rosca
fdf747af3a radeonsi/video: Avoid stream handle duplicates in PID namespace
Add current time when generating the stream handle initial value.

When running inside PID namespace there can be multiple processes
in the system that will share the same PID and with current code
this could result in the same stream handle being used at the same
time from different processes.

This can easily happen with Flatpak when running two instances of the
same application - both processes will have the same PID and we
will use the same stream handles.

For older UVDs kernel will reject the CS if we use duplicated handles.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12575
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33374>
2025-02-11 15:34:33 +00:00
Samuel Pitoiset
8df1ffaa78 radv: use radv_buffer::addr more
And remove radv_buffer:offset.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
d92153e998 radv: compute radv_buffer::addr at bind time
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
e7e43f1437 radv: rename radv_buffer::bo_va to addr
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
f70af40c5d radv: pass addr to radv_copy_buffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
228903aeaf radv/rmv: pass addr to log_resource_bind_locked()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
1d58343b43 radv/video: pass addr to send_cmd()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:34 +00:00
Samuel Pitoiset
4987926e61 radv: remove unused device memory init/finish helpers
Also zero-allocate the vulkan object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
06ac711b06 radv/meta: simplify creating buffers for R32G32B32 operations
Not necessary to allocate things.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
1130478e5d radv/meta: compute the destination addr earlier for query resolves
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Samuel Pitoiset
230affd52b radv/meta: use BDA for query resolves
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33475>
2025-02-11 15:12:33 +00:00
Dmitry Baryshkov
6f3062dffa meson: add freedreno (turnip) Vulkan to arm64 defaults
On Aarch64 enable freedreno Vulkan driver (turnip) by default. It is
stable enough to be enabled by default on the relevant platform.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33462>
2025-02-11 14:35:16 +00:00
Georg Lehmann
f921b42c8c nir/print: print large floats as mantissa + exponent
This is silly:
con 64    %18698 = load_const (0xf0f0f0f0f0f0f0f0 = -107730874267432137203343331820822035577514310242782965586097631855966576162301880634213986293205127792322062538351156704152182839736964151026851280176102232488321269248467172131803507875122376996725092200401040958124190100858265776685056.000000 = -1085102592571150096 = 17361641481138401520)

This is better:
con 64    %18698 = load_const (0xf0f0f0f0f0f0f0f0 = -1.077309e+236 = -1085102592571150096 = 17361641481138401520)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33456>
2025-02-11 13:49:05 +00:00
Valentine Burley
6b0ba1109a zink/ci: Rename a618 suite and expectation files
Match the other zink files, including zink-tu-a630 and zink-tu-a750.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33466>
2025-02-11 13:12:33 +00:00
Valentine Burley
b90f5f305a freedreno/ci: Unify naming for a306 jobs
The a306 jobs were using files named a307 due to Qualcomm's confusing
naming scheme. While the GPUId for this GPU is 307, its marketing name
is Adreno 306.

To avoid confusion, align CI job naming with the marketing name rather
than the GPUId.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11951

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33466>
2025-02-11 13:12:33 +00:00
Mary Guillemard
98ea66eca8 ci: Enable mesa-clc and precomp-compiler on debian-arm32
panfrost requires those options.

Because we have LLVM on the host, we can build their requirement there
and source them from the system in the cross compilation part.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
63ede11492 ci: Transition to precomp-compiler
Panfrost now requires this options.
We set it on everything that does cross compilation except debian-x86_32
and debian-android (those don't have libdrm on the host side)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Daniel Stone
09c38c14ef ci: Build libdrm for Android host builds
Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
6438b3e2bd panfrost,panvk: Wire printf and abort support
Those are quite useful for debugging and having sanity checks in place.
It is also quite tidious to get ride of all asserts in every headers we
would ever want to use, lets just accept those now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
8adede1d44 panfrost: Implement precomp dispatch on Gallium
This handle JM and CSF but exclude Midgard.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
cc02c5deb4 panvk: Implement precomp dispatch
Implement dispatching of precompilled OpenCL C shaders in panvk.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
ab03752c4f panvk: Expose calculate_task_axis_and_increment on CSF
Going to be used by precomp.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
005703e5b5 panvk: Move TLS preparation logic to cmd_dispatch_prepare_tls
This will be reused for precomp.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
3d2cc01f8a panvk: Add create_shader_from_binary
This allows creation of a panvk_shader from raw binary.
This will be used by precomp shaders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
e67b146b03 panfrost: Integrate libpan in gallium driver
This allows to call libpan OpenCL C functions inside NIR builders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
f200747d13 panvk: Integrate libpan
This allows to call libpan OpenCL C functions inside NIR builders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
1619fc596a bi: Optimize scratch access
Follow AGX on this, LLVM cause quite a mess with pan_pack and create
uneeded spilling.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
20970bcd96 panfrost: Add base of OpenCL C infrastructure
This allows compiling CL shaders into a single SPIR-V library per arch,
NIR call bindings for each functions and precompilled binaries for each
entrypoints.

We are only going to support Bifrost and Valhall for this.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
410e5a36ec pan/genxml: Rework gen_pack.py to support OpenCL
This changes the codegen to make it compatible with CL C.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Mary Guillemard
97abab160b pan/genxml: Stop using "constant" for struct fields in xml defs
This conflict with OpenCL keyword "constant".

Thankfully we only have two occurance of this on each xml so this is a
small change.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720>
2025-02-11 12:33:23 +00:00
Danylo Piliaiev
21ec1cdea9 u_trace: print tracepoint params in csv output
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30589>
2025-02-11 12:00:18 +00:00
Caio Oliveira
ace5daabbd intel/compiler: Use -Werror=vla
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32965>
2025-02-11 11:25:48 +00:00
Patrick Lerda
bb44052ee9 r600: fix r600_init_shader_caps() has_atomics issue
Indeed, has_atomics is not yet initialized at the time of the
call of r600_init_shader_caps(). This change fixes this issue.

For instance, this issue is triggered with
"piglit/bin/clearbuffer-depth-cs-probe -auto -fbo":
clearbuffer-depth-cs-probe: ../src/gallium/drivers/r600/evergreen_state.c:5039: evergreen_emit_atomic_buffer_setup: Assertion `resource' failed.
Aborted

Fixes: 7cd606f01b ("r600: add r600_init_screen_caps")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33438>
2025-02-11 10:56:22 +00:00
liuqiang
c317778c67 intel/brw: Remove redundant condition in components_read()
DATA1 will be handled by the case reached in the fallthrough.

Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31782>
2025-02-11 10:33:42 +00:00
Caio Oliveira
ff44f4d278 intel/brw: Update outdated comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
5c55b29d1a intel/brw: Rename a few remaining functions to remove fs prefix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
c83ddaaa26 intel/brw: Rename fs_copy_prop_dataflow to brw_copy_prop_dataflow
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
cf3bb77224 intel/brw: Rename fs_visitor to brw_shader
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
352a63122f intel/brw: Rename files brw_fs.cpp/h to brw_shader.cpp/h
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
6b471e4e26 intel/brw: Merge brw_fs_visitor.cpp into brw_fs.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Caio Oliveira
f8a979466b intel/brw: Rename and move thread_payload types to own header
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32536>
2025-02-11 09:13:28 +00:00
Ian Romanick
1d485cc84f brw/copy: Allow constant propagation of some 64-bit integers
ADD, ASR, SHL, and SHR can mix D or UD sources with Q or UQ sources on
Gfx20. If the constant will fit in 32-bits, the type is changed so the
propagation can occur.

No shader-db changes on any Intel platform. No fossil-db changes on
any Intel platform other than Lunar Lake.

Lunar Lake
Totals:
Instrs: 210778940 -> 209472782 (-0.62%); split: -0.63%, +0.01%
Subgroup size: 14226752 -> 14227232 (+0.00%)
Cycle count: 30614834794 -> 30573250444 (-0.14%); split: -0.26%, +0.12%
Spill count: 507788 -> 504153 (-0.72%); split: -1.17%, +0.45%
Fill count: 622824 -> 613848 (-1.44%); split: -1.96%, +0.52%
Scratch Memory Size: 35826688 -> 35309568 (-1.44%); split: -1.67%, +0.23%
Max live registers: 65506213 -> 65434861 (-0.11%)

Totals from 126699 (17.93% of 706470) affected shaders:
Instrs: 63615321 -> 62309163 (-2.05%); split: -2.09%, +0.04%
Subgroup size: 2618160 -> 2618640 (+0.02%)
Cycle count: 3141888676 -> 3100304326 (-1.32%); split: -2.52%, +1.19%
Spill count: 454315 -> 450680 (-0.80%); split: -1.31%, +0.51%
Fill count: 533584 -> 524608 (-1.68%); split: -2.29%, +0.61%
Scratch Memory Size: 32182272 -> 31665152 (-1.61%); split: -1.86%, +0.26%
Max live registers: 14773917 -> 14702565 (-0.48%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
2025-02-11 08:44:33 +00:00
Ian Romanick
6d594196a6 brw/copy: Use extract_imm in try_constant_propagate_value
This is just a small refactor.

Originally there was an extra commit on top of this. That commit didn't
help generated code quality, so it was dropped.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
2025-02-11 08:44:33 +00:00
Ian Romanick
ac4b93571c brw/copy: Fix handling of offset in extract_imm
The offset is measured in bytes. Some of the code here acted as though
it were measured in src.type units. Also modify the assertion to check
that all extracted bits come from data in the immediate value.

Fixes: 580e1c592d ("intel/brw: Introduce a new SSA-based copy propagation pass")
Fixes: da395e6985 ("intel/brw: Fix extract_imm for subregion reads of 64-bit immediates")

Yes, I missed this error *twice* in code review.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
2025-02-11 08:44:33 +00:00
Saroj Kumar
57d47f717a mesa: Add GL_EXT_protected_textures support
Add support for GL_EXT_protected_textures to create protected
texture in OpenGL ES 3.2. This enables allocating standard
GL textures as protected surfaces. This allows use-cases such
as depth, stencil, or mipmapped textures to be supported as
destinations for rendering within a protected context.

Signed-off-by: Saroj Kumar <saroj.kumar@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33358>
2025-02-11 08:14:03 +00:00
Alyssa Rosenzweig
124a2b612d nir: mark a few more subgroup ops
this is a behaviour change, but should be either a no-op or a bug fix.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
cbd234e724 nir/opt_move_discards_to_top: use semantic
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
edb0164623 nir/gather_info: use subgroup/quadgroup flags
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
b9ce851b6c nir: mark subgroup/quadgroup ops
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
7168f9a4f3 nir: switch intrinsic semantics to BIT
Timur suggested.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Alyssa Rosenzweig
09510ec910 nir: add nir_intrinsic_has_semantic helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33410>
2025-02-11 07:30:07 +00:00
Yiwei Zhang
d0e02df3a6 venus: emulate a second graphics queue on Android
Starting from Android 14 (Android U), framework HWUI has required a
second graphics queue to avoid racing between webview and skiavk. For
non-Android, we leave the second queue emulation behind a debug option.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30985>
2025-02-11 06:07:24 +00:00
Yiwei Zhang
d92f9c3d51 venus: use dedicated allocation for ANB image memory import
On most platforms, deidcated allocation is preferred for the dma-buf
import done by Venus. In special cases, this is required but missed so
far.

Cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33434>
2025-02-11 05:52:35 +00:00
Yiwei Zhang
1d668233ba venus: enable VK_EXT_external_memory_acquire_unmodified if needed
When used internally, we have to conditionally enable it behind the app.

Fixes: 969cb02de7 ("venus: chain VkExternalMemoryAcquireUnmodifiedEXT for wsi ownership transfers")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33419>
2025-02-11 05:38:08 +00:00
Giovanni Mascellani
6b2b74a894 lvp: Remove some dead code.
It seems that last reference to that helper was removed in
97ebe52ee3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33465>
2025-02-10 17:43:38 +00:00
Rhys Perry
3a1d79bdec nir/validate: assert that if condition dominates use
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
b4c5403413 nir: add NIR_DEBUG=invalidate_metadata
This invalidates metadata before passes to try and find passes which don't
properly require metadata that they use.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
e04c0025ef nir: add NIR_DEBUG=extended_validation
This runs validation even if the pass makes no progress. It also requires
all kinds of metadata before the pass to test whether it correctly
preserves or invalidates them.

It's disabled by default because it can be extremely slow.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
ecd122ddb8 radv/rt: correctly preserve metadata in move_rt_instructions
This should invalidate nir_metadata_live_defs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
0a04200ba7 nir/linking_helpers: invalidate metadata in nir_link_opt_varyings
nir_instr_insert and nir_def_init invalidate nir_metadata_instr_index and
nir_metadata_live_defs, but not nir_metadata_loop_analysis

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
ebf8e072b4 nir/find_array_copies: invalidate nir_metadata_instr_index
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
422e3e1249 nir/lower_io_arrays_to_elements: invalidate metadata
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
b5a9ab90d2 nir/opt_move: invalidate nir_metadata_instr_index
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Rhys Perry
f42b72a08f nir/use_dominance: invalidate nir_metadata_instr_index
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33354>
2025-02-10 15:01:37 +00:00
Juan A. Suarez Romero
8720894494 v3dv: take into account GS when enabling line smooth
Line smoothing should only be enabled for line primitives.

So far we were only checking the pipeline topology, but this is not
enough if there is a geometry shader, as it can change the primitive
from line to anything else, or the other way around.

This fixes several failures in
dEQP-VK.draw.renderpass.non_line_with_params.*.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33395>
2025-02-10 13:27:42 +00:00
Iago Toral Quiroga
daa48cbaef v3dv: fix crash on 32-bit builds
Command buffer private object destroy callbacks receive a 64-integer so their
signature should respect that to avoid alignment issues when passing pointers.
This is the same we were already doing for color pipelines, but now for D/S
pipelines too.

Fixes crash on 32-bit build with:
dEQP-VK.synchronization2.op.single_queue.fence.write_clear_attachments_read_copy_image_to_buffer.image_128x128_d16_unorm

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33463>
2025-02-10 12:42:54 +00:00
Tapani Pälli
c5cad407f8 anv: handle non-wsi images in anv_layout_to_aux_state
Transition to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR with non-wsi image was
seen with gfxrecon-replay case that ends up hitting weird assertions
later.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33027>
2025-02-10 10:31:33 +00:00
Qiang Yu
ee9edd4625 radeonsi: fix GravityMark corruption when use aco
aco may use smem load for ssbo when possible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12518
Cc: mesa-stable
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
2025-02-10 02:06:56 +00:00
Qiang Yu
cc62a75a17 radeonsi,util: add more usage for AMD_FORCE_SHADER_USE_ACO
To be able to change a bunch of shaders to use aco. Used to
find problem shader when use aco quickly instead of one by
one when too many shaders.

Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
2025-02-10 02:06:55 +00:00
Qiang Yu
c805ea6792 radeonsi: fix has_non_uniform_tex_access info
Fixes: f859436b55 ("radeonsi: add has_non_uniform_tex_access shader info")
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
2025-02-10 02:06:55 +00:00
Patrick Nicolas
9ef01a0f98 radv/video: Add low latency encoding
When VkVideoEncodeUsageInfoKHR has a tuningMode of
VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR or
VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR, request low latency
mode for the encoder.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11958
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32862>
2025-02-09 21:57:33 +00:00
Erik Faye-Lund
6652eb0ec3 meson: rename meson_options.txt
The proper name for the meson options changed to meson.options in Meson
1.1. Since we don't support older versions of Meson anyway, let's just
rename the options-file to the new name.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33445>
2025-02-09 08:13:27 +00:00
Georg Lehmann
fd77cc7c32 ac/nir/lower_ps: move exports after packing alu
If ACO's wqm section ends just before the first export, this mixing alu and
exports means the alu in question can't be reordered as much by the ILP
scheduler.

Foz-DB Navi31:
Totals from 8959 (11.31% of 79188) affected shaders:
Instrs: 5977212 -> 5978494 (+0.02%); split: -0.02%, +0.04%
CodeSize: 32982732 -> 32987876 (+0.02%); split: -0.01%, +0.03%
Latency: 35218073 -> 35216277 (-0.01%); split: -0.02%, +0.02%
InvThroughput: 5149751 -> 5149696 (-0.00%); split: -0.00%, +0.00%
SClause: 220552 -> 220551 (-0.00%); split: -0.01%, +0.01%
PreVGPRs: 313203 -> 313069 (-0.04%); split: -0.06%, +0.01%

Foz-DB Navi21:
Totals from 8895 (11.21% of 79377) affected shaders:
MaxWaves: 219280 -> 219272 (-0.00%); split: +0.00%, -0.01%
Instrs: 5393330 -> 5393366 (+0.00%); split: -0.00%, +0.00%
CodeSize: 29921900 -> 29922024 (+0.00%); split: -0.00%, +0.00%
VGPRs: 406664 -> 406688 (+0.01%); split: -0.00%, +0.01%
Latency: 35653975 -> 35652220 (-0.00%); split: -0.02%, +0.02%
InvThroughput: 7992134 -> 7992032 (-0.00%); split: -0.00%, +0.00%
SClause: 223784 -> 223786 (+0.00%)
Copies: 370984 -> 370983 (-0.00%)
PreVGPRs: 314323 -> 314330 (+0.00%); split: -0.01%, +0.01%
VALU: 3800023 -> 3800022 (-0.00%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33417>
2025-02-08 17:31:18 +00:00
Georg Lehmann
0bc1bffe9a nir/opt_move: don't move into critical sections
Foz-DB Navi31:
Totals from 6694 (8.43% of 79377) affected shaders:
Instrs: 4125152 -> 4119037 (-0.15%); split: -0.16%, +0.01%
CodeSize: 22786832 -> 22761612 (-0.11%); split: -0.12%, +0.01%
Latency: 23343080 -> 23270421 (-0.31%); split: -0.32%, +0.01%
InvThroughput: 3449821 -> 3449859 (+0.00%); split: -0.00%, +0.00%
SClause: 176624 -> 176219 (-0.23%); split: -0.23%, +0.00%
Copies: 256709 -> 255739 (-0.38%)
PreVGPRs: 240038 -> 240251 (+0.09%)
SALU: 336732 -> 334794 (-0.58%)

Foz-DB Navi21:
Totals from 11227 (14.14% of 79377) affected shaders:
MaxWaves: 279804 -> 279796 (-0.00%)
Instrs: 6652332 -> 6650912 (-0.02%); split: -0.02%, +0.00%
CodeSize: 35974500 -> 35968152 (-0.02%); split: -0.02%, +0.00%
VGPRs: 491440 -> 491512 (+0.01%); split: -0.00%, +0.02%
Latency: 34291475 -> 34247972 (-0.13%); split: -0.15%, +0.02%
InvThroughput: 7603701 -> 7603724 (+0.00%); split: -0.00%, +0.00%
VClause: 132041 -> 132068 (+0.02%); split: -0.00%, +0.02%
SClause: 239880 -> 239438 (-0.18%); split: -0.20%, +0.01%
Copies: 530000 -> 529986 (-0.00%); split: -0.00%, +0.00%
PreVGPRs: 393471 -> 394170 (+0.18%); split: -0.00%, +0.18%
VALU: 4274980 -> 4274966 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33417>
2025-02-08 17:31:18 +00:00
Pavel Ondračka
4d4a3a6d6b i915: rework shader compile failures reporting
Report compile errors from create_fs_state instead of finalize_nir.
The current way is broken, since nir_to_tgsi is called in finalize_nir,
however it can't handle lowered IO.

Fixes: dae57e184a
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12373
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
2025-02-08 15:32:01 +00:00
Marek Olšák
dc1b719e1f gallium,st/mesa: allow reporting compile failures from create_vs/fs/.._state
This adds a proper interface for reporting shader compile failures.
They are propagated to the GLSL linker.

Reporting errors from finalize_nir will be deprecated.

Fixes: dae57e184a
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
2025-02-08 15:32:01 +00:00
Pavel Ondračka
fbffe0ecbe i915/ci: update expectations
Most of those were likely fixed by the unconditional nir_opt_varyings,
since we are less likely to run out of input/output slots.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
2025-02-08 15:32:01 +00:00
Michel Dänzer
e4d189f26f egl/glx/sw: Check xcb_query_extension_reply return value for MIT-SHM
For consistency with other xcb_query_extension_reply callers.

v2:
* Now with less use-after-free. (Eric Engestrom)

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33400>
2025-02-08 13:50:15 +00:00
Martin Roukala (né Peres)
3d6c5dc790 zink/ci: document more RADV flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
0ef08b8ccd zink/ci: mark query-rgba-signed-components as fixed on more platforms
Fixes: 886d720c19 ("mesa: fix RGBA_SIGNED_COMPONENTS for lowered signed luminance")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
f3b1f5ba2c turnip/ci: re-introduce the multiviewport flakes
This is a partial revert of 5f3cad0026, as the commit did not
actually fix the flakes it claimed to do.

Fixes: 5f3cad0026 ("tu: Add missing assignment to shared_viewport")
Suggested-by: @Valentine (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446#note_2770035)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
8aa22e834a radv/ci: document more Tahiti VKCTS flakes
Now that we have a more powerful host, we started getting new flakes.
Let's document them!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Martin Roukala (né Peres)
c63041c0ed ci/b2c: fix the S3 artifact for amd64 manual vk/gl
Fixes: 5b291c7ce6 ("ci: Move r300/nine/nvk builds out of critical path")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Pavel Ondračka
63afd265a6 ci: disable LTO for nightly debian-build-testing
Other CI jobs are actually depending on debian-build-testing now
and there doesn't seem to be much interested in fixing LTO, so just
disable it.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: David Heidelberg <david@ixit.cz>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12574
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
2025-02-08 13:22:13 +02:00
Mel Henning
48edb9cec2 nak/opt_copy_prop: Force alu src for IAdd2X/IAdd3X
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
2025-02-08 08:38:12 +00:00
Mel Henning
2fa557d29d nak/opt_copy_prop: Add force_alu_src_type
This is just a code cleanup - it shouldn't change any shaders.

Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
2025-02-08 08:38:12 +00:00
Mel Henning
a5b267980a nak/opt_copy_prop: Fix IAdd3 overflow check
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
2025-02-08 08:38:12 +00:00
Rebecca Mckeever
e8c6e22e14 panvk: Enable YCbCr support for v10+
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
a9759dd0e4 panvk: Report formats not supported by HW as unsupported
3-plane YUV 444 and 16-bit 3-plane YUV are not supported natively by
the HW. Report these formats as unsupported since we may want to switch
to native YUV support in the future.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
755953d337 panvk: Split get_format_properties into format features helper functions
This will make it easier to get the feature flags per plane for
multiplane formats.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
e0f4801438 panvk: Add YCbCr sampler NIR lowering pass
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
2ddd021bae panvk: Fix assertion in is_disjoint()
We were not correctly following VUID-VkImageCreateInfo-format-01577:

If format is not a multi-planar format, and flags does not
include VK_IMAGE_CREATE_ALIAS_BIT, flags must not contain
VK_IMAGE_CREATE_DISJOINT_BIT.

Fixes: 412c2863 ("panvk: Enable multiplane images and image views")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
cdf24f067e panvk: Use multiple sampler planes and one texture descriptor per plane
Multiple sampler planes (one for luma, one for chroma) are needed to
support CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT.

Multiple texture descriptors (one per plane) are needed for the
downsampling in nir_vk_lower_ycbcr_tex() to work in panvk.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:41 +00:00
Rebecca Mckeever
45657fb70f panvk: Move mali_texture_packed structs in panvk_image_view to a union
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
ddbbc1d217 panvk: Update panvk_get_desc_stride prototype
This will help set things up for multiplane samplers and textures.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
9e5b6370c0 panvk: Create helper function for sampler descriptor emission
This will help set things up for multiplane samplers.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
339c58f21f panvk: Change immutable_samplers to panvk_sampler **
We will need vk_sampler for colorspace conversion.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
53df2c2260 panvk: Move single-plane views of multiplane formats to pview.planes[0]
Place the view plane at index 0 for single-plane views of multiplane
formats. Does not apply to YCbCr views of multiplane images since
view->vk.aspects for those will contain the full set of plane aspects.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
9c4b530c49 panvk: Allow a 32-bit binding value in desc id key and use 64-bit keys
Since the binding value can be any 32-bit number, we cannot assume that
it is <= 27 bits. We need 64-bit keys to accommodate a 32-bit binding.

This will also provide more bits to store the subdesc id, which will be
needed for multiplane texture and sampler descriptors.

Fixes: 7bea6f86 ("panvk: Overhaul the Bifrost descriptor set implementation")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
1d0f44739d util/hash_table: Add _mesa_hash_table_u64_replace()
This function updates the data of a u64 hash_table entry and is safe to
use inside a hash_table_u64_foreach() loop.

Fixes: 7bea6f86 ("panvk: Overhaul the Bifrost descriptor set implementation")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Rebecca Mckeever
3b5114a34b vk/meta: Extend copy/fill/update helpers to support YCbCr
Since copies happen one plane at a time, we can handle multiplanar copies
like color copies. The user gets to decide the format to use for each
plane, but the pipeline type and the optimal tile size applies to the
whole image.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
2025-02-08 07:48:40 +00:00
Kenneth Graunke
d06c3e21ac brw: Drop unnecessary mlen/header_size on virtual GET_BUFFER_SIZE op
The logical send lowering code sets these, and is the code which
-should- set these.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
37a6278c9f brw: Drop INTERPOLATE_AT mlen handling from size_read()
FS_OPCODE_INTERPOLATE_AT_{SAMPLE,SHARED_OFFSET} never have a mlen set.
They are lowered to SHADER_OPCODE_SEND in logical send lowering, at
which point they acquire an mlen, but cease to be those opcodes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
ae60338142 brw: Lower MEMORY_FENCE and INTERLOCK in lower_logical_sends
We teach lower_logical_sends to lower these to SHADER_OPCODE_SEND
and drop all the corresponding generator and eu_emit code.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
7b4e31b243 brw: Add latencies for HDC/RC memory fences
We're about to start lowering these in the IR, at which point the
scheduler will see SEND instructions with fence messages.  Previously,
we handled those in the generator, and didn't handle the virtual opcodes
here, letting them fall through to the default case of 14 cycles.

These new numbers are completely fabricated, matching the times we have
for atomic operations.  This is basically what we did for LSC atomics.
While it may not be accurate, it's at least better than 14 cycles.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
b9de19f917 brw: Eliminate the BTI source from MEMORY_FENCE/INTERLOCK opcodes
Memory fences do not refer to an element of a binding table.  Rather,
the reason we had "BTI" in these opcodes was to distinguish what in
modern terms are called UGM (untyped memory data cache) vs. SLM
(cross-thread shared local memory) fences.

Icelake and older platforms used the "data cache" SFID for both
purposes, distinguishing them by having a special binding table
index, 254, meaning "this is actually SLM access".  This is where
the notion that fences had BTIs came in.  (In fact, prior to Icelake,
separate SLM fences were not a thing, so BTI wasn't used there either.)

To avoid confusion about BTI being involved, we choose a simpler lie: we
have Icelake SLM fences target GFX12_SFID_SLM (like modern platforms
would), even though it didn't really exist back then.  Later lowering
code sets it back to the correct Data Cache SFID with magic SLM binding
table index.  This eliminates BTI everywhere and an unnecessary source.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
43d0ac9eb4 brw: Change destination of memory fences to UD type
For some reason, we were using UW type for the destination of memory
fences at the generator level, while in the IR we selected UD.

There are some comments in the documentation for the message about it
writing the notification register to the destination, which is 32-bit.
Prior to Xe2, bits 31:16 were Reserved/MBZ.  But on Xe2, all 32 bits
are populated with actual data.

I don't know whether this will fix anything in practice, but it seems
like a better plan to use UD.  Often we used UW types to avoid having
the destination region of sends span too many registers, but we're in
SIMD1 here, so it shouldn't matter.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
c0a32af125 brw: Use correct builder size for MEMORY_FENCE/INTERLOCK virtual opcodes
brw_memory_fence() overrides the instructions generated by the
MEMORY_FENCE or INTERLOCK opcodes to be force_writemask_all with
exec_size == 1.  But the IR was emitting it in SIMD8 (regardless
of dispatch width).  Instead, just emit the IR as SIMD1/NoMask so
the IR matches what we actually generate.  Have size_written indicate
that the entire destination is written, however, as it is ultimately
going to be a SEND that writes a whole register.

We were also using a UD register for the source of
FS_OPCODE_SCHEDULING_FENCE when the generator overrides it to UW,
so just specify UW in the IR as well so that they line up.

Also add validation for MEMORY_FENCE/INTERLOCK that we've done the
exec_size and masking right in the IR.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
accef5e8f5 brw: Replace fs_inst::target field with logical FB read/write sources
We can just specify this as a source to the logical FB read/write
opcodes.  Notably FB reads had no sources before; now they have one.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
32dd722ff3 brw: Replace fs_inst::last_rt with a logical control source
Rather than using a bit in the generic fs_inst data structure, we can
simply set a source on our logical FB write messages.  (We already do
so for many other cases.)

In the repclear shader, setting this wasn't actually having an effect,
as we were setting it on a SHADER_OPCODE_SEND message which ignored it.
(We had already correctly set the bit in the message descriptor.)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
fce01b8461 brw: Drop FB_WRITE_LOGICAL_SRC_DST_DEPTH source
This was used for legacy depth passthrough on older hardware.  Gfx9+
doesn't actually have dst depth as part of the message, which is the
only hardware brw supports these days.

It sure looks like we were setting it though...

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
7390d6189c brw: Replace fs_inst::pi_noperspective with a logical control source
We already have logical pixel interpolator messages that get lowered
to send messages.  We can just add an extra boolean source to those
opcodes rather than sticking a opcode-specific boolean in the generic
fs_inst data structure.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
168ac07ffd brw: Eliminate fs_inst::shadow_compare
brw_lower_logical_sends can just check for the TEX_LOGICAL_SRC_SHADOW_C
source; we don't need a generic instruction bit for this.  We used to
have one because this was handled in the generator for older hardware
before the advent of logical opcode lowering.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Kenneth Graunke
df836ee895 brw: Drop unused defines
Nothing uses these.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
2025-02-08 01:07:22 +00:00
Ian Romanick
9c133fe638 crocus: Use nir_shader_intrinsics_pass in crocus_lower_storage_image_derefs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Ian Romanick
d2458f964f iris: Use nir_shader_intrinsics_pass in iris_lower_storage_image_derefs
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Ian Romanick
40948b9715 crocus: Add missing nir_metadata_preserve in crocus_lower_storage_image_derefs
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Closes: #12589
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Ian Romanick
f2a01be57e iris: Add missing nir_metadata_preserve in iris_lower_storage_image_derefs
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 26a54ae4b2 ("iris: lower storage image derefs")
Closes: #12589
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
2025-02-07 23:20:16 +00:00
Benjamin Lee
08cd331cc0 panvk: implement VK_EXT_separate_stencil_usage
Needed for Vulkan 1.2.

The only real improvement from this is that in some situations we can
skip creating texture descriptors for image views that have a more
restrictive usage for either the depth or stencil aspect.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33392>
2025-02-07 12:54:33 -08:00
Aaron Ruby
2553d60d47 gfxstream: Add common interfaces in the VirtGpuDevice to query DrmInfo
and PciBusInfo

- Advertise the availability of these extensions, fully implemented as
guestOnly features

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33363>
2025-02-07 17:08:34 +00:00
Aaron Ruby
94f8244ac8 gfxstream: Change "mesaOnly" nomenclature to be "guestOnly"
This refers to extensions that are fully implemented by the guest driver

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33363>
2025-02-07 17:08:34 +00:00
Aaron Ruby
5d2c0cc526 gfxstream: Make the virtgpu device discovery for LinuxVirtGpu more robust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33363>
2025-02-07 17:08:34 +00:00
Eric R. Smith
e550a3cab0 panfrost: avoid potential divide by 0 calculating timer_resolution
On armhf integer divide by 0 can raise SIGFPE, whereas on aarch64
it just returns 0. This has become an issue because the recently
added panfrost_init_screen_caps always calls pan_gpu_time_to_ns to
calculate caps->timer_resolution, whereas before we only called it
when PIPE_CAP_TIMER_RESOLUTION was queried, and only OpenCL
does that (and not always).

Fixes: 205669e3a9 ("panfrost: add panfrost_init_screen_caps")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33435>
2025-02-07 14:51:57 +00:00
Erik Faye-Lund
2ae97a4eb6 panvk: correct number of read bytes for dynamic buffers
This function takes the number of bytes, not number of entries. This
should hopefully fix start-up issues on Citra.

While we're at it, fixup the alignment of the line that writes the
bytes.

Fixes: 27beadcbdb ("panvk: Extend the shader logic to support Valhall")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12539
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33429>
2025-02-07 14:34:11 +00:00
Rhys Perry
c3d27906d8 radv: vectorize lowered shader IO
fossil-db (navi31):
Totals from 2329 (2.93% of 79377) affected shaders:
MaxWaves: 72152 -> 72102 (-0.07%)
Instrs: 1048791 -> 1041920 (-0.66%); split: -0.72%, +0.07%
CodeSize: 5331832 -> 5285572 (-0.87%); split: -0.90%, +0.03%
VGPRs: 113844 -> 113820 (-0.02%); split: -0.14%, +0.12%
Latency: 4349524 -> 4346374 (-0.07%); split: -0.35%, +0.28%
InvThroughput: 609449 -> 609235 (-0.04%); split: -0.27%, +0.24%
VClause: 22613 -> 22451 (-0.72%); split: -1.03%, +0.31%
SClause: 21197 -> 21177 (-0.09%); split: -0.45%, +0.35%
Copies: 81900 -> 82446 (+0.67%); split: -1.51%, +2.18%
PreSGPRs: 94697 -> 93596 (-1.16%); split: -1.23%, +0.07%
PreVGPRs: 69962 -> 70080 (+0.17%); split: -0.01%, +0.18%
VALU: 625247 -> 625390 (+0.02%); split: -0.23%, +0.25%
SALU: 101692 -> 101555 (-0.13%); split: -0.24%, +0.11%
VMEM: 46459 -> 44845 (-3.47%)

fossil-db (navi21):
Totals from 17522 (22.07% of 79377) affected shaders:
MaxWaves: 425698 -> 425460 (-0.06%); split: +0.00%, -0.06%
Instrs: 11444215 -> 11428321 (-0.14%); split: -0.14%, +0.00%
CodeSize: 59227492 -> 59019376 (-0.35%); split: -0.35%, +0.00%
VGPRs: 780920 -> 781208 (+0.04%); split: -0.00%, +0.04%
Latency: 44965072 -> 44926529 (-0.09%); split: -0.12%, +0.03%
InvThroughput: 9718148 -> 9728793 (+0.11%); split: -0.01%, +0.12%
VClause: 225732 -> 225605 (-0.06%); split: -0.10%, +0.04%
SClause: 217196 -> 217160 (-0.02%); split: -0.03%, +0.01%
Copies: 1050351 -> 1065263 (+1.42%); split: -0.03%, +1.45%
PreSGPRs: 747538 -> 747223 (-0.04%); split: -0.05%, +0.01%
PreVGPRs: 626702 -> 626748 (+0.01%); split: -0.00%, +0.01%
VALU: 6629403 -> 6643822 (+0.22%); split: -0.01%, +0.23%
SALU: 1898492 -> 1898452 (-0.00%); split: -0.00%, +0.00%
VMEM: 529942 -> 528361 (-0.30%)

fossil-db (vega10):
Totals from 1791 (2.84% of 62962) affected shaders:
MaxWaves: 12270 -> 12253 (-0.14%); split: +0.01%, -0.15%
Instrs: 602026 -> 597473 (-0.76%); split: -0.83%, +0.08%
CodeSize: 3109872 -> 3071664 (-1.23%); split: -1.26%, +0.03%
SGPRs: 137826 -> 137938 (+0.08%); split: -0.10%, +0.19%
VGPRs: 70364 -> 70520 (+0.22%); split: -0.03%, +0.26%
Latency: 4757850 -> 4781905 (+0.51%); split: -0.35%, +0.86%
InvThroughput: 2296941 -> 2310685 (+0.60%); split: -0.14%, +0.74%
VClause: 14161 -> 14050 (-0.78%); split: -1.23%, +0.44%
SClause: 14058 -> 14077 (+0.14%); split: -0.57%, +0.70%
Copies: 40954 -> 42191 (+3.02%); split: -1.69%, +4.71%
PreSGPRs: 64314 -> 63214 (-1.71%); split: -1.81%, +0.10%
PreVGPRs: 53558 -> 53894 (+0.63%); split: -0.01%, +0.64%
VALU: 449920 -> 450830 (+0.20%); split: -0.19%, +0.39%
SALU: 32973 -> 32839 (-0.41%); split: -0.76%, +0.35%
VMEM: 28796 -> 25151 (-12.66%)

fossil-db (polaris10):
Totals from 1769 (2.86% of 61794) affected shaders:
MaxWaves: 12024 -> 12021 (-0.02%)
Instrs: 474761 -> 470760 (-0.84%); split: -0.94%, +0.10%
CodeSize: 2447964 -> 2420712 (-1.11%); split: -1.15%, +0.04%
SGPRs: 129664 -> 129728 (+0.05%); split: -0.14%, +0.19%
VGPRs: 65216 -> 65560 (+0.53%); split: -0.05%, +0.58%
Latency: 4304734 -> 4318319 (+0.32%); split: -0.41%, +0.72%
InvThroughput: 2114950 -> 2122580 (+0.36%); split: -0.18%, +0.54%
VClause: 10933 -> 10808 (-1.14%); split: -1.42%, +0.27%
SClause: 11430 -> 11446 (+0.14%); split: -0.70%, +0.84%
Copies: 32290 -> 31891 (-1.24%); split: -2.80%, +1.56%
PreSGPRs: 58184 -> 57096 (-1.87%); split: -1.98%, +0.11%
PreVGPRs: 48757 -> 48874 (+0.24%); split: -0.02%, +0.26%
VALU: 359097 -> 358582 (-0.14%); split: -0.25%, +0.11%
SALU: 26279 -> 25934 (-1.31%); split: -1.75%, +0.43%
VMEM: 18825 -> 17247 (-8.38%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
953faac23e radv: vectorize descriptor loads
fossil-db (navi31):
Totals from 49237 (62.03% of 79377) affected shaders:
MaxWaves: 1497901 -> 1497851 (-0.00%); split: +0.00%, -0.00%
Instrs: 25766029 -> 25595468 (-0.66%); split: -0.68%, +0.02%
CodeSize: 133811412 -> 132616356 (-0.89%); split: -0.90%, +0.01%
VGPRs: 2318068 -> 2318200 (+0.01%); split: -0.00%, +0.01%
SpillSGPRs: 4512 -> 4507 (-0.11%); split: -0.64%, +0.53%
Latency: 164086813 -> 163869930 (-0.13%); split: -0.22%, +0.09%
InvThroughput: 24811220 -> 24802709 (-0.03%); split: -0.05%, +0.02%
VClause: 553717 -> 557194 (+0.63%); split: -0.30%, +0.93%
SClause: 723038 -> 710431 (-1.74%); split: -2.69%, +0.95%
Copies: 1709226 -> 1711030 (+0.11%); split: -0.48%, +0.59%
Branches: 465169 -> 465164 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 1775360 -> 1961282 (+10.47%); split: -0.01%, +10.48%
VALU: 15418039 -> 15417896 (-0.00%); split: -0.02%, +0.02%
SALU: 2424519 -> 2416263 (-0.34%); split: -0.61%, +0.26%
SMEM: 1245273 -> 1121006 (-9.98%)
VOPD: 3882 -> 3885 (+0.08%); split: +0.18%, -0.10%

fossil-db (navi21):
Totals from 48539 (61.15% of 79377) affected shaders:
MaxWaves: 1262958 -> 1262912 (-0.00%); split: +0.00%, -0.01%
Instrs: 30334013 -> 30154279 (-0.59%); split: -0.60%, +0.01%
CodeSize: 161298192 -> 160027616 (-0.79%); split: -0.80%, +0.01%
VGPRs: 1979248 -> 1979192 (-0.00%); split: -0.01%, +0.01%
SpillSGPRs: 3751 -> 3776 (+0.67%); split: -0.75%, +1.41%
Latency: 185665578 -> 185429672 (-0.13%); split: -0.23%, +0.10%
InvThroughput: 41413438 -> 41406558 (-0.02%); split: -0.03%, +0.02%
VClause: 624116 -> 626703 (+0.41%); split: -0.30%, +0.71%
SClause: 775094 -> 764569 (-1.36%); split: -2.73%, +1.38%
Copies: 2437041 -> 2441758 (+0.19%); split: -0.23%, +0.42%
Branches: 770540 -> 770552 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1919117 -> 2021093 (+5.31%); split: -0.01%, +5.32%
VALU: 18926346 -> 18926269 (-0.00%); split: -0.01%, +0.01%
SALU: 4316722 -> 4310066 (-0.15%); split: -0.33%, +0.17%
SMEM: 1350230 -> 1216865 (-9.88%)

fossil-db (vega10):
Totals from 41793 (66.38% of 62962) affected shaders:
MaxWaves: 306797 -> 306685 (-0.04%); split: +0.02%, -0.06%
Instrs: 16251398 -> 16140153 (-0.68%); split: -0.71%, +0.02%
CodeSize: 83407848 -> 82543596 (-1.04%); split: -1.05%, +0.01%
SGPRs: 2787936 -> 2854864 (+2.40%); split: -0.73%, +3.13%
VGPRs: 1585644 -> 1586156 (+0.03%); split: -0.01%, +0.05%
SpillSGPRs: 3856 -> 3843 (-0.34%); split: -1.50%, +1.17%
SpillVGPRs: 560 -> 562 (+0.36%)
Latency: 167478607 -> 166829429 (-0.39%); split: -0.50%, +0.12%
InvThroughput: 76378642 -> 76353650 (-0.03%); split: -0.06%, +0.03%
VClause: 361639 -> 362694 (+0.29%); split: -0.31%, +0.60%
SClause: 546919 -> 535879 (-2.02%); split: -2.98%, +0.96%
Copies: 1388817 -> 1396020 (+0.52%); split: -0.37%, +0.89%
Branches: 227697 -> 227705 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1384316 -> 1532654 (+10.72%); split: -0.01%, +10.73%
VALU: 11896315 -> 11896547 (+0.00%); split: -0.01%, +0.01%
SALU: 1371452 -> 1370143 (-0.10%); split: -0.83%, +0.73%
VMEM: 628506 -> 628510 (+0.00%)
SMEM: 984495 -> 882129 (-10.40%)

fossil-db (polaris10):
Totals from 41057 (66.44% of 61794) affected shaders:
MaxWaves: 270307 -> 270311 (+0.00%); split: +0.02%, -0.01%
Instrs: 16082187 -> 15972163 (-0.68%); split: -0.71%, +0.02%
CodeSize: 82199592 -> 81341176 (-1.04%); split: -1.05%, +0.01%
SGPRs: 2894960 -> 2970720 (+2.62%); split: -0.67%, +3.29%
VGPRs: 1620132 -> 1620352 (+0.01%); split: -0.01%, +0.02%
SpillSGPRs: 3885 -> 3868 (-0.44%); split: -1.47%, +1.03%
SpillVGPRs: 617 -> 619 (+0.32%)
Latency: 166722696 -> 166066137 (-0.39%); split: -0.52%, +0.13%
InvThroughput: 76887856 -> 76862349 (-0.03%); split: -0.08%, +0.04%
VClause: 353499 -> 354709 (+0.34%); split: -0.28%, +0.62%
SClause: 544073 -> 533053 (-2.03%); split: -2.97%, +0.95%
Copies: 1398025 -> 1405848 (+0.56%); split: -0.30%, +0.86%
Branches: 224038 -> 224041 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1362781 -> 1509495 (+10.77%); split: -0.01%, +10.77%
VALU: 11771997 -> 11772271 (+0.00%); split: -0.01%, +0.01%
SALU: 1416410 -> 1415708 (-0.05%); split: -0.72%, +0.68%
VMEM: 616867 -> 616871 (+0.00%)
SMEM: 970539 -> 869729 (-10.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
3c5bcc5f7f nir/algebraic: optimize ishl(iadd(iadd(a, #b), c), #d)
fossil-db (navi31):
Totals from 671 (0.85% of 79377) affected shaders:
MaxWaves: 17048 -> 17052 (+0.02%); split: +0.04%, -0.01%
Instrs: 786643 -> 785459 (-0.15%); split: -0.20%, +0.05%
CodeSize: 4074988 -> 4069304 (-0.14%); split: -0.18%, +0.04%
VGPRs: 43896 -> 43860 (-0.08%); split: -0.11%, +0.03%
SpillSGPRs: 753 -> 748 (-0.66%)
Latency: 8187731 -> 8186707 (-0.01%); split: -0.11%, +0.10%
InvThroughput: 1274564 -> 1274582 (+0.00%); split: -0.11%, +0.11%
VClause: 14292 -> 14183 (-0.76%); split: -0.98%, +0.22%
SClause: 21527 -> 21426 (-0.47%); split: -0.53%, +0.06%
Copies: 59381 -> 59299 (-0.14%); split: -0.67%, +0.53%
PreSGPRs: 29358 -> 29349 (-0.03%)
PreVGPRs: 36595 -> 36368 (-0.62%); split: -0.70%, +0.08%
VALU: 482669 -> 481927 (-0.15%); split: -0.21%, +0.06%
SALU: 70019 -> 70009 (-0.01%); split: -0.06%, +0.05%
VOPD: 142 -> 139 (-2.11%)

fossil-db (navi21):
Totals from 671 (0.85% of 79377) affected shaders:
MaxWaves: 11536 -> 11516 (-0.17%); split: +0.03%, -0.21%
Instrs: 773615 -> 772476 (-0.15%); split: -0.18%, +0.03%
CodeSize: 4092564 -> 4086688 (-0.14%); split: -0.17%, +0.03%
VGPRs: 43424 -> 43448 (+0.06%); split: -0.04%, +0.09%
SpillSGPRs: 565 -> 560 (-0.88%)
Latency: 8650893 -> 8633993 (-0.20%); split: -0.31%, +0.11%
InvThroughput: 1920741 -> 1920368 (-0.02%); split: -0.10%, +0.08%
VClause: 15830 -> 15774 (-0.35%); split: -0.76%, +0.40%
SClause: 21025 -> 21009 (-0.08%); split: -0.11%, +0.03%
Copies: 65425 -> 65460 (+0.05%); split: -0.37%, +0.43%
Branches: 21845 -> 21848 (+0.01%)
PreSGPRs: 29457 -> 29448 (-0.03%)
PreVGPRs: 37296 -> 37066 (-0.62%); split: -0.69%, +0.08%
VALU: 516908 -> 516056 (-0.16%); split: -0.20%, +0.04%
SALU: 91545 -> 91531 (-0.02%); split: -0.05%, +0.03%

fossil-db (vega10):
Totals from 497 (0.79% of 62962) affected shaders:
MaxWaves: 2325 -> 2328 (+0.13%); split: +0.17%, -0.04%
Instrs: 298230 -> 297284 (-0.32%); split: -0.35%, +0.03%
CodeSize: 1535212 -> 1530636 (-0.30%); split: -0.34%, +0.04%
SGPRs: 36464 -> 36480 (+0.04%)
VGPRs: 29412 -> 29396 (-0.05%); split: -0.07%, +0.01%
SpillSGPRs: 164 -> 159 (-3.05%)
Latency: 3957230 -> 3948919 (-0.21%); split: -0.51%, +0.30%
InvThroughput: 1680680 -> 1679105 (-0.09%); split: -0.17%, +0.08%
VClause: 6175 -> 6102 (-1.18%); split: -1.55%, +0.37%
SClause: 9503 -> 9510 (+0.07%); split: -0.15%, +0.22%
Copies: 20992 -> 20892 (-0.48%); split: -0.97%, +0.50%
PreSGPRs: 17803 -> 17795 (-0.04%)
PreVGPRs: 23072 -> 22823 (-1.08%); split: -1.11%, +0.03%
VALU: 225322 -> 224587 (-0.33%); split: -0.36%, +0.04%
SALU: 21029 -> 21011 (-0.09%); split: -0.22%, +0.13%

fossil-db (polaris10):
Totals from 489 (0.79% of 61794) affected shaders:
Instrs: 299330 -> 298308 (-0.34%); split: -0.40%, +0.06%
CodeSize: 1529316 -> 1525440 (-0.25%); split: -0.32%, +0.07%
SpillSGPRs: 159 -> 149 (-6.29%)
Latency: 3924819 -> 3898471 (-0.67%); split: -0.93%, +0.25%
InvThroughput: 1687167 -> 1684956 (-0.13%); split: -0.22%, +0.09%
VClause: 6248 -> 6067 (-2.90%); split: -3.28%, +0.38%
SClause: 9519 -> 9492 (-0.28%); split: -0.72%, +0.44%
Copies: 21673 -> 21637 (-0.17%); split: -0.90%, +0.73%
PreSGPRs: 17611 -> 17603 (-0.05%)
PreVGPRs: 22873 -> 22625 (-1.08%)
VALU: 226805 -> 225928 (-0.39%); split: -0.45%, +0.06%
SALU: 21419 -> 21413 (-0.03%); split: -0.28%, +0.25%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
150305bbb8 nir/load_store_vectorize: fix sorting of vectors in add_to_entry_key
fossil-db (navi31):
Totals from 13 (0.02% of 79377) affected shaders:
Instrs: 2997 -> 2990 (-0.23%); split: -0.77%, +0.53%
CodeSize: 16552 -> 16504 (-0.29%); split: -0.85%, +0.56%
Latency: 75923 -> 75744 (-0.24%); split: -0.30%, +0.06%
InvThroughput: 12741 -> 12754 (+0.10%); split: -0.14%, +0.24%
PreVGPRs: 225 -> 230 (+2.22%)
VALU: 1565 -> 1569 (+0.26%); split: -0.77%, +1.02%

fossil-db (navi21):
Totals from 13 (0.02% of 79377) affected shaders:
Instrs: 2522 -> 2518 (-0.16%); split: -0.75%, +0.59%
CodeSize: 14660 -> 14620 (-0.27%); split: -0.85%, +0.57%
Latency: 77878 -> 77634 (-0.31%); split: -0.36%, +0.05%
InvThroughput: 15512 -> 15518 (+0.04%); split: -0.15%, +0.19%
Copies: 230 -> 231 (+0.43%); split: -0.87%, +1.30%
PreVGPRs: 225 -> 230 (+2.22%)
VALU: 1536 -> 1541 (+0.33%); split: -0.91%, +1.24%

fossil-db (vega10):
Totals from 13 (0.02% of 62962) affected shaders:
Instrs: 2684 -> 2674 (-0.37%); split: -0.75%, +0.37%
CodeSize: 14784 -> 14752 (-0.22%); split: -0.65%, +0.43%
Latency: 118228 -> 118215 (-0.01%); split: -0.06%, +0.05%
InvThroughput: 42893 -> 42892 (-0.00%); split: -0.11%, +0.11%
SClause: 63 -> 62 (-1.59%)
PreVGPRs: 236 -> 241 (+2.12%)
VALU: 1665 -> 1666 (+0.06%); split: -0.72%, +0.78%

fossil-db (polaris10):
Totals from 9 (0.01% of 61794) affected shaders:
Instrs: 1872 -> 1885 (+0.69%); split: -0.16%, +0.85%
CodeSize: 9980 -> 10012 (+0.32%); split: -0.20%, +0.52%
Latency: 82331 -> 82382 (+0.06%); split: -0.01%, +0.07%
InvThroughput: 30603 -> 30686 (+0.27%)
SClause: 44 -> 45 (+2.27%)
Copies: 252 -> 256 (+1.59%)
PreVGPRs: 169 -> 173 (+2.37%)
VALU: 1100 -> 1117 (+1.55%); split: -0.27%, +1.82%
SALU: 430 -> 434 (+0.93%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
5fe0012670 radv: DCE before nir_opt_shrink_vectors
fossil-db (navi31):
Totals from 941 (1.19% of 79377) affected shaders:
MaxWaves: 28422 -> 28502 (+0.28%)
Instrs: 645374 -> 642031 (-0.52%); split: -0.55%, +0.03%
CodeSize: 3264460 -> 3244488 (-0.61%); split: -0.63%, +0.02%
VGPRs: 48392 -> 48044 (-0.72%)
SpillVGPRs: 7 -> 0 (-inf%)
Scratch: 1792 -> 0 (-inf%)
Latency: 2596896 -> 2536952 (-2.31%); split: -2.33%, +0.02%
InvThroughput: 528726 -> 500139 (-5.41%); split: -5.42%, +0.01%
VClause: 14566 -> 14539 (-0.19%)
Copies: 53022 -> 51296 (-3.26%); split: -3.37%, +0.12%
PreSGPRs: 29369 -> 29367 (-0.01%)
PreVGPRs: 29710 -> 29694 (-0.05%)
VALU: 366134 -> 364245 (-0.52%); split: -0.53%, +0.02%
SALU: 74017 -> 73891 (-0.17%)
VMEM: 25240 -> 25208 (-0.13%)

fossil-db (navi21):
Totals from 941 (1.19% of 79377) affected shaders:
MaxWaves: 22018 -> 22058 (+0.18%); split: +0.28%, -0.10%
Instrs: 521053 -> 518898 (-0.41%); split: -0.43%, +0.02%
CodeSize: 2750628 -> 2734996 (-0.57%); split: -0.58%, +0.01%
VGPRs: 41152 -> 41024 (-0.31%); split: -0.41%, +0.10%
SpillVGPRs: 5 -> 0 (-inf%)
Scratch: 2048 -> 0 (-inf%)
Latency: 2655941 -> 2607022 (-1.84%); split: -1.86%, +0.02%
InvThroughput: 711733 -> 690032 (-3.05%); split: -3.07%, +0.02%
VClause: 16388 -> 16363 (-0.15%)
Copies: 35152 -> 33485 (-4.74%); split: -4.98%, +0.24%
PreSGPRs: 28486 -> 28484 (-0.01%)
PreVGPRs: 30317 -> 30301 (-0.05%)
VALU: 348423 -> 346614 (-0.52%); split: -0.54%, +0.02%
SALU: 44020 -> 43869 (-0.34%)
VMEM: 25216 -> 25195 (-0.08%)

fossil-db (vega10):
Totals from 416 (0.66% of 62962) affected shaders:
MaxWaves: 2687 -> 2696 (+0.33%); split: +0.37%, -0.04%
Instrs: 245634 -> 243501 (-0.87%); split: -0.88%, +0.01%
CodeSize: 1312836 -> 1297248 (-1.19%); split: -1.19%, +0.01%
VGPRs: 17684 -> 17692 (+0.05%); split: -0.43%, +0.48%
SpillVGPRs: 5 -> 0 (-inf%)
Scratch: 2048 -> 0 (-inf%)
Latency: 1928393 -> 1881346 (-2.44%); split: -2.44%, +0.00%
InvThroughput: 1163915 -> 1117096 (-4.02%); split: -4.03%, +0.00%
VClause: 7070 -> 7053 (-0.24%)
Copies: 22577 -> 20834 (-7.72%); split: -7.78%, +0.06%
Branches: 4328 -> 4320 (-0.18%)
PreSGPRs: 13993 -> 13991 (-0.01%)
PreVGPRs: 13452 -> 13436 (-0.12%)
VALU: 165253 -> 163366 (-1.14%); split: -1.15%, +0.01%
SALU: 26258 -> 26111 (-0.56%)
VMEM: 11736 -> 11715 (-0.18%)

fossil-db (polaris10):
Totals from 355 (0.57% of 61794) affected shaders:
Instrs: 108639 -> 108682 (+0.04%); split: -0.03%, +0.07%
CodeSize: 583804 -> 583936 (+0.02%); split: -0.03%, +0.06%
SGPRs: 17712 -> 17728 (+0.09%)
Latency: 735332 -> 734777 (-0.08%); split: -0.08%, +0.01%
InvThroughput: 443975 -> 444045 (+0.02%); split: -0.03%, +0.04%
VClause: 2552 -> 2558 (+0.24%)
SClause: 2394 -> 2393 (-0.04%)
Copies: 11433 -> 11464 (+0.27%); split: -0.15%, +0.42%
PreVGPRs: 7365 -> 7364 (-0.01%)
VALU: 69385 -> 69416 (+0.04%); split: -0.02%, +0.07%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
d04e1ea02d radv: move nir_opt_shrink_vectors later
This seems to be helpful with shaders which use NGG culling.

fossil-db (navi21):
Totals from 3529 (4.45% of 79377) affected shaders:
MaxWaves: 81490 -> 82066 (+0.71%)
Instrs: 2868872 -> 2863476 (-0.19%); split: -0.22%, +0.04%
CodeSize: 14949540 -> 14927580 (-0.15%); split: -0.18%, +0.03%
VGPRs: 165440 -> 164144 (-0.78%)
SpillSGPRs: 578 -> 405 (-29.93%)
Latency: 15388119 -> 15151882 (-1.54%); split: -1.74%, +0.20%
InvThroughput: 2935873 -> 2929736 (-0.21%); split: -0.25%, +0.04%
VClause: 70192 -> 68904 (-1.83%); split: -2.17%, +0.33%
SClause: 67678 -> 67679 (+0.00%); split: -0.10%, +0.10%
Copies: 265824 -> 261458 (-1.64%); split: -1.96%, +0.32%
Branches: 75084 -> 75088 (+0.01%); split: -0.02%, +0.02%
PreSGPRs: 165962 -> 165716 (-0.15%)
PreVGPRs: 135122 -> 134724 (-0.29%)
VALU: 1681747 -> 1677134 (-0.27%); split: -0.32%, +0.05%
SALU: 436003 -> 435915 (-0.02%); split: -0.03%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
f034aa9cd3 radv: don't use bit_sizes_int to skip nir_lower_bit_size
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
19394f44df ac/nir: set memory_modes for lowered TES input loads
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
0a699e16f9 nir/load_store_vectorize: handle load_buffer_amd/store_buffer_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
1fca72ddc8 ac/nir/ngg: update bit_sizes_int
This is used for RADV's bit size lowering.

fossil-db (navi21):
Totals from 4520 (5.69% of 79377) affected shaders:
(no stat changes)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
cfa217ee04 nir/opt_offsets: don't check NUW for unswizzled buffer_amd
This isn't necessary.

fossil-db (navi21):
Totals from 13 (0.02% of 79377) affected shaders:
Instrs: 18070 -> 18042 (-0.15%); split: -0.17%, +0.01%
CodeSize: 98336 -> 98012 (-0.33%)
Latency: 72735 -> 72992 (+0.35%); split: -0.02%, +0.38%
InvThroughput: 13157 -> 13105 (-0.40%)
VClause: 334 -> 324 (-2.99%)
SClause: 563 -> 564 (+0.18%)
Copies: 1194 -> 1197 (+0.25%)
VALU: 12330 -> 12297 (-0.27%)

fossil-db (polaris10):
Totals from 10 (0.02% of 61794) affected shaders:
Instrs: 4543 -> 4441 (-2.25%)
CodeSize: 30196 -> 29388 (-2.68%)
Latency: 64290 -> 64272 (-0.03%); split: -0.05%, +0.02%
InvThroughput: 20371 -> 20362 (-0.04%); split: -0.08%, +0.04%
VClause: 195 -> 135 (-30.77%)
Copies: 97 -> 100 (+3.09%)
PreSGPRs: 178 -> 177 (-0.56%)
VALU: 1765 -> 1666 (-5.61%)
VMEM: 2448 -> 2445 (-0.12%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
Rhys Perry
539f9b4ba6 nir,aco,radv: add align_mul/offset to buffer_amd intrinsics
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29242>
2025-02-07 13:52:57 +00:00
David Rosca
62b0f84981 ac/vcn_dec: Fix AV1 film grain on VCN5
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33376>
2025-02-07 13:13:45 +00:00
Juan A. Suarez Romero
f3de2134dd broadcom/ci: add new failures/flakes
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33443>
2025-02-07 12:44:12 +00:00
Samuel Pitoiset
76dcac9d47 radv: advertise VK_KHR_cooperative_matrix on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Samuel Pitoiset
b05a112d92 radv/nir: add cooperative matrix lowering for GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Samuel Pitoiset
ad611adeb7 radv/nir: add a struct for parameters to cooperative matrix lowering
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Samuel Pitoiset
baa09cb94a nir: adjust number of components for cmat_muladd_amd
On GFX12, A&B matrices can be vectors of 4 or 8 elements.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33378>
2025-02-07 12:06:10 +00:00
Karol Herbst
7c51ffe560 rusticl/mem: accelerate Buffer::write_rect
similar to the copy_rect change

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
b76784e655 rusticl/mem: accelerate Buffer::copy_rect
It's doing a bunch of copies, but at least they are done on the GPU, not
the CPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
c4dc97b29b rusticl/mem: Image::write layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
c43b460b0f rusticl/mem: Image::copy_to_image layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
8459e55fe3 rusticl/mem: Image::copy_to_buffer layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
4f7a6bf2bd rusticl/mem: Buffer::copy_to_image layering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
16623f654f rusticl/mesa: add buffer and texture variant for resource_copy_region
We'll add mipmap parameters to it, so it's better to split it up, so it's
easier to use the interface.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Karol Herbst
a2a3be3baa rusticl/mem: do not apply offset with in copy_image_to_buffer
The offset already gets applied when mapping the destination buffer, so we
ended up applying it twice.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
2025-02-07 10:36:28 +00:00
Samuel Pitoiset
dbb7e3cf88 radv: do not keep track of the streamout binding buffer
More like BDA style. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 10:53:37 +01:00
Samuel Pitoiset
03cacc1406 radv: rework passing draw info via radv_draw_info
More like BDA style. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 10:53:37 +01:00
Samuel Pitoiset
6f34be88d9 radv: rework passing dispatch info via radv_dispatch_info
More like BDA style. For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 09:30:22 +01:00
Samuel Pitoiset
b5740d5819 radv: use radv_indirect_dispatch() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 09:30:22 +01:00
Samuel Pitoiset
ef7e28e7a8 radv: remove redundant drawCount == 0 for indirect mesh/task draws
This is already handled in radv_before_taskmesh_draw().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33404>
2025-02-07 09:30:22 +01:00
Samuel Pitoiset
8625decbcc radv: fix fetching draw vertex data from counter buffers with transform feedback
counterOffset was just ignored and nobody noticed (missing VKCTS
coverage).

VGT_STRMOUT_DRAW_OPAQUE_OFFSET will do the computation in hw for us.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33407>
2025-02-07 07:59:39 +00:00
Lionel Landwerlin
4f73689d9a anv: add source hashes for BVH building shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33432>
2025-02-07 07:27:54 +00:00
Dudemanguy
1aa21c27d4 treewide: remove unneeded executable bit in non-scripting files
Noticed one by chance and searched for any others with find that were
clearly not meant to be executable.

For the curious:

33aa039acf changed texstore.c to
executable.
ed176e2c71 introduced si_vpc.c and
si_vpc.h which have always been executable.
d0e5203855 changed lava-gitlab-ci.yml to
executable.
328c29d600 introduced OVR_multiview.xml as
executable.
ac912b3754 introduced
OVR_multiview_multisampled_render_to_texture.xml as exectuable.

Signed-off-by: Dudemanguy <random342@airmail.cc>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33436>
2025-02-06 16:51:15 -06:00
Benjamin ROBIN
023db569e8 docs: Update MESA_SHADER_CACHE_DIR env variable behavior
Update documentation to match implementation of
disk_cache_generate_cache_dir().

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
2025-02-06 22:14:11 +00:00
Benjamin ROBIN
622f7407d7 util/disk_cache: Do not try to delete old cache if cache is disabled
Prevent following warning if not running as a normal user:
Failed to create /home for shader cache (Permission denied)---disabling

disk_cache_delete_old_cache() is going to create first the cache directory
using disk_cache_generate_cache_dir(). From mkdir_if_needed(), the stat()
of "/home" is failing with "Permission denied" under some circumstances
when using Firefox.

Fixes: #12168
Fixes: c3bc6991d2 ("util/disk_cache: Delete the old multifile cache if using the default.")

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
2025-02-06 22:14:11 +00:00
Eric Engestrom
7152f343d6 ci: only trigger the CI for release managers when pushing to staging branch
The release branch contains only what was on the staging branch first,
so testing it again is a waste of resources.

To do this, we split the rule into specifically "default branch" and
"staging branch", and "release branch" gets dropped by virtue of no
longer being caught by any rule.

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
2025-02-06 21:38:42 +00:00
Eric Engestrom
271bc0727c ci: drop redundant condition
"marge-bot push" is already caught by the `post-merge pipeline` rule above.

Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
2025-02-06 21:38:42 +00:00
Eric Engestrom
31f0a9be3f ci: don't run on tag pipelines
It's too late to run all the tests by then, the release has been made
based on the staging pipelines results

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33409>
2025-02-06 21:01:35 +00:00
Eric Engestrom
e4551ac69e llvmpipe/tests: include math.h for INFINITY
This might be the cause of #12557, but we should do this regardless.

Fixes: d366520e85 ("gallivm: fix rsqrt failures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33424>
2025-02-06 20:33:30 +00:00
Benjamin Cheng
b9e9cb4684 d3d12/video_enc: Fix AV1 tile_info() coding
Previously this used the {Min,Max}Tile{Rows,Cols} as returned by the
driver capabilities. Those parameters should be used to determine
implementation supported tile configurations for a specific resolution.

In the case of header coding, the {min,max}Log2Tile{Rows,Cols} should be
derived exactly as the AV1 spec defines it.

Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: Sil Vilerino <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32762>
2025-02-06 19:20:47 +00:00
Mel Henning
548b5e37ae nvk: Use hw support for instancing on PASCAL_B+
This may be faster than having the MME loop over instances.

Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33105>
2025-02-06 18:52:42 +00:00
Faith Ekstrand
bc67f95ae2 nak: Add MemEvictionPriorities to tex ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
ac50208783 nak: Print .dc for OpTld4::z_cmpr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
3c843b6933 nak: Add more MemEvictionPriorities
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
0d19468924 nak: Rename MemEvictionPriority::Unchanged to LastUse
The .lu modifier, which is what 3 maps to, stands for LastUse.  We
aren't actually setting it anywhere, though, so this isn't a functional
change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Faith Ekstrand
a92155d7f8 nak: Stop setting .EF on tex ops
Do this first because we might want to back-port this patch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33427>
2025-02-06 18:23:15 +00:00
Mike Blumenkrantz
7a890a7583 driconf: add GL_EXT_shader_image_load_store for viewperf to fix crashing
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33430>
2025-02-06 17:28:46 +00:00
Mike Blumenkrantz
7fc85dbc6f driconf: move a glthread viewperf option to global
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33430>
2025-02-06 17:28:46 +00:00
Caio Oliveira
b50c925bd6 intel/brw: Fold simple_allocator into the shader
This was originally turned into a separate struct for reuse between vec4
and fs backends, that's not needed anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
f82bcd56fc intel/brw: Add functions to allocate VGRF space
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
5c717e68ce intel/brw: Pass fs_visitor around instead of the simple_allocator
In preparation for getting rid of the simple_allocator.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
75b77382b8 intel/brw: Remove offsets and total_size from VGRF allocator
Information was used for vec4 backend, not used here anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33334>
2025-02-06 08:33:03 -08:00
Caio Oliveira
ea87bab4ce intel/brw: Remove 'using namespace brw' directives
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33418>
2025-02-06 07:58:55 -08:00
Sergi Blanch Torne
21cbe00094 ci: typo in debian-android in .build-for-tests-jobs
I didn't catch this typo in !33377 until it got merged. Correctness in this
list is necessary for the job in the build-only stage.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33428>
2025-02-06 14:43:45 +00:00
Hans-Kristian Arntzen
1fcb494054 radv: Repurpose radv_legacy_sparse_binding drirc
Rename the drirc and call it radv_disable_dedicated_sparse_queue instead,
since normal queues support sparse now anyway.
Keep the workaround for existing known games, since they might not
expect a separate SPARSE queue to pop up.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33166>
2025-02-06 14:07:20 +00:00
Hans-Kristian Arntzen
f58630f07c radv: Always allow sparse on normal GFX/COMPUTE/DMA queues.
Forcing a dedicated sparse queue is problematic in real-world scenarios.

In the current implicit sync world for sparse updates, we can rely on
submission order.

For use cases where an application can take advantage of the separate
sparse queue to do "async" updates, the existing implementation works
well, but problems arise when trying to implement D3D-style submission
ordering. E.g., when a game does sparse on a graphics or compute queue,
we need to guarantee that previous submissions, sparse update and future
submissions are properly ordered.
The Vulkan way of implementing this is to:

- Signal graphics queue to timeline N (i.e. last submission made)
- Wait on timeline N on the sparse queue
- Do sparse updates
- Signal timeline N + 1 on sparse queue
- Wait for timeline N + 1 on graphics queue (can be deferred until next
  graphics submit)

This causes an unavoidable bubble in GPU execution, since the
existing sparse queue ends up doing:

- Wait pending signal. The implication here is that all previous GPU
  work must have been submitted.
- Do VM operations on CPU timeline
- Wait for semaphores to signal (this is required for signal ordering)
- ... GPU is meanwhile stalling in a bubble due to GPU -> CPU -> GPU roundtrip.
- Signal semaphore on CPU (unblocks GPU work)

Letting the GPU go idle here is not great, and we can be screwed over by bad thread scheduling.

Another knock-on effect is that the graphics queue is now forced into
using a thread for submissions. This is because when the graphics queue
wants to wait for timeline N + 1, the sparse queue may not have
signalled the timeline yet on CPU, so effectively, we have created a
wait-before-signal situation internally in RADV. Throwing another thread
under the bus is not great either.

Just letting the queue in question support sparse binding solves all
these issues and I don't see a path forward where the D3D use case can
be solved in a separate queue world.

It is also friendlier to the ecosystem at large. RADV is the only driver
I know of that insists on separate sparse queues and multiple games
assume that graphics queue can support sparse.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33166>
2025-02-06 14:07:20 +00:00
Erik Faye-Lund
4209f8ebf6 pan/ci: add a couple of common flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33425>
2025-02-06 13:42:44 +00:00
Erik Faye-Lund
a6e0492da1 pan/ci: add fail from llvm 19 upgrade
This was missed while testing the LLVM 19 upgrade, because the
panfrost-t860-cl:arm64 job doesn't run pre-merge.

Fixes: 101065642d ("ci/debian: Upgrade Debian images to LLVM 19")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33425>
2025-02-06 13:42:44 +00:00
Antonio Ospite
fb8bfd1f0e ci/android: add an android-angle-lavapipe job
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
218c403dee ci: Move debian-android up to the build-for-tests stage
We're about to enable our first Android test job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
2aab9ef3fd ci/android: Check ANGLE version
Save the current git hash to /angle/hash after applying local patches,
and use it to verify that we're using our own ANGLE build in
Cuttlefish.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
0fc4aef848 ci/android: Build and use ANGLE
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
cc2bb73369 ci: Allow building ANGLE for multiple platforms
Prepare for building ANGLE for Android, which requires applying a
patch to fix building with minimal dependencies.

Rework the existing script by allowing passing the ANGLE_TARGET and
ANGLE_ARCH environmental variables to specify the target platform,
Android or Linux, and also allow building for arm64 in addtition to
x64 by setting ANGLE_ARCH.

Also build the GLESv1 compatibility mode library (libGLESv1_CM),
which is required for EGL testing on Android.

Based on work by Antonio Ospite.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Antonio Ospite
ba970a9de2 ci/android: fix building deqp on Android
After commit 83d1553391 (ci: Don't build Vulkan for GL dEQP, 2025-01-29) deqp
does not build cleanly anymore for the Android target.

Fix that by updating the
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch patch.

Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
17966a6a80 ci/lava: Don't build VK-main for arm64
Only amd64 needs the VK-main build, as it's only used by Raven and
Stoney on RADV.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
e0f0be6fc8 ci/android: Don't build desktop GL CTS
Android officially only supports GLES, and we don't need the desktop
GL CTS in CI.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Valentine Burley
89994ec65a amd/ci: Fix fraction for radv-stoney-angle-full
The radv-stoney-angle-full was unintentionally inheriting the fraction
from the pre-merge job.
Also use the correct manual rules definition while we're here, and use
consistent naming for the restricted rules.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33377>
2025-02-06 11:58:33 +00:00
Karmjit Mahil
54928d643e loader/wayland: Fix missing timespec.h include
`loader_wayland_dispatch()` also makes use of `timespec` so we
need `timespec.h`. Otherwise it fails to build due to
`timespec_sub_saturate()` missing.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Fixes: 90effcceab ("wsi/wayland: refactor wayland dispatch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12580
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33423>
2025-02-06 10:39:25 +01:00
Lionel Landwerlin
fdaf7c7b96 nir: add a high precision conversion unorm->float
We'll use this for D32->D24X8 conversion on Intel on Gfx11/Gfx12.0/DG2
(where HW doesn't have fp64 support).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33422>
2025-02-06 08:20:21 +00:00
Samuel Pitoiset
9b827556f5 radv: fix adding the BO to cmdbuf list when starting conditional rendering
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33403>
2025-02-06 07:13:29 +00:00
Sagar Ghuge
76bd7f9265 blorp: Enable SimpleFloatBlendEnable on Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Sagar Ghuge
0b462c8b9e iris: Enable simpleFloatBlendEnable on Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Sagar Ghuge
046b8717af anv: Enable simpleFloatBlendEnable on Xe3+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Sagar Ghuge
efeeae3926 intel/genxml: Update BLEND_STATE_ENTRY structure
This change adds the SimpleFloatBlendEnable field to the structure.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32739>
2025-02-05 22:27:54 -08:00
Martin Roukala (né Peres)
d1237cf6f7 freedreno/ci: update expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
562bc5697f radv/ci: update expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
b432f03c8a radv/ci: bump tahiti's cpu cores
You may thank @Venemo for his generous donation to our CI :)

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
66d0498872 zink/ci: update the radv expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Martin Roukala (né Peres)
a55613ce8d zink/ci: use the debian-built-testing for nvk
Fixes: 5b291c7ce6 ("ci: Move r300/nine/nvk builds out of critical path")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
2025-02-06 03:31:02 +00:00
Mike Blumenkrantz
30b616244c radv: print stringname for VkExternalMemoryHandleTypeFlagBits error
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Mike Blumenkrantz
20013a1774 radv: stop blocking non-2D import/export ops
these work fine

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Mike Blumenkrantz
ca8a740e3b radv: fix error reporting for VkExternalMemoryTypeFlagBitsKHR
wrong type name is confusing

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Mike Blumenkrantz
602f19bad8 ac/surface: always allow LINEAR modifier for color formats
this is always supported

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
2025-02-06 01:48:25 +00:00
Caio Oliveira
1ade9a05d8 intel/brw: Use brw prefix instead of namespace for analysis implementations
Also drop the 'fs' prefix when applicable.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:07 +00:00
Caio Oliveira
2b92eb0b2c intel/brw: Use brw prefix instead of namespace for dep analysis enum
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:07 +00:00
Caio Oliveira
e2f354587d intel/brw: Merge brw_ir_analysis.h into brw_analysis.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:07 +00:00
Caio Oliveira
c943fb0c20 intel/brw: Move analysis passes without own file to brw_analysis.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
0f7eb96af8 intel/brw: Move idom_tree declaration to brw_analysis.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
0ebb75743d intel/brw: Use brw_analysis prefix for performance analysis files
Move declaration to the common header and rename definition file.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
6a23749332 intel/brw: Use brw_analysis prefix for def analysis file
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
e0614e8ea1 intel/brw: Use brw_analysis prefix for liveness analysis files
Move declaration to the common header and rename definition file.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Caio Oliveira
e5369540ea intel/brw: Add brw_analysis.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33048>
2025-02-05 21:47:06 +00:00
Alyssa Rosenzweig
bf48eae1f9 nir: drop printf_base_identifier
superseded.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
e3bc6eafc8 nir/lower_printf: hash format strings in nir_printf_fmt
Lionel added a neat debugging tool. Let's make it work with the new-style
hashing approach too, since nir_printf_fmt is a lot more convenient than needing
to define a dedicated CL function to access printf (although that works too).

We remove the old non-hashed path, because it has no more functional users --
hashing is a hard requirement with vtn_bindgen2, which Intel has now switched
to.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
41eabbadfa intel: port to u_printf context + singleton
this is required with vtn_bindgen2. fixes printf there.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
9429d001b9 intel/nir_lower_printf: modernize nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
03ff5b2c03 intel: drop nir_lower_printf calls
this is now handled in vtn_bindgen2 for vtn path code. this does drop support
from printf from GRL but that seems appropriate at this point.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33380>
2025-02-05 20:33:15 +00:00
Alyssa Rosenzweig
07ccaa3118 Revert "hk: Stop using strings or common key types for meta keys"
This reverts commit 32e0e8c8c5, which broke the
build on Honeykrisp (and then the obvious build fix causes CTS to blow up with
explosions).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33406>
2025-02-05 20:01:35 +00:00
Eric Engestrom
cb53c83a5e docs: update calendar for 25.0.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33408>
2025-02-05 19:49:46 +00:00
Eric Engestrom
93a720f81a gfxstream: mark unused variables as such
It's unclear to me whether this is dead code that should be removed or
dead code that should be used, so I just marked it as unused to remove
a few thousand warnings when compiling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
b2b37cb1de gfxstream: use range variable for its intended purpose
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
96c183c759 gfxstream: drop dead variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
74d0a8cdd6 gfxstream: fix signedness of shifts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:42 +00:00
Eric Engestrom
58938f7348 gfxstream: drop unnecessary semi-colons
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
2025-02-05 19:28:41 +00:00
Eric Engestrom
5f54beb307 ci/cuttlefish: drop rm libglapi.so now that it's no longer loaded
Fixes: 44bda7c258 ("dri: put shared-glapi into libgallium.*.so")
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33388>
2025-02-05 18:47:32 +00:00
Eric Engestrom
4bbbbb96be docs/android: drop libglapi.so now that it's gone
Fixes: 44bda7c258 ("dri: put shared-glapi into libgallium.*.so")
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33388>
2025-02-05 18:47:32 +00:00
Alyssa Rosenzweig
0ce0b7c7b0 hk: advertise EXT_image_view_min_lod
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
157ffa5b43 hk: emulate EXT_image_view_min_lod
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
8e1ce5331b hk: rearrange sampler image desc
pack nicer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
7ed6aa68ad hk: pack has_border with clamp_0_sampler_index
this is cheaper to decode (shorter preambles!).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
6e29a2c8d5 agx: switch to nir_tex_src_lod_bias_min_agx
saves moves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
932d8a68eb agx: lower min LOD for txf
to match the robustness semantic the spec wants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
780b814354 nir: add lod_bias_min_agx tex src
this lets nir_opt_preamble Just Do The Right thing, so model in NIR

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Alyssa Rosenzweig
c5de33e48e nir: add image_min_lod_agx
for EXT_image_view_min_lod emulation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33386>
2025-02-05 17:27:18 +00:00
Samuel Pitoiset
4fc856af98 radv: fix caching on-demand meta shaders
This switches to disk_cache instead of our own mechanism which only
stored meta shaders when the logical was destroyed.

Meta shaders are still stored separately from the application shaders
because they are common to all applications on a given GPU/Mesa version.
The default cache is 32MiB which should be large enough.

This fixes massive stuttering in FF7 Rebirth but all apps are
technically affected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33370>
2025-02-05 16:30:27 +00:00
Samuel Pitoiset
9d03c1afe0 vulkan/runtime: allow to use a different disk cache
Instead of using the default one provided by the physical device.
This will be used by RADV to store meta shaders to a separate single
cache file.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33370>
2025-02-05 16:30:27 +00:00
Samuel Pitoiset
30961b2bfe util/disk_cache: add a new helper to create a disk cache
This will be used by RADV to store the meta shaders to a separate
cache directory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33370>
2025-02-05 16:30:27 +00:00
Job Noorman
8404e7428b ir3: fix emitting descriptor prefetches at end of preamble
The fix in e7ac1094f6 to emit preamble defs in the correct block would
move the cursor of the builder that is later used to insert descriptor
prefetches, emitting them at the wrong place. Fix this by resetting the
cursor before emitting the prefetches.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: e7ac1094f6 ("ir3: rematerialize preamble defs in block dominated by sources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33399>
2025-02-05 14:58:38 +00:00
Valentine Burley
e192d7d615 intel/ci: Update expectations for Xe
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
12ddff54ba intel/ci: Use INTEL_XE_IGNORE_EXPERIMENTAL_WARNING to reduce warnings
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
0d1fa0f1a3 intel/dev: Provide a toggle to avoid warnings about unsupported devices
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
fcd5d25888 intel/ci: Load Xe instead of i915 on ADL
Xe doesn't probe on ADL without being explicitly forced through cmdline
arguments.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
93c5abd32b intel/ci: Add newer i915/ADL-P firmware to rootfs
Add updated Alder Lake P firmware directly to the rootfs, as it is newer
than the version available in the Debian package. This is required for
the Xe kernel driver and is recommended for i915.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
f736f19642 intel/ci: Drop redundant BOOT_METHOD variables
The BOOT_METHOD is defined in .intel-common-test, which every Intel
job inherits, including the zink jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
b2105fe162 ci/lava: Allow passing extra cmdline arguments
The LAVA_CMDLINE variable is appended to extra_nfsroot_args.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
9950dfcd80 ci: Use new kernel with Intel Xe driver
The only change since the previous kernel is the enabling of
CONFIG_DRM_XE.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Valentine Burley
8a54823db9 ci/intel-gpu-freq: Add Xe support
Intel switched to exclusively using per-tile sysfs interfaces in Xe.
The locations and names of the sysfs attributes also changed compared
to i915, so update the intel-gpu-freq.sh script to work with both KMDs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33282>
2025-02-05 14:01:03 +00:00
Mary Guillemard
e3b8d1da6d panvk: Disallow unknown GPU models early in physical device init
We rely on the panfrost_model details around the codebase, if it's not
known this is a problem.

As a result, we will now disallow anything that isn't known like what
we do on Gallium.

Fixes: c95ef9e323 ("panvk: Fix NULL deref on model name when device isn't supported")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Suggested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
0e7ac7d65f panfrost: Properly name CSF instruction UMIN32 source 0
Was named source 2, but it's actually source 0.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
7bb6ebe938 pan/decode: Fix indirect branch calculation for 64-bit
THe enum variant for u64 was actually 32-bit making all 64-bit operation
wrong.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d0dc3d30c ("pan/decode: Add a helper to print CS binaries without interpreting them")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
135aeddc9b pan/bi: Use 2D dimension with TEX_FETCH with CUBE on Valhall
TEX_FETCH doesn't have the CUBE dimension, this was working on v9 and
v10 but this fails on Avalon.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: ce52b6d359 ("pan/bi: Rework indices for tex on Valhall")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
c36326d3af pan/bi: Remove b3210 from valid swizzle
This was removed on v11, we currently don't use it so to ensure no one
start using it, let's just mark it as reserved.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
b00c09b920 pan/bi: Fix invalid CLPER encoding
This src1 expect lanes, isn't widen and have a size of 8-bit (5-bit on
Valhall, 4-bit on Avalon)

We also now disallow swizzle lowering on it. (even on Bifrost)

Fixes: 316486dd9f ("pan/va: Add initial ISA.xml for Valhall")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
637cb0a993 pan/bi: Remove shift lanes invalid encodings
We were wrongly defining values that select more than one byte.

The swizzle used for H01 was working fine for v9 and v10, but this
generate an invalid encoding on Avalon.

This fixes this by using B00 variant as we are only using 8-bit sources.

Fixes: f45654af59 ("pan/va: Add packing routines")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
fbd5d58e36 pan/bi: Properly encode LEA_BUF_IMM
We were hardcoding table 61 and index 0 for IDVS based usage and this
could have been misused.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f45654af59 ("pan/va: Add packing routines")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
38a3cd8c76 panfrost: Fix PROGRESS_LOAD destination register
The offset of dest should be 40, not 48.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Mary Guillemard
05c2abcfea panfrost: Fix group priorities in drm-shim
Those were supposed to use BITFIELD_BIT.

Fixes: 2237cff1af ("panfrost: Report default value for GROUP_PRIORITIES_INFO in drm-shim")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
2025-02-05 13:30:29 +00:00
Faith Ekstrand
555b8580ae nak: Fix cbuf textures
Somewhere between writing c1510ad72e ("nak: Optimize bindless to cbuf
textures on Volta+") and me rebasing it a year later, we switched to
using the NV-specific ldc_nv intrinsic for cbuf loads.  It's basically
the same as load_ubo but we're detecting the wrong intrinsic so the
optimization does nothing.

Fixes: c1510ad72e ("nak: Optimize bindless to cbuf textures on Volta+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33398>
2025-02-05 13:02:46 +00:00
Erik Faye-Lund
4d86a1c928 pan/ci: add flaky tests to the flake-list
These have been switching between failing and passing recently. Not
really sure what's going on here, but we don't want the CI to flip
randomly between failing and passing, so let's mark them as flakes.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33381>
2025-02-05 12:38:16 +00:00
Erik Faye-Lund
6f70425ef5 panvk/ci: add back incorrectly removed crash
Turns out, this was only fixed on G610, not on G52.

Fixes: f93a48e4e3 ("panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33381>
2025-02-05 12:38:16 +00:00
Georg Lehmann
ed675272f4 nir/lower_poly_line_smooth: use intrinsics_pass
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
998e2299f7 nir/lower_poly_line_smooth: don't reject fp16
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
ff225dee67 radv: inline radv_nir_lower_poly_line_smooth
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
b588b56078 radv: remove radv_should_lower_poly_line_smooth
I think this was broken as there might be a store_output with
less than 4 components to a location that shouldn't be smoothed
anyway (i.e. not the first one).

nir_lower_poly_line_smooth now handles the case where the first location
doesn't have 4 components.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
359ba65903 nir/lower_poly_line_smooth: support partial store_output
RADV needs this to skip if there is no alpha component

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:35 +00:00
Georg Lehmann
6c410456d9 nir/lower_poly_line_smooth: only smooth first color target
The VK spec says:
coverage value is multiplied into the color location 0’s
alpha value after fragment shading

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:34 +00:00
Georg Lehmann
534c2ceac8 nir/lower_poly_line_smooth: don't emit control flow
The if is really short so it should really use a conditional select,
but this pass is called too late go through all the usual lowerings
and opts.

Foz-DB Navi21:
Totals from 1128 (1.42% of 79377) affected shaders:
MaxWaves: 29358 -> 29342 (-0.05%)
Instrs: 552306 -> 549668 (-0.48%); split: -0.58%, +0.10%
CodeSize: 2796392 -> 2782360 (-0.50%); split: -0.59%, +0.08%
Latency: 2574361 -> 2566482 (-0.31%); split: -0.47%, +0.16%
InvThroughput: 644047 -> 647500 (+0.54%); split: -0.18%, +0.72%
Copies: 37521 -> 36460 (-2.83%); split: -2.92%, +0.09%
Branches: 12009 -> 10157 (-15.42%)
VALU: 350886 -> 349199 (-0.48%); split: -0.64%, +0.16%
SALU: 104459 -> 105415 (+0.92%); split: -0.00%, +0.92%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33340>
2025-02-05 11:23:34 +00:00
Daniel Schürmann
1a8a643bbd aco/isel: track control flow divergence in loops more accurately
We introduce two new variables, cf_context::in_divergent_cf and
cf_context::parent_loop.has_divergent_break, in order to determine
whether there is any other invocations on a different CF path.

Totals from 1305 (1.64% of 79395) affected shaders: (Navi31)

Instrs: 659211 -> 657815 (-0.21%); split: -0.22%, +0.01%
CodeSize: 3483228 -> 3477960 (-0.15%); split: -0.16%, +0.01%
VGPRs: 68820 -> 48048 (-30.18%)
Latency: 14197750 -> 14170767 (-0.19%); split: -0.26%, +0.07%
InvThroughput: 1619103 -> 1619826 (+0.04%); split: -0.02%, +0.07%
VClause: 12384 -> 12350 (-0.27%)
SClause: 26693 -> 26844 (+0.57%); split: -0.01%, +0.57%
Copies: 44994 -> 43535 (-3.24%); split: -3.26%, +0.02%
PreSGPRs: 49007 -> 48907 (-0.20%)
PreVGPRs: 32171 -> 32121 (-0.16%)
VALU: 349984 -> 349857 (-0.04%); split: -0.04%, +0.00%
SALU: 84252 -> 83988 (-0.31%); split: -0.32%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
583c3586fe aco/isel: remove loop nest information from exec_info
Since we never enter loops with an empty exec mask, and the
control flow is structured, we don't need to consider the
loop nest depth.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
a77258346c aco/isel: fix assumptions about potential empty exec mask in nested control flow
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
44216e035f aco/isel: add and use exec_info::empty() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
8e8398832c aco/isel: use cf_context in loop_context to restore cf information
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
8b9c9fb904 aco/isel: use cf_context in if_context to restore cf information
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
c2bfc05d71 aco/isel: rename cf_context::has_divergent_branch
Make it more consistent with cf_context::has_branch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
0c5a91b9f2 aco/isel: move cf_info into separate struct cf_context
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Daniel Schürmann
61fa007e48 aco/isel: fix empty exec tracking for uniform branches
Totals from 5 (0.01% of 79395) affected shaders: (Navi31)

Instrs: 54730 -> 54715 (-0.03%)
CodeSize: 276928 -> 276852 (-0.03%)
Latency: 215212 -> 214874 (-0.16%)
InvThroughput: 40154 -> 40150 (-0.01%)
Copies: 6824 -> 6821 (-0.04%); split: -0.06%, +0.01%
Branches: 1625 -> 1615 (-0.62%)
SALU: 5682 -> 5678 (-0.07%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33206>
2025-02-05 10:54:21 +00:00
Benjamin Lee
bd32129c1a panvk: document missed extensions in new_features
This should have been included in the commits that introduced the
extensions.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 00fb0f5ec2 ("panvk: enable KHR_separate_depth_stencil_layouts")
Fixes: 935cadbc2e ("panvk: enable VK_KHR_depth_stencil_resolve")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33394>
2025-02-05 10:46:48 +00:00
Valentine Burley
a4b8131255 zink/ci: Make zink-venus-lvp-full a nightly job
The zink-venus-lvp-full job was intended to be a nightly job, but it
was missing the proper manual rules for that.

Fixes: 7bf4d6a4db ("zink/ci: Add a fraction for zink-venus-lvp")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Martin Roukala <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33393>
2025-02-05 10:25:01 +00:00
Lionel Landwerlin
a8b84e1898 anv: use A64 messages for push constants loads on Gfx12.5+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:04 +00:00
Lionel Landwerlin
5c17299084 brw: enable A64 pulling of push constants
This will be useful for pulling constants in device bound shaders. A64
allows us to put the constants anywhere.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:04 +00:00
Lionel Landwerlin
0808125914 brw/anv: rework push constants for mesh/task shaders
Now using the same model as the compute shader.

As a result we temporarily disable the use of the Inline register for
providing push constants on Task & Mesh shaders. Since that register
is also available on the compute shader we'll try to find a way to use
the same mechanism for all 3 shaders in another MR and bring back that
optimization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:04 +00:00
Lionel Landwerlin
a77e532248 anv: add a helper for getting gfx push constant addresses
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
26347b4876 anv: use heap size to program generate state heap
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
ddf64a7d95 anv: track the first 2MB of unused VA
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
48e41c87b0 anv: increase general state pool
We'll start store more push constants in there.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
75e09c4ff3 anv: reuse helper for compute push constants
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Lionel Landwerlin
c08b437db7 brw: fixup scoreboarding for find_live_channels
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
2025-02-05 09:56:03 +00:00
Qiang Yu
09b5de379c gallium/ddebug: add missing modifier callback
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33391>
2025-02-05 09:26:22 +00:00
Qiang Yu
da023a5a19 ac/surface: fix radv import dmabuf from radeonsi
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33391>
2025-02-05 09:26:22 +00:00
Samuel Pitoiset
f095aaf819 radv/meta: stop using string keys also for DGC and query objects
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33379>
2025-02-05 08:25:00 +00:00
Iago Toral Quiroga
886d720c19 mesa: fix RGBA_SIGNED_COMPONENTS for lowered signed luminance
Some drivers implement luminance as RGBA. Since the code checks the
renderbuffer format instead of the internal format this can cause the
query to incorrectly return "signed" on the Alpha component for signed
luminance formats.

Fixes the following Piglit test for various drivers (at least Panfrost
and V3D):
spec/ext_packed_float/query-rgba-signed-components

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33372>
2025-02-05 07:41:51 +00:00
Iago Toral Quiroga
a6dc8fa426 v3dv: fix missing access bit flag when checking for texel buffer reads
VK_ACCESS_2_SHADER_READ_BIT matches all types of reads from shaders,
texel buffers too.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33367>
2025-02-05 07:04:35 +00:00
Martin Roukala (né Peres)
5adf305fe6 ci: re-enable austriancoder's farm
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
183ffe86b7 etnaviv/ci: convert from baremetal to CI-Tron
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
f72ee5e587 ci/b2c: de-duplicate the download of install.tar
By having the DUTs download and extract from a CI-Tron artifact, we
deduplicate the downloading of the build artifact across all DUTs from
a CI farm, leading to quicker and more reliable jobs, and lower
bandwidth usage on both FD.o and the CI gateway.

Inside the CI-Tron infra, this should also drastically reduce the job
submission time by removing needless copies (executorctl -> executor,
executor -> S3, S3 -> B2C, and even B2C -> NBD when applicable).

As an additional bonus, the size of install.tar is reduced by virtue of
zstd providing better compression than zip/deflate.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
ab3c0c4fa3 ci/b2c: add support for diskless DUTs
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
9ae0b1c467 ci/image-tags: bump the debian base tag
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
596cfbbed1 ci/debian/test-vk: trim down the container on a per-arch basis
Not every architectures has jobs requiring every features provided by
the VK test container, so let's trim it down a bit by disabling the
features that are not needed.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
39969409f6 ci/debian/test-vk: remove software-properties-common
This is not needed anymore (as of 85dace1c0b) and it tries to
pull systemd which breaks the build.

Fixes: 85dace1c0b ("gitlab-ci: remove software-properties-common")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
d24c68f11f ci/test: add arm32 b2c jobs
They will be used by etnaviv jobs in the following commits.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
9c5f0de7ac ci: Add debian/arm32_test-* images
Same as arm64, but with fewer bits.

v2 (Martin Roukala):
 - Dropped some LAVA-specific changes
 - Use FDO_DISTRIBUTION_PLATFORM to select the platform

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
2cc807b418 ci/build-deqp: delegate the deqp main commit check to github
Rather than downloading the full history of deqp just to check a merge
base, let's ask github for this information directly.

This fixes the deqp build on arm32 platforms which do not have enough
address space to run git fetch on such a large repo.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
cd7ec5403d ci-templates: update to the latest upstream version
This version brings support for cross-compiling containers, which will
important to build arm32 containers on arm64.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
175b6d02ea ci: Move apitrace to test-base container
Instead of building apitrace in each of test-gl and test-vk, just build
it straight into test-base.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
3be9d71537 ci: Move common testing packages to test-base
Both test-gl and test-vk install a bunch of stuff which is required to
just run tests. Instead of copy and pasting a bunch of random stuff into
derived containers, just keep it in the base container. Technically this
makes both containers very slightly larger, but the additions here pale
into comparison with 700MB of mostly-unused Proton, 400MB of deqp-vk
mustpass, etc.

v2 (Martin Roukala):
  * Move spirv-tools to the list of dependencies as it is needed by
    python3-renderdoc

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Daniel Stone
930b4009e1 ci/vvl: Use appropriate level of parallelism
The whack-a-mole continues ...

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
3e05307bee ci/test/b2c: do not download the debian/*_test-(gl|vk) artifacts
There are no artifacts there that we need, so let's not waste time
making requests to GitLab.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
d450d9c70b ci: be explicit about the fact HW jobs do not need linter artifacts
Not sure if it will change anything, but better be safe than sorry.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Martin Roukala (né Peres)
978c0989eb ci: fix the artifact name
This has probably no incidence on anything else but human-visible names
but let's fix it anyway.

Fixes: ef3091736c ("ci: use CI_PROJECT_NAME for artifacts name")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
2025-02-05 04:35:07 +00:00
Dave Airlie
44b88c1034 radv/video: add h264 b frame encoding support.
This is supported on VCN 3 and newer.

Acked-by: David Rosca <nowrep@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31104>
2025-02-05 04:11:38 +00:00
Dave Airlie
717c85d08a radv/video: calculate colloc buffer size for h264 B frames.
This adds the overheads for the colloc buffer needed when
B frames are enabled.

Acked-by: David Rosca <nowrep@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31104>
2025-02-05 04:11:38 +00:00
Dave Airlie
19b27c77bd radv/video: move encoder to using a buffer instead of an image
For the encoder DPB just allocate a buffer of storage, this should
align memory usage more with what radeonsi does.

Acked-by: David Rosca <nowrep@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31104>
2025-02-05 04:11:38 +00:00
Qiang Yu
adc51bea28 doc,src: replace doc and comments for shader and compute cap
Use command:
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_SHADER_CAP_\([A-Za-z0-9_]*\)/pipe_shader_caps.\L\1/g' {} +
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_COMPUTE_CAP_\([A-Za-z0-9_]*\)/pipe_compute_caps.\L\1/g' {} +

Also remove value type in pipe_compute_caps doc because they
are explicit in struct now.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
f020ab18e1 gallium: remove screen shader and compute get param callback
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
cb251ff3d0 gallium/aux: remove aux shader param get function
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
4e0f722fc1 zink: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
aaf865cdf2 virgl: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
27c4ac1c10 vc4: remove shader get param
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
e51b32e7e9 v3d: remove shader and compute get param
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
b3ae0e6054 tegra: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
d353965473 svga: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
b2c981183c softpipe: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
7ca3618c01 radeonsi: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
ba2e6ae8f8 r600: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
809b5728a2 r300: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
bdd59c1cd5 panfrost: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
5667133413 nouveau/nvc0: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:49 +08:00
Qiang Yu
98529b9b65 nouveau/nv50: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
8d9890c0e0 nouveau/nv30: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
d32c928038 llvmpipe: remove shader and compute get param
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
5de8258303 lima: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
0f9f7152f7 iris: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
5a3ac70015 i915: remove shader get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
02ca28b5ca freedreno: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
a5b58b8c88 etnaviv: remove shader get param
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
e1010edbc0 d3d12: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
aa12b9bb83 crocus: remove shader and compute get param
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
5b251ed5d0 asahi: remove shader and compute get param
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
c46aacc216 rusticl: replace get_compute_param with pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
e08664cf85 rusticl: replace get_shader_param with pipe_shader_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
0911b13d70 gallium,mesa: replace get_compute_param with pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
961a9c3a43 clover: replace get_compute_param with pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
1cc42f1493 gallium,mesa: replace get_shader_param with pipe_shader_caps access
Use command:
  find . -type d -path "./.git" -prune -o -type f -exec sed -i -E ':a;N;$!ba;s/->get_shader_param\(([[:space:]]*[^,]*),([[:space:]]*)([^,]*),([[:space:]]*)PIPE_SHADER_CAP_([A-Za-z0-9_]+)\)/->shader_caps[\3].\L\5/g' {} +

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
916bdf0892 lavapipe: change min shader param to use pipe_shader_caps
MSVC does not support GCC ({}) macro extension, so have to
use offsetof().

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
12f420ceba nine: GET_SHADER_CAP use pipe_shader_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:48 +08:00
Qiang Yu
3ffa83cc6a zink: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:20:46 +08:00
Qiang Yu
a18cf7cac3 virgl: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
c78018c552 vc4: init shader caps
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
0a1d1e47c9 v3d: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
c312ca70bc tegra: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
69f38859f3 svga: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
bae9812092 softpipe: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
42d6c1245d radeonsi: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
390854e523 r600: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
61a0a4ee67 r300: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
5b782f5570 panfrost: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
2d194637c5 nouveau/nvc0: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
b2e1fcbe01 nouveau/nv50: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
a242c6ee3c nouveau/nv30: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
a65b74af51 llvmpipe: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
3450274f78 lima: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
36534ec18d iris: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
29d0b4ccde i915: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
a0a6b70666 freedreno: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
99605fb3a8 etnaviv: init shader caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
332502d9a2 d3d12: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
9a9a61a143 crocus: init shader and compute caps
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
1b348d3a3e agx: init shader and compute caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
87cc79126d draw: add draw_init_shader_caps
Mapped from draw_get_shader_param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
02903e150e gallivm: add gallivm_init_shader_caps
Mapped from gallivm_get_shader_param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
19240e0fea tgsi: add tgsi_exec_init_shader_caps
Mapped from tgsi_exec_get_shader_param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
379b3a782d gallium: copy shader and compute caps for ddebug/noop/trace
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
7b838218eb gallium: add pipe_shader_caps and pipe_compute_caps
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:45 +08:00
Qiang Yu
0a5c8853ab gallium,mesa: remove ir_type param when get_compute_param
We are going to convert compute cap query to struct access,
so remove this param.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
55be769f6d radeonsi: init compute caps without ir_type param
Only PIPE_COMPUTE_CAP_*_CLOVER are queried with PIPE_SHADER_IR_NATIVE,
other caps will be always queried with PIPE_SHADER_IR_NIR.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
a1e039dd35 r600: init compute caps without ir_type param
Only clover caps use different value.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
8a6eb7041e gallium,clover: add compute caps used by clover only
To remove ir_type param when get_compute_param. These caps depend
on IR type and used by clover only (only clover query with
PIPE_SHADER_IR_NATIVE, others query with PIPE_SHADER_IR_NIR).
Only r600 and radeonsi support PIPE_SHADER_IR_NATIVE.

These caps can be removed when clover is deprecated.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
2af8172b62 gallium: fix ddebug and noop screen caps init
Fixes: a036231c09 ("gallium: add u_init_pipe_screen_caps")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Qiang Yu
0f656756ec lavapipe: fix min_vertex_pipeline_param
Fixes: d91a549b67 ("lavapipe: check all vertex-stages")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
2025-02-05 11:12:44 +08:00
Benjamin Lee
00fb0f5ec2 panvk: enable KHR_separate_depth_stencil_layouts
Panvk doesn't use image layouts for anything, so we don't need any
changes to support this.

New fails in g52 CI expectations are *_separate_layouts variants of
existing failing tests, that were previously skipped.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33179>
2025-02-04 22:51:53 +00:00
Benjamin Lee
935cadbc2e panvk: enable VK_KHR_depth_stencil_resolve
This has been supported since baf8570b28,
where depth/stencil resolve was added at the same time as color resolve.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33179>
2025-02-04 22:51:53 +00:00
Yiwei Zhang
1885ff8a39 venus: refactor more to image format props sanitization
The external memory properties fix can be done once and cached. To be
noted, VkAndroidHardwareBufferUsageANDROID is a driver side struct so
will stay outside the cache.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33389>
2025-02-04 22:29:49 +00:00
Yiwei Zhang
5d440a7d97 venus: further sanitize image props for rgba10x6
ycbcr sampler conversion requires VK_SAMPLE_COUNT_1_BIT. This is needed
before we support VK_EXT_rgba10x6_formats.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33389>
2025-02-04 22:29:49 +00:00
Jung-uk Kim
f9fc7392fa FreeBSD: Disable support for "-mtls-dialect" for FreeBSD
Clang 19 supports "-mtls-dialect=" but FreeBSD does not support "-mtls-dialect=gnu2".
Skip auto-detection for FreeBSD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31931>
2025-02-04 19:18:44 +00:00
Erik Faye-Lund
e49df902b4 panvk: report strictLines as true
We are implementing the line rasterization as per the spec, so we should
report strictLines as true. This matches what the DDK does as well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33373>
2025-02-04 18:55:29 +00:00
Erik Faye-Lund
1d64095410 panvk: fix line-rasterization of bifrost
Vulkan defines the line rasterization to *always* use perpendicular
rather than aligned line ends (unless otherwise specified by
VK_EXT_line_rasterization). So let's remove the code that conditionally
sets the bit, we always want the default value (0) here.

It might seem confusing because we kinda named this field wrong. It's
really about perpendicular vs aligned line ends. That's a cleanup we
might want to deal with later, but deleting the assignment is sufficient
to fix this issue. This is also what we do for v10.

This was probably just copied from the Gallium-driver, where this logic
is more or less correct.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33373>
2025-02-04 18:55:29 +00:00
Aaron Ruby
4ea4b6c98b gfxstream: Replace pre-processor (LINUX && !ANDROID) checks with LINUX_GUEST_BUILD
My understanding is that (Linux && !Android) is practically what is meant by
LINUX_GUEST_BUILD. Let's be consistent about this.

Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33364>
2025-02-04 17:37:15 +00:00
Karol Herbst
bb6d371c0e rusticl: support SPIR-V 1.5 and 1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
2025-02-04 15:49:58 +00:00
Karol Herbst
2f4931353f rusticl/kernel: call nir_lower_variable_initializers earlier
Fixes spirv_new spirv14_nonwriteable_decoration

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
2025-02-04 15:49:58 +00:00
Karol Herbst
48f93e7313 clc: bump SPIR-V target to 1.6
We depend on a new enough SPIRV-Tools, so we can bump this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
2025-02-04 15:49:58 +00:00
James Hogan
7f493b45ae mesa: Fix FramebufferTextureMultiviewOVR num_views check
The check in check_multiview_texture_target() whether numViews <= 0 (as
required by the OVR_multiview spec) is never triggered since it is only
called by frame_buffer_texture() when numviews > 1, as numviews of 0 is
passed in by non multiview FramebufferTexture functions. Such cases are
incorrectly treated as non-multiview attachments.

Tweak frame_buffer_texture() to take an extra bool argument "multiview"
to distinguish between a multiview call with numviews=0, and a
non-multiview call.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
2025-02-04 15:12:53 +00:00
James Hogan
39491da1b6 mesa: Fix multiview attachment completeness check
Fix the FBO attachment completeness test to ensure that multiview
attachments have all views referring to layers in range of the
underlying texture.

The OVR_multiview spec states:
  Add the following to the list of conditions required for framebuffer
  attachment completeness in section 9.4.1 (Framebuffer Attachment
  Completeness):

  "If <image> is a two-dimensional array and the attachment
  is multiview, all the selected layers, [<baseViewIndex>,
  <baseViewIndex> + <numViews>), are less than the layer count of the
  texture."

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
2025-02-04 15:12:53 +00:00
James Hogan
b774b615d2 glsl: Expose gl_ViewID_OVR back to GLSL 1.30
OVR_multiview requires OpenGL 3.0, so expose gl_ViewID_OVR builtin back
to GLSL 1.30 on OpenGL.

v2: Minor whitespace fix

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
2025-02-04 15:12:53 +00:00
Hyunjun Ko
bf88b9b324 kopper: implement to get sync values.
v1. Makes special_event a member of struct dri_drawable to be re-used.
(Michel Dänzer @daenzer)

v2. Guard with VK_USE_PLATFORM_XCB_KHR and clean-up.
(Mike Blumenkrantz @zmike)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474>
2025-02-04 14:36:05 +00:00
Hyunjun Ko
e8d335d496 dri: fix a build error
Fixes error:
`struct pipe_context' declared inside parameter list will not be visible outside of this definition or declaration`

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474>
2025-02-04 14:36:05 +00:00
Martin Krastev
cf36476961 svga/ci: disable vmware farm
Take down vmware farm for maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: Jose Fonseca <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33375>
2025-02-04 15:27:07 +02:00
Tapani Pälli
4a41564619 intel/common: fix mi_builder_test issue
Fixes intel_gfx20_mi_builder_test failures on LNL.

Fixes: bb31287d24 ("intel: Initialize upper 32bits of drm_xe_sync.handle")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33366>
2025-02-04 12:57:19 +00:00
Faith Ekstrand
c1510ad72e nak: Optimize bindless to cbuf textures on Volta+
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Faith Ekstrand
272e8ec461 nak: Add support for bound and cbuf textures
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Faith Ekstrand
16b6ea415f nvk: Only pass sampler handles when needed
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Faith Ekstrand
2be01df8df nvk,nak: Only use u64 texture handles with codegen
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27755>
2025-02-04 10:11:04 +00:00
Pavel Ondračka
60e1bc55bf ci: fix debian-build-testing BUILDTYPE
Fixes: 5b291c7ce6
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33368>
2025-02-04 09:33:09 +00:00
Tapani Pälli
4064b5546b intel/dev: reduce warning noise from urb settings
This sets up the min value as if stage was active, later on
we set this to zero if such is not the case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12141
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33353>
2025-02-04 09:07:48 +00:00
Tapani Pälli
4e80045ae0 intel/genxml/anv: fix the layout of call stack handler struct
Patch adds new CALL_STACK_HANDLER struct which has offset to
start and end of RegistersPerThread field, this spec changes is
described in Wa_22019854901 (see HSD 22019967134).

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33342>
2025-02-04 08:44:04 +00:00
Samuel Pitoiset
5b856a741d radv: advertise computeDerivativeGroupQuads on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303>
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
bd8575ebd3 radv: implement derivative group quads on GFX12
It's natively supported by the hw.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303>
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
5fb23f29fe radv/nir: update radv_nir_opt_tid for derivative group quads
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33303>
2025-02-04 08:11:16 +00:00
Samuel Pitoiset
7d3062470f radv/meta: add missing pipeline lookups
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33360>
2025-02-04 07:52:01 +00:00
Giovanni Mascellani
08777e5ba9 llvmpipe: Remove an outdated comment about subclassing pipe_screen.
It seems that llvmpipe_screen very much exists and is indeed a
subclass of pipe_screen.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33343>
2025-02-04 07:00:08 +00:00
Benjamin Lee
effa913d16 panvk: advertise storagePushConstant16 and storageInputOutput16
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
3497069a04 panfrost: support 16-bit varyings
This is complicated by two things: mediump varyings, and the lack of u16
regfmt support in LD_VAR.

With mediump, a load(_interpolated)_input with a 16-bit dest size may
either be an explicit 16-bit type or a mediump type lowered by
nir_lower_mediump_io. With explicit 16-bit types, we write 16-bit values
in the VS, but with mediump we write 32-bit in the VS (for messy
reasons). bi_emit_load_vary needs to distinguish these cases by checking
for a mediump type, and set the appropriate source_format to convert the
type on the LD_VAR_BUF path. Types like 'mediump uint16' are luckily not
allowed.

The missing u16 regfmt for LD_VAR means that we take the obvious
approach for 16-bit int varyings of emitting 16-bit int formats in the
attribute descriptor and loading them to u16. Instead, we just
write/read all 16-bit varyings as f16 regardless of type. Unlike with
mediump, we don't need to do any 32bit->16bit conversion when loading in
the FS, so as long as we use the same type between the attribute
descriptor and LD_VAR, the conversion is a no-op and the mismatch
doesn't matter.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
1b359f3e59 panfrost: support 16-bit vertex attributes
There is no auto32 equivalent for 16-bit types, we need to select
specific register formats.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
02dc105a36 panfrost: move handling for bifrost mediump lowering to pan_collect_varyings
For Bifrost and newer, we always write mediump varyings from a 32-bit
source in the VS. This is needed because the FS does not unconditionally
lower mediump to 16-bit.

Previously we worked around this in panvk by replacing 16-bit formats
with 32-bit in emit_varying_descs, but once we support
storageInputOutput16, we will need to preserve 16-bit formats for
explicit 16-bit varyings.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Benjamin Lee
26ba20be51 panfrost: minor refactors in preparation for panvk 16-bit IO
Neither of these changes are a behavior difference. The change to
emitting uint16 formats from pan_collect_varyings for PSIZ is
inconsequential because neither panvk nor the gallium driver emit
attribute descriptors for special varyings.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33078>
2025-02-04 01:56:01 +00:00
Rebecca Mckeever
58bd1356cc pan/texture: Only use plane_chroma_2p for chroma planes
In a 3-plane uncompressed YUV surface, only the chroma planes should use
MALI_PLANE_TYPE_CHROMA_2P plane_type or set secondary_pointer.

Fixes: 144f9324a3 ("panfrost: prepare v9+ to support YUV sampling")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
2025-02-04 01:29:39 +00:00
Rebecca Mckeever
23aa784c05 pan/format: Use HW version to determine siting for YUV 422 formats
On v10, only YUV 420 formats support center_y or center siting.

On previous HW versions, YUV 422 formats support center_y siting but not
center_x or center siting.

Fixes: 83c76cceaf ("panfrost: advertise YUV formats for valhall")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
2025-02-04 01:29:39 +00:00
Casey Bowman
1da221427e vulkan/screenshot-layer: Add RGBA surface format support
The mesa screenshot layer attempts to use VK_FORMAT_R8G8B8_UNORM by
default. Using this, we can directly & efficiently write out to a
PNG file without further modifications. However, some GPUs don't
support the given format, so for those that don't, we'll attempt to
use VK_FORMAT_R8G8B8A8_UNORM, which will require some work to ensure
the alpha values are set to opaque to make RGB comparisons easier.

If both surface formats fail, a more descriptive failure
will be shown.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33295>
2025-02-04 00:51:35 +00:00
Caio Oliveira
96de531b5a anv: Add statistic for 'GRF registers' for Xe3+
For Xe3+ the registers are tightly packed to make better use of GRF
space, so add a statistic to keep track of how many registers were used.
For previous versions this is not useful since the code is spreading
the registers among the whole space.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33311>
2025-02-04 00:33:46 +00:00
Dylan Baker
07787f3208 intel: output a depfile with mesa_clc
This helps Ninja to more accurately rebuild when secondary inputs
changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33309>
2025-02-04 00:10:01 +00:00
Caio Oliveira
92085e7bab intel/brw: Remove 'fs' prefix from brw_from_nir functions
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33330>
2025-02-03 23:08:11 +00:00
Caio Oliveira
1332d84500 intel/brw: Rename file brw_fs_nir.cpp to brw_from_nir.cpp
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33330>
2025-02-03 23:08:11 +00:00
Adam Jackson
25707b57bc lvp: set subgroupQuadOperationsInAllStages to true
This enables them for task and mesh shaders, which for lvp are just
fancy compute shaders, and it's not like gallivm has any real awareness
of the stage it's emitting code for anyway.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32632>
2025-02-03 22:41:16 +00:00
Pavel Ondračka
c031a53a78 r300: copy propagate constant swizzles
For example:
SIN temp[1].x, temp[0].x___;
MOV temp[1].y, none._1__;
ADD temp[2].xyz, temp[1].xy__, const[0].ww__;

could be transformed into

SIN temp[1].x, temp[0].x___;
ADD temp[0].xyz, temp[1].x1__, const[0].ww__;

Shader-db RV410:
total instructions in shared programs: 112613 -> 112451 (-0.14%)
instructions in affected programs: 15613 -> 15451 (-1.04%)
helped: 148
HURT: 1
total temps in shared programs: 18149 -> 18129 (-0.11%)
temps in affected programs: 297 -> 277 (-6.73%)
helped: 21
HURT: 2
total cycles in shared programs: 169432 -> 169273 (-0.09%)
cycles in affected programs: 17779 -> 17620 (-0.89%)
helped: 145
HURT: 4

RV530:
total instructions in shared programs: 128650 -> 128443 (-0.16%)
instructions in affected programs: 21647 -> 21440 (-0.96%)
helped: 206
HURT: 4
total temps in shared programs: 17014 -> 17010 (-0.02%)
temps in affected programs: 216 -> 212 (-1.85%)
helped: 11
HURT: 6
total cycles in shared programs: 190719 -> 190523 (-0.10%)
cycles in affected programs: 28892 -> 28696 (-0.68%)
helped: 203
HURT: 8

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275>
2025-02-03 22:13:32 +00:00
Pavel Ondračka
9835a2df83 r300: do not limit maximum TEX group for R300/R400
We do not have the TEX semaphore there anyway so the benefits are not as
high as with R500 and the chances of running out of TEX indirections are
just too high.

This will increase the register pressure in some shaders, but I believe
the gained shaders are worth it and there is also some cycles reduction
in some cases. I'm not sure how to optimize this further without
actually clonning the shader before the pair shceduling and than doing a
trial and error to see if there is some compromise where we can just hit
the indirection limit to not group it too much...

Shader-db RV410:
total instructions in shared programs: 112800 -> 112825 (0.02%)
instructions in affected programs: 5024 -> 5049 (0.50%)
helped: 23
HURT: 19
total temps in shared programs: 18170 -> 18244 (0.41%)
temps in affected programs: 1365 -> 1439 (5.42%)
helped: 39
HURT: 34
total cycles in shared programs: 169535 -> 166806 (-1.61%)
cycles in affected programs: 14229 -> 11500 (-19.18%)
helped: 84
HURT: 4

LOST:   0
GAINED: 8

GAINED: shaders/godot3.4/34-59.shader_test FS
GAINED: shaders/lightsmark/25.shader_test FS
GAINED: shaders/lightsmark/28.shader_test FS
GAINED: shaders/lightsmark/34.shader_test FS
GAINED: shaders/this-war-of-mine/144.shader_test FS
GAINED: shaders/this-war-of-mine/145.shader_test FS
GAINED: shaders/tropics/432.shader_test FS
GAINED: shaders/tropics/462.shader_test FS

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275>
2025-02-03 22:13:32 +00:00
Pavel Ondračka
b3bd769957 r300: remove some dead code in redeon_program_alu
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33275>
2025-02-03 22:13:32 +00:00
Samuel Pitoiset
9993f3dd6a ac,radv,radeonsi: add new GFX12_DCC_WRITE_COMPRESS_DISABLE tiling flag
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33301>
2025-02-03 21:12:07 +00:00
Mike Blumenkrantz
3064bfc312 zink: guard rebar check against fallback heap detection
if there is no heap with device-local and host-visible, then
rebar cannot exist. the previous detection did not account for
the rebar heap using the device-local fallback, which of course
would have the same size as the device-local heap and pass the threshold
check

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33359>
2025-02-03 20:42:26 +00:00
Roland Scheidegger
8aae760144 llvmpipe: don't assert on exceeding if_stack size
Rather than assert (and otherwise write past the array size), guard against
this (and miscompile the shader), to make the code more robust.
This mimics the behavior of exceeding the cond_stack size (and other similar
stacks) - the if_stack is only used together with the cond_stack, the behavior
should be the same.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33338>
2025-02-03 19:58:45 +00:00
Jon Hunter
9cc0b497b3 freedreno/registers: Fix gen_header.py for older python3 versions
The gen_header.py script is failing for older versions of python3 such
as python 3.5. Two issues observed with python 3.5 are ...

 1. Python 3 versions prior to 3.6 do not support the f-string format.
 2. Early python 3 versions do not support the 'required' argument for
    the argparse add_subparsers().

Fix both of the above so that older versions of python 3 still work.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28780>
2025-02-03 19:26:35 +00:00
Dmitry Baryshkov
84e93daa26 freedreno/registers: allow skipping the validation
We don't need to run the validation of the XML files if we are just
compiling the kernel. Skip the validation unless the user enables
corresponding Kconfig option. This removes a warning from gen_header.py
about lxml being not installed.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28780>
2025-02-03 19:26:35 +00:00
Rob Clark
9540139f43 freedreno+tu: Add new virtgpu caps
Avoid some extra round-trips at startup if the host is new enough.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33339>
2025-02-03 18:56:37 +00:00
Juan A. Suarez Romero
0ee5015da4 Revert "st/mesa: move VS & TES output stores to the end before unlowering IO"
This reverts commit 3290222a1a, which was
introduced to fix a regression that only happens in v3d.

As this was moved to the v3d driver, it does not makes any sense more to
do it here.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33310>
2025-02-03 17:10:48 +00:00
Juan A. Suarez Romero
1e0e521a7d broadcom/compiler: move stores to the end of shader
It is possible that shader comes with output stores executed before
loading inputs. As the memory to read the inputs and store the outputs
is the same, this mean it could be overwriting the inputs before reading
them.

This move avoids this situation.

This partially improves
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33310>
2025-02-03 17:10:47 +00:00
Jordan Justen
0e648a238e intel/dev: Add BMG PCI IDs (0xe210, 0xe215, 0xe216)
Backport-to: 24.3
Backport-to: 25.0
Ref: https://patchwork.freedesktop.org/patch/msgid/20250128162015.3288675-1-shekhar.chauhan@intel.com
Ref: bspec 68090
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33335>
2025-02-03 08:15:01 -08:00
Konstantin Seurer
3ab55b3c51 radv/meta: Stop using strings for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
32e0e8c8c5 hk: Stop using strings or common key types for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
db4277adf8 vulkan/meta: Stop using strings for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
1bba4cf21b vulkan/meta: Remove object types from vk_meta_object_key_type
Most values are used for multiple object types. It also is not
necessary, because the object type is already included in the key.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Konstantin Seurer
3319e496f7 vulkan: Stop using strings for BVH build pipeline keys
The intended use is to pass a keys struct with vk_meta_object_key_type
as its first member.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32881>
2025-02-03 16:03:49 +01:00
Iago Toral Quiroga
5572e274e2 v3dv: serialize jobs after any barrier when debug sync is set
This will ensure we always generate a new job after a barrier and
that the new job is setup to be serialized against all previous jobs.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33350>
2025-02-03 13:06:59 +00:00
Iago Toral Quiroga
8d9f5dfd1d v3dv: implement sync debug option
This makes it so all jobs submitted to the queue are automatically serialized
against all other jobs.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33350>
2025-02-03 13:06:59 +00:00
Sergi Blanch Torne
d36e97c774 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 5b04337ba0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33349>
2025-02-03 12:24:07 +00:00
Sil Vilerino
5c26f165ba d3d12: Enable warnings C4056, C4305, C4351, C4756, C4800, C4291, C4020, C4624, C4309, C5105, C4024, C4189
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
15b2486a09 d3d12: Fix warning C4800 forcing value to bool 'true' or 'false'
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
d67980140c u_thread.h: Fix warning C4800 forcing value to bool 'true' or 'false'
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
1e869b3750 nir.h: Fix warning C4800 forcing value to bool 'true' or 'false'
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Sil Vilerino
e272c98f5d d3d12: Fix warning 4305 truncation from type1 to type2
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33332>
2025-02-03 11:06:59 +00:00
Valentine Burley
a5765d7659 khronos-update: Update ANDROID guards in vk_android_native_buffer.h
This file was modified in commit bcc1950886 ("vulkan: fix glibc AOSP build")
without realizing it is imported code.

Update it to prevent the need to revert this modification after every
header update.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33272>
2025-02-03 10:21:23 +00:00
Sergi Blanch Torne
5b04337ba0 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-02-03 08:00 UTC
* End: 2025-02-03 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33095>
2025-02-03 08:38:59 +01:00
José Roberto de Souza
bb31287d24 intel: Initialize upper 32bits of drm_xe_sync.handle
Some compiles don't initialize the upper 32bits of the union that has
u64 addr and u32 handle.
Similar to previous patches but doing that for code in intel/misc.

Cc: stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Juston Li
d3adc33175 iris: xe: fully initialize drm_xe_sync addr/handle union
Make sure the upper 32 bits of the addr/handle union are initialized
as that behavior is compiler-specific.

See the previous anv patch for more details.

Cc: stable
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Juston Li
9afe29153d anv: xe: fully initialize drm_xe_sync addr/handle union
The handle and addr fields of drm_xe_sync is defined as the union:

union {
   __u32 handle;
   __u64 addr;
};

When initialized on the stack on certain implementations, setting
.handle will leave the upper bits of .addr/the overall union
uninitialized causing exec calls to fail with:

[drm:xe_sync_entry_parse [xe]] Ioctl argument check failed at drivers/gpu/drm/xe/xe_sync.c:136: upper_32_bits(sync_in.addr)

Somewhat awkward but init .addr first to 0 and then set the handle after
the struct init.

Cc: stable
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33172>
2025-02-02 21:34:45 -08:00
Pavel Ondračka
f7e5daaedd i915/ci: use debian-build-testing instead of debian-testing
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33345>
2025-02-02 18:01:41 +01:00
Tim Keller
4ecd183c56 dril: Check for null config in dril_target.c
fixes: 06d417af

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33336>
2025-02-01 23:33:26 +00:00
Ernst Persson
c64871accc intel/vulkan: Add bvh build dependency
Fixes: 41baeb3810 ("anv: Implement acceleration structure API")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12558
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33333>
2025-02-01 20:11:28 +01:00
Lionel Landwerlin
98ddfd040a spirv: remove spirv_library_to_nir_builder
Now unused

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
41aa22a6b5 intel_clc: remove NIR output support
Now unused

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
6d5375017a compiler: drop vtn_bindgen
Now unused

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
4f9eace864 intel: move internal shader compile to vtn_bindgen2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Lionel Landwerlin
fdeb05c907 anv: fixup missing compiler dependency on tests
Pull in anv_deps to solve this.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33329>
2025-02-01 07:54:37 +00:00
Marek Olšák
e621bafa9a ci/debian-ppc64el: don't build AMD drivers due to having only LLVM 15
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33211>
2025-02-01 04:22:30 +00:00
Marek Olšák
82047fa82f amd: drop support for LLVM 15, 16, 17
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33211>
2025-02-01 04:22:30 +00:00
Caio Oliveira
5ca23eff0b intel/brw: Remove brw_gs_compile struct
There were 4 fields:

- key: now will be passed explicitly, so we can reuse the existing
  more general fs_visitor constructor;

- input_vue_map: used only by the client code brw_compile_gs, so
  create it separatedly as a local variable;

- two unsigned parameters: just put them inside a nested struct in the
  shader.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33228>
2025-02-01 02:44:29 +00:00
Vasily Khoruzhick
3983e88c27 lima: ppir: handle ffma in the backend
ppir doesn't do a good job in fusing ffma, so allow nir to do it and
handle ffma in backend.

shader-db:

total instructions in shared programs: 29485 -> 29066 (-1.42%)
instructions in affected programs: 10362 -> 9943 (-4.04%)
helped: 114
HURT: 5
helped stats (abs) min: 1 max: 30 x̄: 3.72 x̃: 2
helped stats (rel) min: 0.78% max: 20.00% x̄: 5.66% x̃: 4.31%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.52% max: 1.09% x̄: 0.85% x̃: 0.98%
95% mean confidence interval for instructions value: -4.37 -2.67
95% mean confidence interval for instructions %-change: -6.10% -4.68%
Instructions are helped.

total loops in shared programs: 2 -> 2 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 369 -> 367 (-0.54%)
spills in affected programs: 199 -> 197 (-1.01%)
helped: 8
HURT: 9

total fills in shared programs: 1265 -> 1208 (-4.51%)
fills in affected programs: 758 -> 701 (-7.52%)
helped: 11
HURT: 9

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33313>
2025-02-01 02:21:19 +00:00
Jesse Natalie
a4b1924b22 CI/Windows: Update container deps
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33294>
2025-02-01 01:20:52 +00:00
Jesse Natalie
049015a7b8 meson: Enable /Zc:preprocessor for MSVC
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33294>
2025-02-01 01:20:52 +00:00
Karol Herbst
3129fd8dcf rusticl/queue: check device error status
If the underlying GPU context hit any execution errors (e.g. it times out
or something) we want to report it to the application as well.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32929>
2025-02-01 00:17:03 +00:00
Karol Herbst
2c52ddd1a6 rusticl/mesa: add PipeContext::device_reset_status
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32929>
2025-02-01 00:17:03 +00:00
Karol Herbst
46454f01d3 rusticl/mem: set bind flags for gl imports
We have to tell the driver how we want to use the resource.

Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33325>
2025-01-31 23:38:21 +00:00
Sil Vilerino
0e94a14900 d3d12: Fix array of texture DPB cap detection
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
b68ddd98d8 d3d12: Increase DPB video texture array pool size for async queue depth
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
d9f9129210 d3d12: Add some missing members initialization for d3d12_video_buffer
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
fcbadd77a8 d3d12: Add NULL initialization for d3d12_video_enc::m_pVideoTexArrayDPBPool
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
123374c1d7 d3d12: Add support for Y210, Y410, YUY2 and HEVC 422 8/10b, HEVC 444 10b profiles
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
df27e09267 pipe: Add profiles for HEVC 422 8/10b and 444 10b
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Sil Vilerino
a1e15f561f d3d12: Fix HEVC range extension pic params validation
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
81869c70f0 d3d12: use log2_max_pic_order_cnt_lsb_minus4 from upper layer for h264
This workaround is no longer necessary since now the frontends
manage the DPB and the params such as log2_max_pic_order_cnt_lsb_minus4
are passed by the app/pipe interface to the gallium drivers

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
5b834e1666 d3d12: use log2_max_pic_order_cnt_lsb_minus from upper layer
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
7cd9de460b d3d12: fix d3d12_video_nalu_writer_h264::write_slice_svc_prefix
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
bf7edb9a2d d3d12: fix start code prevention in write_sei_nalu()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
e8499f69a4 d3d12: initialize ReconstructedPicTexture
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
0fcef5168b d3d12: log all the field of dpb buffer for better diagnostic, cosmetic space removal
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:17 +00:00
Pohsiang (John) Hsu
ad66315a67 d3d12: fix incorrect IsRefUsedByCurrentPic marking for P Frame
- On P Frame, we were looking at L1 list to determine IsRefUsedByCurrentPic.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>

Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
2025-01-31 21:36:16 +00:00
Collabora's Gfx CI Team
e026f40b5f Uprev Piglit to fc8179d319046f45346bcbcc5aaeabebdf151f03
631b72944f...fc8179d319

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33151>
2025-01-31 20:36:33 +00:00
Job Noorman
1d3b6aa8d6 freedreno/drm-shim: enable raytracing
Just enable it unconditionally, the ir3 compiler info will disable it
when not supported.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33320>
2025-01-31 20:19:24 +00:00
Boris Brezillon
438652654b pan/decode: Fix the blend_count mask
The blend count field is 4 bits not 3 bits.

Fixes: f2740ac69c ("pan/decode: Add support for decoding CSF")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33321>
2025-01-31 19:08:23 +00:00
Boris Brezillon
127af6f38a panvk: Don't clobber registers if the render pass was suspended
Commit 2d3c50d484 ("panvk: Fix barriers in secondary cmdbufs w/o rp's")
started resetting the render flags we were relying on to decide to
clobber registers or not. Introduce a new field to restore that check.

Fixes: 2d3c50d484 ("panvk: Fix barriers in secondary cmdbufs w/o rp's")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33321>
2025-01-31 19:08:23 +00:00
Mike Blumenkrantz
c41b29f450 zink: delete some old DGC remnants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33326>
2025-01-31 18:35:40 +00:00
Mike Blumenkrantz
41296aab47 zink: also refcount needs_present from frontbuffer flush
Fixes: 4b0f2d1a2b ("zink: refcount needs_present resource")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33324>
2025-01-31 18:06:27 +00:00
Mike Blumenkrantz
50dbcb1d00 rusticl: stop clearing shader images after every dispatch
this causes thrashing when the same images are used in successive kernels

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33322>
2025-01-31 17:20:32 +00:00
Mike Blumenkrantz
72849ffbcd gallium: add a pipe_tex2d_from_buf struct
this is more convenient for reuse

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33322>
2025-01-31 17:20:32 +00:00
Mike Blumenkrantz
8d0d83c629 aux/trace: trace tex2d_from_buf for samplers/images
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33322>
2025-01-31 17:20:32 +00:00
Alyssa Rosenzweig
2a1524a089 libcl: add unreachable() macro
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
72bd3a6004 nir: include __LINE__ in NIR_PASS validation results
useful when validation blows up in a file containing many intrinsic
passes, to figure out which one is borked.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
3b1d8796fb asahi: port to vtn_bindgen2
this gets rid of all our linking gunk, which is a nice cleanup.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
0dd788298f libagx: port to glsl-style compute builtins
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
6a958f6997 libcl: define GLSL-style compute built-ins
OpenCL C defines work-item functions to return a scalar for a particular
dimension. This is a really annoying papercut, and is not what you want for
either 1D or 3D dispatches.  In both cases, it's nicer to get vectors. For
syntax, we opt to define uint3 "magic globals" for each work-item vector.  This
matches the GLSL convention, although retaining OpenCL names. For example,
`gl_GlobalInvocationID.xy` is expressed here as `cl_global_id.xy`.  That is much
nicer than standard OpenCL C's syntax `(uint2)(get_global_id(0),
get_global_id(1))`.

We define the obvious mappings for each relevant function in "Work-Item
Functions" in the OpenCL C specification.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
5ab16b340e libcl: add MIN3/MAX3 macros like on the host
useful for lvp

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
b7447a94c8 vtn: add vtn_bindgen2 tool
This is a rewrite of vtn_bindgen. For now the two tools live in parallel, to
give Intel time to migrate off v1.

For a refresher, the classic vtn_bindgen reads a SPIR-V and generates a .h
containing nir_builder stubs for each exported function. The stub inserts an
unimplemented nir_function with the proper signature into the shader, and adds a
"call" to that function. The driver is responsible for linking with the library
later, which is annoying.

vtn_bindgen2 instead generates a .c/.h pair. The header are just prototypes with
identical signatures to what we have now. The .c implementations, however, are
very different. Instead of generating unimplemented nir_function, the
implementations contain the actual code (as serialized NIR, deserialized
on-the-fly). There is no linking step, nor a library nir_shader that the driver
has to keep around.

The programming model here is that this is "just" nir_builder ... just a
massively more competent way of using nir_builder.

Additionally, the whole SPIR-V -> optimized lowered serialized NIR step is now
all common code. There's no longer anything target-specific, and it's
disentangled from the nir_precomp infrastructure.

That means drivers can use CL with zero integration, except a few meson.build
rules. This gives a very gentle on-ramp to CL for drivers. (Note: that applies
only for library-style CL. For precompiled kernel-style CL, that still requires
significant driver integration. I do have plans there, though. Also,
printf/abort support requires a minimal amount of driver code.)

Furthermore, this unblocks the use of CL library functions in common code. That
makes this an important step towards common code geom/tess or maybe saner
raytracing.

For drivers already using classic vtn_bindgen, porting to vtn_bindgen2 should
just be deleting all your linking/deserializing code. The .cl's are unchanged,
as are the function prototypes exposed.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
e6b22e2309 nir: add nir_call_serialized helper
this will be used internally in vtn_bindgen2.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
0727b7a079 nir: introduce bindgen_return
with vtn_bindgen2, we'll want return values without derefs. this needs some
special handholding.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
d4ec0fc381 nir/serialize: add specialized function serialization
with vtn_bindgen2 we only care about a single function at a time, not a whole
nir_shader, and it would be quite wasteful to serialize all the shader info
every time. add a specialized serialize just for 1 function.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
646903ed7a nir/print: extract nir_print_function_body
this will be used for more concise prints in vtn_bindgen2.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
7e467daac4 nir/lower_scratch_to_var: handle multi-function shaders
It's not at all clear how this pass should work with real function calls (if at
all), but at least this is enough to handle collections of self-contained
functions which vtn_bindgen2 wants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
50428f3c8a nir/lower_scratch_to_var: handle KERNELs
need 64-bit indices or else we blow up.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
63c94cf755 nir: add nir_function_intrinsics_pass
we already have

* nir_shader_instructions_pass
* nir_shader_intrinsics_pass
* nir_function_instructions_pass

add the missing fourth, it's useful too.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:59 +00:00
Alyssa Rosenzweig
3b1166da8c meson: factor out with_driver_using_cl
adding a new bindgen-using driver should not require touching 4 different meson
files! factor out the expression, since it's a pain otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33099>
2025-01-31 16:17:58 +00:00
Karol Herbst
41c163138d mesa_clc: drop spirv version workaround
Not needed anymore as of the previous commit.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
2025-01-31 14:32:27 +00:00
Karol Herbst
fe8a0d3548 clc: use SetUseHighestVersion when linking spirvs
This allows us to link spirvs with different versions.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
2025-01-31 14:32:27 +00:00
Karol Herbst
6d306f7415 ci/windows: Bump Vulkan SDK for SPIRV-Tools
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
2025-01-31 14:32:27 +00:00
David Tobolik
457b159383 rusticl/feat: LinkOnce ODR
Reviewed-by: Karol Herbst <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33133>
2025-01-31 13:46:41 +00:00
Valentine Burley
7bf4d6a4db zink/ci: Add a fraction for zink-venus-lvp
With newly added features, especially since KHR_shader_subgroup the base
runtime has crept above the 15 minute timeout. Introduce a fraction to
keep the runtime in check and add a nightly full run to cover the gaps.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12548
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Martin Roukala <None>
Reviewed-by: Karol Herbst <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33318>
2025-01-31 12:35:46 +00:00
Lucas Stach
3800ecc029 etnaviv: allow larger shaders with unified instruction memory
When the core supports unified instruction memory, don't clamp individual
shader sizes to 256 instructions. Allow shaders to make full use of the
state instruction memory, as long as both VS and FS fit into the memory
region.

Allows to run the shaders from glmark2 terrain from state instruction
memory, so we don't need to use icache mode on GC3000 and makes the app
work on GC2000, which doesn't have icache but unified instruction memory.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:35 +00:00
Lucas Stach
bc83e0b90f etnaviv: place FS right behind VS in unified instruction memory
Currently we statically partition the unified intsruction memory range
into a VS and a FS range, with each of the shader types getting half
of the memory. Change this to place the FS instructions right behind
the VS instructions, which potentially allows larger shaders to be
executed from the instruction memory states when VS are FS are
unbalanced in size, which is quite common.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:35 +00:00
Lucas Stach
f1fe4d5961 etnaviv: replace open-coded shifts in shader range registers with macros
Use the generated macros from the HW headers to do the shifting,
which makes it more clear what is being done to those states.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:35 +00:00
Lucas Stach
ece07d5d9f etnaviv: correct and rename shader range register check
According to _InitializeContextBuffer() in the downstream kernel driver
all GPUs claiming to support more than 256 shader instructions have unified
instruction memory and the shader range registers to partition usage of
this unified memory region.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
70b44a6762 etnaviv: emit PS start and end PC states only on shader changes
There is no reason to emit those states on framebuffer changes. While the
framebuffer format change might change the fragment shader due to R/B
swapping in the shader, this triggers compilation of a new shader variant
which will dirty the shader state as needed.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
3b8d0f5dd7 etnaviv: split large multi-state updates into multiple batches
A single LOAD_STATE command can only load a maximum of 1023 32bit states,
limited by the range of the count parameter in the header.
Split the state update into multiple LOAD_STATE commands if necessary.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
bfab2ae821 etnaviv: drop double masking in etna_emit_load_state
The VIV_FE_LOAD_STATE_HEADER_COUNT marco already includes the masking
operation, so there is no need to apply the same mask again.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Lucas Stach
992e9d07c5 etnaviv: drm: fix instruction limit for cores with instruction cache
Some cores with the the instruction cache feature, such as the GC3000 found
on the i.MX6QP, have a wrong instruction limit encoded in hardware. The HWDB
entry for this core has the correct number (512). Fixup all cores with the
instruction cache feature to report at least 512 instructions, which was
already assumed when configuring the VS/FS instruction state memory split in
other parts of the driver.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33229>
2025-01-31 09:47:34 +00:00
Valentine Burley
5c44d70684 amd/ci: Revert to 6.6 kernel on Raven
There's been a high number of GPU resets on Raven that amdgpu couldn't
recover from, leading to jobs timing out.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33317>
2025-01-31 09:19:38 +00:00
Lars-Ivar Hesselberg Simonsen
375116a3a0 panvk: Set missing shader_modifies_coverage flag
The shader_modifies_coverage-flag is currently not set for PanVK. This
might lead to issues down the line, so ensure it's set correctly.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Lars-Ivar Hesselberg Simonsen
2c855c1f4c Revert "panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload"
This reverts commit f93a48e4e3.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Lars-Ivar Hesselberg Simonsen
41cb2e73c2 Revert "panfrost: remove is_blit flag"
This reverts commit 6d6a43518a.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Lars-Ivar Hesselberg Simonsen
46256f3e39 panfrost: Do not evaluate_per_sample for non-MSAA
Enabling evaluate_per_sample in non-MSAA cases might cause issues and
hangs for subsequent ZS cases.

Therefore, only enable the flag when MSAA is active.

Fixes: 26d339ef8a ("panfrost: Generate Valhall Malloc IDVS jobs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
2025-01-31 09:00:19 +00:00
Hyunjun Ko
959403cd87 anv/video: clean-up duplicated code.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33316>
2025-01-31 08:40:32 +00:00
Hyunjun Ko
52d9edbf05 anv: Fix to set CDEF flter flag correctly for AV1 decoding
and relevant tiny clean-up.

Fixes: 8432b8b282 ("anv: add initial support for AV1 decoding")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33316>
2025-01-31 08:40:32 +00:00
Pierre-Eric Pelloux-Prayer
2b8c3a12c6 winsys/amdgpu: treat cs overflow as context lost
The existing code relies on assert to identify when a cs overlow
occurs. On builds without asserts, a cs overflow won't be detected
and it will likely lead to a hang.

Reporting a preemptively a PIPE_UNKNOWN_CONTEXT_RESET error seems
ok as the context is lost anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33288>
2025-01-31 08:13:34 +00:00
Pierre-Eric Pelloux-Prayer
b3f2435994 radeonsi: update si_need_gfx_cs_space upper bound
radeon_emit_alt_hiz_logic can add 8 extra dw per draw.

Fixes: cdecbee922 ("radeonsi/gfx12: adjust HiZ/HiS logic")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33288>
2025-01-31 08:13:34 +00:00
Caio Oliveira
6c98f006f4 intel/brw: Move some larger functions from brw_inst.h to brw_inst.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:21 +00:00
Caio Oliveira
f7b0c12945 intel/brw: Rename fs_inst_box to brw_inst_box
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:21 +00:00
Caio Oliveira
d59bd421a2 intel/brw: Rename fs_inst to brw_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:21 +00:00
Caio Oliveira
9b0d359737 intel/brw: Move fs_inst implementation code together
Move them to brw_inst.h/cpp.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33114>
2025-01-31 00:57:20 +00:00
Corentin Noël
dc2b6dfd16 venus/ci: Skip flaky test due to intermittent timeouts
This test has been intermittently timing out for a while now.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33307>
2025-01-31 00:11:31 +00:00
Eric Engestrom
4c46a93593 docs: update calendar for 25.0.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33308>
2025-01-31 00:03:58 +00:00
Yiwei Zhang
d73642d9ff venus: scrub disallowed ycbcr features for rgba10x6
This is needed before we passthrough VK_EXT_rgba10x6_formats on
supported platforms.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33296>
2025-01-30 22:30:36 +00:00
Adam Jackson
6f5c227e2c zink: Enable KHR_shader_subgroup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
2025-01-30 20:59:04 +00:00
Mike Blumenkrantz
cee77ba6ec zink: implement ops for KHR_shader_subgroup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
2025-01-30 20:59:04 +00:00
Mike Blumenkrantz
b4f3136fea zink: emit SpvCapabilityDemoteToHelperInvocation for IsHelperInvocation
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
2025-01-30 20:59:04 +00:00
Konstantin Seurer
00d17f3dbe nir/lower_vars_to_ssa: Annotate defs with variable names
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Konstantin Seurer
ce0f30b230 nir: Add variable debug info to instructions
Allows for annotating defs with variable names.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Konstantin Seurer
ec89f88722 spirv: Handle NonSemantic.Shader.DebugInfo.100
New versions of glslangValidator seem to emit those instructions for
debug info instead of OpLine.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Konstantin Seurer
60a20bcf3d nir: Stop using instructions for debug info
Annotating ssa defs without affecting compilation is impossible with
debug info instructions since referencing a nir_def from the debug info
instr will add uses.

The old approach also stops worrking if passes reorder instructions.

This patch proposes a solution which should not regress performance just
like the old approach. The difference is that this one allocates a bit
more space for debug info instead of adding a new instruction for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33141>
2025-01-30 20:14:01 +00:00
Iván Briano
e73c4ce7c5 anv: handle REMAINING_LAYERS in host image copy cases
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33293>
2025-01-30 19:24:47 +00:00
Eric Engestrom
ea519cc230 docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33304>
2025-01-30 19:02:37 +00:00
Eric Engestrom
8b61e9a701 VERSION: bump to 25.1
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33304>
2025-01-30 19:02:37 +00:00
Valentine Burley
8f66efd8ea venus/ci: Skip flaky test due to intermittent timeouts
This test has been intermittently timing out for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
c76ef0898b util/u_debug: Ignore newlines in parse_*_string
We now use `parse_debug_string` to parse debug strings from files, which
may have newlines in them. This change ensures that newline characters
are ignored during parsing, a similar change was made to
`parse_enable_string` for consistency.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
aaf8a8d968 freedreno/docs: Document TU_DEBUG_FILE
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
a177788f6a tu/lrz: Check for TU_DEBUG(nolrz) late
Currently the `nolrz` TU_DEBUG options are only checked during
device creation and image creation, respectively. This means that if
the options are enabled after the device/image is created, LRZ
will still be used. Similarly, if the options are disabled after the
device/image is created, LRZ will still be disabled.

This change moves the checks to the point where the LRZ is actually
used, allowing for runtime toggling of LRZ.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
18ac78e5b4 tu/util: Support toggling TU_DEBUG options at runtime
This adds a new environment variable, TU_DEBUG_FILE, which can be used to
enable/disable various debug options at runtime via writing to a file. This
is useful for switching between different debug options (such as toggling
between SYSMEM/GMEM) without needing to restart the application.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
9a4bed6f05 util: Add file modification notifier utility
A helper to watch files for changes or deletions using inotify, with
a callback mechanism to notify the user of changes.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Daniel Stone
5b291c7ce6 ci: Move r300/nine/nvk builds out of critical path
debian-testing is the critical path: the shortest possible job to build
exactly what we need to execute on hardware, and nothing else.

debian-build-testing exists to give us better coverage at the expense of
running longer.

Since the only jobs using r300 and Nine, and the only jobs using NVK,
are in post-merge stages which are manually triggered, move these builds
to debian-build-testing. This makes the critical path to those a little
longer, but we do get to make it shorter for everyone else just running
regular Marge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
eabc365e95 ci: Only build what we use for testing jobs
Don't build every driver everywhere, just what we need right now.

r600 is temporarily excluded from release builds as it has a warning
which becomes an error.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
2dba74ffa3 ci: Only build Perfetto in build-test jobs
We don't actually use these for runtime testing right now. If we wanted
to capture traces, we should probably do that as a nightly-only thing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
28becbb3dc ci: Capture Ninja log
This will give us a better idea of what's taking time during builds.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
8b1abb2643 ci: Trim down VVL external builds
We're not building the VVL tests, so we don't need to download and build
a ton of stuff which is only needed for building tests.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
83d1553391 ci: Don't build Vulkan for GL dEQP
We don't need these Vulkan bits, so let's try not building them. This
might seem kind of petty, but given that we build dEQP four times for GL
(once for GL, once for GLES, once for EGL/X11, and once for
EGL/Wayland), it does actually make a measurable difference to the time
spent rebuilding dEQP.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
3c5b73fa2c ci: Pass build targets to dEQP CMake
This avoids a whole pile of nonsense that we don't need during the dEQP
build, which is helpful when you build it five times in a row. In
particular, not building the Vulkan validation layers means we don't
waste three minutes building a second copy of SPIRV-Tools which we never
use.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
7c320aa13d ci: Move dEQP message into section
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
3693e52cf6 ci: Fix kernel section nesting
This got broken when the section switches were moved to separate files.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
6d76c4f476 ci: Fix dependency on lint job
The toml-lint job hasn't been around for a little while now, and the
clang-format job got deleted.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:02 +00:00
Danylo Piliaiev
e3d477a04f tu/a7xx: Always have depth/stencil in corresponding resolve groups
The division between color and d/s resolve groups appears to be
important. Not doing so causes corruption in some of games
when forcing gmem, e.g. in Arma, War Thunder.

Fixes: 25b73dff5a
("tu/a7xx: use concurrent resolve groups")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33169>
2025-01-30 16:27:00 +00:00
Timur Kristóf
150123349a ac/nir/ngg: Use SALU to calculate which threads store to attribute ring in GS.
This trades 1 VALU (v_cmpx) instruction in GS to 2 SALU,
and removes a VALU->SALU dependency for the branch that stores
attributes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
a9e9ec30a5 radv, radeonsi: Disable early prim export on GFX11+.
We suspect that it has no perf benefits on GFX11+.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
5560763e99 ac/nir/ngg: Move GS lowering to separate file.
Both the VS/TES and GS lowering passes have grown a lot over time,
and therefore the C file has become unwieldy. Mitigate that by
moving the GS lowering out to a separate file.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
ab8ec78c93 ac/nir/ngg: Don't call has_input_primitive in GS lowering.
The entire GS lowering will be moved to another file, which
won't have this function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
910416e5ba ac/nir/ngg: Remove now unused export_pos0_wait_attr_ring.
The issue is worked around now without needing to handle just
the pos0 separately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
28fe7e2a0e ac/nir/ngg: Rework GS output code for better attribute ring handling.
Create separate branches for output processing and exports.

Normally, emit attribute ring stores at the end of the shader,
but with the attribute ring wait bug, insert them between the
primitive and position export branches.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
213759d2b6 ac/nir/ngg: Carve out ngg_gs_process_out_vertex.
This is	the part of the	code that processes things related to
a single vertex, mainly loading the outputs from LDS and
performing some adjustments on them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
4f8ee9b045 ac/nir/ngg: Carve out ngg_gs_process_out_primitive.
This is the part of the code that processes things related to
a single primitive, mainly the primitive export argument.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
04b4c5d785 ac/nir/ngg: Rework attribute ring wait workaround in VS/TES.
Normally, emit attribute ring stores at the end of the shader.
When the attribute ring wait bug is present, insert them between
the primitive and position exports.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
dec5c957c3 ac/nir/ngg: Use has_attr_ring and has_attr_ring_wait_bug in mesh shader lowering too.
Instead of hardcoding according to GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
f7305f776e ac/nir/ngg: Pass radeon_info to mesh shader lowering.
Same idea as the VS/TES and GS lowering:
Make shader compilation decisions based on the features of the
current GPU instead of ad-hoc deciding according to GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
b8204c8df9 ac/nir/ngg: Remove gfx_level and family from NGG lowering options.
They can be read from radeon_info.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
dc6ae1855a ac/nir/ngg: Use gfx_level from radeon_info.
So we don't have to pass it separately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
e1be943f10 ac/nir/ngg: Add and use a has_ngg_passthru_no_msg field to ac_gpu_info.
Instead of using the chip family field.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
a40000b85b ac/nir/ngg: Add and use a has_ngg_fully_culled_bug field to ac_gpu_info.
Better than applying the workaround ad-hoc based on GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
cad0d26dbf ac/nir/ngg: Add and use a has_attr_ring field to ac_gpu_info.
While theoretically all GFX11+ GPUs have an attribute ring, it is
nicer to have this property instead of deciding ad-hoc based on
the GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
b163ce51b1 ac/nir/ngg: Add and use a has_attr_ring_wait_bug field to ac_gpu_info.
And apply the attribute ring wait workaround based on the new field.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
e76361d626 ac/nir/ngg: Add radeon_info to NGG lowering options.
The intention is to have all the HW features affecting
shader compilation in one place, instead of ad-hoc decisions
in the code based on the GFX level and chip class.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
28c501f22c ac/nir/ngg: Slightly refactor emitting vertex parameters.
No functional changes, just some code cleanup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
9860fb3780 ac/nir/ngg: Carve out ac_nir_repack_invocations_in_workgroup.
We're going to want to call it from a different	file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
d2ff3f9fa0 ac/nir/ngg: Carve out NGG streamout code.
We're going to want to call it from a different	file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
1d8f46e00c ac/nir/ngg: Carve out ac_nir_create_output_phis.
We're going to want to call it from a different	file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
4bec453595 ac/nir/ngg: Use ac_nir_ngg_alloc_vertices_and_primitives in mesh shader lowering.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
02dacac869 ac/nir/ngg: Carve out ac_nir_ngg_alloc_vertices_and_primitives.
We're going to want to call it from a different file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
a3d8e6a60c ac/nir/ngg: Remove unused vs_output struct.
Forgot to remove this when I refactored the code to use
ac_nir_prerast_out instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
23641d4032 ac/nir/ngg: Add a few comments explaining some variables.
These were somewhat confusing, so let's add a few words to
explain what they are exactly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
28f49bf99c ac/nir/ngg: Remove some superfluous variables from culling code.
No functional changes, just code cleanup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
e9069eec8a aco: Move NGG pos export scheduling determination to drivers.
And don't schedule them on GFX11+ at all.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
7a3d95bbe2 ac/nir/ngg: Mitigate attribute ring wait bug when primitive ID is per-primitive.
There is a possibility that some waves in an NGG workgroup
don't have any input vertices, only primitives. When these
waves store the primitive ID as a per-primitive attribute,
they will need to wait for those stores before the primitive
export, because the other waves can't wait for them.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
397d45d055 ac/nir/ngg: Mitigate NGG fully culled bug when GS output is compile-time zero.
This case is unlikely but possible. We forgot to handle it here,
because it was originally handled by the backend compiler.

On GFX10 chips that have issues with 0 vertices and primitives
exported, this will always export at least 1 vertex and primitive.

This could theoretically fix some hangs on Navi 10, although we are not aware of a specific issue caused by this problem.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Erico Nunes
2b4c28e67c ci/lima: enable again
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33299>
2025-01-30 14:22:09 +00:00
Erico Nunes
18fb397249 ci/lima: update piglit ci expectations
Some regressions during lima lab downtime.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33299>
2025-01-30 14:22:09 +00:00
Tapani Pälli
cb71030387 mesa: enable GL_EXT_conservative_depth extension
Signed-off-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/33065>
2025-01-30 10:50:37 +00:00
Valentine Burley
b3e4a113b2 freedreno/ci: Document flakes
Some of these cause pipelines to fail.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33298>
2025-01-30 10:25:05 +00:00
Valentine Burley
06ab1c81d1 amd/ci: Increase amd-raven-skqp parallelism
This job was taking too long and there's more DUTs in available in LAVA.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33298>
2025-01-30 10:25:05 +00:00
Valentine Burley
676d4f83d4 virgl/ci: Skip flaky trace
This flake doesn't render at times and can fail merge pipelines.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33298>
2025-01-30 10:25:05 +00:00
Mike Blumenkrantz
d8b7fbd4ac ci: mark radv-raven-traces-restricted with allow_failure
restricted trace jobs are allowed to fail

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33244>
2025-01-30 09:49:11 +00:00
Samuel Pitoiset
d6f9c19755 radv/amdgpu: add support for AMDGPU_GEM_CREATE_GFX12_DCC
This flags will be used to set PTE.DCC to VRAM allocations
(ie. compression).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
2025-01-30 08:18:22 +00:00
Samuel Pitoiset
5ac72c5f56 ac/descriptors: allow to configure DCC for buffer descriptors
This is not used yet.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
2025-01-30 08:18:22 +00:00
Samuel Pitoiset
fe6494559d ac,radeonsi: add SDMA DCC tiling for GFX12+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
2025-01-30 08:18:22 +00:00
Timothy Arceri
e639cd768d glsl: fix return value for subgroupBallot()
The original code attempted to create a second instance of the intrinsic
with only a different return value which isn't possible since the params
(in this case 0 params) are the same. To fix this were need to create
two differently named intrinsics.

Reviewed-by: Qiang Yu <yuq825@gmail.com>

Fixes: a496d84ac8 ("glsl: add KHR_shader_subgroup_ballot builtin functions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12510
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33231>
2025-01-30 06:06:32 +00:00
Marc Herbert
9102d1775d docs: move cross c*_args from [properties] to [built-in options]
Fixes the following warnings:

DEPRECATION: c_args in the [properties] section of the machine file
             is deprecated, use the [built-in options] section.
DEPRECATION: c_link_args in the [properties] section ...
DEPRECATION: cpp_args in the [properties] section ...
DEPRECATION: cpp_link_args in the [properties] section ...

These were moved in meson version 0.56.0:

https://mesonbuild.com/Machine-files.html#meson-builtin-options
https://mesonbuild.com/Release-notes-for-0-56-0.html

Mesa requires meson version 0.60 or above since commit 049086cd58

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
75fb91501e docs: show which pkg-config Fedora uses for cross-compilation
Learned the hard way.

Only tested on Fedora but other RPM-based distros are likely to be the
same.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
0051807e7e docs: show how to use ccache when cross-compiling
On my desktop system, this gets compilation of (a subset of) 32bits Mesa
from 2.5 minutes down to 15 seconds - and most of what left is linking.

Also show that absolute paths are not required.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
eaabf0e5f0 docs: cross-compile: add useful "apt" and "dnf" builddep commands
These have been tested only with x86_64->i686 cross-compilation but I
don't see why they couldn't work with other architectures if/when Linux
distributions support them. For at least x86_64->i686 cross-compilation,
these commands save an enormous amount of time.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
56081c0b22 docs: add "apt-get build-dep" and "dnf buildep"
So much easier and faster than installing every dependency one by one.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:28 +00:00
Caio Oliveira
f18dee3618 intel/brw: Fallback to SEND from SEND_GATHER if possible
After optimization happen, if the sources are still in one or two
contigous spans for some reason (e.g. some data read from memory
now being written), it is beneficial to just use regular SEND
and avoid having to set the ARF scalar instruction.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
b6b32933ad intel/brw: Use SHADER_OPCODE_SEND_GATHER in Xe3
Add an optimization pass to turn regular SENDs into SEND_GATHERs.
This allows the payload to be "broken" into smaller pieces that
can be further optimized, which _may_ result in

- less register pressure (no need to contiguous space), and
- less instructions (no need to MOV to such space).

For debugging, the INTEL_DEBUG=no-send-gather option skips this
optimization, and reporting how many opportunities were missed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
26d4d04d63 intel/brw: Add lowering for SHADER_OPCODE_SEND_GATHER
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
650ec7169d intel/brw: Add SHADER_OPCODE_SEND_GATHER
Starting in Xe3, there's a variant of SEND that take the
register numbers from the ARF scalar register, and don't
require them to be contiguous.  The new opcode added here
represents that kind of SEND.

To make the original sources still reachable, we keep them
around during the IR, just ignoring them at generator time.
This allow software scoreboard to properly reason the
dependencies without trying to decode the contents of ARF
scalar register being used.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
2fca22347c intel/brw: Plumb through generator whether SEND is gather variant
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
00fac79f99 intel/brw: Add scoreboard support for scalar register
Xe3 adds a new pipe that handles *only* MOVs from immediate into the
scalar register.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:57 +00:00
Daniel Schürmann
3868102a04 nir/loop_analyze: stack-allocate loop_info_state
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
fbaabcfb0a nir/loop_analyze: store nir_loop_induction_variable hash table in loop_info
No need to create a separate array.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
f327ece9bf nir/loop_analyze: re-use the same nir_loop_variable struct before and after the increment
The information is redundant.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
de30bfd5b8 nir/loop_analyze: ignore terminating induction variable in guess_loop_limit()
The array access might be using a different induction variable.

Totals from 23 (0.03% of 79395) affected shaders: (Navi31)
Instrs: 113742 -> 121017 (+6.40%)
CodeSize: 592152 -> 636228 (+7.44%)
Latency: 439244 -> 426784 (-2.84%)
InvThroughput: 36264 -> 35199 (-2.94%)
SClause: 3048 -> 3426 (+12.40%)
Copies: 10630 -> 10733 (+0.97%)
Branches: 3774 -> 4310 (+14.20%)
PreSGPRs: 1683 -> 1696 (+0.77%)
PreVGPRs: 1230 -> 1232 (+0.16%)
VALU: 51026 -> 55912 (+9.58%)
SALU: 15270 -> 15638 (+2.41%)
SMEM: 4456 -> 5149 (+15.55%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
7eb2e96d16 nir/loop_analyze: insert only induction vars into hash map
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
f0fd04327f nir/loop_analyze: replace nir_loop_variable array with hash table
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
642a980c9e nir/loop_analyze: don't initialize nir_loop_variable separately
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
f11edceae3 nir/loop_analyze: directly record induction variables into nir_loop_info
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
e639c4d74f nir/loop_analyze: remove nir_loop_variable::in_loop
This information is redundant.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
7f244ced10 nir/loop_analyze: remove nir_loop_variable::in_if_branch and nir_loop_variable::in_nested_loop
This information is redundant.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
83f395a7ce nir/loop_analyze: only iterate loop header phis in compute_induction_information()
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
65f95ae74e aco/insert_NOPs: implement VALU -> VALU case for VALUReadSGPRHazard on GFX12
Totals from 36918 (46.50% of 79395) affected shaders: (GFX1200)

Instrs: 34997889 -> 35296429 (+0.85%); split: -0.00%, +0.85%
CodeSize: 186161112 -> 187334364 (+0.63%); split: -0.00%, +0.63%
Latency: 250265551 -> 250330784 (+0.03%); split: -0.00%, +0.03%
InvThroughput: 41185298 -> 41192503 (+0.02%); split: -0.00%, +0.02%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32682>
2025-01-30 03:13:16 +00:00
Daniel Schürmann
6c7355f0e6 aco/insert_NOPs: refactor VALUReadSGPRHazard detection
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32682>
2025-01-30 03:13:16 +00:00
Mike Blumenkrantz
4b0f2d1a2b zink: refcount needs_present resource
it's theoretically possible that this resource could be destroyed
between flush_resource and flush...maybe

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33285>
2025-01-30 01:38:32 +00:00
Mike Blumenkrantz
c1e09c7309 zink: add zink_resource_reference() util function
same as pipe version but using different types

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33285>
2025-01-30 01:38:32 +00:00
Mike Blumenkrantz
2d630952b0 zink: check for bound gfx stages before dereferencing
this avoids a null deref in a pattern like bind TES->unbind TES
with the same descriptor bound

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33285>
2025-01-30 01:38:32 +00:00
Caio Oliveira
fbacf3761f intel: Add meson option -Dintel-elk
Defaults to true.  When set to false Iris and various tools can be
built without ELK support.  In both cases this means supporting
only Gfx9+.  This option must be true to build Crocus or Hasvk.

This allows skipping re-building ELK when developing for newer platforms
with tools/tests enabled.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11575
Reviewed-by: Daniel Stone <daniels@collabora.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/33054>
2025-01-30 00:45:59 +00:00
Caio Oliveira
31e5d909e7 intel/tools: Merge libaub into libintel_tools
Reviewed-by: Daniel Stone <daniels@collabora.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/33054>
2025-01-30 00:45:59 +00:00
Caio Oliveira
ec2d20a70d intel/tools: Add helpers for decoder_init/disasm
Isolate the BRW/ELK differences in a single place.  The way is done now,
we are not reusing the isa_info between calls.  For the tools here this
is probably fine, if its someday this gets in the way, we can add an
opaque pointer to store the right data.

This intentionally is not used in Iris, since there the driver need more
detailed view into BRW/ELK and we don't want to create an all
encompassing abstraction for that.

Reviewed-by: Daniel Stone <daniels@collabora.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/33054>
2025-01-30 00:45:59 +00:00
Caio Oliveira
aa2bd16dec intel/tools: Use idep_libintel_common in meson
Since the internal dependency object exists and is already
used in some cases, let's be consistent.

Reviewed-by: Daniel Stone <daniels@collabora.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/33054>
2025-01-30 00:45:59 +00:00
Francisco Jerez
d455d5d86c anv/xe3+: Enable VRT.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
9c13506dd9 iris/xe3+: Enable VRT.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
dd1712515b anv/xe3+: Set RegistersPerThread for bindless shader dispatch.
v2: Use MOV and wrap in conditional during BTD spawn header setup
    (Lionel).  Remove references to SIMD8 (Tapani).

v3: Update brw_bsr() to specify number of registers per thread, don't
    initialize Registers Per Thread on BTD spawn header (Lionel).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
b25d0f899b anv/xe3+: Set RegistersPerThread during shader state setup based on prog_data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
7537f8edee intel/blorp/xe3+: Set RegistersPerThread during shader state setup based on prog_data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
2a12ea3df0 iris/xe3+: Set RegistersPerThread during shader state setup based on prog_data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
f6a1c51de7 intel/genxml/xe3+: Update definitions for shader state setup.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
fb40b449cd intel/brw: Define ptl_register_blocks() helper.
Since this calculation will be needed in many places to set up the
state of each shader stage.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
70fecb1483 intel/brw: Report number of GRF registers used in brw_stage_prog_data.
This is similar to what we used to do on pre-SNB platforms, the number
of GRF registers used by the shader will be used on Xe3+ to adjust the
trade-off between thread-level parallelism and size of the GRF file.
Plumb the value through prog_data so the driver can set up the
hardware state accordingly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
6513bf65c3 intel/brw/xe3+: Optimize CS/TASK/MESH compile time optimistically assuming SIMD32.
This is similar in principle to the previous commit "intel/brw/xe3+:
brw_compile_fs() implementation for Xe3+." but applied to compute-like
shader stages.  It changes the implementation of brw_compile_cs/task/mesh()
to reduce compile time and take advantage of wider dispatch modes more
aggressively than the original logic, since as of Xe3 SIMD32 builds
succeed without spills in most cases thanks to VRT.

The new "optimistic" SIMD selection logic starts with the SIMD width
that is potentially highest performance and only compiles additional
narrower variants if that fails (typically due to spilling), while the
old "pessimistic" logic did the opposite: It started with the
narrowest SIMD width and compiled additional variants with increasing
register pressure until one of them failed to compile.

In typical non-spilling cases where we formerly compiled SIMD16 and
SIMD32 variants of the same compute shader, this change will halve the
number of backend compilations required to build it.

XXX - Possibly don't do this in cases with variable workgroup size
      until effect on runtime performance can be measured directly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

v2: Don't do this for now in cases with variable workgroup size, still
    compile every possible variant in such cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Sagar Ghuge
7e1362e9c0 intel/brw/xe3+: Don't compile SIMD32 if there is ray queries
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
5b6906076e intel/brw/xe3+: brw_compile_fs() implementation for Xe3+.
This reworks the implementation of brw_compile_fs() to reduce compile
time and take advantage of wider dispatch modes more aggressively than
the original logic.

The new "optimistic" PS compilation logic starts with the SIMD width
that is potentially highest performance and only compiles additional
narrower variants if that fails (typically due to spilling or hardware
restrictions), while the old "pessimistic" logic did the opposite: It
started with the narrowest SIMD width and compiled additional variants
with increasing register pressure until one of them failed to compile.

The main disadvantage of this is that selectively throwing away some
of the compiled variants based on the static analysis of their
performance behavior will no longer be possible, however this is
expected to be less useful on Xe3+ since the GRF space allocated to a
thread can be scaled up or down, which leads to less dramatic
differences in scheduling between SIMD variants.

In typical non-spilling cases where we formerly compiled SIMD16 and
SIMD32 variants of the same fragment shader, this change will halve
the number of backend compilations required to build a shader.  With
multi-polygon PS dispatch enabled (which is disabled by default right
now) this has an even more dramatic effect since the number of
compiler iterations can be reduced down to a fifth in the best case
scenario.

Even though in most cases we will only attempt to return a single
binary from the pixel shader compilation, the hardware allows a pair
of PS kernels to be specified, and we'll still take advantage of this
when the multi-polygon PS kernel has the potential to have worse
performance than the single-polygon shader because only the latter
register-allocates successfully at SIMD32 -- Only in such case
(SIMD2x8 multi-polygon, SIMD32 single-polygon) we'll continue
programming both so the hardware will chose one or the other at
runtime depending on the SIMD fullness and number of polygons it can
buffer at runtime.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
1b2bd1fcb8 intel/brw: Exit early from run_fs() if compilation failed before optimization loop.
This avoids running the optimizer uselessly if compilation of the
current kernel failed due to some hardware (e.g. SIMD-width)
restriction.  This isn't only inefficient but it can break assumptions
throughout the compiler which would lead to crashes on Xe3 when this
arises during translation from NIR.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
afff3eb95e intel/brw: Indent conditional block from brw_compile_fs() not applicable to Xe2+.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
d7d08ec2e2 intel/brw: Indent body of brw_compile_fs() not applicable to xe3+.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
d03eac3133 intel/brw/xe3+: Disable round-robin allocation heuristic on Xe3+.
Xe3+ benefits from packing register allocations tightly in order to
make optimal use of the GRF space.  The round-robin heuristic
previously in use often causes the whole GRF space to be used even if
register pressure is substantially lower, which would severely
decrease thread-level parallelism on Xe3+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
a67ff3e7e3 intel/brw/xe3+: Bump number of SBID tokens for Xe3.
Xe3 supports 32 SBID tokens per thread regardless of the number of
register blocks allocated per thread.  Take advantage of the increased
number of SBIDs in the scoreboard pass to reduce the frequency of
false dependencies on Xe3+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
8d2331fe4b intel/brw/xe3: Extend regalloc sets to maximum Xe3 GRF size.
Extend our regalloc sets to 256 registers to match the maximum
capacity of the GRF file on Gfx30.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
ca1636d457 intel/brw/xe3: Define XE3_MAX_GRF.
Gfx30 supports up to 256 (512b) GRFs which requires a max GRF define
of 512 in REG_SIZE units.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
67cb23a4b1 intel/common/xe2+: Allow SIMD32 PS for all multisample cases.
These don't seem to be disallowed by recent hardware anymore.  Stop
disabling SIMD32 due to hardware restrictions of multisample
rasterization, since it should have better performance, and on Xe3+
there may be no shader variant available other than SIMD32.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
935f60c13c intel/blorp: Specify a subgroup size requirement of 16 for fast clear or repclear shaders.
Request a fixed subgroup size for pixel shaders that require it due to
the hardware restrictions of fast clears and repeated data clears.
This requires plumbing the "is_fast_clear" boolean across several
callers since blorp_compile_fs_brw() currently has no information
regarding whether the kernel is intended for a fast clear operation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
80b2355b39 intel/brw: Allow specifying a required subgroup size for fragment shaders.
On older hardware the "use_rep_send" compile parameter was being
implicitly used to request the compilation of the SIMD16 variant of
clear pixel shaders that require it due to hardware restrictions.

However starting on Gfx12+ this flag is never set since replicated
data clears are no longer supported, but BLORP still implicitly relies
on the SIMD16 variant being generated even though there's no way for
BLORP to explicitly request it.  This doesn't cause much of a problem
right now since brw_compile_fs() typically generates a SIMD16 kernel
unless the SIMD8 kernel spills or SIMD debugging flags are enabled,
but it won't work reliably on Xe3+ since we'll start using SIMD32 more
aggressively.

In order to avoid these issues use the standard required subgroup_size
parameter from shader_info to signal that the SIMD16 variant of the
shader is needed by the caller.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
a736757275 anv/gfx12.5: Request subgroup size 8 for RT trampoline shader.
The 16-wide variant of the trampoline shader doesn't appear to work
and would be inadvertently enabled by this series on Gfx12.5.  Set the
required subgroup size to avoid changing current behavior.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
8102500b95 intel/brw/xe3+: Mask subgroup shuffle index to be within valid range to avoid VRT hangs.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
d2af77aa6b intel/brw: Use urb_read_length instead of nr_attribute_slots to calculate VS first_non_payload_grf.
Makes sure the number of registers reserved for the payload matches
the size of the URB read, which prevents the VS shared function from
writing past the end of the register file on Xe3 with VRT enabled.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
7f59708422 intel/brw: Saturate shifted subgroup index to avoid reading past the end of register file.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Leonard Göhrs
db2a10150f ci/lava: update lavacli from version 1.5.2 to 2.2.0
The lavacli version 1.5.2 has been released in December 2022.
Use the most recent version 2.2.0, released in October 2023, instead.

Notable changes since 1.5.2:

  - Authentication tokens are now stripped from exceptions when HTTP
    requests fail. (1.6)

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33266>
2025-01-29 22:45:53 +00:00
Valentine Burley
e75e9baff8 anv/ci: Decrease anv-jsl-angle parallelism
One of the DUTs had to be retired in LAVA a while ago, and the pending
times were high on the dashboard. Decrease the parallelism and increase
the fractions to address this.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:15 +00:00
Valentine Burley
098c81d663 amd/ci: Migrate amd-raven-skqp from lenovo-zork to hp-zork
We have more hp-x360-14a-cb0001xx-zork DUTs available in LAVA,
use it to offload the overloaded lenovo-TPad-C13-Yoga-zork.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
892a01f529 freedreno/ci: Migrate a618-piglit-full to kingoftown
Migrate the a618-piglit-full manual job from limozeen to kingoftown,
where we have more DUTs available.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
499d1e3624 freedreno/ci: Don't automatically retry manual jobs
The piglit-full jobs were auto-retrying.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
3a83562fd4 zink/ci: Increase parallelism of zink-tu-a618
This job was taking too long. However, with the other jobs
de-duplicated on a618 and a630, we can increase parallelism,
which also allows us to reduce the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
af183b03e9 freedreno/ci: Re-enable some traces on a618 and disable a630-traces
These traces are no longer flaky or broken on a618, so we can re-enable
them and fully replace the a630-traces job, which we have to disable
due to the limited number of DUTs.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8337

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
e57419d182 freedreno/ci: Decrease a630-gl parallelism
a630-gl takes just over 7 minutes on 4 DUTs, so we can safely reduce
the parallelism to 3 and stay within the time limit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
c41d6e8ba7 turnip/ci: Disable a630-vk
Coverage is mostly provided by a618-vk, while basic validation is
handled by a630-vk-asan.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
028f37a252 freedreno/ci: Disable a618-gl, a618-egl, and a618-piglit
The a618-gl and  a618-egl jobs are covered by a630-gl, which also
does egl testing, while a630-piglit is a more comprehensive
equivalent of a618-piglit, so we can de-duplicate these jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
8a45554efa freedreno/ci: Decrease a660-gl paralellism
Currently there are only 8 sm8350-hdk DUTs in LAVA, but there were
10 pre-merge jobs scheduled for them.
Add a full nightly job to cover the gaps.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
c2e7483378 turnip/ci: Increase a660-vk fraction
This job was taking too long, and we don't have more DUTs available.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
cfd3623a68 zink/ci: Increase zink-anv-adl parallelism
This job was taking too long and we have more DUTs available.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
9ab2e026cb panfrost/ci: Move panfrost-g52-piglit to nightly
The panfrost-g52-piglit-gles2:arm64 job was taking 19 minutes on
average, and the pending durations of the meson-g12b-a311d-khadas-vim3
DUTs in LAVA were reaching 5-6 minutes, so we have to make this job
manual instead of pre-merge.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
562e9c5302 iris/ci: Decrease iris-glk-deqp paralellism
There are only 4 DUTs available in LAVA, and their pending durations
were reaching 3–4 minutes. To address this, reduce the parallelism
for iris-glk-deqp and adjust the fractions to maintain the 10-minute
time limit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Timur Kristóf
8b263555ee radv: Lower array derefs of vectors outside of shader linking.
This fixes depth-only rendering with mesh shaders,
as well as array derefs in unlinked shaders in general.

Lowering array derefs of vectors is necessary for correctness.
Without this, nir_lower_io will incorrectly add the array index
to the IO intrinsic base instead of to the component offset.

This was previously only done during shader linking, which leaves
some problems with unlinked shaders and depth-only rendering.

Whether these calls can be safely removed from shader linking
will be investigated in a future commit.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12516
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33264>
2025-01-29 20:05:25 +00:00
Eric R. Smith
f39194cdd3 panfrost: support MTK 16L32S detiling
This is a preliminary implementation of detiling for
NV12_16L32 tiled format external images. When we
encounter such an image, decode it into a secondary
buffer which will then be used to actually texture from.

In some cases applications may wish to represent the individual
planes of an NV12 image separately, we support that by allowing
detiling of just an R8 (luma) or R8G8 (chroma) plane.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31899>
2025-01-29 19:24:59 +00:00
Eric R. Smith
8c6b4ff686 drm-uapi: update drm_fourcc.h to latest version
Taken from commit 3ab334814 of the drm-misc-next kernel tree

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31899>
2025-01-29 19:24:59 +00:00
Jose Maria Casanova Crespo
3575444b01 Revert "ci: take igalia farm offline"
This reverts commit 09653e51f3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33283>
2025-01-29 18:59:15 +00:00
Erik Faye-Lund
8fb48ad4f7 meson: build panvk by default on arm
PanVK on V10 GPUs has reached production quality, so let's enable
building it by default now.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Daniel Stone <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33262>
2025-01-29 18:08:15 +00:00
Lionel Landwerlin
ff9cf7a222 anv: reduce alignment for small heaps
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/33240>
2025-01-29 17:33:13 +00:00
Antonio Ospite
4c42e06d17 ci/android: stop pushing libglapi.so since it's not available anymore
After commit 44bda7c258 (dri: put shared-glapi into libgallium.*.so,
2024-12-26) the mesa Android build does not have a separate libglapi.so
object anymore in the install dir, so stop pushing it to the Android
device in cuttlefish-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
4ac5d7c0bd ci/android: pass --allow-downgrades when installing cuttlefish host tools
Pass --allow-downgrades when installing cuttlefish host tools just to
cover the case when the script is run locally.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
5a71e39e94 ci/android: pass --max-fails to deqp-runner in cuttlefish-runner.sh
Pass --max-fails to depp-runner in cuttlefish-runner.sh too for
consistency with the deqp-runner.sh script.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
326655c51d ci/android: post-process testlog XML and create a junit.xml
Post-process the XML file created by testlog-to-xml invoked by
deqp-runner to create a junit.xml file, just like deqp-runner.sh does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
d0b00a63a7 ci/android: fix pulling results from Android device
Add a trailing dot to the remote directoyy in the `adb pull` command to
make sure to recursively pull only the **content** of the directory and
not the directory itself.

This prevents having `results/results/` in the artifacts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
1c96335d01 ci/android: improve handling of expectation files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
1f0bf2c4a4 ci/android: define an INSTALL var for the source of mesa artifacts
Define an INSTALL var for the source of mesa artifacts so that some code
can be copied over from deqp-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
909f837ecf ci/android: update CUTTLEFISH_BUILD_NUMBER
Update CUTTLEFISH_BUILD_NUMBER to use a cuttlefish image that has the
`mesa_swrast` GPU mode which uses llvmpipe for GL and lavapipe for
Vulkan.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:58 +00:00
Samuel Pitoiset
b3cff84e06 docs: add a note about GFX12 (RDNA4) on RADV
This initial support should be good enough but it's missing two
features (cooperative matrix and video decode/encode) compared to
GFX11 (RDNA3) because lack of time.

DCC is still under active development but it might be possible to
finish it during the RC period.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33281>
2025-01-29 16:24:44 +00:00
Danylo Piliaiev
0aaea5d038 tu: Fix stale A7XX_GRAS_LRZ_CNTL2 in 3d blits or !valid lrz case
Fixes GPU faults with
TU_DEBUG_STALE_REGS_RANGE=0x810b,0x810b TU_DEBUG_STALE_REGS_FLAGS=cmdbuf,renderpass

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33274>
2025-01-29 15:57:51 +00:00
Lionel Landwerlin
4434b0799b anv: dirty pipeline & push constants after internal CS shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7ca5c84804 ("anv: add support for simple internal compute shaders")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33280>
2025-01-29 15:25:43 +00:00
Alyssa Rosenzweig
d58ece8d83 nir/serialize: strip function names names
this makes stripped nir smaller.

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/33273>
2025-01-29 14:37:41 +00:00
Samuel Pitoiset
4425d8556f radv: use stage instead of entrypoint to determine valid gfx stages
Otherwise if the function name is stripped during NIR serialization,
importing libraries would break because entrypoint is NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33273>
2025-01-29 14:37:41 +00:00
Lionel Landwerlin
524dab2b10 anv: expose A4B4G4R4_UNORM_PACK16 support with CBCWF is disabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12511
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Lionel Landwerlin
7fab8675a6 anv: add a drirc to disable border colors without format
Disable it by default on Android.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Lionel Landwerlin
c2c3f19e88 anv: pass physical device to format helpers
So that we can have special behavior based on drirc configuration.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Lionel Landwerlin
eb0c2d8f33 anv: use flags for format capabilities
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Valentine Burley
1dce02fa41 anv/ci: Revert to 6.6 kernel on anv-jsl
The 6.11 kernel we were using frequently caused panics and hangs,
particularly in full nightly jobs, making it unreliable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33279>
2025-01-29 12:39:41 +00:00
Tapani Pälli
66aebfb1eb isl: use workaround framework for Wa_1207137018
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/33236>
2025-01-29 12:10:13 +00:00
Tapani Pälli
405274fda4 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/33236>
2025-01-29 12:10:13 +00:00
Caio Oliveira
080c136afb intel/executor: Fix typo when copying result into Lua table
Fixes: e72bf2d02f ("intel: Add executor tool")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33277>
2025-01-29 09:57:23 +00:00
Faith Ekstrand
66076ca7e8 nvk: Handle pCounterBuffers == NULL in Begin/EndTransformFeedback
Fixes: 5fd7df4aa2 ("nvk: Support for vertex shader transform feedback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33276>
2025-01-29 09:35:18 +00:00
Faith Ekstrand
e00eeb2098 nak: Use ldc.constant for load_global when CAN_REORDER is set
This yields a 15-20x performance improvement in Dragon Age: The
Veilguard running under VKD3D-Proton.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33276>
2025-01-29 09:35:18 +00:00
Faith Ekstrand
f7e524026f nvk: Call nir_opt_access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33276>
2025-01-29 09:35:18 +00:00
Samuel Pitoiset
66775c89fc radeonsi: fix programming DCC for SDMA on GFX12
Fixes: 3d05d86d88 ("radeonsi/gfx12: add DCC")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33259>
2025-01-29 08:51:57 +00:00
Samuel Pitoiset
e77a409b26 radv/ci: add expected list of failures for GFX1200
Same as NAVI31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33258>
2025-01-29 08:31:10 +00:00
Iván Briano
9e5a3a356e hasvk: disable logic op for float/srgb formats
Fixes new tests: dEQP-VK.pipeline.*.logic_op_na_formats.*

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/33250>
2025-01-29 08:02:21 +00:00
Iván Briano
c3dea47be8 anv: disable logic op for float/srgb formats
Fixes new tests: dEQP-VK.pipeline.*.logic_op_na_formats.*

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/33250>
2025-01-29 08:02:21 +00:00
Marek Olšák
d0e1c508c6 ac/fake_hw_db: deobfuscate GPU name strings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:02 +00:00
Marek Olšák
64d2d10ad8 winsys/amdgpu: disable DCC for gfx12 when using AMD_FORCE_FAMILY
otherwise buffer allocation fails

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:01 +00:00
Marek Olšák
43588be435 radeonsi: remove an incorrectly defined modifier
It's missing the PACKERS field to distinguish between different layouts
and it's a useless swizzle mode anyway.

Fixes: 0833dd7d12 - amd/common: Add support for modifiers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9344

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:01 +00:00
Marek Olšák
665058237d radeonsi: remove redundant divergence analysis and smem flagging
They are called above this.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:00 +00:00
Marek Olšák
5f84ff1125 radeonsi: dead code removal and move some code out of headers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:00 +00:00
Marek Olšák
3483e1f274 radeonsi: remove SI_TRACKED__UNUSED_GAP
we need to move ALPHA_REF so as not to fail static assertions
in the previous commit

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:59 +00:00
Marek Olšák
19907a24ec radeonsi: validate BITSET_TEST_RANGE_INSIDE_WORD assertion at compile time
This will prevent accidental crashes and hangs because of how we define
tracked enums.

The reg_enum parameter must be a compile-time constant.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:59 +00:00
Marek Olšák
e0d715c626 radeonsi: set gl_FragCoord to pixel center to fix GLCTS failures
SPI_BARYC_CNTL is moved to the preamble because it's always 0.

We set frag_coord_is_center for the NIR pass to indicate that sample_pos
should be lowered differently.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:58 +00:00
Marek Olšák
9fdd8225c1 radeonsi/ci: add more gfx11 flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:58 +00:00
Marek Olšák
3424cdadf5 radeonsi: fix interpolateAt* with non-GL4 ARB_sample_shading
There is no test for this, but it's been broken.

ARB_sample_shading doesn't set fs.uses_sample_shading in shader_info,
which causes us to enter this path to force per-sample interpolation,
but doing so breaks the shader if the PS prolog is used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:57 +00:00
Marek Olšák
65398d571b radeonsi: ignore pipe_rasterizer_state::force_persample_interp
It just indicates that sample shading is enabled, which we were
checking already. The state is redundant.

Just check shader_info::fs::uses_sample_shading. ARB_sample_shading (GL3.3)
doesn't set fs.uses_sample_shading in shader_info (which is for GL4.0), and
that's why we have this codepath that forces per-sample interpolation.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:57 +00:00
Marek Olšák
1ff790a4f8 radeonsi: implement replacement of sample_mask_in with helper_invocation
This just implements it in the PS prolog and LLVM IR (ACO already
implements it), and enables it for monolithic shaders where it's already
implemented in ac_nir_lower_ps_early.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:57 +00:00
Marek Olšák
71e95b373b radeonsi: remove si_shader_info code that is no longer needed
A lot of this info is now derived from shader variant NIR.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:56 +00:00
Marek Olšák
871c619ad4 radeonsi: don't set BASE in si_nir_lower_ps_color_input
Bases are recomputed later, so these values have no effect here.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:56 +00:00
Marek Olšák
e5ee15a42e radeonsi: gather PS inputs from shader variant NIR
This further reduces dependence on si_shader_info.

union si_ps_input_info is added because we don't need usage_mask in there.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:55 +00:00
Marek Olšák
0eaff1ace8 radeonsi: set SHARED_VGPR_CNT for gfx shaders for ACO
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:55 +00:00
Marek Olšák
cbac2e4c75 radeonsi: set SHARED_VGPR_CNT for compute for ACO
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:54 +00:00
Marek Olšák
a962979baa radeonsi: precompute COMPUTE_PGM_RSRC3
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:54 +00:00
Marek Olšák
d1d6e6695e radeonsi: remove ac_shader_config from si_shader_part
we only need num_sgprs and num_vgprs from it

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:53 +00:00
Marek Olšák
988aca159c radeonsi: verify that SPI_PS_INPUT_ENA from LLVM is equal to ACO
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:53 +00:00
Marek Olšák
c61ee0e8fa radeonsi: minor restructuring of si_llvm_compile_shader
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:52 +00:00
Marek Olšák
1c4c883a3b radeonsi: get SPI_PS_INPUT_ENA from shader variant NIR for ACO
All PS lowering that changes, adds, or removes system values based on
the shader key is done first, which is done in ac_nir_lower_ps_early and
other passes, so now we just need to gather them.

This should improve performance for ACO due to fewer VGPRs needed
for optimized shader variants of PS.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:52 +00:00
Marek Olšák
edeb52ce4a radeonsi: split si_fixup_spi_ps_input_config
Extract prolog code into si_set_spi_ps_input_config_for_separate_prolog.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:51 +00:00
Marek Olšák
e58efc072b radeonsi: move spi_ps_input_config functions up
they will be needed here

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:51 +00:00
Marek Olšák
d3a0da555f radeonsi: lower indirect indexing sooner
We need to do this before we gather shader_info because lowering indirect
indexing can trigger more code elimination.

The opts_not_run parameter is removed because it was only needed for array
temps.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:50 +00:00
Marek Olšák
98e46a7e9b radeonsi: use barycentrics from load_point_coord_maybe_flipped
The pass is called sooner because we want to optimize the point_coord
barycentrics in ac_nir_lower_ps_early.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:50 +00:00
Marek Olšák
9e3033e071 radeonsi: move/rewrite PS color input gathering for shader variants
This removes duplicated gathering from 3 places for shader variants,
and adds it where it should be, which is before late optimizations and
late lowering passes, which is where we want it for the radeonsi linker.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:49 +00:00
Marek Olšák
1a2f6cad57 radeonsi: set uses_vmem_load/sampler in get_nir_shaders
It will be done in a different place later, but for now, we need to get
it out of si_update_shader_binary_info because the function will be
removed and PS input gathering will be moved, which will be quite
complicated, but it's needed for having a linker in radeonsi.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:49 +00:00
Marek Olšák
a9e210184b radeonsi: get LS+HS and ES+GS together in get_nir_shader instead of separately
This is a prerequisite for linking merged shaders.

At the beginning of get_nir_shader (renamed to get_nir_shaders), we get
both shaders that are going to be merged, and then we optimize them together
and pass them to LLVM or ACO-specific code as struct si_linked_shaders.

The code setting uses_instance_id is moved because the previous place
doesn't work with this new organization.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:48 +00:00
Marek Olšák
b6f13a0397 radeonsi: split and restructure get_nir_shader
This splits shader variant compilation into the following stages:
* get_input_nir
* run_pre_link_optimization_passes
(not implemented yet: run linking optimizations here)
(not implemented yet: gather shader_info here)
* run_late_optimization_and_lowering_passes

This order is important when we start adding linking optimizations for
shader variants and start getting shader_info from shader variants instead
of input NIR.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:48 +00:00
Marek Olšák
0dfcf5f2f8 radeonsi: reorder NIR passes in get_nir_shader (part 3)
Put passes that optimize the code first, and passes that lower it later.
This will be needed later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:47 +00:00
Marek Olšák
9f19ad33fa radeonsi: reorder NIR passes in get_nir_shader (part 2)
This will be needed later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:47 +00:00
Marek Olšák
ad44d7eba0 radeonsi: reorder NIR passes in get_nir_shader (part 1)
Put passes that optimize the code first, and passes that lower it later.
This will be needed later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:47 +00:00
Marek Olšák
5c874f5930 radeonsi: cosmetic changes in get_nir_shader
si_init_gs_output_info is moved later and is already memset

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:46 +00:00
Marek Olšák
f05021dd2f radeonsi: simplify how the NIR name of shader variants is modified
we don't need to restore the original name

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:46 +00:00
Marek Olšák
36e3f6d9bf radeonsi: set the "first" parameter of si_nir_opts correctly
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:45 +00:00
Marek Olšák
e23ccb6c46 radeonsi: call si_nir_late_opts unconditionally
We always have progress==true (e.g. due to si_nir_lower_abi), so late_opts
is likely to be always true.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:45 +00:00
Marek Olšák
58c91fb8cf radeonsi: add si_nir_shader_ctx holding parameters from si_get_nir_shader
we'll need to pass this structure around

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:44 +00:00
Marek Olšák
3d1886f6c7 radeonsi: call si_init_gs_output_info in si_get_nir_shader
some code reordering is needed

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:44 +00:00
Marek Olšák
d580313929 radeonsi: add load_polygon_stipple_buffer_amd instead of using si_shader_args
We will lower polygon stipple before we have si_shader_args, so we need
an intrinsic to get the buffer descriptor.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:43 +00:00
Marek Olšák
cd3079a1ea radeonsi: remove si_nir_kill_ps_outputs and use ac_nir_lower_ps_early instead
ac_nir_lower_ps_early does the same thing better.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:42 +00:00
Marek Olšák
c5d8100d10 radeonsi: use load_pixel_coord for polygon stipple lowering
We will get shader_info from NIR after this and before si_init_shader_args,
so we need to use system values.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:42 +00:00
Marek Olšák
f156abd2a7 radeonsi: simplify how broadcast_last_cbuf is implemented for PS epilogs
We don't need to look at the framebuffer state and record how many color
buffers to write. Instead, we can deduce which color buffers are enabled
from spi_shader_col_format, which already does the right thing.

So PS epilogs only need a single bool flag that determines whether all
enabled color buffers should be written.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:41 +00:00
Marek Olšák
28e9fca134 radeonsi: don't set the alpha ref user SGPR if alpha test doesn't use it
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:41 +00:00
Marek Olšák
3dcbf743c4 radeonsi: implement replacing frag_coord with pixel_coord at draw time
This adds an option into the prolog key to replace frag_coord.xy with
pixel_coord when sample shading is disabled, which is most of the time.
This reduces the number of input VGPRs.

It's already implement in ac_nir_lower_ps_early for monolithic shaders
and the PS prolog in ACO, so this just implements it for the PS prolog
in LLVM IR.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:40 +00:00
Marek Olšák
8e8eda4089 radeonsi: fix PS prolog not counting used fragcoord VGPRs correctly
Using the used component count is not enough. We need to consider
the component mask because any component can be disabled. This might
fix tests.

This removes the component counting from ac_get_fs_input_vgpr_cnt
and determines the component mask where it's needed.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:40 +00:00
Marek Olšák
67c772c293 radeonsi: get sample positions from user SGPRs instead of memory
This should be faster.

2 user SGPRs contain 8 sample positions, storing 4 bits per coordinate
and extracting them in the shader.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:39 +00:00
Marek Olšák
b3fc49686e ac/nir: clamp vertex color outputs in the right place
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:38 +00:00
Marek Olšák
3b78dcec05 radeonsi: disallow compute queues on Raven/Raven2 due to hangs
Fixes: 58b512ddd6 - radeonsi: execute clears at resource allocation using compute instead of gfx
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12310

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33248>
2025-01-29 06:49:43 +00:00
Marek Olšák
30211d0f4a mesa: enable GL name reuse for virgl
I think we only have to disable it for Qemu.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33156>
2025-01-29 06:22:42 +00:00
Friedrich Vock
50e6e3e4ad nir: Add indirect call optimizations
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
ebbb18aeb6 nir: Free liveness info when invalidating metadata
Liveness info can be huge, since with larger shaders it essentially
grows quadratically (linear increase in number of SSA defs *
linear increase in blocks).

Freeing liveness info early helps somewhat mitigate memory usage here.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
9b1f31a615 nir: Add nir_instr_is_before helper
is_instr_between works similarly but requires special-casing w.r.t
the first instruction in a block for the same effect.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
a8ce60eec1 nir: Apply passes to all functions
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
bb40284f76 nir: Add indirect calls
Used to jump to a function referred to by a runtime pointer.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
4432cf0a58 vtn: Set parameter type in glsl_type_add_to_function_params
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
26cbb6b933 nir: Add parameter divergence info
Indirect calls may have non-divergent parameters that need to be
explicitly marked as such.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Valentine Burley
7df869b7c9 zink/ci: Update checksum for Osmos trace on TGL
The checksum for the Osmos trace on TGL has changed, so update it
to reflect the current state of the trace.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Mike Blumenkrantz <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33256>
2025-01-29 04:16:26 +00:00
Valentine Burley
7d66facfda ci: Skip broken PenumbraOverture trace for zink and freedreno
This trace contains generated GL IDs from the time it was recorded,
making it invalid.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Mike Blumenkrantz <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33256>
2025-01-29 04:16:25 +00:00
Daniel Stone
101065642d ci/debian: Upgrade Debian images to LLVM 19
LLVM 15 is pretty old, and notably not supported by either ANGLE nor
Skia anymore. So let's move up to LLVM 19 using packages provided by
LLVM themselves, apart from PPC and ARMv7 which don't have builds.

The Skia build now requires a bunch of new warning exclusions; hopefully
most of these are no longer needed when we can upgrade Skia shortly.

The ci-deb-repo revision has also been bumped to get us a new version of
xtensor which builds with LLVM 19, and a version of spirv-tools which
also works with LLVM 19.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Closes: mesa/mesa#11538
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
55e9fe9d37 ci: Require LLVM_VERSION to be set explicitly
Stop falling back to 15 in random places; make sure it's set clearly
every time we want to use it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
bb01f3ae6c ci: Define LLVM_VERSION as a container property
The version of LLVM in use is defined by the version of LLVM that's been
installed, which is a property of the container. Shift to declaring it
within the container variables, not in random leaf build jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
f5618315f1 ci/fedora: Install which into build image
We use this for a bunch of stuff, so make sure it's installed. Also make
sure the package list remains strictly in alphabetical order.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
d5797f6ae4 ci: Move build containers above test containers
Nothing big, but it is needed to resolve YAML anchors later.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
f96abf7f1a ci: Remove obsolete compiler-wrapper
We don't actually need this anymore. We were previously using it to find
ccache, but Meson will do this for us. Now that we pass
-Wl,--fatal-warnings, we don't need to pass -Werror to the link stage
either.

This removes two shell execs, one subshell, and one call to each of grep
and printf, per compile.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Eric Engestrom
439408229b ci: make linker warnings fatal
... excluding the warning for emitting a LOAD segment with RWX
permissions for libglapi, an issue which has persisted for some time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
4c3d2af001 ci: Disable Werror on wrapped subprojects
Enabling Werror on our code is good, but it's less good on external
projects. Some of the Rust subprojects are now failing due to warnings
exposed by the newer Rust toolchain in Fedora, which we don't care about.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
87809f6236 pipe_loader: Fix pipe_i915 with the dynamic loader
When building for the dynamic loader used by e.g. Clover, pipe_i915 was
the only target failing to declare a driver descriptor. This becomes an
error with more aggressive linkers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 87392385b5 ("gallium/drm: Define the DRM entrypoints in drm_helper.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
52f6503d57 ci: Let rootfs builds run for 2 hours (!)
We now have to do five builds of dEQP: one each for tools, GL, GLES,
Vulkan (release branch), and Vulkan (main).

dEQP is not a quick build, with even the tools build taking ten minutes,
at least three of which go to just pulling the SPIRV-Tools source.

Building all five takes a cumulative 60 minutes (10 tools, 11 GL, 9
GLES, 15 VK release, 13 VK main). That doesn't give us a load of time to
build everything else we need.

Two hours is obviously a completely unreasonable amount of time to spend
doing builds, especially for jobs which shouldn't really exist. But the
yak shave to allow the container jobs to be able to run on non-b2c
hardware has been a long one, and with no big-bang solution turning up
any time soon, we need to be able to actually do rootfs builds.

So, let's do the worst possible thing and go for a gigantic timeout.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
1736ea4ca8 ci: Give much more time to ASan and UBSan jobs
Sitting here trying to get something else done tonight, I watched the
ASan and UBSan jobs, both on AArch64 and x86_64, regularly blow through
their timeouts.

They should be fixed to do less, but this makes them at least succeed in
the meantime.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
51c530a2c3 ci: Slash ASan and UBSan build coverage
Building and linking drivers, Rust code, and tools, takes an inordinate
amount of time with sanitisers. That could be justified if we used the
results to test, but we don't.

Reduce the coverage to get reasonable runtimes back.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
be00764d05 ci: Don't run Meson tests in critical-path jobs
Running the Meson tests doesn't take forever, but it does take a
noticeable amount of time.

For jobs in the critical path - like debian-testing and debian-arm64 -
we need them to complete as soon as possible to produce a build for the
hardware tests to consume. Running the tests here lengthens that time,
and introduces more hazard since the tests have previously been prone to
hitting timeouts, requiring the whole job to be retried before we can
proceed. These jobs also have build-only jobs which are not in the
critical path, and can run the tests just as well.

Running the tests under sanitisers is just too slow to deal with in
pre-merge pipelines.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
David Tobolik
49b20a88db rusticl/style: add util for conversion with err
NEW util/conversion.rs

Adds traits `TryFromWithErr` and `TryIntoWithErr` and their
implementation for types with `TryFrom` and `TryInto` traits

former
```
try_into().map_err(|_| CL_OUT_OF_HOST_MEMORY)
try_from(val).map_err(|_| CL_OUT_OF_HOST_MEMORY)
```
can now be written as
```
try_into_with_err(CL_OUT_OF_HOST_MEMORY)
try_from_with_err(val, CL_OUT_OF_HOST_MEMORY)
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33267>
2025-01-29 02:51:21 +00:00
David Tobolik
98f0f6594a rusticl/style: use Arc::clone instead of .clone()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33267>
2025-01-29 02:51:21 +00:00
Job Noorman
f577118fe1 ir3/a7xx: enable delayed src2 read for all cat3 instructions
cat3 instructions read their 3rd src later than their first two srcs.
Pre-a7xx, this was only supported for mad(sh) but on a7xx, it works for
all cat3 instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
992a6cc050 ir3/a7xx: update delays slots
The delay slots on a7xx are:
- ALU to ALU: 2
- Non-ALU: 5
- cat3 src2 read: 1

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
5460be5d33 ir3: make delay slots a compiler property
They changed on a7xx so we want to make it configurable.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
2c7c62dfd9 ir3: add helper to calculate src read delay
cat3 instructions read their 3rd src later than their first two srcs.
This was implemented in two different places: once for scheduling and
once for legalization. Extract this logic in a new helper and also add
similar logic for gat/swz there (which the scheduling logic failed to
account for).

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
e7ac1094f6 ir3: rematerialize preamble defs in block dominated by sources
Preamble defs were rematerialized at the end of the preamble. However,
when some of the sources were defined inside control flow, this would
lead to these sources not dominating their use. Fix this by finding the
block that is dominated by all sources and inserting the new instruction
there.

Also make sure we only de-duplicate instructions if the new instruction
is dominated by the existing one.

Fixes a NIR validation error in Devil may cry 5.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fdfe86aa52 ("ir3: Expand preamble rematerialization")
Fixes: 6a744ddebc ("ir3: Initial support for pushing globals with ldg.k")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33270>
2025-01-29 01:45:59 +00:00
Connor Abbott
5f3cad0026 tu: Add missing assignment to shared_viewport
This was accidentally deleted when rewriting to use common Vulkan
dynamic state. This meant we wouldn't correctly fall back when someone
accidentally used FDM together with multiple viewports.

Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33241>
2025-01-29 01:17:48 +00:00
Job Noorman
1adf2c9d7c ir3: schedule alias.rt at the end of the preamble
Scheduling an alias.rt right before an alias.tex causes a GPU hang.
Follow the blob and schedule all alias.rt at the end of the preamble to
prevent this from happening.

Fixes a hang in Borderlands 3 on medium or higher graphics settings.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 0aa9678d4d ("ir3: add support for alias.rt")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33238>
2025-01-29 00:46:22 +00:00
Alyssa Rosenzweig
3bfcc4f323 clc,libagx: automatically set lang version
bit less meson cargocult.

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/33242>
2025-01-28 23:01:32 +00:00
Alyssa Rosenzweig
9f460eadab clc,libagx: drop --in for mesa_clc
just accept the arguments as-is. this matches how gcc/clang actually work
and simplifies the meson.

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/33242>
2025-01-28 23:01:32 +00:00
Alyssa Rosenzweig
164a161279 meson: project-wide fs = import('fs')
reduces a bit of boilerplate.

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/33242>
2025-01-28 23:01:32 +00:00
Corentin Noël
61626296f2 virgl/ci: Re-enable virgl-traces
This reverts commit 3a7737ffb5

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33265>
2025-01-28 21:07:09 +00:00
Samuel Pitoiset
18c7eafcdc radv: fix programming mip level for TILED_SUB_WINDOWS on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33252>
2025-01-28 20:32:11 +00:00
Samuel Pitoiset
7c949f1760 radv: fix programming pitches for LINEAR_SUB_WINDOW on GFX12
GFX12 supports up to 64k images.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33252>
2025-01-28 20:32:11 +00:00
Ruijing Dong
1a942f53cc radeonsi/vcn: center mv map buffer changed in vcn5.x
center mv map buffer size changed on vcn5.x, please be aware
that vcn5.0 will not enable 2pass untill vcn5.x.

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/33215>
2025-01-28 19:50:16 +00:00
Lucas De Marchi
1bd6a2efe1 intel/tools: Fix Xe KMD error dump parser
Xe KMD originally put the exec queue snapshot in the wrong topic,
XE_TOPIC_GUC_CT. Add it to the right one while still keeping a fallback
to the previous place so the new version of the tool is able to parse
both before and after the kernel change.

Based on previous version by José Roberto de Souza <jose.souza@intel.com>
at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32617

Cc: stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33177>
2025-01-28 19:11:26 +00:00
Pavel Ondračka
220590f41a r300: fix memory leak in contant remaping
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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
f00f08c02d r300: remove support for register arrays from nir_to_rc
Backend can't handle it and no app which we can reasonably run uses
this anyway AFAIK.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
89c06ea0f6 r300: get rid of some texture fixups
Textures opcodes can't read from the contant registers, however we can
just handle this fine in the native swizzle pass. Others like saturate
for tex instructions) can't happen anyway since we swithed to nir_to_tgsi
long time ago. However, keep the asserts just to be safe.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
47207dcb0b r300: get rid of the register rename pass
The pass tried to convert shaders to a SSA-like form. However since
we no longer allocate registers in NIR, and we try hard to keep the
SSA-like form during the later passes, this is now superfluous.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
c45f02461c r300: don't allocate fs registers when translating from NIR
So we can get the ssa-like form right away and we don't have to generate
it again with the register rename pass later.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
0e9b90dcf4 r300: use ssa-like form for backend texture lowering
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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
ca70270a5e r300: add some more nir cleanup compiler passes
We need this to prevent some regressions in the later commits.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
e832bc1ae5 r300: use ssa-like form for gl_FragCoord transformation
Lots of backend code will be simpler if we have ssa-like (as much as we
can have with vec4), so just don't reuse registers here.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
14fe3e9886 r300: delete backend shadow lowering code
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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
d1c7244b6f r300: reswizzle some shadow texture calculations to use w channel
Prevents shader-db regression, since NIR puts just everything to x and the
pair scheduling is not smart enough to fix it later, espetially after
presubtract happens.

Together with the previous patches that move the shadow lovering to NIR
this results in the following shader-db stats:

RV530:
total instructions in shared programs: 129598 -> 128697 (-0.70%)
instructions in affected programs: 19001 -> 18100 (-4.74%)
helped: 124
HURT: 9
total presub in shared programs: 8554 -> 8314 (-2.81%)
presub in affected programs: 1099 -> 859 (-21.84%)
helped: 17
HURT: 50
total temps in shared programs: 17514 -> 17000 (-2.93%)
temps in affected programs: 1368 -> 854 (-37.57%)
helped: 45
HURT: 18
total cycles in shared programs: 191286 -> 190593 (-0.36%)
cycles in affected programs: 32369 -> 31676 (-2.14%)
helped: 110
HURT: 29

RV410:
total instructions in shared programs: 112805 -> 112618 (-0.17%)
instructions in affected programs: 7089 -> 6902 (-2.64%)
helped: 65
HURT: 21
total presub in shared programs: 3244 -> 3314 (2.16%)
presub in affected programs: 228 -> 298 (30.70%)
helped: 7
HURT: 47
total temps in shared programs: 18163 -> 18138 (-0.14%)
temps in affected programs: 710 -> 685 (-3.52%)
helped: 36
HURT: 19
total cycles in shared programs: 169530 -> 169369 (-0.09%)
cycles in affected programs: 11304 -> 11143 (-1.42%)
helped: 63
HURT: 27

The stats are a bit less awesome for Rv410, since it can't run the heavy
Unigine Tropics shaders where this helps the most due to the TEX
indirection limits.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
296da387c0 r300: move shadow lowering to NIR
This means we now do fragment shader-variants at the NIR level and we
therefore need to run nir_to_rc translation later during the shader
variant creation.

This is a temporary instruction count as well as registers count
regression, due to NIR putting everything to x instead of w, this is
fixed in the next commit which also shows some nice shader-db stats
improvements in total.

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/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
ea41ecd130 r300: fix presubtract assert
We only care that the negates of the relevant components are the same.
Specifically the assert would incorectly trigger for code like this
ADD temp[3].x, 1.250000 (0x3a).-x___, -const[0].x___;

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/33066>
2025-01-28 17:42:53 +00:00
Georg Lehmann
b23ff87db4 aco/sched_ilp: base latency and issue cycles on aco_statistics
This matters for trans and scalar fpu instructions.

Foz-DB GFX1150:
Totals from 53894 (67.90% of 79377) affected shaders:
Instrs: 38528421 -> 38481337 (-0.12%); split: -0.16%, +0.04%
CodeSize: 200206016 -> 200023916 (-0.09%); split: -0.12%, +0.03%
Latency: 265011734 -> 264303762 (-0.27%); split: -0.28%, +0.02%
InvThroughput: 53804490 -> 53696097 (-0.20%); split: -0.21%, +0.01%
VClause: 736996 -> 736988 (-0.00%); split: -0.00%, +0.00%
SClause: 1118494 -> 1118474 (-0.00%); split: -0.01%, +0.01%
VALU: 21982349 -> 21982358 (+0.00%); split: -0.00%, +0.00%

Foz-DB Navi31:
Totals from 50791 (63.99% of 79377) affected shaders:
Instrs: 37511862 -> 37495712 (-0.04%); split: -0.11%, +0.07%
CodeSize: 197990892 -> 197925104 (-0.03%); split: -0.09%, +0.06%
Latency: 261929261 -> 261273534 (-0.25%); split: -0.27%, +0.01%
InvThroughput: 43978329 -> 43921618 (-0.13%); split: -0.14%, +0.01%
VClause: 727683 -> 727695 (+0.00%); split: -0.00%, +0.00%
SClause: 1092527 -> 1092544 (+0.00%); split: -0.01%, +0.01%
VALU: 22646553 -> 22646566 (+0.00%)

Foz-DB Navi21:
Totals from 43899 (55.30% of 79377) affected shaders:
Instrs: 35649081 -> 35649110 (+0.00%); split: -0.00%, +0.00%
CodeSize: 192336212 -> 192337276 (+0.00%); split: -0.00%, +0.00%
Latency: 270621538 -> 270221431 (-0.15%); split: -0.16%, +0.02%
InvThroughput: 66757841 -> 66715918 (-0.06%); split: -0.07%, +0.01%
VClause: 734884 -> 734867 (-0.00%); split: -0.01%, +0.01%
SClause: 1072956 -> 1072951 (-0.00%); split: -0.01%, +0.01%

Foz-DB Vega10:
Totals from 52687 (83.60% of 63026) affected shaders:
Instrs: 24595280 -> 24595693 (+0.00%); split: -0.01%, +0.01%
CodeSize: 127199836 -> 127200164 (+0.00%); split: -0.01%, +0.01%
Latency: 252281578 -> 252497934 (+0.09%); split: -0.03%, +0.12%
InvThroughput: 136551527 -> 136577609 (+0.02%); split: -0.01%, +0.03%
VClause: 536798 -> 536718 (-0.01%); split: -0.04%, +0.03%
SClause: 819978 -> 819693 (-0.03%); split: -0.04%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:45 +00:00
Georg Lehmann
068f9b51de aco/sched_ilp: use more realistic memory latencies
The last commit changes order of instructions more aggressively,
and because the memory load latencies here are wastly underestimated,
it ruins some of the work of pre-RA memory scheduling.
With the new heuristic large latency values work fine, so use them.

Foz-DB GFX1150:
Totals from 71343 (89.88% of 79377) affected shaders:
Instrs: 41627671 -> 41915029 (+0.69%); split: -0.01%, +0.70%
CodeSize: 215901308 -> 217051132 (+0.53%); split: -0.01%, +0.54%
Latency: 288714439 -> 286556159 (-0.75%); split: -0.76%, +0.02%
InvThroughput: 55834139 -> 55645301 (-0.34%); split: -0.35%, +0.01%
VClause: 829066 -> 828984 (-0.01%); split: -0.04%, +0.03%
SClause: 1237366 -> 1237448 (+0.01%); split: -0.02%, +0.02%
VALU: 23643291 -> 23643292 (+0.00%); split: -0.00%, +0.00%

Foz-DB Navi31:
Totals from 70576 (88.91% of 79377) affected shaders:
Instrs: 40928125 -> 41211820 (+0.69%); split: -0.01%, +0.70%
CodeSize: 215770956 -> 216897948 (+0.52%); split: -0.00%, +0.53%
Latency: 288139802 -> 286038405 (-0.73%); split: -0.75%, +0.02%
InvThroughput: 46391629 -> 46300275 (-0.20%); split: -0.20%, +0.01%
VClause: 829987 -> 829997 (+0.00%); split: -0.02%, +0.02%
SClause: 1229345 -> 1229425 (+0.01%); split: -0.02%, +0.02%
VALU: 24515334 -> 24515335 (+0.00%)

Foz-DB Navi21:
Instrs: 45512672 -> 45527322 (+0.03%); split: -0.01%, +0.04%
CodeSize: 244254716 -> 244311472 (+0.02%); split: -0.01%, +0.03%
Latency: 314034443 -> 311473726 (-0.82%); split: -0.83%, +0.01%
InvThroughput: 73373201 -> 73220438 (-0.21%); split: -0.21%, +0.00%
VClause: 914819 -> 914853 (+0.00%); split: -0.02%, +0.02%
SClause: 1283331 -> 1283302 (-0.00%); split: -0.01%, +0.01%

Foz-DB Vega10:
Totals from 41908 (66.49% of 63026) affected shaders:
Instrs: 22770415 -> 22779136 (+0.04%); split: -0.01%, +0.04%
CodeSize: 118195752 -> 118230540 (+0.03%); split: -0.00%, +0.03%
Latency: 242119940 -> 239665380 (-1.01%); split: -1.02%, +0.01%
InvThroughput: 131459884 -> 131182979 (-0.21%); split: -0.21%, +0.00%
VClause: 493311 -> 493215 (-0.02%); split: -0.05%, +0.03%
SClause: 758814 -> 758761 (-0.01%); split: -0.02%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:45 +00:00
Georg Lehmann
ce897b336e aco/sched_ilp: rename priority to wait_cycles
And invert.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:44 +00:00
Georg Lehmann
819938d2fa aco/sched_ilp: new latency heuristic
The main train of thought is that we should consider latency after
the write was scheduled. This means we rely a lot less on the input
order of instructions for good results.

Foz-DB GFX1150:
Totals from 75606 (95.25% of 79377) affected shaders:
Instrs: 43274326 -> 42129011 (-2.65%); split: -2.65%, +0.01%
CodeSize: 223049932 -> 218465796 (-2.06%); split: -2.06%, +0.00%
Latency: 297614199 -> 292317054 (-1.78%); split: -1.84%, +0.06%
InvThroughput: 57020160 -> 56336213 (-1.20%); split: -1.21%, +0.02%
VClause: 841775 -> 841861 (+0.01%); split: -0.06%, +0.07%
SClause: 1253516 -> 1253798 (+0.02%); split: -0.03%, +0.05%
VALU: 23893837 -> 23893828 (-0.00%); split: -0.00%, +0.00%

Foz-DB Navi31:
Totals from 75606 (95.25% of 79377) affected shaders:
Instrs: 42717592 -> 41531696 (-2.78%); split: -2.78%, +0.00%
CodeSize: 223582476 -> 218866196 (-2.11%); split: -2.11%, +0.00%
Latency: 297736383 -> 292450493 (-1.78%); split: -1.83%, +0.05%
InvThroughput: 47298730 -> 46934084 (-0.77%); split: -0.78%, +0.01%
VClause: 844982 -> 844892 (-0.01%); split: -0.07%, +0.06%
SClause: 1248433 -> 1248693 (+0.02%); split: -0.03%, +0.05%
VALU: 24819703 -> 24819704 (+0.00%); split: -0.00%, +0.00%

Foz-DB Navi21:
Totals from 76224 (96.03% of 79377) affected shaders:
Instrs: 46019515 -> 46015691 (-0.01%); split: -0.03%, +0.03%
CodeSize: 246992544 -> 246977404 (-0.01%); split: -0.03%, +0.02%
Latency: 324647457 -> 318661132 (-1.84%); split: -1.90%, +0.05%
InvThroughput: 74834800 -> 74269723 (-0.76%); split: -0.76%, +0.01%
VClause: 927601 -> 927579 (-0.00%); split: -0.04%, +0.04%
SClause: 1302666 -> 1303178 (+0.04%); split: -0.02%, +0.06%

Foz-DB Vega10:
Totals from 60142 (95.42% of 63026) affected shaders:
Instrs: 25117688 -> 25098175 (-0.08%); split: -0.10%, +0.02%
CodeSize: 129847464 -> 129769456 (-0.06%); split: -0.08%, +0.02%
Latency: 261606546 -> 262407481 (+0.31%); split: -0.12%, +0.43%
InvThroughput: 138422594 -> 138500401 (+0.06%); split: -0.03%, +0.09%
VClause: 555424 -> 555321 (-0.02%); split: -0.11%, +0.09%
SClause: 851219 -> 851620 (+0.05%); split: -0.03%, +0.08%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:44 +00:00
Erik Faye-Lund
0f13a42657 gallium/aux: do not assert on map-failures
The texture_map functions can fail, due to for instance address-space
exhaustion during mmap calls. Handling this by asserting turns this
into a fatal error when doing debug builds, which might not be what
users want.

Instead, let's allow this to fail. This is alredy what we do for
util_clear_color_texture and util_clear_render_target.

While we're at it, let's add some breadcrumbs to applications here, by
emitting an error at the same time. We should really consider returning
a proper pipe_error here instead, but that requires changing a lot of
function signatures, as this function are used as an implementation of
p_context::resource_copy_region()... So let's save that for later.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32431>
2025-01-28 16:17:55 +00:00
Valentine Burley
d195e411fa ci: Uprev VKCTS to 1.4.1.1
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
618bd07809 panvk/ci: Skip waived tests
The tests are waived in ARM waiver 4936 (see waivers.xml), so
running them in CI is unnecessary.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
781a32d78e pan/ci: Properly wire up DRIVER_NAME
The DRIVER_NAME variable is used to locate the DRIVER_NAME-skips.txt
file. It was not used for panfrost, so remove the three places where
it was set, assign it to panvk, and add a panvk-skips.txt file.
Additionally, properly track changes to this file.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
f3cf156ac9 ci: Uprev VKCTS to 1.4.1.0
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
df5c54442b anv/ci: Move a test to common anv-skips
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
is problematic on TGL as well, so move it to the common anv-skips.txt.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
1a340177ba turnip/ci: Bump the number of tests per group for a630-vk-asan
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Since the CTS uprev did not introduce any new leaks that caused
the entire caselist to get marked as fails, increasing the number
of tests per group is considered safe and improves efficiency.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Eric Engestrom
dd2629b8b8 radv,lvp: fix url to VkAabbPositionsKHR docs
The current URL redirect to a page that does not contain any information
about this struct, so let's fix that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33159>
2025-01-28 14:28:59 +00:00
Eric Engestrom
fa67ab5525 anv,gfxstream,panvk,zink: update urls to vulkan docs
This is simply following the redirects the same way the browser does.
The new pages were manually verified to still contain the corresponding
information.

For URLs where this was not the case, see the next commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33159>
2025-01-28 14:28:58 +00:00
Eric Engestrom
ecc128e330 docs: update url to vulkan features & extensions
Fixes the nightly linkcheck.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33159>
2025-01-28 14:28:58 +00:00
Juan A. Suarez Romero
09653e51f3 ci: take igalia farm offline
Electricity issues.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33260>
2025-01-28 14:25:24 +00:00
Samuel Pitoiset
50a0d1fd65 radv: disable VK_KHR_cooperative_matrix on GFX12
I have it mostly but it won't be ready in time for 25.0 and the changes
are probably too large for a backport.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33257>
2025-01-28 13:27:55 +00:00
Samuel Pitoiset
9d528b9966 radv: disable video support on GFX12
VCN 5.0+ isn't yet implemented.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33253>
2025-01-28 12:09:43 +00:00
Karmjit Mahil
b9da3963c7 freedreno/replay: Define __user for msm_kgsl
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12515
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33196>
2025-01-28 11:25:10 +00:00
Erik Faye-Lund
8dae603431 panfrost: in-place map/unmap shouldn't grow
If we're doing in-place map/unmap of a tiled resource, that shouldn't
cause the size of the resource to grow. So let's drop this needless
complexity, and just assert this assumption instead.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
b60ee4251e panfrost: propagate errors from panfrost_batch_create_bo
Without this, we just assert and/or crash because the allocation fails.
This should allow us to survive a bit longer.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
76760ce610 panfrost: propagate allocation scratchpad allocation errors
We don't currently return NULL from panfrost_batch_create_bo, but that
is about to change. So let's prepare the scratchpad-related call-sites
for this.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
29e6c74f02 panfrost: unify emit_tls and emit_fbd
Most of these functions are the same, let's pull that out to a helper to
avoid repeating ourselves.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
f7e16859a9 panfrost: handle allocation errors when afbc-packing
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
801933acf9 panfrost: mark helper as static
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
David Rosca
2729b3696c frontends/va: Fix decoding VC1 streams with multiple slices
VC1 has different start code for SLICE which we need to use.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12525
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33221>
2025-01-28 09:38:45 +00:00
Tapani Pälli
e28f24fbf2 mesa/st: take pixelmaps in to account in drawpixels cache
Otherwise we might use cache item with different mapping.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12492
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-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/33191>
2025-01-28 08:50:51 +00:00
Samuel Pitoiset
c172f6ef01 radv: fix disabling logic op for srgb/float formats when blending is enabled
The Vulkan spec says:
    "If logicOpEnable is VK_TRUE, then a logical operation selected by
     logicOp is applied between each color attachment and the
     fragment’s corresponding output value, and blending of all
     attachments is treated as if it were disabled. Any attachments
     using color formats for which logical operations are not supported
     simply pass through the color values unmodified."

When logic op and blending are both enabled, logic op takes precedence
and values should be passed through unmodified. Also RB+ shouldn't
have any effects when blending is disabled.

Fixes new VKCTS coverage dEQP-VK.pipeline.*.logic_op_na_formats.*.

Fixes: 03b037a0e3 ("radv: disable logic op for float/srgb formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33235>
2025-01-28 08:19:15 +00:00
Samuel Pitoiset
d857198c87 radv/ci: update descriptor buffer skipped tests
More subsets have been added (eg. sparse).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33237>
2025-01-28 07:49:54 +00:00
Lionel Landwerlin
a2c19471fe intel: fix dependency for internal CL shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: db11165c07 ("intel/cl: switch to SPIRV as shader storage")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33233>
2025-01-28 07:19:58 +00:00
Faith Ekstrand
b708e43504 nvk: Set a command buffer error if pushbuf alloc fails
This case is super unlikely (nearly impossible in practice) but we
should set the command buffer error if it happens.

Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32936>
2025-01-28 04:25:06 +00:00
Mel Henning
96131df213 nak: Fix a spelling error
I'm guessing this was a bad find/replace

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33247>
2025-01-28 02:59:29 +00:00
Mel Henning
b6b1021303 nak: Return VK_ERROR_UNKNOWN on assertion failure
Previously, unwinding would abort the process when it reached the FFI
boundary. Instead, catch panics and report them to the client. The
default panic handler still runs and prints the assertion failure to
stderr.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33247>
2025-01-28 02:59:29 +00:00
Caio Oliveira
2b6437a3f4 intel/brw: Remove unused enum
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33251>
2025-01-28 02:17:17 +00:00
Caio Oliveira
0e1bb2f70e intel/brw: Use brw prefix instead of namespace in dynamic_msaa_flags()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33227>
2025-01-28 00:48:38 +00:00
Pavel Ondračka
dead324a8f etnaviv: always clamp shadow sampler comparison reference value
There is no support for floating point depth formats in etnaviv,
so the clamping can be enabled unconditionally.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33140>
2025-01-28 00:01:07 +00:00
Pavel Ondračka
ea6ccb8628 nir: add support for clamping in nir_lower_tex_shadow
From OpenGL 4.6 - 8.23.1 Depth Texture Comparison Mode

Let Dt be the depth texture value and St be the stencil index
component. If there is no stencil component, the value of St is
undefined. Let Dref be the reference value, provided by the shader’s
texture lookup function. If the texture’s internal format indicates
a fixed-point depth texture, then Dt and Dref are clamped to the
range [0, 1]; otherwise no clamping is performed.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33140>
2025-01-28 00:01:07 +00:00
Mel Henning
9091bb9fab nvk: Fix an assertion in nvk_slm_area_ensure
I ran into this assert multiple times in Civ 6 (DX12 mode) on proton

Fixes: 6935fe5c68 ("nvk: Rework TLS/SLM and image/sampler table handling")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33147>
2025-01-27 23:02:15 +00:00
Friedrich Vock
767737536e nir,vtn: Add return info to parameters
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33246>
2025-01-27 22:21:19 +00:00
Friedrich Vock
3321a56d1d nir: Serialize all parameter attributes
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33246>
2025-01-27 22:21:19 +00:00
Alyssa Rosenzweig
54879582b4 nir: fix O(N^2) behaviour in nir_remove_dead_variables
..where N = # of functions in the shader. We were accidentally reprocessing the
whole shader for every function impl. Noticed when reading a vtn_bindgen2
profile.

We elect to port the relevant part of the pass to instrctions_pass which fixes
the perf problem while deleting a pile of code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33245>
2025-01-27 21:40:49 +00:00
David Rosca
8357ef588f frontends/va: Unlock driver mutex for SyncSurface/Buffer fence wait
Only keep context mutex locked while waiting for fence.

This fixes issue with multi-threaded use of VAAPI where SyncSurface
and SyncBuffer would block all contexts, even those used in different
threads. The issue exists for all API calls, however in most cases this
is not a big deal as most calls will return fast, but sync is expected
to take up to tens of ms.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
d5c1d2faa8 frontends/va: Add context mutex
For now only used to protect context->decoder.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
d2b1192257 gallium/vl: Don't flush in vl_compositor yuv_deint and rgb_to_yuv
Instead let the callers do it, same as other vl_compositor functions.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
0f20a3a4f1 frontends/va: Add surface pipe_fence for vl_compositor rendering
Wait on it in SyncSurface. Fixes sync issues when using surfaces from
processing context (shader path) in external APIs (eg. Vulkan interop).

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
d4a6a22ef4 frontends/va: Remove vlVaBuffer derived_image_buffer
It's not used anymore.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:13 +00:00
David Rosca
faa5512464 frontends/va: Don't flush before resource_get_handle
resource_get_handle will flush if needed.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:13 +00:00
David Rosca
54dbef9377 frontends/va: Implement QuerySurfaceStatus as SyncSurface with 0 timeout
We only support ready and rendering status, so this is equivalent to
SyncSurface with 0 timeout.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:13 +00:00
Thomas H.P. Andersen
84b660b922 nvk: follow naming convention for devices
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32765>
2025-01-27 20:32:05 +00:00
Mike Blumenkrantz
4e1b18178b aco: exclude novalidateir from codegen flags
this otherwise bricks caching

cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33239>
2025-01-27 19:15:47 +00:00
Caio Oliveira
a4afb81729 intel/brw: Use brw prefix for some schedule instructions identifiers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33145>
2025-01-27 18:32:41 +00:00
Mike Blumenkrantz
015eda4a41 zink: deduplicate VkDevice and VkInstance
it's illegal to mix and match objects between different VkDevices even
if the creation params are identical, and this can cause issues on some
drivers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33204>
2025-01-27 17:31:02 +00:00
Mauro Rossi
a1333d60e9 android: remove shared-glapi building rules
Changes required after commit 44bda7c2

Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/libglapi_intermediates/libglapi.so
...
'out/target/product/x86_64/obj/MESON_MESA3D/install/usr/local/lib/libglapi.so': No such file or directory

Fixes: 44bda7c2 ("dri: put shared-glapi into libgallium.*.so, remove the remap table to reduce GL dispatch overhead")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33224>
2025-01-27 17:20:17 +00:00
Igor Torrente
d4faef8f0b NVK: Enable RW DMA-BUF export
Venus need mmap DMA-BUF as rw to implement some things internaly.
This patch allows NVK DMA-BUF export to be mmaped as RW.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33203>
2025-01-27 16:50:40 +00:00
Samuel Pitoiset
0f5bd032eb ci: update VKCTS main to a9988483c0864d7190e5e6264ccead95423dfd00
RADV is the only driver using VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <None>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33186>
2025-01-27 13:50:01 +00:00
Lionel Landwerlin
74f57d7267 meson: required SPIRV-Tools LLVM workaround on LLVM17+
Otherwise, compiling some of the shaders in src/intel/shaders, we can
hit the following message from our internal CLC glue code :

   "SPIRV-Tools doesn't contain https://github.com/KhronosGroup/SPIRV-Tools/pull/5534"

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: db11165c07 ("intel/cl: switch to SPIRV as shader storage")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33234>
2025-01-27 13:16:27 +00:00
Rhys Perry
cdae225243 nir/divergence: assume all instructions are loop invariant if no continues
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/32998>
2025-01-27 12:40:14 +00:00
Georg Lehmann
df1de388a3 aco/sched_ilp: reorder VINTRP
VINTRP(gfx6-gfx10.3) is mostly just VALU, but we treated it like memory
instructions as an afterthought. This had issues as VINTRP was never reordered
with itself, or other memory instructions. Reordering VINTRP in clauses
increases ILP. We don't really need collect_clause_dependencies for VINTRP
either, because they ususally have the same dependencies already. That means
we can still form VINTRP clauses by selecting preferably VINTRP after a
previous one.

Foz-DB Navi21:
Totals from 34184 (43.16% of 79206) affected shaders:
Instrs: 18811270 -> 18812046 (+0.00%); split: -0.01%, +0.02%
CodeSize: 103627276 -> 103630056 (+0.00%); split: -0.01%, +0.01%
Latency: 188379364 -> 187936731 (-0.23%); split: -0.27%, +0.03%
InvThroughput: 42600163 -> 42590608 (-0.02%); split: -0.03%, +0.00%
VClause: 378960 -> 378912 (-0.01%); split: -0.02%, +0.00%
SClause: 727560 -> 720573 (-0.96%); split: -1.08%, +0.12%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
45ccd6487f aco/sched_ilp: only remove WaW/WaR for inter clause dependencies
Direct RaW shouldn't be removed, because the clause is split by a wait anyway.

Foz-DB Navi21:
Totals from 52 (0.07% of 79206) affected shaders:
Instrs: 1603523 -> 1603485 (-0.00%); split: -0.00%, +0.00%
CodeSize: 8223048 -> 8222788 (-0.00%)
Latency: 9741674 -> 9738884 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 2322621 -> 2322010 (-0.03%); split: -0.03%, +0.00%
SClause: 31325 -> 31320 (-0.02%); split: -0.02%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
4b332afb32 aco/sched_ilp: add dependencies of later clause instrs more aggressively
Foz-DB GFX1150:
Totals from 22246 (28.03% of 79377) affected shaders:
Instrs: 22689053 -> 22684012 (-0.02%); split: -0.06%, +0.03%
CodeSize: 117622416 -> 117603292 (-0.02%); split: -0.04%, +0.03%
Latency: 182725630 -> 182702465 (-0.01%); split: -0.06%, +0.05%
InvThroughput: 37963256 -> 37956961 (-0.02%); split: -0.03%, +0.02%
VClause: 471019 -> 467248 (-0.80%)
SClause: 592620 -> 590034 (-0.44%); split: -0.44%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
ea514e9385 aco/sched_ilp: continue open clauses
Foz-DB GFX1150:
Totals from 13789 (17.37% of 79395) affected shaders:
Instrs: 16567395 -> 16570832 (+0.02%); split: -0.03%, +0.05%
CodeSize: 85737492 -> 85751072 (+0.02%); split: -0.02%, +0.04%
Latency: 140988872 -> 140831767 (-0.11%); split: -0.12%, +0.01%
InvThroughput: 29639206 -> 29614890 (-0.08%); split: -0.09%, +0.00%
VClause: 347065 -> 343779 (-0.95%); split: -0.96%, +0.01%
SClause: 424881 -> 418657 (-1.46%); split: -1.48%, +0.02%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
997ea2e273 aco: update is_dual_issue_capable for gfx11.5+
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Rhys Perry
e18e293e6c aco: don't use divergence information for most ALU defs
If one of the sources are divergent but all are SGPRs, then this can
cause issues (for example, imul with two SGPR sources and a VGPR definition).

No fossil-db changes (navi21)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12454
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32997>
2025-01-27 10:48:07 +00:00
Antonio Ospite
cd5c135349 freedreno/meson: sort list of options passed to get_supported_arguments()
Sort the list of compiler options passed to get_supported_arguments(),
this also makes it easier to spot and remove duplicates.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33209>
2025-01-27 09:09:38 +00:00
Antonio Ospite
38c0ed5fc4 freedreno/meson: remove C++ cross-build arguments HACKs
After the fix in commit b016f218fb (ci/android: fix meson C++
cross-compiler argument detection, 2025-01-14) the cross-build meson
hacks should not be necessary anymore for the CI builds to pass.

Remove the hacks making sure that the removed arguments are all in the
regular list of arguments passed through cpp.get_supported_arguments()

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33209>
2025-01-27 09:09:38 +00:00
Samuel Pitoiset
ce3a137892 radv: fix the number of drm modifier planes for DCC on GFX12
It's always 1 plane because DCC isn't allocated from the userspace
driver.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33213>
2025-01-27 08:44:48 +00:00
Samuel Pitoiset
cd31a61fda radv: fix an assertion about DCC and modifier on GFX12
radv_image_has_dcc() should always returns FALSE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33213>
2025-01-27 08:44:48 +00:00
Samuel Pitoiset
48d199f3dc ac/gpu_info: add gfx12_supports_display_dcc
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33212>
2025-01-27 08:08:15 +00:00
Lucas Stach
dea4b46f21 etnaviv: hwdb: fix lookup of GC3000 in i.MX6QP
For whatever reason NXP decided to call the GC3000 in the i.MX6QP a
GC2000+. This being a lie is marked in the IP core by the upper half
of the revision register being all ones. The kernel driver already
fixes the model and revision when it encounters this core, but this
breaks matching in the HWDB, which uses the bogus model/rev from the
core.

Revert the fixup done by the kernel for the lookup in the HWDB.

Fixes: 2192e620bb ("etnaviv: hwdb: Add etna_query_feature_db(..)")
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/33223>
2025-01-26 20:32:04 +00:00
Alyssa Rosenzweig
f0e3fe195f nir/lower_robust_access: do not preserve control flow
we insert if's, which dirties control flow metadata. caught by the new metadata
validation blowing up.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33216>
2025-01-26 13:54:08 -05:00
Mel Henning
4ab5f0240a nir: Update num_blocks in sort_unstructured_blocks
Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33219>
2025-01-26 12:52:59 -05:00
Mel Henning
6bd1d12137 nak: lower_load_ssbo_descriptor modifies cf
Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33219>
2025-01-26 12:52:53 -05:00
Mel Henning
78911ae635 nir_validate: Handle unstructured control flow
in validate_ssa_dominance. NAK was hitting an assertion in the
structured iterator because it lowers to unstructured control flow.

Fixes: 0eb5f66660 ("nir/validate: validate ssa dominance by default")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12524
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33219>
2025-01-26 12:52:47 -05:00
Lucas Stach
14ccd5d945 etnaviv: allow more constants in unified uniform mode
In unified uniform mode the constant memory is dynmically partitioned
between VS and FS, which allows to use far more FS constants than
currently supported with the fixed split when VS constant usage is low.
Limit computation taken from the Vivante kernel driver.

Fixes dEQP-GLES2.functional.uniform_api.random.79 on GPUs with
unified uniform support.

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/32983>
2025-01-26 12:59:20 +00:00
Lucas Stach
fdaa216c5d etnaviv: dynamically partition the constant memory in unfied uniform mode
Unified uniform mode allows to dynamically partition the constant memory
by specifying the start of VS and FS constants within the memory area. Use
this to place the FS uniforms directly behind the VS uniforms, potentially
making more space available to FS uniforms.

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/32983>
2025-01-26 12:59:20 +00:00
Marek Olšák
61e289d0ca nir/opt_varyings: handle user barycentrics
This failed an assertion because the barycentric src wasn't an intrinsic.

v2: also do it in backward_inter_shader_code_motion

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
f7e3689fe1 ac/nir: lower sample_pos to load_sample_positions_amd when frag_coord is center
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
0a228dfef2 ac/nir: compute ddx/ddy for barycentric_at_offset at the beginning of shaders
to make it work after terminate (discard).

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
f98613d47c aco: implement replacement of sample_mask_in with helper_invocation in PS prolog
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
a842f198d7 aco: simplify how broadcast_last_cbuf is implemented in PS epilog
So PS epilogs only need a single bool flag that determines whether all
enabled color buffers should be written.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
5c4f737b84 aco: implement replacing frag_coord with pixel_coord in PS prolog
This adds an option to replace frag_coord.xy with pixel_coord when sample
shading is disabled, which is most of the time. This reduces the number of
input VGPRs.

It's already implement in ac_nir_lower_ps_early for monolithic shaders.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
eddd063420 ac/nir: cosmetic stuff for ac_nir_lower_ps
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
247c0593eb ac/nir: eliminate sample_mask_in without MSAA in ac_nir_lower_ps_early
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
e57b52ff6c ac/nir: optimize frag_coord <-> pixel_coord in ac_nir_lower_ps_early
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
33134f9503 ac/nir: optimize barycentric_at_sample(sample_id) in ac_lower_ps_early
Replace it with barycentric_sample.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
43f6b2655e ac/nir: simplify force_*_center_interp options in ac_nir_lower_ps_early
This only indicates whether MSAA is disabled.

Having a separate option for each sysval is better for the PS prolog,
but not for monolithic compilation.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
3bccfa72cc ac/nir: simplify force_*_sample_interp options in ac_nir_lower_ps_early
The only thing we need here is whether sample shading is enabled
and how many samples.

Having a separate option for each sysval is better for the PS prolog,
but not for monolithic compilation.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
d7d4d56f5b ac,aco,radeonsi: replace SampleMaskIn with 1 << SampleID if full sample shading
Since the sample mask is always 1 << sample_id with full sample shading,
just use that instead of loading sample_mask_in. Set it to 0 if it's
a helper invocation. This removes the sample mask input VGPR.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
b1fc34f290 radeonsi: sample shading state fixes
- really update sample shading state when it's changed
- reduce log state bits in the shader key to 2 because we don't support
  16x EQAA
- exit early from si_update_ps_iter_samples if ps_iter_sample has the same
  value since the last call
- set missing wqm for the PS prolog (this might fix tests)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
1026402b7c ac/nir: clamp vertex color outputs in the right place
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
4f63b21df0 ac/nir: drop 16x EQAA support from ac_get_ps_iter_mask
We don't support 16x EQAA anymore.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
51bbe2606d ac/nir: switch passes to use nir_shader_intrinsics_pass
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
d31b3513da ac/nir: handle FRAG_RESULT_COLOR with dual src blending in ac_nir_lower_ps_early
If FRAG_RESULT_COLOR with dual_src_blend_kndex=1 is present,
FRAG_RESULT_COLOR really means FRAG_RESULT_DATA0.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
38d3fc7a6a ac/nir: return progress from ac_nir_lower_ps_late
This changes the creation of barycentric coordinate variables to on-demand.
There is also some reordering of export code to return progress.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
231009be65 ac/nir: return progress from ac_nir_lower_ps_early
This changes the creation of barycentric coordinate variables to on-demand.
Everything else is ready to return progress.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
234b416ffb ac/nir: lower fbfetch_output in ac_nir_lower_ps_early
so that we can gather shader_info after this and all system values that
this adds will be gathered.

shader_info won't be gathered after si_nir_lower_abi, which is why we
have to lower fbfetch_output here.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
1570387aaa ac/nir: lower barycentric_at_offset/sample in ac_nir_lower_ps_early
i.e. before future linking optimizations and shader_info gathering

They are lowered together because one depends on the other.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
b9b1f3a047 ac/nir: lower sample_pos in ac_nir_lower_ps_early
i.e. before future linking optimizations and shader_info gathering

The ac_nir_lower_ps_early call is also added for non-monolithic shaders
because it's required now.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
580304350b ac/nir: optimize front_face in ac_nir_lower_ps_early
i.e. before future linking optimizations and shader_info gathering

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
0939fc6fa8 radv: don't call ac_nir_lower_ps_early
The current version doesn't do anything, and later commits require significant
reordering of NIR passes to make it usable.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
ec3f397af4 freedreno/ci: skip a dmat3 div test timing out
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Detlev Casanova
deda1b767e ci/deqp-runner: uprev from 0.20.2 to 0.20.3
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Detlev Casanova
8f4efda257 ci/fluster: Add radeonsi-raven-vaapi-fluster jobs
The CI job runs each supported decoder on 1 LAVA job:
- vp9
- h.264
- h.265

They each run the gstreamer VAAPI fluster decoder tests on a radeonsi
device on LAVA.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Detlev Casanova
aa11f3d630 ci/fluster/lava: Add fluster in LAVA rootfs
It will be used in next commits to run fluster vaapi tests on AMD
devices on LAVA.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Pavel Ondračka
ba860bd914 r300: fix uninitialized use in transform_vertex_ROUND
==26468== Conditional jump or move depends on uninitialised value(s)
==26468==    at 0x577A190: get_readers_normal_read_callback (radeon_dataflow.c:534)
==26468==    by 0x57795E7: rc_for_all_reads_src (radeon_dataflow.c:162)
==26468==    by 0x577A7BB: get_readers_for_single_write (radeon_dataflow.c:709)
==26468==    by 0x5779763: writes_normal (radeon_dataflow.c:212)
==26468==    by 0x5779870: rc_for_all_writes_mask (radeon_dataflow.c:243)
==26468==    by 0x577A93C: rc_get_readers (radeon_dataflow.c:819)
==26468==    by 0x577E35E: transform_vertex_ROUND (radeon_optimize.c:1332)
==26468==    by 0x577E48B: optimize_A0_loads (radeon_optimize.c:1367)
==26468==    by 0x577E53E: rc_optimize (radeon_optimize.c:1393)
==26468==    by 0x577767F: rc_run_compiler_passes (radeon_compiler.c:475)
==26468==    by 0x57777C2: rc_run_compiler (radeon_compiler.c:498)
==26468==    by 0x57747F3: r3xx_compile_vertex_program (r3xx_vertprog.c:820)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10562
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/33210>
2025-01-25 07:58:10 +00:00
Lionel Landwerlin
6768eb31e5 intel: rework CL pre-compile
Stolen from asahi_clc :)

We drop the nasty LLVM17+ workaround code (Thanks Alyssa!)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
5adac011b8 meson: rework mesa-clc=system handling
In theory you can build a driver using OpenCL kernels with a
-Dmesa-clc=system. That shouldn't require any LLVM/Clang/etc...

But the checks to find the pre-compiled mesa_clc & vtn_bindgen
binaries are in meson files or conditions only triggered if you build
with LLVM (:

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
db11165c07 intel/cl: switch to SPIRV as shader storage
Effectively making intel-clc not needed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
b3033dc633 meson: build mesa_clc for Anv/Iris
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
bf8a1e1e71 brw/elk: move internal kernel parsing out of intel_clc
So it can be called internally.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
857236a81d spirv: build vtn_bindgen for Anv/Iris
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
b0a882b3dc libcl_vk: add some vulkan enums/structures for DGC
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
d3d771607d libcl: add MIN2/MAX2 macros
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
José Roberto de Souza
73f3de12ef iris: Pick scanout PAT entry for scanout buffers
Scanout PAT was never being picked what could cause render cache to
not be flushed during page flips causing visual corruption on
displays.

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/33127>
2025-01-25 02:53:44 +00:00
José Roberto de Souza
572eacec9e iris: Make sure a uncached heap is choosen for scanout and shared buffers when LLC is not available
Platforms without LLC were in risky to get a heap that is cached
what could cause scanout glitches.

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/33127>
2025-01-25 02:53:44 +00:00
Samuel Pitoiset
f8e7c037e3 radv: add a new helper to set image BO metadata
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33193>
2025-01-25 02:10:03 +00:00
Samuel Pitoiset
ee4a1021d1 radv: add support for BO metadata on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33193>
2025-01-25 02:10:02 +00:00
Martin Roukala (né Peres)
8fd0eda0cf freedreno/ci: uprev the a750 kernel to msm-next
This kernel was built using b2c's linux builder without any additional
patches... aside from the usual ones I apply for b2c, so we are almost
to the point where we can run a stable kernel on it!

The next uprev should be made from gfx-ci/linux rather than being
hosted on my server, but I would like to use a released kernel for
that.

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/33162>
2025-01-24 23:36:56 +00:00
Martin Roukala (né Peres)
41bf984d0e ci/b2c: allow using another initrd that contains firmware
This allows DUTs that require firmware to boot reliably to provide them
without needing to include them in the kernel image.

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/33162>
2025-01-24 23:36:56 +00:00
Martin Roukala (né Peres)
668cc6dc0c ci/b2c: allow jobs to select a file in the dtb url
This makes it possible to have a single DTB url serving multiple DUTs,
without paying much of a cost for it.

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/33162>
2025-01-24 23:36:56 +00:00
Saroj Kumar
433004dcff ac/surface: fix missing NULL check in gfx12_select_swizle_mode()
Add null check for surf pointer.
Fixes segfault issue during start of gdm on gfx12.

Signed-off-by: Saroj Kumar <saroj.kumar@amd.com>

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/33199>
2025-01-24 21:51:50 +00:00
Karmjit Mahil
1f9d96ec78 vulkan: Add inital vram-report-limit layer
This Vulkan layer allows reporting a limited VRAM size to the
application. This layer can be useful for testing applications and
games which query for the memory budget adjusting their behavior
accordingly.

They layer does not set a hard limit on the amount of VRAM thus
applications can still make allocations even though the reported
budget might indicate no memory is left, if the set limit is lower
than of actually available VRAM.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30095>
2025-01-24 19:56:43 +00:00
Karmjit Mahil
ad603d300d util/simple_mtx: Add ASSERTED to parameter used only in an assert
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30095>
2025-01-24 19:56:42 +00:00
Rhys Perry
5cc977bee4 radv: set has_image_bvh_intersect_ray for null winsys
This is needed for fossilize-replay.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 14e3231b56 ("radv: add a flag to indicate ray tracing support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33201>
2025-01-24 18:08:12 +00:00
Sergi Blanch Torne
4818bc90d9 Revert "ci: disable Collabora's farm due to unexpected power cut"
This reverts commit e02539d7b6.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33200>
2025-01-24 17:21:47 +00:00
Antonio Ospite
7c6a4b65c7 docs/android: bump suggested platform-sdk-version to 34
Suggesting at least Android 14 for new development.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
876c4513a5 ci/android: rename variable ANDROID_NDK to ANDROID_NDK_VERSION
Rename the variable ANDROID_NDK to ANDROID_NDK_VERSION and only use it
to specify the version itself.

This makes it consistent with ANDROID_SDK_VERSION and it is also in
preparation for using the same variable to build ANGLE in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
30740e3af9 ci/android: use ANDROID_SDK_VERSION for debian-android job too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
4b2996e749 ci/android: use ANDROID_SDK_VERSION when building deqp components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
26d6607063 ci/android: update ANDROID_NDK and ANDROID_SDK_VERSION
Update ANDROID_NDK to the latest stable release 27c and bump
ANDROID_SDK_VERSION to API version 34 which matches the Android 14
release we are using for the cuttlefish images.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
David Rosca
6ebc25bc14 frontends/va: Stop using extra context for deinterlacing
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33126>
2025-01-24 13:40:28 +00:00
David Rosca
ea73d1b47c gallium/vl: Add compute shader deinterlace filter
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33126>
2025-01-24 13:40:27 +00:00
David Rosca
604fb68876 radeonsi: Report surface alignment for AV1 encode
This is also useful for AV1 to allow applications to use container crop.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33083>
2025-01-24 13:04:47 +00:00
David Rosca
ad0f197c6c radeonsi/vcn: Fix AV1 coded size for VCN 5.0
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33083>
2025-01-24 13:04:47 +00:00
Job Noorman
b4c95124ab freedreno: add missing entries to ForEachMacros
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
bbd164e2e3 freedreno: remove unused entries from ForEachMacros
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
bc6152c1c3 freedreno: move ForEachMacros into freedreno
This change moves freedreno specific ForEachMacros from the top level
.clang-format to the freedreno specific .clang-format.

This is done to avoid triggering CI for all drivers when making changes
to this list.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
dd74ef36a5 ir3: account for inserted nops in delay calculation
Whenever we insert a (nopN) on the previous instruction to add nops, we
initially add them to the current cycle count. However, existing (nopN)
fields are not accounted for. This means the if a (nopN) gets inserted
and the block is processed again, the cycle count will be too low and we
might insert more nops than necessary.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33178>
2025-01-24 11:39:44 +00:00
Samuel Pitoiset
d41a3bb744 radv: program COMPUTE_DISPATCH_INTERLEAVE on GFX12
To the same value as GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185>
2025-01-24 11:08:59 +00:00
Samuel Pitoiset
c039caeb53 ac/cmdbuf: program SPI_SHADER_GS_MESHLET_CTRL to 0 in the GFX12 preamble
Otherwise, it's derivative group quads by default.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185>
2025-01-24 11:08:59 +00:00
Lionel Landwerlin
7ddb49653d anv/brw: rework primitive count writing
Instead the complicated logic we currently have, do this :

We start with this shader :

int main() {
   ...
   if (...) {
      SetMeshOutputsEXT(0, 0);
      return;
   } else {
      SetMeshOutputsEXT(...);
   }
   ...
}

We turn it into this :

int main() {
   uint __temp_prim_count = 0;
   ...
   if (...) {
      __temp_prim_count = 0;
      return;
   } else {
      __temp_prim_count = ...;
   }
   ...

   if (is_first_group_lane()) {
      SetMeshOutputsEXT(..., __temp_prim_count);
   }
}

This works because the SPIRV spec says this :

   "The arguments are taken from the first invocation in each
    workgroup. Any invocation must execute this instruction no more
    than once and under uniform control flow."

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12388
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Lionel Landwerlin
4cc847cfd4 anv/Wa_18019110168: copy the primitive count writes
That way we don't have to lower the set_vertex_and_primitive_count
intrinsic before applying this WA.

Cc stable for the next patches that are fixing something.

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/33038>
2025-01-24 10:19:28 +00:00
Lionel Landwerlin
1067d95987 compiler: add VARYING_BIT_PRIMITIVE_COUNT
Cc stable for the next patches that are fixing something.

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/33038>
2025-01-24 10:19:28 +00:00
Sergi Blanch Torne
e02539d7b6 ci: disable Collabora's farm due to unexpected power cut
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33198>
2025-01-24 11:06:00 +01:00
Timothy Arceri
09f73024a5 glsl: fix num_views linker error
The declaration must be the same across shaders but not all shaders
must make the declaration.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33149>
2025-01-24 01:47:55 +00:00
Timothy Arceri
914697c4ac glsl: fix num_views validation message
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33149>
2025-01-24 01:47:55 +00:00
Caio Oliveira
ee625f44d5 intel/elk: Fix wrong destination to memset
Conversion to use rzalloc_array missed these.

Fixes: c9e667b7ad ("intel/elk: Remove uses of VLAs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12513
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33192>
2025-01-24 01:09:26 +00:00
Valentine Burley
c670bbc093 freedreno/ci: Update expectations again
This started passing in the last 24 hours on a306.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33187>
2025-01-24 00:29:11 +00:00
Rhys Perry
0eb5f66660 nir/validate: validate ssa dominance by default
This no longer modifies dominance metadata, so enable it by default.

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/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
b145045112 nir/validate: preserve dominance during SSA validation
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/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
b1945fd21a nir/validate: validate metadata
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9572
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
2d94ca93b5 nir/liveness: stop requiring instr indices
nir_live_defs_impl() doesn't actually use them, and every
nir_metadata_require of nir_metadata_live_defs already requires them.

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/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
bfc570ff98 nir/gcm: stop preserving nir_metadata_loop_analysis
This pass changes instr_cost if it makes progress.

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/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
36840db6fe nir/loop_analyze: use a sparse array and stop indexing SSA defs
Indexing SSA defs is unexpected behaviour and interferes with using
nir_loop_analyze_impl for validation.

It probably also breaks nir_metadata_live_defs.

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/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
77118fcf72 nir: rerun loop analysis if the parameters change
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/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
aae1aa4888 d3d12: store only once in d3d12_emit_points
d3d12_lower_point_sprite expects a single store for each output, each
dominating the emit_vertex.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
083a557856 d3d12: fix phi handling in d3d12_lower_primitive_id
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
9c159490c3 microsoft/compiler: repair SSA in dxil_nir_split_tess_ctrl
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
3850f8b167 microsoft/compiler: invalidate loop analysis in dxil_nir_lower_double_math
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
30473fd1e7 v3dv: fix SSA dominance error
Offset should be increased regardless of whether a result is written or
not.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:43 +00:00
Konstantin Seurer
eecaf80554 radv/rmv: Use radv_rmv_log_resource_destroy more
Gets rid of some duplicate code with the added benefit of removing a
memory leak warning when destroying the device because
radv_rmv_log_border_color_palette_destroy did not destroy the resource
ID.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33167>
2025-01-23 23:07:49 +00:00
Connor Abbott
6d406eeefa tu: Support VK_EXT_conservative_rasterization on a7xx
This supports everything the blob does.

The registers exist on later a6xx gens, but they would be way more
inconvenient to use since they're mixed up with binning/not-binning and
compression state, and I'm not sure if it works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
2798521bda tu: Stop setting binning fields on a7xx
These fields don't actually enable binning, but rather disables the FS.
This seems to happen automatically on a7xx when binning, because the
blob doesn't set them specially during the binning pass.

Move them to rasterization, because RB_RENDER_CNTL will start depending
on rasterization state in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
ffe8220bbd tu, freedreno: Write PC_DGEN_SU_CONSERVATIVE_RAS_CNTL
Prevent other processes writing this from messing us up.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Konstantin Seurer
6701806cd1 llvmpipe: Avoid a crash when using 5 coords with AF
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:04 +00:00
Konstantin Seurer
3f7564d86b llvmpipe: Fix half-pixel sample offset with AF
Simply adding -0.5 will cause a noticeable offset for low sample counts.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:03 +00:00
Mike Blumenkrantz
f3b8d7da46 egl: never select swrast for vmwgfx
ForceSoftware will be true in this case from the high-level fallback,
but this isn't really swrast

Fixes: 1de7c86bc1 ("dri: pass through a type enum for creating screen instead of driver_extensions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33123>
2025-01-23 21:14:21 +00:00
Caio Oliveira
563631cdd8 intel/brw: Rely on existing helper for dispatch width of geometry stages
Helper already exists and is used in the functions, just save the value
so can be reused.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33175>
2025-01-23 20:29:31 +00:00
Igor Torrente
fcb4412e9a Zink: Add NVK to the non driver_workarounds.implicit_sync list
This workarround is causing `VK_ERROR_DEVICE_LOST` to NVK when running
glmark2. And as NVK is part of mesa, it doesn't need the hand-holding
from Zink.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33142>
2025-01-23 19:12:40 +00:00
José Roberto de Souza
e9f4458c37 anv: Allow WSI blit_src Image to be kept compressed when transitioning to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
When WSI is working in prime/dma-buf mode, it has one additional
VkBuffer or VkImage where the main VkImage is copied to without any
compression or tiling different from linear

The batch buffer to do this copy is created in
wsi_finish_create_blit_context(). It performs a barrier transitioning
the VkImage to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, performs the
copy, and then transitions it back to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.

However, in this prime/dma-buf mode, no display modifiers are involved,
which causes compression to be disabled when switching to
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
This change adds an exception to allow the Vkimage to remain compressed
because we can handle the compressed-to-uncompressed copy.

Doing so fixes an issue that was reported with BMG + integrated GPU
and should also improve performance by keeping the VkImage compressed.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12354
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
José Roberto de Souza
5a37467cfd anv: Return scanout PAT entry for scanout and external buffers in discrete GPUs
Without this scanout and external buffers will be allocated as WB
what will fail allocation if DRM_XE_GEM_CREATE_FLAG_SCANOUT is set
or it will use WC but it will not be the special PAT entry for scanout.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
Job Noorman
41ae187003 ir3: disable alias.rt pre-a750
Even though alias.tex is supported on all of a7xx, alias.rt is only
support from a750.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 0aa9678d4d ("ir3: add support for alias.rt")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33184>
2025-01-23 17:55:22 +00:00
Lionel Landwerlin
9ea04a1a53 anv: don't look at pipelines to figure out CPS values
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/33170>
2025-01-23 17:13:54 +00:00
Tapani Pälli
e85646eace anv: set dependency between SF_CLIP and CC_PTR states
Fixes flickering seen in Cyberpunk 2077, Supraland and some
other game workloads.

cc: mesa-stable

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12494
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12504
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12453
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33163>
2025-01-23 16:26:24 +00:00
Karmjit Mahil
5846172f15 tu: Free pre_chain patchpoint data
Fixes a leak in:
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed42
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed60_geometry
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed95_geometry_multiview

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33084>
2025-01-23 15:39:50 +00:00
Lars-Ivar Hesselberg Simonsen
2d3c50d484 panvk: Fix barriers in secondary cmdbufs w/o rp's
When encountering pipeline barriers in secondary command buffers that do
not start their renderpasses, our barrier logic would not detect the
need to flush existing draws, leading to race conditions in case of
subpassLoad.

This change ensures we flush existing draws when required in secondary
command buffers.

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/33182>
2025-01-23 15:13:17 +00:00
Mike Blumenkrantz
d1c2795876 zink: fix replacing incompatible pipelines
if e.g., multiview framebuffer is enabled, shader objects cannot be used,
requiring the bound shaders to be compiled into a pipeline on-demand

this is not knowable in advance and will always result in a stall

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Mike Blumenkrantz
53cb103af2 zink: disable shader objects when viewmask is set
this is not supported by EXT_shader_object

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Mike Blumenkrantz
50c7d05568 zink: add radv ci fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Benjamin Lee
6d6a43518a panfrost: remove is_blit flag
This is no longer used anywhere.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Benjamin Lee
f93a48e4e3 panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload
Setting zs_update_operation = FORCE_EARLY for color preloads triggers
hangs in the dEQP-VK.rasterization.rasterization_order_attachment_access
depth/stencil tests. I didn't determine why this is the case, but the
DDK uses WEAK_EARLY for color preload, and doing the same here fixes the
hang.

WEAK_EARLY requires ATEST, so I removed .is_blit=true from the compiler
inputs.

There aren't any known hangs outside of the one set of vulkan CTS tests,
and in particular no known hangs in the gallium driver. Because the
reason for the hangs is not understood, I also changed the gallium
driver to use WEAK_EARLY, under the assumption that the same conditions
that trigger the hang in vulkan might occur in GL.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: edd98aac3f ("panfrost: Add support for native wallpapering on Bifrost")
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/32954>
2025-01-23 13:50:27 +00:00
Benjamin Lee
79517d8a65 panfrost: remove incorrect usage of MALI_PIXEL_KILL_STRONG_EARLY
On bifrost, zs_update_operation=STRONG_EARLY, is equivalent to
WEAK_EARLY except that it may test/update without waiting for pixel
dependencies if it can prove that the test will pass.

STRONG_EARLY no longer exists on valhall, and the value 2 is reserved.

Even on bifrost, all of our current uses of STRONG_EARLY are
incorrect. For color preload, the shader skips ATEST, so FORCE_EARLY is
required. In the no-FS case, ATEST is skipped by definition (because
there is no shader), so FORCE_EARLY is required.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 519643bbe0 ("panfrost: Adjust the renderer state definition")
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/32954>
2025-01-23 13:50:27 +00:00
Samuel Pitoiset
4b741338ac radv: exclude layer when recomputing FS input bases
This is always exported as a sysval.

Closes: mesa/mesa#12501
Fixes: dd00b3f5 ("radv: Implement FS layer ID input as a system value.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33168>
2025-01-23 13:21:03 +00:00
Lionel Landwerlin
2e4dcf72c6 brw: fix CSE with negation
The pass is currently turning this :

mul(16) %17:F, %1:F, 0.5f
mul(16) %19:F, %1:F, -0.5f
(+f0.0) sel(16) %27:UD, %19:UD, %17:UD

into this :

{ 12} mul(16) %17:F, %1:F, 0.5f
{ 14} (+f0.0) sel(16) %27:UD, -%17:F, %17:UD

The type change in the SEL instruction incurs a type conversion that
produces invalid values.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 234c45c929 ("intel/brw: Write a new global CSE pass that works on defs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12477
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33070>
2025-01-23 12:45:34 +00:00
Erik Faye-Lund
40b4c0aa1a panvk/ci: update expected failures
These failures were all caused by CTS bugs affecting Vulkan 1.0. But
since we now expose Vulkan 1.1 on V10, these issues no longer affect us.

Let's update the results to reflect this.

Fixes: 1a81bff6aa ("panvk: expose vk1.1 on v10 hardware")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33180>
2025-01-23 12:09:51 +00:00
Erik Faye-Lund
e34e474f24 panvk: do not expose EXT_subgroup_size_control on bifrost
This exptension requires Vulkan 1.1, which we don't expose there yet.

While we're at it, put panvk into the normal sorted order of the list of
drivers.

Fixes: d46b80249b ("panvk: enable subgroupSizeControl")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33180>
2025-01-23 12:09:51 +00:00
Valentine Burley
2d99b77f2e amd/ci: Run full radeonsi-raven-va job pre-merge
The full job run takes approximately 8 minutes now, as the issues
previously mentioned have been resolved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33155>
2025-01-23 11:33:25 +00:00
Valentine Burley
0624cd9c51 amd/ci: Add lava-hp-x360-14a-cb0001xx-zork and use it for VA-API testing
Move the existing radeonsi-raven-va job to this new device.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33155>
2025-01-23 11:33:25 +00:00
Valentine Burley
708279df20 panfrost/ci: Revert to 6.6 kernel on G57
On mt8192, the 6.13 kernel fails to reliably initialize the GPU, causing
a fallback to llvmpipe. Return to the 6.6 kernel until this is resolved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33181>
2025-01-23 10:56:20 +00:00
Corentin Noël
d441292a70 virgl/ci: Remove screen size arguments
We don't need such argument and this way of specifying them is deprecated anyway.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33173>
2025-01-23 10:14:48 +00:00
Vignesh Raman
ef3091736c ci: use CI_PROJECT_NAME for artifacts name
Since mesa is used in drm-ci, the artifacts in drm-ci jobs have
the 'mesa' prefix. This change replaces the hardcoded 'mesa'
prefix in the artifacts name with the CI_PROJECT_NAME variable.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33154>
2025-01-23 07:18:09 +00:00
Job Noorman
0aa9678d4d ir3: add support for alias.rt
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

This is implemented by replacing const and immediate components of the
RT sources of end with alias.rt instructions in the preamble. If no
preamble exists, an empty one is created.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
90b512c4ef freedreno: add support for aliased render target components
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

In addition to using alias.rt, the hardware needs to be informed about
which render target components are being aliased using the
SP_PS_ALIASED_COMPONENTS{_CONTROL} registers. This commit implements
those registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
38f5fd66de freedreno: add chip param to emit_fs_output
We will need this to emit the a7xx-specific aliased components regs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
2716385afa tu: add support for aliased render target components
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

In addition to using alias.rt, the hardware needs to be informed about
which render target components are being aliased using the
SP_PS_ALIASED_COMPONENTS{_CONTROL} registers. This commit implements
those registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
3290a3dcf3 tu: add chip param to tu6_emit_fs_outputs
We will need this to emit the a7xx-specific aliased components regs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
040b803e4b ir3: reuse ir3_find_output in ir3_find_output_regid
The search logic was duplicated here. Also added a new helper
ir3_get_output_regid to make the regid calculation reusable.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
39206c1150 ir3: make shader output struct non-anonymous
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
b8b3fe20b2 tu,ir3: inform ir3 of dynamically remapped FS slots
The clear FS shaders will statically use slot numbers from 0 up to the
number of supported render targets. However, the driver will remap those
slots to the actual render targets being cleared.

This means that ir3 should not make any assumptions about the static
slot number in those cases. This is especially important when
implementing alias.rt, which statically encodes the render target.

Add an new ir3_shader_option (fragdata_dynamic_remap) which allows the
driver to indicate to ir3 that it will perform such dynamic remapping.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
2a0a317244 ir3: make find_end a global helper
Rename to ir3_find_end and move to ir3.{h,c}.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
f3026b3d3e ir3: add some preamble helpers
Helpers to check for preamble existence, find shpe, and create an empty
preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
144121b6df ir3/dce: support partial writes from collects
When alias.rt is used to alias certain output components, we might end
up with a situation where some, but not all, of the components of
collects end up being unused. This is currently not supported which
means we end up with useless moves (coming from copy lowering) for
aliased output components.

Fix this by adding support for partial wrmasks for collects in DCE. The
wrmasks are initially zeroed out and then updated based on the wrmask of
their users. Sources of collects for which the corresponding dst ends up
being unused are treated as unused as well. This allows us to remove
the useless output moves by simply updating the wrmask of the end
sources.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
a7a357f91d ir3/legalize: insert (sy) to read consts after ldc.k
Observed when reading consts in the preamble using alias.rt.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
96e08c3859 ir3/legalize: insert (ss) to read consts after stc
Observed when reading consts in the preamble using alias.rt.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
9b6bca52d5 ir3: optimize alias register allocation by reusing GPRs
Allocate alias registers for an alias group while trying to minimize the
number of needed aliases. That is, if the allocated GPRs for the group
are (partially) consecutive, only allocate aliases to fill-in the gaps.
For example:
   sam ..., @{r1.x, r5.z, r1.z}, ...
only needs a single alias:
   alias.tex.b32.0 r1.y, r5.z
   sam ..., r1.x, ...

Also, try to reuse allocations of previous groups. For example, this is
relatively common:
   sam ..., @{r2.z, 0}, @{0}
Reusing the allocation of the first group for the second one gives this:
   alias.tex.b32.0 r2.w, 0
   sam ..., r2.z, r2.w

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
3fb0f54d70 ir3: add support for alias.tex
alias.tex allows us to construct an "alias table" that creates a mapping
between virtual alias registers and concrete GPRs, consts, or
immediates. The following texture instruction will lookup its sources in
this table and use the mapped value instead. This has a few advantages:
- We don't have to allocate consecutive registers (necessary for many
  tex sources) as we can just map them to consecutive alias registers.
- We don't have to allocate GPRs at all for consts and immediates.
- There's no delay penalty when initializing alias registers with consts
  or immediates.

For example, this code:
mov.u32u32 r1.x, r3.z
mov.u32u32 r1.y, c0.x
mov.u32u32 r1.z, 0
(rpt2)nop
sam ..., r1.x, ...

Can be implemented as follows:
alias.tex.b32.2 r40.x, r3.z
alias.tex.b32.0 r40.y, c0.x
alias.tex.b32.0 r40.z, 0
sam ..., r40.x, ...

Note that the alias registers (r40.xyz in this case) do not occupy GPR
space.

(More intelligent allocation strategies are possible; e.g., just mapping
r3.w and r4.x to c0.x and 0. This is implemented by the next commit.)

Support for alias.tex is implemented in two passes in ir3.

In a first pass, sources of tex instructions are replaced by alias
sources (IR3_REG_ALIAS) as follows:
- movs from const/imm: replace with the const/imm;
- collects: replace with the sources of the collect;
- GPR sources: simply mark as alias.

This way, RA won't be forced to allocate consecutive registers for
collects and useless collects/movs can be DCE'd. Note that simply
lowering collects to aliases doesn't work because RA would assume that
killed sources of aliases are dead, while they are in fact live until
the tex instruction that uses them.

The second pass inserts alias.tex instructions in front of the tex
instructions that need them and fixes up the tex instruction's sources.
This pass needs to run post-RA as discussed above. It also needs to run
post-legalization as all the sync flags need to be inserted based on the
registers instructions actually use, not on the alias registers they
have as sources.

This commit uses a very simple allocation strategy for alias registers:
simply allocate consecutive registers starting from r40.x. Note that
this works because the alias table is reset after a tex instruction is
executed so we don't have to worry about aliasing a live register.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
4a9faaae17 ir3: add ir3_compiler::has_alias
Flag to detect support for alias.rt/alias.tex available in a7xx.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
c5c95f8916 ir3: add validation for alias
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
84b93cf718 ir3: introduce alias goups
Alias registers allow us to allocate non-consecutive registers and remap
them to consecutive ones using alias.tex. We implement this by adding
the sources of collects directly to the sources of their users. This
way, RA treats them as scalar registers and we can remap them to
consecutive registers afterwards. To keep track of the scalar sources
that should be remapped together, the IR3_REG_FIRST_ALIAS flag is
introduced. Every source of such an "alias group" will have the
IR3_REG_ALIAS set, while the first one will also have
IR3_REG_FIRST_ALIAS set.

This commit also adds a number of helpers to iterate over sources while
keeping track of the original src index (i.e., before they were expanded
to alias goups), and to iterate the sources within an alias group. It
also introduces a new notation (@{regs...}) to clearly show alias groups
when printing instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
4c2fc07a7e ir3: teach backend about alias
Take the properties of alias.{rt,tex} and its registers into account:
- Don't count alias registers for GPR usage;
- Allow all immediates in alias regs;
- Fix properties like is_barrier and (ss) support;
- alias.rt dst is not a GPR, don't use it in legalize/postsched to track
  dependencies;

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
a325573aaf ir3/print: add support for alias
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
fb9de08efd ir3/a7xx: document alias.rt
It works completely differently from alias.tex.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
d9241c6360 ir3/a7xx: handle alias.rt dst
alias.rt writes to a render target, not a GPR. Render targets are
disassembled as rtN.c.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
dab47b55ef ir3/a7xx: implement and document unknown alias field
The UNK field encodes the table size for alias.tex: the first alias.tex
instruction uses it to indicate how many follow (i.e., it is the total
table size minus one).

Also switch from using a src to a cat7 field to store this value which
makes it a bit easier to handle.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
af7c6f8dd5 ir3/a7xx: disasm halfness of alias dst
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
c4d84a8675 ir3/a7xx: properly handle alias scope and type
The alias scope and type bits are intertwined in the encoding:
- bit 47: low scope
- bit 48: type
- bit 49: high scope
- bit 50: type size

Combining the low and high scope bits, the value is used as follows:
- 0: tex
- 1: rt
- 2: mem
- 3: mem

I don't know what the difference between 2 and 3 is. The blob currently
doesn't use mem at all.

The type bit seems to be used to make a distinction between floating
point (f) and integer (b) sources. There doesn't seem to be any
functional difference and it only affects how immediates are displayed.

Note that I haven't exactly mimicked the blob in these cases:
- alias.tex.f16/32: the blob uses b16/32 while printing immediates in
  floating point notation. I think it make more sense to use f16/32.
- alias.rt.b16/32: the blob uses i16/32 here. I think it makes more
  sense to stick to a single notation (b).

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
2f629810aa ir3/parser: fix parsing integer as float
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Connor Abbott
15642c8ec2 tu: Handle non-identity GMEM swaps for input attachments
I believe nothing currently tests this, but this should be required by
analogy with the previous commit.

Fixes: 247d11d635 ("tu: Allow UBWC with images with swapped formats.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33115>
2025-01-23 05:53:40 +00:00
Connor Abbott
a104a7ca1a tu: Handle non-identity GMEM swaps when resolving
There is a single swap field for each color attachment, regardless of
whether it's in GMEM or not, and this does appear to be used in
GMEM mode when MUTABLEEN is set on the attachment. This means that when
a color attachment has a non-identity swap because it's mutable on a750,
we have to use the same corresponding swap when it's a source in a
GMEM resolve.  When using the fastpath, we have to make sure that the
swaps match because there aren't separate fields for GMEM and sysmem
swap.

This fixes dEQP-VK.image.mutable.2d.*_b8g8r8a8_unorm_draw_copy_resolve
with TU_DEBUG=gmem.

Fixes: 247d11d635 ("tu: Allow UBWC with images with swapped formats.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33115>
2025-01-23 05:53:40 +00:00
Connor Abbott
450755bd40 tu: Use image view format for sysmem resolves
The spec says that we're supposed to do this. This fixes the
newly-introduced tests dEQP-VK.image.mutable.*.*_draw_copy_resolve with
TU_DEBUG=sysmem.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33115>
2025-01-23 05:53:40 +00:00
Connor Abbott
47a85815b0 radv: Delete acceleration structure stubs
These are now provided by common code.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33153>
2025-01-23 05:16:58 +00:00
Connor Abbott
987e499253 anv: Delete acceleration structure stubs
These are now provided by common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33153>
2025-01-23 05:16:58 +00:00
Connor Abbott
3141033ac2 vk/bvh: Add default stubs for unsupported entrypoints
We don't currently support building acceleration structures on the CPU
or indirect building in the common framework, and drivers using it don't
either, but drivers have to return non-NULL entrypoints for CPU building
functions if they claim to support VK_KHR_acceleration_structure. Add
stub entrypoints here so that drivers don't have to have this
boilerplate.

Fixes dEQP-VK.api.version_check.entry_points on turnip.

Fixes: 671e3a65a6 ("tu: Support VK_KHR_acceleration_structure")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33153>
2025-01-23 05:16:58 +00:00
Eric Engestrom
762cd246ee docs/release-calendar: push back the 24.3.x releases by one week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Eric Engestrom
835ecc5758 docs: add sha sum for 24.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Eric Engestrom
e5ca260032 docs: add release notes for 24.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Eric Engestrom
3d3ac0de25 docs: update calendar for 24.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Danylo Piliaiev
244e408341 ir3: Consider const alloc alignment in free space size calcs
The alignment was considered only for offset, but its users
(at least ir3_nir_opt_preamble) expect the size itself to also
be aligned.

Fixes tests:
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_geom
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tessc
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tesse
  gmem-dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tesse

Fixes: 922ef8e720
("ir3: Make allocation of consts more generic and order independent")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33161>
2025-01-23 02:31:48 +00:00
Daniel Schürmann
1feb733cd4 Revert "nir: add nir_clear_divergence_info, use it in nir_opt_varyings"
This reverts commit 9d043e138d.

It is no longer needed. nir_convert_from_ssa() is now capable to
ignore divergence information.

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/33009>
2025-01-23 01:31:24 +00:00
Daniel Schürmann
f3be7ce01b nir/from_ssa: only consider divergence if requested
This pass used to unconditionally use divergence information
which forced the caller to either call divergence_analysis or
ensure that the divergence is properly reset.

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/33009>
2025-01-23 01:31:23 +00:00
Marek Olšák
e7214b9446 glapi: rename exported symbols so as not to conflict with old libglapi
libwaffle 1.7.0 has a hack that dlopen's libglapi with RTLD_GLOBAL, which
was meant to preload libglapi, but with this MR it overwrites libgallium's
own symbols, which breaks libgallium.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
6e3ee3a072 loader: improve the existing loader-libgallium non-matching version error
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
464dde302c glapi: remove the remap table
it's unused now

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
b22f682a31 glapi: stop using the remap table
The remap table adds an array lookup into 75% of CALL_* macros, which are
used to call GL functions through the dispatch table. Removing the array
lookup reduces overhead of dispatch table calls.

Since libglapi is now required to be from the same build as libgallium,
the remap table is no longer needed.

This change doesn't remove the remapping table. It only disables it.
Compare asm:

Before:
0000000000000000 <_mesa_unmarshal_Uniform1f>:
   0:   f3 0f 1e fa             endbr64
   4:   48 83 ec 08             sub    $0x8,%rsp
   8:   48 8b 05 00 00 00 00    mov    0x0(%rip),%rax        # f <_mesa_unmarshal_Uniform1f+0xf>
   f:   8b 4e 04                mov    0x4(%rsi),%ecx
  12:   31 d2                   xor    %edx,%edx
  14:   f3 0f 10 46 08          movss  0x8(%rsi),%xmm0
  19:   48 63 80 a8 01 00 00    movslq 0x1a8(%rax),%rax
  20:   85 c0                   test   %eax,%eax
  22:   78 08                   js     2c <_mesa_unmarshal_Uniform1f+0x2c>
  24:   48 8b 57 40             mov    0x40(%rdi),%rdx
  28:   48 8b 14 c2             mov    (%rdx,%rax,8),%rdx
  2c:   89 cf                   mov    %ecx,%edi
  2e:   ff d2                   call   *%rdx
  30:   b8 02 00 00 00          mov    $0x2,%eax
  35:   48 83 c4 08             add    $0x8,%rsp
  39:   c3                      ret

After:
0000000000000000 <_mesa_unmarshal_Uniform1f>:
   0:   f3 0f 1e fa             endbr64
   4:   48 89 f8                mov    %rdi,%rax
   7:   48 83 ec 08             sub    $0x8,%rsp
   b:   f3 0f 10 46 08          movss  0x8(%rsi),%xmm0
  10:   8b 7e 04                mov    0x4(%rsi),%edi
  13:   48 8b 40 40             mov    0x40(%rax),%rax
  17:   ff 90 10 10 00 00       call   *0x1010(%rax)
  1d:   b8 02 00 00 00          mov    $0x2,%eax
  22:   48 83 c4 08             add    $0x8,%rsp
  26:   c3                      ret

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
44bda7c258 dri: put shared-glapi into libgallium.*.so
so that we don't have to maintain a stable ABI for it.

This will allow removal of the remapping table to reduce CALL_* overhead
for GL dispatch tables.

Also we can now clean it up.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Daniel Schürmann
08560b8ff8 aco/lower_branches: stitch linear blocks if there is exactly one successor with one predecessor
Totals from 12906 (16.26% of 79395) affected shaders: (Navi31)

Instrs: 22051521 -> 22049488 (-0.01%); split: -0.01%, +0.00%
CodeSize: 116591240 -> 116583920 (-0.01%)
Latency: 196625178 -> 196538410 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 33943045 -> 33930615 (-0.04%); split: -0.04%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
c90ae5f773 aco: delete aco_jump_threading.cpp
This is now handled by lower_branches().

Totals from 47236 (59.49% of 79395) affected shaders: (Navi31)
Instrs: 29490400 -> 29490507 (+0.00%)
CodeSize: 152316812 -> 152317248 (+0.00%); split: -0.00%, +0.00%
Latency: 229665459 -> 229665106 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 36870605 -> 36870504 (-0.00%); split: -0.00%, +0.00%
Copies: 1966751 -> 2233467 (+13.56%)
SALU: 3122941 -> 3123048 (+0.00%)

Note, that only about 20 shaders are actually affected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
c677809f25 aco/lower_branches: allow for non-fallthrough loop exits in try_merge_break_with_continue()
Totals from 211 (0.27% of 79395) affected shaders: (Navi31)

Instrs: 276961 -> 276545 (-0.15%)
CodeSize: 1404356 -> 1402248 (-0.15%)
Latency: 1344722 -> 1344887 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 165624 -> 165622 (-0.00%); split: -0.00%, +0.00%
Branches: 6149 -> 5987 (-2.63%)
SALU: 25722 -> 25468 (-0.99%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
12656ea5f5 aco: move try_merge_break_with_continue() to lower_branches()
Totals from 3 (0.00% of 79395) affected shaders: (Navi31)

Instrs: 12888 -> 12882 (-0.05%)
Latency: 83253 -> 83246 (-0.01%)
InvThroughput: 9251 -> 9249 (-0.02%)
Branches: 483 -> 480 (-0.62%)
SALU: 1329 -> 1326 (-0.23%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
13ad3db43f aco/lower_branches: implement try_remove_simple_block() in lower_branches()
This is mostly the same as in jump_threading, but can handle
multiple predecessors.

Totals from 3523 (4.44% of 79395) affected shaders: (Navi31)

Instrs: 10244892 -> 10244753 (-0.00%); split: -0.00%, +0.00%
CodeSize: 54171500 -> 54168540 (-0.01%); split: -0.01%, +0.00%
Latency: 75070425 -> 75059570 (-0.01%); split: -0.02%, +0.00%
InvThroughput: 11606911 -> 11605767 (-0.01%); split: -0.01%, +0.00%
Branches: 331778 -> 331675 (-0.03%); split: -0.05%, +0.02%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
2b5a893e29 aco/lower_branches: do eliminate_useless_exec_writes_in_block() during branch lowering.
Totals from 728 (0.92% of 79395) affected shaders: (Navi31)

Instrs: 452926 -> 452161 (-0.17%)
CodeSize: 2255536 -> 2252504 (-0.13%)
Latency: 1683404 -> 1683470 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 210887 -> 210888 (+0.00%); split: -0.00%, +0.00%
SALU: 77865 -> 77106 (-0.97%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
eecdb45d61 aco: consider s_cbranch_exec* instructions in needs_exec_mask()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
de1e38e214 aco/assembler: Find loop exits using the successor's loop nest depth
Previously, we just used the next block after a loop that
has a back-edge. This assumes that loop-exit blocks can
only be removed when falling through to the next block,
when in fact it can also be a jump to somewhere else,
in future even to some block before the actual loop.

12 (0.02% of 79395) affected shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
29c63de062 aco/jump_threading: don't remove loop preheaders
They might be needed as convergence point in order to
insert code (e.g. for loop alignment, wait states, etc.).

Totals from 1 (0.00% of 79395) affected shaders:

CodeSize: 12672 -> 12716 (+0.35%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Lucas Stach
4bed508122 etnaviv: track TS flushed status as bool
TS can be valid and flushed at the same time when no compression is
used. This state is beneficial if we needed to flush TS to the base
surface (filling cleared tiles) for any reason, but still use TS
state to accelerate read requests into PE or TX caches.

The current seqno based tracking of the TS flush state has a major
drawback with the following sequence of events:
1. fast clear surface (TS is now valid)
2. flush TS (base surface tiles filled, TS still valid,
   flush seqno == surface seqno)
3. render to surface (surface seqno increased)
4. flush resource

Step 4 will now execute a full TS flush as the flush and surface seqnos
are different after rendering and TS is still valid, wasting memory
bandwidth to fill already filled tiled that are still marked as clear
in the TS state. If the TS has been flushed already, step 4 should be
a no-op.

Switch from the seqno based tracking to tracking the flush state itself,
marking the TS state un-/flushed as needed. With this boolean tracking
of the flush state step4 above will correctly see that the TS has already
been flushed since the last fast clear and skip the tile fill blit.

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/32956>
2025-01-22 23:50:00 +00:00
Erik Faye-Lund
d74f569035 pan/bi: bump iter_count to 2000
Without this, we fail to register-allocate the shader used in the
dEQP-VK.ssbo.phys.layout.random.8bit.scalar.78 VK-CTS test case.

Yeah, this sucks, but failing to compile sucks even more. We need a new
register allocator plan here.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33124>
2025-01-22 23:19:18 +00:00
Samuel Pitoiset
b4085df31c radv: re-emit streamout state for GFX12 when the user SGPR changes
This is more for consistency than a real fix.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33164>
2025-01-22 22:54:23 +00:00
Caterina Shablia
d46b80249b panvk: enable subgroupSizeControl
This is trivial for us, the hardware only ever supports a single
subgroup size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Erik Faye-Lund
1a81bff6aa panvk: expose vk1.1 on v10 hardware
Subgroup ops were the last bit missing

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Erik Faye-Lund
ac05c2a2b8 panvk: expose subgroup operations
We can't use VK_SHADER_STAGE_ALL here, because we don't support geometry
and tesselation shaders. Additionally, the DDK doesn't support the
vertex stage, so let's not even try that for now; it probably won't
work.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
d2838f3ceb pan/bi: handle barriers with SUBGROUP scope
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
f77a50e45e pan/bi: add a MEMORY_BARRIER pseudo-instruction
This is purely a scheduling barrier for memory instructions. We
need this to implement subgroup barriers.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
39bd5cba68 pan/bi: lower the rest of subgroup ops using nir_lower_subgroups
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
d5c5528e06 pan/bi: lower some subgroup intrinsics
Lower vote_any, vote_all, load_subgroup_id, load_subgroup_size and
load_num_workgroups.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
1b59b9edee pan/bi: handle ballot, ballot_relaxed and as_uniform
Implement as_uniform with a simple mov, as the HW doesn't have
uniform registers (registers shared by all threads in the warp)
like some other hardware does.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
a73a0592d6 pan/bi: handle read_invocation
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
47ed7d90af pan/va: fix WMASK packing
WMASK's subgroup argument wasn't being encoded so we'd always
end up with a WMASK.subgroup2.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
a96de77f8b pan/bi: fix a typo
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/32710>
2025-01-22 21:49:51 +00:00
Lars-Ivar Hesselberg Simonsen
7b949dd8c4 panvk: Use LD_VAR_BUF[_IMM] when possible
If we determine that the amount of varyings will fit within the 8-bit
offset of LD_VAR_BUF[_IMM], instruct the compiler to use it for varyings
and skip setting up Attribute Descriptors.

This should save a bit of memory and overhead in reading varyings.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
de86641d3f panvk: Limit AD allocation to max var loads in v9+
Introduce a varying load count pass to get the maximum amount of varying
loads from a fragment shader (prior to optimization passes), in order to
only allocate as many Attribute Descriptors as required. This will
generally lead to smaller buffers in SRT0 for fragment shaders.

As the amount of ADs is now dynamic based on the shader, we need to
lower varying loads early for fragment shaders in v9+, as the amount of
ADs will determine the offset for dummy_sampler, required during
nir_lower_descriptors.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
6d5ae5b3af panvk: Use LD_VAR[_IMM] + ADs for varyings
The current implementation uses LD_VAR_BUF[_IMM] to look up varyings,
which limits the number of varying components to 64 due to an 8-bit
offset value.

As this does not align to maxVertexOutputComponents (128), this change
replaces the use of LD_VAR_BUF[_IMM] with LD_VAR[_IMM] + Attribute
Descriptors, which do not have this limitation.

As allocating Attribute Descriptors is potentially expensive, this can
be further optimized by falling back to LD_VAR_BUF[_IMM] in cases where
we can ensure we do not use more than 64 varying components.

This change currently does not change behavior for gallium/panfrost,
though that should be done as well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
7881d19d01 pan/genxml: Fix vertex_packet Attribute on v9+
The fields "Attribute stride" and "Packet stride" are in the wrong
order, and "Packet stride" should not be shr() modified.

This has probably not shown up as an issue before due to the use of
LD_VAR_BUF[_IMM] for varyings, which does not require us to create
Attribute Descriptors with type vertex_packet.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Valentine Burley
d57beebc8d freedreno/ci: Update expectations
Most of these results changed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33158>
2025-01-22 20:26:15 +00:00
Mike Blumenkrantz
e1e622dfb0 zink: fix viewport detection when switching last stage shaders
the previous code checked e.g., VS -> GS binding, but it did not
correctly handle VS -> VS in order to toggle viewport state

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33144>
2025-01-22 17:07:53 +00:00
duncan.hopkins
4fa9c7d241 zink: stop zink_set_primitive_emulation_keys producing geometry shaders on platforms that do not support them.
If line smooth, stipple, quad_prims and a collection of other things are needed, zink produces a geometry shader to create them.

This code is disabling that from happening when there is no geometry shader support.
This removes a constant barrage of validation issues when trying to draw basic triangles.
Some of this missing functionality will be added back in later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33059>
2025-01-22 16:41:31 +00:00
Martin Roukala (né Peres)
6a4c99adf1 radeonsi/ci: update the vangogh expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Martin Roukala (né Peres)
7f2d03b81b zink/ci: update RADV expectations
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Martin Roukala (né Peres)
78624c41e3 zink/ci: update nvk expectations
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Marek Olšák
c4a8790fd7 zink/ci: skip KHR-Single-GL46...SizedDeclarationsPrimitive due to random timeout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33157>
2025-01-22 15:32:25 +00:00
Pierre-Eric Pelloux-Prayer
d27748a76f radeonsi: use ac_drm_device_get_cookie
Instead of the raw ac_drm_device pointer which will be different
for each call to ac_drm_device_initialize.

Fixes: a565f2994f ("amd: move all uses of libdrm_amdgpu to ac_linux_drm")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33081>
2025-01-22 14:55:56 +00:00
Pierre-Eric Pelloux-Prayer
6cee989915 amd: add ac_drm_device_get_cookie
This returns the underlying device pointer but as an opaque
uintptr_t.
This will be required because libdrm_amdgpu will return the
same device when called multiple times from the same process.

radeonsi relies on the pointer value to identify if the device
are the same and adjust the synchronisation logic based on that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33081>
2025-01-22 14:55:56 +00:00
Erik Faye-Lund
ff91457761 pan/compiler: don't pass midgard_instruction by value
This is a large struct, so let's pass it by reference instead of by
value.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:44 +00:00
Erik Faye-Lund
80bacbba23 pan/midgard: constify pointers
This makes it easier to reason about what arguments are going to be
modified and what aren't.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:44 +00:00
Erik Faye-Lund
430f7e991f pan/midgard: use macros for mir_prev_op / mir_next_op
The benefit of macros here is that they don't care about constness,
which is going to be benefitial once we stricten constness a bit here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:43 +00:00
David Rosca
a3871da932 radeonsi: Fix reporting support for AV1 Profile2
This reported support for Profile2 on all VCNs that support Profile0
and reported no supported formats if Profile2 was not supported.
Instead, we should not advertise the Profile2 at all if not supported.

Fixes: e359b3c525 ("radeonsi/vcn: support 12bit YUV420 AV1 decoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33092>
2025-01-22 13:17:50 +00:00
David Rosca
927f963726 gallium/auxiliary: Remove util_compute_blit
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
762a86c937 frontends/va: Implement format conversions in PutImage/GetImage
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
b3e666248b frontends/va: Support rotation and mirror for processing
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
7b2a1812cf frontends/va: Refactor vlVaPostProcCompositor to be usable outside processing
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
b7661be269 frontends/va: Stop using util_compute_blit
The progressive YUV shader used in vl_compositor_yuv_deint_full
does the same thing as util_compute_blit, but it also supports rotation.
Remove vlVaPostProcBlit and instead move the code to vlVaPostProcCompositor.

Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
24d69bdfe9 frontends/va: Disable color conversion for luma-only source formats
Fixes Y8_400 -> RGB conversion.

Cc: mesa-stable
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
375e301837 frontends/va: Simplify format check in PutSurface
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
3bbdc54a15 gallium/vl: Implement rotation and mirror in cs compositor
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
dd4777736c gallium/vl: Use matrix for scale and crop in cs compositor
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
a1db69a8c3 gallium/vl: Clear remaining planes in YUV conversion
Fixes Y8_400 -> YUV conversion.

Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
7fac4e3c79 gallium/vl: Add vl compositor layer mirror
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
746ba9f2d2 gallium/vl: Fix sampler view components for Y8_400 format
Copy sampler view for last component to remaining components.
Fixes sampling from Y8_400 luma-only format.

Fixes: 8a20e634ce ("gallium/vl: Add plane order for Y8_400 format")
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
Lars-Ivar Hesselberg Simonsen
358dcdabba panvk: Fix valgrind issue in panvk_compile_shaders
Ensure we've read all the relevant NIR state before freeing it for the
current shader.

Also ensure we free the shaders in the same order we compile them.

Fixes: d93f9d6d1a ("panvk: use static noperspective when statically linking VS and FS")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33011>
2025-01-22 12:12:21 +00:00
Lars-Ivar Hesselberg Simonsen
eabf8054b8 panvk: Fix valgrind issue in nir_lower_descriptors
Initialize progress to false as it might not be set by NIR_PASS()

Fixes: 258979d69c ("panvk: Wrap our descriptor lowering passes in NIR_PASS()")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33011>
2025-01-22 12:12:21 +00:00
Erik Faye-Lund
365cd04375 panfrost: do not artificially limit texture-sizes
We're already limiting the maximum texture-size based on the available
system memory, so we shouldn't really need to limit this here. In
addition, the state-tracker also limits the max framebuffer size to
16384, so we don't have to worry about limiting this to the framebuffer
size either.

So I don't think we have a good reason to artificially limit the texture
size here. This allows us to support larger textures than 8192, which is
especially useful to support OpenCL images with RustiCL.

Unfortunately, while the HW supports up to 64k texture sizes, Gallium
currently caps us at 32k. So let's stick with that as the new limit for
now.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
2025-01-22 10:09:24 +00:00
Erik Faye-Lund
3a5c606d20 panfrost: limit maximum texture size
We don't want huge textures to take up large amounts of system memory.

On a system with 1GB of RAM, this would limit us to 256 MB, which is the
same memory usage as a texture of 8192 x 8192 with 4 bytes per
component, which is what we currently limit max texture size to anyway.

The goal here is really to allow using larger textures on systems with
more memory, but that bit comes in a later patch in this series.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
2025-01-22 10:09:24 +00:00
Erik Faye-Lund
c205777cb6 panfrost: reuse tiler hierarchy mask selection from panvk
We're doing a better job at selecting the tiler hierarchy mask in PanVK,
so let's move that to common code and reuse it for the Gallium driver as
well.

The logic to disable the first level for large tile-sizes has been left
at the call-sites, because this is specific to V10 GPUs and later, so it
doesn't apply to the JM code-paths.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
2025-01-22 10:09:24 +00:00
Jose Maria Casanova Crespo
bfd29a55e5 v3d: Apply FBO resources invalidations on job creation
We can handle invalidation of the FBO attachments at job
creation. It solves that we were skipping invalidations in jobs
that had been created by a clear call, as before this change
invalidations were only taken into account the first draw calls
of the job. In these cases where there is a clear after FB
invalidation the resource attachment was tracked as invalidated
for more time than expected. So the stores of the job with the
clear were not being loaded by the next job attaching it because
of the not correct application of the invalidation.

Fixes: 6c46890325 ("v3d: avoid load/store of tile buffer on invalidated framebuffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12456
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33148>
2025-01-22 09:31:32 +00:00
Marek Olšák
09aa19fb64 gallium/u_threaded: sort cases in batch_execute by their occurrence
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:28:43 -05:00
Marek Olšák
f8c730158b gallium/u_threaded: inline all tc_call functions
There are no calls anymore. It's just a loop with a switch now, which should
be implemented as a jump table by the compiler. The only calls are to
the pipe_context functions.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
3692a50398 gallium/u_threaded: replace the function table with a switch and direct calls
gcc should generate a jump table for the switch, so it should be faster than
indirect calls after we inline the calls in the next commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
c2983d93da gallium/u_threaded: use TC_END_BATCH to terminate the loop
TC_END_BATCH (TC_NUM_CALLS) is always present as the batch terminator,
so use it

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
1776a12949 gallium/u_threaded: make the execute function table private
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
8f4173cadf gallium/u_threaded: move tc_batch_execute after all call functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
bdd85c8393 nir: remove handling IO variables from passes used by st/mesa
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
2c5deaa98b st/mesa: inline st_finalize_nir_before_variants
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
02516ff0f9 nir: remove dead code due to IO being always lowered in st/mesa
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
f29530533c glsl: simplify nir_lower_io_to_temporaries logic
no change in behavior

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
b7c4a1479e glsl: remove dead code due to IO being always lowered
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
000679b9bf st/mesa: remove dead/no-op code due to IO being always lowered
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
3e32ea3232 st/mesa: assert that all incoming shaders use lowered IO
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Valentine Burley
aa37e2e5cb android/ci: Build ANV for Android
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33132>
2025-01-22 01:15:22 +00:00
Valentine Burley
b53d09a417 android/ci: Allow specifying Vulkan driver in cuttlefish-runner.sh
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33132>
2025-01-22 01:15:22 +00:00
Iván Briano
de244bcdb0 vulkan: calculate remaining layers of 2d view of 3d image correctly
When a 2D_ARRAY view of a 3D image is created, the layer count of the 2D
view should be based on the depth of the 3D image. When
VK_REMAINING_ARRAY_LAYERS is used, we were incorrectly calculating them
from the layer count of the base image.

Fixes future tests: dEQP-VK.renderpass*.remaining_array_layers.*

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33075>
2025-01-22 00:33:16 +00:00
Matt Turner
c9007999f6 elk: Pass number and sizeof separately to calloc
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
82330eca3c elk: Bounds check access to p->store
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
262546eb0b elk: Pass brw_codegen to next_offset
In the next commit we will use this to assert that we are not reading
past the end of `p->store`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
7c6f4a6041 elk: Avoid reading past the end of p->store
On the last iteration of the loop, `offset` will point to the location
just beyond the last instruction in the program. If the program exactly
fills `p->store` then calling `next_offset()` will read out of bounds.

Instead just let the inner while loop call `next_offset()` one
additional time.

Fixes: a35b9cb625 ("i965: Add annotation data structure and support code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12486
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
88fd100f97 brw: Pass number and sizeof separately to calloc
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
21bb7785bb brw: Bounds check access to p->store
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:55 +00:00
Matt Turner
ab037b5daf brw: Pass brw_codegen to next_offset
In the next commit we will use this to assert that we are not reading
past the end of `p->store`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:55 +00:00
Matt Turner
a4f0a96dda brw: Avoid reading past the end of p->store
On the last iteration of the loop, `offset` will point to the location
just beyond the last instruction in the program. If the program exactly
fills `p->store` then calling `next_offset()` will read out of bounds.

Instead just let the inner while loop call `next_offset()` one
additional time.

Fixes: a35b9cb625 ("i965: Add annotation data structure and support code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12486
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:55 +00:00
Rob Clark
27284d14fd tu: Fix raytracing query with vdrm
Need to query the cap _before_ we close the connection.

Fixes: 4a5b234d5e ("tu: Plumb through raytracing fuse")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33139>
2025-01-21 21:51:22 +00:00
Xaver Hugl
9f0567b2ab vulkan/wsi: unset GAMMA_LUT, CTM and DEGAMMA_LUT when doing a modeset
Another drm master may have previously set these to non-zero values, which
can change the image in undesired ways.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32670>
2025-01-21 21:09:16 +00:00
Georg Lehmann
ee5017a0fa nir/opt_algebaric: convert fadd(a, a) to a * 2.0
On AMD, this is a clear win. 2.0 is a free constant,
the multiplication can be fused into fma, or it can
be done as a free output modifier. Otherwise, fmul
and fadd have the same throughput/latency, with the only
possible downside being potentially power consumption.

For other hardware this might not be as clear,
but we should at least choose one option for NIR because
it allows more CSE.

Foz-DB Navi21:
Totals from 12231 (15.41% of 79395) affected shaders:
MaxWaves: 309068 -> 309032 (-0.01%)
Instrs: 11826395 -> 11790132 (-0.31%); split: -0.31%, +0.00%
CodeSize: 63531496 -> 63512868 (-0.03%); split: -0.03%, +0.00%
VGPRs: 551256 -> 551328 (+0.01%); split: -0.00%, +0.02%
SpillSGPRs: 984 -> 979 (-0.51%)
Latency: 88486492 -> 88394296 (-0.10%); split: -0.11%, +0.01%
InvThroughput: 22360595 -> 22300790 (-0.27%); split: -0.27%, +0.00%
VClause: 226267 -> 226273 (+0.00%); split: -0.01%, +0.01%
SClause: 293820 -> 293783 (-0.01%); split: -0.02%, +0.00%
Copies: 727187 -> 727106 (-0.01%); split: -0.03%, +0.02%
PreSGPRs: 539623 -> 539625 (+0.00%)
PreVGPRs: 440843 -> 440946 (+0.02%); split: -0.00%, +0.03%
VALU: 8324962 -> 8288809 (-0.43%); split: -0.43%, +0.00%
SALU: 1278550 -> 1278538 (-0.00%); split: -0.00%, +0.00%
VMEM: 440600 -> 440599 (-0.00%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32989>
2025-01-21 20:28:04 +00:00
Marek Olšák
43d3451fdb mesa: switch fixed-func vertex program to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
2025-01-21 19:38:54 +00:00
Marek Olšák
3290222a1a st/mesa: move VS & TES output stores to the end before unlowering IO
required by vc4 & vc5

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
2025-01-21 19:38:54 +00:00
Marek Olšák
b65973240c nir: add a pass that moves output stores to the end of the shader
required by vc4 & vc5 to merge the rest of the lowered IO code for st/mesa

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
2025-01-21 19:38:54 +00:00
Rob Clark
15ada70677 freedreno/pps: Fix multiple counter collection runs
The drm device file is closed and re-opened between perfetto traces.  So
we either need to re-create the fd_device, or use fd_device_new_dup() so
we hold on to our own fd.  The former is preferred so that the kernel
can realize when we are no longer reading the perfcntrs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33073>
2025-01-21 18:23:52 +00:00
Caio Oliveira
fb09dac988 intel/brw: Remove 'fs' prefix from reg alloc code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33112>
2025-01-21 07:33:49 -08:00
Caio Oliveira
62dd470d0a intel/brw: Rename brw_fs_reg_allocate.cpp to brw_reg_allocate.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33112>
2025-01-21 07:33:49 -08:00
Pierre-Eric Pelloux-Prayer
40308ef6e5 egl/wayland: validate dri_screen_display_gpu before use
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12370
Fixes: d795b4712c ("egl/wayland: only supply LINEAR modifier when supported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:14 +00:00
Pierre-Eric Pelloux-Prayer
1021d6fe62 dri: deal with ARGB1555
This helps fixing "glx-visuals-... -pixmap" which uses this
format.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Pierre-Eric Pelloux-Prayer
910c18df6c dri: use _checked variants of xcb requests
Requests with no reply will report errors by default to the event
loop, which then usually cause the not very useful log like this
to be printed:

X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  149 ()
  Minor opcode of failed request:  2
  Serial number of failed request:  33
  Current serial number in output stream:  34

This commit introduce some helpers to handle the xcb errors in Mesa,
and be able to report errors properly.
For instance the same error will now log:

MESA: error: dri3_alloc_render_buffer:1634 xcb_dri3_pixmap_from_buffer[s] failed
MESA: error: X error: 11

It's not fixing the underlying issue, but at least now tests like
"glx-visuals-stencil -pixmap" and "glx-visuals-depth pixmap" fail
properly.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Pierre-Eric Pelloux-Prayer
b307951648 glx: fix glx-create-context-invalid-es-version
* GLES3.x is only valid for x <= 2
* The expected error is GLXBadProfileARB, not BadValue

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Martin Roukala (né Peres)
e536ed0824 freedreno/ci: use the boot watchdog to ensure the a750 boots
This allows us to drop the reboot condition on SaharaMode which means
that every time the reboot pattern is hit, it is due to a test
execution issue (GPU hang) and not something unrelated to the job.

Additionally, this allows us to try booting up to 5 times which should
help boot reliability.

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/32572>
2025-01-21 12:46:31 +00:00
Martin Roukala (né Peres)
047d3953ee ci/b2c: allow defining a boot watchdog
This will be helpful for DUTs that do not boot reliably due to firmware
issue as it will allow us to specify a boot retry count that only
counts towards booting linux and not other issues found during test
execution (like hitting a GPU hang).

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/32572>
2025-01-21 12:46:31 +00:00
Martin Roukala (né Peres)
82557f9141 ci/b2c: use the runner description rather than ID
Gitlab's runner ID is an integer while CI-Tron's is a string. Let's use
the runner description in the job description since this is what
CI-Tron expects.

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/32572>
2025-01-21 12:46:31 +00:00
Marek Olšák
de790c3c5f Revert "ac/llvm: enable wqm for ac_build_quad_swizzle from ac_build_fs_interp_mov"
This reverts commit 9d4d9e6150.

It breaks on Navi31:
  * KHR-GL46.shaders.uniform_block.instance_array_basic_type.shared.bvec3,Fail
  * KHR-GL46.shaders.uniform_block.instance_array_basic_type.std140.bvec3,Fail
  * KHR-GL46.shaders.uniform_block.random.all_per_block_buffers.13,Fail
  * KHR-GL46.shaders.uniform_block.random.all_per_block_buffers.3,Fail
  * KHR-GL46.shaders.uniform_block.single_basic_array.shared.bvec3,Fail
  * KHR-GL46.shaders.uniform_block.single_basic_array.std140.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.instance_array_basic_type.shared.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.instance_array_basic_type.std140.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.random.all_per_block_buffers.13,Fail
  * KHR-GLES3.shaders.uniform_block.random.all_per_block_buffers.3,Fail
  * KHR-GLES3.shaders.uniform_block.single_basic_array.shared.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.single_basic_array.std140.bvec3,Fail
  * dEQP-GLES3.functional.ubo.instance_array_basic_type.shared.bvec3_both,Fail
  * dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.bvec3_both,Fail
  * dEQP-GLES3.functional.ubo.random.vector_types.24,Fail
  * dEQP-GLES3.functional.ubo.single_basic_array.shared.bvec3_both,Fail
  * dEQP-GLES3.functional.ubo.single_basic_array.std140.bvec3_both,Fail

Fixes: 9d4d9e6150
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33118>
2025-01-21 11:58:37 +00:00
Samuel Pitoiset
f4cd2d1c3f radv: use global atomics for generated/written primitives query on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
0901f8fc25 radv: emit the shader buffer query VA on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
2f86338ba3 radv: allocate memory for the shader query buffer on GFX12
The allocation is done on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
15a69991fe radv: lower emulated queries with global atomics on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
a2069b1b26 radv: declare a new user SGPR for emulating queries on GFX12
GDS is gone on GFX12 and generated/written primitives queries need to
be emulated using global atomics. This new user SGPR will be used to
pass the 32-bit VA of the shader query buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
b942e285c3 radv: fix transform feedback on GFX12
The original implementation based on RadeonSI was broken for
pause/resume and for indirect draws with a counter buffer basically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33017>
2025-01-21 08:05:20 +00:00
Samuel Pitoiset
1f253700bc radv: do not overallocate the number of exports for streamout on GFX12
This shouldn't be needed because GE_GS_OREDERD_ID is always reset to 0
when streamout is started. Thus it's technically impossible that the
ordered ID is more than 12-bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33017>
2025-01-21 08:05:19 +00:00
Samuel Pitoiset
d4ff011b12 radv: advertise VK_KHR_maintenance8
There is nothing to do for
VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR because
the vulkan/runtime code already locks the dstCache unconditionally.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33091>
2025-01-21 07:28:14 +00:00
Samuel Pitoiset
40131ddadc radv: adjust the source aspect for color to depth/stencil image copies
The opposite is already supported. Note that only one aspect (depth or
stencil) is supported when it's a copy<->depth/stencil copy, and
multiplanar images aren't supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33091>
2025-01-21 07:28:14 +00:00
Samuel Pitoiset
3be1e9ee4d radv: add support for VkMemoryBarrierAccessFlags3KHR
There is no flags yet.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33091>
2025-01-21 07:28:14 +00:00
Patrick Lerda
e802793dd5 r600: fix r600_init_screen_caps() has_streamout issue
Indeed, has_streamout is not yet properly initialized at the time
of the call of r600_init_screen_caps(). This change fixes this
issue.

Here is the issue visible on palm at the glxinfo level; the right column is affected:
    Preferred profile: core (0x1)	      |	    Preferred profile: compat (0x2)
    Max core profile version: 4.5	      |	    Max core profile version: 0.0
    Max compat profile version: 4.5	      |	    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1		    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1	      |	    Max GLES[23] profile version: 2.0

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/33106>
2025-01-21 01:46:26 +00:00
Samuel Pitoiset
efab1885b7 ac/sqtt: update programming SQTT on GFX12
This is pure guess but I think GFX12 now uses 48-bits VAs for
configuring the SQTT buffer. This isn't yet enough to generate a
capture because it's missing some info I don't know, but it's a start.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33068>
2025-01-20 23:50:10 +00:00
Samuel Pitoiset
05bfa317a0 radv: remove duplicate definition of SQTT_BUFFER_ALIGN_SHIFT
It's already defined in ac_sqtt.h.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33068>
2025-01-20 23:50:10 +00:00
Karol Herbst
e9d4030fb7 trace: add get_compute_state_info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33119>
2025-01-20 23:15:31 +00:00
Karol Herbst
f77fea3ba8 trace: copy pipe_caps
Otherwise they are all 0 and frontends might be misbehaving a lot.

Fixes: a036231c09 ("gallium: add u_init_pipe_screen_caps")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33119>
2025-01-20 23:15:31 +00:00
Mike Blumenkrantz
48d0a0322f glsl: plumb num_views down to shader_info::view_mask
this is needed for drivers to more effectively compile multiview-enabled
shaders

Reviewed-by: Timothy Arceri <tarceri@itqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33016>
2025-01-20 22:43:23 +00:00
Danylo Piliaiev
732101d609 tu: Do not disable LRZ for whole RP if it is disabled in RP
It's not rare when only last few draws in a big renderpass disable
LRZ, we shouldn't bail out in such case.

If LRZ is disabled in dir tracking bit during binning - LRZ would
be disabled for the whole IB in the tiling step, so we should avoid
disabling via dir tracking bit and track the state inside the driver.
This doesn't work with secondary command buffers (and renderpass
resume/suspend), in such cases we have to disable LRZ via dir tracking
bit, if LRZ is not valid.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
d6684aedf4 tu: Track at which draw call LRZ is disabled
Aside from displaying in a tracepoint, it would be useful in order
to decide whether to disable LRZ for the whole renderpass.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
33083d580a freedreno,tu: Unify LRZ layout calculations
Now with nolrzfc the memory for fast-clear will be allocated but
fast-clear itself will not be used.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
5a4b28e77c tu: Handle 8x MSAA for LRZ
Fixes: be9f2e5189
("tu/a7xx: support 8x MSAA")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
1eee114756 tu: Fix LRZ for arrayed depth
It just didn't work at all.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
a521253a3f freedreno/regs: Set correct shr for GRAS_LRZ_BUFFER_PITCH.ARRAY_PITCH
CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
7dee7956f2 tu: Do not re-calculate static blend LRZ state
If blend LRZ state was already calculated from static info,
re-calculating it with dynamic state would bring stale values
and therefor result in a wrong calculations.

This resulted in LRZ being disabled when it should have not in
native VK titles.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Job Noorman
20cb4eeba6 ir3/ra: allocate shared collects dst over its srcs when possible
Currently, when allocating the dst of shared collects, the registers of
its srcs would only be reused if they are killed. This results in a lot
of needless moves due to suboptimal register allocation.

This commit addresses this generically: allow unavailable registers to
be used for a new dst iff it shares a merge set with, and has the same
offset as, the currently live value.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32021>
2025-01-20 21:35:39 +00:00
Job Noorman
6c776793ba ir3/ra: fix non-trivial collect detection
Detecting non-trivial collects after the fact, i.e., once they are
created by a register assignment of their dst, does not work as this may
cause two different intervals to share a physreg. For example:

_meta:collect sssa_361:150(r50.x) (wrmask=0xf),
              sssa_19:12(r50.x), sssa_103:13(r50.y),
              sssa_355:102(r51.z), sssa_356:103(r51.w)

This is a non-trivial collect with a partial overlap with one of its
child intervals. After moving its dst to a new interval, it will have
the same physreg as the existing interval for sssa_19, causing all sorts
of trouble for RA.

Prevent this by detecting that a future collect may become non-trivial
at the moment one of its sources gets a register assignment that does
not correspond with it merge set's preferred reg and allocating a new
interval for this component.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: b36a7ce0f1 ("ir3/ra: prevent moving source intervals for shared collects")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32021>
2025-01-20 21:35:39 +00:00
Aleksi Sapon
43ff387aa6 llvmpipe: disable anisotropic filtering for non-2D textures
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33103>
2025-01-20 21:01:36 +00:00
Samuel Pitoiset
fd8ed50812 zink/ci: add lists for RADV/GFX1200
Copied from NAVI31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33125>
2025-01-20 20:40:54 +00:00
Samuel Pitoiset
de9d8a23d2 radv: add a helper to report if cooperative matrix is enabled
To avoid duplicating checks.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33120>
2025-01-20 13:58:13 +00:00
Yogesh Mohan Marimuthu
bfa6b9b655 winsys/amdgpu: ensure strict order in updating mqd wptr and doorbell
Need to use mfence to strictly order mqd wptr update and ringing doorbell
in cpu. If the compiler or cpu re-orders it, commands will be missed.

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/32700>
2025-01-20 09:28:10 +00:00
Yogesh Mohan Marimuthu
57f28ad47f winsys/amdgpu: use next_wptr as cache for userq
The userq packets are added using _pkt_begin(), _pkt_add(), _pkt_end()
functions. As of now _pkt_being() and _pkt_add() is called once. It
is not advisible to update wptr value in mqd multiple times. Hence use
next_wptr as cache in the macros and update mqd mptr before job submission
only once.

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/32700>
2025-01-20 09:28:10 +00:00
Yogesh Mohan Marimuthu
acbfcb4d36 winsys/amdgpu: ring doorbell before calling userq_signal ioctl
The signal ioctl should only be called after guaranteeing that the hardware
started working on the submissions and that is only after doorbell is ringed.

Otherwise it can in theory happen that the application creates the fence and
is then interrupted before ringing the doorbell. That can result in a GPU
reset because the fence times out.

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/32700>
2025-01-20 09:28:10 +00:00
Ivan Avdeev
14e3231b56 radv: add a flag to indicate ray tracing support
Determine whether the device has hardware raytracing support early, and
then use this result where needed, instead of checking for `gfx_level`
every time.

This is a prerequisite for CYAN_SKILLFISH chip enablement. This chip is
still GFX10, not GFX10_3, but has hardware support for accelerated
`image_bvh{,64}_intersect_ray` instructions. Just checking for `gfx_level`
is insufficient for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33109>
2025-01-20 08:27:11 +00:00
Connor Abbott
cc7be2b2b3 ir3: Use nir_split_struct_vars for temporaries
This should let us lower the RT query stack to registers instead of
scratch by getting rid of the rest of the members of the ray query
struct. This gives a 24% decrease in total time for 3DMark InVitro.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
f3f0c5048d tu, ir3: Implement a750 RT workaround
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
967ea4bbbb tu: Expose VK_KHR_ray_tracing_maintenance1
All of the features were already implemented in the initial bringup.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
36e46b4ada tu: Support VK_KHR_ray_query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
671e3a65a6 tu: Support VK_KHR_acceleration_structure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
78b5999c1e tu: Display when raytracing is disabled in device string
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
46cd7faed3 tu: Move fd_dev_info() before name generation
Remove the redundant error that will never be hit in practice (because
if fd_dev_name() succeeds then so will fd_dev_info()) and move it up so
that we can use the info when generating the name.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
4a5b234d5e tu: Plumb through raytracing fuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
9249a189ca tu/kgsl: Bump uapi header
From commit 809ee24fe560.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
18550fb41b freedreno: Introduce ray tracing features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
cdb1857a4d tu: Create meta device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
c103d5a05e tu: Add common define for maxTexelBufferElements
I will want to use this HW property elsewhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
80649e148d tu: Implement unaligned dispatches
These will be used for BVH building.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
1bee1a9301 tu/a7xx: Emit HLSQ_CS_LAST_LOCAL_SIZE dynamically
We'll need this to implement unaligned dispatches.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
92f043465d tu: Stop emitting HLSQ_CS_KERNEL_GROUP_*
It's already emitted by CP_EXEC_CS and CP_EXEC_CS_INDIRECT, we were just
setting it to a wrong value before it was overwritten.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
1edeeb3d13 freedreno/a7xx: Document partial workgroup register
This lets us implement "unaligned" dispatches without inserting shader
code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
b8cb00c64a freedreno: Add new a7xx CP_REG_RMW and CP_REG_TO_SCRATCH fields
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
a1235ddba8 freedreno: CP_SCRATCH_WRITE exists on a7xx too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
24a1d54502 tu: Implement buffer_write_cp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
7073a8d458 tu: Implement cmd_fill_buffer_addr internal function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
2d45836c95 ir3: Plumb through ray_intersection intrinsic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
91f19bcbe0 ir3: Plumb through two-dimensional UAV loads
There is native support for D3D-style untyped UAVs, which are an unsized
array of "records."

This will be needed for acceleration structures, because normal SSBO
descriptors aren't large enough to cover all the 128-byte instance
descriptors for the maximum number of instances (2**24).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
b6ae20f2d6 ir3: Support assembling/disassembling ray_intersection and resbase
These instructions are used for ray tracing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
3a5cb40c1f ir3: Allow collect sources to be undef
Undef collect sources will never have a move materialized for them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:22 +00:00
Connor Abbott
c2c48db6a4 vk/bvh: Fix clang build error with turnip
Make sure that struct vk_bvh_geometry_data is defined before
vk_fill_geometry_data(), to fix this error:

In file included from ../src/freedreno/vulkan/tu_acceleration_structure.cc:29:
../src/vulkan/runtime/vk_acceleration_structure.h:138:1: error: 'vk_fill_geometry_data' has C-linkage specified, but returns incomplete type 'struct vk_bvh_geometry_data' which could be incompatible with C [-Werror,-Wreturn-type-c-linkage]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:22 +00:00
Caio Oliveira
793cba0e6f intel/brw: Apply conventions to lower_src_modifiers helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33110>
2025-01-19 08:24:09 -08:00
Timothy Arceri
7d41cfa1a9 glsl: enable layout qualifier if OVR_multiview enabled
OVR_multiview requires 1.30 but makes use of layout qualifier

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/33074>
2025-01-19 01:10:54 +00:00
Caio Oliveira
d7d210fed4 intel/brw: Move shuffle_from_32bit_read implementation to brw_builder
Make it a member function for convenience -- since another
member function uses it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33108>
2025-01-18 20:48:57 +00:00
Caio Oliveira
b3001e4946 intel/brw: Move a few builder helpers to brw_builder.h/cpp
Add brw prefix when necessary.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33108>
2025-01-18 20:48:57 +00:00
Lionel Landwerlin
10a4dc529f blorp: disable PS shaders with depth/stencil HiZ ops
Found on simulation, complaining about SIMD32 shaders enabled when
using MSAA 16x.

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/30753>
2025-01-18 17:52:19 +00:00
Caio Oliveira
1043187ec6 intel/brw: Stop using namespace for brw_builder
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33076>
2025-01-18 16:12:56 +00:00
Caio Oliveira
5ac82efd35 intel/brw: Rename fs_builder to brw_builder
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33076>
2025-01-18 16:12:55 +00:00
Caio Oliveira
f2d4c9db92 intel/brw: Rename brw_fs_builder.h to brw_builder.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33076>
2025-01-18 16:12:54 +00:00
Caio Oliveira
f0fe0026c0 intel/brw: Remove extra wrapping around fs_visitor in tests
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33100>
2025-01-18 07:41:35 -08:00
Konstantin Seurer
70767b9cd4 docs: Add documentation for NIR unit testing
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
01ec2f59a4 nir/print: Do not print trailing spaces after preds/succs
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
6ddd791d6b nir: Add a test runner
The test runner can automatically update reference shaders when the
result changes.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
eb3ab68e5e nir/tests: Add reference shaders
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
8838a0c595 nir/tests: Add a helper for comparing a shader against a string
This allows unit tests to compare against a reference nir shader instead
of implementing checks for interesting instructions/CF nodes.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
6d1d15183f nir/tests: Improve shader creation
Sets some fields so they are not printed and allows specifying a stage.
This decreases the size of reference shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
305be9cf5e nir/print: Print less unused shader info
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Caio Oliveira
94fa449318 intel/brw: Add missing cases to flags_written()
These virtual opcodes will write the whole flag set, either directly
(via brw_fill_flag()) or indirectly by using LOAD_LIVE_CHANNELS.

Issue was found when analysing a hang that would disappear
if the lowering of those opcodes was pulled all the way up
right before brw_opt_cmod_propagation (which uses the
flags_written).

Fixes: 019770f026 ("intel/brw: Add SHADER_OPCODE_VOTE_*")
Fixes: 2bd7592b0b ("intel/brw: Add SHADER_OPCODE_BALLOT")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12347
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12479
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33085>
2025-01-18 05:30:23 +00:00
Samuel Pitoiset
0a4584a684 radv: bump maxViewportDimensions to 32K on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33064>
2025-01-17 21:10:23 +00:00
Mike Blumenkrantz
3d7d303dc5 zink: enable maintenance8
this avoids validation errors from 3d<->2d blits

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33102>
2025-01-17 20:46:43 +00:00
Mike Blumenkrantz
0d29ddb328 lavapipe: maintenance8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Mike Blumenkrantz
c285a2a354 lavapipe: support zs<->color copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Mike Blumenkrantz
00d478d96d lavapipe: abort on unsupported depth copy ops
better than silently failing

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Mike Blumenkrantz
7e8c13ea64 lavapipe: fix 3D->2D blitting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Samuel Pitoiset
2ba91d1deb radv: promote VK_EXT_depth_clamp_zero_one to KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33090>
2025-01-17 19:02:02 +00:00
Lionel Landwerlin
f96e95fcc9 anv: remove print lowering
This is handled by the back compiler.

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/33067>
2025-01-17 18:09:46 +00:00
Lionel Landwerlin
e1074f5bd4 anv: update debug printf example code
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/33067>
2025-01-17 18:09:45 +00:00
Lionel Landwerlin
2603dbd796 nir: make lower-level printf helper respect buffer size
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/33067>
2025-01-17 18:09:45 +00:00
Lionel Landwerlin
58a3ef4160 anv: handle printf buffer size relocations
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/33067>
2025-01-17 18:09:45 +00:00
Lionel Landwerlin
d63b5fc8c5 brw: handle load_printf_buffer_size intrinsic
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/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
c1e685bfe9 util,vulkan,asahi,hk: hash format strings
flag day change to use the new infra. as-is this is a bit pointless, but it
unblocks the new bindgen work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
43e79b26de nir/lower_printf: drop static buffer addr lowering
no longer used, replaced by the new pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
c4bd2e691b agx: defer printf address lowering
this will be needed with vtn_bindgen2

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
07ad850787 nir: add nir_lower_printf_buffer pass
this is a helper for lowering the printf buffer intrinsics to constants for
backend convenience.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
7bc9bbcc6e nir/lower_printf: support dynamic buffer size
this is required for vtn_bindgen2 where we don't know the buffer size until
the driver-specific code paths, but we need to lower printf (to hash format
strings) in common code. so defer the buffer size decision to an intrinsic.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
6db9218ec3 nir/lower_printf: add option to hash format strings
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
dd66287e63 util/u_printf: allow printing from singleton
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
007f60c8b8 util/u_printf: add singleton implementation
Currently, nir_lower_printf depends on a per-nir_shader table, writing out
indices into the printf buffer. This works for real OpenCL implementations
(rusticl, microsoft) which can associate the printf buffer with a particular
kernel, I guess. (Actually it's not clear to me that it works well there either
but that's not my problem.)

This mechanism is unsuitable for internal driver shaders, where printfs with
unique format strings can come from many different nir_shaders. There are two
current solutions in tree to this for driver CL:

* Honeykrisp: Only use one single nir_shader (libagx). This prevents us from
  using printf in common CL and requires extra driver tracking. It won't work
  with my upcoming vtn_bindgen rework, which is why I'm addressing this now.

* Anv: Offset format-string indices by a dynamic "base identifier" using relocs
  or a push constant, then pool format strings into a table from nir_shader's
  across the device. The problem here is that these indices now depend on the
  order that nir_shaders are seen (which causes a mess for caching if relocs are
  used, or requires extra push constants and extra bookkeping if relocs aren't
  used). And the driver tracking required to do this pooling correctly is even
  more complicated than what Honeykrisp does. I do not want every driver in-tree
  needing to go down this path, and it wouldn't work with my upcoming
  vtn_bindgen.

This MR introduces an alternate approach: rather than writing indices into the
table, we instead hash the format string itself and write the hash. That doesn't
depend on what nir_shader we came from, so we can freely mix & match and get
consistent hashes. That greatly alleviates driver tracking burden. To make that
possible, we need a global hash table mapping hashed format identifiers to the
format strings themselves.

That approach still requires a step to "register" format strings into the table.
That step would not be required if we wrote the actual strings themselves into
the table, but that was ruled out for performance/code size reasons. However, we
do not want drivers to need to explicitly register all the strings they use,
because once we have OpenCL in common code via vtn_bindgen2, drivers won't know
all the strings they use. Fortunately, there's a neat solution for that too.

By making this global table a singleton (with internal locking), vtn_bindgen2
can automatically register format strings via a static constructor. In
conjunction with the infrastructure added here, that eliminates all driver
bookkeeping required for format-strings.

The code itself is inspired by the glsl type singleton. Is it pretty? Not
really, but it gets the job done well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
48dbfba17a util: add u_printf_hash helper
for hash-based printf. this just shells out to XXH - convenience wrapper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
e1368f0a30 nir,util: move printf serializing into util
there's nothing NIR specific here and these routines will be useful otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
47e16cab5e nir/lower_printf: drop default max buffer size
no uses and it doesn't make sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
621ff262bc nir/lower_printf: drop null check
we derefernce options above.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
e7a1d704d0 intel: set max_buffer_size to nir_lower_printf
instead of relying on an implicit value which doesn't make much sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Gurchetan Singh
61d66a6ea7 gfxstream: fix some integration bugs
- Fix end2end test target (AOSP-only)
- Fix decoder to use host vk_util.h, not guest
- typo fixes

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33077>
2025-01-17 17:26:45 +00:00
Samuel Pitoiset
78f5dfca86 vulkan: Update XML and headers to 1.4.305
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33089>
2025-01-17 16:42:27 +00:00
Mike Blumenkrantz
667745857d lavapipe: handle VK_REMAINING_ARRAY_LAYERS with HIC
this otherwise goes oob and crashes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33071>
2025-01-17 15:35:09 +00:00
Lu Yao
7679102b45 zink: fix decomposed_attrs val error when zink_vs_key->size is 4
decomposed_attrs and decomposed_attrs_without_w should get from vs->u32
when zink_vs_key->size is 4.

Fixes: 19fbdb9064 ("zink: move shader keys to be persistent on pipeline state")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33079>
2025-01-17 14:51:49 +00:00
Karol Herbst
0b6446efe2 rusticl/mem: use get_res_for_access instead of get_res_of_dev
Fixes multi-device cl_mem support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
2c2c06b93e rusticl/mem: add Allocation::is_user_alloc_for_dev
get_res_of_dev will entirely be reworked, but there is one user only
wanting to know if the allocation is a user_ptr one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
de8b2f108e rusticl/mem: rework last user of get_parent() and remove it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
944f47f103 rusticl/mem: reimplement has_same_parent and rename it to backing_memory_eq
We actually want to know if the backing memory is the same, it's also
easier to implement than checking on the parent memory object.

This will also allow for more flexibility if more memory types are
supported, e.g. proper SVM allocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
787d3b0ffc rusticl/mem: add Allocation type
This will handle the raw memory operations in the future, mostly focused
on guaranteeing consistency across devices.

It also handles sub allocation because it is the better place of tracking
this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:38 +00:00
Karol Herbst
e118fb6492 rusticl/mem: simplify is_svm implementation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:38 +00:00
Karol Herbst
e74ad38204 rusticl/device: add unsynchronized mapping functions to helper context
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:38 +00:00
Zan Dobersek
0cf29bf0ce freedreno/a7xx: fix fd_lrzfc_layout
Various vkd3d-proton tests run via Turnip exposed an issue with the
a7xx-specific instantiation of the fd_lrzfc_layout struct used to allocate
memory for LRZ fast-clear operations.

The correct layout is quite bigger in size, and the duplicated FC buffers
are positioned at the beginning and the end of it. Smaller part of the area
in the middle is used for metadata, but it already seems to be used more
extensively than how we currently understand it.

Fixes in vkd3d-proton on tu/a750:
  test_clear_depth_stencil_view
  test_copy_texture
  test_early_depth_stencil_tests

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/33080>
2025-01-17 13:32:38 +00:00
Caleb Callaway
aae9a2c399 docs: clarify ASPM performance tips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33052>
2025-01-17 13:21:38 +00:00
Valentine Burley
de6f654b60 pan/ci: Document some flakes
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33086>
2025-01-17 12:50:20 +00:00
Erik Faye-Lund
90d5366b2a pan/ci: drop empty trailing variables-list
This job is somehow failing to expand $RUNNER_TAG, and it seems to have
happened around the time that the last entry from the variables list was
removed.

Let's remove this, it's no longer needed anyway. And it seems to fix the
problem, so yay.

Fixes: 61d9c47944 ("ci/lava: Use CI_JOB_TIMEOUT instead of separate variable")
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33086>
2025-01-17 12:50:20 +00:00
Vignesh Raman
3f8046fd3e ci: export RESULTS_DIR in crosvm-script.sh
Export the RESULTS_DIR environment variable in crosvm-script.sh
to ensure it points to the correct directory. Without this,
artifacts are not generated because the results directory is
created in the wrong location after the directory changes in the VM.

Also fix https://www.shellcheck.net/wiki/SC2129 shellcheck error.

Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33023>
2025-01-17 12:08:49 +00:00
Erik Faye-Lund
2f168fe92c docs/features: mark panfrost as supporting GL_OES_texture_view
We've been supporting this for a while, let's make sure it's documented
correctly.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33057>
2025-01-17 12:00:14 +00:00
Erik Faye-Lund
1e8a017de3 docs/features: add a few missing extensions
Here's a few extensions we've forgotten to report in features.txt

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33057>
2025-01-17 12:00:14 +00:00
Samuel Pitoiset
c84b1dda0b ac/nir: fix skipping streamout when no buffers are bound on GFX12
RadeonSI compiles shader variants with streamout disabled but RADV
doesn't do that. The alternative solution is to set the streamout
buffer size to 0 to indicate that streamout isn't bound.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33058>
2025-01-17 11:24:55 +00:00
Samuel Pitoiset
ede0d534ef radv: add GFX12 support to the null winsys
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33063>
2025-01-17 10:51:49 +00:00
Erik Faye-Lund
3f8a524c20 pan/ci: add some occasional flakes
Seen here:
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69214799
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69214804
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69355263
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69431828
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69487494
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69487495

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33028>
2025-01-17 10:27:21 +00:00
Pierre-Eric Pelloux-Prayer
3842d10dd7 radeonsi: do not use std::max
Use MAX2 and abs to avoid build failures on some platforms.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12434
Fixes: dc293ffe50 ("radeonsi: fallback to util_blitter_draw_rectangle")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
9d4d9e6150 ac/llvm: enable wqm for ac_build_quad_swizzle from ac_build_fs_interp_mov
Without this, WQM is only used for the lds_param_load like this:

   s_wqm_b64 exec, exec
   lds_param_load v5, attr0.x wait_vdst:15
   s_mov_b64 exec, s[0:1]
   v_mov_b32_dpp v5, v5 quad_perm:[0,0,0,0] row_mask:0xf bank_mask:0xf

With this change we get:
   s_wqm_b64 exec, exec
   lds_param_load v5, attr0.x wait_vdst:15
   s_mov_b64 exec, s[0:1]
   ...
   s_wqm_b64 exec, exec
   v_mov_b32_dpp v5, v5 quad_perm:[0,0,0,0] row_mask:0xf bank_mask:0xf
   s_mov_b64 exec, s[0:1]

This fixes KHR-GL46.shaders.uniform_block.random.nested_structs_instance_arrays.0
and other similar tests with LLVM.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
182d662ccf ac/llvm: add wqm param to ac_build_quad_swizzle
And to ac_build_dpp because it's used from quad_swizzle.

No functional changes but will be used in the next commit.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
b4e94cf421 ttn: init source_blake3 and name from tgsi_shader_info
All TTN shaders have the same name ('TTN') and the same empty blake3.
Having a unique name and blake3 makes it easier to distinguish them
when using NIR_DEBUG=print...

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
59a3f38ff6 radeonsi: clear the debug callback on ctx destroy
The debug callback depends on the context to operate properly,
so we need to clear it on destroy to avoid a use-after-free.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12035
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Georg Lehmann
71cb394b02 aco: implement some more std::vector functions for small_vec
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
Georg Lehmann
31de188bc2 aco: support less trivial component types in small_vec
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
Georg Lehmann
15cba08db0 aco: guard small_vector move/copy operator against self assignment
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
David Rosca
3c7c059cee radeonsi: Enable implemented VCE/UVD encode features
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
b6b5261f4c radeonsi/uvd_enc: Set input pic swizzle mode on GFX9
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
73657d4246 radeonsi/uvd_enc: Support raw packed headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
da9de889aa radeonsi/uvd_enc: Support dynamic rate control changes
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
186980de26 radeonsi/uvd_enc: Support min/max QP and max frame size
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
035adff0e2 radeonsi/uvd_enc: Support temporal layer rate control
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
7b1210a026 radeonsi/uvd_enc: Support intra refresh
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
8a2266ab0b radeonsi/uvd_enc: Support slice encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
dac4e4bd6a radeonsi/uvd_enc: Support quality presets
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
d4d4a64168 radeonsi/uvd_enc: Support VBAQ
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
89d43c0fd3 radeonsi/uvd_enc: Support Pre-Encode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
7570311269 radeonsi/uvd_enc: Consider input surface size for padding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
1f5e857d85 radeonsi/uvd_enc: Use app DPB management
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
98f711859d radeonsi/uvd_enc: Rework DPB allocation
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
ccb450b91c radeonsi/uvd: Set decode target swizzle mode on GFX9
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
4cf46ac9d0 radeonsi/uvd: Optimize bitstream buffer resizing
Only resize the buffer once and avoid copy if the buffer is empty.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f51de3f064 radeonsi/uvd: Stop clearing decode internal buffers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
9ca1cda2be radeonsi/vce: Cleanup
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
16571a2f6c radeonsi/vce: Set input pic swizzle mode on GFX9
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
901aafb030 radeonsi/vce: Support raw packed headers
Same logic as VCN, but this also needs PPS/SPS encoding.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f13c5fe53e radeonsi/vce: Support intra refresh
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f05acb6703 radeonsi/vce: Support min/max QP and max frame size
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
544a180320 radeonsi/vce: Support quality presets
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
683766eebc radeonsi/vce: Support VBAQ
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
880811ad80 radeonsi/vce: Support slice encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
ffd2cbf2a7 radeonsi/vce: Use app DPB management
Same logic as VCN, we use max_num_ref_frames + 1 for initial DPB size
and resize later if needed.

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
b22913cbd5 radeonsi/vce: Move dual pipe context to offset 0 of CPB
Needed to allow dynamically growing CPB.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
4d2a8ddeb8 radeonsi/vce: Set more header params
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1404
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
104f9c6654 radeonsi/vce: Remove support for FW 50 and older
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
6510c3d75f radeonsi: Add radeon_bitstream and use it in radeon_vcn_enc
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:04 +00:00
Qiang Yu
b72fde55ae etnaviv: remove min/max_texture_gather_offset init
u_init_pipe_screen_caps() init them with same value already.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
aaf1174fd3 radeonsi: remove si_screen.max_texel_buffer_elements
It seems to be a cache of the PIPE_CAP before, now we
use pipe_caps access, no need for it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
6c95232069 gallium,mesa: remove uint surffix from pipe_caps
We use explicit type now, no need for these surffix to
indicate the implicit type of the fields.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e5041ef036 docs,src: replace doc and comments for PIPE_CAP with pipe_caps
Use command:
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAP_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAPF_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +

With manual adjustment for docs/gallium/screen.rst to merge
pipe_cap and pipe_capf section.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e7873a3abd gallium: remove get_param and get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
fe1d5d55f1 zink: remove zink_get_param and zink_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
ae12e6b325 virgl: remove virgl_get_param and virgl_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e0665c7855 vc4: remove vc4_screen_get_param and vc4_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
901ce3fceb v3d: remove v3d_screen_get_param and v3d_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
dcc3d8097b tegra: remove tegra_screen_get_param and tegra_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
1d17d5501d svga: remove svga_get_param and svga_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
6c17eab006 softpipe: remove softpipe_get_param and softpipe_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
10c9129139 radeonsi: remove si_get_param and si_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
22516c4a71 r600: remove r600_get_param and r600_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
f64ac3cabb r300: remove r300_get_param and r300_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
971645b558 panfrost: remove panfrost_get_param and panfrost_get_paramf
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/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
ced577b32e nouveau/nvc0: remove nvc0_screen_get_param and nvc0_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
43a008bb54 nouveau/nv50: remove nv50_screen_get_param and nv50_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
47f5458849 nouveau/nv30: remove nv30_screen_get_param and nv30_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
d7bd544a18 llvmpipe: remove llvmpipe_get_param and llvmpipe_get_paramf
Reviewed-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/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
ec30fff0d5 lima: remove lima_screen_get_param and lima_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9a06c6c321 iris: remove iris_get_param and iris_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
3465d008e1 i915: remove i915_get_param and i915_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
3a7c519361 freedreno: remove fd_screen_get_param and fd_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
efdbd4c84c etnaviv: remove etna_screen_get_param and etna_screen_get_paramf
Reviewed-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/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
90594a00a9 d3d12: remove d3d12_get_param and d3d12_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
90be460e05 crocus: remove crocus_get_param and crocus_get_shader_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
37ac138273 asahi: remove agx_get_param and agx_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
104c6b28b3 rusticl: use pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
45123ee4d5 gallium,mesa: replace get_paramf with pipe_caps access
With command:
  find . -path "./.git" -prune -o -type f -exec sed -i ':a;N;$!ba;s/->get_paramf([^,]*,[[:space:]]*PIPE_CAPF_\([^)]*\))/->caps.\L\1/g' {} +

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
ef0b6f8262 egl,gallium,gbm,mesa: replace get_param with pipe_caps access
Use command:
  find . -path "./.git" -prune -o -type f -exec sed -i ':a;N;$!ba;s/->get_param([^,]*,[[:space:]]*PIPE_CAP_\([^)]*\))/->caps.\L\1/g' {} +

And some manual adjustment.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
b2caa48ec9 mesa/st: enable extension use pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
e5e5af05ea egl,gallium,glx: replace dri_get_screen_param with pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
aa9fa085fe nine: change cap macros to use pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
5c0d4a6225 zink: add zink_init_screen_caps
It's one-one map of zink_get_param and zink_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9c5b1249cd virgl: add virgl_init_screen_caps
It's one-one map of virgl_get_param and virgl_get_param.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
763194db00 vc4: add vc4_init_screen_caps
It's one-one map of vc4_screen_get_param and vc4_screen_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
efe9cc8c82 v3d: add v3d_init_screen_caps
It's one-one map of v3d_screen_get_param and v3d_screen_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9d7578d0b2 tegra: init screen caps
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9043f69342 svga: add svga_init_screen_caps
It's one-one map of svga_get_param and svga_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
d9e569e3c9 softpipe: add softpipe_init_screen_caps
It's one-one map of softpipe_get_param and softpipe_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
dab60edff9 radeonsi: add si_init_screen_caps
It's one-one map of si_get_param() and si_get_paramf().

Move has_draw_indirect_multi calculation before
si_init_screen_caps to be used by later.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
7cd606f01b r600: add r600_init_screen_caps
It's one-one map of r600_get_param() and r600_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
850c4281c3 r300: add r300_init_screen_caps
It's one-one map of r300_get_param() and r300_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
205669e3a9 panfrost: add panfrost_init_screen_caps
It's one-one map of panfrost_get_param() and panfrost_get_paramf().

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/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
aa239fd52d nouveau/nvc0: add nvc0_init_screen_caps
It's one-one map of nvc0_screen_get_param() and
nvc0_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
5a3f23f589 nouveau/nv50: add add nv50_init_screen_caps
It's one-one map of nv50_screen_get_param() and
nv50_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
b12fef1933 nouveau/nv30: add nv30_init_screen_caps
It's one-one map of nv30_screen_get_param and nv30_screen_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
6b9252538f llvmpipe: add llvmpipe_init_screen_caps
It's one-one map of llvmpipe_get_param() and llvmpipe_get_paramf().

Reviewed-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/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
cb6eb16ca5 lima: add lima_init_screen_caps
It's one-one map of lima_screen_get_param() and
lima_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
ad8b03e762 iris: add iris_init_screen_caps
It's one-one map of iris_get_param() and iris_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
f1933a38b8 i915: add i915_init_screen_caps
It's one-one map i915_get_param() and i915_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
08f96c0eaf freedreno: add fd_init_screen_caps
It's one-one map of fd_screen_get_param() and
fd_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
68e3be1ea8 etnaviv: add etna_init_screen_caps
It's one-one map of etna_screen_get_param() and
etna_screen_get_paramf().

Reviewed-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/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
06b4fd1682 d3d12: add d3d12_init_screen_caps
It's one-one map of d3d12_get_param() and d3d12_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
2c38fe1769 crocus: add crocus_init_screen_caps
It's one-one map of crocus_get_param() and crocus_get_paramf()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
01b5ac8337 asahi: add agx_init_screen_caps
It's one-one map of agx_get_param() and agx_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
a036231c09 gallium: add u_init_pipe_screen_caps
This is a one-one map of u_pipe_screen_get_param_defaults.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
9f208a5308 gallium: add pipe_caps struct definition
one-one map of pipe_cap enum.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Benjamin Lee
b3d1130d5d panvk: disable round_to_nearest_even for NEAREST-filtered samplers
As described in the comment, enabling the round_to_nearest_even results
in the upper 2^-9 of the texel i being sampled at i+1. This appears to
be allowed by the spec, but triggers a CTS bug[1]. Changing this behavior
is not necessary (we could fix the CTS), but is desirable regardless
because of the precision improvement.

[1]: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5547

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32985>
2025-01-17 03:59:39 +00:00
Erik Faye-Lund
4e58029dc0 pan/va: fix base-level for nir_texop_lod
The documentation says that if we don't use force_delta, the LOD will be
-infinity for non-active lanes before bias and clamp are applied. This
is not what we want, so let's instead assume all threads are active, and
let helper-invocations do their job to compute correct values.

While this is only needed for the second iteration, let's just leave it
on for both for simplicity.

Fixes: e317136536 ("pan/va: Add support for nir_texop_lod")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33069>
2025-01-17 02:48:06 +00:00
Valentine Burley
a0de5e7d02 ci: Fix trace update script reading GitLab token from default location
Update the trace update script to use get_token_from_default_dir for
reading the GitLab token from the default location (~/.config/gitlab-token),
fixing the script and aligning it with our other tools.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33061>
2025-01-17 02:13:05 +00:00
Samuel Pitoiset
4526f2692e radv: mark AMD CDNA as unsupported
No access to the hw and likely broken.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33031>
2025-01-17 01:30:16 +00:00
Samuel Pitoiset
c942d957b0 radv: fail to initialize when the AMD GPU generation is unsupported
Better to be conservative than allowing something that isn't supposed
to be working.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33031>
2025-01-17 01:30:16 +00:00
Caio Oliveira
0b310ae4d8 intel/brw: Rename fs_generator to brw_generator
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32844>
2025-01-17 00:04:41 +00:00
Caio Oliveira
3659934862 intel/brw: Add brw_generator.h header
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32844>
2025-01-17 00:04:41 +00:00
Caio Oliveira
a5a9f42a39 intel/brw: Rename brw_fs_generator.cpp to brw_generator.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32844>
2025-01-17 00:04:41 +00:00
Sathishkumar S
2e36d1f3d0 radeonsi/vcn: enable roi decode and rgb targets on JPEG_5_0_1
JPEG_5_0_1 supports region of interest decode and RGB format conversion

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33004>
2025-01-16 23:41:28 +00:00
Sonny Jiang
5b2de9e593 radeonsi/vcn: Add vcn_5_0_1 support
Add support for AMD vcn_5_0_1

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33004>
2025-01-16 23:41:28 +00:00
Valentine Burley
f7be8e228a turnip/ci: Decrease the fraction on a660-vk-full
With the improved GPU recovery thanks to the new kernel, we can now
complete a full, non-fractioned run on the a660 in just over an hour.
To stay within this runtime, the fractions for the gmem-forced runs
have been increased.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Vignesh Raman
9e7ca3b86a ci: update expectation files
Update expectation files for the test
runs with kernel 6.13-rc4.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Vignesh Raman
af8ab2bb3e ci: Uprev kernel to 6.13
Move to 6.13-rc4 for all mesa-ci jobs except anv-jsl.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Vignesh Raman
ac078768c9 ci: Force db410c to host mode
Force db410c to host mode to fix network issue which results in failure
to mount root fs via NFS.
See https://gitlab.freedesktop.org/gfx-ci/linux/-/commit/cb72a629
https://lore.kernel.org/r/20230911161518.650726-1-vignesh.raman@collabora.com

Use apq8016-sbc-usb-host.dtb which allows the USB controllers
to work in host mode.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Christian Gmeiner
776795f76a v3dv: Add some CPU tracepoints
Add tracepoints for pipeline creations, bo wait and queue submits.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33012>
2025-01-16 22:31:17 +00:00
David Rosca
986f545744 gallium/vl: Fix creating buffers with auxiliary planes
Buffers with compression enabled (eg. DCC) have auxiliary planes that
needs to be all imported, but should not be used to create sampler views
and surfaces.
Only use main planes and ignore the remaining planes.
Also remove vl_video_buffer::num_planes as it's now unused.

Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32893>
2025-01-16 21:11:52 +00:00
Job Noorman
cf87ed60e2 ir3: output early-preamble stat as integer
shaderdb's report.py can only handle integer stats. So instead of
outputting early/late for the preamble stat, output 0/1 for the
early-preamble stat.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 114a47544f ("ir3: Add preamble instr count metric")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33055>
2025-01-16 20:33:45 +00:00
duncan.hopkins
8c743d01c7 zink, kopper: Conitionally add VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT to swap chain imageUsage.
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT is not supported on MacOS for swap chain images and its use is not always needed.

For MoltenVK report PIPE_CAP_FBFETCH as 0 to back this up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32651>
2025-01-16 20:03:23 +00:00
duncan.hopkins
17e5ea118e zink: Avoid optimalDeviceAccess on MoltenVK when creating depth taregts.
MoltenVK fails to create a depth format target if `optimalDeviceAccess`, `info.have_EXT_host_image_copy` and `VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT` are in used.
The specification seems to claim it is not needed if `hic.identicalMemoryLayout` is set, so for a MoltenVK build unset optimalDeviceAccess.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32651>
2025-01-16 20:03:23 +00:00
duncan.hopkins
e630d4fb70 zink: MoltenVk has conditional VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE support.
MoltenVK support for VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE depends on the Metal API version in use. Which is directly related to the MacOS version.
Even if all the correct extensions or Vk versions are supported.

Detect if the feature is supported, assume it is not on MacOS unless told otherwise, and adjust the pipelines to honor this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32651>
2025-01-16 20:03:22 +00:00
Boris Brezillon
373d9df7ce panvk/csf: Add a knob to force texture cache invalidation on RUN_FRAGMENT
Applications tend to forget to describe subpass dependencies, especially
when it comes to write -> read dependencies on attachments. The
proprietary driver forces "others" invalidation as a workaround, and this
invalidation even became implicit (done as part of the RUN_FRAGMENT) on
v13+.

We will consider adding a dri-conf hook for this option in the future,
but for now, let's just keep it as an opt-in debug flag.

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/33056>
2025-01-16 18:14:43 +00:00
Boris Brezillon
c72379e506 panvk/csf: Fix add_memory_dependency() for input attachment access
Input attachment reads are lowered to image reads and thus require
a flush of the read-only L1 caches.

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/33056>
2025-01-16 18:14:43 +00:00
Marek Olšák
ff6e3e9f76 nir: add next_stage param to nir_slot_is_varying & nir_remove_sysval_output
The result of nir_slot_is_varying depends on what the next shader stage is,
and nir_remove_sysval_output uses it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32855>
2025-01-16 16:28:15 +00:00
Pierre-Eric Pelloux-Prayer
1278d5286c radeonsi, radv, virtio: use AMDGPU_GEM_CREATE_VIRTIO_SHARED
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:33 +00:00
Pierre-Eric Pelloux-Prayer
6c0e4a0ece ac/virtio: add virtio-only AMDGPU_GEM_CREATE flag
On the host side virglrenderer creates dmabuf on demand when:
* cpu mapping is requested
* setting up scan out
* sharing buffers between guest processes

On-demand dmabuf creation only works if the ctx that created the
BO still exists and knows about this BO. This assumption works ok for
the first 2 cases, but can break with the last one (and it does cause
issues on Android). eg:
* process A allocates BO and exports it as a guest dmabuf
* process A closes its handle to the BO (-> detach_resource)
* process B imports the guest dmabuf -> this triggers the attach_resource
  function in virglrenderer. If the given resource isn't a
  VIRGL_RESOURCE_FD_DMABUF it'll try to get one... But for this to work,
  process A needs to be used -> this fails because this resource was
  detached from it.

The reason we create dmabuf on demand is to avoid hitting the number of
open file descriptor limit. So to cover the 3rd case, we'll use the
VIRTGPU_BLOB_FLAG_USE_SHAREABLE flag, but try to limit to as few possible
buffers as possible.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:33 +00:00
Pierre-Eric Pelloux-Prayer
6b6340fea1 radv/virtio: disable syncobj timeline support
The virtio-gpu guest kmd reports timelines as supported, so querying
DRM_CAP_SYNCOBJ_TIMELINE as vk_drm_syncobj_get_type() does will return
true.

The native context code on the other hand doesn't support timelines,
and support is disabled in the "ac/virtio: disable timeline_syncobj support"
commit.

Fix the inconsistency by manually disabling timeline support when
info.has_timeline_syncobj is false.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:33 +00:00
Pierre-Eric Pelloux-Prayer
9de728c4d0 radv: enable virtio native context support
No big code changes are needed to support virtio. The main caveat with
radv is about buffer allocations.

Allocating a cpu visible buffer requires the host process (eg qemu) to
create a dmabuf, mmap it, then map the host CPU address into the guest
application CPU address space.

The first issue is about the number of dmabuf created because we
might hit the number of open file limit. The host process limit can
be raised but we would hit the second issue - at least on qemu:
there's a limit on how many sections can be mapped and ultimately
we hit this assert:

   assert(map->sections_nb < TARGET_PAGE_SIZE);

(the third issue is a performance one: these operations have a cost,
and this increases some Vulkan app loading times)

radeonsi is not really affected because it's using pb_slab to
suballocate small buffers from larger ones.
radv on the other hand doesn't, so if an app decides to allocate
lots of cpu visible small buffers, we're likely to fail.

Earlier versions of the amdgpu nctx code had a suballoctor, but it
was removed to simplified the code. It could be restored later; or
radv could be modified to use a suballocator (like anv does AFAICT).

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
612774c4a6 radeonsi: enable virtio native context support
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
2269ea7e2f ac/virtio: disable timeline syncobj support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
dc83195175 ac/virtio: disable userptr and local buffers
They're not supported yet so let's not pretend they are.

In particular use_local_buffers can cause VM_ALWAYS_VALID to be
used, which then prevents the creation of a dmabuf.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
22263616ed amd: amdgpu-virtio implementation
Native context support is implemented by diverting the libdrm_amdgpu functions
into new functions that use virtio-gpu.
VA allocations are done directly in the guest, using newly exposed libdrm_amdgpu
helpers (retrieved through dlopen/dlsym).

Guest <-> Host roundtrips can be expensive so we try to avoid them as much as
possible. When possible we also don't wait for the host reply in case where
it's not needed to get correct result.

Implicit sync works because virtio-gpu commands are submitted in order to the
host (there a single queue per device, shared by all the guest processes).

virtio-gpu also only supports one context per file description (but multiple
file descriptions per process) while amdgpu only allows one fd per process,
but multiple contexts per fd. This causes synchronization problems, because
virtio-gpu drops all sync primitive if they belong to the same fd/context/ring:
ie the amdgpu_ctx can't be expressed in virtio-gpu terms.

For now the solution is to only allocate a single amdgpu_ctx per application.

Contrary to radeonsi/radv, amdgpu_virtio can use libdrm_amdgpu directly: the
ones that don't rely on ioctl() are safe to use here.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
a565f2994f amd: move all uses of libdrm_amdgpu to ac_linux_drm
This is required to implement virtio native-context.

In a virtualized environment, most of the functions provided
by libdrm_amdgpu will be implemented using virtio.
This allows to implement efficient virtualization, by
forwarding the kernel API to the host, instead of the GL/VK calls.

Similarly, the raw 'fd' or 'gem_handle' arguments are replaced
by opaque types. This allows to encapsulate all the needed
state in the handle, and use unmodified API between baremetal
and virtualized contexts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Samuel Pitoiset
874d34cf1b radv: fix emitting SPI_SHADER_GS_OUT_CONFIG_PS with NULL FS on GFX12
This register wasn't emitted at all if the fragment shader was NULL
and this was causing random GPU hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33030>
2025-01-16 10:33:46 +00:00
Samuel Pitoiset
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/33033>
2025-01-16 08:49:38 +00:00
Samuel Pitoiset
7e6159d10c ac/surface: honor RADEON_SURF_PREFER_xxx_ALIGNMENT on GFX12
This allows to select a better alignment to not waste memory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33033>
2025-01-16 08:49:38 +00:00
Lionel Landwerlin
2774fb32e6 brw: fix coarse_z computation on Xe2+
The payload format changed and we forgot to update this path.

Putting a Fixes: commit that is kind of related but probably not the
source of the issue.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12031
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11871
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12042
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12339
Fixes: 4672fcbc76 ("intel/fs: Fix PS thread payload setup for depth_w_coef_reg.")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33029>
2025-01-16 07:19:57 +00:00
Martin Roukala (né Peres)
660412c63d ci/init-stage2: use the common scripts from the build artifact
This unifies the behaviour between the LAVA, baremetal, and CI-Tron
farms by ensuring every job has access and runs the same scripts.

The init-* scripts are however still sourced from outside the build
artifact, hopefully not for too long.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33026>
2025-01-16 04:07:42 +00:00
Marek Olšák
28ac423288 radeonsi: remove unused functions
also fix missing "inline" in amdgpu.bo.h

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
03ad2bc782 radeonsi: make many shader functions static or move them to .c files
- many non-inline functions are only used in 1 .c file: make them static
- some inline functions are only use in 1 .c file: move them there

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
583348e3b6 radeonsi: remove unused variables from si_shader_context (LLVM)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
13edb27ad5 radeonsi: add si_screen::use_aco to shader cache key to fix shader cache failures
Cc: mesa-stable

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/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
1f5220b03d ac/llvm: remove the low-optimizing compiler option
Not needed with ACO. It was used for big shaders on old APUs that took
forever to compile.

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/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
08a47fa05c ac/llvm: lower vector load_const in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
d160252270 ac: use Z_EXPORT_FORMAT=32_AR for Z + Alpha mrtz exports
This should be faster than 32_ABGR.

Also, stencil exports are changed from UINT16_ABGR to 32_GR,
which should have no effect on performance.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
0d961b0723 nir: add barycentric coordinates src to load_point_coord_maybe_flipped
Just like other input loads, radeonsi needs to know the barycentric
coordinates for it. This adds the src and determines the optimal barycentric
coordinates in nir_lower_point_smooth, the only producer of the intrinsic.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Icenowy Zheng
97412fca25 zink: use lazy descriptors for IMG proprietary drivers
When using Zink with VK_EXT_descriptor_buffer enabled on IMG proprietary
drivers, the rendering behavior is incorrect and uniforms are not
updated properly (the gears of es2gears_x11 become all red and
overlaps).

Use lazy descriptors for IMG proprietary driver unless explicitly
overriden for testing purpose.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32343>
2025-01-16 02:27:00 +00:00
Gurchetan Singh
9c1b69a5b5 gfxstream: remove references to Fuchsia Goldfish
Everything will be virtio...

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33050>
2025-01-16 01:51:39 +00:00
Felix DeGrood
0ff8534008 intel/perf: add new perf consts to support more metrics
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32909>
2025-01-16 00:01:56 +00:00
Christian Gmeiner
10f04dc3df egl/meson: Specify which symbols to export
The goal is to reduce symbol pollution, especially when building
with Perfetto support, which previously led to an excessive number
of exported symbols.

 objdump -T build/src/egl/libEGL_mesa.so.0.0.0 | grep perfetto | wc -l
 - before: 6963
 - after: 0

The new egl.sym version script explicitly exports only relevant egl and
MesaGLInteropEGL symbols, while marking all others as local.

While this change effectively removes all Perfetto-related exported symbols,
some C++ standard library symbols remain as undefined. These are pulled in
by the linker due to dependencies.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33001>
2025-01-15 23:18:36 +00:00
Collabora's Gfx CI Team
3f6f55e891 Uprev Piglit to 631b72944f56e688f56a08d26c8a9f3988801a08
4c0fd15fd9...631b72944f

Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32642>
2025-01-15 22:24:33 +00:00
Sil Vilerino
8f696d8d97 d3d12: Enable Warnings C4267, C4996, C4146, C4244, C4389, C4838, C4302, C4018 in src/gallium/drivers/d3d12 subtree
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
585ce7e831 d3d12_video_enc.h/cpp Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
98ebb0b2e9 d3d12_video_dec.h/cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
bb5fb4d75d d3d12_video_enc_hevc.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
33b5df7c39 d3d12_video_enc_h264.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
acefedbb35 d3d12_video_enc_av1.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
a4aedaf783 d3d12_video_proc.h/cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
fa6f1e05f0 d3d12_video_dec_hevc.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
68ac1ed1c5 d3d12_video_dec_vp9.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b5b08d1ac7 d3d12_video_dec_h264: Fix warning C4244 uint64_t to size_t cast
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b970b32939 d3d12_resource: Fix warning C4244 for x86 builds assign uint64_t to uintptr_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
0e478c3566 d3d12_video_encoder_bitstream_builder_h264: Fix warning C4244 for x86 builds assign uint64_t to size_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8bfe3976d9 util: cpu_detect.c Fix warning C5274: behavior change: _Alignas no longer applies to the type '<unnamed-tag>' (only applies to declared data objects)
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
819558903c d3d12_bufmgr.cpp: Fix warning C4244 for x86 builds assign uint64_t to size_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
46ed17cf69 d3d12: Add offset limit check to d3d12_resource_from_memobj
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
73cdb980bf d3d12: Fix warning C4018 signed/unsigned mismatch
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
15dd8cd9a8 d3d12: Fix warning C4389: An == or != operation involved signed and unsigned variables. This could result in a loss of data.
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
56484fd010 d3d12: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
978fd1cebe d3d12: Fix warning C4267 conversion from 'size_t' to 'type', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
e061792e25 src/compiler: Fix warning C4389: An == or != operation involved signed and unsigned variables. This could result in a loss of data.
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8ecb7bc2a2 src/compiler: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
4d653c7df9 util: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
6a724af20d src/gallium/auxiliary/util/u_draw.h: Fix C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b5617058e4 u_math.h: Change power of two assert to fix warning C4146: unary minus operator applied to unsigned type, result still unsigned
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8f8438bd8c u_dynarray.h: Fix warning C4267 conversion from 'size_t' to 'type', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Manuel Dun
9ab62e6452 Gfxstream: Initial mingw "compilable" Windows version of mesa/gfxstream
Initial "compilable" version of mesa/gfxstream on Windows. For now it is
achieved through "#if !DETECT_OS_WINDOWS" directives hence it is NOT
functional. The compilation works with mingw only and the compilation is
tested in a windows host. This commit is intended to only pass the
compilation process without errors.

Also created stub code for a future windows implementation.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32795>
2025-01-15 20:57:18 +00:00
Aleksi Sapon
f4eb6fde8f llvmpipe: LLVM v2f32 trunc/floor/ceil/nearbyint generates optimal x86 code since at least version 8
Based on the tests committed here:
f9afee479f

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32964>
2025-01-15 20:20:34 +00:00
Aleksi Sapon
0b2664635f llvmpipe: fix lp_test_arit on Windows
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32964>
2025-01-15 20:20:34 +00:00
Konstantin Seurer
5de7a7c5a6 gallivm: Take helper invocations into account when skipping branches
if %cond {
   %store_reg (%reg, %val)
}

can be skipped if no invocations are active. This did not take helper
invocations into account, meaning the value of %reg could be garbage for
helper invocations.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31802>
2025-01-15 17:55:38 +00:00
Aaron Ruby
e862bb52bd gfxstream: Remove internal vk_util.h and vk_struct_id.h entirely
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
e9663276f4 vulkan/util: Add c99_compat.h inclusion for cpp 'restrict' compatibility
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
f766c64c3a gfxstream: Fix unused variable warnings in ResourceTracker.cpp
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
6923af6cc4 gfxstream: Remove VK_HOST_CONNECTION macro
Only need the encoder, the rest was replaced by the
SetupInstanceForProcess() routine.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
1e69e910ca gfxstream: Some cleanup in manual entrypoints
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Mike Blumenkrantz
b73d66e0c0 lavapipe: stop using pipeline layouts in some places
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
f6ff8bdf74 lavapipe: unsupport NV_device_generated_commands
this is no longer useful

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
3f90303eeb lavapipe: move workgraph lowering up and delete pipeline param
Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
4d1ed5d66d lavapipe: fix bitmask type for sampler updating
need 32bit to contain all the bits here

cc: mesa-stable

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
e2023474b4 lavapipe: split out bda descriptor function params from struct
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
596efeda33 lavapipe: split out sampler init from create
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
4db07aeb1c vk/sampler: split out sampler init from create
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
caf50d6723 lavapipe: stop storing texture handle for samplers
this is never used

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Nanley Chery
15e23f3781 anv: Limit slow clear heuristic to ACM and prior
It hasn't been tuned for Xe2.

Fixes: 052d7e1a9c ("anv: Slow clear if fast-clear cost is not mitigated")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33035>
2025-01-15 15:43:19 +00:00
Nanley Chery
caf007ff27 anv: Drop can_fast_clear_with_non_zero_color()
This got dropped during a rebase.

Fixes: 35f02d8f36 ("anv: Inline can_fast_clear_with_non_zero_color")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33035>
2025-01-15 15:43:19 +00:00
Lars-Ivar Hesselberg Simonsen
ee4460acf4 panvk: Fix descriptor decode
The expansion of DUMP_CL is missing parenthesis, making the dumping of
descriptors incorrect.

Fixes: 3b69edf825 ("pan/genxml: Enforce explicit packed types on pan_[un]pack")
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/33040>
2025-01-15 15:05:05 +00:00
Icenowy Zheng
b6c2ea4d99 zink: emit consts as uint only on IMG proprietary drivers
After the SPIR-V generator is optimized to generate multiple constant
types, the shader compiler of Imagination proprietary drivers can no
longer correctly handle these shaders and will bail out.

Handle this as a driver quirk and revert to the old behavior with only
uint constants when IMG proprietary drivers are detected.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32342>
2025-01-15 14:35:59 +00:00
Boris Brezillon
7755c41b3e panvk/csf: Rework the occlusion query logic to avoid draw flushes
Right now, we have a problem when we flush draws inside a render pass
and we don't have enough information to re-emit the framebuffer/tiler
descriptors.

Turns out the only situations where this happens is when an occlusion
query end happens, but we shouldn't really flush the draws in that case.
What we should do instead is record the OQ in our command buffer, so we
can signal OQ availability when the fragment job is done.

In order to solve that, we add an OQ chain to the command buffer to
track OQs ending inside the render pass. We then walk this chain at
fragment job emission time to signal the syncobjs attached to each
query.

This also simplifies the whole occlusion query synchronization model:
instead of waiting for each syncobj individually, we now wait on
the iterators to make sure all OQs have landed. Thanks to this new
synchronization, we can batch OQ reset/copy operations and make the
command stream a lot shorter when big query ranges are copied/reset.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
ae0534c6cc panvk/csf: Use cs_sr_reg64() instead of cs_reg64() when setting the OQ pointer
We have wrappers distinguishing staging registers from sratch registers,
so let's use cs_sr_reg64() here.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
cc517822e5 panvk/csf: Make all sync operations on the CSG scope
The SYSTEM scope triggers CPU interrupts we don't really need, so let's
use the CSG scope to avoid those. Note that the scope doesn't encode
the visibility aspect, meaning changes to the sync object with a CSG
scope will still be instantly visible to the CPU, it's just that the
CPU needs to poll the value to detect a change, which is basically what
we're doing for syncobjs attached to events/queries, so we're good.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
6a7bcff1be pan/cs: cs_{break,continue} are not for_each macros
Let's prevent clang-format from adding the semi-colon on a new line when
we use cs_{continue,break}();

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
622187974f pan/cs: Allow undefined value if condition=always in cs_branch_label()
We already do that in the other cs_emit(b, BRANCH, I), so let's fix this
path too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
e8514fb4c4 pan/cs: Fix the tracepoint register dump loops
The increment was wrong, which ended up generating a lot more stores
than we need.

Fixes: bf05842a8d ("pan/cs: Add an event-based tracing mechanism")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Erik Faye-Lund
ebf9dae2e9 docs/features: fixup panvk KHR_shader_draw_parameters-support
This was enabled on Bifrost as well.

Fixes: 963e9feb8a ("panvk: enable shaderDrawParameters")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33032>
2025-01-15 14:00:00 +00:00
Karmjit Mahil
49bdd4bdc0 tu: Initialize tu_tiling_config even when tiling isn't possible
Also avoid calculations required for setting up `tu_tiling_config`
if tiling isn't possible.

Fixes valgrind issue in:
dEQP-VK.draw.renderpass.shader_layer.vertex_shader_256

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
Karmjit Mahil
8652516ac4 tu: Fix leaking of some descriptor sets
Descriptor sets which have `size` of `0`, such as a descriptor set
with just dynamic descriptors, weren't being freed in
`vkDestroyDescriptorPool()` since that relies on keeping track of
descriptor sets in the `entries` list. Keep track of them in the
`entries` list.

Fixes a memory leak in:
dEQP-VK.binding_model.descriptor_copy.compute.uniform_buffer_dynamic_5

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
Karmjit Mahil
0dd06c74d6 tu: Fix FDM patchpoint memory leak
We can disable FDM in the renderpass based on
`tu_render_pass_disable_fdm()` however a pipeline could have
been bound before starting the renderpass which had
`...RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT` set, in
which case the shader is compiled with FDM support. We still
need to apply the patchpoints. Previously `patchpoints_ctx` was
created only based on whether FDM was enabled in the renderpass,
which was leading to the patchpoints being allocated with no
context so they were never getting freed. Now setup `patchpoint_ctx`
regardless of FDM being disabled or not.

Fixes memory leaks in some tests from:
dEQP-VK.dynamic_rendering.*_cmd_buff.fragment_density_map.*
e.g.
dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff
  .fragment_density_map.2_views .render.divisible_density_size
  .1_sample.static_subsampled_1_2

Fixes: 05f96dd00f ("tu: Add core FDM patchpoint infrastructure")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
Karmjit Mahil
cfc09517b6 tu: Fix clear_values leak
When no attachments are used in a renderpass we should ignore the
clear values. It seems to be valid applications to still pass clear
values in such a case.

Fixes memory leaks in some tests from:
dEQP-VK.image.texel_view_compatible.graphic.basic.*d_image.texture_read.*
dEQP-VK.image.texel_view_compatible.graphic.extended.*d_image.texture_read.*

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
David Rosca
a1af33775e frontends/va: Set csc matrix in PutSurface
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11889
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32890>
2025-01-15 12:48:53 +00:00
Boris Brezillon
8891c2aeba panfrost: Fix instanced draws when attributes have a non-zero divisor
On Bifrost/Midgard, when an attribute has a non-zero divisors, the
attribute offset is tweaked to take the base_instance into account,
which implies we have to re-emit the attributes if the base instance
value changed.

Let's not bother tracking the last base instance and re-emit
unconditionally in that case, which is still better than what we had
before 3db963a135 ("panfrost: Emit attribs in
panfrost_update_state_3d() on bifrost/midgard") and fixes the regression
introduced by this commit.

Fixes: 3db963a135 ("panfrost: Emit attribs in panfrost_update_state_3d() on bifrost/midgard")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-By: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33010>
2025-01-15 12:19:22 +00:00
Icenowy Zheng
1c59793d2d meson: prefer 'python3' to 'python' when finding python3
Although in some cases python 3.x will come without "3" as suffix,
"python3" should still be preferred because sometimes "python" is python
2.x instead.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33025>
2025-01-15 11:24:41 +00:00
Lucas Stach
c3662501a7 etnaviv: only emit used PA_SHADER_ATTRIBUTES states
It's quite wasteful on the command stream space to always emit all of the
PA_SHADER_ATTRIBUTES states, as many shaders use far less varyings than
the absolute max number. Limit the emission to actually used attributes.

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/32991>
2025-01-15 10:52:46 +00:00
Lucas Stach
65076f3ab0 etnaviv: fix flatshading on halti5 GPUs
Halti5 has no interpolation setting which will take into account the
rasterizer flatshade state. Force the interpolation qualifier to flatshade
for the color varyings when API level flatshade is enabled. Only set the
new bit in the shader key on halti5 GPUs to avoid generating unnecessary
shader variants on GPUs where the rasterizer flatshade state is properly
applied to the varyings.

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/32991>
2025-01-15 10:52:46 +00:00
Lucas Stach
41bd7aa9c8 etnaviv: emit varying interpolation state on halti5
Pull the interpolation qualifiers from NIR and translate them to
HALTI5_SHADER_ATTRIBUTES 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/32991>
2025-01-15 10:52:46 +00:00
Lucas Stach
89b2229c0d etnaviv: memcpy varying setup from stack
Use memcpy to transfer the varying setup from stack arrays into the
compiled shader state. Resulting code is less verbose and the
compiler is smart enough to optimize away the function call anyway.

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/32991>
2025-01-15 10:52:46 +00:00
Timothy Arceri
6bca0cc3d9 glsl: drop opt_dead_code_local
This does nothing useful anymore as we now convert to nir at compile
time which will handle all this for us.

shader-db radeonsi:

TOTALS FROM AFFECTED SHADERS (63/168079)
  SGPRS: 3248.00 -> 3208.00 (-1.23 %)
  VGPRS: 2224.00 -> 2228.00 (0.18 %)
  Spilled SGPRs: 0.00 -> 0.00 (0.00 %)
  Spilled VGPRs: 0.00 -> 0.00 (0.00 %)
  Private memory VGPRs: 0.00 -> 0.00 (0.00 %)
  Scratch size: 0.00 -> 0.00 (0.00 %) dwords per thread
  Code Size: 138484.00 -> 138068.00 (-0.30 %) bytes
  Max Waves: 877.00 -> 877.00 (0.00 %)
  Outputs: 0.00 -> 0.00 (0.00 %)
  Patch Outputs: 0.00 -> 0.00 (0.00 %)

shader-db Iris (BDW):

total instructions in shared programs: 17805897 -> 17805917 (<.01%)
instructions in affected programs: 1240 -> 1260 (1.61%)
helped: 0
HURT: 8
HURT stats (abs)   min: 1 max: 4 x̄: 2.50 x̃: 2
HURT stats (rel)   min: 0.39% max: 7.14% x̄: 4.26% x̃: 4.06%
95% mean confidence interval for instructions value: 1.61 3.39
95% mean confidence interval for instructions %-change: 2.01% 6.51%
Instructions are HURT.

total cycles in shared programs: 856868505 -> 856876266 (<.01%)
cycles in affected programs: 2879959 -> 2887720 (0.27%)
helped: 79
HURT: 100
helped stats (abs) min: 1 max: 742 x̄: 61.96 x̃: 12
helped stats (rel) min: <.01% max: 41.84% x̄: 1.17% x̃: 0.20%
HURT stats (abs)   min: 1 max: 1231 x̄: 126.56 x̃: 14
HURT stats (rel)   min: <.01% max: 33.98% x̄: 3.32% x̃: 0.30%
95% mean confidence interval for cycles value: 7.37 79.35
95% mean confidence interval for cycles %-change: 0.29% 2.38%
Cycles are HURT.

LOST:   1
GAINED: 4

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33008>
2025-01-15 02:01:09 +00:00
Caio Oliveira
5bd9693578 docs: Update syntax on Performance tips page
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33020>
2025-01-14 15:31:05 -08:00
Caleb Callaway
1b13f59597 docs: Intel GPU performance tips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33019>
2025-01-14 22:27:21 +00:00
Bo Hu
26ce3b0ba1 remove the mReconstructionMutex in load
During loading of snapshot, there will be a single-threaded
decoder that aquires the same mReconstructionMutex, repeatedly.
Since the mReconstructionMutex is intentionally changed to
be non-recursive, we should not aquire it at the beginning of
load call; otherwise, we will be deadlock the decoder thread.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Bo Hu
2f3c3459a8 update decoder.py to clean up un-used ApiCallInfo
It is normal for vk decoder to consume nothing from the stream,
as it could be either gl or render control commands.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
36ca17cc29 gfxstream: add VK_DRIVER_FILES to devenv
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Jason Macnak
bf3cdf286c Update VkDecoderSnapshot locking
Replace tryLock / unlock with regular scoped lock now that the
"extra handles" have been moved out of VkReconstruction and into
the VkSnapshotApiCallInfo.

Switch to regular std::mutex and std::lock_guard.

Annotate mReconstruction with GUARDED_BY to start to get more
thread safety analysis.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Jason Macnak
a07eb2cef0 Pass VkSnapshotApiCallInfo-s through VkDecoderGlobalState
... so that `VkDecoderGlobalState` can append additional information
needed for snapshotting. Specifically, `VkDecoderGlobalState` may create
additional boxed handles that are not visible directly in the API surface.
For example, `vkCreateDevice()` creates boxed handles for the `VkQueue`-s
and `vkCreateDescriptorPool()` creates boxed handles for pre-allocated
`VkDescriptorSets`. These boxed handles are not recoverable from the API
for `vkCreateDevice()` nor `vkCreateDescriptorPool()` directly. This was
previously worked around by just sticking the extra boxed handles in
`VkReconstruction::mExtraHandlesForNextApi` but this is not thread safe.
Instead, let's give `VkDecoderGlobalState` and `VkDecoderSnapshot` exclusive
access to individual `VkSnapshotApiCallInfo` objects.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Jason Macnak
3c03bae20c Simplify ApiInfo
Removes the additional saving of opcode and packet len as this is
all available from within the packet itself.

Removes the "trace" position from `VulkanMemReadingStream` as these
seemed to only be used for getting the packet start and packet size
but these are already available.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Bo Hu
e6fd2e1613 gfxstream-guest: update offset to correct value
In CoherentMemory::subAllocate function, we should
also update offset to the correct values.

Test: boot with skiavk enabled and the textures
should not be corrupted

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
sergiuferentz
82317d6d24 Use try_unbox in VkDescriptorBufferInfo
* We are currently crashing the emulator when binding to
  DescriptorBindings that have been deleted. This will WARN without
  crashing.
* A side effect of this is that it will enable a wider interaction with
  VulkanBatchUpdateDescriptorSet feature as it will not immediately
  crash if it interacts with something that was removed.
* https://registry.khronos.org/vulkan/specs/latest/man/html/vkUpdateDescriptorSetWithTemplate.html

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
9603450ea4 The BumpPool of VkStream is not freeAll'ed
Original change from: kyoungwon.kim@bytedance.com at aosp/3310239
Moving the change into gfxstream and codegen.

The issue was found by pengzejie@bytedance.com.

Note that vkReadStream's BumpPool is effectively `freeAll`'ed by
`clearPool` calls. The same call for vkStream is not being called
while alloc is called here and there.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
456654f6ad Wrap queue related functions on codegen
For multiple queue emulation, we need to change how queue related
functions are working on the host side and do custom unboxing
before submitting the commands to the underlying driver.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
b8f38956a1 Change C style cast on extension structs
As per go/cstyle#Casting for readability analysis.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Danylo Piliaiev
2875332df5 tu: Allocate consts for driver params as early as possible
Indirect draw calls upload VS params themselves, if indirect draw call
has zero instances GPU seem to still try to upload consts, however
with zer instances it doesn't apply draw state. Without the draw state
the the HLSQ_VS_CNTL values is stale, so less constants may be specified
than draw call expects. It is found that if CP_DRAW_INDIRECT_MULTI_1_DST_OFF
is less than 0x3f - GPU is happy even if the constlen is less than that.

As a workaround we allocate driver params first and ensure that VS
constlen always has the minimum size which is enough to upload driver
params.

Fixes one of the GPU hangs in "Disney Epic Mickey: Rebrushed" on a750.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
3e5d4d50c5 ir3: Use generic const alloc for everything and call it once
With all consts going through generic allocations it's now possible
to call ir3_setup_const_state once, and have lowerings that dynamically
lower things to consts just to update the max consts being used.

The only exception for now are immediates, since they eat up the space
that was left and allocated much later.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
cf73f89ba0 tu,ir3: Make push consts be able to start from higher than c0.x offsets
Will be needed in the follow up commit.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
9be269ef25 ir3: Use generic consts alloc for driver params
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
922ef8e720 ir3: Make allocation of consts more generic and order independent
The order of allocation was backed into ir3_setup_const_state and
some other parts of ir3, which is rather brittle.

And don't assume offsets for consts in other part of code, their order
and offset calculation is not guaranteed.

This also potentially fixes indirect UBO effect on constlen size.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Samuel Pitoiset
fc56823cf0 radv: change the BASE_HI field for VGT_TF_MEMORY_BASE_HI on GFX12
It's similar but less confusing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33015>
2025-01-14 17:13:23 +00:00
Alyssa Rosenzweig
401b400de3 nir,asahi,hk: add barrier argument to MESA_DISPATCH_PRECOMP
In the current API, precomp implicitly assumes full barriers both before & after
every dispatch. That's not good for performance. However, dropping the barriers
and requiring user to explicitly call barrier functions before/after would have
bad ergonomics.

So, we add a new parameter to the standard MESA_DISPATCH_PRECOMP signature
representing the barriers required around the dispatch. As usual, the actual
type & semantic is left to drivers to define what makes sense for their
hardware. We just reserve the place for it. (I think most drivers will want
bitflags here, but I don't think the actual flags are worth. If a driver wanted
to use a struct here, that would work too.)

Since the asahi stack doesn't do anything clever with barriers yet, we
mechnically add an AGX_BARRIER_ALL barrier to all precomp users in-tree. We can
optimize that later, this just gets the flag-day change in with no functional
change.

For JM panfrost, this will provide a convenient place to stash both their "job
barrier" bit and their "suppress prefetch" bit (which is really a sort of
barrier / cache flush, if you think about it).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32980>
2025-01-14 16:39:57 +00:00
Alyssa Rosenzweig
4955a68a03 libagx: add agx_barrier enum
trivial for now, but eventually this will describe interesting things :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32980>
2025-01-14 16:39:56 +00:00
Antonio Ospite
b016f218fb ci/android: fix meson C++ cross-compiler argument detection
When cross-building for Android meson fails to find supported compiler
arguments for the  C++ cross-compiler, e.g.:

```
Compiler for C++ supports arguments -Wno-array-bounds: NO (cached)
Compiler for C++ supports arguments -Wno-overflow: NO
Compiler for C++ supports arguments -Wno-c++11-narrowing: NO (cached)
Compiler for C++ supports arguments -Wno-vla-cxx-extension: NO (cached)

```

This is due to an **unrelated** and more generic compilation failure
when testing for the supported arguments, e.g.:

```
Command line: `/tmp/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -static-libstdc++ /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpv6_hke9l/testfile.cpp -o /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpv6_hke9l/output.obj -c -Wno-error=c99-designator -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=self-assign -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wvla-cxx-extension -Wno-vla-cxx-extension` -> 1
stderr:
clang++: error: argument unused during compilation: '-static-libstdc++' [-Werror,-Wunused-command-line-argument]
-----------
Compiler for C++ supports arguments -Wno-vla-cxx-extension: NO
```

The issue is caused by how the cross compiler is set up by
.gitlab-ci/container/create-android-cross-file.sh

Allow the cross compiler to still start even when the
`-Werror,-Wunused-command-line-argument` error occurs in order to be
able to actually detect other arguments:

```
Command line: `/tmp/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables --start-no-unused-arguments -static-libstdc++ --end-no-unused-arguments /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpm6eolxed/testfile.cpp -o /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpm6eolxed/output.obj -c -Wno-error=c99-designator -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=self-assign -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wvla-cxx-extension -Wno-vla-cxx-extension` -> 0
Compiler for C++ supports arguments -Wno-vla-cxx-extension: YES
```

This makes argument detection work again, e.g:

```
Compiler for C++ supports arguments -Wno-array-bounds: YES (cached)
Compiler for C++ supports arguments -Wno-overflow: YES
Compiler for C++ supports arguments -Wno-c++11-narrowing: YES (cached)
Compiler for C++ supports arguments -Wno-vla-cxx-extension: YES (cached)
```

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12441
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33013>
2025-01-14 16:00:12 +00:00
Vinson Lee
25f5f1b9b4 hk: Fix build error with static_assert
../src/asahi/vulkan/hk_cmd_draw.c: In function ‘hk_draw’:
../src/asahi/vulkan/hk_cmd_draw.c:3471:32: error: expression in static assertion is not constant
 3471 |             static_assert(size > sizeof(VkDrawIndirectCommand),
      |                           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 5bc89aa991 ("hk,libagx: handle adjacency without a GS")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12351
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32988>
2025-01-14 15:20:17 +00:00
Matthew Brost
2a053b2e60 anv/xe: Bind queue per anv_queue
The Xe uAPI is designed to use bind queues such that binds without input
dependencies (sync objects) do not block on binds with input
dependencies.

For example:

- Bind A (sparse) is submitted with a list of input dependencies.
- Bind B (immediate) is subsequently submitted without a list of input
  dependencies.

If Bind A and Bind B share a single bind queue, Bind B will not be
scheduled until Bind A completes. Using individual bind queues decouples
Bind A and Bind B, allowing Bind B to make immediate progress.

This change creates a separate bind queue for each ANV queue, enabling
support for sparse bindings that may have input dependencies.

v2:
 - Bail on bind queue creation failure (Linoel)
 - Only create bind queue if VK_QUEUE_SPARSE_BINDING_BIT is set (Jose)
v3:
 - Add comment around submit->queue usage (Jose)

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32873>
2025-01-14 14:39:53 +00:00
Timur Kristóf
50035f0316 ac/nir: Move all ac_nir_* files to a new folder.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:30 +01:00
Timur Kristóf
fe9eda9969 ac: Stop including ac_nir.h from ac_shader_util.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:28 +01:00
Timur Kristóf
cc43bd151b ac: Move AC_HS_MSG_VOTE_LDS_BYTES to ac_shader_util.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:27 +01:00
Timur Kristóf
736f61fa80 ac/nir: Move ac_nir_lower_ngg_mesh to separate file.
Along with it, move some functions to the prerast utils file.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:25 +01:00
Timur Kristóf
c1eb006695 ac/nir: Rename ac_nir_lower_ngg_ms to ac_nir_lower_ngg_mesh.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:23 +01:00
Timur Kristóf
955315f831 ac/nir: Move pre-rasterization related utilities in separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:21 +01:00
Timur Kristóf
a986f9b90d ac/nir: Move ac_nir_lower_sin_cos to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:19 +01:00
Timur Kristóf
19bca6d425 ac/nir: Move ac_nir_lower_mem_access_bit_sizes to separate file.
Also ac_nir_flag_smem_for_loads along with it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:17 +01:00
Timur Kristóf
85eab189ee ac/nir: Move ac_nir_opt_pack_half to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:15 +01:00
Timur Kristóf
e79c77b1ef ac/nir: Move ac_nir_gs_shader_query declaration to ac_nir_helpers.h
This is a helper function, so drivers don't need to call it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:13 +01:00
Timur Kristóf
88c951bd46 ac/nir: Move ac_nir_lower_legacy_gs to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:11 +01:00
Timur Kristóf
6dd3f53204 ac/nir: Move ac_nir_lower_legacy_vs to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:10 +01:00
Timur Kristóf
d0e71ac9cd ac/nir: Move ac_nir_lower_intrinsics_to_args to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:08 +01:00
Timur Kristóf
a0b226bafb ac/nir: Expose ac_nir_unpack_value in ac_nir_helpers.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:06 +01:00
Timur Kristóf
1181348e80 ac/nir: Move ac_nir_create_gs_copy_shader to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:04 +01:00
Timur Kristóf
1191408d4b ac: Move ac_nir_config struct to ac_nir.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:03 +01:00
Timur Kristóf
4cad0bc438 ac/nir: Rename emit_streamout to ac_nir_emit_legacy_streamout
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:01 +01:00
Timur Kristóf
015e5080e9 ac: Stop including nir.h in ac_shader_util.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:36 +01:00
Timur Kristóf
305fdfddb5 ac/nir: Move ac_set_nir_options to ac_nir.c
And rename it to ac_nir_set_options to match other functions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:34 +01:00
Timur Kristóf
855de0483f ac/nir: Move ac_nir callback functions to ac_nir.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:32 +01:00
Timur Kristóf
cc0166462e ac/nir: Move ac_nir_get_mem_access_flags to ac_nir.c
And change its name to indicate that it is NIR specific.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:30 +01:00
Timur Kristóf
ad5c0b7103 ac/nir: Move ac_nir_lower_bit_size_callback to ac_nir.c
ac_shader_util should not concern itself with NIR stuff.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:28 +01:00
Marek Olšák
7e21b48a2e ac/nir: split ac_nir_lower_ps into 2 passes
It's split into ac_nir_lower_ps_early ac_nir_lower_ps_late.

ac_nir_lower_ps_early doesn't generate any AMD specific intrinsics except
some system values and is mainly an optimization pass with some lowering.
The new change here is that it also eliminates output components not needed
by spi_shader_col_format.

ac_nir_lower_ps_late lowers output stores to exports and does the bc_optimize
thing.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:25 +01:00
Marek Olšák
62c184c491 ac/nir: remove broadcast_last_cbuf because it can be deduced from NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:22 +01:00
Christopher Michael
084754a5e5 v3d: Add support for PIPE_QUERY_TIMESTAMP_DISJOINT
When supporting PIPE_QUERY_TIMESTAMP, we use os_time_get_nano so the
disjoint timer frequency should be nanoseconds.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:08 +00:00
Christopher Michael
5982a69f90 v3d: Add support for time elapsed queries
Add support for getting time elapsed values via glBeginQuery/glEndQuery.
When recording query start & end time, we ensure that all pending jobs have
been completed by using v3d cpu_queue & the multisync extension.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:08 +00:00
Christopher Michael
9a35894d61 v3d: Add support for timestamp queries
Add support for getting timestamp values via
glGet(GL_TIMESTAMP) and glQueryCounter(GL_TIMESTAMP). For the case of
glQueryCounter, we make use of v3d cpu jobs via
DRM_IOCTL_V3D_SUBMIT_CPU and DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:08 +00:00
Christopher Michael
8e1b27138c v3d: Add check to see if v3d supports multisync
Add support to check if v3d supports the multisync
extension. This will be used in future patches to enable support for
PIPE_CAP_QUERY_TIMESTAMP & PIPE_CAP_QUERY_TIME_ELAPSED.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:07 +00:00
Christopher Michael
5e728db32a v3d: Add check to see if v3d supports cpu_queue
Add support to check if v3d supports cpu_queue. This
will be used in future patches to enable support for
PIPE_CAP_QUERY_TIMESTAMP & PIPE_CAP_QUERY_TIME_ELAPSED.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:07 +00:00
Samuel Pitoiset
94da1edbe4 radv: rename attr_ring to ge_rings
This is better naming.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32994>
2025-01-14 00:59:38 -08:00
Samuel Pitoiset
ab96333490 radv: fix configuring the attribute ring size on GFX12
The attribute ring size per SE is different than GFX11 and it was
already computed correctly in common code but RADV was using the old
GFX11 style.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32994>
2025-01-14 00:59:37 -08:00
Chia-I Wu
776199ea77 panvk/csf: add a comment on query synchronization
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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
655b7c464a panvk/csf: no need to flush caches after query copy
The spec says

  vkCmdCopyQueryPoolResults is considered to be a transfer operation,
  and its writes to buffer memory must be synchronized using
  VK_PIPELINE_STAGE_TRANSFER_BIT and VK_ACCESS_TRANSFER_WRITE_BIT before
  using the results.

While STORE_MULTIPLE is not exactly VK_PIPELINE_STAGE_TRANSFER_BIT /
VK_ACCESS_TRANSFER_WRITE_BIT, we can still rely on user barriers to do
the right thing (e.g., flush caches for host access).

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
8948ca1024 panvk/csf: no need to sb wait on query copy
When VK_QUERY_RESULT_WAIT_BIT is set, we rely on sync wait.  When
VK_QUERY_RESULT_WAIT_BIT is not set, no wait is needed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
d04437845f panvk/csf: no need to sb wait on query end
We can guarantee ordering with this sequence of async cmds

  RUN_FRAGMENT ->
  (signal and wait SB_ITER) ->
  FLUSH_CACHE2 ->
  (signal and wait DEFERRED_FLUSH) ->
  SYNC_SET32

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
50a3b4765e panvk/csf: no need to sb wait on query begin
The spec says

  VUID-vkCmdBeginQueryIndexedEXT-None-00807
  All queries used by the command must be unavailable

and panvk_cmd_reset_occlusion_queries is synchronous.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
12ce26a1d1 panvk: no need to zero results on query reset
The spec says

  Resetting a query via vkCmdResetQueryPool or vkResetQueryPool sets the
  status to unavailable and makes the numerical results undefined.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
0b3e10d6fd panvk: no need to check query count on query create
The spec says

  VUID-VkQueryPoolCreateInfo-queryCount-02763
  queryCount must be greater than 0

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
04e899f125 panvk: no need to zero availability on query create
The spec says

  After query pool creation, each query is in an uninitialized state and
  must be reset before it is used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Nanley Chery
cd8e120b97 anv: Allow more single subresource fast-clears with FCV
Format re-interpretation is no longer a problem with texture views. The
clear color address now points to a clear color that is in the expected
format.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
35f02d8f36 anv: Inline can_fast_clear_with_non_zero_color
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
5549cb921d Revert "anv: turn off non zero fast clears for CCS_E"
This reverts commit 25a232238f.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11110
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11325
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
3e62401df3 anv: Drop bpc check for non-zero fast clears
Use the matching clear color address for an image view format to support
any clear color.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
83cd73385a anv: Use L3 Fabric flush in fast-clear post-amble on TGL
Replace the Tile Cache flush with an L3 Fabric flush. According to HSD
1604687438, this should be faster.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Nanley Chery
cec086a074 anv: Reduce fast-clear post-amble synchronization
On gfx12+, the pre-amble and post-amble flushes contain the stalls
necessary to ensure the prior operation is complete. Remove the extra
uses of ANV_PIPE_END_OF_PIPE_SYNC_BIT in post-amble flushes. Also do
this for the pre-amble flushes, but this doesn't have any impact. The
flush application function will implicitly add the bit.

For A750, this improves the TWWH3 trace in the performance CI by 0.52%
(n=2).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Nanley Chery
e9a85dd3ac iris: Use L3 Fabric flush in fast-clear post-amble on TGL
Replace the Tile Cache flush with an L3 Fabric flush. According to HSD
1604687438, this should be faster.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Nanley Chery
2e7f344508 iris: Reduce fast-clear post-amble flushes
On gfx12+, the post-amble flushes contain the stalls necessary to ensure
the prior operation is complete. Remove the extra uses
iris_emit_end_of_pipe_sync().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Caio Oliveira
634daf2827 intel/brw: Rename brw_fs_validate to brw_validate
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32843>
2025-01-13 23:56:22 +00:00
Caio Oliveira
d37cbfad66 util/ra: Don't store a pointer to a ra_regs per ra_reg
Each reg may store a list of conflict regs.  This was handled by
util_dynarray, however each of those hold an extra pointer for
the ra_regs (which serves as mem_ctx for that).  Since the usage
here is very simple, we just handle the array growth manually.
The initial size remains the same as before.

The mem_ctx of each ra_reg was being used to identify the case
in which the list wasn't used.  Change to use a bool in the
ra_regs struct instead.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Caio Oliveira
298740d7a1 util/ra: Bump the initial size of adjacency lists
For Intel, looking at a few fossils, the majority of nodes
have more than 32 entries in the list.  I'd expect other backends
to have similar numbers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Caio Oliveira
9cccb89dbc util/ra: Don't store a pointer to graph per ra_node
Each node stores a list of adjacent nodes.  This was handled by
util_dynarray, however each of those hold an extra pointer for
the ra_graph (which serves as mem_ctx for that).  Since the usage
here is very simple, we just handle the array growth manually.

For now keep using the same initial size as was being used by dynarray.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Caio Oliveira
3753c9ed1b util/ra: Move less used data out of ra_node
Create a parallel array to hold them.  In particular, the `spill_cost` is
used at a completely different moment than the main node data.

Reduces the `struct ra_node` size to 40 bytes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Nanley Chery
052d7e1a9c anv: Slow clear if fast-clear cost is not mitigated
Fast-clears require expensive flushes beforehand and afterwards. The
cost of flushes are decreased in a series of back-to-back fast-clears as
no extra fast-clear flushes are required in between them. If the ratio
of a command buffer's recorded back-to-back fast clears over independent
fast-clears falls below 1/2, prevent that command buffer from recording
any further fast-clears.

Averaging two runs of our Factorio trace on an A750 shows a +14.37%
improvement in FPS.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32984>
2025-01-13 20:42:31 +00:00
Brian Paul
24107f2f67 svga: fix printing 64-bit value for 32-bit build
Closes: #12449, #12451
Fixes: b13e2a495e ("svga: add svga_resource_create_with_modifiers() function")
Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.Bhende@broadcom.com>
Reviewed-by: Neha Bhende <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32995>
2025-01-13 18:25:55 +00:00
Zan Dobersek
7c927144b3 freedreno/registers: fix RBBM_PRIMCTR understanding and usage
RBBM_PRIMCTR registers are used for different pipeline statistics that can
be queried, but current usage was wrong in some cases. Comments in the
register file are updated, and the per-statistic register index mapping is
updated accordingly.

Fixes on a750:
  test_query_pipeline_statistics in vkd3d-proton
  arb_query_buffer_object failures in piglit (zink)

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32900>
2025-01-13 15:46:20 +00:00
Sergi Blanch Torne
3fed68b607 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 02f8b22a1a.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32993>
2025-01-13 13:43:53 +00:00
David Rosca
5a5628284a frontends/va: Allow creating DRM PRIME surfaces without surface descriptor
If we don't have surface descriptor, treat this as a hint from
application that it will export the surface later.
This matches Intel driver behavior.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32970>
2025-01-13 10:26:02 +00:00
Samuel Pitoiset
10e424f586 aco: always use ds_bpermute for shuffle/rotate on GFX12
ds_bpermute supports both 32 and 64 lanes now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32974>
2025-01-13 08:33:38 +00:00
Samuel Pitoiset
b3d4d65f5a radv: fix CP DMA clears/copies on GFX12
CP DMA on GFX12 doesn't always use L2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32971>
2025-01-13 08:07:58 +00:00
Samuel Pitoiset
603541f1a2 ac/gpu_info: add cp_dma_use_L2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32971>
2025-01-13 08:07:58 +00:00
Sergi Blanch Torne
02f8b22a1a ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-01-13 08:00 UTC
* End: 2025-01-13 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32734>
2025-01-13 07:36:17 +00:00
Job Noorman
c1dfe22b7b ir3: emit uniform iadd3 as two adds
The `sad` instruction (used for iadd3) doesn't support the scalar ALU.
This means we might fall back to non-earlypreamble whenever we use it in
the preamble. Prevent this by emitting it as two adds instead.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32943>
2025-01-13 07:06:03 +00:00
Lucas Stach
bed748d5f6 etnaviv: fix polygon offset disable
If a polygon offset is set via glPolygonOffset, but the functionality
isn't enabled via glEnable(GL_POLYGON_OFFSET_FILL) the offset must not
be taken into account when computing the sample depth. As the Vivante
hardware does not have a separate enable state, the offset units and
scale must both be set to 0 to keep the sample depth unchanged.

Fixes dEQP-GLES2.functional.polygon_offset.default_enable

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/32982>
2025-01-12 21:06:33 +00:00
duncan.hopkins
20b806284a glx: Add back in applegl_create_display() so the OpenGL.framework, on MacOS, pointer get setup.
Fixes: 4e8740370a ("glx: rework __glXInitialize")

Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32656>
2025-01-12 16:49:33 +00:00
duncan.hopkins
48ebbe2777 glx: Guard some of the bind_extensions() code with the same conditions as glx_screens frontend_screen member.
Configution like simple MacOS builds do not have `frontend_screen` and fail to build.

Fixes: 34dea2b38e ("glx: unify extension binding")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12317

Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32656>
2025-01-12 16:49:33 +00:00
Karol Herbst
0aa218328d rusticl/kernel: store memory arguments as Weak references
Through the spec it's required that cl_kernel doesn't hold references to
its bound kernel arguments.

There is a CL CTS test verifying this, but because the arguments were not
used in the test kernel, a reference was never taken. This will change
with SVM and BDA as we need to know all bound memory objects even if they
aren't directly used in kernels.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32961>
2025-01-12 15:26:14 +00:00
Rob Clark
114a47544f ir3: Add preamble instr count metric
Turnip already had a pipeline stat to indicate whether we were using
early-preamble or not.  But no way to tell if there was a preamble at
all.  Adding a preamble instruction count tells us whether there is a
preamble, but also how big it is.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32977>
2025-01-11 18:10:17 +00:00
Kenneth Graunke
894393470a brw: Fix Xe2 spilling code to limit to SIMD32 rather than SIMD16
LSC can do native SIMD32 messages on Xe2.

Cuts spill/fills on Lunarlake:
- q2rtx-rt-pipeline: -20.83% / -16.85%
- Borderlands 3 DX12: -18.26% / -2.09%
- Cyberpunk 2077: -2.18% / -0.11%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32986>
2025-01-11 09:33:09 +00:00
Lionel Landwerlin
8ac7802ac8 brw: move final send lowering up into the IR
Because we do emit the final send message form in code generation, a
lot of emissions look like this :

  add(8)  vgrf0,    u0, 0x100
  mov(1)   a0.1, vgrf0          # emitted by the generator
  send(8)   ...,  a0.1

By moving address register manipulation in the IR, we can get this
down to :

  add(1)  a0.1,   u0, 0x100
  send(8)  ..., a0.1

This reduce register pressure around some send messages by 1 vgrf.

All lost shaders in the below results are fragment SIMD32, due to the
throughput estimator. If turned off, we loose no SIMD32 shaders with
this change.

DG2 results:

  Assassin's Creed Valhalla:
  Totals from 2044 (96.87% of 2110) affected shaders:
  Instrs: 852879 -> 832044 (-2.44%); split: -2.45%, +0.00%
  Subgroup size: 23832 -> 23824 (-0.03%)
  Cycle count: 53345742 -> 52144277 (-2.25%); split: -5.08%, +2.82%
  Spill count: 729 -> 554 (-24.01%); split: -28.40%, +4.39%
  Fill count: 2005 -> 1256 (-37.36%)
  Scratch Memory Size: 25600 -> 19456 (-24.00%); split: -32.00%, +8.00%
  Max live registers: 116765 -> 115058 (-1.46%)
  Max dispatch width: 19152 -> 18872 (-1.46%); split: +0.21%, -1.67%

  Cyberpunk 2077:
  Totals from 1181 (93.43% of 1264) affected shaders:
  Instrs: 667192 -> 663615 (-0.54%); split: -0.55%, +0.01%
  Subgroup size: 13016 -> 13032 (+0.12%)
  Cycle count: 17383539 -> 17986073 (+3.47%); split: -0.93%, +4.39%
  Spill count: 12 -> 8 (-33.33%)
  Fill count: 9 -> 6 (-33.33%)

  Dota2:
  Totals from 173 (11.59% of 1493) affected shaders:
  Cycle count: 274403 -> 280817 (+2.34%); split: -0.01%, +2.34%
  Max live registers: 5787 -> 5779 (-0.14%)
  Max dispatch width: 1344 -> 1152 (-14.29%)

  Hitman3:
  Totals from 5072 (95.39% of 5317) affected shaders:
  Instrs: 2879952 -> 2841804 (-1.32%); split: -1.32%, +0.00%
  Cycle count: 153208505 -> 165860401 (+8.26%); split: -2.22%, +10.48%
  Spill count: 3942 -> 3200 (-18.82%)
  Fill count: 10158 -> 8846 (-12.92%)
  Scratch Memory Size: 257024 -> 223232 (-13.15%)
  Max live registers: 328467 -> 324631 (-1.17%)
  Max dispatch width: 43928 -> 42768 (-2.64%); split: +0.09%, -2.73%

  Fortnite:
  Totals from 360 (4.82% of 7472) affected shaders:
  Instrs: 778068 -> 777925 (-0.02%)
  Subgroup size: 3128 -> 3136 (+0.26%)
  Cycle count: 38684183 -> 38734579 (+0.13%); split: -0.06%, +0.19%
  Max live registers: 50689 -> 50658 (-0.06%)

  Hogwarts Legacy:
  Totals from 1376 (84.00% of 1638) affected shaders:
  Instrs: 758810 -> 749727 (-1.20%); split: -1.23%, +0.03%
  Cycle count: 27778983 -> 28805469 (+3.70%); split: -1.42%, +5.12%
  Spill count: 2475 -> 2299 (-7.11%); split: -7.47%, +0.36%
  Fill count: 2677 -> 2445 (-8.67%); split: -9.90%, +1.23%
  Scratch Memory Size: 99328 -> 89088 (-10.31%)
  Max live registers: 84969 -> 84671 (-0.35%); split: -0.58%, +0.23%
  Max dispatch width: 11848 -> 11920 (+0.61%)

  Metro Exodus:
  Totals from 92 (0.21% of 43072) affected shaders:
  Instrs: 262995 -> 262968 (-0.01%)
  Cycle count: 13818007 -> 13851266 (+0.24%); split: -0.01%, +0.25%
  Max live registers: 11152 -> 11140 (-0.11%)

  Red Dead Redemption 2 :
  Totals from 451 (7.71% of 5847) affected shaders:
  Instrs: 754178 -> 753811 (-0.05%); split: -0.05%, +0.00%
  Cycle count: 3484078523 -> 3484111965 (+0.00%); split: -0.00%, +0.00%
  Max live registers: 42294 -> 42185 (-0.26%)

  Spiderman Remastered:
  Totals from 6820 (98.02% of 6958) affected shaders:
  Instrs: 6921500 -> 6747933 (-2.51%); split: -4.16%, +1.65%
  Cycle count: 234400692460 -> 236846720707 (+1.04%); split: -0.20%, +1.25%
  Spill count: 72971 -> 72622 (-0.48%); split: -8.08%, +7.61%
  Fill count: 212921 -> 198483 (-6.78%); split: -12.37%, +5.58%
  Scratch Memory Size: 3491840 -> 3410944 (-2.32%); split: -12.05%, +9.74%
  Max live registers: 493149 -> 487458 (-1.15%)
  Max dispatch width: 56936 -> 56856 (-0.14%); split: +0.06%, -0.20%

  Strange Brigade:
  Totals from 3769 (91.21% of 4132) affected shaders:
  Instrs: 1354476 -> 1321474 (-2.44%)
  Cycle count: 25351530 -> 25339190 (-0.05%); split: -1.64%, +1.59%
  Max live registers: 199057 -> 193656 (-2.71%)
  Max dispatch width: 30272 -> 30240 (-0.11%)

  Witcher 3:
  Totals from 25 (2.40% of 1041) affected shaders:
  Instrs: 24621 -> 24606 (-0.06%)
  Cycle count: 2218793 -> 2217503 (-0.06%); split: -0.11%, +0.05%
  Max live registers: 1963 -> 1955 (-0.41%)

LNL results:

  Assassin's Creed Valhalla:
  Totals from 1928 (98.02% of 1967) affected shaders:
  Instrs: 856107 -> 835756 (-2.38%); split: -2.48%, +0.11%
  Subgroup size: 41264 -> 41280 (+0.04%)
  Cycle count: 64606590 -> 62371700 (-3.46%); split: -5.57%, +2.11%
  Spill count: 915 -> 669 (-26.89%); split: -32.79%, +5.90%
  Fill count: 2414 -> 1617 (-33.02%); split: -36.62%, +3.60%
  Scratch Memory Size: 62464 -> 44032 (-29.51%); split: -36.07%, +6.56%
  Max live registers: 205483 -> 202192 (-1.60%)

  Cyberpunk 2077:
  Totals from 1177 (96.40% of 1221) affected shaders:
  Instrs: 682237 -> 678931 (-0.48%); split: -0.51%, +0.03%
  Subgroup size: 24912 -> 24944 (+0.13%)
  Cycle count: 24355928 -> 25089292 (+3.01%); split: -0.80%, +3.81%
  Spill count: 8 -> 3 (-62.50%)
  Fill count: 6 -> 3 (-50.00%)
  Max live registers: 126922 -> 125472 (-1.14%)

  Dota2:
  Totals from 428 (32.47% of 1318) affected shaders:
  Instrs: 89355 -> 89740 (+0.43%)
  Cycle count: 1152412 -> 1152706 (+0.03%); split: -0.52%, +0.55%
  Max live registers: 32863 -> 32847 (-0.05%)

  Fortnite:
  Totals from 5354 (81.72% of 6552) affected shaders:
  Instrs: 4135059 -> 4239015 (+2.51%); split: -0.01%, +2.53%
  Cycle count: 132557506 -> 132427302 (-0.10%); split: -0.75%, +0.65%
  Spill count: 7144 -> 7234 (+1.26%); split: -0.46%, +1.72%
  Fill count: 12086 -> 12403 (+2.62%); split: -0.73%, +3.35%
  Scratch Memory Size: 600064 -> 604160 (+0.68%); split: -1.02%, +1.71%

  Hitman3:
  Totals from 4912 (97.09% of 5059) affected shaders:
  Instrs: 2952124 -> 2916824 (-1.20%); split: -1.20%, +0.00%
  Cycle count: 179985656 -> 189175250 (+5.11%); split: -2.44%, +7.55%
  Spill count: 3739 -> 3136 (-16.13%)
  Fill count: 10657 -> 9564 (-10.26%)
  Scratch Memory Size: 373760 -> 318464 (-14.79%)
  Max live registers: 597566 -> 589460 (-1.36%)

  Hogwarts Legacy:
  Totals from 1471 (96.33% of 1527) affected shaders:
  Instrs: 748749 -> 766214 (+2.33%); split: -0.71%, +3.05%
  Cycle count: 33301528 -> 34426308 (+3.38%); split: -1.30%, +4.68%
  Spill count: 3278 -> 3070 (-6.35%); split: -8.30%, +1.95%
  Fill count: 4553 -> 4097 (-10.02%); split: -10.85%, +0.83%
  Scratch Memory Size: 251904 -> 217088 (-13.82%)
  Max live registers: 168911 -> 168106 (-0.48%); split: -0.59%, +0.12%

  Metro Exodus:
  Totals from 18356 (49.81% of 36854) affected shaders:
  Instrs: 7559386 -> 7621591 (+0.82%); split: -0.01%, +0.83%
  Cycle count: 195240612 -> 196455186 (+0.62%); split: -1.22%, +1.84%
  Spill count: 595 -> 546 (-8.24%)
  Fill count: 1604 -> 1408 (-12.22%)
  Max live registers: 2086937 -> 2086933 (-0.00%)

  Red Dead Redemption 2:
  Totals from 4171 (79.31% of 5259) affected shaders:
  Instrs: 2619392 -> 2719587 (+3.83%); split: -0.00%, +3.83%
  Subgroup size: 86416 -> 86432 (+0.02%)
  Cycle count: 8542836160 -> 8531976886 (-0.13%); split: -0.65%, +0.53%
  Fill count: 12949 -> 12970 (+0.16%); split: -0.43%, +0.59%
  Scratch Memory Size: 401408 -> 385024 (-4.08%)

  Spiderman Remastered:
  Totals from 6639 (98.94% of 6710) affected shaders:
  Instrs: 6877980 -> 6800592 (-1.13%); split: -3.11%, +1.98%
  Cycle count: 282183352210 -> 282100051824 (-0.03%); split: -0.62%, +0.59%
  Spill count: 63147 -> 64218 (+1.70%); split: -7.12%, +8.82%
  Fill count: 184931 -> 175591 (-5.05%); split: -10.81%, +5.76%
  Scratch Memory Size: 5318656 -> 5970944 (+12.26%); split: -5.91%, +18.17%
  Max live registers: 918240 -> 906604 (-1.27%)

  Strange Brigade:
  Totals from 3675 (92.24% of 3984) affected shaders:
  Instrs: 1462231 -> 1429345 (-2.25%); split: -2.25%, +0.00%
  Cycle count: 37404050 -> 37345292 (-0.16%); split: -1.25%, +1.09%
  Max live registers: 361849 -> 351265 (-2.92%)

  Witcher 3:
  Totals from 13 (46.43% of 28) affected shaders:
  Instrs: 593 -> 660 (+11.30%)
  Cycle count: 28302 -> 28714 (+1.46%)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
a27d98e933 brw: avoid having the scratch surface handle partially written
Allows it to be visible through the def_analysis.

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/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
aac906c16c brw: add scheduler support for address registers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
0a5bdf1199 brw: add infra to make use of the address register in the IR
This limits the address register to simple cases inside a block.

Validation ensures that the address register is only written once and
read once.

Instruction scheduling makes sure that instructions using the address
register in the generator are not scheduled while there is an usage of
the register in the IR.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
c9fa235c28 brw: split validation iteration into blocks
No functional change.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
9b73a73a6e brw: use phys_nr() more in generation
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
b110b06447 brw: introduce a new register type for the address register
We want to reuse the brw::nr field as a virtual address register
identifer. So we can't use brw::file=ARF brw::nr=ADDRESS.

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/28199>
2025-01-11 08:41:42 +00:00
Marek Olšák
842c91300f mesa: enable GL name reuse by default for all drivers except virgl
v2: detect qemu, crossvm

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32715>
2025-01-11 05:54:52 +00:00
Marek Olšák
b15c8fe3f1 mesa: rework enablement of force_gl_names_reuse
force_gl_names_reuse is changed to integer.
 -1 means default (currently disabled), 0 means disabled, 1 means enabled

The names reuse initialization is moved to _mesa_alloc_shared_state ->
_mesa_InitHashTable instead of _mesa_HashEnableNameReuse.

It will be enabled by default.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32715>
2025-01-11 05:54:52 +00:00
Felix DeGrood
06423b1792 vk/overlay-layer: defer log creation to swapchain creation
Moving output file creation to coincide with swapchain creation
ensures only rendering thread will create/destroy log file. This
was causing problems with non-rendering processes stomping log file.

Reviewed-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32814>
2025-01-10 23:44:24 +00:00
Kenneth Graunke
de1eaa4019 brw: Always use MEMORY_LOAD for load_ubo_uniform_block_intel intrinsics
Rather than emitting FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD to do block
loads that were cacheline aligned, loading entire cachelines at a time,
we now rely on NIR passes to group, CSE, and vectorize things into
appropriately sized blocks.  This means that we'll usually still load
a cacheline, but we may load only 32B if we don't actually need anything
from the full 64B.  Prior to Xe2, this saves us registers, and it ought
to save us some bandwidth as well as the response length can be lowered.

The cacheline-aligning hack was the main reason not to simply call
fs_nir_emit_memory_access(), so now we do that instead, porting yet
one more thing to the common memory opcode framework.

We unfortunately still emit the old FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD
opcode for non-block intrinsics.  We'd have to clean up 16-bit handling
among other things in order to eliminate this, but we should in the
future.

fossil-db results on Alchemist for this and the previous patch together:

   Instrs: 161481888 -> 161297588 (-0.11%); split: -0.12%, +0.01%
   Subgroup size: 8102976 -> 8103000 (+0.00%)
   Send messages: 7895489 -> 7846178 (-0.62%); split: -0.67%, +0.05%
   Cycle count: 16583127302 -> 16703162264 (+0.72%); split: -0.57%, +1.29%
   Spill count: 72316 -> 67212 (-7.06%); split: -7.25%, +0.19%
   Fill count: 134457 -> 125970 (-6.31%); split: -6.83%, +0.52%
   Scratch Memory Size: 4093952 -> 3787776 (-7.48%); split: -7.53%, +0.05%
   Max live registers: 33037765 -> 32947425 (-0.27%); split: -0.28%, +0.00%
   Max dispatch width: 5780288 -> 5778536 (-0.03%); split: +0.17%, -0.20%
   Non SSA regs after NIR: 177862542 -> 178816944 (+0.54%); split: -0.06%, +0.60%

In particular, several titles see incredible reductions in spill/fills:

   Shadow of the Tomb Raider: -65.96% / -65.44%
   Batman: Arkham City GOTY:  -53.49% / -28.57%
   Witcher 3:                 -16.33% / -14.29%
   Total War: Warhammer III:   -9.60% / -10.14%
   Assassins Creed Odyssey:    -6.50% /  -9.92%
   Red Dead Redemption 2:      -6.77% /  -8.88%
   Far Cry: New Dawn:          -7.97% /  -4.53%

Improves performance in many games on Arc A750:

   Cyberpunk 2077: 5.8%
   Witcher 3: 4%
   Shadow of the Tomb Raider: 3.3%
   Assassins Creed: Valhalla: 3%
   Spiderman Remastered: 2.75%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
21636ff9fa brw: Align and combine constant-offset UBO loads in NIR
The hope here is to replace our backend handling for loading whole
cachelines at a time from UBOs into NIR-based handling, which plays
nicely with the NIR load/store vectorizer.

Rounding down offsets to multiples of 64B allows us to globally CSE
UBO loads across basic blocks.  This is really useful.  However, blindly
rounding down the offset to a multiple of 64B can trigger anti-patterns
where...a single unaligned memory load could have hit all the necessary
data, but rounding it down split it into two loads.

By moving this to NIR, we gain more control of the interplay between
nir_opt_load_store_vectorize and this rebasing and CSE'ing.  The backend
can then simply load between nir_def_{first,last}_component_read() and
trust that our NIR has the loads blockified appropriately.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
36d0485ae4 brw: Allow CSE of MEMORY_MODE_CONSTANT loads
This matches the behavior of FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
7ce66e2b61 brw: Add a new MEMORY_MODE_CONSTANT option
This will translate to HDC Constant Cache loads or LSC UGM loads.

On LSC, MEMORY_MODE_UNTYPED would be fine, but for HDC we need to
distinguish between the regular and constant cache data ports.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
cfbb5ebcdd brw: Skip unread leading/trailing components in convergent block loads
The NIR vectorizer may produce block loads with unread trailing
components.  Upcoming passes may produce unread leading components
as well.  With a bit of finesse, we can skip loading those, and only
bother with the ones we actually need.  This can sometimes save us on
loads and MOVs.

v2: Skip this for SLM reads on pre-LSC platforms (caught by Lionel).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
4f0c852a4e brw: Skip unnecessary work for trivial emit_uniformize of IMMs
If we pass an immediate, just trivially return that immediate.

This preserves the property that if x was an IMM, emit_uniformize(x)
will also be an IMM, without the need for optimizations to eliminate
unnecessary operations.  That way, you can call emit_uniformize() on
a value and still check whether it's constant afterwards.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
a0b1e07976 brw: Make get_nir_src_imm() usable for non-32-bit-sizes.
We return an immediate for 32-bit constant values, but fall back to
calling get_nir_src() for other values, as 64-bit, and even 8-bit
immediates have odd restrictions.  We could probably support 16-bit
here without too many issues, but we leave it be for now.

This makes it usable for case where we'd like to get constants for
32-bit values but where it may be a different bit-size too.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
03f948f5fd brw: Skip fetching unread leading components of UBO loads
We were already skipping unread trailing components, but now we skip
them on both ends.

About -3.5% spills on Shadow of the Tomb Raider on Alchemist (mostly a
wash elsewhere, but it will help additional shaders with later patches).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
c8b2ab041e brw: Add more safeguards against misaligned OWord Block messages
HDC doesn't support block loads/stores with sub-DWord (<4B) aligned
offsets, and shared local memory has to use the Aligned OWord Block
messages which require OWord (16B) alignment.

Make the validator detect this case and say no.  Also make the lowering
code assert that the alignment is valid as a second line of defense.

LSC has no such restrictions.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
2f334e8baf nir: Add a nir_def_first_component_read() helper
Similar to nir_def_last_component_read().  Just a little nicer than
prodding at the bitmask of components read directly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Hyunjun Ko
638fc5e472 anv: change bool to VkResult
Fixes: 41caf3665c
("anv/image: allocate some memory for mv storage after video images.")

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/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
ec60462a65 anv: fix to set default cdf buf correctly.
v1. Store cdf index values to the state of the commnad buffer.
(Lionel Landwerlin <lionel.g.landwerlin@intel.com>)

Fixes: dEQP-VK.video.decode.av1.sizeup_8_separated_dpb

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/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
e510efed05 anv: support in-loop super resolution for AV1 decoding
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
788263501d anv: calculate global parmeters correctly 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/32775>
2025-01-10 21:45:04 +00:00
Dave Airlie
8432b8b282 anv: add initial support for AV1 decoding
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
- Allow intrabc
- Fix to manage refrenece frames using referenceNameSlotIndices
- Fix to set bitmask of motion field projection correctly
- Set destination buffer offset to the BSD_OBJECT
- Support 10-bit decoding.
- Fix small bugs.
- Change to C-style comment.

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/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
0fd0a51df6 anv/video: Fix to return supported video format correctly.
Since 8-bit decoding is not default, we need to check the flag too.

Fixes: a64ae20d0 ("anv: support HEVC 10-bit 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/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
3f3d6c04a3 intel/genxml: define MEMORYADDRESSATTRIBUTES for Gen12.5 with TILEF
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/32775>
2025-01-10 21:45:04 +00:00
Dave Airlie
68477ae7c0 genxml: add av1 fields
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
- Remove HuC pipeline params of VD_PIPELINE_FLUSH
- Fix length of AVP_PIPE_MODE_SELECT, AVP_PIC_STATE, AVP_PIPE_BUF_ADDR_STATE

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/32775>
2025-01-10 21:45:04 +00:00
Dave Airlie
6a28e7a6c7 anv: add default av1 tables from media-driver
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
- Change to C-style comment.

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/32775>
2025-01-10 21:45:04 +00:00
Brian Paul
b13e2a495e svga: add svga_resource_create_with_modifiers() function
The dri_create_image() function returns early if the gallium
driver does not implement this function.  Surface creation has
been broken for some time up to this fix.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.Bhende@broadcom.com>
Reviewed-by: Neha Bhende <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32976>
2025-01-10 21:15:12 +00:00
Caio Oliveira
7fadd864dd intel/elk: Fix typo in assertion
Just assert that the array will fit whatever the MAX is for a given
Gfx version.

Fixes: 172c1ab984 ("intel/elk: Add ELK_MAX_MRF_ALL for static allocating arrays")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32978>
2025-01-10 20:16:59 +00:00
Mike Blumenkrantz
010732b8ef glsl: enable OVR_multiview if OVR_multiview2 is enabled
according to spec

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")

Reviewed-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/32946>
2025-01-10 19:10:48 +00:00
Mike Blumenkrantz
3c5eae639d glsl: make gl_ViewID_OVR visible to all shader stages
according to spec

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")

Reviewed-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/32946>
2025-01-10 19:10:48 +00:00
Mary Guillemard
bacc5f4579 pan/genxml: Switch __gen_unpack to macros
This switch all __gen_unpack functions to macros 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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
3f3bb741fb pan/genxml: Switch [un]pack codegen to macros
Because of OpenCL C, we need a way to retain address space information
contains with the pointers.

As a result this switch all [un]pack functions to macros, resulting in
pointers retaining their respective address space information.

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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
e15940008f pan/genxml: Switch pan_section_ptr to cast to packed type
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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
3b69edf825 pan/genxml: Enforce explicit packed types on pan_[un]pack
Provide a pan_cast_and_[un]pack() to help with the transition.
Those helpers should only be used when the caller is sure the
destination is big enough to emit the descriptor.

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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
bd80037441 pan/genxml: Move [un]pack internals to use packed structs
We are now strongly typing everything, pan_[un]pack wil enforce this at
the API level next.

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/32962>
2025-01-10 18:27:27 +00:00
Boris Brezillon
b9caca64f2 pan/genxml: Generate MALI_XXX_PACKED_T macros
Will be useful to easily define packed type variables from the
pan_[un]pack() functions, which we'll need during the pan_pack
revamp.

Signed-off-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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
39d8b56c4a pan/genxml: Emit struct details before pack function
We are going to use packed structs in [un]pack next so we need those to
be emitted before them.

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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
95435a788d pan/genxml: Switch unpack to use uint32_t
Makes this match pack.

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/32962>
2025-01-10 18:27:27 +00:00
Boris Brezillon
ab1cd917ad pan/genxml: Include pan_pack_helpers.h instead of copying it
The generic bits in autogen pack helpers files were extracted in a
common header, so let's include it from the autogenerated file rather
than copying its content there.

Signed-off-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/32962>
2025-01-10 18:27:27 +00:00
Boris Brezillon
39461e5818 pan/genxml: s/PAN_PAN_HELPERS_H/PAN_PACK_HELPERS_H/
Fix a typo in the multi-inclusion guard.

Signed-off-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/32962>
2025-01-10 18:27:27 +00:00
Eric Engestrom
519f4bba6b docs/release-calendar: push the 25.0 branchpoint back by 2 weeks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32975>
2025-01-10 18:19:06 +00:00
Michael Cheng
c3c05ffb5f intel : Expose Shader hashes for utrace and Perfetto
This patch exposes shader hashes (computes and draws) to Perfetto and
utrace. By including these hashes in traces, developers can correlate
compute and draw calls with their assoicated ASM dumps when analyzing
the traces.

To achieve this, intel_tracepoint.py has been reworked to preprocess
tracepoint arguments dynamically. Any argument containing "hash" in its
variable name is now forrmated as hexadecimal before being passed to the
tracepoint definition.

Signed-off-by: Michael <michael.cheng@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32708>
2025-01-10 17:38:16 +00:00
Boris Brezillon
6f8fb6d73d panfrost/ci: Add panvk and panfrost to the debian-x86_32 job
Useful to catch compile-time regressions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32938>
2025-01-10 15:53:36 +00:00
Boris Brezillon
dc1b988273 panvk: Fix panvk_priv_mem_bo() on 32-bit platforms
Masking with an ~7ull promotes the value to 64-bit, leading
to a size mismatch when we cast it to a pointer.

Make sure we're using an uintptr_t type for the mask.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32938>
2025-01-10 15:53:36 +00:00
Boris Brezillon
134f965b88 panvk: Fix an alignment issue on x86
On x86-32, long long are aligned on 4-bytes only, which breaks
the assumption we had about our sysvals struct layouts.

Define an aligned_u64 embedding the alignment attribute to
keep the alignment sane.

While at it, enforce this alignment with an alignment attribute
on the struct itself.

This fixes the build on x86-32, and should do what we expect,
though it's not been tested in practice.

Fixes: ae76a6a045 ("panvk: Pack push constants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12429
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32938>
2025-01-10 15:53:36 +00:00
Rhys Perry
2b10930b48 aco: use VOP3 v_mov_b16 if necessary
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32944>
2025-01-10 15:05:00 +00:00
Rhys Perry
46787fc2d0 aco/util: fix bit_reference::operator&=
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32944>
2025-01-10 15:05:00 +00:00
Erik Faye-Lund
4ff5672730 docs: update panvk status
We enabled fragmentStoresAndAtomics, but forgot to update this file.
Also add drawIndirectFirstInstance, which I missed last time I updated
the new features.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32960>
2025-01-10 11:35:56 +00:00
Lucas Stach
3a0d4c4203 ci/etnaviv: drop failures caused by missing vertex attributes
Now that we fill in a dummy state, instead of allowing the FE to
run with undefined state when no vertex attributes are present
we can drop the failures that were caused by this issue.

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/32947>
2025-01-10 10:57:58 +00:00
Lucas Stach
5ca8feb28b etnaviv: fix rendering without vertex buffers/attributes
The hardware doesn't allow to disable all vertex attribute streams,
so we end up with random FE state when a draw without vertex
attributes is encountered. Plug in a dummy attribute and vertex
buffer to avoid this.

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/32947>
2025-01-10 10:57:58 +00:00
Lucas Stach
bca5ef70a4 etnaviv: split dummy RT backing store from reloc
The dummy BO used as backing store for the dummy render target
can be reused for other usages where we don't care about the
actual content of the buffer. Split it out from the dummy RT
reloc to make this more clear.

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/32947>
2025-01-10 10:57:58 +00:00
David Rosca
c23df7e790 frontends/va: Only report surface alignment when non-zero
Otherwise this means the alignment is 1x1 which is wrong.

Fixes: b24748a93a ("frontends/va: add surface alignment attribute")
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32923>
2025-01-10 10:10:41 +00:00
Lukas Lipp
c0ef005bf4 wsi: Fix wrong function name for lvp wsi metal surface
Fixes: a42c2293ab
Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32878>
2025-01-10 09:27:02 +00:00
David Rosca
42595eb52e radeonsi/vcn: Fix crash when failing to allocate internal buffers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11725
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32901>
2025-01-10 07:43:08 +00:00
Caio Oliveira
c9e667b7ad intel/elk: Remove uses of VLAs
Was causing trouble in some build configurations, we don't really need
them.  Unless there's a good reason, defaults to use ralloc for
consistency with the larger codebase.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
172c1ab984 intel/elk: Add ELK_MAX_MRF_ALL for static allocating arrays
Replace usage of variable length arrays.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
4d43ee0dd6 intel/brw: Remove uses of VLAs
Was causing trouble in some build configurations, we don't really need
them.  Use ralloc for consistency.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
faf4c35b74 intel/compiler: Use linear allocator for ACP trees in copy-prop
Replace usage of variable length array.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
d35b6919a5 util: Add operator new[] to linear context helper declarations
This allow us to allocate arrays with `new (lin_ctx) MyStruct[10]`.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
e6a3770433 intel/compiler: Use INFINITY spill cost to represent no_spill
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Marek Olšák
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/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
239840556f radeonsi/gfx12: use ACO if LLVM is 19 or older
LLVM 19 is missing a SALU hazard fix.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
b05fa7d575 radeonsi/gfx12: set DIS_PG_SIZE_ADJUST_FOR_STRIP after shader compilation
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
4cfa4e9dd7 radeonsi/gfx12: enable alt_hiz_logic
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
1b405a12e0 radeonsi: only set BREAK_PRIMGRP/WAVE_AT_EOI when TES/GS need PrimID sysval after TES
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:52 -05:00
Marek Olšák
f06a103eea radeonsi: don't set BREAK_PRIMGRP/WAVE_AT_EOI when tessellation is disabled
It's not required and it decreases performance.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 22:44:44 -05:00
Konstantin Seurer
963f8fff1e meson: Include the loader subdir when building lavapipe
This could be skipped when building only lavapipe with only x11.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32883>
2025-01-10 01:24:11 +00:00
Konstantin Seurer
23a96b1537 lavapipe: Check the pool type in handle_reset_query_pool
Avoids a segmentation fault when resetting acceleration structure
queries.

Fixes: 897ccbd ("lavapipe: Implement VK_KHR_acceleration_structure")
Closes: #12289
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32616>
2025-01-10 00:58:17 +00:00
Konstantin Seurer
fac818bdb3 meson: Require glslangValidator when building lavapipe
The tool is required by the runtime for acceleration structures.
Lavapipe uses some of those runtime helpers and will use more of them in
the future (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426),
especially those that have a hard requirement for the tool.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12412
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12437
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32882>
2025-01-10 00:08:30 +00:00
José Roberto de Souza
022671f2c4 iris: Rename BO_ALLOC_COHERENT to BO_ALLOC_CACHED_COHERENT
BO_ALLOC_COHERENT is not a good name as it can mean 2 different memory
types: cached+coherent and uncached+coherent, so
here renaming it to BO_ALLOC_CACHED_COHERENT that is more close to the
usage that we have for it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28774>
2025-01-09 23:40:53 +00:00
José Roberto de Souza
3db38d05d4 iris: Drop BO_ALLOC_COHERENT from iris_utrace_create_ts_buffer()
timestamp is not modified by CPU, it is written by GPU and just read
by CPU.
As all BOs in Iris are CPU coherent, there is no need to keep this
flag.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28774>
2025-01-09 23:40:52 +00:00
Timur Kristóf
dd980d2b28 radv: Only print "testing use only" message on GFX12+.
This message has been confusing users, especially now that
popular toolkits such as Gtk started using a Vulkan renderer.

Printing a message on non-conformant implementations is also
actually not required. So let's remove it.

We haven't fully finished the GFX12 implementation yet,	but on
all other hardware, RADV should	work just fine,	and is definitely
not meant for "testing use only".

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12314
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32930>
2025-01-09 23:16:48 +00:00
Mike Blumenkrantz
fafa71b6ad zink: use internal map flag for qbos
DONTBLOCK is sort of almost good enough except that the api frontend
can also use this and it can't use the full power of Trust Me Buddy™
that qbo maps require

this causes unnecessary ioctl syncs, which annihilates perf in games
that constantly check query results

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31823>
2025-01-09 22:45:27 +00:00
Mike Blumenkrantz
17ca1bfbf7 zink: rework query result checking
this allows a return without checking syncobj, avoiding overhead,
but when a query still isn't completing after multiple checks then
try checking the pool directly

this circumvents the usual qbo mechanism in specific cases (e.g., Everspace)
where an app fires off a million timestamp queries and the overhead of
checking a timeline semaphore kills perf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31823>
2025-01-09 22:45:27 +00:00
Marek Olšák
e640d5a9c3 amd: vectorize SMEM loads aggressively, allow overfetching for ACO
If there is a 4-byte hole between 2 loads, they are vectorized. Example:
    load 4 + hole 4 + load 8 -> load 16
This helps GLSL uniform loads, which are often sparse. See the code for more
info.

RADV could get better code by vectorizing later.

radeonsi+ACO - TOTALS FROM AFFECTED SHADERS (45482/58355)
  Spilled SGPRs: 841 -> 747 (-11.18 %)
  Code Size: 67552396 -> 65291092 (-3.35 %) bytes
  Max Waves: 714439 -> 714520 (0.01 %)

This should have no effect on LLVM because ac_build_buffer_load scalarizes
SMEM, but it's improved for some reason:

radeonsi+LLVM - TOTALS FROM AFFECTED SHADERS (4673/58355)
  Spilled SGPRs: 1450 -> 1282 (-11.59 %)
  Spilled VGPRs: 106 -> 107 (0.94 %)
  Scratch size: 101 -> 102 (0.99 %) dwords per thread
  Code Size: 14994624 -> 14956316 (-0.26 %) bytes
  Max Waves: 66679 -> 66735 (0.08 %)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29399>
2025-01-09 22:01:54 +00:00
Marek Olšák
e0c343888f radeonsi: lower descriptors sooner to allow vectorizing descriptor loads
The comment was wrong.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29399>
2025-01-09 22:01:54 +00:00
Marek Olšák
abd5216ae8 ac,radeonsi: scalarize overfetching loads
There is nothing preventing ACO from generating loads with unused
components. This happens often with GLSL uniforms. Some of those loads
are partially re-vectorized after this.

radeonsi+ACO:

TOTALS FROM AFFECTED SHADERS (19564/58918)
  VGPRs: 732900 -> 728448 (-0.61 %)
  Spilled SGPRs: 429 -> 433 (0.93 %)
  Code Size: 38446004 -> 38485612 (0.10 %) bytes
  Max Waves: 305440 -> 305549 (0.04 %)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29399>
2025-01-09 22:01:54 +00:00
Sagar Ghuge
710624fcc0 anv: Use 3DSTATE_URB_ALLOC_* instructions
Use 3DSTATE_URB_ALLOC_* instruction to program URB for multislice device
config.

In case only one slice is available in the device, SliceN fields will be
ignored by HW.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Sagar Ghuge
604a384e97 blorp: Use 3DSTATE_URB_ALLOC_* instructions
Use 3DSTATE_URB_ALLOC_* instruction to program URB for multislice device
config.

In case only one slice is available in the device, SliceN fields will be
ignored by HW.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Sagar Ghuge
190bde3969 iris: Use 3DSTATE_URB_ALLOC_* instructions
Use 3DSTATE_URB_ALLOC_* instruction to program URB for multislice device
config.

In case only one slice is available in the device, SliceN fields will be
ignored by HW.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Sagar Ghuge
0bca8da981 intel/genxml: Update URB related instructions and structures
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Marek Olšák
58a88bbdb9 ac/nir/ngg: export positions after streamout to improve performance
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
fc73749d6c ac/nir/ngg: fold so_vertex_index * so_stride into immediate offset
Instead of using a different voffset VGPR per streamout vertex,
point voffset to the first vertex for all 3 vertices because
the stride and vertex index are constant and can be in the immediate
offset.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
97e82af162 ac/nir/ngg: vectorize streamout stores for NGG optimally
Walk the whole vertex stride thanks to XFB info sorted by offset, gather
individual components from same or different outputs, and once we have
gathered 4, store them as vec4.

It also removes the memory_modes field from VMEM stores because I don't
think it's needed.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
4f2e2e10bc ac/nir: vectorize streamout stores for legacy pipeline optimally
Walk the whole vertex stride thanks to XFB info sorted by offset, gather
individual components from same or different outputs, and once we have
gathered 4, store them as vec4.

It also removes the COHERENT flag from VMEM stores because NGG streamout
doesn't use it either and I don't think it's needed.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
e399f3bed9 ac/nir: sort xfb info to facilitate vectorization of xfb stores
xfb stores are not vectorized properly, leading to generating random soup
of b32, b64, b96, and b128 stores.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Karol Herbst
c8833703b2 rusticl/mesa: rework image and sampler view creation APIs
The mesa crate should just provide the means of creating those, but the
logic of what to create shouldn't be there.

The passed in arguments also heavily vary, and this way we can be explicit
about what variants needs what inputs.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
26df5938cf rusticl/mem: add functions to create sampler and image views to Image
This allows us to use more contextual information of the image to create
the pipe_sampler_view properly instead of passing all the required
properties via function arguments.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
b759618d55 rusticl/kernel: create the sampler views earlier
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
255a523a0f rusticl/mesa: use PipeSamplerView over the raw type
Also deal with allocation failures while at it.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
80b81ed58e rusticl/mesa: add PipeSamplerView wrapper
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
b94d4f90f2 rusticl/mesa: set take_ownership to true for set_sampler_views
This simplifies sampler view tracking a bit for us. Also, drivers will
automatically free the pipe_sampler_view as well.

It was wrong to call into sampler_view_destroy directly anyway, because
pipe_sampler_view is a refcounted object and pipe_sampler_view_reference
should be used instead.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
90d83f4c30 rusticl/kernel: fix image_size of 1D buffer images
We can't use the size of the backing resource, but have to rather specify
how much of the buffer resource are used for the 1Dbuffer image.

Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Mel Henning
b99772e71e nak: Add gpr_limit_from_local_size
I stumbled on this limit - it turns out that large local_sizes apply an
additonal limit on gprs per thread. If we violate this limit, then dmesg
just gives us a rather unhelpful message that the channel is killed:

    nouveau 0000:01:00.0: gsp: rc engn:00000001 chid:64 type:13 scope:1 part:233
    nouveau 0000:01:00.0: fifo:c00000:0008:0040:[hw_tests::test_[14761]] errored - disabling channel

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32952>
2025-01-09 19:32:52 +00:00
Mel Henning
914c722eb0 nak: Add ShaderModel::hw_reserved_gprs()
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32952>
2025-01-09 19:32:52 +00:00
M Henning
8c48a61a3c nak/hw_runner: Skip copy call for empty buffer
copy requires non-null pointers even for zero-size copies. Skip the
call so it's legal to pass in null buffers of zero size.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32952>
2025-01-09 19:32:52 +00:00
Lionel Landwerlin
58b604abdf intel: fix generation shader on Gfx9
This probably interacts badly with the LLVM17+ opaque pointer
workaround. Hopefully I can move this all over Alyssa's pass.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12413
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32958>
2025-01-09 18:12:47 +00:00
Lionel Landwerlin
08e82b28e8 anv: use the correct MOCS for depth destinations
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/31778>
2025-01-09 17:47:27 +00:00
Juan A. Suarez Romero
45ada1c7fb broadcom/ci: add ubsan jobs for broadcom drivers
Use Undefined Behaviour Sanitizer to detect issues in v3d/v3dv, as well
as in vc4.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
37ee035e42 ci/build: add ubsan build jobs
This adds build jobs to support Undefined Behaviour Sanitizer (UBSan),
both in x86_64 and arm64.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
48603f08fb etnaviv: cast assertion
Cast the value used in static assertion to be an unsigned integer,
instead of default signed integer.

This has been detected by Undefined Behaviour Sanitizer (UBSan).

```
../src/gallium/drivers/etnaviv/etnaviv_state.c:289:62: error: expression in static assertion is not constant
  289 |       static_assert((VIVS_PS_OUTPUT_REG2_SATURATE_RT4 << 24) == VIVS_PS_OUTPUT_REG2_SATURATE_RT7, "VIVS_PS_OUTPUT_REG2_SATURATE_RT7");
```

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
6aafb58432 virgl: fix member access to a NULL pointer struct
This fixes VirglStagingMgr tests that tries to access a struct member of
a structure that is NULL.

This has been detected using Undefined Behaviour Sanitizer.

```
Running main() from ../src/gtest/src/gtest_main.cc
[==========] Running 9 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 7 tests from VirglStagingMgr
[ RUN      ] VirglStagingMgr.non_fitting_allocation_reallocates_resource
stderr:
../src/gallium/drivers/virgl/tests/virgl_staging_mgr_test.cpp:72:22: runtime error: member access within null pointer of type 'struct virgl_hw_res'
```

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
e54a15f700 v3d: fix format overflow error
Detected when working on adding support for Undefined Behaviour
Sanitizer, this fixes:

```
../src/gallium/drivers/v3d/v3d_screen.c: In function 'v3d_get_compute_param.part.0':
../src/gallium/drivers/v3d/v3d_screen.c:480:17: error: null destination pointer [-Werror=format-overflow=]
  480 |                 sprintf(ret, "v3d");
      |                 ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
0114d293fc radeonsi/vcn: fix maybe uninitialized
Detected when working on adding support for Undefined Behaviour
Sanitizer, this fixes:

```
../src/gallium/drivers/radeonsi/radeon_vcn_dec.c: In function 'get_h264_msg':
../src/gallium/drivers/radeonsi/radeon_vcn_dec.c:239:50: error: 'k' may be used uninitialized [-Werror=maybe-uninitialized]
  239 |                                            && (k == ARRAY_SIZE(dec->h264_valid_poc_num))) {
      |                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gallium/drivers/radeonsi/radeon_vcn_dec.c:77:19: note: 'k' was declared here
   77 |    unsigned i, j, k;
      |                   ^
cc1: all warnings being treated as errors
```

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
9d6c667151 freedreno: a2xx: fix maybe uninitialized variable
Detected when working on adding support for Undefined Behaviour
Sanitizer, this fixes:

```
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c: In function 'load_const':
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c:154:24: error: 'swiz' may be used uninitialized [-Werror=maybe-uninitialized]
  154 |    unsigned imm_ncomp, swiz, idx, i, j;
      |                        ^~~~
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c:195:30: error: 'imm_ncomp' may be used uninitialized [-Werror=maybe-uninitialized]
  195 |    so->immediates[idx].ncomp = imm_ncomp;
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c:154:13: note: 'imm_ncomp' was declared here
  154 |    unsigned imm_ncomp, swiz, idx, i, j;
      |             ^~~~~~~~~
cc1: all warnings being treated as errors
```

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Erik Faye-Lund
dab7b23d3a docs/panfrost: document vulkan support
We have some limited support for Vulkan these days. Let's document that.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32836>
2025-01-09 16:20:55 +00:00
Mike Blumenkrantz
a5c3c452b8 mesa: use default params for clearbuffer functions
this might otherwise pull in user-specified params
from the unpack buffer and access arbitrary data

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32945>
2025-01-09 15:48:10 +00:00
Mike Blumenkrantz
92d6351d02 zink: restrict implicit feedback loop detection using miplevels/layers
this improves perf by like 70-100% in games like Everspace, which draw
to a different miplevel of the same image that the fragment shader samples

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32950>
2025-01-09 15:17:36 +00:00
José Roberto de Souza
1d1d5653ac anv: Check VkResult main batch buffer before start companion batch buffer
It could run the companion batch buffer even if the main batch buffer
failed, that was possible to happen in i915 and Xe KMD.

In case the main context/queue is banned and companion is not it could
still return that submission was properly start what was not.

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/32850>
2025-01-09 13:47:28 +00:00
José Roberto de Souza
4c6194cae0 anv: Check VkResult of perf query batch buffer
On i915 it could be executing the main batch buffer in
i915_queue_exec_locked() even if the perf query batch buffer failed.

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/32850>
2025-01-09 13:47:28 +00:00
Valentine Burley
6d2749539b zink/ci: Skip crashing trace in zink-anv-tgl-traces-restricted
Skip the Raven-f10900-v2 trace until the issues are solved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32921>
2025-01-09 14:05:15 +01:00
Valentine Burley
39cee5351f freedreno/ci: Update a630-traces-restricted checksums
These changed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32921>
2025-01-09 14:05:15 +01:00
Valentine Burley
4fd4358ba9 ci: Add Valentine to the restricted traces access list
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
372973cd2a zink/ci: Increase zink-anv-tgl parallelism to 4
Thanks to the migrations, we now have enough 1160g7-volteer DUTs
to increase the parallelism of pre-merge zink TGL testing. This
allows us to reduce the fraction of Piglit tests and introduce
fractional GLESCTS testing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
1f34bc5e42 zink/ci: Migrate the two TGL traces jobs to 1130g7-volteer
Move zink-anv-tgl-traces and zink-anv-tgl-traces-restricted to
the smaller 1130g7-volteer DUT. These jobs are quick and short,
allowing us to use the 1160g7-volteer device for more
performance-sensitive tasks.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
288249811d anv/ci: Increase anv-tgl-angle parallelism to 2
We have enough DUTs available, so increase parallelism to ensure
that we stay within the 10-minute time limit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
71704ac2c6 virgl/ci: Migrate the two iris jobs to 1130g7-volteer
Both virgl-iris-traces and virgl-iris-traces-performance jobs are
currently disabled for being broken, but we'll want to use the
smaller volteer DUT for them when they are re-enabled.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
c71a7ffc02 virgl/ci: Disable virgl-iris-traces-performance
This job has never passed a run in a long time. It fails with
the following error when triggered:

head: cannot open '/dev/dri/renderD128' for reading: No such file or directory

Disable it until it's fixed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Samuel Pitoiset
f09f31d093 ac/nir: fix a comment typo in load_subgroup_id_lowered()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32940>
2025-01-09 08:02:19 +00:00
Samuel Pitoiset
44ba856089 ac/nir: fix lowering subgroup ID for compute shaders on GFX12
This is lowered in backend compilers (LLVM or ACO) because it needs
to access ttmp registers which aren't exposed to NIR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32940>
2025-01-09 08:02:19 +00:00
Samuel Pitoiset
bc1374355b radv: program DB_RENDER_OVERRIDE correctly on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32941>
2025-01-09 07:39:23 +00:00
Vinson Lee
83809f06a7 intel/elk: Fix assert with side effect
Fix defect reported by Coverity Scan.

Side effect in assertion (ASSERT_SIDE_EFFECT)
assert_side_effect: Argument ++eot_count of assert() has a side effect.
The containing function might work differently in a non-debug build.

Fixes: ebd6738260 ("intel/elk/chv: Implement WaClearArfDependenciesBeforeEot")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32884>
2025-01-09 04:07:42 +00:00
Vinson Lee
9b0fc62221 vulkan: Add missing va_end
Fix defect reported by Coverity Scan.

Missing varargs init or cleanup (VARARGS)
missing_va_end: va_end was not called for ap.

Fixes: f8b584d6a5 ("vulkan/runtime,radv: Add shared BVH building framework")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32858>
2025-01-08 19:18:32 -08:00
Aleksi Sapon
60e97e16aa meson: fix finding Python on Windows
On Windows, a venv has no versioned aliased to `python`.
`python3` will never be found from a venv.

Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32934>
2025-01-08 22:47:42 +00:00
David Heidelberg
5774f2c66e drm-uapi: update licenses statement
Replace deprecated GPL-1.0+ with clear GPL-1.0-or-later.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
cc85d0c156 licenses: add missing licenses
Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
fa2fddbf3a c11: use SPDX-License-Identifier header
Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
c22d640fe9 docs: move license(s) to licenses directory
Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
6f08f921bf docs: Clarify project name and include Mesa3D
Mesa3D is commonly used, as evidenced by the use of the Mesa3D.org domain.

Additionally, it is unnecessary to advise against using "MesaGL"
since we do not use it ourselves.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
69849bc4d1 docs: remove deprecated component list and licenses
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12180
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
Matt Turner
89da5a9626 intel/decoder: Avoid duplicate symbols when expat is not available
Fixes: 0669210ef4 ("intel/decoder: Add ELK support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12335
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32732>
2025-01-08 18:58:35 +00:00
Eric Engestrom
731138386a docs/release-calendar: fixup sed fail
Fixes: 1a41743764 ("docs/release-calendar: add 25.0 branchpoint and RCs schedule")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32949>
2025-01-08 17:39:58 +00:00
Eric R. Smith
d0a95541fe panvk: re-enable fragmentStoresAndAtomics for v10
This feature actually worked, but accidentally triggered some
CTS failures due do an unrelated sample_mask bug. That bug
is fixed in the previous commits in this series, so re-enable
fragmentStoresAndAtomics.

There are two spurious CI failures created by this change; one is in
a ycbcr test (which we're still working on) and the other is a CTS
bug (it's using a feature we don't advertise).

Reviewed-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/32879>
2025-01-08 16:45:21 +00:00
Eric R. Smith
03a1a5009f panfrost: ensure sample_mask is written before color
The ATEST instruction needs sample_mask as an input, but if the
shader writes to color before sample_mask we could emit them
in the wrong order. Fix this in pan_nir_lower_zs_store by
deferring the color write until after the sample_mask write.

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/32879>
2025-01-08 16:45:21 +00:00
Eric R. Smith
115eb1d5f3 panfrost: Allow ATEST input to be a FAU index
We have an assert requiring that the sample_mask source for
ATEST be a register. However, the sample mask code can
sometimes produce a FAU index, and this actually works
correctly (tested with the vk and gl CTSes).

Reviewed-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/32879>
2025-01-08 16:45:21 +00:00
Eric Engestrom
1a41743764 docs/release-calendar: add 25.0 branchpoint and RCs schedule
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32948>
2025-01-08 16:36:46 +00:00
Alyssa Rosenzweig
d9b4867e2a nir/lower_robust_access: fix robustness with atomic swap
this was missed in the original v3d pass, and then the common code port
inherited the bug. (so strictly this fix "should" be backported even farther
back but it won't apply before the Fixes here, and I don't think we do LTS that
far back anyway).

in theory this should fix a corner case with robustness on the gl (but not
vulkan, at least for apple) drivers on broadcom & apple.

Fixes: f0fb8d05e3 ("nir: Add nir_lower_robust_access pass")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32907>
2025-01-08 15:59:05 +00:00
Alyssa Rosenzweig
7a4469681e nir: pass a callback to nir_lower_robust_access
rather than try to enumerate everything a driver might want with an unmanageable
collection of booleans, just do a filter callback + data. this ends up simpler
overall, and will allow Intel to use this pass for just 64-bit images without
needing to add even more booleans.

while we're churning the pass signature, also do a quick port to
nir_shader_intrinsics_pass

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> [NIR and V3D]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32907>
2025-01-08 15:59:05 +00:00
Rhys Perry
8ac4744706 aco/tests: fix skip_lines=True with remaining characters in matches
If the remaining character check fails, we should try a later line if
skip_lines=True. So the check has to be done earlier.

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/32902>
2025-01-08 15:28:37 +00:00
Lucas Stach
8a55de3338 ci/etnaviv: drop GC2000 flat shading fails
Now that the varying use is properly set for color varyings, tests
related to flatshading are fixed.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
ef2d7a5066 etnaviv: emit full varying component use
Emit usages for varying components 32-63.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
ca5a9a3861 etnaviv: fix flatshading
color varyings must be properly annoted, so they don't get interpolated
when the rasterizer is configured for flatshading. For whatever reason
the etnaviv NIR compiler failed to do so from its inception.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
2483d28d0b etnaviv: clean up component use setting in linker
Use a trivial loop instead of duplicating the code for each
component.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
cca43e76e1 etnaviv: Update headers from rnndb
Update to rnndb commit 1b944df41e12.

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/32922>
2025-01-08 13:55:26 +00:00
Daniel Schürmann
d2f52e61c2 nir/divergence: change nir_has_divergent_loop() to return true only for divergent breaks
The important information is whether a loop has a uniform number
of iterations.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28627>
2025-01-08 13:33:54 +01:00
Mary Guillemard
42f6bb0456 libcl: Add VkQueryType and VkQueryResultFlagBits definitions
Useful for query pool copy/clear meta shaders.

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/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
9911e313d0 pan/genxml: Move pack_header to an external file
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/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
27d94a16c7 panforst: Update ForEachMacros
We have various clang-format issues around on some common code macros.

This should fix this in panvk at least

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/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
2e38a15070 libcl: Respect NDEBUG for assert
In C, NDEBUG allows disabling the assert macro, let's follow this
behaviour.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
ecdccae990 nir,agx: Allow nir_precomp_print_blob to print a static array
This makes it stop leaking shader binary blobs definition and is
required for panfrost clc.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
5f8addfd99 util/bitpack_helpers: Make fixed packs CL safe
We emulate roundf and llroundf for compatibility.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
bd872e2aaa util/bitpack_helpers: Use UINT64_MAX instead of ~0ULL
This fixes issues with LLVM on OpenCL C failing to represent 128-bit
integers.

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/32939>
2025-01-08 11:37:27 +00:00
Boris Brezillon
9ba38350de panvk/jm: Fix depth clipping with small viewport depth range
Same as 7ca01506c9 ("panvk: hack to improve depth clipping with
small viewport depth range") but applied to the JM backend.

Signed-off-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/32905>
2025-01-08 11:13:18 +00:00
Boris Brezillon
3b6f0ce032 panvk: Don't invalidate the viewport on cull mode updates
vk_rasterization_state_depth_clip_enable() checks the clip and clamp
modes, not the cull mode. RS_DEPTH_CLIP_ENABLE got confused with
RS_CULL_MODE in 7ca01506c9 ("panvk: hack to improve depth clipping
with small viewport depth range").

Fixes: 7ca01506c9 ("panvk: hack to improve depth clipping with small viewport depth range")
Signed-off-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/32905>
2025-01-08 11:13:18 +00:00
Friedrich Vock
71392fff25 aco: Fix dead instruction/index handling for try_insert_saveexec_out_of_loop
The loop checking if exec is overwritten didn't check for NULL
instructions, and didn't fix up reg write indices after inserting
instructions.

Fixes: fcd94a8c ("aco: move try_optimize_branching_sequence() to postRA optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32746>
2025-01-08 10:48:01 +00:00
Georg Lehmann
67d74a04b9 nir/peephole_select: allow load_vector/scalar_arg_amd
Foz-DB Navi21:
Totals from 1507 (1.90% of 79395) affected shaders:
MaxWaves: 31830 -> 31870 (+0.13%); split: +0.20%, -0.08%
Instrs: 938704 -> 937232 (-0.16%); split: -0.19%, +0.03%
CodeSize: 4970860 -> 4964652 (-0.12%); split: -0.14%, +0.02%
VGPRs: 79536 -> 79512 (-0.03%); split: -0.08%, +0.05%
Latency: 5194524 -> 5218285 (+0.46%); split: -0.38%, +0.84%
InvThroughput: 1200152 -> 1207251 (+0.59%); split: -0.02%, +0.61%
VClause: 20728 -> 20741 (+0.06%); split: -0.11%, +0.17%
SClause: 33612 -> 32871 (-2.20%); split: -2.78%, +0.57%
Copies: 70601 -> 68847 (-2.48%); split: -2.62%, +0.13%
Branches: 20032 -> 17521 (-12.53%)
PreSGPRs: 47828 -> 47801 (-0.06%)
VALU: 637446 -> 638094 (+0.10%); split: -0.02%, +0.13%
SALU: 88627 -> 88462 (-0.19%); split: -1.08%, +0.90%
VMEM: 36664 -> 36659 (-0.01%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32792>
2025-01-08 09:56:39 +00:00
Georg Lehmann
208d8cd715 radv: run peephole_select in optimize_nir_algebraic
Foz-DB Navi21:
Totals from 451 (0.57% of 79395) affected shaders:
MaxWaves: 8680 -> 8616 (-0.74%)
Instrs: 689610 -> 688225 (-0.20%); split: -0.21%, +0.01%
CodeSize: 3524580 -> 3521740 (-0.08%); split: -0.11%, +0.03%
VGPRs: 28512 -> 28584 (+0.25%)
Latency: 1906219 -> 1892124 (-0.74%); split: -0.91%, +0.17%
InvThroughput: 481931 -> 483570 (+0.34%); split: -0.00%, +0.34%
VClause: 10317 -> 10296 (-0.20%)
SClause: 18105 -> 18088 (-0.09%); split: -0.17%, +0.07%
Copies: 69532 -> 67579 (-2.81%); split: -2.85%, +0.04%
Branches: 21353 -> 20501 (-3.99%)
PreSGPRs: 27004 -> 27005 (+0.00%)
VALU: 436235 -> 436334 (+0.02%); split: -0.01%, +0.03%
SALU: 102349 -> 101944 (-0.40%); split: -0.61%, +0.21%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32792>
2025-01-08 09:56:39 +00:00
Christian Gmeiner
b6ef9017f4 etnaviv: isa: Support src2 for texldb and texldl
We need to add variants of these instructions, which are used with a shadow
samper and passed the shadow reference value via src2.

Fixes: abe5bd35 ("etnaviv: Switch to isa_assemble_instruction(..)")
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/32926>
2025-01-08 07:57:39 +00:00
Christian Gmeiner
5daa47c1f8 etnaviv: isa: Support src2 for texld
We need to add a variant of the texld instruction, which is used with a shadow
samper and passed the shadow reference value via src2.

Blob generates such texld's for deqp's GLES3.functional.texture.shadow.2d.* (GC3000).
Fixes spec@arb_depth_texture@texdepth.

Fixes: abe5bd35 ("etnaviv: Switch to isa_assemble_instruction(..)")
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/32926>
2025-01-08 07:57:39 +00:00
Lucas Stach
9e71829bcf etnaviv: isa: fix typo in SRC2_USE map
Fixes: b216fd044b ("etnaviv: isa: Add encode support")
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/32926>
2025-01-08 07:57:39 +00:00
Kenneth Graunke
35f175301d brw: Fix vectorizer hole_size condition after signedness change
Marek recently changed hole_size to be signed, rather than unsigned.
A negative hole_size means that the two loads overlap - and thus are
prime candidates to be combined.

My original hole_size handling was:

   if hole_size > 4 * (8 - low->num_components) then don't vectorize

For non-overlapping loads, this worked: NIR's largest vector is vec16,
and if low was already a vec16, combining it with anything would exceed
that, so it'd never be considered.  That meant low would always be a
vec8 or less, so (8 - low->num_components) was a positive number.

Now that we see overlapping loads, we can see a vec16 low, vec4 high,
and also a negative hole size, giving us fun comparisons like:

   -16 > 4 * (8 - 16)   =>   -16 > -32   => true, don't vectorize

Which is absolutely the wrong thing to do, because the high load's data
is entirely included within the former load's data.

The idea here was to make sure the second load would be able to pack at
least one component into the first's V8 result.  But even this isn't the
best, because...even if it's simply adjacent, doing one V16 load is more
efficient than requesting two back to back V8 loads.

So, we just simplify down to a static check: if there's an entire V8 of
hole, don't vectorize.  This already won't happen because the core pass
has max_hole set to 28 bytes (7 32-bit components), but that could
change based on the needs of other drivers, so let's be defensive.

fossil-db results on Alchemist:

   Instrs: 161533978 -> 161295137 (-0.15%); split: -0.20%, +0.05%
   Subgroup size: 8092544 -> 8092568 (+0.00%)
   Send messages: 7915233 -> 7844503 (-0.89%); split: -0.94%, +0.05%
   Cycle count: 16577700697 -> 16702609256 (+0.75%); split: -0.59%, +1.35%
   Spill count: 72338 -> 67226 (-7.07%); split: -7.36%, +0.29%
   Fill count: 134058 -> 125980 (-6.03%); split: -6.83%, +0.80%
   Scratch Memory Size: 4092928 -> 3786752 (-7.48%); split: -7.53%, +0.05%
   Max live registers: 33031460 -> 32945994 (-0.26%); split: -0.27%, +0.01%
   Max dispatch width: 5778384 -> 5778536 (+0.00%); split: +0.26%, -0.26%
   Non SSA regs after NIR: 179809505 -> 152735471 (-15.06%); split: -15.08%, +0.03%

Fixes: c21bc65ba7 ("nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32932>
2025-01-08 00:19:54 +00:00
Sagar Ghuge
33d9a685a5 anv: Add pipelined coarse pixel state
3DSTATE_CPS_POINTERS is deprecated on PTL, so let's switch to
3DSTATE_COARSE_PIXEL to deliver CPS state as pipelined state.

Signed-off-by: Sagar Ghuge <sagar.ghuge@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/32737>
2025-01-07 23:53:44 +00:00
Sagar Ghuge
9d33443d7b intel/genxml: Add coarse pixel related changes
This change adds CPS related new state instruction, structure and
enum.

Signed-off-by: Sagar Ghuge <sagar.ghuge@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/32737>
2025-01-07 23:53:44 +00:00
Caio Oliveira
868016d92c intel/brw/xe2+: Do not use $.dst or $.src SWSB annotations in SENDs
When a SEND instruction is a EOT, the scoreboard lowering will not
allocate a new SBID for it, since nothing needs to wait for it.  In
Gfx12 this allowed the SEND to get out-of-order $.dst or $.src
dependencies.

Starting on Xe2+ this is not supported anymore, in favor of supporting
more combined modes.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32712>
2025-01-07 22:23:59 +00:00
Lucas Stach
a7d164e42b ci/etnaviv: drop gl-1.4-polygon-offset fail
Now that the offset unit is correctly scaled depending on
the depth buffer format, this test can be expected to pass.

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/32756>
2025-01-07 22:09:16 +00:00
Lucas Stach
98b3723208 etnaviv: fix polygon offset for 24bpp depth buffers
Currently we scale the polygon offset units with a fixed factor,
matching the MRD (minimal resolvable distance) for a 16bpp depth
buffer. This wastes a lot of precision when a 24bpp depth buffer
is used.

Apply the correct MRD scale, depending on the format of the
currently bound depth buffer.

Fixes piglit spec@!opengl 1.4@gl-1.4-polygon-offset.

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/32756>
2025-01-07 22:09:16 +00:00
Tapani Pälli
1cc17e9ce9 intel/compiler: take reg_unit size into account with ubo ranges
Fixes: 1ab4fe2dd6 ("brw: Don't shrink UBO push ranges in the backend")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12423
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32925>
2025-01-07 21:38:06 +00:00
Job Noorman
c3e7384bbb ir3: always set wrmask for movmsk
We failed to set the wrmask of movmsk expanded from ballot.macro. This
caused legalization to miss the need for (ss) when a component other
than the first is used.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1a78604d20 ("ir3: Add support for subgroup arithmetic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32918>
2025-01-07 20:55:22 +00:00
Marek Olšák
c20c46cf7b ac: update ATOMIC_MEM definitions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32877>
2025-01-07 20:24:19 +00:00
Marek Olšák
f72a11f38d radeonsi: always use RADEON_USAGE_DISALLOW_SLOW_REPLY
All places are fine with getting a false negative as long as buffer_wait
returns quickly. This can improve performance.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32877>
2025-01-07 20:24:19 +00:00
Marek Olšák
271d5edf87 radeonsi: fix a perf regression due to slow reply from GEM_WAIT_IDLE for timeout=0
It sometimes takes 1 ms to return with timeout=0, which is unacceptable.

Fixes: 4194774edf - radeonsi: move barriers out of si_launch_grid_internal_ssbos

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32877>
2025-01-07 20:24:19 +00:00
Pierre-Eric Pelloux-Prayer
dd11eec06b gl/spirv: update subgroup_size if GroupNonUniform is used
This is similar to what link_intrastage_shaders is doing and it
fixes the following test:
   KHR-Single-GL46.subgroups.builtin_var.compute.subgroupsize_compute

Which was failing with SPIRV but passing with GLSL, the diff being:
 - SPIRV: "subgroup_size: 1"
 - GLSL:  "subgroup_size: 2"

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
2025-01-07 19:32:43 +00:00
Pierre-Eric Pelloux-Prayer
33affa7c36 radeonsi/tests: update results
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
2025-01-07 19:32:43 +00:00
Pierre-Eric Pelloux-Prayer
dc293ffe50 radeonsi: fallback to util_blitter_draw_rectangle
The blitter VS expects coords to fit in a signed int16. When this
is not the case, use util_blitter_draw_rectangle instead.

Since util_blitter_draw_rectangle sets vertex elements, we need
to make sure they're properly restored.

The alternative to this fallback would be to pass coordinates
unpacked (so 4 SGPRs instead of 2), but this doesn't fix the
fbo-blit-check-limits test because of uv interpolation precision
issue.
Using 2 triangles instead of a rectangle + disabling
window_space_position helps but then this breaks some GLES3 tests,
like dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_x
(which doesn't pass either if u_blitter is used for all cases).

Using a single triangle covering the whole rectangles fixes all
cases but it then requires to setup scissors to not write too
much pixels...
So, instead of adding so much complexity, let's use u_blitter
for the "large coordinates" fallback, and keep the rectangle blit
for the other cases.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
2025-01-07 19:32:43 +00:00
Samuel Pitoiset
7f50162424 radv: fix programming WALK_ALIGN8_PRIM_FITS_ST on GFX12
This also needs to be disabled when a VRS image is used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
2025-01-07 18:56:24 +00:00
Samuel Pitoiset
d7bc370b9e radv: configure the VRS surface swizzle mode on GFX12
GFX11 allowed only one swizzle mode for the VRS image but GFX12 allows
all 2D non-linear swizzle modes and PC_SC_VRS_INFO needs to be
configured.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
2025-01-07 18:56:24 +00:00
Samuel Pitoiset
0b53e645a0 radv: disable VRS coarse shading with 8x MSAA on GFX12
This isn't supported and the hw always clamps to 1x1.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
2025-01-07 18:56:24 +00:00
Juan A. Suarez Romero
c5954c4329 v3dv: check requirements for USAGE_INPUT_ATTACHMENT
If the format does not support COLOR_ATTACHMENT or DEPTH_STENCIL
features then it can't be used as an input attachment.

Fixes dEQP-VK.api.info.unsupported_image_usage.*.

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/32790>
2025-01-07 14:50:44 +00:00
Juan A. Suarez Romero
db249f24a6 vc4: initialize variable
While this is strictly not necessary, it fixes an apparent false
positive issue about reading garbage value detected by static analyzer.

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/32819>
2025-01-07 14:21:42 +00:00
Juan A. Suarez Romero
69d3d7288e v3dv: fix assigned value is garbage or undefined
This is actually a false positive detected by static analyzer, because
it assumes that `device->instance->meta_cache_enabled` can change
between two execution points.

In order to instruct static analyzer this is not the case, we assing it
to a local variable, and do the checks based on that.

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/32819>
2025-01-07 14:21:42 +00:00
Juan A. Suarez Romero
0d14e129bc v3d: avoid 0-size variable length array
Declaring a variable-length array (VLA) based on a variable that can be
0 is declared dangerous.

In this case, the variable can't take value 0, so adding an assertion
fixes the issue.

This was detected by static analyzer.

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/32819>
2025-01-07 14:21:42 +00:00
Samuel Pitoiset
f94bd67b82 aco: fix VS prologs on GFX12
MTBUF/MUBUF instructions must use zero for SOFFSET, use const_offset
instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32904>
2025-01-07 13:44:32 +00:00
Corentin Noël
55cd0fb42c virgl: Use MAX_SAMPLERS instead of MAX_SHADER_SAMPLER_VIEWS
The PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS cap is meant for samplers and not sampler
views, change this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32706>
2025-01-07 13:15:47 +00:00
Corentin Noël
ab5084b054 virgl: Update virgl_hw.h from virglrenderer
Use the latest version and update the supported formats.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32706>
2025-01-07 13:15:46 +00:00
Job Noorman
b5c99e6f57 ir3/cp: swap back correct srcs when swap failed
While making the swapping code generic, the swap-back path was left as
is causing the wrong sources to be swapped.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 00656526d8 ("ir3/cp: extract common src swapping code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32920>
2025-01-07 12:14:14 +00:00
Danylo Piliaiev
ac2046c5b0 tu/perfetto: Add app and engine names to the command buffer tracepoint
Makes possible to understand which app submitted a command buffer.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31550>
2025-01-07 11:44:41 +00:00
Danylo Piliaiev
5ae03b4aea tu/perfetto: Always emit submission event and time it
We previously missed submissions that don't sync timestamps.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31550>
2025-01-07 11:44:41 +00:00
Boris Brezillon
e55de285cc panfrost: Kill panfrost-job.h
It's empty now, so we don't need to include it from the packer headers.

Signed-off-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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
c0f3bac826 panfrost: Move MAX_{MIP_LEVELS,IMAGE_PLANES} to pan_texture.h
This is where those macros are used, and those are the last two
definitions preventing us from dropping panfrost-job.h.

Signed-off-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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
e48f2da7da panfrost: Move MALI_EXTRACT_INDEX to pan_format.h
Move MALI_EXTRACT_INDEX to pan_format.h where all format-related macros
live and kill the unused MALI_EXTRACT_TYPE and MALI_FORMAT_COMPRESSED
macros.

Signed-off-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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
2fdbdc270b panfrost: Kill the uXX typedefs
We use uintXX_t most of the time, so let's be consistent and use the
stdint types everywhere instead of their shorter uXX variants.

Signed-off-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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
63fc0a2de9 panfrost: Kill the mali_ptr typedef
mali_ptr is no shorter than uint64_t, and we already have a few places
where we use uint64_t to store GPU virtual addresses in src/panfrost, so
let's just kill this typedef and use uint64_t types everywhere.

That's one step towards panfrost-job.h removal.

Signed-off-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/32899>
2025-01-07 11:10:55 +00:00
Feng Jiang
701600fb11 radv/rt: Fix memleak in radv_init_header()
Fixes: f8b584d ("vulkan/runtime,radv: Add shared BVH building framework")
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32887>
2025-01-07 09:49:56 +00:00
Samuel Pitoiset
c5fe9dcf16 ac/descriptors: fix configuring NBC views on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32892>
2025-01-07 09:15:12 +00:00
Boris Brezillon
ae76a6a045 panvk: Pack push constants
We're about to add more sysvals, and the more we add, the bigger the
sysvals region gets, which increases the amount of memory we have to
allocate when push_uniforms are dirty.

Instead of allocating FAUs for all sysvals/push_constants, track FAU
usage per-shader, and pack those. This implies emitting an FAU buffer
per stage instead of trying to share it, but that's an acceptable
trade-off.

While at it, automate the sysval dirty tracking a bit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
aa78fe7683 panvk: Pass a cmdbuf to blend_emit_descs()
Now that panvk_cmd_buffer.h is accessible from
src/panfrost/vulkan/panvk_vX_xxx.c files, there's no reason to pass
a gazillon arguments to blend_emit_descs(). We can just pass a cmdbuf
and let the helper extract the other parameters from there. It also
allows for extra automation, like dirtying the push_uniform buffer
when the new blend config reads the blend constant.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
ed55ab17db panvk: Factor-out the sysvals initialization logic
We're about to make the sysval logic a bit more complication when
introducing push constant packing. Let's first factor-out the sysvals
handling so the JM/CSF backend don't have to duplicate the thing.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
a6319f8951 panvk: Don't lower load_blend_const_color_rgba
We use blend shaders, so load_blend_const_color_rgba should
not be present in the fragment shader. We might want to re-introduce
this code if we decide to specialize fragment shaders when the
blend configuration is static, but let's drop it for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
2af6e4beeb pan: Don't pretend we support load_{vertex_id_zero_base,first_vertex}
load_vertex_id_zero_base() is supposed to return the zero-based
vertex ID, which is then offset by load_first_vertex() to get
an absolute vertex ID. At the same time, when we're in a Vulkan
environment, load_first_vertex() also encodes the vertexOffset
passed to the indexed draw.

Midgard/Bifrost have a sligtly different semantics, where
load_first_vertex() returns vertexOffset + minVertexIdInIndexRange,
and load_vertex_id_zero_base() returns an ID that needs to be offset
by this vertexOffset + minVertexIdInIndexRange to get the absolute
vertex ID. Everything works fine as long as all the load_first_vertex()
and load_vertex_id_zero_base() calls are coming from the
load_vertex_id() lowering. But as mentioned above, that's no longer
the case in Vulkan, where gl_BaseVertexARB will be turned into
load_first_vertex() and expect a value of vertexOffset in an
indexed draw context.

We thus need to fix the mismatch by introducing two new
panfrost-specific intrinsic so we can stop abusing load_first_vertex()
and load_vertex_id_zero_base().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
54033bc052 panvk: Fix first_vertex/base_instance types
gl_Base{VertexARB,Instance} are signed integers, so reflect that in
the types we declare in the sysval struct.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
19173dfa40 panvk: Don't lower load_base_vertex
load_base_vertex is coming from SYSTEM_VALUE_BASE_VERTEX which should
only exist in GL. In Vulkan, gl_BaseVertex is translated to
SYSTEM_VALUE_FIRST_VERTEX, which is turned into load_first_vertex
instructions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
bbfcd473f9 pan/bi: Fix mem_access_size_align_cb() for push constants
bit_size should be at least 32, and alignment at least 4 bytes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
2611dc106a pan/bi: Disallow non-zero .{range,base} on load_push_constant instructions
There seems to be several lowering pass that don't take the base/range
into account, like nir_lower_mem_access_bit_sizes(). This caused
issues when we tried using it on push_constants to make sure accesses
are 32-bit aligned, so let's make sure the frontend is propagating the
base to the offset, and assigns range to zero (AKA undefined).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
8496159885 pan/mi: Don't pretend we support push constants
This code was probably added when we were considering supporting
Vulkan on Midgard, but we don't handle the
nir_intrinsic_load_push_constant, so it make little sense to
lower push constant IOs in this backend.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
8166a218ee pan/indirect: Don't use .base to pass the push_constant offset
We're about to assert when .base != 0 in the Bifrost backend,
but we first make sure all push_constant users stop passing
the offset through .base.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
22bbc8f87b panvk: Don't define push_constant range/base when we don't have to
We just removed a lowering pass making use of these because base/range
are not updated by some other lowering passes, so let's not encourage
future use of base/range by keeping them set to zero.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
3e473a9d4c pan/bi: Get rid of bi_lower_load_push_const_with_dyn_offset()
The vulkan driver is now lowering push constant dynamic indexing to
global loads, so we can get rid of this pass.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
0361c1ca08 panvk: Lower load_push_constant with dynamic offset to global loads
The csel-ladder we have in bi_lower_load_push_const_with_dyn_offset()
is not great, and is relying on base/range being valid. It turns out
nir_lower_mem_access_bit_sizes(), which we rely on to make push constant
accesses 32-bit aligned, doesn't preserve those when splitting accesses.

Let's simplify the thing by lowering push constant accesses with a
dynamic offset to global loads.

We also reset the base and offset values in the lowering pass, to make
sure the backend doesn't rely on them for other things.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
58d8d4ce7b panvk: Lower dynamic push_constant loads in desc_copy logic
We're about to drop the dynamic push_constant lowering pass,
but first we must patch all the bits relying on it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
3d5ddaaffa panvk: Automate sysval access from NIR shaders
Emitting nir_load_push_constant() calls with the right base/range/offset
for sysvals is tedious and error prone. Provide syntactic sugar macros
to automate that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
cb20cb7b2f panvk: Stop using magic values for the sysval push constant offset/range
The sysval base comes from the amount of FAU words we reserve for user
push constants, and the range is capped by the sysval struct size.
Add macros to express that instead of using magics values.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
258979d69c panvk: Wrap our descriptor lowering passes in NIR_PASS()
This allows us to do the validation after each step instead of once at
the end.

Since validation is done in nir_lower_descriptors(), we no longer
need to do it panvk_lower_nir(), and we don't need to return
progress information either. So adjust the prototype of
nir_lower_descriptors() accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.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/32415>
2025-01-07 08:15:18 +00:00
Valentine Burley
6564f56a55 ci: Uprev vkd3d-proton to b121e6d746341e0aaba7663e3d85f3194e8e20e1
Fixes a regression affecting drivers that lack support for sparse
binding, introduced in version 2.14.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32860>
2025-01-07 07:35:26 +00:00
Sagar Ghuge
385977955b intel: Set correct maxComputeSharedMemorySize for Xe3+
For Xe3+, set preferred SLM and SLM per threadgroup size.

Bspec: 73211
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32872>
2025-01-07 07:06:09 +00:00
Rob Clark
64d76bbab2 freedreno/a6xx: Fix timestamp emit
I guess this worked accidentially before due to suballocation.  But we
can't rely on that.

Fixes: 8609d62e4d ("freedreno/a6xx: Drop "hardpin" support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32908>
2025-01-07 06:36:31 +00:00
Marek Olšák
3800f0af41 nir/algebraic: optimize pack_split(unpack(a).x, unpack(a).y) -> a
This is required to optimize FP64 and Int64 shaders generated by
virglrenderer. It generates pack/unpack around every 64-bit op,
which NIR currently can't eliminate. This fixes that.

There is a new constraint ".y", which means that the use of an instruction
should have swizzle.y. This allows us to add patterns that have Y swizzle
on results of instructions.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32172>
2025-01-07 05:47:52 +00:00
Marek Olšák
b1bc691b0f nir/algebraic: add and improve pack/unpack patterns
Some duplicated patterns are removed.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32172>
2025-01-07 05:47:52 +00:00
Marek Olšák
ebec182b04 nir/algebraic: use is_used_once for comparison patterns
otherwise we are just creating new instructions while not removing any

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32172>
2025-01-07 05:47:52 +00:00
Deborah Brouwer
3c441191d9 ci: pipeline_message: reset empty errors
Currently marge will ignore an error message if it is just the word
"error" without any further information. However, if she never finds a
more informative message, then she will just print that meaningless
error message.

Instead of an empty error message, just leave the message blank.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:10 +00:00
Deborah Brouwer
011a867fbe ci: pipeline_message: parse fatal messages
Currently marge only parses a failed job log for error messages, which can
cause her to miss fatal messages.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32557#note_2696196
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1327177

If a `fatal` message is in the error log, add it to the pipeline message.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
3bcb29cfcc ci: pipeline_message: ignore generated errors
Currently marge does not ignore the word `generated` when she is searching
the logs for a relevant error message. So, marge's comments on a failed
pipeline say something unhelpful like "errors generated"

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32687#note_2706792
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1332129

Ignore the word `generated` so marge will provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
6dc094decd ci: pipeline_message: ignore harmless build logs
Currently marge gets confused when parsing a build log and mistakes
innocuous lines that have the word "error" in them as actual issues.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093#note_2705442
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1331453

Ignore lines with the word `error` in them that are not actual issues,
so that marge can provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
2a477f7df2 ci: pipeline_message: ignore error_type errors
Currently marge only ignores `error_type` when the type is None.
But other error_types are equally uninteresting e.g. `error_type: Jobs`.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677#note_2711470
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1333563

Ignore the phrase `error_type` so marge will provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
6ad2abc661 ci: pipeline_message: add test to parse error logs
If marge doesn't find deqp-runner results or trace errors, she will parse
a failed job log for error messages. The parsing ignores certain phrases
in an attempt to find more relevant errors.

Add a test to check marge's error log parsing to make sure that we don't
create regressions when adding new phrases to ignore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
4039043f72 ci: pipeline_message: improve job list formatting
If marge can't find an error in a failed-job log, the formatting of her
pipeline message has extra spaces between the jobs.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577#note_2699071
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1328702

Add a line break after jobs even if marge can't find an error message,
so that the job list is easier to read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
819f9f8425 ci: pipeline_message: catch module loading errors
Currently, if the pipeline_message script runs in an an env missing the
aiohttp package, the pipeline_message script will throw a
ModuleNotFoundError and crash marge.

Make sure to catch and ignore these errors since the pipeline message
should never interfere with a merge request.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Chia-I Wu
1f333ac9fa hk: remove calibrated timestamp support
We don't advertise KHR_calibrated_timestamps yet.  When we do, we can
use the common implementation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
491b785fed nvk: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
33ca377fab tu: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
f6332ca650 radv: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
dd0f8cc7de hasvk: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
83dec767da anv: use common calibrated timestamp support partially
Use the common GetPhysicalDeviceCalibrateableTimeDomainsKHR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
aff78757a6 vulkan: add common GetCalibratedTimestampsKHR
The calibrate domain and the device domain period are determined in
vk_device_init.  With them known, and with the vk_time_max_deviation
helper, GetCalibratedTimestampsKHR is straightforward.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
f7791e1901 vulkan: add common GetPhysicalDeviceCalibrateableTimeDomainsKHR
VK_TIME_DOMAIN_DEVICE_KHR is always supported.  Host time domains are
checked by vk_device_get_timestamp.

This is not used when the driver does not advertise
VK_{KHR,EXT}_calibrated_timestamps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:28 +00:00
Chia-I Wu
3bc7564bb0 vulkan: add vk_device_get_timestamp
vk_device_get_timestamp returns the current timestamp for the specified
time domain.  device can be NULL unless the domain is
VK_TIME_DOMAIN_DEVICE_KHR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:28 +00:00
Patrick Lerda
c6bcf88949 winsys/radeon: fix radeon_winsys_bo_from_handle() related race condition
This change prevents the reuse of the bo when the counter is already
zero. At zero, the bo is in a state where the deletion is pending,
and this implementation relying on an atomic counter can't be safely
stopped. In other words, the previous fix ccd3bb4548 lower the
probability of this race condition, but doesn't fix it.

This change prevents a race condition which has a high probability
on r600 with the test below. This change was tested with the thread
sanitizer.

For instance, this issue is triggered on r600 with
"piglit/bin/ext_image_dma_buf_import-refcount-multithread -auto":
==9876==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000021a20 at pc 0x7f2c9f59f748 bp 0x7f2c8f3aa600 sp 0x7f2c8f3aa5f8
READ of size 4 at 0x60d000021a20 thread T6
    #0 0x7f2c9f59f747 in pipe_is_referenced ../src/gallium/auxiliary/util/u_inlines.h:65
    #1 0x7f2c9f59f747 in radeon_bo_destroy ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:342
    #2 0x7f2c9f63b541 in radeon_bo_reference ../src/gallium/include/winsys/radeon_winsys.h:794
    #3 0x7f2c9f63b541 in r600_texture_destroy ../src/gallium/drivers/r600/r600_texture.c:571
    #4 0x7f2c9d65662d in pipe_resource_destroy ../src/gallium/auxiliary/util/u_inlines.h:146
    #5 0x7f2c9d65662d in pipe_resource_reference ../src/gallium/auxiliary/util/u_inlines.h:163
    #6 0x7f2c9d65662d in st_FreeTextureImageBuffer ../src/mesa/state_tracker/st_cb_texture.c:459
    #7 0x7f2c9d5b6991 in _mesa_delete_texture_image ../src/mesa/main/teximage.c:226
    #8 0x7f2c9d5f2593 in _mesa_delete_texture_object ../src/mesa/main/texobj.c:532
    #9 0x7f2c9d5f2be7 in _mesa_reference_texobj_ ../src/mesa/main/texobj.c:639
    #10 0x7f2c9d5f3773 in _mesa_reference_texobj ../src/mesa/main/texobj.h:92
    #11 0x7f2c9d5f3773 in delete_textures ../src/mesa/main/texobj.c:1578

0x60d000021a20 is located 0 bytes inside of 144-byte region [0x60d000021a20,0x60d000021ab0)
freed by thread T5 here:
    #0 0x7f2ca8b2b4f7 in free (/usr/lib64/libasan.so.6+0xb14f7)
    #1 0x7f2c9f59efb3 in radeon_bo_destroy ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:401
    #2 0x7f2c9f63b541 in radeon_bo_reference ../src/gallium/include/winsys/radeon_winsys.h:794
    #3 0x7f2c9f63b541 in r600_texture_destroy ../src/gallium/drivers/r600/r600_texture.c:571
    #4 0x7f2c9d65662d in pipe_resource_destroy ../src/gallium/auxiliary/util/u_inlines.h:146
    #5 0x7f2c9d65662d in pipe_resource_reference ../src/gallium/auxiliary/util/u_inlines.h:163
    #6 0x7f2c9d65662d in st_FreeTextureImageBuffer ../src/mesa/state_tracker/st_cb_texture.c:459
    #7 0x7f2c9d5b6991 in _mesa_delete_texture_image ../src/mesa/main/teximage.c:226
    #8 0x7f2c9d5f2593 in _mesa_delete_texture_object ../src/mesa/main/texobj.c:532
    #9 0x7f2c9d5f2be7 in _mesa_reference_texobj_ ../src/mesa/main/texobj.c:639
    #10 0x7f2c9d5f3773 in _mesa_reference_texobj ../src/mesa/main/texobj.h:92
    #11 0x7f2c9d5f3773 in delete_textures ../src/mesa/main/texobj.c:1578

previously allocated by thread T6 here:
    #0 0x7f2ca8b2b9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7)
    #1 0x7f2c9f5a36d5 in radeon_winsys_bo_from_handle ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:1198
    #2 0x7f2c9f641b2a in r600_texture_from_handle ../src/gallium/drivers/r600/r600_texture.c:1105
    #3 0x7f2c9d47550a in dri_create_image_from_winsys ../src/gallium/frontends/dri/dri2.c:1007
    #4 0x7f2c9d47eeb9 in dri2_from_dma_bufs ../src/gallium/frontends/dri/dri2.c:1629
    #5 0x7f2ca8854360 in dri2_create_image_dma_buf ../src/egl/drivers/dri2/egl_dri2.c:2564
    #6 0x7f2ca8854f45 in dri2_create_image_khr ../src/egl/drivers/dri2/egl_dri2.c:2817
    #7 0x7f2ca8846f2c in dri2_create_image ../src/egl/drivers/dri2/egl_dri2.c:1864
    #8 0x7f2ca87f9dd8 in _eglCreateImageCommon ../src/egl/main/eglapi.c:1850

Fixes: ccd3bb4548 ("winsys/radeon: fix a race between bo import and destroy")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32896>
2025-01-07 02:38:15 +00:00
Marek Olšák
9f08c8bd0f mesa: switch fixed-func fragment program to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32913>
2025-01-07 01:52:01 +00:00
Marek Olšák
9a1775dd33 mesa: switch ARB_vp/fp to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32911>
2025-01-07 00:31:08 +00:00
David Rosca
6478a6d888 frontends/va: Use compute only context if driver prefers compute
Enables use of async compute for shader format conversions.
Deinterlace filter still need gfx.

On my system with RX570 this fixes performance issues when using
gpu-screen-recorder to record gameplay at full GPU load. It can
now record with full framerate, compared to half framerate before.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
1917cc3364 gallium: Add param to create compute only multimedia context
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
4b658ef036 gallium/vl: Add param to create compute only vl_compositor
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
db348ac452 gallium/vl: Add rgba compute shader
It only supports blending mode that va frontend expects, so prefer the old
fragment shader and only use the compute shader when gfx is not supported.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
38979d3b4d gallium/vl: Create sampler state also when gfx is not supported
This is also used by compute shaders.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
d79fa22801 gallium/vl: Fix unbinding sampler views
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
cfe08808de radeonsi/vcn: Use compute only context
We don't need graphics.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
Karol Herbst
3a9b1baa80 rusticl/kernel: take set kernel arguments into account for CL_KERNEL_LOCAL_MEM_SIZE
Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Karol Herbst
bd1a042046 rusticl/device: fix default device enumeration
There were a couple of issues this fixes:
 - Using the env "RUSTICL_DEVICE_TYPE" variable made no device be default.
 - If multiple GPUs were detected, multiple devices were default.
 - If zink was used, no default device was advertized either.

The spec requires that there must be one and only one default device.

Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Karol Herbst
ab640df1c2 rusticl/device: fix CL_DEVICE_HALF_FP_CONFIG query
Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Marek Olšák
d9dd485c02 radeonsi: re-enable non-TC-compatible HTILE for write-only Z/S
It caused the Blender corruption, but the previous commit likely fixes it.

The workaround regressed performance for Furmark and Plot3D with 8xMSAA.

If you want to enable the workaround again in the future, just add this
line back: sscreen->info.gfx_level >= GFX11 ||

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Marek Olšák
75a03d733a radeonsi: simplify and fix enable_tc_compatible_htile_next_clear logic
It looks like it was broken and might have been responsible
for the Blender corruption.

Just do a full decompression and change to TC-compatible HTILE after
that even if we don't end up doing fast clear here.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Marek Olšák
fa0bf725bc radeonsi: ignore PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY for TC-compatible HTILE
We enable it on demand anyway, which seems better than relying on a flag.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Martin Krastev
092ac5a384 svga/ci: enable vmware farm
Reinstate farm after DUT maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32898>
2025-01-06 22:46:02 +00:00
Alyssa Rosenzweig
09b5608607 glsl: fix glsl_get_word_size_align_bytes
this was copypasted from the wrong function. fixes on asahi

   KHR-Single-GL46.arrays_of_arrays_gl.SubroutineArgumentAliasing4_var_type_index_13

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32871>
2025-01-06 22:09:49 +00:00
Konstantin Seurer
38c4548290 lavapipe: Advertise vulkan 1.4
Only advertise 1.4 for LLVM_VERSION_MAJOR>=10 because some subgroup
operations were promoted.

Closes: #12241
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32489>
2025-01-06 20:30:34 +00:00
Marek Olšák
d09ba36f98 glsl: fix corruption due to blake3 hash not being set for nir_opt_undef
NIR is generated sooner, so we need to set it sooner.
This fixes Viewperf13/CATIA_car_04.

Fixes: cbfc225e2b - glsl: switch to a full nir based linker

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32876>
2025-01-06 19:50:51 +00:00
Marek Olšák
451d252ca2 glsl: remove unused code
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
49897f99d6 st/mesa: recompute IO bases for ARB_vp/fp
This is a prerequisite for generating lowered IO for ARB_vp/fp.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
da8f98d202 st/mesa: don't use nir_copy_var
so that we don't have to call nir_lower_var_copies.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
4fdeeca192 st/mesa: switch st_nir_make_clearcolor_shader to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
b1c63365fc st/mesa: switch PBO create_fs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
1c56dbdaaf st/mesa: switch st_pbo_create_vs and st_pbo_create_gs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
eeea99210f st/mesa: switch st_nir_make_passthrough_shader to IO intrinsics
also simplify it to only make VS because it's only used for VS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
ec68f0492b st/mesa: switch GL_SELECT shader to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
2807259a18 st/mesa: switch Z/S DrawPixels shaders to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
135c9fa7b6 st/mesa: unlower IO for internal shaders if needed
This will be required because all internal shaders will be converted
to IO intrinsics.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
7e39045733 st/mesa: switch ATI_fs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
40848ba97e st/mesa: use IO intrinsics in st_nir_lower_position_invariant
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
02b7396568 st/mesa: use IO intrinsics in st_nir_lower_fog
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
a408c0aa2b st/mesa: run DCE before st_unlower_io_to_vars
Some lowering passes can leave dead code behind, but dead IO intrinsics
are still counted as enabled IO, which breaks things.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
3f7911e7d3 st/mesa: fold st_translate_prog_to_nir into prog_to_nir
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
49f737bc14 mesa: remove unused PROGRAM_WRITE_ONLY
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
14956aa0f2 mesa: remove unused PROGRAM_SYSTEM_VALUE
ARB_vp/fp don't have system values.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
ee8916c414 nir: use IO intrinsics in nir_lower_drawpixels
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
0de28a9fd0 nir: use IO intrinsics in nir_lower_bitmap
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
a7ad1b302b nir: remove redundant option linker_ignore_precision
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
730c8d506f nir: flip the early exit condition in nir_lower_io_temporaries
no change in behavior other than skipping COMPUTE as well.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
7b55ee999d nir: don't set num_slots/src/dest_type/write_mask when they're set automatically
to those values

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
55a4a8a2a8 nir: set src_type and dest_type to float implicitly for IO build helpers
If you want to set it to int/uint, set .src_type or .dest_type. If you want
to set it to float, you don't need to set the type at all. It's implicitly
set to float.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
b9f9d001d7 nir: set nir_io_semantics::num_slots to at least 1 in build helpers
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
José Roberto de Souza
7ac9ac0f93 anv: Allow larger SLM sizes for task and mesh shader
It was hard-coded to 64k but Xe2 platforms and newer supports
larger SLM sizes.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32874>
2025-01-06 18:31:20 +00:00
Konstantin Seurer
378fd38e1d llvmpipe: Move max_anisotropy to static sampler state
Applications typically use one globak max_anisotropy value.
Moving it to static state should save a could of instructions.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
0797a14c52 llvmpipe: Remove unused AF code
The table and some other parameters are not used.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
350a0fe632 llvmpipe: Use a simpler and faster AF implementation
This is based on the example given by the Vulkan specification: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-texel-anisotropic-filtering

The basic idea is to compute the axis in which the uv coordinates
change the fastest in screen space (rho_y and rho_y). If rho_x is larger
than rho_y, samples are summed up along the x-Axis and the y-Axis
viceversa. The x/y offsets are mapped back into texture (u/v) space
using a linear approximation of u(x,y) and v(x,y).

This approach does not use a nested loop and the number of samples is
basically limited to max_anisotropy (+/-). The sample count of the
previous approach could explode in some situations, leading to
frametimes >1s.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
7279e47521 llvmpipe: Disable anisotropic filtering for explicit lod
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Icenowy Zheng
70fa598696 zink: do not set transform feedback bits when not available
Currently the list of buffer usage bits specified is hardcoded with
transform feedback bits, which leads to a validation layer error report
with ID VUID-VkBufferCreateInfo-None-09499 when EXT_transform_feedback
is not available.

Only set these bits when EXT_transform_feedback extension is really
available to suppress this error.

Cc: mesa-stable
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32386>
2025-01-06 15:19:46 +00:00
Pavel Ondračka
c179a7dde4 r300/ci: update CI expectations
One new rv410 flake and one new rv530 fail which I can't reproduce
locally. Also remove the vs-varying-array-mat3* flakes, those were
failing because we run out of varyings, however this should no longer be
an issue since nir_opt_varyings was enabled for everyone.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32897>
2025-01-06 13:26:56 +00:00
Kenneth Graunke
4ab04799ee brw: Delete assign_constant_locations and push_constant_loc[]
The push_constant_loc[] array is always an identity mapping these days,
so it's kind of pointless.  Just use the original uniform number and
skip the unnecessary "remap" step.  With that gone, and shrinking UBO
ranges gone, assign_constant_locations() is now empty and can be removed
as well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
93e186e1a4 brw: Delete pull constant lowering
Now that we never shrink ranges in the backend, we never lower push
constants to pull constants late in the backend either.  get_pull_loc
will never return true, and so all of brw_lower_constant_loads becomes
a noop.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
1ab4fe2dd6 brw: Don't shrink UBO push ranges in the backend
Back in the bad old days (vec4?) we had a bunch of smarts in the backend
to dead code eliminate unused vector components and re-pack regular
uniforms, so we really couldn't decide how much data we were pushing
until very late in the backend.  Nowadays we have none of that - we do
all of our elimination and packing in NIR.  anv shrinks ranges to deal
with Vulkan API push constants, and iris treats everything as a UBO and
as of the previous commit will also shrink appropriately.

So we don't need to do this anymore...which will let us simplify quite
a bit of code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
583ad35455 brw: Limit maximum push UBO ranges to 64 registers in the NIR pass.
anv already does this limiting, since it needs to handle non-UBO push
constants as well.  iris treats everything as a UBO, but doesn't have
a limiter and was relying on the backend to handle it.

Do this in the NIR pass so that we can eliminate the backend code.
It's not necessary for anv, but handling it here is simple and less
error prone for iris, which calls this in a number of places.  We know
we need to limit things to this much; anv can limit more if needed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Feng Jiang
96c8eb64f0 virgl: Ensure that PIPE_SHADER_CAP_MAX_CONST_BUFFERS is less than PIPE_MAX_CONSTANT_BUFFERS
The value of the PIPE_SHADER_CAP_MAX_CONST_BUFFERS parameter should be
less than PIPE_MAX_CONSTANT_BUFFERS, otherwise, it will lead to some
assert failures. For example:

    void
    cso_unbind_context(struct cso_context *cso)
    {
    ...
        int maxsam = scr->get_shader_param(scr, sh,
                                           PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
        int maxview = scr->get_shader_param(scr, sh,
                                            PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS);
        int maxssbo = scr->get_shader_param(scr, sh,
                                            PIPE_SHADER_CAP_MAX_SHADER_BUFFERS);
        int maxcb = scr->get_shader_param(scr, sh,
                                          PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
        int maximg = scr->get_shader_param(scr, sh,
                                          PIPE_SHADER_CAP_MAX_SHADER_IMAGES);
        assert(maxsam <= PIPE_MAX_SAMPLERS);
        assert(maxview <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
        assert(maxssbo <= PIPE_MAX_SHADER_BUFFERS);
        assert(maxcb <= PIPE_MAX_CONSTANT_BUFFERS); // Crash here
        assert(maximg <= PIPE_MAX_SHADER_IMAGES);
    ...
    }

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32889>
2025-01-06 12:18:20 +00:00
Martin Roukala (né Peres)
f1a6af133a radeonsi/ci: run a fraction of glcts-vangogh in pre-merge
Now that ACO has become the default on pre-RDNA GPUs, all pre-merge CI
coverage of radeonsi+LLVM has disapeared. Let's fix this by making
our post-merge glcts-vangogh-valve job run inpre-merge pipelines.

However, we are limited in vangogh capacity, so rather than running the
full glcts/piglit test suites we run a fraction of it to stay under 15
minutes of execution time on a single Steam Deck.

Suggested-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:22 +00:00
Martin Roukala (né Peres)
0c538f82bc radeonsi/ci: run on ACO changes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:22 +00:00
Martin Roukala (né Peres)
bec7f09e76 radeonsi/ci: update the vangogh expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:21 +00:00
Tapani Pälli
b1b1a4ef91 iris: initialize whole pipe_box struct for memcmp
Z and depth fields were given to memcmp uninitialized.

CID: 1637431
Fixes: 1fc82ee558 ("iris: Add support for damage region")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32857>
2025-01-06 09:18:52 +00:00
Tapani Pälli
72351afe24 anv: handle mesh in sbe_primitive_id_override
This prevents crashes seen in some upcoming cts tests.

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/32861>
2025-01-06 08:41:18 +00:00
David Rosca
36bedf6c80 frontends/va: Get buffer feedback with locked mutex in MapBuffer
Fixes: 93d434362b ("frontends/va: Move encode fence to coded buffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12344

Tested-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32761>
2025-01-06 08:19:08 +00:00
Hyunjun Ko
5ecea6ec4a anv: handle negative value of slot index for h265 decoding.
Fixes: 8d519eb5 ("anv: add initial video decode support for h265")
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/32823>
2025-01-06 01:02:14 +00:00
Hyunjun Ko
168298b891 anv: Enable remapping picture ID
Fix to handle 16 refs.

v1. handle the case where a slot index is negative.
(Lionel Landwerlin <lionel.g.landwerlin@intel.com>)

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/32823>
2025-01-06 01:02:14 +00:00
Hyunjun Ko
9221feaf79 anv: define ANV_VIDEO_H264_MAX_DPB_SLOTS
prep work for remapping slot ids for h264 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/32823>
2025-01-06 01:02:13 +00:00
Erik Faye-Lund
61593e9c54 pan/ci: update opencl expectations
It's not entirely clear to me why this has moved from Crash/Fail to
Pass, the only thing I can see in the commit history between the last
nightly pass and failure is an optimization of unpacing 8-bit values
from a 64-bit value. It's a bit suspicious that an optimization makes
somethign pass...

But we need to have correct CI expectations, otherwise we won't notice
new failures. So let's update to the new reality, and debug this if the
problem reappears in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32833>
2025-01-05 07:44:04 +00:00
Erik Faye-Lund
f313b33d13 pan/ci: update t760 checksum
Looks like this changed when IO-lowering was changed in the GLSL
linker, but because the traces job here runs post-merge, it wasn't
noticed at the time.

There's only a single pixel that has changed, from a very dark color to
another very dark color. Neigher the before nor after images looks
obviously more correct than the other.

Fixes: 73d675451b ("ci: update fail lists and trace checksums")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32833>
2025-01-05 07:44:04 +00:00
David Rosca
e33452a6d3 ac/surface: Don't force linear for VIDEO_REFERENCE with emulated image opcodes
This caused regression by using higher pitch than needed on compute-only
devices, resulting in video decode errors.

Fixes: 308bae950f ("ac/surface: Add RADEON_SURF_VIDEO_REFERENCE")
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32863>
2025-01-04 09:13:44 +00:00
Rob Clark
fb59a9fb08 freedreno/a6xx: Use LATE_Z with OC + discard
If occlusion query is used, and the FS discards samples, we need to use
LATE_Z in order to get the sample count after the FS.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32869>
2025-01-04 02:52:41 +00:00
Lionel Landwerlin
98cdb9349a anv: ensure null-rt bit in compiler isn't used when there is ds attachment
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 15987f49bb ("anv: avoid setting up a null RT unless needed")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12396
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32867>
2025-01-03 23:12:22 +00:00
Caio Oliveira
6968794c50 intel/brw: Add missing bits in 3-src SWSB encoding for Xe2+
Fix invalid SWSB annotation in dEQP-VK.glsl.builtin.precision.mix.mediump.vec4 for LNL.

Fixes: 4a24f49b57 ("intel/compiler/xe2: Implement codegen of three-source instructions.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32846>
2025-01-03 21:19:26 +00:00
Benjamin Lee
51b0bad30b panfrost/va: implement fquantizetf16 ftz
Bifrost implements this with a ftz flag in the clause header. Valhall
doesn't have clauses, and needs a separate flush instruction.

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/32470>
2025-01-03 20:53:36 +00:00
Benjamin Lee
c9de3d57f7 panfrost/va: add FLUSH instruction
This is needed to implement FTZ for intermediate values on valhall.

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/32470>
2025-01-03 20:53:36 +00:00
Benjamin Lee
9f17138571 panvk: remove load_multisampled_pan sysval
This was only used by bi_lower_sample_mask_writes, which now ignores it
in panvk due to panfrost_compile_inputs::single_sample_full_coverage.

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/32636>
2025-01-03 20:01:54 +00:00
Benjamin Lee
41c6148c0d panvk: handle sample mask writes on 1-sample targets
In OpenGL, non-multisample targets always have full coverage, and shader
writes to gl_SampleMask are ignored. On Vulkan, sample mask writes on
single-sample targets are treated the same way as writes with >1 sample.

Fixes dEQP-VK.pipeline.*.multisample_shader_builtin.write_sample_mask.1_samples

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/32636>
2025-01-03 20:01:54 +00:00
Karol Herbst
5f30bc62fe rusticl/mesa/resource: port to NonNull
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
0fe59874c0 rusticl/mem: pass around QueueContext instead of PipeContext
This let us get rid of the Queue argument in a couple of places.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
b2f42dbe61 rusticl/queue: make QueueContext::dev public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
d460cb3675 rusticl/mesa: add missing files to meson.build
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
f3f84cfe9f rusticl/mesa/context: use Default for pipe_grid_info initialization
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
a4cae3c6ed rusticl/device: remove unused functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
05b37f3968 rusticl/mem: remove mem_type argument from new_image
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
4cbd4bead7 rusticl/mesa: remove PipeTransfer::res
The pipe_transfer struct already stores a pointer to the pipe_resource, so
no need to store it inside the Rust wrapper as well.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
f667845741 include: Update the OpenCL headers to latest
A few breaking changes in rusticl which this also fixes.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
f75ba4f9e3 rusticl: stop using system headers for CL and GL
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
ccfeda77bd rusticl/queue: add a life check to prevent applications dead locking
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Dylan Baker
f70ef03100 docs: update calendar for 24.3.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32870>
2025-01-03 10:00:51 -08:00
Dylan Baker
d518c59b9d docs: Add SHA sums to 24.3.3 release notes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32870>
2025-01-03 10:00:48 -08:00
Dylan Baker
0861975f49 docs: add release notes for 24.3.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32870>
2025-01-03 10:00:47 -08:00
Vinson Lee
3514b65c35 hk: Fix hk_ia_update arguments order
Fix defect reported by Coverity Scan.

Arguments in wrong order (SWAPPED_ARGUMENTS)
swapped_arguments: The positions of arguments in the call to
hk_ia_update do not match the ordering of the parameters:stat_c_inv is
passed to c_prims.stat_c_prims is passed to c_inv.

Fixes: a3b796ba19 ("libagx,hk: handle pipeline stats queries without a GS")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32853>
2025-01-03 17:14:48 +00:00
Erik Faye-Lund
eac8f1d460 Revert "panfrost: Disable CRC by default"
There's been a bunch of CRC fixes applied recently. Let's see if this
allows us to default to this as enabled instead.

This reverts commit fc30fe5bc5.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31965>
2025-01-03 12:12:15 +00:00
Lionel Landwerlin
1448778385 anv: rework tbimr push constant workaround
We'll want to know about the empty push constant for device generated
commands. It's easier if the information is stored in
anv_pipeline_bind_map::push_ranges[].

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/32828>
2025-01-03 11:48:42 +00:00
Lionel Landwerlin
6281b207db anv: add tracepoints timestamp mode for empty dispatches
When the runtime is going to potentially emit no dispatch, we need to
have a way to capture a timestamp. Add a new flag for this to tell
whether we don't have a HW instruction to capture the timestamp and
rely on MI_STORE_REGISTER_MEM instead.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: de00fe3f66 ("anv: add BVH building tracking through u_trace")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12382
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32835>
2025-01-03 10:36:49 +00:00
Lionel Landwerlin
a224105a26 vulkan/runtime: avoid emitting empty build_leaves
Seen in GravityMark.

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/32835>
2025-01-03 10:36:49 +00:00
Zoltán Böszörményi
2b9b34887e docs/features: Mark more Vulkan 1.4 features as done for drivers
For nvk: VK_KHR_global_priority

For lvp: VK_KHR_global_priority, VK_KHR_index_type_uint8,
VK_KHR_line_rasterization, VK_KHR_load_store_op_none,
VK_KHR_shader_float_controls2, VK_KHR_shader_subgroup_rotate,
VK_KHR_vertex_attribute_divisor, VK_EXT_host_image_copy and
VK_EXT_pipeline_robustness.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32801>
2025-01-03 10:20:27 +00:00
Zoltán Böszörményi
43eaba013e docs/features: Mark VK_EXT_host_image_copy as implemented on Turnip
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32801>
2025-01-03 10:20:27 +00:00
Zoltán Böszörményi
a0931e3361 features.txt: Add Vulkan 1.4 section
Some extensions were moved to core.
See https://docs.vulkan.org/spec/latest/appendices/versions.html

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12392
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32801>
2025-01-03 10:20:27 +00:00
Valentine Burley
5fd9f08c1d lavapipe/ci: Re-enable lavapipe-vk-asan
The previous issues have been resolved, and the only error the
job encountered was due to incorrect expectations.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32832>
2025-01-03 10:02:05 +00:00
Samuel Pitoiset
03b037a0e3 radv: disable logic op for float/srgb formats
The Vulkan spec says:
    "The application can enable a logical operation between the
     fragment’s color values and the existing value in the framebuffer
     attachment. This logical operation is applied prior to updating
     the framebuffer attachment. Logical operations are applied only
     for signed and unsigned integer and normalized integer
     framebuffers. Logical operations are not applied to floating-point
     or sRGB format color attachments."

Missing VKCTS coverage has been reported.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12345
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32826>
2025-01-03 09:35:45 +00:00
Samuel Pitoiset
0019900312 radv/meta: do not create redundant pipeline layout objects
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32834>
2025-01-03 09:11:59 +00:00
Samuel Pitoiset
105e809a9d radv/meta: add radv_meta_get_noop_pipeline_layout()
To avoid duplicated objects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32834>
2025-01-03 09:11:59 +00:00
Samuel Pitoiset
dd7343f278 radv/meta: reduce length of some cache keys
For faster hashing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32834>
2025-01-03 09:11:59 +00:00
Samuel Pitoiset
c8d2614113 radv/meta: fix loading the meta pipeline cache
This has been removed by mistake.

Fixes: f528c9e8f5 ("radv/meta: stop initializing RT accel structs")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32838>
2025-01-03 08:49:42 +00:00
Samuel Pitoiset
370e392313 radv: fix adding the BO to cmdbuf list when emitting buffer markers
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/32840>
2025-01-03 08:19:23 +00:00
Benjamin Lee
ff2a214e5f panfrost: specialize VS on FS interpolation qualifiers
This re-enables noperspective varying support for OpenGL. Because VS may
depend on FS, we now need to wait for both VS and FS to be available
before compiling shaders, and need to update VS when a new FS is bound.

Signed-off-by: Benjamin Lee <benjamin.lee@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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
bbd268d22c panfrost: factor FS shader key into a helper function
This will make things easier to follow with the addition of a VS key.

Signed-off-by: Benjamin Lee <benjamin.lee@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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
d93f9d6d1a panvk: use static noperspective when statically linking VS and FS
This triggers with VK_EXT_graphics_pipeline_library and monolithic
pipelines when VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT is set.
With VK_EXT_shader_object, it would trigger when
VK_SHADER_CREATE_LINK_STAGE_BIT_EXT is set on both VS and FS.

The fast-linking interface from [1] (unmerged) would allow us to use the
optimization with monolithic pipelines.

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024/diffs?commit_id=cd1ba4d6375764680c5ced9be90f5519b92eefe6

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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
98de4f42ff panfrost: add pass to lower noperspective varyings to a constant
This isn't hooked up yet, but should be a significant performance
improvement when available.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
30a288cdc9 panvk: pass noperspective_varyings sysval as a push constant
This can handle mismatched interpolation qualifiers between VS and FS,
and is a conformant noperspective implementation. Passing this sysval
dynamically has a performance cost. In the future we can reduce this by
passing it as a constant in some situations.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
103c4123ab panfrost: collect noperspective varyings in shader info
When linking FS and VS with mismatched interpolation qualifiers, we need
to read the FS qualifiers and pass them to the VS. I put
nir_collect_noperspective_varyings in a separate function instead of
merging it into the existing walk_varyings loop because it will later be
used on uncompiled shaders that don't have a pan_shader_info yet.

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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
081438ad39 panfrost: add nir pass to lower noperspective varyings
Mali only supports perspective-correct varying interpolation in
hardware, so we have to emulate noperspective with lowering in both the
VS and FS.

Both vulkan and opengl allow mismatched interpolation qualifiers between
stages. Because we need all varyings that are noperspective in the FS to
be lowered in the VS, we cannot rely on the interpolation qualifiers in
the VS. Loading the set of noperspective varyings as a sysval allows the
implementation to pass them as a compile-time constant when known
statically, or a runtime push constant when not. Passing noperspective
varyings dynamically has a performance cost with unnecessary branches
and fmuls.

This sysval is not hooked up yet in either panfrost or panvk, so shader
compilation will fail.

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/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
6f541e2016 panfrost: add intrinsic to load frag coord at a barycentric
This is needed for noperspective lowering, where we need to multiply the
varying value by gl_FragCoord.w at the same barycentric as the varying.
Normal nir_load_frag_coord_zw instructions are lowered to the new
intrinsic on bifrost with the pan_lower_frag_coord_zw pass.

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/32127>
2025-01-03 07:04:05 +00:00
Marek Olšák
9033e64b02 util/disk_cache: silence unused result warnings
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32810>
2025-01-03 02:03:06 +00:00
Marek Olšák
8c819a2f95 llvmpipe: silence an unused result warning
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32810>
2025-01-03 02:03:06 +00:00
Marek Olšák
03d24e56a2 vulkan: silence an unused variable warning
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32810>
2025-01-03 02:03:06 +00:00
David Rosca
3474978d52 radv: Fix sampling from image layers of video decode target
Video decode target needs custom height alignment, but tex descriptor
still needs to be set to the original size the image was created with.
This makes the descriptor wrong for layer > 0, so we need to calculate
the layer offset and add it to bo address for this case.

Fixes: 5deb476095 ("radv: align video images internal width/height inside the driver.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
David Rosca
9d477fae68 radv/video: Remove dt_field_mode handling code
This would be used for decoding into interlaced buffer, but since
that's not support it is a dead code.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
David Rosca
ca0cb78869 radv/video: Use correct array index for decode target and DPB images
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12057
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
David Rosca
8dabb480e2 radv/video: Fix DPB tier2 surface params
Fixes: 3e2c768aa8 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
Dylan Baker
d9429229cf intel/tests: Fix missing assignment of error condition
Coverity notices that `err` might be used uninitialized, which is true
as we don't assign the value we want to check! Fix that assignment so
the EXPECT_EQ macro does what we expect.

CID: 1635272
Fixes: 6b931a68c7 ("intel/common: Implement Xe KMD in mi_builder tests")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32849>
2025-01-03 00:53:49 +00:00
Dylan Baker
5420fc16d6 intel/tests: Fix coverity warning about possibly leaked memory
If the assert were to fail the memory would leak, which is pretty
harmless in a unit test, but the fix is trivial.

CID: 1635429
Fixes: 6b931a68c7 ("intel/common: Implement Xe KMD in mi_builder tests")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32849>
2025-01-03 00:53:49 +00:00
Erik Faye-Lund
51a2f70e5e panvk/ci: drop needless envvar
We no longer need this opt-in for v10 GPUs, so let's drop it.

Fixes: 976eb6825e ("panvk: do not require opt-in for panvk on v10")
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32825>
2025-01-02 23:08:27 +00:00
Erik Faye-Lund
2bb6db3fb3 docs: update panvk status
Two things happened since last update; we added support for
VK_KHR_shader_draw_parameters, and we fixed imageCubeArray for Bifrost
GPUs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32763>
2025-01-02 22:59:36 +00:00
Erik Faye-Lund
cf07e89d06 docs/ci: treat warnings as errors
When we moved building the docs to Meson, we accidentally dropped the -W
flag that we used to have. This lead to us no longer detecting certain
problems in the docs, which is unfortunate.

Let's bring this back gated by the werror meson-option, and wire that up
on the CI end.

Fixes: fdd204538b ("ci: build docs using meson")
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32831>
2025-01-02 21:33:51 +00:00
Erik Faye-Lund
7a8c46f54c docs: fixup link in radv docs
This is not how to add links, this is how to use the default-role. Let's
correct it.

Fixes: 3ba3e00750 ("radv: Add some documentation.")
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32831>
2025-01-02 21:33:51 +00:00
Erik Faye-Lund
46ccc13691 docs: fixup broken markup
We need an empty line after ".. code-block: [...]", otherwise the first
lines are interpreted as arguments, not content. This makes the entire
code-blocks not render at all.

Fixes: 5d6d67a4d1 ("docs/android: improve documentation about building llvmpipe for Android")
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32831>
2025-01-02 21:33:51 +00:00
Mel Henning
c273ada502 compiler/rust/bitset: Test next_unset()
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
2bcb950865 compiler/rust/bitset: Don't expose words
This encapsulates the bitset's word size and word count, which means
consumers no longer need to be careful about word count. Users of the old
apis for writing expressions on bit sets should migrate to the new expression
API.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
4e3ba67063 nak: Migrate liveness to new bitset expression api
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
86e5cb7c2d compiler/rust/bitset: Take a stream in union_with
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
47da213e19 compiler/rust/bitset: Add a lazy expression API
The new api doesn't require allocations for intermediate values in
expressions. It also has tests, which is nice because eg. the previous
implementation of the `&` operator was broken.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
e52b2ee4b9 compiler/rust/bitset: Remove impl Not
This is extremely difficult to use correctly for bitsets of
different sizes. Also, nobody uses it. Remove the footgun.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
8ec885da1d compiler/rust/bitset: impl FromIterator
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
de47702dde compiler/rust/bitset: Make BitSetIter private
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
06cd3c7fa3 compiler/rust/bitset: Removed unused start param
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
6ba317bd8c compiler/rust/bitset: Add a basic test
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
3b341366a6 compiler/rust: Fix running tests
`ninja test` wasn't actually running these tests, I guess because the
target name was duplicated in meson. Fix this so the tests actually run.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
639211dea8 compiler/rust/bitset: Fix the bitset iterator
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Antonio Ospite
6df997f6bc ci/android: upgrade DEBIAN_TEST_ANDROID_TAG
Also add a note in .gitlab-ci/container/debian/x86_64_test-android.sh
that DEBIAN_TEST_ANDROID_TAG needs to be updated when that file changes
too.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
578fb242f9 ci/android: add ci rules to test venus on Android
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
610fc8cd13 ci/android: add ci rules to test llvmpipe on Android
For future reference add some disabled rules to for running tests using
llvmpipe on Android, and for that to work also add
deqp-android-llvmpipe.toml

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
44caff4aba ci/android: set VK_DRIVER_FILES before launching cuttlefish
Cuttlefish performs some checks on the host system before launching,
setting VK_DRIVER_FILES to the path of the host artifacts makes sure
that a vulkan library can be found on the host side.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
d93626a84b ci/android: use a /data/deqp subdirectory on guest to store dEQP files
Use a /data/deqp subdirectory on the Android guest to store dEQP files,
so that the files are not mixed with unrelated ones under /data

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
a3c6f7aa5a ci/android: set XDG_CACHE_HOME and pass --shader-cache-dir to deqp-runner
Set XDG_CACHE_HOME when invoking deqp-runner so that mesa can create the
shader cache and avoid this error:

-----------------------------------------------------------------------
ERROR - dEQP error: Failed to create //.cache for shader cache (Read-only file system)---disabling.
-----------------------------------------------------------------------

And also pass --shader-cache-dir to deqp-runner for vulkan tests.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
a3e444ff1d ci/android: use a native adb connection
Use a "native" adb connection, it seems to have better stability,
especially when transferring a lot of files with `adb push`.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
030b5f310b ci/android: update list of deqp files pushed to the guest system
In particular push all the files in
/deqp-vk/external/vulkancts/modules/vulkan/ and /deqp-tools because they
are needed at runtime.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
2a85675eff ci/android: also copy mesa vulkan libraries to the Android guest
Also copy mesa vulkan libraries to the Android guest, this makes it
possible to test venus with the latest upstream mesa build.

While at it also keep the *_angle libraries as they will be used by the
venus_guest_angle GPU_MODE.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
948f179f65 ci/android: reorder PATH and LD_LIBRARY_PATH values to clarify priority
Prefer libraries from /cuttlefish when loading binaries, in particular
this solves some loading problem when launching
/cuttlefish/bin/virgl_render_server

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
5cec9b69fd ci/android: don't call cuttlefish-host-resources script
The /etc/init.d/cuttlefish-host-resources wnants to perform some
operations that are not really desirable on a gitlab shared runner, like
loading specific kernel modules.

Since the script does not seem to be strictly necessary for basic
operation of cuttlefish, don't call it at all, avoiding the kernel
modules problem.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
6e1959c56a ci/android: fix result dir for Android guest execution of deqp-runner
Commit 4143199be7 (ci/android: Use common $RESULTS_DIR for cuttlefish,
2024-08-21) clarified the separation between the result dir used on the
host and shipped in the artifacts, and the result dir used in the
Android guest to collect test results, however the latter was not
correctly passed to deqp-runner.

Fix that so that deqp-runner can finally run.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
4d3eced2c0 ci/android: fix warning when using chown
Fix warning when using chown:

-----------------------------------------------------------------------
+ chown root.kvm /dev/kvm
chown: warning: '.' should be ':': 'root.kvm'
-----------------------------------------------------------------------

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
8252ffbf11 ci/android: use a custom kernel when launching cuttlefish
Use a custom kernel when launching cuttlefish, this is needed for
-gpu_mode=venus.

And while at it also clean up the state from previous runs, this seems
to be required when passing a custom kernel.

In this change also pass -enable_bootanimation=false which makes
drm_virgl work, and pass -enable_minimal_mode=true to avoid using some
features which are not really needed.

Note that the file number limit has to be increased too in
.gitlab-ci/cuttlefish-runner.sh for cuttlefish to work properly.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
3cc3384e95 ci/android: better separate host and guest mesa artifacts
Clarify that artifacts from the Android guest are downloaded explicitly
and put them under /mesa-android directory so that they don't clash with
the Linux host artifacts downloaded by gitlab under
"${CI_PROJECT_DIR}/install".

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
0c0e268761 ci/android: make cuttlefish-runner.sh more robust against different Android images
Different Android images may contain different graphic libraries, for
example images from Google using an old mesa version may have
libGLES_mesa.so, while newer Android images built with mesa from
upstream have libGLESv1_CM_mesa.so, etc.

Use `rm -f` instead of just `rm` to avoid running into errors when
a file does not exist, resulting in a failing job.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
5d539f1a30 ci/android: get custom cuttlefish images from the S3
To test mesa on cuttlefish some special images tailored for upstream
mesa are needed, in particular these images may set properties or add
functionality that enable new use cases for upstream mesa on Android,
like for instance using venus via the vulkan.virtio mesa driver.

So instead of downloading the standard images from Google, get those
custom images from s3.freedesktop.org.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
92488c4598 ci/android: add sudo to EPHEMERAL deps for debian/x86_64_test-android.sh
The ./tools/buildutils/build_packages.sh script used by the
android-cuttlefish project built in debian/x86_64_test-android.sh uses
sudo, so install that as an EPHEMERAL dependency.

Also set SUDO_FORCE_REMOVE=yes when removing sudo to avoid some errors.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
711c9adb30 ci/android: update version of cuttlefish host tools
Update the version of cuttlefish host tools.

In particular the new version includes the change to be able to increase
the file number limit to 32k, as explained in
https://github.com/google/android-cuttlefish/pull/675

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
03f15ca6eb ci/android: handle premature exit of .gitlab-ci/cuttlefish-runner.sh
Save some logs and stop cuttlefish more cleanly when
.gitlab-ci/cuttlefish-runner.sh exits prematurely because of some
errors.

This makes it possible to have the logs available as artifacts even if
the script didn't run to completion.

This approach also leaves the system in a cleaner state and makes it
possible to relaunch the script and have launch_cvd work even if it had
been run in the past both with or without errors.

This is especially useful for local experiments.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
c4fd424a2b ci/android: restart all services after copying the new mesa libraries
After copying the newly built mesa libraries to the Android vendor
partition the services have to be restarted to make sure that the new
libraries are used, in particular by Surfaceflinger, so call 'stop'
and 'start' for that.

Also print the GLES implementation used by Surfaceflinger before and
after restarting, to be able to compare and check that the new libraries
are effectively picked up.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
5bd669e076 ci/android: don't copy the DRI drivers which are not needed anymore
For the current tests the DRI drivers do not seem to be needed on
Android, so remove the ANDROID_DRIVER variable and stop copying the DRI
libraries to the guest file system, only copy libgallium_dri.so which is
really needed.

While at it, also copy libGLESv1_CM.so and libGLESv2.so

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
17eabaf55c ci/android: build llvmpipe driver for Android by forcing llvm fallback
In order to build the mesa llvmpipe driver for Android, llvm libraries
for Android are needed; force meson to use a fallback for llvm and
provide prebuilt libraries making them available to meson thanks to
a wrap file.

Enable other software drivers for the x86_64-linux-android build, but
also disable the amd and intel hardware drivers for now which don't
build correctly on Android.

Download the prebuilt LLVM libraries for Android in the container job
rather than in the build job, to avoid downloading some big artifacts
for every mesa version built for Android.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
a90d771724 ci/android: build deqp for DEQP_API=VK
Build deqp for DEQP_API=VK by passing -DDEQP_ANDROID_EXE=ON.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
f6b3f2bee5 ci/android: fix problem with deqp version file when building for Android
In commit ad42be50c9 (ci/deqp: fully isolate deqp builds, 2024-03-17)
the deqp module version file was changed from something like
`/deqp/version-$deqp_api` to something like `/deqp-$deqp_api/version`
and this seems to cause some issues when building for Android:

-----------------------------------------------------------------------
[439/1301] Building CXX object external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o
FAILED: external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o
/tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android28 --sysroot=/tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DAMBER_CTS_VULKAN_HEADER=1 -DAMBER_ENABLE_CLSPV=0 -DAMBER_ENABLE_DXC=0 -DAMBER_ENABLE_LODEPNG=1 -DAMBER_ENABLE_RTTI=1 -DAMBER_ENABLE_SHADERC=0 -DAMBER_ENABLE_SPIRV_TOOLS=0 -DAMBER_ENGINE_DAWN=0 -DAMBER_ENGINE_VULKAN=1 -DDE_ANDROID_API=28 -DDE_ASSERT_FAILURE_CALLBACK -DDE_COMPILER=DE_COMPILER_CLANG -DDE_CPU=DE_CPU_X86_64 -DDE_FENV_ACCESS_ON="_Pragma(\"STDC FENV_ACCESS ON\")" -DDE_MINGW=0 -DDE_OS=DE_OS_ANDROID -DDE_PTR_SIZE=8 -I/tmp/VK-GL-CTS/external/amber/../vulkancts/framework/vulkan/generated/vulkan -I/tmp/VK-GL-CTS/framework/delibs/debase -I/tmp/VK-GL-CTS/framework/delibs/decpp -I/tmp/VK-GL-CTS/framework/delibs/depool -I/tmp/VK-GL-CTS/framework/delibs/dethread -I/tmp/VK-GL-CTS/framework/delibs/deutil -I/tmp/VK-GL-CTS/framework/delibs/destream -I/tmp/VK-GL-CTS/execserver -I/tmp/VK-GL-CTS/external/spirv-headers/src/include -I/tmp/VK-GL-CTS/external/amber/src/include -I/tmp/VK-GL-CTS/external/amber/src -I/tmp/deqp-vk -I/tmp/deqp-vk/external/vulkancts/framework/vulkan/generated/vulkan -Wall -Wextra -Wno-long-long -Wshadow -Wundef -Wconversion -Wno-sign-conversion -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions  -fwrapv -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -std=gnu++17 -fPIC -w -fno-exceptions -fvisibility=hidden -Wall -Wextra -Wno-cast-function-type-strict -Wno-padded -Wno-switch-enum -Wno-unknown-pragmas -Wno-unsafe-buffer-usage -pedantic-errors -Werror -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-pedantic -Wno-unknown-warning-option -Weverything -Wno-zero-as-null-pointer-constant -MD -MT external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o -MF external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o.d -o external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o -c /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.cc
In file included from /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.cc:16:
In file included from /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.h:19:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/vector:274:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__bit_reference:14:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/bit:57:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/limits:105:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/type_traits:417:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/cstddef:37:
/tmp/deqp-vk/version:1:1: error: unknown type name 'dEQP'
dEQP base version vulkan-cts-1.3.10.0
^
-----------------------------------------------------------------------

This seems to be caused by `cstddef` from the Android NDK which includes
a file named `version`, i.e.:

-----------------------------------------------------------------------
  #include <version>
-----------------------------------------------------------------------

To avoid the problem also add the deqp module name to the file name,
like: `/deqp-$deqp_api/deqp-$deqp_api-version`.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
960cdbae99 ci/deqp: collect the mustpass lists also for the android target
Collect the mustpass lists also for the Android target, in particular
this makes vk-main.txt to be found again when running vulkan tests on
Android.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
956ac1e562 ci/deqp: enable building testlog tools on Android too
The testlog tools seem to build fine on Android, add a patch to
VK-GL-CTS to enable them when DE_OS_IS_ANDROID.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
f908bf1e7f ci/deqp: cherry-pick fixes for building GL and GLES deqp on Android
The main branch of dEQP build fine for android but the GL and GLES
branches fail with errors like the following:

-----------------------------------------------------------------------
.../external/openglcts/modules/common/glcFramebufferBlitTests.cpp:715:26: error: no member named 'floor' in namespace 'std'
    return (GLubyte)std::floor(f == 1.0f ? 255 : f * 255.0);
                    ~~~~~^
.../external/openglcts/modules/common/glcFramebufferBlitTests.cpp:1491:14: error: no member named 'fabs' in namespace 'std'
    if (std::fabs(actual - expected) > eps)
        ~~~~~^
2 errors generated.
-----------------------------------------------------------------------

Cherry-pick a couple of commit from main that fix the errors.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
ab29d6e4a7 ci/deqp: refresh some patches to apply on top of recent VK-GL-CTS
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
47558b718a ci: set GIT_COMMITTER_DATE in a locale-agnostic format
When adding patches wit git-am create the date format for
GIT_COMMITTER_DATE in a locale-agnostic format, this avoids potential
issues when running the scripts locally with a non-English locale, e.g.:

-----------------------------------------------------------------------
++ GIT_COMMITTER_DATE='gio 1 gen 1970, 01:00:00, CET'
++ git am
fatal: invalid date format: gio 1 gen 1970, 01:00:00, CET
-----------------------------------------------------------------------

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Eric Engestrom
195663484e ci/meson: add FORCE_FALLBACK_FOR variable for build jobs to use
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Eric Engestrom
776b537896 ci/meson: make meson wrap fallback list more readable
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Rob Clark
a933acdfd7 tu: Align lrz height to 32
See previous commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Rob Clark
3759889846 freedreno/a6xx: Align lrz height to 32
Emperically this seems to be required when doing a linear clear of the
tiled LRZ buffer (because height needs to match aligned height for a
linear clear to dtrt).

Issue could be reproduced with nolrzfc and:

  glmark2 -s 1472x920 --visual-config samples=2 -b terrain

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12336
Fixes: a127a78548 ("freedreno: Re-enable LRZ for a7xx")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Rob Clark
f7af64cece freedreno/a6xx: Add nolrzfc debug option
Add option to disable lrz fast-clear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Rob Clark
746f41688c freedreno/a6xx: Align lrz setup with tu
No functional change.  It's just easier to compare if there aren't
cosmetic differences.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Caio Oliveira
e1aebf8a0c intel/brw: Remove 'fs' prefix from passes and related functions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32813>
2025-01-02 18:11:05 +00:00
Caio Oliveira
25384dccc0 intel/brw: Remove 'fs' prefix from passes filenames
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32813>
2025-01-02 18:11:05 +00:00
Marek Olšák
e772a4f3fd radeonsi: use nir_opt_move
TOTALS FROM AFFECTED SHADERS (35064/58359) - ACO
  Spilled SGPRs: 446 -> 402 (-9.87 %)
  Code Size: 56827400 -> 56672948 (-0.27 %) bytes
  Max Waves: 548680 -> 549799 (0.20 %)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
f114a18501 radeonsi: use nir_opt_sink
TOTALS FROM AFFECTED SHADERS (29673/58359) - ACO
  Spilled SGPRs: 860 -> 446 (-48.14 %)
  Code Size: 41681748 -> 41337964 (-0.82 %) bytes
  Max Waves: 465904 -> 466036 (0.03 %)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
7fbca998b1 amd: optimize atomics before lowering intrinsics
ac_nir_lower_intrinsics_to_args will lower most system values.

I have to keep the divergence analysis in ACO, otherwise it goes haywire.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
d30c55abf1 radeonsi: lower sysval intrinsics as late as possible
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
5dd9171765 ac/nir: set upper ranges for range analysis while lowering system values
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
0d5b03f2b9 ac/nir: split local_invocation_ids to 3 separate VGPR inputs
so that we can set the upper range per VGPR.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
65d241c947 ac/nir: set arg_upper_bound_u32 for vs_rel_patch_id
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
1d9fbe5387 ac/nir: add helper ac_nir_load_arg_upper_bound
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
cfeaa45dc6 ac/nir: clean up ac_nir_lower_indirect_derefs
IO variables can't occur here anymore.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
ae22da2ff8 ac/nir: lower more loads in ac_nir_lower_intrinsics_to_args instead of drivers
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
dc8a40ff3e ac/llvm: remove already lowered cases
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
ceb6f8fc32 amd: lower load_tess_rel_patch_id/primitive_id/tess_coord and overwrite.. in NIR
The overwrite instruction complicates it a little, which is why these
intrinsics are lowered together.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
61bfb4fa06 amd: lower load_subgroup_invocation in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
e69f47faee amd: lower load_local_invocation_index in NIR
This is the last intrinsic that needed the LS VGPR bug workaround in ACO
and ac_nir_to_llvm.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
433ca6ba38 ac/nir: extract a load_subgroup_id lowered helper
this will be used in the next commit

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
85ce311a36 radeonsi: don't return 0 from si_get_max_workgroup_size
the next commit needs this

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
342dcbdc8b amd: lower load_vertex_id/instance_id and overwrite_vs_arguments in NIR
2 things complicate this:
- overwrite_vs_arguments_amd
- the LS VGPR bug workaround

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
66dd70adc5 amd: lower load_gs_wave_id_amd in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
923f59c971 amd: lower load_barycentric_at_offset in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
16ab05fad1 amd: lower load_barycentric_pixel/centroid/sample in NIR
radeonsi needs to preserve interp_mode in the arg load.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
a15e733a81 ac,radeonsi: move load_vector_arg flags to common code
This will be needed by lowering of barycentrics.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
7e83f6ca8b amd: lower load_front_face in NIR
radeonsi must do this after si_lower_nir_abi, which optimizes front_face,
but doesn't lower it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
6ad5225b2a amd: lower load_frag_shading_rate in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
6d2e29ff6e amd: lower load_sample_pos in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
110e474b4f amd: lower load_sample_id in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
684c8da553 amd: lower load_invocation_id in NIR
ACO can't look for it because it's lowered there.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
d281240c57 amd: lower load_first_vertex/base_instance/draw_id/view_index in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
0d372b043b amd: lower load_local_invocation_id in NIR
This is based on ACO.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
13cb5c7b72 amd: lower load_frag_coord in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
58cb155068 amd: lower load_pixel_coord in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
85c3b5159a ac/nir: handle disabled PS VGPRs in ac_nir_load_arg_at_offset
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
58b7b9ab15 radv: reduce maxGeometryShaderInvocations to 32
32 is the maximum for gfx12 and recommended by AMD for all hw with NGG.

It's not worth exposing more than 32 on older hw. It's better when all hw
exposes the same limit.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Lionel Landwerlin
6fb2d3b163 anv: limit the memcpy data for push constants
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/32824>
2025-01-02 16:48:04 +00:00
Georg Lehmann
272ff275fa aco/insert_exec: reset top exec for p_discard_if
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12363
Fixes: 31f62a6123 ("aco/insert_exec: don't always reset top exec")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32830>
2025-01-02 15:18:48 +00:00
José Roberto de Souza
1fc82ee558 iris: Add support for damage region
Newer compositor sends the damaged region of the screen, with this we
can reduce the rendering area discarding vertices outside of damaged
area.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30048>
2025-01-02 14:40:47 +00:00
Timur Kristóf
57c5962413 radv: Rename layer_input to reads_layer in PS info.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
652a0b48bc amd: Set lower_layer_fs_input_to_sysval in common code, not in drivers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
ed88616a12 ac/nir/ngg: Don't mark multiview layer output as varying.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
ec548fd37b Revert "nir/opt_varyings: Add workaround for RADV mesh shader multiview."
The workaround is not needed anymore, because RADV now implements
the FS layer ID input as a sysval.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
dd00b3f527 radv: Implement FS layer ID input as a system value.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Janne Grunau
b06b62bb13 panvk: Silence warning on incompatible DRM render devices
This message is printed on non-panfrost/panthor systems on every
physical device enumeration when panvk is present like in distribution
mesa builds.
This "breaks" gtk-4 tests in the default configuration since they fail
on warning log messages. gtk-4 still forwards the vulkan debug report as
warning messages after fixes for issue 11451 to stop handling it as
critical message.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11451
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32822>
2025-01-02 12:52:40 +00:00
Konstantin Seurer
407186994c radv: Fix encoding empty acceleration structures
There will always be at least one internal node so the expectation that
there are more leaf nodes than internal nodes dows not hold when the
acceleration structure has no leaf nodes.

Fixes: f8b584d ("vulkan/runtime,radv: Add shared BVH building framework")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12302
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32820>
2025-01-02 13:07:33 +01:00
David Rosca
2f76bdf35d radeonsi/vcn: Change required FW version for rc_per_pic_ex on VCN3
It only works correctly on 29 and newer.
Also change the old FW message to one time warning.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12353
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32796>
2025-01-02 11:12:46 +00:00
Georg Lehmann
3da2d96bc5 aco/optimizer: fix signed extract of sub dword temps with SDWA
If an instruction didn't already use SDWA convert_to_SDWA in apply_extract
will add ubyte0/uword0 selections for v1b/v2b operands. This loses information
that the instruction doesn't care about the high bits and makes the next
apply_extract_twice fail.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: 6cb9d39bc2 ("aco: combine extracts with sub-dword definitions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32803>
2025-01-02 09:33:18 +00:00
Tapani Pälli
346f4d3c11 dri: remove GLsync typedef
This was previously used with interop extension but since then it has
been changed to use mesa_glinterop_flush_out instead. This typedef is
causing some compilation issues, so remove it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12378
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
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/32807>
2025-01-02 07:38:38 +00:00
Mel Henning
76e542e92a nak: Add nak_nir_mark_lcssa_invariants
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12273
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32618>
2025-01-01 18:49:13 +00:00
Marek Olšák
c21bc65ba7 nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads
A negative hole size means the loads overlap. This will be used by drivers
to handle overlapping loads in the callback easily.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32699>
2025-01-01 00:03:55 +00:00
Timur Kristóf
3ba3e00750 radv: Add some documentation.
Describe what RADV is, the basics of how it works,
and give some introduction to the terminology we use.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32766>
2024-12-31 23:01:23 +00:00
Timur Kristóf
01bf998e17 aco: Update documentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32766>
2024-12-31 23:01:23 +00:00
Sagar Ghuge
a857caebd2 iris: Switch to ANISOTROPIC_FAST filter mode
Same thing as ANISOTROPIC including all restrictions except HW is allowed to
take liberties with precision to speed things up, Currently only has an affect
on formats of type *_sRGB.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-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/32738>
2024-12-31 21:49:41 +00:00
Sagar Ghuge
76e85df2d2 anv: Switch to ANISOTROPIC_FAST filter mode
Same thing as ANISOTROPIC including all restrictions except HW is
allowed to take liberties with precision to speed things up, Currently
only has an affect on formats of type *_sRGB.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-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/32738>
2024-12-31 21:49:41 +00:00
Sagar Ghuge
15063d79d3 intel/genxml: Update SAMPLER_STATE structure
Add new ANISOTROPIC_FAST filter mode value to the Min/MagModeFilter
field.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-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/32738>
2024-12-31 21:49:41 +00:00
Caio Oliveira
fda7586439 gallium/meson: Ensure all needed sym_config are set.
Move the sym_config setting all together and ensure that we set either
a value or empty, since Meson complains about missing values.

Fixes the build warning

```
   Configuring dri.sym using configuration
   ../src/gallium/targets/dri/meson.build:28: WARNING: The variable(s) 'va_driver_init',
     'vdp_imp_device_create_x11' in the input file 'src/gallium/targets/dri/dri.sym.in' are
     not present in the given configuration data.
```

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32808>
2024-12-31 16:14:36 +00:00
Samuel Pitoiset
f528c9e8f5 radv/meta: stop initializing RT accel structs
They are already always compiled on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809>
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
853c99260b radv/meta: move initializing emulated astc to radv_device_init_meta()
For consistency with emulated etc2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809>
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
422d64d7ee radv/meta: always initialize emulated etc2 on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809>
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
1e75b6dfb8 radv/meta: remove a workaround for building accel structs with LLVM
This is no longer needded and this will allow us to compile the meta
pipelines on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32818>
2024-12-31 11:34:40 +00:00
Samuel Pitoiset
18013300b6 radv: disable RT with LLVM completely
This has never been useful and only few RT extensions were enabled
anyways. This will allow us to remove a workaround for compiling
meta pipelines for accel structs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32818>
2024-12-31 11:34:40 +00:00
Samuel Pitoiset
58c5766199 radv: fix destroying DGC pipelines
They weren't destroyed at all.

Fixes: 9f8684359f ("radv: implement VK_EXT_device_generated_commands")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32816>
2024-12-31 10:57:46 +00:00
Samuel Pitoiset
09b8ed4dd4 radv/meta: remove unused radv_meta_create_xxx() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
aa709ca32c radv/meta: convert the blit2d GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
19c1397855 radv/meta: use only one push constant range for blit2d pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
8a104de180 radv/meta: convert the resolve GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
bc5c37fef8 radv/meta: convert the clear GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
64676f52b2 radv/meta: convert the blit GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
b3c587e429 radv/meta: convert the fast-clear GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
015e3e34a7 radv/meta: convert the HW resolve GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
e33f6b6394 radv/meta: convert the HTILE expand GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
aad2c99e8d vulkan: use the meta pipeline cache for graphics pipelines
RADV needs to cache meta graphics pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
6d3b2a6531 vulkan: add a new vk_meta option to use the rect list pipeline path
RADV uses VK_PRIMITIVE_TOPOLOGY_META_RECT_LIST_MESA for some meta
operations but it doesn't need to use the existing path that draws
using VBOs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Valentine Burley
68c73f82ba lavapipe/ci: Update expectations
Document more flakes and add a skip for a test that can time out.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Valentine Burley
2c0301e155 turnip/ci: Document flake
Seen in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/68562273.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Valentine Burley
39aee0a8a7 zink/ci: Update expectations for ANV
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Valentine Burley
6b0d551e8b angle/ci: Update expectations
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Martin Roukala (né Peres)
564aea509a ci/b2c: run the machine registration check before the test container
This was a regression I introduced in 6f9614c187 and it took me until
now to realize :o

Fixes: 6f9614c187 ("ci/b2c: Reduce the length of the kernel cmdline")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
a96d039561 ci/b2c: modernize the job description to use run_*
The `b2c.container` and `b2c.service` keywords are deprecated, so
let's use the modern names: b2c.run, and b2c.run_service.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
cf01771208 i915g/ci: use the default b2c version
Let's use the default's b2c release, so as to keep it in sync with the
default ci-tron job description.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
e445d32dd3 r300/ci: use the default b2c
Let's use the default's b2c release, so as to keep it in sync with the
default ci-tron job description.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
e27e8e1200 freedreno/ci: use the default b2c
Let's use the default's b2c release, so as to keep it in sync with the
default ci-tron job description.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
7be9fb6409 ci/test: uprev to b2c v0.9.14
This brings a new version of the b2c initrd, adding support for
diskless DUTs, reducing boot time, and fixing a bunch of bugs.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
d5335c8a8f ci/tests: de-duplicate the b2c version between architectures
This ensures a uniform b2c version across mesa jobs.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
6f4ff32b2c ci/test: make the .b2c-${arch}-test-* jobs provide a default b2c
This removes the need for drivers to set their own defaults when they
can instead simply extend `.b2c-${arch}-test-*`.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Marek Olšák
15015f125f radeonsi: fix a front face regression (crash)
Since the switch to ACO for gfx8-9, LLVM is no longer covered by the CI.

Fixes: aee0c7274c - amd: switch to FRONT_FACE_ALL_BITS(0)

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32811>
2024-12-30 23:53:32 -05:00
Georg Lehmann
e112e2b047 nir,amd: optimize front_face ? a : -a
Foz-DB Navi31:
Totals from 3345 (4.21% of 79395) affected shaders:
MaxWaves: 96182 -> 96174 (-0.01%)
Instrs: 3135439 -> 3129508 (-0.19%); split: -0.24%, +0.05%
CodeSize: 16776088 -> 16718048 (-0.35%); split: -0.38%, +0.03%
VGPRs: 190884 -> 190848 (-0.02%); split: -0.03%, +0.01%
Latency: 32624132 -> 32621734 (-0.01%); split: -0.16%, +0.16%
InvThroughput: 5759987 -> 5749957 (-0.17%); split: -0.23%, +0.05%
VClause: 51044 -> 51086 (+0.08%); split: -0.12%, +0.20%
SClause: 103415 -> 103223 (-0.19%); split: -0.64%, +0.45%
Copies: 170398 -> 170555 (+0.09%); split: -0.64%, +0.74%
PreSGPRs: 135567 -> 133887 (-1.24%)
PreVGPRs: 140569 -> 141317 (+0.53%)
VALU: 1959144 -> 1953839 (-0.27%); split: -0.30%, +0.03%
SALU: 217956 -> 217676 (-0.13%); split: -0.20%, +0.07%

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/32791>
2024-12-30 22:31:35 +00:00
Georg Lehmann
9bd4296845 nir: add nir_alu_srcs_negative_equal_typed
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/32791>
2024-12-30 22:31:35 +00:00
Georg Lehmann
43fca7fffe amd: support load_front_face_fsign
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/32791>
2024-12-30 22:31:35 +00:00
Georg Lehmann
15d754fefa nir: add load_front_face_fsign
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/32791>
2024-12-30 22:31:34 +00:00
Georg Lehmann
aee0c7274c amd: switch to FRONT_FACE_ALL_BITS(0)
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/32791>
2024-12-30 22:31:34 +00:00
Caio Oliveira
056b14b882 intel/brw: Move two NIR passes to brw_nir.c
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32799>
2024-12-30 20:18:23 +00:00
Pavel Ondračka
8bc271e90d r300: disable microtiling for scanout buffers
Does not work with R300/R400 due to kernel driver limitations.
Suggested by Marek Olšák.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12010
Fixes: f424ef1801
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32638>
2024-12-30 19:37:36 +00:00
Caio Oliveira
1154b07d09 intel/brw: Add missing call to invalidate analysis
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32798>
2024-12-30 19:01:40 +00:00
Caio Oliveira
3ca6fa7487 intel/brw: Gather brw_reg related implementations in brw_reg.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32800>
2024-12-30 18:26:59 +00:00
Rob Clark
75c7f4e072 freedreno/registers: Add GMU_CORE_FW_VERSION
From https://patchwork.freedesktop.org/series/142856/

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32806>
2024-12-30 18:00:42 +00:00
Caio Oliveira
5860e07f92 intel/brw: Rename brw_compact_inst_* helpers to brw_eu_compact_inst_*
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
228aba779f intel/brw: Rename brw_inst_* helpers to brw_eu_inst_*
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
3031b22a8a intel/brw: Rename brw_inst_bits/set_bits to brw_eu_inst_bits/set_bits
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
06ccaad5f1 intel/brw: Rename brw_compact_inst to brw_eu_compact_inst
Consistent with brw_eu_inst.

Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
3c3f4a1235 intel/brw: Rename brw_inst to brw_eu_inst
Free the old name for the BRW IR instruction.

Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
9caa845e0f intel/brw: Rename brw_inst.h to brw_eu_inst.h
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Juan A. Suarez Romero
a96ded29c4 v3d/ci: clean some asan failures
Remove skipped asan tests that are now fixed.

Move some asan failures to skip, identifying what are the tests that
caused the failures.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32804>
2024-12-30 16:38:39 +00:00
Georg Lehmann
b8fa9daf0c nir: sink/move alu with two identical, non constant sources.
Foz-DB Navi21:
Totals from 32363 (40.76% of 79395) affected shaders:
MaxWaves: 787499 -> 787675 (+0.02%); split: +0.02%, -0.00%
Instrs: 28783404 -> 28783464 (+0.00%); split: -0.01%, +0.01%
CodeSize: 156763536 -> 156765148 (+0.00%); split: -0.01%, +0.02%
VGPRs: 1493304 -> 1492848 (-0.03%); split: -0.04%, +0.01%
Latency: 243022511 -> 243051994 (+0.01%); split: -0.08%, +0.09%
InvThroughput: 57827398 -> 57828129 (+0.00%); split: -0.05%, +0.05%
VClause: 582208 -> 582298 (+0.02%); split: -0.07%, +0.08%
SClause: 959634 -> 959312 (-0.03%); split: -0.07%, +0.04%
Copies: 1965821 -> 1965826 (+0.00%); split: -0.17%, +0.17%
Branches: 710593 -> 710596 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 1313513 -> 1313632 (+0.01%); split: -0.00%, +0.01%
PreVGPRs: 1210596 -> 1209103 (-0.12%); split: -0.12%, +0.00%
VALU: 19463445 -> 19463497 (+0.00%); split: -0.02%, +0.02%
SALU: 3319529 -> 3319500 (-0.00%); split: -0.01%, +0.01%

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32783>
2024-12-30 13:28:30 +00:00
Georg Lehmann
6a6b26dfa5 aco: create v_cmpx with s_andn2(exec, v_cmp)
Foz-DB Navi21:
Totals from 3928 (4.95% of 79395) affected shaders:
Instrs: 1155370 -> 1151154 (-0.36%)
CodeSize: 6332192 -> 6314616 (-0.28%)
Latency: 11955231 -> 11933281 (-0.18%); split: -0.18%, +0.00%
InvThroughput: 1842283 -> 1841822 (-0.03%); split: -0.03%, +0.00%
SALU: 175431 -> 171215 (-2.40%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Georg Lehmann
42512208d8 aco/insert_exec: exit shader using exec for top level discard
Totals from 14538 (18.31% of 79395) affected shaders:
no changes

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Georg Lehmann
6b35d6f75b aco: allow p_exit_early_if_not with exec condition
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Georg Lehmann
c279e63a79 aco: rename p_early_exit_if to if_not
It exits the shaders if the condition is false, not true.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Valentine Burley
13421a9fef venus/ci: Update expectations
These tests have been crashing or failing for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
d3d95c2a82 venus/ci: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite
to bring job durations within a reasonable range.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
fb754b7d38 lavapipe/ci: Update expectations
These tests have been crashing or timing out for a while now.
Also document two flakes that appeared after decreasing the
faction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
43c38dab5b lavapipe/ci: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for both subsets of the
deqp-runner suite, which allows decreasing the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
ee36c36664 panvk/ci: Bump the number of tests per group for G52
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite,
which allows decreasing the fraction and lowering the timeout.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32725>
2024-12-30 10:37:09 +01:00
Valentine Burley
7198bfc590 panvk/ci: Move the fractions out of suites
The only difference between the -full and regular suites was the
fraction. By moving the fractions out of the suites and into
DEQP_FRACTION, we can reuse the same suite definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32725>
2024-12-30 10:37:09 +01:00
Qiang Yu
0c43ddd3e4 radeonsi: unify disk cache id no matter use_aco or not
Which compiler shader is compiled with could be distinguished
with nir->info.use_aco_amd now, so no need to separate disk
cache id for them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32742>
2024-12-30 11:36:37 +08:00
Qiang Yu
aaa28be0e8 radeonsi: enable ACO by default for pre-GFX10 GPUs
User can set AMD_DEBUG=usellvm to switch back to LLVM.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32742>
2024-12-30 11:36:37 +08:00
Qiang Yu
8dbec20a56 radeonsi: fix global access ACO compile fail when OpenCL
sel->stage is MESA_SHADER_COMPUTE for OpenCL shaders, while
nir->info.stage is MESA_SHADER_KERNEL.

Fixes: 955ae53efd radeonsi: fix OpenCL piglit tests fails when using ACO
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32787>
2024-12-30 02:03:27 +00:00
Juan A. Suarez Romero
f20a748b1b vc4: find linear modifier when required
The goal of the commit is to fix a dead assignment detected by static
analyzer: value stored to `linear_ok` is never read.

But instead of just removing the dead assignment, we just remove the
full variable, and instead search for the linear modifier in the place
that is required.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Juan A. Suarez Romero
90087c1a73 v3d: find linear modifier when required
The goal of the commit is to fix a dead assignment detected by static
analyzer: value stored to `linear_ok` is never read.

But instead of just removing the dead assignment, we just remove the
full variable, and instead search for the linear modifier in the place
that is required.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Juan A. Suarez Romero
f13f0e1f77 v3d: remove intermediate variable
Static analyzer is complaining that value stored to `v3d` during its
initialization is never read.

But the variable is used just below in a loop, so it is not clear if
this is just a false positive.

In any case, having this intermediate variable provides nothing,
specially when it is used only in a single place. So rather remove it
and use the full variable.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Juan A. Suarez Romero
78880603c6 v3d: fix BO allocation
`cleared_and_retried` variable is not required, as once the cache is
empty, in the second retry it will retry it is already empty so it won't
retry a new allocation.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Samuel Pitoiset
bf7a0285cf radv/meta: remove radv_meta_create_compute_pipeline()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
37116720a8 radv/meta: convert the compute resolve pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
ab019f14b2 radv/meta: convert the clear image pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
db40e4a78d radv/meta: convert the image-to-image pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
0c21ebbc89 radv/meta: convert the buffer-to-image pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
8396bf9d64 radv/meta: convert the image-to-buffer pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
f63ced7ff2 radv/meta: convert the query resolve pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
1a34e799bd radv/meta: convert DGC pipeline layout to vk_meta
DGC pipelines aren't using the vk_meta helper because that would
require to compute a separate key and that's useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
27adadbe63 radv/meta: convert the DCC comp-to-single pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
23d2d76ab7 radv/meta: convert the clear HTILE mask pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
c6804016d0 radv/meta: convert the DCC decompress CS pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
a0c05dd7b5 radv/meta: convert the HTILE expand CS pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
3ff28c8f98 radv/meta: convert the DCC retile pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
4521eb1b2b radv/meta: convert the FMASK copy pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
a3aeeab434 radv/meta: convert the FMASK expand pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
f27bee04ce radv/meta: convert the copy VRS to HTILE pipelines to vk_meta
This pipeline was already always on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
88ffeb61ae radv/meta: convert the copy/fill pipelines to vk_meta
This also switches these pipelines to on-demand always.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:49 +00:00
Samuel Pitoiset
9ebfe81a24 radv/meta: rework creating meta pipelines for query resolves
To use the same design as other meta operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:49 +00:00
Samuel Pitoiset
2bc155959e radv: pass extra graphics pipeline create info using pNext
This will be needed to convert meta graphics pipeline to vk_meta.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32750>
2024-12-29 17:51:03 +00:00
Samuel Pitoiset
23b1df7953 radv: use VK_PRIMITIVE_TOPOLOGY_META_RECT_LIST_MESA for meta pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32750>
2024-12-29 17:51:03 +00:00
Samuel Pitoiset
0f8d07d355 radv: add support for VK_PRIMITIVE_TOPOLOGY_META_RECT_LIST_MESA
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32750>
2024-12-29 17:51:02 +00:00
Timur Kristóf
de2cb4a7d3 ac/nir: Only store params to attribute ring that are varying.
On GFX11+, varying outputs from the last pre-rasterization stage
are implemented by storing the outputs to the so-called
attribute ring.

Make sure to only store them when necessary.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:41 -06:00
Timur Kristóf
13234a8a8a ac/nir: Only export parameters when they are actually varying.
In AMD terminology, varying outputs are implemented by
parameter export instructions on GFX6-10.3 GPUs.

Only emit those when actually necessary.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:38 -06:00
Timur Kristóf
4d6c00944b ac/nir: Only export positions when they are really system values.
In AMD terminology, a system value is implemented by
position export instructions.

Make sure to only emit those when they are needed.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:36 -06:00
Timur Kristóf
f5981e8c0b ac/nir: Split GS output usage masks to varying and sysval masks.
To keep track which output is used for what purpose.

Note that this commit just adds the capability to track this
separately in ac/nir. The drivers will need to be updated
in the future to take advantage of this.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:33 -06:00
Timur Kristóf
92464109e3 ac/nir: Mark when pre-rast output is used as varying or sysval.
In this commit, just collect the info.
It will be taken into use by subsequent commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:29 -06:00
Timur Kristóf
cb0671aede ac/nir/ngg: Refactor storing per-primitive primitive ID to attribute ring.
Simplify the code using the helpers introduced in previous commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:26 -06:00
Timur Kristóf
edde762b56 ac/nir/ngg: Move emitting GS vertex param exports to if.
On GFX10-10.3 (when no attribute ring is present), only emit
the GS vertex parameter exports on the vertex export threads.
Other threads don't have anything to export.

Move this code around to make it a bit easier to follow.
Also add some comments to better explain what's what.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:23 -06:00
Timur Kristóf
68dbcdd935 ac/nir/ngg: Move wait attr ring workaround for GS to better place.
The call depends on the phis created by create_output_phis so
the code becomes more readable if we move it closer to that.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:20 -06:00
Timur Kristóf
9acc2f2435 ac/nir/ngg: Remove dead code for attribute ring stores.
These are replaced by the new helpers added in previous commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:17 -06:00
Timur Kristóf
f528de896e ac/nir/ngg: Refactor export_pos0_wait_attr_ring.
There is no need to create phis in this function anymore,
because they can be already created by create_output_phis before.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:14 -06:00
Timur Kristóf
badbb01c5d ac/nir/ngg: Refactor GS attribute ring stores.
Use the new helper.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:11 -06:00
Timur Kristóf
23c615bde2 ac/nir/ngg: Refactor VS/TES attribute ring stores.
Use the new helper.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:09 -06:00
Timur Kristóf
f38680aa1c ac/nir: Introduce ac_nir_store_parameters_to_attr_ring.
This function is going to be used for storing parameter outputs
to the attribute ring, instead of the current implementation.

It is going to be taken into use in the following commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:06 -06:00
Timur Kristóf
c4b45f1ec8 ac/nir: Pass ac_nir_prerast_out to ac_nir_export_position.
In a subsequent	commit,	ac_nir_export_position will
start using other fields from ac_nir_prerast_out.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:04 -06:00
Timur Kristóf
3d291a98c4 ac/nir: Pass ac_nir_prerast_out to ac_nir_export_parameters.
In a subsequent commit, ac_nir_export_parameters will
start using other fields from ac_nir_prerast_out.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:31:01 -06:00
Timur Kristóf
896237b52e ac/nir/ngg: Simplify updating mesh shader output info.
All 64-bit outputs are already lowered to 32-bit.
There is no need to handle them here.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:30:58 -06:00
Timur Kristóf
f460e3a36b ac/nir/ngg: Use ac_nir_prerast_out in mesh shader lowering.
This will help us share more code between the mesh shader lowering
and other passes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/32640>
2024-12-28 10:30:53 -06:00
David Rosca
a642ff15a6 frontends/va: Fix deinterlace filter
Deinterlace filter uses interlaced buffer for output which needs
to be converted to progressive. Add back code that handles this.

Fixes: c324364f39 ("frontends/va: Only use interlaced surfaces when progressive is not supported")
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32768>
2024-12-28 12:02:42 +00:00
Lionel Landwerlin
5e4aeb3ad7 anv: fix index buffer size changes
With vkCmdBindIndexBuffer2KHR only the provided size can change which
currently fails to reprogram the index buffer properly.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Fixes: 5c2aca456e ("anv: implement vkCmdBindIndexBuffer2KHR")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12376
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32785>
2024-12-27 13:20:49 +00:00
David Rosca
96cb12ac68 radv/amdgpu: Set VCN version for ac_parse_ib
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/32760>
2024-12-27 08:17:16 +00:00
David Rosca
e3d602de98 ac/parse_ib: Parse VCN IB_COMMON_OP_WRITEMEMORY
And more small fixes.

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/32760>
2024-12-27 08:17:16 +00:00
Qiang Yu
b0c47871ec ac: remove ac_nir_lower_subdword_loads
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
403cdacaff radeonsi: replace ac_nir_lower_subdword_loads
ac_nir_lower_mem_access_bit_sizes() does the work of it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
955ae53efd radeonsi: fix OpenCL piglit tests fails when using ACO
Now no regression compared with using LLVM.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
21f888a3ed ac,radv: move ac_nir_lower_bit_size_callback to common place
To be used by radeonsi for OpenCL.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
5f601361ed ac/nir: lower access for shared and scratch memory
OpenCL may load and store vec16 data, while ACO only
support <=32byte. Radeonsi is going to use
ac_nir_lower_mem_access_bit_sizes() for lowering these
access.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
9a8eef282b radeonsi: fix OpenCL shader compile fail
sel->stage is assigned with MESA_SHADER_COMPUTE statically,
change to use nir->info.stage need to handle with MESA_SHADER_KERNEL.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12372
Fixes: 9b7ea720c9 ("radeonsi: use nir->info instead of sel->info.base")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Marek Olšák
c0e5e8f932 amd: update addrlib
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32687>
2024-12-26 21:02:21 +00:00
Georg Lehmann
33a73203b0 aco/isel: skip and(exec) for top level demote_if/terminate_if
In nested control flow this is nessecary to not demote/terminate invocations
that are part of the global but not part of the local mask.

At the top level, the masks are the same and no additional invocations
can be accidentally disabled.

Foz-DB Navi21:
Totals from 2095 (2.64% of 79395) affected shaders:
Instrs: 1058326 -> 1056839 (-0.14%)
CodeSize: 5632480 -> 5626616 (-0.10%)
Latency: 12082761 -> 12080520 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 2246677 -> 2246636 (-0.00%); split: -0.00%, +0.00%
Copies: 114446 -> 114433 (-0.01%)
SALU: 230585 -> 229098 (-0.64%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32755>
2024-12-26 18:34:38 +00:00
Georg Lehmann
5b4b195f1b nir: optimize unpacking 8bit values from a 64bit source
Useful for load vectorization.

Foz-DB Navi21:
Totals from 299 (0.38% of 79395) affected shaders:
Instrs: 287818 -> 284333 (-1.21%); split: -1.21%, +0.00%
CodeSize: 1557124 -> 1540544 (-1.06%); split: -1.07%, +0.00%
Latency: 4009407 -> 4012389 (+0.07%); split: -0.05%, +0.12%
InvThroughput: 1260613 -> 1262530 (+0.15%); split: -0.01%, +0.17%
VClause: 5472 -> 5369 (-1.88%); split: -1.92%, +0.04%
SClause: 5419 -> 5305 (-2.10%); split: -2.58%, +0.48%
Copies: 36709 -> 36060 (-1.77%); split: -1.81%, +0.04%
PreSGPRs: 11861 -> 11655 (-1.74%)
SALU: 66920 -> 64310 (-3.90%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32778>
2024-12-26 17:50:32 +00:00
Marek Olšák
47cdec24ee radeonsi: remove unused code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
357ee7f699 radeonsi: switch si_get_blitter_vs to IO intrinsics
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
a0579f75fb radeonsi: fix a TCS regression
This change caused the regression:
@@ -853,7 +853,7 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *

       /* Reset the shader context. */
       ctx.shader = shader;
-      ctx.stage = sel->stage;
+      ctx.stage = nir->info.stage;

       bool same_thread_count = shader->key.ge.opt.same_patch_vertices;
       si_build_wrapper_function(&ctx, parts, same_thread_count);

because "nir" contains the previous shader (LS), not the current shader (HS).
Fix it by using prev_nir for the previous shader, so that we can keep using
"nir".

Fixes: 9b7ea720c9 - radeonsi: use nir->info instead of sel->info.base

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
227a894775 radeonsi/ci: update failures
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
19c00c586e ac/llvm: remove unused code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
c6fd69bd5e ac: remove unused code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Evan
4e89690878 amd/vpelib: Shaper Refactor
- Refactor Shaper code to apply linear OR PQ based on input transfer function
- Program gamma based on shaper expected input CS
- fix fp16 input handling
- fix snake case in update_whitepoint

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Signed-off-by: Evan Damphousse <evan.damphousse@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
2024-12-26 01:23:59 +00:00
Hsieh, Mike
596d9ff8cf amd/vpelib: Refactor 3D LUT parameters
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
2024-12-26 01:23:59 +00:00
Chen, Phoebe
7d326ab082 amd/vpelib: Refactor YUV format check
Using general vpe_is_yuv* helper function for the condition check

Reviewed-by: Evan Damphousse <evan.damphousse@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Phoebe Chen <phoebe.chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
2024-12-26 01:23:59 +00:00
Ian Romanick
0f3a350087 brw/nir: Don't generate scalar byte to float conversions on DG2+ in optimize_extract_to_float
The lowering code does not generate efficient code. It is better to
just not emit the bad thing in the first place. The shaders that I
examined had blocks of NIR like:

    con 32     %527 = extract_u8 %456.o, %5 (0x0)
    con 32     %528 = extract_u8 %456.o, %35 (0x1)
    con 32     %529 = extract_u8 %456.o, %14 (0x2)
    con 32     %530 = extract_u8 %456.o, %11 (0x3)
    con 32     %531 = u2f32 %527
    con 32     %532 = u2f32 %528
    con 32     %533 = u2f32 %529
    con 32     %534 = u2f32 %530

In some cases the u2f results are multiplied with 1/255. There may be
a slightly more efficient way to do this by doing something like

    mov(8)    g40<1>UW        g12.1<32,8,4>UB
    mov(8)    g41<1>UW        g12.2<32,8,4>UB
    mov(8)    g42<1>UW        g12.3<32,8,4>UB
    mov(8)    g60<1>F         g12<32,8,4>UB
    mov(8)    g61<1>F         g40<1,1,0>UW
    mov(8)    g62<1>F         g41<1,1,0>UW
    mov(8)    g63<1>F         g42<1,1,0>UW

In SIMD16 and SIMD32 that would save temporary register space. It could
save a register in SIMD8 by using g40.8 instead of g42. Making that
happen might be tricky. Maybe we should just add a special NIR opcode
that converts a packed uint32 to a vec4?

v2: Add a bunch of documentation explaining what's going on. Suggested
by Ken.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 18228689 -> 18228720 (<.01%)
instructions in affected programs: 43091 -> 43122 (0.07%)
helped: 0 / HURT: 30

total cycles in shared programs: 932542994 -> 932544290 (<.01%)
cycles in affected programs: 8150758 -> 8152054 (0.02%)
helped: 15 / HURT: 17

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 142890605 -> 142890392 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21655049536 -> 21654693720 (-0.00%); split: -0.00%, +0.00%

Totals from 181 (0.03% of 553251) affected shaders:
Instrs: 188022 -> 187809 (-0.11%); split: -0.12%, +0.01%
Cycle count: 85291658 -> 84935842 (-0.42%); split: -0.47%, +0.05%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 154438050 -> 154436980 (-0.00%)
Cycle count: 15334650326 -> 15334644375 (-0.00%); split: -0.00%, +0.00%
Spill count: 56754 -> 56706 (-0.08%)
Fill count: 95919 -> 95808 (-0.12%)
Scratch Memory Size: 2306048 -> 2304000 (-0.09%)
Max live registers: 32469924 -> 32469899 (-0.00%)

Totals from 112 (0.02% of 642922) affected shaders:
Instrs: 156186 -> 155116 (-0.69%)
Cycle count: 11111478 -> 11105527 (-0.05%); split: -0.62%, +0.56%
Spill count: 1766 -> 1718 (-2.72%)
Fill count: 2815 -> 2704 (-3.94%)
Scratch Memory Size: 78848 -> 76800 (-2.60%)
Max live registers: 11526 -> 11501 (-0.22%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
1a7593ed36 brw/nir: Treat some ballot as convergent
v2: Fix for Xe2.

v3: Add a comment explaining the use of bld instead of xbld. Suggested
by Ken. Fix a bug in handing is_scalar source. Noticed by me while
applying Ken's review feedback.

shader-db:

Lunar Lake, Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18228657 -> 18228689 (<.01%)
instructions in affected programs: 9333 -> 9365 (0.34%)
helped: 2 / HURT: 26

total cycles in shared programs: 932511560 -> 932542994 (<.01%)
cycles in affected programs: 2263040 -> 2294474 (1.39%)
helped: 7 / HURT: 27

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20700370 -> 20700392 (<.01%)
instructions in affected programs: 18579 -> 18601 (0.12%)
helped: 1 / HURT: 28

total cycles in shared programs: 888385851 -> 888386325 (<.01%)
cycles in affected programs: 2571368 -> 2571842 (0.02%)
helped: 14 / HURT: 6

total spills in shared programs: 4373 -> 4371 (-0.05%)
spills in affected programs: 71 -> 69 (-2.82%)
helped: 1 / HURT: 0

total fills in shared programs: 4657 -> 4653 (-0.09%)
fills in affected programs: 196 -> 192 (-2.04%)
helped: 1 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 142887258 -> 142890605 (+0.00%); split: -0.00%, +0.00%
Cycle count: 21653599282 -> 21655049536 (+0.01%); split: -0.00%, +0.01%
Max live registers: 47942973 -> 47942837 (-0.00%)

Totals from 22209 (4.01% of 553251) affected shaders:
Instrs: 4337679 -> 4341026 (+0.08%); split: -0.00%, +0.08%
Cycle count: 261852040 -> 263302294 (+0.55%); split: -0.38%, +0.93%
Max live registers: 1299670 -> 1299534 (-0.01%)

Meteor Lake, DG2, Tiger Lake, and Skylake had similar results. (Meteor Lake shown)
Totals:
Instrs: 156599915 -> 156590882 (-0.01%); split: -0.01%, +0.00%
Cycle count: 16940072009 -> 16940902317 (+0.00%); split: -0.01%, +0.01%
Max live registers: 32610801 -> 32610488 (-0.00%)
Max dispatch width: 5730736 -> 5731744 (+0.02%); split: +0.12%, -0.11%

Totals from 35528 (5.52% of 643617) affected shaders:
Instrs: 6175409 -> 6166376 (-0.15%); split: -0.21%, +0.06%
Cycle count: 230679923 -> 231510231 (+0.36%); split: -0.46%, +0.82%
Max live registers: 1354716 -> 1354403 (-0.02%)
Max dispatch width: 167648 -> 168656 (+0.60%); split: +4.26%, -3.66%

Ice Lake
Totals:
Instrs: 155330276 -> 155318037 (-0.01%); split: -0.01%, +0.00%
Cycle count: 15019092327 -> 15019637026 (+0.00%); split: -0.00%, +0.01%
Max live registers: 32640341 -> 32637305 (-0.01%)
Max dispatch width: 5780720 -> 5780688 (-0.00%); split: +0.02%, -0.02%

Totals from 37773 (5.85% of 645641) affected shaders:
Instrs: 6643030 -> 6630791 (-0.18%); split: -0.24%, +0.05%
Cycle count: 223589025 -> 224133724 (+0.24%); split: -0.29%, +0.53%
Max live registers: 1491781 -> 1488745 (-0.20%)
Max dispatch width: 167600 -> 167568 (-0.02%); split: +0.75%, -0.77%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
f2d2014636 brw/nir: Simplify get_nir_image_intrinsic_image and get_nir_buffer_intrinsic_index
shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 20041625 -> 20041634 (<.01%)
instructions in affected programs: 1206 -> 1215 (0.75%)
helped: 0 / HURT: 5

total cycles in shared programs: 929993812 -> 929993816 (<.01%)
cycles in affected programs: 10930 -> 10934 (0.04%)
helped: 1 / HURT: 2

fossil-db:

Lunar Lake
Totals:
Instrs: 142892951 -> 142893049 (+0.00%)
Send messages: 6591165 -> 6591186 (+0.00%)
Cycle count: 21653727624 -> 21653732470 (+0.00%); split: -0.00%, +0.00%
Scratch Memory Size: 5664768 -> 5660672 (-0.07%)
Max live registers: 47944999 -> 47944983 (-0.00%)

Totals from 19 (0.00% of 553292) affected shaders:
Instrs: 10671 -> 10769 (+0.92%)
Send messages: 697 -> 718 (+3.01%)
Cycle count: 234508 -> 239354 (+2.07%); split: -0.01%, +2.08%
Scratch Memory Size: 38912 -> 34816 (-10.53%)
Max live registers: 2203 -> 2187 (-0.73%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 156744203 -> 156743428 (-0.00%); split: -0.00%, +0.00%
Send messages: 7654787 -> 7654808 (+0.00%)
Cycle count: 16942341318 -> 16942329195 (-0.00%); split: -0.00%, +0.00%
Spill count: 75549 -> 75499 (-0.07%)
Fill count: 140094 -> 140012 (-0.06%)
Scratch Memory Size: 3945472 -> 3944448 (-0.03%)
Max live registers: 32642020 -> 32642009 (-0.00%)

Totals from 19 (0.00% of 644000) affected shaders:
Instrs: 12489 -> 11714 (-6.21%); split: -7.00%, +0.79%
Send messages: 697 -> 718 (+3.01%)
Cycle count: 203873 -> 191750 (-5.95%); split: -6.77%, +0.82%
Spill count: 50 -> 0 (-inf%)
Fill count: 82 -> 0 (-inf%)
Scratch Memory Size: 25600 -> 24576 (-4.00%)
Max live registers: 1150 -> 1139 (-0.96%)

No fossil-db changes on Tiger Lake, Ice Lake, or Skylake.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
9a967c5ec4 brw/nir: Don't try optimize around emit_uniformize
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
63e395fa87 brw/nir: Eliminate nir_to_brw_state::uniform_values
No shader-db changes on any Intel platform. No fossil-db changes on
Tiger Lake, Ice Lake, or Skylake.

fossil-db:

Lunar Lake
Totals:
Cycle count: 21653230858 -> 21653230518 (-0.00%); split: -0.00%, +0.00%
Max live registers: 47941741 -> 47941737 (-0.00%)

Totals from 17 (0.00% of 553202) affected shaders:
Cycle count: 201232 -> 200892 (-0.17%); split: -0.19%, +0.02%
Max live registers: 1354 -> 1350 (-0.30%)

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
Totals:
Instrs: 156455123 -> 156453396 (-0.00%); split: -0.00%, +0.00%
Cycle count: 16904545026 -> 16904393943 (-0.00%); split: -0.00%, +0.00%
Max live registers: 32638039 -> 32638035 (-0.00%)

Totals from 1201 (0.19% of 643905) affected shaders:
Instrs: 509360 -> 507633 (-0.34%); split: -0.34%, +0.00%
Cycle count: 1579931758 -> 1579780675 (-0.01%); split: -0.01%, +0.00%
Max live registers: 59633 -> 59629 (-0.01%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
a13244e57b brw/nir: Treat some resource_intel as convergent
No shader-db changes on any Intel platform. No fossil-db changes on Ice
Lake or Skylake.

fossil-db:

Lunar Lake
Totals:
Cycle count: 21653232202 -> 21653230858 (-0.00%); split: -0.00%, +0.00%

Totals from 4 (0.00% of 553202) affected shaders:
Cycle count: 14276568 -> 14275224 (-0.01%); split: -0.01%, +0.00%

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
Totals:
Instrs: 156453398 -> 156455123 (+0.00%); split: -0.00%, +0.00%
Cycle count: 16904394153 -> 16904545026 (+0.00%); split: -0.00%, +0.00%

Totals from 1189 (0.18% of 643905) affected shaders:
Instrs: 502891 -> 504616 (+0.34%); split: -0.00%, +0.34%
Cycle count: 1579688485 -> 1579839358 (+0.01%); split: -0.00%, +0.01%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
1b24612c57 brw/nir: Treat load_*_uniform_block_intel as convergent
Between 5 and 10 shaders (depending on the platform) from Blender are
massively helped for spills and fills (e.g., from 45 spills to 0, and
180 fills to 0).

Previously this commit cause a lot of spill and fill damage to
Wolfenstein Youngblood and Red Dead Redemption 2. I believe due to
!32041 and !32097, this is no longer the case. RDR2 is helped, and
Wolfenstein Youngblood has no changes.

However, q2rtx/q2rtx-rt-pipeline is hurt:

    Spill count: 126 -> 175 (+38.89%); split: -0.79%, +39.68%
    Fill count: 156 -> 235 (+50.64%); split: -1.92%, +52.56%

By the end of this series this damage is fixed, and q2rtx is helped
overall by -0.79% spills and -1.92% fills.

v2: Fix for Xe2.

v3: Just keep using bld for the group(1, 0) call. Suggested by Ken.

v4: Major re-write. Pass bld and xbld to fs_emit_memory_access. The big
fix is changing the way srcs[MEMORY_LOGICAL_ADDRESS] is calculated
(around line 7180). In previous versions of the commit, the address
would be calculated using bld (which is now xbld) even if the address
source was not is_scalar. This could cause the emit_uniformize (later in
the function) to fetch garbage. This also drops the special case
handling of constant offset. Constant propagation and algebraic will
handle this.

v5: Fix a subtle bug that was ultimately caused by the removal of
offset_to_component. The MEMORY_LOGICAL_ADDRESS for
load_shared_uniform_block_intel was being calculated as SIMD16 on LNL,
but the later emit_uniformize would treat it as SIMD32. This caused GPU
hangs in Assassin's Creed Valhalla.

v6: Fix a bug in D16 to D16U32 expansion. Noticed by Ken. Add a comment
explaining bld vs xbld vs ubld in fs_nir_emit_memory_access. Suggested
by Ken.

v7: Revert some of the v6 changes related to D16 to D16U32
expansion. This code was mostly correct. xbld is correct because DATA0
needs to be generated in size of the eventual SEND instruction. Using
offset(nir_src, xbld, c) will cause offset() to correctly added
component(..., 0) if nir_src.is_scalar but xbld is not scalar_group().

v8: nir_intrinsic_load_shared_uniform_block_intel was removed. This
caused reproducible hangs in Assassin's Creed: Valhalla. There are some
other compiler issues related to this game, and we're not yet sure
exactly what the cause of any of it is.

shader-db:

Lunar Lake
total instructions in shared programs: 18058270 -> 18068886 (0.06%)
instructions in affected programs: 5196846 -> 5207462 (0.20%)
helped: 4442 / HURT: 11416

total cycles in shared programs: 921324492 -> 919819398 (-0.16%)
cycles in affected programs: 733274162 -> 731769068 (-0.21%)
helped: 11312 / HURT: 31788

total spills in shared programs: 3633 -> 3585 (-1.32%)
spills in affected programs: 48 -> 0
helped: 5 / HURT: 0

total fills in shared programs: 2277 -> 2198 (-3.47%)
fills in affected programs: 79 -> 0
helped: 5 / HURT: 0

LOST:   123
GAINED: 377

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 19703458 -> 19699173 (-0.02%)
instructions in affected programs: 5885251 -> 5880966 (-0.07%)
helped: 4545 / HURT: 14971

total cycles in shared programs: 903497253 -> 902054570 (-0.16%)
cycles in affected programs: 691762248 -> 690319565 (-0.21%)
helped: 16412 / HURT: 28080

total spills in shared programs: 4894 -> 4646 (-5.07%)
spills in affected programs: 248 -> 0
helped: 7 / HURT: 0

total fills in shared programs: 6638 -> 5581 (-15.92%)
fills in affected programs: 1057 -> 0
helped: 7 / HURT: 0

LOST:   427
GAINED: 978

Ice Lake and Skylake had similar results. (Ice Lake shonw)
total instructions in shared programs: 20384200 -> 20384889 (<.01%)
instructions in affected programs: 5295084 -> 5295773 (0.01%)
helped: 5309 / HURT: 12564

total cycles in shared programs: 873002832 -> 872515246 (-0.06%)
cycles in affected programs: 463413458 -> 462925872 (-0.11%)
helped: 16079 / HURT: 13339

total spills in shared programs: 4552 -> 4373 (-3.93%)
spills in affected programs: 546 -> 367 (-32.78%)
helped: 11 / HURT: 0

total fills in shared programs: 5298 -> 4657 (-12.10%)
fills in affected programs: 1798 -> 1157 (-35.65%)
helped: 10 / HURT: 0

LOST:   380
GAINED: 925

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 141528822 -> 141728392 (+0.14%); split: -0.21%, +0.35%
Subgroup size: 10968048 -> 10968144 (+0.00%)
Send messages: 6567930 -> 6567909 (-0.00%)
Cycle count: 22165780202 -> 21624534624 (-2.44%); split: -3.09%, +0.65%
Spill count: 69890 -> 66665 (-4.61%); split: -5.06%, +0.44%
Fill count: 128331 -> 120189 (-6.34%); split: -7.44%, +1.09%
Scratch Memory Size: 5829632 -> 5664768 (-2.83%); split: -2.86%, +0.04%
Max live registers: 47928290 -> 47611371 (-0.66%); split: -0.71%, +0.05%

Totals from 364369 (66.18% of 550563) affected shaders:
Instrs: 113448842 -> 113648412 (+0.18%); split: -0.26%, +0.44%
Subgroup size: 7694080 -> 7694176 (+0.00%)
Send messages: 5308287 -> 5308266 (-0.00%)
Cycle count: 21885237842 -> 21343992264 (-2.47%); split: -3.13%, +0.65%
Spill count: 65152 -> 61927 (-4.95%); split: -5.42%, +0.47%
Fill count: 122811 -> 114669 (-6.63%); split: -7.77%, +1.14%
Scratch Memory Size: 5438464 -> 5273600 (-3.03%); split: -3.07%, +0.04%
Max live registers: 34355310 -> 34038391 (-0.92%); split: -1.00%, +0.07%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
db2b1e4d76 brw/nir: Treat load_btd_{global,local}_arg_addr_intel and load_btd_shader_type_intel as convergent
No shader-db changes on any Intel platform. No fossil-db changes on
Tiger Lake, Ice Lake, or Skylake.

fossil-db:

Lunar Lake
Totals:
Instrs: 141808714 -> 141808513 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22177889310 -> 22181410192 (+0.02%); split: -0.00%, +0.02%
Spill count: 69892 -> 69890 (-0.00%); split: -0.01%, +0.01%
Fill count: 128313 -> 128331 (+0.01%)
Max live registers: 48052083 -> 48052742 (+0.00%); split: -0.00%, +0.00%

Totals from 549 (0.10% of 551446) affected shaders:
Instrs: 911251 -> 911050 (-0.02%); split: -0.10%, +0.07%
Cycle count: 1244153266 -> 1247674148 (+0.28%); split: -0.04%, +0.32%
Spill count: 15849 -> 15847 (-0.01%); split: -0.04%, +0.03%
Fill count: 35087 -> 35105 (+0.05%)
Max live registers: 68047 -> 68706 (+0.97%); split: -0.25%, +1.22%

Meteor Lake
Totals:
Instrs: 152744298 -> 152741241 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17410258529 -> 17405949054 (-0.02%); split: -0.04%, +0.01%
Spill count: 78528 -> 78598 (+0.09%); split: -0.01%, +0.09%
Fill count: 147893 -> 147978 (+0.06%); split: -0.00%, +0.06%
Scratch Memory Size: 3962880 -> 3969024 (+0.16%)
Max live registers: 31887206 -> 31887413 (+0.00%); split: -0.00%, +0.00%

Totals from 552 (0.09% of 633315) affected shaders:
Instrs: 907279 -> 904222 (-0.34%); split: -0.48%, +0.15%
Cycle count: 1152358569 -> 1148049094 (-0.37%); split: -0.56%, +0.19%
Spill count: 15290 -> 15360 (+0.46%); split: -0.03%, +0.48%
Fill count: 35313 -> 35398 (+0.24%); split: -0.02%, +0.26%
Scratch Memory Size: 1313792 -> 1319936 (+0.47%)
Max live registers: 34218 -> 34425 (+0.60%); split: -0.47%, +1.08%

DG2
Totals:
Instrs: 152766492 -> 152763061 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17406058608 -> 17406396943 (+0.00%); split: -0.02%, +0.02%
Spill count: 78626 -> 78624 (-0.00%); split: -0.01%, +0.01%
Fill count: 147956 -> 148007 (+0.03%); split: -0.01%, +0.04%
Scratch Memory Size: 3962880 -> 3969024 (+0.16%)
Max live registers: 31887158 -> 31887365 (+0.00%); split: -0.00%, +0.00%

Totals from 552 (0.09% of 633315) affected shaders:
Instrs: 908513 -> 905082 (-0.38%); split: -0.47%, +0.09%
Cycle count: 1148162185 -> 1148500520 (+0.03%); split: -0.23%, +0.26%
Spill count: 15364 -> 15362 (-0.01%); split: -0.07%, +0.06%
Fill count: 35343 -> 35394 (+0.14%); split: -0.03%, +0.17%
Scratch Memory Size: 1313792 -> 1319936 (+0.47%)
Max live registers: 34218 -> 34425 (+0.60%); split: -0.47%, +1.08%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
f3593df877 brw/nir: Treat load_reloc_const_intel as convergent
shader-db:

Lunar Lake, Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
Lunar Lake
total instructions in shared programs: 18096549 -> 18096537 (<.01%)
instructions in affected programs: 26128 -> 26116 (-0.05%)
helped: 7 / HURT: 2

total cycles in shared programs: 922073090 -> 922093922 (<.01%)
cycles in affected programs: 10574198 -> 10595030 (0.20%)
helped: 19 / HURT: 76

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20503943 -> 20504053 (<.01%)
instructions in affected programs: 23378 -> 23488 (0.47%)
helped: 6 / HURT: 5

total cycles in shared programs: 875477036 -> 875480112 (<.01%)
cycles in affected programs: 13840528 -> 13843604 (0.02%)
helped: 22 / HURT: 55

total spills in shared programs: 4546 -> 4552 (0.13%)
spills in affected programs: 8 -> 14 (75.00%)
helped: 0 / HURT: 1

total fills in shared programs: 5280 -> 5298 (0.34%)
fills in affected programs: 24 -> 42 (75.00%)
helped: 0 / HURT: 1

One compute shader in Tomb Raider was hurt for spills and fills.

fossil-db:

Lunar Lake
Totals:
Instrs: 141808815 -> 141808714 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22185066952 -> 22177889310 (-0.03%); split: -0.05%, +0.02%
Spill count: 69859 -> 69892 (+0.05%); split: -0.03%, +0.07%
Fill count: 128344 -> 128313 (-0.02%); split: -0.04%, +0.01%
Scratch Memory Size: 5833728 -> 5829632 (-0.07%)

Totals from 13384 (2.43% of 551446) affected shaders:
Instrs: 13852162 -> 13852061 (-0.00%); split: -0.00%, +0.00%
Cycle count: 7691993336 -> 7684815694 (-0.09%); split: -0.15%, +0.06%
Spill count: 53266 -> 53299 (+0.06%); split: -0.03%, +0.10%
Fill count: 96492 -> 96461 (-0.03%); split: -0.05%, +0.02%
Scratch Memory Size: 3827712 -> 3823616 (-0.11%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152744735 -> 152744298 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17400199290 -> 17410258529 (+0.06%); split: -0.01%, +0.07%
Max live registers: 31887208 -> 31887206 (-0.00%)

Totals from 12435 (1.96% of 633315) affected shaders:
Instrs: 13445310 -> 13444873 (-0.00%); split: -0.00%, +0.00%
Cycle count: 6941685096 -> 6951744335 (+0.14%); split: -0.03%, +0.18%
Max live registers: 1071302 -> 1071300 (-0.00%)

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150644063 -> 150643944 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15618718733 -> 15622092285 (+0.02%); split: -0.01%, +0.03%
Spill count: 58816 -> 58790 (-0.04%)
Fill count: 101054 -> 101065 (+0.01%)
Max live registers: 31792771 -> 31792766 (-0.00%); split: -0.00%, +0.00%

Totals from 13383 (2.12% of 632544) affected shaders:
Instrs: 12016285 -> 12016166 (-0.00%); split: -0.00%, +0.00%
Cycle count: 5239956851 -> 5243330403 (+0.06%); split: -0.02%, +0.08%
Spill count: 28977 -> 28951 (-0.09%)
Fill count: 47568 -> 47579 (+0.02%)
Max live registers: 1001554 -> 1001549 (-0.00%); split: -0.00%, +0.00%

Skylake
Totals:
Instrs: 140943195 -> 140943154 (-0.00%); split: -0.00%, +0.00%
Cycle count: 14818940190 -> 14816706154 (-0.02%); split: -0.02%, +0.00%
Max live registers: 31663173 -> 31663168 (-0.00%); split: -0.00%, +0.00%

Totals from 12625 (2.01% of 629351) affected shaders:
Instrs: 11598223 -> 11598182 (-0.00%); split: -0.00%, +0.00%
Cycle count: 4519027823 -> 4516793787 (-0.05%); split: -0.05%, +0.00%
Max live registers: 970275 -> 970270 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
fb9b363376 brw/nir: Treat load_inline_data_intel as convergent
No shader-db changes on any Intel platform.

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 141808595 -> 141808815 (+0.00%); split: -0.00%, +0.00%
Cycle count: 22181300418 -> 22185066952 (+0.02%); split: -0.01%, +0.03%
Max live registers: 48052077 -> 48052083 (+0.00%)

Totals from 720 (0.13% of 551446) affected shaders:
Instrs: 116778 -> 116998 (+0.19%); split: -0.01%, +0.20%
Cycle count: 1197931082 -> 1201697616 (+0.31%); split: -0.21%, +0.53%
Max live registers: 56552 -> 56558 (+0.01%)

No fossil-db changes on any other Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
3e63920ca5 brw/nir: Treat some load_ubo as convergent
v2: Fix for Xe2.

No changes in shader-db or fossil-db on Lunar Lake, Meteor Lake, or DG2.

shader-db:

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
total instructions in shared programs: 19626547 -> 19634353 (0.04%)
instructions in affected programs: 1591181 -> 1598987 (0.49%)
helped: 925 / HURT: 3595

total cycles in shared programs: 865236718 -> 866682659 (0.17%)
cycles in affected programs: 151284264 -> 152730205 (0.96%)
helped: 3430 / HURT: 5510

total sends in shared programs: 1032237 -> 1032233 (<.01%)
sends in affected programs: 20 -> 16 (-20.00%)
helped: 4 / HURT: 0

LOST:   48
GAINED: 141

fossil-db:

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150662952 -> 150641175 (-0.01%); split: -0.03%, +0.02%
Subgroup size: 7768880 -> 7768888 (+0.00%)
Send messages: 7502265 -> 7502044 (-0.00%)
Cycle count: 15621785298 -> 15618640525 (-0.02%); split: -0.06%, +0.04%
Spill count: 58818 -> 58816 (-0.00%)
Fill count: 101063 -> 101054 (-0.01%)
Max live registers: 31795403 -> 31792179 (-0.01%); split: -0.01%, +0.00%
Max dispatch width: 5572160 -> 5571488 (-0.01%); split: +0.00%, -0.01%

Totals from 10278 (1.62% of 632539) affected shaders:
Instrs: 5276493 -> 5254716 (-0.41%); split: -0.89%, +0.48%
Subgroup size: 156432 -> 156440 (+0.01%)
Send messages: 279259 -> 279038 (-0.08%)
Cycle count: 6483576378 -> 6480431605 (-0.05%); split: -0.16%, +0.11%
Spill count: 27133 -> 27131 (-0.01%)
Fill count: 49384 -> 49375 (-0.02%)
Max live registers: 675781 -> 672557 (-0.48%); split: -0.49%, +0.01%
Max dispatch width: 97256 -> 96584 (-0.69%); split: +0.08%, -0.77%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
c48570d2b2 brw/nir: Treat some ALU results as convergent
v2: Fix for Xe2.

v3: Fix handling of 64-bit CMP results.

v4: Scalarize 16-bit comparison temporary destination when used as a
source (as was already done for 64-bit). Suggested by Ken.

shader-db:

Lunar Lake
total instructions in shared programs: 18096500 -> 18096549 (<.01%)
instructions in affected programs: 15919 -> 15968 (0.31%)
helped: 8 / HURT: 21

total cycles in shared programs: 921841300 -> 922073090 (0.03%)
cycles in affected programs: 115946336 -> 116178126 (0.20%)
helped: 386 / HURT: 135

Meteor Lake and DG2 (Meteor Lake shown)
total instructions in shared programs: 19836053 -> 19836016 (<.01%)
instructions in affected programs: 19547 -> 19510 (-0.19%)
helped: 21 / HURT: 18

total cycles in shared programs: 906713777 -> 906588541 (-0.01%)
cycles in affected programs: 96914584 -> 96789348 (-0.13%)
helped: 335 / HURT: 134

total fills in shared programs: 6712 -> 6710 (-0.03%)
fills in affected programs: 52 -> 50 (-3.85%)
helped: 1 / HURT: 0

LOST:   1
GAINED: 1

Tiger Lake
total instructions in shared programs: 19641284 -> 19641278 (<.01%)
instructions in affected programs: 12358 -> 12352 (-0.05%)
helped: 10 / HURT: 19

total cycles in shared programs: 865413131 -> 865460513 (<.01%)
cycles in affected programs: 74641489 -> 74688871 (0.06%)
helped: 388 / HURT: 100

total spills in shared programs: 3899 -> 3898 (-0.03%)
spills in affected programs: 17 -> 16 (-5.88%)
helped: 1 / HURT: 0

total fills in shared programs: 3249 -> 3245 (-0.12%)
fills in affected programs: 51 -> 47 (-7.84%)
helped: 1 / HURT: 0

LOST:   1
GAINED: 1

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20495826 -> 20496111 (<.01%)
instructions in affected programs: 53220 -> 53505 (0.54%)
helped: 28 / HURT: 16

total cycles in shared programs: 875173550 -> 875243910 (<.01%)
cycles in affected programs: 51700652 -> 51771012 (0.14%)
helped: 400 / HURT: 39

total spills in shared programs: 4546 -> 4546 (0.00%)
spills in affected programs: 288 -> 288 (0.00%)
helped: 1 / HURT: 2

total fills in shared programs: 5224 -> 5280 (1.07%)
fills in affected programs: 795 -> 851 (7.04%)
helped: 0 / HURT: 4

LOST:   1
GAINED: 1

fossil-db:

Lunar Lake
Totals:
Instrs: 141811551 -> 141807640 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22183128332 -> 22181285594 (-0.01%); split: -0.06%, +0.05%
Spill count: 69890 -> 69859 (-0.04%); split: -0.09%, +0.04%
Fill count: 128877 -> 128344 (-0.41%); split: -0.42%, +0.00%
Max live registers: 48053415 -> 48051613 (-0.00%); split: -0.00%, +0.00%

Totals from 6817 (1.24% of 551443) affected shaders:
Instrs: 4300169 -> 4296258 (-0.09%); split: -0.14%, +0.05%
Cycle count: 17263755610 -> 17261912872 (-0.01%); split: -0.08%, +0.07%
Spill count: 41822 -> 41791 (-0.07%); split: -0.15%, +0.07%
Fill count: 75523 -> 74990 (-0.71%); split: -0.71%, +0.01%
Max live registers: 733647 -> 731845 (-0.25%); split: -0.29%, +0.04%

Meteor Lake and all older Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 152735305 -> 152735801 (+0.00%); split: -0.00%, +0.00%
Subgroup size: 7733536 -> 7733616 (+0.00%)
Cycle count: 17398725539 -> 17400873100 (+0.01%); split: -0.00%, +0.02%
Max live registers: 31887018 -> 31885742 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5561696 -> 5561712 (+0.00%)

Totals from 5672 (0.90% of 633314) affected shaders:
Instrs: 2817606 -> 2818102 (+0.02%); split: -0.05%, +0.07%
Subgroup size: 81128 -> 81208 (+0.10%)
Cycle count: 10021470543 -> 10023618104 (+0.02%); split: -0.01%, +0.03%
Max live registers: 306520 -> 305244 (-0.42%); split: -0.43%, +0.01%
Max dispatch width: 74136 -> 74152 (+0.02%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
7eab2cb67e brw/nir: Treat load_workgroup_id as convergent
v2: Fix for Xe2.

shader-db:

Lunar Lake Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18096526 -> 18096500 (<.01%)
instructions in affected programs: 6759 -> 6733 (-0.38%)
helped: 9 / HURT: 3

total cycles in shared programs: 921727804 -> 921841300 (0.01%)
cycles in affected programs: 110049730 -> 110163226 (0.10%)
helped: 90 / HURT: 372

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20496591 -> 20496402 (<.01%)
instructions in affected programs: 48757 -> 48568 (-0.39%)
helped: 25 / HURT: 8

total cycles in shared programs: 875253948 -> 875237902 (<.01%)
cycles in affected programs: 56760140 -> 56744094 (-0.03%)
helped: 363 / HURT: 34

total spills in shared programs: 4555 -> 4546 (-0.20%)
spills in affected programs: 174 -> 165 (-5.17%)
helped: 2 / HURT: 0

total fills in shared programs: 5243 -> 5224 (-0.36%)
fills in affected programs: 382 -> 363 (-4.97%)
helped: 2 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 141811577 -> 141811551 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22173792370 -> 22183128332 (+0.04%); split: -0.00%, +0.04%
Max live registers: 48053498 -> 48053415 (-0.00%)

Totals from 3911 (0.71% of 551443) affected shaders:
Instrs: 2164804 -> 2164778 (-0.00%); split: -0.00%, +0.00%
Cycle count: 2404062476 -> 2413398438 (+0.39%); split: -0.02%, +0.41%
Max live registers: 413583 -> 413500 (-0.02%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
6fab1b77c2 brw/nir: Treat some load_uniform as convergent
No shader-db changes on any Intel platform.

v2: Fix for Xe2.

v3: Rework the way that we determine that an intrinsic can actually be
convergent. This will now depend on whether or not the important
sources have previously be determined to be convergent. Fixes
intermitent failures in some test cases (including
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.push_constant_float_16_to_32.scalar_frag).

v4: s/the it/it/ in a comment. Noticed by Ken.

fossil-db:

No fossil-db changes on Lunar Lake.

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152743449 -> 152743161 (-0.00%)
Cycle count: 17399179660 -> 17399193488 (+0.00%)

Totals from 144 (0.02% of 633314) affected shaders:
Instrs: 5936 -> 5648 (-4.85%)
Cycle count: 51616 -> 65444 (+26.79%)

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150646195 -> 150645907 (-0.00%)
Cycle count: 15618427818 -> 15618428942 (+0.00%)

Totals from 144 (0.02% of 632567) affected shaders:
Instrs: 6218 -> 5930 (-4.63%)
Cycle count: 39968 -> 41092 (+2.81%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
341e5117ec brw/nir: Treat load_const as convergent
opt_combine_constants goes to great effort to pack 8 constants into a
single register, this can't have much effect.

There is a lot of fossil-db variation among platforms, but the results
are generally positive.

v2: Fix for Xe2.

shader-db:

Lunar Lake
total instructions in shared programs: 18095100 -> 18092845 (-0.01%)
instructions in affected programs: 158931 -> 156676 (-1.42%)
helped: 423 / HURT: 0

total cycles in shared programs: 921523326 -> 921522784 (<.01%)
cycles in affected programs: 7522774 -> 7522232 (<.01%)
helped: 225 / HURT: 228

LOST:   1
GAINED: 7

Meteor Lake and all older Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19820211 -> 19820303 (<.01%)
instructions in affected programs: 53087 -> 53179 (0.17%)
helped: 135 / HURT: 1

total cycles in shared programs: 906380523 -> 906383031 (<.01%)
cycles in affected programs: 1402315 -> 1404823 (0.18%)
helped: 156 / HURT: 100

LOST:   1
GAINED: 16

fossil-db:

Lunar Lake
Totals:
Instrs: 141876801 -> 141783010 (-0.07%); split: -0.07%, +0.00%
Subgroup size: 10994624 -> 10994704 (+0.00%)
Cycle count: 22173441950 -> 22172949188 (-0.00%); split: -0.01%, +0.01%
Spill count: 69850 -> 69890 (+0.06%); split: -0.00%, +0.06%
Fill count: 129285 -> 128877 (-0.32%)
Max live registers: 48047900 -> 48043650 (-0.01%); split: -0.01%, +0.00%

Totals from 29837 (5.41% of 551396) affected shaders:
Instrs: 7842512 -> 7748721 (-1.20%); split: -1.23%, +0.03%
Subgroup size: 940320 -> 940400 (+0.01%)
Cycle count: 3444846368 -> 3444353606 (-0.01%); split: -0.09%, +0.08%
Spill count: 23358 -> 23398 (+0.17%); split: -0.01%, +0.18%
Fill count: 52296 -> 51888 (-0.78%)
Max live registers: 3183481 -> 3179231 (-0.13%); split: -0.16%, +0.03%

Meteor Lake
Totals:
Instrs: 152709353 -> 152666543 (-0.03%); split: -0.03%, +0.00%
Cycle count: 17397176906 -> 17397668904 (+0.00%); split: -0.00%, +0.01%
Fill count: 147896 -> 147893 (-0.00%)
Max live registers: 31862891 -> 31861888 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5559664 -> 5561776 (+0.04%); split: +0.08%, -0.04%

Totals from 20913 (3.30% of 633046) affected shaders:
Instrs: 6676676 -> 6633866 (-0.64%); split: -0.64%, +0.00%
Cycle count: 1498330125 -> 1498822123 (+0.03%); split: -0.06%, +0.09%
Fill count: 41010 -> 41007 (-0.01%)
Max live registers: 1799295 -> 1798292 (-0.06%); split: -0.06%, +0.00%
Max dispatch width: 12880 -> 14992 (+16.40%); split: +33.29%, -16.89%

DG2 and Tiger Lake had similar results. (DG2 shown)
Totals:
Instrs: 152730878 -> 152688139 (-0.03%); split: -0.03%, +0.00%
Cycle count: 17394835605 -> 17394179808 (-0.00%); split: -0.01%, +0.00%
Max live registers: 31862843 -> 31861840 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5559664 -> 5561776 (+0.04%); split: +0.08%, -0.04%

Totals from 20912 (3.30% of 633046) affected shaders:
Instrs: 6563021 -> 6520282 (-0.65%); split: -0.65%, +0.00%
Cycle count: 1201999616 -> 1201343819 (-0.05%); split: -0.08%, +0.03%
Max live registers: 1798392 -> 1797389 (-0.06%); split: -0.06%, +0.00%
Max dispatch width: 12872 -> 14984 (+16.41%); split: +33.31%, -16.90%

Ice Lake
Totals:
Instrs: 151914872 -> 151868108 (-0.03%)
Cycle count: 15262958696 -> 15262665082 (-0.00%); split: -0.00%, +0.00%
Max live registers: 32194225 -> 32193192 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5650880 -> 5650608 (-0.00%); split: +0.02%, -0.03%

Totals from 22192 (3.48% of 637223) affected shaders:
Instrs: 6419739 -> 6372975 (-0.73%)
Cycle count: 184733818 -> 184440204 (-0.16%); split: -0.36%, +0.20%
Max live registers: 1989950 -> 1988917 (-0.05%); split: -0.05%, +0.00%
Max dispatch width: 5744 -> 5472 (-4.74%); split: +23.40%, -28.13%

Skylake
Totals:
Instrs: 141027379 -> 140811741 (-0.15%)
Cycle count: 14817704293 -> 14817418611 (-0.00%); split: -0.01%, +0.01%
Max live registers: 31628796 -> 31627791 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5535176 -> 5539880 (+0.08%); split: +0.14%, -0.06%

Totals from 22218 (3.53% of 628840) affected shaders:
Instrs: 5944856 -> 5729218 (-3.63%)
Cycle count: 182845101 -> 182559419 (-0.16%); split: -0.60%, +0.44%
Max live registers: 1974576 -> 1973571 (-0.05%); split: -0.07%, +0.02%
Max dispatch width: 16912 -> 21616 (+27.81%); split: +46.93%, -19.11%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
d0f1a94e3d brw/build: Prepare BROADCAST for scalar values
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
5ea9ed4798 brw/nir: Prepare try_rebuild_source for scalar values
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
59f66b4150 brw/emit: Allow scalar sources to HF math instructions on Xe2
v2: Add a comment explaining the context of the workaround. Suggested by
Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
4457073c32 brw/lower: Properly handle UNIFORM globals address in lower_trace_ray_logical_send
v2: Don't shadow previous declaration of globals_addr. Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
007c92b2ac brw/lower: Adjust source stride on DF is_scalar sources to MAD on Gfx9
This commit used to be "brw/emit: Allow scalar sources to 64-bit
3-source instructions". These instructions were fixed up in
brw_eu_emit. There seems to be some conflict with the <0,1,0> stride an
post-RA scheduling. The only difference between the passing code
generated by this commit and the failing code generated by the older
commit is some post-RA scheduling.

v2: Change the stride of a MAD even if the instruction isn't
lowered. MAD instructions that are already SIMD8 have to follow the same
rules. 🤦

v3: Pull the lowering out to its own pass. Update the comment in
brw_fs_validate. Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
d5d7ae22ae brw/nir: Fix up handling of sources that might be convergent vectors
Sources that are scalars (almost all source) and convergent generally
want <0,1,0> source stride. Sources that are vectors (e.g., texture
coordinates, SSBO write data, etc.) and convergent want no extra strides
applied. In nearly all cases LOAD_PAYLOAD lowering will do the right
thing.

v2: Use VEC in emit_pixel_interpolater_send. Suggested by Ken.

v3: With the elimination of offset_to_component(), offset() may not
convert an is_scalar source to have a zero stride. Explicitly do this
in get_nir_src and prepare_alu_destination_and_sources.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
9e6bd5bf97 brw/lower: Allow uniform and scalar sources to many kinds of SEND
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
1bff4f93ca brw: Basic infrastructure to store convergent values as scalars
In SIMD16 and SIMD32, storing convergent values in full 16- or
32-channel registers is wasteful. It wastes register space, and in most
cases on SIMD32, it wastes instructions. Our register allocator is not
clever enough to handle scalar allocations. It's fundamental unit of
allocation is SIMD8. Start treating convergent values as SIMD8.

Add a tracking bit in brw_reg to specify that a register represents a
convergent, scalar value. This has two implications:

1. All channels of the SIMD8 register must contain the same value. In
   general, this means that writes to the register must be
   force_writemask_all and exec_size = 8;

2. Reads of this register can (and should) use <0,1,0> stride. SIMD8
   instructions that have restrictions on source stride can us <8,8,1>.

Values that are vectors (e.g., results of load_uniform or texture
operations) will be stored as multiple SIMD8 hardware registers.

v2: brw_fs_opt_copy_propagation_defs fix from Ken. Fix for Xe2.

v3: Eliminte offset_to_scalar(). Remove mention of vec4 backend in
brw_reg.h. Both suggested by Caio. The offset_to_scalar() change
necessitates some trickery in the fs_builder offset() function, but I
think this is an improvement overall. There is also some rework in
find_value_for_offset to account for the possibility that is_scalar
sources in LOAD_PAYLOAD might be <8;8,1> or <0;1,0>.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
ef3dc401da brw: Add devinfo parameter to fs_inst::regs_read
This isn't used now, but future commits will add uses. Doing this as a
separate commit removes a lot of "just typing" churn from commits that
have real changes to review.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Martin Krastev
e129d242f6 svga/ci: disable vmware farm
Farm has started experiencing intermittent dhcp/pxe issues with DUTs.
Disable the farm to investigate.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: David Heidelberg <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32776>
2024-12-24 17:40:48 +00:00
Marek Olšák
af899c3752 radeonsi,radv: fix incorrect min_esverts for NGG subgroup calculation
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
c52025a1ce radeonsi: disable luminance alpha formats on gfx6
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
9b7ea720c9 radeonsi: use nir->info instead of sel->info.base
sel->info is out of date after shader variant optimizations. We need to
stop using it.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
04a0800068 radeonsi: call si_init_shader_args in si_get_nir_shader
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
409a6fd69c radeonsi: make si_init_shader_args static
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
7ddb28f447 radeonsi: remove some uses of enum pipe_shader_type
it's identical to gl_shader_stage

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
110b308841 radeonsi: make nir->info and si_shader_info::base identical
so that we can use nir->info instead of the latter.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
6a1bdf2f78 radeonsi/gfx12: tune streamout performance
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
10b951d752 radeonsi/gfx12: fix DrawTransformFeedback(stream != 0)
We only set buf_filled_size for the first target, but draws from non-zero
streams use buf_filled_size from other targets, so share the same
buf_filled_size buffer among all streamout targets because it contains
all 4 offsets.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
8440184dfd radeonsi: make NGG streamout output primitive type known at compile time
This compiles an optimized shader variant for NGG streamout where the output
primitive is known at compile time. This allows putting stores for all
vertices into the same VMEM clause.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
5003465c42 radeonsi: eliminate shader code computing killed Z/S/samplemask PS outputs
Compile a monolithic optimized shader to do that, and clean up the comments.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
58132d6fc8 radeonsi: implement nir_opt_frag_depth using kill_z instead of the NIR pass
This uses si_shader_info to store whether gl_FragDepth can be removed,
and it uses the kill_z epilog flag to do the removal without recompilation.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
b56f47611a radeonsi: fix alpha-to-coverage + alpha-to-one used together for gfx6-10.3
It works exactly like gfx11 except that COVERAGE_TO_MASK_ENABLE must be 1
to indicate that alpha for alpha-to-coverage should be read from mrtz.a.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
08abddd235 radeonsi/gfx11: fix alpha-to-coverage + alpha-to-one used together
alpha-to-coverage must be applied before alpha-to-one. The only way to do
that is to export alpha for alpha-to-coverage via mrtz, and export 1 via
mrt0.a.

ACO and monolithic shader support is already in place thanks to RADV,
so we only need to change the LLVM PS epilog and the shader key.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
de996ac481 radeonsi: kill Z and stencil PS outputs if depth or stencil is disabled
This adds kill_z and kill_stencil flags to the shader PS epilog key, which
removes those outputs if depth or stencil are disabled.

It must be implemented in:
* ACO PS epilog
* LLVM PS epilog
* ac_nir_lower_ps for monolithic shaders

Some of the samplemask code wasn't completely correct, but probably harmless.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
0beeb16e41 radeonsi: fix a gfx10.3 regression due to a gfx12 change
This fixes:
    Assertion `!"BITSET_TEST_RANGE: bit range crosses word boundary"' failed.

Fixes: e3cef02c24 - radeonsi/gfx12: set DB_RENDER_OVERRIDE based on stencil state

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
4ee1b2ee24 radeonsi/ci: update failures and flakes
If deqp-runner detects a flake, it's not reported without -v.
Here I gathered all the flakes.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
31358df708 radeonsi/ci: don't copy skips.csv to the results directory
It's not needed anymore. This fixes the script for llvmpipe.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Pierre-Eric Pelloux-Prayer
c0ef2aa7f8 DEPENDENCY: ac/llvm: fix sparse code handling
The existing code produced a incorrectly sized result from visit_tex.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:19 +00:00
Marek Olšák
3a7737ffb5 virgl/ci: disable virgl-traces because it doesn't upload results
Not being able to review results makes it impossible to update the hashes.

Suggested by Daniel Stone.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
73d675451b ci: update fail lists and trace checksums
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
4932b63f36 v3d: enable uniform expression propagation from outputs to the next shader
This will take effect after nir_opt_varyings is enabled by another MR, and
will fix existing shader compiler crashes thanks to better optimizations.

For example, one GLSL program that failed to compile and had 226 VS
instructions and 356 FS instructions in NIR will be reduced to 2 or 3
instructions per shader.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Jesse Natalie
01e9449be2 microsoft/compiler: Update clip/cull split pass to handle clip/cull getting merged
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Jesse Natalie
8dd44c7e72 microsoft/compiler: Skip POS for io compaction
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
dae57e184a glsl,st/mesa: always lower IO for GLSL, unlower IO for drivers
This enables nir_opt_varyings for all gallium drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
1dc85a34f3 st/mesa: add a pass that unlowers IO intrinsics to variables
We are going to switch all gallium drivers to nir_opt_varyings and then
use this to get IO variables in the end.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Qiang Yu
dff14d102d aco: fix voffset missing when buffer store base >=4096
Regression on test:
  dEQP-GLES31.functional.geometry_shading.basic.output_256

voffset is missing if buffer store base >=4096, we need to
re-calculate offen after resolve_excess_vmem_const_offset().

Fixes: cdaf269924 ("aco: inline store_vmem_mubuf/emit_single_mubuf_store")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32767>
2024-12-24 01:42:45 +00:00
Deborah Brouwer
96c41f5926 ci: set python version 3.11 for run-pytest.sh
CI tests are carried out in debian/x86_64_pyutils container which is using
python version 3.11 so use this version also for local testing.

This makes local testing more accurate. For example repeated double
quotes in f-formatted strings will raise an error in python 3.11 but not
in python 3.12.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
995782d09c ci: stop using a venv for run-pytest.sh
Since run-pytest.sh uses the debian/x86_64_pyutils container, it's not
necessary to add an additional layer of isolation by creating a virtual
environment for run-pytest.sh.

So stop creating a venv when run-pytest is run in a container, but keep
the option of using a venv to run-pytest.sh locally.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
c280808c72 ci: update the pyutils container
Update the pyutils container so that it has all the required pip
packages for the new linting checks in run-pytest.sh.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
5707083c8c ci: update_traces_checksum: fix E501 line too long
Currently the update_traces_checksum script prints a label verification
request with a line that is 167 characters long.

Split the long line to make it more readable. Update the flake8
configuration to enforce a maximum line length of 159 characters to ensure
consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
7994a3b17a ci: add .flake8 linting to ci scripts and tests
Currently the ci scripts and tests don't have any linting checks. Add
.flake8 linting to start adding some consistency to the scripts. Ignore
most of the existing errors until they can be addressed on an individual
basis.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
e274d27be5 ci: run-pytest.sh: allow script to run locally
Currently, run-pytest.sh won't run locally outside of a pipeline
because it can't find the `setup-test-env.sh` which provides necessary
functions.

Add a default value for the SCRIPTS_DIR so that run-pytest can find and
run the setup-test-env.sh and be run locally outside of a pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
3471b47574 ci: collapse yamllint and shellcheck sections
Currently the yamllint and shellcheck sections in the log output are
uncollapsed, but they don't say anything interesting so just keep them
collapsed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Rohan Garg
5bddf6ceb0 iris: assert that we're not exporting a TILE64 surface
Signed-off-by: Rohan Garg <rohan.garg@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/32771>
2024-12-23 19:33:36 +00:00
Rohan Garg
308c2b9828 anv: refactor choose_isl_tiling_flags to pass fewer arguments
Signed-off-by: Rohan Garg <rohan.garg@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/32771>
2024-12-23 19:33:36 +00:00
Rohan Garg
f96b2c002d isl: disable aux when creating uncompressed TileY/Tile64 surfaces from compressed ones
Fixes: 8e96b51 ('intel/isl: Assert alignments of surface addresses')
Signed-off-by: Rohan Garg <rohan.garg@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/32771>
2024-12-23 19:33:36 +00:00
Rohan Garg
abd137d079 iris: use CALLOC_STRUCT instead of calloc for readability
Signed-off-by: Rohan Garg <rohan.garg@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/32771>
2024-12-23 19:33:36 +00:00
Thomas H.P. Andersen
e38150f2fa drirc/nvk: force_vk_vendor=-1 for Artifact Classic
Without this the game crashes during the loading screen.

The game uses vkUpdateDescriptorSetWithTemplate and, in certain cases,
passes VkDescriptorBufferInfo structures where the offset + range
exceeds the size of the buffer. This triggers an assertion when
vk_buffer_range() is called, causing the game to crash.

When the nvidia vendor id is used the range is consistently set to 65536.
Without it the range varies and is much smaller - never exceeding 1000.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12349
Cc: stable
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32764>
2024-12-23 16:12:35 +00:00
Mary Guillemard
711b3351ef asahi: Remove unneeded dependencies for asahi_clc
There is no requirement on LLVM or SPIR-V tools since the introduction
of mesa-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/32719>
2024-12-23 15:09:41 +00:00
Mary Guillemard
5ddeea9a62 meson: Add precomp-compiler and install-precomp-compiler options
As Asahi, Intel and soon Panfrost requires an offline compiler for their
respective internal shaders, this commit adds generic new options to
workaround meson current limitations around cross-compillation.

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/32719>
2024-12-23 15:09:41 +00:00
Mary Guillemard
13fe5a597b meson: Add mesa-clc and install-mesa-clc options
Due to the cross build issues in current meson, we adds new options to
allow mesa_clc and vtn_bindgen to be installed or searched on the
system.

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/32719>
2024-12-23 15:09:40 +00:00
Juan A. Suarez Romero
4226be0c75 vc4: ensure sharing tiled resources are of proper format
When creating a tiled resource, it could be created either with "T" or
"LT" format.

But when sharing the resource, only "T" format is appropiate. So we need
to perform a conversion if required.

This is based on
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32661.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32703>
2024-12-23 13:08:43 +00:00
Mary Guillemard
631bea2e02 nak: Simplify 16-bit vector selection to not use try_from
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32679>
2024-12-23 11:47:49 +01:00
Mary Guillemard
979dfaf0bb nak: Fix 8-bit selection for vectors
This fix at least permutation issues on vec16 of 8-bits values for
cooperative matrix.

Fixes: 9e84e9e44b ("nak: Add base support for 8 and 16-bit types")
Suggested-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32679>
2024-12-23 11:47:32 +01:00
Samuel Pitoiset
2c323f2b8c radv: rename color output state to fragment output state
Now that it also exports depth.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32675>
2024-12-23 08:09:26 +00:00
Samuel Pitoiset
47dc9ca512 radv: rework emitting SPI_SHADER_Z_FORMAT
This fixes a small issue when the Z format in PS epilogs change, like
when alpha-to-coverage is enabled and then disabled.

igned-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32675>
2024-12-23 08:09:26 +00:00
Daniel Schürmann
28a214728c ac/lower_ngg: move readlane into break blocks in streamout code generation for gfx12/ACO
This avoids unnecessary shuffle code and s_wait_loadcnt.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32743>
2024-12-21 12:32:25 +00:00
Daniel Schürmann
47227089d6 ac/lower_ngg: move break blocks after loop in streamout code generation for gfx12/ACO
By inverting the break condition, the loop becomes shorter.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32743>
2024-12-21 12:32:25 +00:00
Daniel Schürmann
39dcd9dedb ac/lower_ngg: Fix collecting buffer offsets from 4 lanes on gfx12
Also use readlane for improved performance.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32743>
2024-12-21 12:32:25 +00:00
David Rosca
ed58b869e1 frontends/va: Don't allow EndPicture without calling driver begin_frame
This can happen in decode context when application send no slice
buffers or in processing context with no processing buffers.
We need to avoid calling driver end_frame as no begin_frame will be
called in this case.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677>
2024-12-21 09:34:01 +00:00
David Rosca
42e765d48b frontends/va: Don't allow Render/EndPicture without BeginPicture
It's not valid to call RenderPicture and EndPicture without calling
BeginPicture or when BeginPicture fails. FFmpeg will however call
EndPicture when BeginPicture fails, so we need to handle this.
Use target_id, which is assigned in BeginPicture, as an indication
whether we are inside the Begin - End picture sequence.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677>
2024-12-21 09:34:01 +00:00
David Rosca
6e911cf252 frontends/va: Fix decoding VC1 interlaced video
VC1 has different start code for FRAME and FIELD, so we need to use
FIELD start code for second field.
Also simplify start code search to only look for 00 00 01.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2347
Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32741>
2024-12-21 08:54:41 +00:00
Patrick Lerda
ad5c47502d r600: reverse fix spec ext_packed_depth_stencil getteximage
This change reverses d19e2597ce which is now superseded on the mesa
development branch by 42be38a8fb ("radeon/evergreen: ensure equal
sizes for depth-stencil npot textures").

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: David Heidelberg <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32553>
2024-12-21 05:07:16 +00:00
Alyssa Rosenzweig
83a7d9a814 hk: fix primitive restart dirty tracking
the previous logic was busted with the sequence Dolphin emits:

   BeginRender
   BindIndex
   Draw
   EndRender

   BeginRender
   Draw without restart
   Draw with restart
   EndRender

the second control stream would not have any restart index emitted, since the
dirty flag is set only on Begin and Bind, and cleared on draw.

this was probably also broken in the similar case

   BeginRender
   BindIndex
   Draw without restart
   Draw with restart
   EndRender

fixes Zelda: Wind Waker, Xeno Blade, etc.

thank you to pokechu22 for debug help!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
c585681378 hk: avoid compiling unneeded VS->GS variants
this should reduce pipeline compile time and memory bloat, now that we have no
non-XFB passthrough GS's.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
07e1b523b9 libagx: use designated initializers
these work now :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
a3b796ba19 libagx,hk: handle pipeline stats queries without a GS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
5bc89aa991 hk,libagx: handle adjacency without a GS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
872487919b hk,libagx: accelerate index buffer robustness
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
f106451a90 hk: factor out hk_draw_as_indexed_indirect
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
954080275b hk: use index buffer overflow check
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
e0cfc5eac1 libagx: factor out load/store_index
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
ff7abb1e22 libagx: refactor index buffer code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
686daf2524 libagx: move index size helpers to the gpu
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
b5d41bc0fb agx: match another address pattern
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
7626e40506 asahi: reformat
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
fc4e533709 agx: add more 8-bit address fusing rules
helps kernel I'm writing

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
e110b8f2c9 libagx: add missing agx_vdm_return
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
b6dbfe822b asahi: use common draw
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
b9155de0a1 hk,libagx: move hk_draw to the gpu
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Asahi Lina
c80c56a315 asahi: hk: Enable timestamps for virt
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Asahi Lina
e281293508 asahi: Virt UABI update
Support timestamp extensions & fix a bunch of missing/broken things we
were dragging along.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
0d5db3238b asahi: fix mmap'ing imported BOs
bo->dev wasn't being set on the import path. apparently mmap'ing imported BOs is
really rare, so this slipped through. should address segfaults with gnome
settings.

Reported-by: girona
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Eric R. Smith
4533144608 panfrost: apply DEPTH_STENCIL flag consistently
We were inconsistent over the usage of PAN_BIND_DEPTH_STENCIL, putting
it on some stencil only formats but not others. Apply it to all
stencil formats. However, we also need to change is_format_supported
to ignore S8_UINT (at least for GLES), because the hardware is a little
weird with that format and the gallium driver gets confused by it.

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/32462>
2024-12-20 23:18:08 +00:00
Eric R. Smith
b6ade2714c panvk: fix fs_required()
If the sample mask is updated, we have to run the fragment
shader, so make sure this is reflected in fs_required()

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Co-authored-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/32462>
2024-12-20 23:18:08 +00:00
Caio Oliveira
5c0c3120ca intel/brw: Use variable instead of manually count the passes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32709>
2024-12-20 22:41:20 +00:00
Caio Oliveira
ada898bb1c intel/brw: Disallow cmod in some cases of ARF scalar as destination
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32758>
2024-12-20 14:03:15 -08:00
Francisco Jerez
43d59c6186 intel/brw/xe3+: Relax SEND EOT register assignment restrictions.
These restrictions have been removed from the hardware.  Make the code
enforcing and validating them conditional.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32758>
2024-12-20 14:03:15 -08:00
nyanmisaka
8a5ec60442 frontends/vdpau: Get AV1 decode subsampling_x/y
The VDPAU frontend requires similar changes as in the VAAPI frontend.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12337

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32752>
2024-12-20 16:36:42 +00:00
Rohan Garg
9a4f5b739e intel/compiler: disable mesh autostrip for WA 16020916187
Disable mesh autostrip for platforms that need WA 16020916187.
Additionally, zero out the layer and viewport slots when a shading rate
is found through the brw_nir_initialize_mue pass.

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/32751>
2024-12-20 17:02:20 +01:00
Erik Faye-Lund
b180e2a47c panvk/ci: update expected failures
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32748>
2024-12-20 14:52:25 +01:00
David Rosca
5621ce10a6 radeonsi/vcn: Return error when decoding 12bit VP9 and 4:2:2/4:4:4 AV1
This is not supported by VCN.
We indicate this limitation by not reporting YUV420_12 RT format
supported for VP9, and not reporting YUV422 and YUV444 for AV1.
Most applications however simply ignore this, and will pick some other
format that is supported, which obviously won't work.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32663>
2024-12-20 10:51:18 +00:00
David Rosca
245d8c8e99 frontends/va: Get AV1 decode subsampling_x/y
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32663>
2024-12-20 10:51:18 +00:00
David Rosca
d94597a2d8 pipe: Remove PIPE_DEFAULT_DECODER_FEEDBACK_TIMEOUT_NS
Use OS_TIMEOUT_INFINITE instead.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32705>
2024-12-20 11:19:49 +01:00
David Rosca
c03805e4f5 radeonsi/vcn: Use local variable for destory fence
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32705>
2024-12-20 11:19:05 +01:00
David Rosca
fed1ed1eff radeonsi/vcn: Don't keep last fence
This is not needed after 0c024bbe64 ("radeonsi/vcn: Add decode DPB buffers as CS dependency")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32705>
2024-12-20 11:18:23 +01:00
Peyton Lee
ad0dbea49d radeonsi/vpe: add destroy_fence function
implement destroy_fence() for better fence control

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/32648>
2024-12-20 09:55:00 +00:00
Marek Olšák
1e14b00e8b gallium: pass XFB primitive mode to set_stream_output_targets
radeonsi would like to know the prim mode. GL always knows it,
so let's pass it through.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Marek Olšák
e22b78a196 mesa: fix printing _NEW_* flags
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Marek Olšák
b2ddf85591 mesa: set correct XFB prim mode for draw validation after resuming XFB
Draws were validated against an XFB primitive type from the last
glBeginTransformFeedback call, ignoring glResumeTransformFeedback that
may have been after it that may have resumed for a different primitive
type.

The spec doesn't state this explicitly, but it's logical.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Marek Olšák
227f69716f st/mesa: don't use nir_opt_fragdepth because it's incorrect with MSAA
Doing "gl_FragDepth = gl_FragCoord.z" with MSAA and without sample shading
changes per-sample depth testing to per-pixel depth testing, so we can't
eliminate it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12079

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Samuel Pitoiset
a7d0f0b30e radv: check descriptor indexing features for enabling the global BO list
It's more accurate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32718>
2024-12-20 07:43:59 +00:00
Samuel Pitoiset
62edab4cac radv: cleanup enabling the global BO list when BDA is used
VK_{EXT,KHR}_buffer_device_address are redundant with the
bufferDeviceAddress feature.

VK_KHR_ray_tracing_pipeline depends on VK_KHR_acceleration_structure
which also depends on the bufferDeviceAddress feature.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32718>
2024-12-20 07:43:59 +00:00
Pavel Ondračka
b06797633d r300: disable ATI2N textures on R400
The HW can do it, however if the state tracker sees support for ATI2N,
it will assume we also don't need a fallback for ATI1N. So if something
actually tries to use ATI1N format later, we will crash.

This could be fixed at the st level, but I honestly don't think the added
complexity is worth it, especially as this is highly r300 specific and
only affects single generation. So just disable it.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32639>
2024-12-20 07:31:11 +00:00
Antonio Ospite
669b7f881d ci/container: remove S3_JWT_FILE when container_job_trampoline.sh exits
The running container jobs scripts S3_JWT_FILE needs to be removed on
exit because the resulting image is committed and we don't want the auth
token to leak permanently in the fs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Antonio Ospite
88dfda7f0a ci/android: add a script to build LLVM libraries for Android
In order to build the mesa llvmpipe driver for Android, LLVM libraries
for Android are needed, but building them each time a new upstream mesa
is built would be too much overhead.

So add a script to build LLVM libraries for Android and call it from the
debian/android_build job. The actual build will be performed only when
necessary and the resulting artifact will be uploaded to the S3 bucket
to be re-used when building mesa for Android.

The build process follows what has been documented in
docs/drivers/llvmpipe.rst

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Antonio Ospite
f1f4570402 ci/android: unset compiler env vars in debian/android_build.sh
Unset the compiler env vars in debian/android_build.sh used to
cross-build libelf for Android, to prevents those env vars to
inadvertently affect subsequent commands that might want to build for
the native host after the cross-builds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Guilherme Gallo
742c3846e8 ci/container: set up S3_JWT_FILE also for container jobs
Set up "${S3_JWT_FILE}" also for container jobs, this can be useful in
case some jobs want to save something to S3.

Note that for container jobs setting the file /s3_swt in the
`default:before_script` section would not work: this wold be "too early"
because, when using ci-templates, the cbuild invocation switches the
root filesystem before executing FDO_DISTRIBUTION_EXEC, resulting in the
file becoming unavailable after the switch.

So set up the file exactly in FDO_DISTRIBUTION_EXEC, before launching
the actual container script.

Do this using a new trampoline script
.gitlab-ci/container/container_job_trampoline.sh so that in the future
other tasks common to all container jobs can be added there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Mel Henning
6f6072448d gallium/winsys/nouveau: Don't mark the api PUBLIC
We don't want to export this symbol from our shared object - any use of
this function from outside of mesa (like the ddx) should get the version
from libdrm, not the private copy in mesa.

Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32740>
2024-12-20 03:35:36 +00:00
Karol Herbst
6646b5f95b rusticl: fix clippy::doc-lazy-continuation
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Karol Herbst
c2ec0c26fd rusticl: fix clippy::needless-lifetimes
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Karol Herbst
a4d0d1c87b rusticl/util: fix ptr_to_integer_transmute_in_consts warning
We simply remove the const attribute :)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12288
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Karol Herbst
de664f05e3 rusticl/platform: silence static_mut_refs warning
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12288
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Marek Olšák
a50d069d1c nir/opt_varyings: clear info->clip/cull_distance_array_size if relocated
svga breaks if shader_info declares these, but the shader is missing
the outputs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32684>
2024-12-20 02:32:08 +00:00
Marek Olšák
9d129505b5 nir/opt_varyings: set all IO types to float to facilitate full vectorization
If types differ between components of a vec4 slot, IO vectorization can't
be done.

This also helps drivers like d3d12 that require matching types between
shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32684>
2024-12-20 02:32:08 +00:00
Deborah Brouwer
6331de400b ci: update token retrieval method for gantt charts
When the gantt chart service was first implemented, the read_token()
function would attempt to read from the default token file if the token
argument was missing.

Now it's necessary to call a separate function to look in the default
token file, so if the token argument is not provided, expressly call
get_token_from_default_dir().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
0366eebe3e ci: add pytests for the gantt chart scripts
Add some initial pytests to test new options and to prevent future
regressions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
fd7423b38e ci: add --ci-timeout option for gantt scripts
The gantt charts have a vertical line indicating the time when marge-bot
stops waiting for CI to finish. Currently the ci-timeout is hard-coded at
60 minutes. But marge-bot's timeout is configurable, so allow this value
to be configured as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
55f452530a ci: gantt chart: include in-progress jobs
If a job is still running when the gantt chart is generated, the job's
phases won't be represented as a bar on the chart.

To show these jobs on the gantt chart, introduce a new phase "In-Progress"
to capture the current status of these jobs.  Rename the "Running" phase
as "Time spent running" to emphasize that the running phase is complete.

This provides a more complete picture of the pipeline jobs when CI times
out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
45ef1221a3 ci: post gantt: ignore pipeline_summary message
The gantt chart script currently expect the pipeline url to be the last
line of marge-bot's comment on a failed pipeline. The pipeline summary
hook now adds additional information that was preventing the gantt chart
script from finding the pipeline url.

Change the regex for finding the pipeline url to account for pipeline
summary comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
4ae2105fcb ci: post gantt: add pipeline-id to gantt filename
Add a pipeline-id to the gantt filename so that the filename is unique.
Reduce the additional info provided in the gantt comments since the tool
is now more familiar to developers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
127a8aa9c3 ci: post gantt: add --project-id option
Currently the gantt chart script will post a comment to any project that
uses the default marge bot user id. Although the gantt chart is flexible
enough to work for any project, restrict it to mesa/mesa by default. Add
the --project-id option to add a custom project or list of projects to
analyze.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
db62fa626b ci: post gantt: add --marge-user-id option
The gantt chart currently hard-codes the marge user id, but since the
script can be used for any marge-bot user, add an option to specify the
marge-bot user id. If no option is specified, the default marge-bot user
id is still used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
1404fb5481 ci: make the gantt scripts available as modules
Instead of running the gantt scripts only from the command line, make
them available as modules also. This allows the scripts to be imported for
testing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
cb74034517 ci: add some static typing to the gantt scripts
Add some static typing where possible so that tools like mypy can be used
to avoid any future code errors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
9671de71a3 ci: post gantt: use logging instead of print
Replace the print statements with logging to take advantage of the
built-in logging formatting and levels.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Kenneth Graunke
cb756ae8a2 brw: Don't rely on SIMD splitting in opt_combine_convergent_txfs
The SIMD splitting pass does not handle wide force_writemask_all
instructions correctly at the moment.  For example, a SIMD32 TXF
on pre-Xe2 would get split to a pair of SIMD16.  But it will set
the groups to operate on channels 15:0 and 31:16.  That's not what
we want for a NoMask instruction - both should be 15:0, i.e.
bld.group(inst->exec_size, 0).

We could (and perhaps should) fix the SIMD splitting pass to handle
this, but the pass already has subtle complexity in which builders
are used.  Or we could alter fs_builder::group(), but that has broader
implications.  As a stop-gap, just make opt_combine_covergent_txfs stop
relying on SIMD splitting.  It's trivial to do and fixes the issue
without risking other breakage.

Fixes: 6341b3cd87 ("brw: Combine convergent texture buffer fetches into fewer loads")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32714>
2024-12-19 23:16:12 +00:00
Dylan Baker
9b07cac02e docs/release-calendar: Move next release to January 2nd
January 1st is a holiday for Dylan, and he will not be working that day.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Dylan Baker
83875451e2 docs: update calendar for 24.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Dylan Baker
4817771150 docs: Update checksums for 24.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Dylan Baker
d1e0572f13 docs: add release notes for 24.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Chia-I Wu
0204baaa8b panvk: silence a perfetto init warning
Kernel drivers gained timestamp support in 6.13.  CI might be on an
older kernel, but on a build with perfetto enabled.  Silence the
warning.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32728>
2024-12-19 19:00:13 +00:00
Job Noorman
419879ee62 ir3,freedreno: remove binning outputs after vs ucp lowering
nir_lower_clip_vs relies on VARYING_SLOT_CLIP_VERTEX which gets removed
when removing the outputs that are unused by the binning vs. Fix this by
only removing the outputs after running nir_lower_clip_vs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12328
Fixes: 24b422dc3e ("ir3: remove unused outputs for binning pass in NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32727>
2024-12-19 17:32:26 +00:00
Jordan Justen
adfd7486c2 iris: Check that mem_fence_bo was created
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8e8097245f ("iris: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS")
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/32716>
2024-12-19 08:54:00 -08:00
Erik Faye-Lund
4bcb92d35b nvk: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
dc5ac13959 dozen: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
97dec34a89 hasvk: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
e17abeca44 anv: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
4de0e11b92 lavapipe: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
3df7eda3a8 panvk: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
6877ff7d9b pvr: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
8628f31f49 turnip: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
57dc5bb31f asahi: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
3b94bd03c2 radv: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
d188856ffd panvk: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
ea88898b04 dozen: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
65e62a4c96 turnip: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

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/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
528ad300e6 v3dv: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
d6047f3c33 vulkan: add vk_descriptor_type_is_dynamic helper
There's a few variants of this in the tree already, let's add a reusable
one that we can switch to.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
42b29837c9 panvk: drop fragmentStoresAndAtomics support for now
This is failing a bunch of tests on CI. In particular, it seems some
details are wrong WRT robust image access and atomics. There's some
lowering in place for that, but a quick test didn't fix it for me, so
let's walk this back and try again later.

Fixes: 605c173fbd ("panvk: update feature support")
Reviewed-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/32625>
2024-12-19 14:41:28 +00:00
Benjamin Lee
3f90d8dfd2 panvk/csf: fix alpha-to-coverage
The equivalent bit is set correctly on JM, but was missed for CSF. There
shouldn't need to be any shader changes, the alpha-to-coverage flag in
FAU_ATEST_PARAM is set automatically from the bit in DcdFlags0.

Fixes dEQP-VK.pipeline.*.multisample.alpha_to_coverage*

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Signed-off-by: Benjamin Lee <benjamin.lee@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/32696>
2024-12-19 14:14:28 +00:00
Simon Ser
da555982b3 egl/wayland: fallback to implicit modifiers if advertised by compositor
The Wayland protocol defines INVALID as a special marker indicating
that implicit modifiers are supported. If the driver doesn't support
explicit modifiers and the compositor advertises support for implicit
modifiers, fallback to these.

This effectively restores logic removed in 4c06515892, but only
for the specific case of Wayland instead of affecting all APIs.
(Wayland is one of the few APIs defining a special meaning for
INVALID.)

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 4c06515892 ("dri: revert INVALID modifier special-casing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32535>
2024-12-19 13:09:48 +00:00
Simon Ser
d795b4712c egl/wayland: only supply LINEAR modifier when supported
If we supply modifiers to dri_create_image_with_modifiers() and
the driver doesn't support them, the function will fail. We pass
__DRI_IMAGE_USE_LINEAR anyways so stripping the modifier is fine.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 4c06515892 ("dri: revert INVALID modifier special-casing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32535>
2024-12-19 13:09:48 +00:00
Simon Ser
655ac4fff6 dri: don't fetch X11 modifiers if we don't support them
If we supply modifiers to dri_create_image_with_modifiers() and
the driver doesn't support them, the function will fail. The X11
server always supports implicit modifiers so we can always fall
back to that.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 4c06515892 ("dri: revert INVALID modifier special-casing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32535>
2024-12-19 13:09:48 +00:00
Valentine Burley
d981f66df8 ci/windows: Always include windows-msvc in scheduled pipelines
The windows-msvc job currently runs only when Windows-related
files are modified.
To always run it in scheduled runs, we need to inherit
.scheduled_pipeline-rules.

Fixes: 435017700d ("ci/windows: Add a manual full job")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32717>
2024-12-19 12:29:39 +00:00
David Rosca
3ea6ed8780 radeonsi/vcn: Enable write combine for decode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32707>
2024-12-19 11:06:48 +00:00
David Rosca
cdf2106609 radeonsi/uvd: Align bitstream buffer to 128 when resizing
Also use the same initial size as VCN.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32673>
2024-12-19 10:37:35 +00:00
David Rosca
f1235d13bd radeonsi/vcn: Align bitstream buffer to 128 when resizing
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2824
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32673>
2024-12-19 10:37:35 +00:00
Samuel Pitoiset
0b3e7ec36f radv/nir: simplify lowering of query intrinsics
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32702>
2024-12-19 08:08:53 +00:00
Samuel Pitoiset
a7d32be1dd radv: rename GDS queries to emulated queries
Emulated is more generic than GDS. GDS will be replaced with SSBO
atomics anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32702>
2024-12-19 08:08:53 +00:00
Samuel Pitoiset
db5d57e95e radv: fix getting the number of vertices per prim for the last VGT stage
This is only valid for VS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Samuel Pitoiset
3939214906 radv/nir: fix checking if task shader invocations query is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Samuel Pitoiset
91cdee8a38 radv: only enable emulated mesh/task shader queries on GFX10.3
It's not emulated on GFX11+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Louis-Francis Ratté-Boulianne
30825140d0 panfrost: Re-emit texture descriptor if the data size has changed
When updating an AFBC-packed resource, the size of the resulting
texture data can change while the BO and modifier stay the same. We
still need to update the texture descriptor in that situation so
that the size is properly reported. Having a smaller size than the
real one might cause artifacts as the GPU doesn't want to read past
the reported size.

A future (more foolproof) fix might involve having a hash key to
track the size of all slices independently, but this patch still
improves the situation and make sure we don't hit a relatively
common issue when using `PAN_MESA_DEBUG=forcepack`.

Fixes: bc55d150a9 ("panfrost: Add support for AFBC packing")
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@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/32598>
2024-12-18 22:58:20 -05:00
Qiang Yu
8609f49d05 radeonsi: fix unigine heaven crash when use aco on gfx8/9
Unigine Heaven crash on GFX8/9 when use aco:
  heaven_x64: ../../amd/mesa/src/gallium/drivers/radeonsi/si_nir_lower_abi.c:813: lower_tex: Assertion `samp_index >= 0 && comp_index >= 0' failed.

GFX8/9 will clamp texture comparison value in si_nir_lower_abi,
but it has to be done after si_nir_lower_resource.

Fixes: ae933169 ("radeonsi: lower NIR resource srcs to descriptors last")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32694>
2024-12-19 02:40:50 +00:00
Felix DeGrood
5bb1b38409 anv: remove unnecessary driconf entries for anv_enable_buffer_comp
Prior commit enables this option for all vkd3d apps, making these
entries superfluous.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32692>
2024-12-18 21:02:19 +00:00
Felix DeGrood
e8a81ba98e anv: allow compressed buffers types on vkd3d titles
Extending MR !23519 to all vkd3d titles.

Additional improvements/regressions:
 - AssassinsCreedValhalla +6%
 - DyingLight2.dx12 +5%
 - Witcher3.dx12 +2%
 - SpidermanRemastered -0.5%

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12282
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32692>
2024-12-18 21:02:19 +00:00
Connor Abbott
247d11d635 tu: Allow UBWC with images with swapped formats.
While we're here, refactor the logic to split out the mutable and
pre-mutable cases since they are now very different.

The special case for NV12 is now necessary to avoid test failures, but
it was always necessary and we didn't notice it before because tests
didn't specify a format list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
113cb94343 freedreno/fdl, tu: Allow swaps with mutable tiled images
With the MUTABLEEN bit, swaps when rendering is now allowed. Plumb
through the mutable bit to the various format functions to allow them to
return the correct format and swap.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
c8782f3ac7 freedreno/fdl: Don't enable r8g8 special case for mutable images
The blob seems to always use the R16 pitch align. I don't check the
block size, because the blob seems to disable UBWC when setting the
MUTABLEEN bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
ca91844fc7 freedreno/fdl, tu: Make mutable part of the image layout
Right now the image layout depends on the format for the R8G8 special
case, but this is clearly wrong if we set the mutable bit because it
could be reinterpreted. Refactor how it's set to make it part of the
layout struct, rather than specified in the view.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
ef4c752b6e freedreno/fdl: Fix 3d mipmapping height alignment
We can get into a situation where the layer size for a given mip isn't
large enough to hold the pitch times the aligned height, i.e. the height
isn't aligned. This can happen even if the size is 4K aligned. The
hardware seems not to align the height for us, so we have to use the
MINLAYERSZ hammer.

This was found with a Vulkan test when enabling tiling for mutable
textures on a750, but it's also reproducable via
"bin/texelFetch fs sampler3D 76x76" using piglit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Valentine Burley
d5f88190fd turnip/ci: Update expectations
Seen in the last couple nightlies with the lower fractions.
(With a bonus a750-gl UnexpectedImprovement.)

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
2cbc93e4df ci/windows: Update expectations
Decreasing the fraction uncovered some new failures.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
435017700d ci/windows: Add a manual full job
Add the test-dozen-deqp-full nightly job, which runs VKCTS
without a fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
6076b8a49c ci/windows: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite,
which allows decreasing the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Mel Henning
d99b9d5937 nak: Fix two warnings of elided_named_lifetimes
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32667>
2024-12-18 18:12:45 +00:00
M Henning
5a65300439 nvk: Fix uninitialized var warnings in host_copy
Fixes: 6c5420cd30 ("nvk: Add host copy functions")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32667>
2024-12-18 18:12:45 +00:00
José Roberto de Souza
8e8097245f iris: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS
According to HAS it is necessary to emit this instruction once per
context so MI_MEM_FENCE works properly.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
2bd3df75e5 anv: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS
According to HAS it is necessary to emit this instruction once per
context so MI_MEM_FENCE works properly.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
b8f93bfd38 anv: Always create anv_async_submit in init_copy_video_queue_state()
A next patch will emit more instructions in video and copy queues
for Gfx 200 and newer but the current code only creates anv_async_submit
if device has aux_map.
Instead we can always create anv_async_submit and only submit it to
hardware if any instruction was emited.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
edb33b47ab intel/genxml/xe2: Add STATE_SYSTEM_MEM_FENCE_ADDRESS instruction
Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
Connor Abbott
9e8824371b tu: Re-enable tiled non-ubwc R8G8 images
This effectively reverts a70b197741 ("turnip: Force linear mode for
non-ubwc R8G8 formats"), except that in the meantime we added HIC
support without supporting R8G8 so we still have to force linear tiling
in that case. The previous commit is a better fix.

Tiled uncompressed images will be used for sparse residency support,
it's not valid to arbitarily not support sparse texturing on R8G8,
the blob does use a tiled uncompressed image in that case, and we will
have to also.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
2024-12-18 16:46:30 +00:00
Connor Abbott
c0404da1e5 freedreno/fdl: Make tiled r8g8 images have 4k alignment
This fixes an unrecoverable hang in the trace from #5926 without having
to disable tiling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
2024-12-18 16:46:29 +00:00
Connor Abbott
6615cbfeaf tu: Make userspace RD dump generic
Stop relying on the submit BO list, which won't exist with the new
"VM_BIND" uAPI. Instead, create a separate list in generic code, only
when dumping is enabled. As a bonus this means that it should work on
virtio and kgsl too, and more code is removed from the kernel backend.
We need to use the generic fence wait introduced in the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
a8b2f45346 util/dynarray: Add macro for appending an array
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
2b428e6b3a tu: Rename bo_list to submit_bo_list
There will be another similar bo_list for dumping purposes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
f97998ff17 tu/knl: Move u_trace fence handling to generic code
Contrary to what the comment said, kgsl and drm actually have very
similar semantics for fences. Add a common function to wait on a fence,
and embed the queue + fence directly instead of a syncobj abstraction
that doesn't actually gain us much. This common fence wait function will
also be helpful for making more code generic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
0e7a91595f tu/kgsl: Make wait_timestamp_safe() return VkResult
All of its callers want a VkResult.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
84d6eedd5e tu: Refactor the submit path
Each driver implemented the Vulkan runtime submit callback itself, which
resulted in a lot of duplicated code to iterate through the command
buffers and gather the list of IBs to execute, deal with autotune and
command buffers with suspending/resuming dynamic renderpasses, etc. This
has been getting steadliy worse and was only going to get worse with
sparse, since to implement sparse bind submissions we have to similarly
traverse and flatten an array of bind structures.

Borrow an idea from nvk, and add an abstraction of a "submit" object
which holds a (dynamically growing) list of pending commands to submit.
We add kernel-specific functions to create a submit, add commands to it,
and finally submit it. For sparse, we will add additional an additional
function that adds a sparse bind and then we will parse the Vulkan
structures in common code. For now, we move various misc.
driver-independent parts of the submission path into a common
tu_queue_submit() that calls into the new abstractions.

In the future, if we need to add driver-internal syncobjs to the
user-provided ones, we could use the same approach with waits and
signals. For now we provide them as part of the submit function.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
d8c9856e75 tu: Move queue-related code to a new file
We will be expanding this shortly, as we move device state over to queue
state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
David Rosca
6115cf93b0 radeonsi: Update minimum supported encode size for VCN5
Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32655>
2024-12-18 15:23:21 +00:00
Mykhailo Skorokhodov
ffdbc3bbef drirc/anv: force_vk_vendor=-1 for Bellwright
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12301

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/32649>
2024-12-18 14:48:04 +00:00
Erik Faye-Lund
75ef006b6d pan/ci: update t860 ci xfails
Update to the latest nightly results

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32660>
2024-12-18 14:29:07 +00:00
Erik Faye-Lund
385301db2f panfrost: try to survive start-up alloc fails
If we fail to allocate memory this early on, we would otherwise fall
over and die. This propagates the errors up to the caller.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
c8a6709cbc panfrost: handle errors allocating csf oom-handler
This just wires up error-handling in the csf_oom_handler_init function,
and propagates it up to the csf_init_context function, as appropriate.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
56abe1e472 panfrost: handle pool-allocation errors
Because most pool-allocations happens during rendering, we have the same
issue as in the previous commit; we don't have a good way to report
the out-of-memory error here. So we do one of two things; we either
return a NULL-ish pointer, or we print an error and ignore the call.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
09cd92e283 panfrost: propagate cs_builder error instead of asserting
This makes csf_emit_batch_end propagage errors instead of asserting.
This will matter more for upcoming changes, but this starts reporting it
properly.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
a06c1eb88f panfrost: handle NULL-batches
When allocations fail, we can end up with NULL-batches. This means we
can't really do much, so let's bail what we're trying to do here.

Unfortunately, we can't always report this up to the call-site easily,
because some pipe_context functions don't allows us to return a
pipe_error value. So in those cases, make let's just return log an error
and return as if nothing happened. It's not great, but there's nothing
super obvious to do here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
e3f2bc7963 panfrost: handle mmap failures
This makes the call-sites to panfrost_bo_mmap check for allocation
errors, and try to do the right thing to handle it.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
054fbe5e4e panfrost: report errors from panfrost_bo_mmap
If we just set the pointer to NULL, a lot of the call-sites will end up
trying to dereference it. So let's give them a better chance to realize
what's happened, and return -1 here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
d5f4f918f3 panfrost: clean up mmap-diagnostics
Do not double-print the failure. While we're at it, make sure the
diagnostic includes plenty of details for easier debugging.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Boris Brezillon
3006c2a7b6 pan/cs: Fix cs_builder allocation failure robustness
There's more than one error-path out of cs_alloc_ins_block(), but only
one of them got the discar_instr_slot treatment. Instead of plugging
this in one more time, let's move this handling up to cs_alloc_ins(),
where we can easily whack two birds with one stone. This makes us
consistently return NULL on error here.

At the same time, we need to patch up cs_flush_block_instrs() here,
because we don't actually set the buffer invalid here. So let's
check for NULL here instead, which is the new contract.

Fixes: 0e6aaab00a ("pan/cs: add block to handle registers backup in exception handler")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
41a2b86666 pan/cs: fix broken allocation-failure check
We need to check the new buffer we allocated instead of the old one.
While we're at it, we also need to mark the builder as invalid.

Fixes: 3b82448f47 ("panfrost: Add a library to build CSF command streams")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Juan A. Suarez Romero
2abd85bbc0 v3d: make v3d_flush_resource reallocate non-shareable resources
When we create a tiled resource originally to be non shareable, if later
we want to share it, it could happen the tile format is not valid for
sharing: only UIF formats are appropiate.

In this case, we need to re-create the resource with a valid format.

For more details, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154.

This commit is heavily inspired by asahi.

Fixes
`spec@ext_image_dma_buf_import@ext_image_dma_buf_import-tex-modifier`.

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/32661>
2024-12-18 12:56:01 +00:00
Lucas Stach
734ba8d785 etnaviv: add debug switch to disable texture descriptor usage
Halti5 GPUs still support the state based sampler configuration,
alongside the new texture descriptor based method. Allow to switch
between both methods with a debug switch, to allow easy comparisons
between them.

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/32662>
2024-12-18 12:42:37 +00:00
Lucas Stach
66512cd897 etnaviv: Update headers from rnndb
Update to rnndb commit 1d174e311be6, documenting the TX
descriptor enable bit.

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/32662>
2024-12-18 12:42:37 +00:00
Erik Faye-Lund
4a1dd45850 st/mesa: document ARB_texture_float quirk
We're not strictly speaking doing the right thing for ARB_texture_float,
but for a very good reason. This has come up a few times in the past, so
let's document the decision for future readers.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32404>
2024-12-18 11:42:20 +00:00
Marek Olšák
4d8a508510 ac/nir: call nir_gather_tcs_info only once for RADV
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
8c2f9f0665 radv: switch to the new TCS LDS/offchip size computation
to use the same logic as radeonsi. This could be improved, see TODOs.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
823e9e846e radeonsi: switch to the new TCS LDS/offchip size computation
The new TCS LDS size should be less than what it was before.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
d3dcf73cbd radeonsi: remove unused parameter tcs_vgpr_only_inputs from si_get_nir_shader
and make the function static

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
3056bf1cb1 ac/nir: add new helpers for computing the TCS LDS/offchip size accurately
This is based on how the HS lowering passes address TCS inputs and
outputs. The new LDS size is lower in some cases.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
85c20def94 ac,radv,radeonsi: enable TCS input reads from VGPRs for all compatible loads
Cross-invocation TCS input access doesn't prevent same-invocation access.
This improves shaders that use both for the same inputs.

Also, if some components of a vec4 slot only use same-invocation access and
other components only use cross-invocation access (it's possible after
compaction), this takes the VGPR path for the components with
same-invocation access, which didn't happen previously because all masks
only describe whole vec4s.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
99a03dc9d5 ac/nir: allow a TCS input to be available from both VGPRs and LDS
Both can be used. Cross-invocation access can read it from LDS, while
same-invocation access can read it from VGPRs.

The entrypoints of the passes don't allow that flexibility yet,
but the logic inside the pass allows it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
b49eab68a8 ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11
This uses the new shader message. It eliminates memory stores and latency
for simple cases of tess level values.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
f4eebb373c ac/nir: reserve the first LDS vec4 for the HS tf0/1 group vote in TCS
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Erik Faye-Lund
fd5779c198 Revert "panvk: disable imageCubeArray on bifrost"
This reverts commit 7d2c61c266f61e3a002345bf4a61cc9363cdffd4.

Reviewed-by: Eric R. Smith <eric.smith@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/32612>
2024-12-18 10:42:29 +00:00
Erik Faye-Lund
3c40aba8b6 panvk: fix image size for cube-arrays on bifrost
We're parsing the descriptors here to read the size of the resource, but
what the HW wants and imageSize() wants is not the same. So let's fix up
the result for imageSize(), by dividing the result by 6.

If we change the descriptor instead, we end up failing shader-image
reads and writes instead.

I also looked for some unused bits in the descriptor that I could use
instead, but unfortunately there's only a few bits free here - not
enough for our needs.

Reviewed-by: Eric R. Smith <eric.smith@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/32612>
2024-12-18 10:42:28 +00:00
Benjamin Lee
f5763e80f4 panvk: fix sample position when sample shading is disabled
Previous code was assuming that load_sample_id loaded the hardware
sample ID register, which is 32 when sample shading is disabled. The
expectation was that we would read (0.5,0.5) from sample_positions[32].

Because the top 3 bits of the sample ID register are masked out in
bi_load_sample_id_to, we were instead reading the position of the first
sample.

This doesn't affect OpenGL, because opengl never uses
nir_load_sample_pos when sample shading is disabled.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 60146cc57c ("panvk: implement sampleRateShading")
Reviewed-by: Eric R. Smith <eric.smith@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/32601>
2024-12-18 10:04:14 +00:00
Benjamin Lee
9c6f64e599 panvk: set uses_sample_shading NIR flag when sample shading is forced
This allows NIR passes to know whether sample shading is enabled at
compile-time. The previous assignment to shader->info.fs.sample_shading
is now covered by panfrost_compile, which copies the value from
uses_sample_shading.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 60146cc57c ("panvk: implement sampleRateShading")
Reviewed-by: Eric R. Smith <eric.smith@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/32601>
2024-12-18 10:04:13 +00:00
Valentine Burley
61d9c47944 ci/lava: Use CI_JOB_TIMEOUT instead of separate variable
The CI_JOB_TIMEOUT variable is the GitLab-defined job timeout in
seconds.
Use this variable in LAVA instead of the separate JOB_TIMEOUT,
which was intended to represent the test phase timeout (job timeout
minus 5 minutes), but was often overlooked.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32609>
2024-12-18 09:23:27 +00:00
Caterina Shablia
d5b96309e7 panvk: enable drawIndirectFirstInstance
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
963e9feb8a panvk: enable shaderDrawParameters
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
9b3bc9def2 panvk: lower drawid to zero
We only implement single-draw direct and indirect draws, so this is
sufficient. We'll revisit this when we get around to implementing
multidraw.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
1570f0172e panvk: Fix base_{instance,vertex} handling
At the moment, we're not initializing the base_{instance,vertex} sysvals
which we'll need to do if we want to support shader draw parameters. It
turns out even without shader draw parameters enabled, some shaders need
a valid base_instance value, so this alone should fix a few tests.

On CSF hardware, we have a way to pass a non-zero base instance that's
propagated to the instance ID, but this messes with instance divisors,
so instead of using the native base instance feature, we force it to
zero, pass the base instance through an FAU sysval, and let
panvk_lower_load_vs_input() do the lowering for vertex attribute loads.

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/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
c7c04e13e3 pan/bi: handle load_attribute_pan
Most code is shared with load_input, with the sole difference
being where vertex and instance IDs are sourced from.

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/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
f4fcfa8016 pan,nir: introduce load_attribute_pan
load_attribute_pan is a panfrost-specific intrinsic for loading
vertex attributes. Takes explicit vertex and instance IDs which
we need in order to implement vertex attribute divisor with
non-zero base instance on v9+.

Passes which are used by panvk are modified to be aware of
load_attribute_pan.

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/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
ed5a6c1a45 panvk/csf: use gfx_state_set_dirty instead of touching state directly
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
90f6c64067 panvk: order KHR extension enables alphabetically
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
948653019b pan/util: sort files in meson.build
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Samuel Pitoiset
2e1c87c1ca radv: add few more query helpers for copying results
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678>
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
5b53f6deaa radv: remove dead code in radv_CmdCopyQueryPoolResults()
Incrementing dest_va doesn't do anything.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678>
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
ebe9dc49b7 radv: reorganize query code by adding separate begin/end helpers
The query code is getting big and complex over time. It will be even
more complicated because GDS doesn't exist on GFX12. Let's reorganize
slightly to make it more readable and easier to maintain.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678>
2024-12-18 07:51:57 +00:00
Valentine Burley
3d1dd22bb4 anv/ci: Update expectations
Remove bogus failures caused by wrong GPU_VERSION configuration,
delete tests that no longer exist in current CTS versions, and
update expectations.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
526ec3e7dd anv/ci: Remove fails that are in .gitlab-ci/all-skips.txt
These tests are always skipped in Mesa.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
f42d670ea6 anv/ci: Re-enable TGL and JSL manual jobs
Thanks to the speedup achieved by increasing tests_per_group,
nightly jobs are now within reasonable time limits, allowing them
to be re-enabled.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
eb7fb2e919 anv/ci: Bump the number of tests per group for TGL
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
629b19a59f anv/ci: Bump the number of tests per group for JSL
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
e68f9bb856 anv/ci: Bump the number of tests per group for ADL
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
e7e9ceceb3 anv/ci: Fix GPU_VERSION configuration for anv-jsl and anv-jsl-full
The GPU_VERSION was incorrectly set to iris-jsl for these ANV jobs,
causing mismatched expectations.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Chia-I Wu
576a87a590 panvk: add u_trace perfetto support
When perfetto is enabled, u_trace_context calls driver-defined callbacks
when processing trace events.  Those callbacks are expected to emit
perfetto trace packets.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
7c61e2346d panvk: improve C++ compat for perfetto
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
3096cf2a5d panvk/csf: flush and process trace events for all cmdbufs
When a cmdbuf does not have VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
call u_trace_clone_append to clone trace events and to copy timestamps.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
e9d2a3c2c6 panvk/csf: flush and process trace events for one-time cmdbufs
Flush and process trace events on queue submit when tracing is enabled
and timestamp_frequency is valid.  Tracing can be enabled with, for
example, MESA_GPU_TRACES=print.

panvk_utrace_flush_data is allocated on queue submit and is freed after
all trace events associated with the queue submit are processed.  It is
used for synchronize gpu timestamp writes and trace event processing.
It also specifies the subqueue the trace events belong to.

For the moment, cmdbufs without
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT are silently ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
b9631adb0e panvk/csf: add vk_sync to panvk_queue
It will be used to synchronize gpu timestamp writes and trace event
processing.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
39824d70b8 panvk/csf: add u_trace to panvk_cmd_buffer
There is one u_trace per subqueue to record trace events.  When tracing
is enabled, trace_begin_cmdbuf and trace_end_cmdbuf will emit trace
events to u_trace and emit timestamp writes to the command streams.

The trace events are buffered in u_trace and are not flushed for
processing yet.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
06cc6e82cf panvk/csf: add CS_REG_SCRATCH_COUNT
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
76faa6f3f3 panvk: define cmdbuf begin/end tracepoints
Add panvk_tracepoints.py with trace points for cmdbuf begin/end.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
d340ed6726 panvk: add u_trace_context to panvk_device
It allocs priv bos for timestamps and uses timestamp_frequency to
convert timestamps to nanoseconds.

There is no trace event to process yet so it is not really used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Ian Romanick
b4d472cd67 brw/emit: Fix BROADCAST when value is uniform and index is immediate
Fixes: c74511f5dc ("i965: Introduce the BROADCAST pseudo-opcode.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Tried-to-help-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32668>
2024-12-17 21:57:26 +00:00
Kevron Rees
da4e2af010 anv, drirc: Add workaround to speed up Spiderman reg allocation
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11971
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32438>
2024-12-17 17:40:44 +00:00
Samuel Pitoiset
6e59778e5d radv: fix capturing RT pipelines that return VK_OPERATION_DEFERRED_KHR for RGP
This isn't an error.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32683>
2024-12-17 17:12:27 +00:00
Samuel Pitoiset
f0797c60e5 ci: uprev vkd3d-proton to c965c1351fd6915a65bb7f647319536252a24a93
This is 2.14 and it contains more tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32674>
2024-12-17 16:00:34 +00:00
Antonio Ospite
e8d1b13f5e docs: remove leftover mention of meson dri3 option
Remove some leftover mention of the meson dri3 option from the
documentation, the option has been removed in commit 8f6fca89aa (meson:
delete dri3 build option, 2024-08-30)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32251>
2024-12-17 12:50:06 +00:00
Antonio Ospite
5d6d67a4d1 docs/android: improve documentation about building llvmpipe for Android
Improve the documentation about building the llvmpipe driver for Android
by providing more ready-to-use scripts to build llvm and create the
needed meson wrap file.

Note: in the meson wrap file, remove 'libLLVMTableGenGlobalISel' from
the built dependencies, as apparently is not available anymore for
Android on recent LLVM versions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32251>
2024-12-17 12:50:06 +00:00
Antonio Ospite
99ae03b2ae docs/android: update docs/android.rst after libgallium_dri updates
The build of libgallium has been simplified for Android where the
versioned library is not used since it's not really needed.

Update the documentation and the proposed Android.bp files to only refer
to libgallium_dri.so

While at it also fix the proposed SELinux rules to use the correct path
for libglapi which is not under /vendor/lib(64)?/egl/

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32251>
2024-12-17 12:50:06 +00:00
Valentine Burley
e03e1adcf0 llvmpipe/ci: Actually enable ASan testing for llvmpipe-deqp-asan
The llvmpipe-deqp-asan job never preloaded libasan.so.8. Fix this
by enabling the new DEQP_FORCE_ASAN option to ensure ASan testing
is performed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:05 +00:00
Valentine Burley
04b154b847 ci/deqp: Add a DEQP_FORCE_ASAN option
Replace the last use case for for DEQP_RUNNER_OPTIONS by introducing
a centralized option instead of hardcoding the path via the --env
argument in various test configs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Valentine Burley
ab3356e718 ci/deqp: Simplify conditional arguments
Simplify the --baseline and --max-fails conditional arguments.
This will allow deleting DEQP_RUNNER_OPTIONS.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Valentine Burley
fb2779e511 llvmpipe/ci: Move Piglit timeout inside the suite
This will allow deleting DEQP_RUNNER_OPTIONS.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Valentine Burley
ee72c8a177 ci/deqp: Remove non-suite support
Remove deqp-runner non-suite support to simplify deqp-runner.sh,
prevent the reintroduction of non-suite jobs, and streamline
testing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Samuel Pitoiset
0223f0f54d radv: fix missing variants for the last VGT stage with shader object
Last VGT stages (VS, TES or GS) can always be used with a null FS when
nextStage is non-zero. Like if a VS is created with nextStage=TCS, it's
also allowed to draw without binding a CTS (ie. nextStage=None is always
a valid case).

Because we don't want to compile two variants for NONE and FRAGMENT,
let's compile only the FRAGMENT one when necessary.

Fixes new CTS coverage, see https://gerrit.khronos.org/c/vk-gl-cts/+/15976.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32665>
2024-12-17 09:50:52 +00:00
Samuel Pitoiset
5ad025b675 radv/ci: fix expected list of failures for TAHITI
DGC tests are skipped.

Fixes: dda03a21d6 ("Revert "radv: fix creating unlinked shaders with ESO when nextStage is 0"")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32672>
2024-12-17 09:49:14 +01:00
Valentine Burley
78f60e773c turnip/ci: Enable ASan leak detection in a630-vk-asan
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32652>
2024-12-17 07:44:03 +00:00
Valentine Burley
0615b92c23 radv/ci: Use deqp-vk-main in Raven and Stoney RADV jobs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32647>
2024-12-17 07:23:03 +00:00
Kevin Chuang
1b55f10105 anv/bvh: Dump BVH synchronously upon command buffer completion
Modified the BVH dumping mechanism to synchronously wait for the command
buffer to complete before saving BVH data to files. This approach is
more robust compared to the previous method of dumping during
acceleration strucutre destruction.

Note: if DEBUG_BVH_ANY is enabled but intel-rt is disabled, we will wait
for nothing.

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/32585>
2024-12-16 23:01:11 +00:00
Georg Lehmann
c695043e81 nir/opt_algebraic: optimize min(max(a, b), a)
Foz-DB Navi21:
Totals from 105 (0.13% of 79395) affected shaders:
MaxWaves: 2638 -> 2646 (+0.30%)
Instrs: 76531 -> 75077 (-1.90%)
CodeSize: 413668 -> 406484 (-1.74%)
VGPRs: 4856 -> 4848 (-0.16%)
Latency: 333684 -> 328438 (-1.57%); split: -1.57%, +0.00%
InvThroughput: 80417 -> 78579 (-2.29%)
VClause: 1818 -> 1768 (-2.75%)
SClause: 3028 -> 2964 (-2.11%)
Copies: 4708 -> 4513 (-4.14%); split: -4.50%, +0.36%
PreVGPRs: 3792 -> 3715 (-2.03%); split: -2.08%, +0.05%
VALU: 54734 -> 53528 (-2.20%)
SALU: 6195 -> 6137 (-0.94%)
VMEM: 2363 -> 2313 (-2.12%)
SMEM: 5219 -> 5119 (-1.92%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32634>
2024-12-16 22:29:21 +00:00
Marek Olšák
cdecbee922 radeonsi/gfx12: adjust HiZ/HiS logic
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:28 +00:00
Marek Olšák
e3cef02c24 radeonsi/gfx12: set DB_RENDER_OVERRIDE based on stencil state
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:28 +00:00
Marek Olšák
8328e57512 ac/surface/gfx12: enable DCC 256B compressed blocks and reorder modifiers
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:27 +00:00
Marek Olšák
e6345e2fd3 ac: update SPI_GRP_LAUNCH_GUARANTEE_* register values for gfx12
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:27 +00:00
Georg Lehmann
0e6d32777f nir/opt_remove_phis: rematerialize equal alu
Foz-DB Navi31:
Totals from 943 (1.19% of 79395) affected shaders:
MaxWaves: 24672 -> 24722 (+0.20%)
Instrs: 1541665 -> 1544956 (+0.21%); split: -0.23%, +0.44%
CodeSize: 8085180 -> 8109212 (+0.30%); split: -0.16%, +0.46%
VGPRs: 57768 -> 57624 (-0.25%)
Latency: 18043743 -> 17948245 (-0.53%); split: -1.28%, +0.75%
InvThroughput: 2692605 -> 2677049 (-0.58%); split: -2.07%, +1.49%
VClause: 25321 -> 25343 (+0.09%); split: -0.48%, +0.57%
SClause: 38473 -> 38614 (+0.37%); split: -0.00%, +0.37%
Copies: 86089 -> 86236 (+0.17%); split: -0.46%, +0.63%
Branches: 36719 -> 36777 (+0.16%); split: -0.60%, +0.76%
PreSGPRs: 44138 -> 44303 (+0.37%); split: -0.05%, +0.42%
PreVGPRs: 43319 -> 43009 (-0.72%)
VALU: 893684 -> 894272 (+0.07%); split: -0.42%, +0.48%
SALU: 189561 -> 191358 (+0.95%); split: -0.05%, +1.00%
VMEM: 42294 -> 42313 (+0.04%); split: -0.44%, +0.49%
SMEM: 72916 -> 73144 (+0.31%)

Instruction count regressions are largly caused by additional
loop unrolling.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31028>
2024-12-16 20:38:38 +00:00
Aleksi Sapon
c0a0953476 llvmpipe: PointCoord is offset when multisampling is enabled
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32578>
2024-12-16 20:15:59 +00:00
Samuel Pitoiset
dda03a21d6 Revert "radv: fix creating unlinked shaders with ESO when nextStage is 0"
This reverts commit d4ccae739b.

This is actually unnecessary. nextStage=0 means it's the last stage.
Looks like the specification was too vague and we misinterpreted it.

It's going to be clarified and VKCTS will be fixed, see
https://gitlab.khronos.org/vulkan/vulkan/-/issues/4115 for more info.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32629>
2024-12-16 19:31:57 +01:00
Samuel Pitoiset
0943f616d1 radv: report same buffer aligment for DGC preprocessed buffer
It makes sense to report the same alignment.

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/32626>
2024-12-16 14:53:56 +00:00
Erik Faye-Lund
336e2c90ce docs: add new panvk features
We're not really in the habit of updating new_features.txt for panvk,
but let's get this up to date.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32586>
2024-12-16 15:32:20 +01:00
Erik Faye-Lund
9a8e291d45 panvk: make vk-version helper internal to source
This is no longer needed outside of this single source file, so let's
no longer make it available outside.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32654>
2024-12-16 12:10:50 +00:00
Erik Faye-Lund
42bfbe1a94 panvk: back out of vk 1.1 support
Supporting Vulkan 1.1 was premature, as we don't support subgroup
operations, which are actually required (even if it's not listed in
section "46.1. Feature Requirements"):

Here's the relevant phrasing from the Vulkan 1.1 spec:

> subgroupSupportedOperations will have the VK_SUBGROUP_FEATURE_BASIC_BIT
> bit set if any of the physical device’s queues support
> VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT.

So, it seems we have to support at least the basic feature set before we
can expose Vulkan 1.1. So let's back out of that for now.

Fixes: a6e03ce428 ("panvk: advertise version 1.1 support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32654>
2024-12-16 12:10:50 +00:00
Valentine Burley
da18cd9f9a softpipe/ci: Convert softpipe-asan-gles31 to a deqp-runner suite
Due to the differences in how the caselists are generated, there is
a discrepancy in the failures encountered. Update the expectations
accordingly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32622>
2024-12-16 11:27:31 +00:00
Valentine Burley
309dc3c43f etnaviv/ci: Convert to deqp-runner suites
Convert gc2000-gles2 and gc7000-gles2 to deqp-runner suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32622>
2024-12-16 11:27:31 +00:00
Valentine Burley
b30323d77d lavapipe/ci: Convert lavapipe-vk-asan to a deqp-runner suite
This is a currently disabled job. Convert it to a deqp-runner
suite, but don't enable it yet as it is still broken.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32622>
2024-12-16 11:27:31 +00:00
Juan A. Suarez Romero
fd19106773 broadcom/compiler: fix fp16 conversion operations
The case for converting a 32-bit integer to 16-bit float is not
correctly implemented.

Fixes: 214121e9b0 ("broadcom/compiler: handle fp16 conversion ops")
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/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
8ffdf5a2ab broadcom/compiler: ensure offset source exists
As the lowering is applied on a load uniform intrinsic, there must be an
offset source number.

This fixes CID#1604734 ("Negative array index read") detected by
Coverity Scan.

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/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
15dfcd0db3 v3dv: ensure there is always a perfmon and counter
Helps static analyzer to don't complain about (potential) reading
unitialized values.

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/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
13581b7380 v3dv: free pointers on multisync error
Free pointers if set_multisync() fails.

This fixes several leaks detected by static analyzer.

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/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
f6766ccadb v3dv: fix BO allocation
`cleared_and_retried` variable is not required, as once the cache is
empty, in the second retry it will retry it is already empty so it won't
retry a new allocation.

Fixes: 2adea940f1 ("v3dv/bo: adding a BO cache")
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/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
cb9650d1a2 v3dv: remove unused assignments
These variables are not used later in the code.

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/32593>
2024-12-16 10:56:38 +00:00
Erik Faye-Lund
c5c11481dd panvk: only validate the push-sets that we update
We are conditionally updating the push-sets, so we need to also
conditionally clear the dirty-flags here instead of clearing them
wholesale. Otherwise, we end up not updating the descriptors that are
used in subsequent draws, but not in the first one.

Fixes: 79e5146378 ("panvk: Sanitize the driver-internal dirty state tracking")
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/32630>
2024-12-16 10:16:05 +01:00
Erik Faye-Lund
9531f6375f panvk: fixup bad indent
We use spaces, not tabs.

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/32630>
2024-12-16 10:16:05 +01:00
You, Min-Hsuan
22ff26a0be amd/vpelib: fix coverity defects
\[WHY\]
The reason for making these changes is to address the defects identified
by the Coverity scan. By fixing these defects, we can ensure that any
future defects generated by our own code changes can be easily
identified and resolved.

\[HOW\]
To implement the changes/fixes, the following steps were taken:

1. CHECKED_RETURN: All cases were aligned to check the return value.
2. DC.WEAK_CRYPTO: The use of rand() to generate random numbers was
replaced with a more secure method using platofrm API.
3. DEADCODE: Useless code that always returned true was removed.
4. DIVIDE_BY_ZERO: A check was added to ensure that the divisor is not
zero before performing division.
5. HFA: An unused header was removed.
6. MISSING_BREAK: A break statement was added in switch cases where it
was missing.
7. PASS_BY_VALUE: Parameters that were being passed by value and were
too big were changed to pass by reference.

\[TESTING\]
What testings have been done (test IDs and json file):

Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Signed-off-by: Min-Hsuan You <Min-Hsuan.You@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Koo, Anthony
54c4accdb1 amd/vpelib: Add system event logging
\[WHY\]
System event logs are different than string logging. They are meant to
generate light weight events with ID and variable args and can be
coalesced with events generated by other IP components.

\[HOW\]
Add a callback function, which is implemented by the client (Like PAL)

VPELIB adds defines for a list of possible event IDs

The client is expected to handle the callback
And translate and emit the event through
native system infrastructure like ETW logging.

\[TESTING\]
Tested on system that triggers sys event, and viewed the event through
ETW viewer

Signed-off-by : Anthony Koo <anthony.koo@amd.com>

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Zhao, Jiali
fe58bb70e6 amd/vpelib: 420 and 422 Output Single Segment cositing support
fix the style complaint
add 709 jfif color space handling

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Signed-off-by: Jiali Zhao <Jiali.Zhao@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Visan, Tiberiu
b06ee9074d amd/vpelib: fixed file headers for Palamida scan
\[WHY\]
Some header files in VPE lib did not have the proper copyright header

\[HOW\]
Proper copyrights were put in place

Reviewed-by: Roy Chan <roy.chan@amd.com>
Co-authored-by: Tiberiu Visan <tvisan@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Leder, Brendan Steve
4ef45d8d4e amd/vpelib: Move bg color
Refactor bg gen as it check_bg_support simply calls into other version specific function.
Move that function directly into check_bg_support call, and refactor unnecessary functions + format fix.

Co-authored-by: Brendan <breleder@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Marek Olšák
3943ed8199 ac/lower_ngg: improve streamout code generation for gfx12/ACO to match LLVM
ACO is still not perfect:
* It generates s_wait_loadcnt 0x0-0x3 when the only required wait instruction
  is s_wait_loadcnt 0x5.
* It generates a lot of unnecessary jumps and blocks for uniform loop breaks.
  Only scc1 jumps are necessary to break the loop. This is 10x better than
  LLVM, but even ACO might consider using nir_intrinsic_ordered_add_loop_gfx12_amd
  for the best performance.

How to print the streamout asm on any GPU:
    PIGLIT_PLATFORM=gbm AMD_FORCE_FAMILY=gfx12_16pipe AMD_DEBUG=vs,mono,asm,useaco ../piglit/bin/shader-io-rate vs_out_xfb

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:07 +00:00
Qiang Yu
d38efee8ef aco: enable gfx12 support for radeonsi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:07 +00:00
Qiang Yu
129e37bab6 nir: do not generate b2i64 when driver want to lower it
This is found on GFX12 by:
  KHR-GL43.shader_ballot_tests.ShaderBallotBitmasks

ACO does not support it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:07 +00:00
Qiang Yu
12ea316a05 radeonsi: add AMD_FORCE_SHADER_USE_ACO for debug
Narrow down ACO compiler problem to a single shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
679c450184 util/blake3: add _mesa_blake3_from_printed_string
To convert printed blake3 string back to blake3 hash.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
0fd99353a6 radeonsi: disable use_gfx12_xfb_intrinsic when use ACO
ACO does not implement nir_ordered_add_loop_gfx12_amd which is for
LLVM only.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
b14cc34415 ac/surf: add more modifiers to gfx12 supported list
OpenGL will export these modifiers for various sized
textures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
b3a218d444 ac/surface/tests: support all block sizes
We are going to add more modifiers.

GFX9 has 4K DCC and non-DCC modifiers while others only have
4K non-DCC modifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Caio Oliveira
93dfe504f2 intel/brw: Add SHADER_OPCODE_READ_FROM_CHANNEL and LIVE_CHANNEL
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32412>
2024-12-14 11:38:14 -08:00
Job Noorman
4d04396531 ir3/validate: print file/line info
This makes it much easier to spot where a validation error comes from as
many assert are similar so difficult to grep for.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32623>
2024-12-14 06:05:26 +00:00
Caio Oliveira
d325de316d intel/brw: Add some tests for new Xe2 register regioning restrictions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Caio Oliveira
f308be16a0 intel/brw: Add validation for some Xe2 register regioning restrictions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Caio Oliveira
6a5a316312 intel/brw: Extract format enum in EU validation code
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Caio Oliveira
57b703cec3 intel/brw: Skip some regioning EU validation for Vx1 and VxH modes
Skip the ones that check the VertStride -- which is set to a special
value in those modes.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Kenneth Graunke
d85d6ad2a5 iris: Tune the BO cache's bucket sizes
With the introduction of the slab allocator, most of our small
allocations now hit that rather than directly hitting the bucket
cache.  Those now show up as 2MB slab allocations from the cache's
perspective.  So, we don't need quite as many buckets.  (Note that
only allocations in IRIS_MEMZONE_OTHER are suballocated today.)

Previously, we had 55 buckets, going from 4KB to 112MB, with sizes
N, N+1/4, N+1/2, N+3/4 for a series of power-of-two N's.

This patch prunes it down to 25 buckets:

   - 4K-4MB => power-of-two sizes only
   - 6MB    => a one-off bucket to reduce waste between 4MB and 8MB
   - 8MB+   => the usual N, N+1/4, N+1/2, N+3/4 system
   - 64MB   => the largest bucket size

In particular, this eliminates the 1.75MB, 2.5MB, 3MB, 3.5MB, and 7MB
buckets in favor of multiples of 2MB.  Allocating multiples of 2MB is
preferable because it allows the kernel to allocate 64KB pages rather
than being stuck using inefficient 4K pages.  And, the amount of waste
from bumping to the next multiple of 2MB isn't huge in that range of
sizes.  We also eliminate buckets larger than 64MB because they're
rarely used, and also the amount of waste from rounding up to the
80/96/112MB buckets can get pretty large.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Fixes: 0b6693a3a1 ("iris: Align fresh BO allocations to 2MB in size")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10219
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32635>
2024-12-13 15:37:09 -08:00
Felix DeGrood
0f46c53b0c anv: Use vfg distribution mode = RR_STRICT for Xe2+
Performance tuning. Round Robin strict faster on Xe2 for some
workloads.

Speedup:
 - Borderlands3-dx11-trace: +4%
 - WolfensteinYoungblood-vk.g6: +1.5%
 - Cyberpunk2077-dx12vk-2160p-ultra: +0.5%

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32566>
2024-12-13 19:15:48 +00:00
Felix DeGrood
260f3b4444 iris: Use vfg distribution mode = RR_STRICT for Xe2+
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32566>
2024-12-13 19:15:48 +00:00
Deborah Brouwer
3bddf77f61 ci: separate python tests and artifacts
Currently the python-test job runs pytest and then creates python
related artifacts for use by other jobs. But the python-test job isn't
triggered by changes to the python scripts and libraries. Instead, changes
to python scripts and libraries can currently be merged without running
pytest and, if they do generate errors, they will only appear in ci
later when trying to generate the python artifacts.

Add pytest to the existing linting jobs and expand the rules so that it
will be triggered by changes to python scripts and libraries. Remove
pytest from the job that creates artifacts. This will ensure that the
artifacts are still valid while catching script/library errors before they
are merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Deborah Brouwer
90cb87e918 ci: yaml-toml-shell-test: use pyutils container
Currently the yaml-toml-shell-test extends the python-test job to make
use of the python packages available there. But the python-test also
generates artifacts which yaml-toml-shell-test does not need to do.

Instead of extending the python-test job, avoid extra work by just using
the pyutils container directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Deborah Brouwer
b6435207ab ci: python-test rename artifacts
The current python-test job creates and compresses python related
artifacts for use by future jobs. The artifacts are currently named
`mesa-python-test` which is somewhat misleading because they are not
needed for testing python scripts or libraries.

Rename the artifacts generated by the python-test job to be more
descriptive of their purpose.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Deborah Brouwer
dca6310182 ci: debian/x86_64_pyutils remove redundant rules
The debian/x86_64_pyutils job incorporates references to rules from the
python-test and .container jobs, but currently these jobs don't have any
express rules. The .container job does extend jobs that have rules, but
these same rules are already included in debian/x86_64 because it
extends the .debian-container job.

Remove these empty rule references to make debian/x86_64_pyutils more
readable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Marek Olšák
c7366985e5 r600: fix a constant buffer memory leak for u_blitter
Fixes: 3d6e44fd - r300,r600,svga: save the FS constant buffer for u_blitter to fix a regression
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12131

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32594>
2024-12-13 16:58:38 +00:00
David Rosca
4ec3f6a0db frontends/va: Stop converting formats in Put/GetImage
This should not do any conversions and instead return error when image
and surface formats don't match.
There was also special case for I420 fourcc which would swap the order
of U/V planes and because of this the plane order of IYUV format was
incorrectly set to YVU in vl_video_buffer.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
2024-12-13 16:19:39 +00:00
David Rosca
df8ee11dc6 gallium/vl: Fix plane order for IYUV format
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
2024-12-13 16:19:39 +00:00
David Rosca
8a20e634ce gallium/vl: Add plane order for Y8_400 format
Also add assert for unhandled format and remove assert for number of
components.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
2024-12-13 16:19:39 +00:00
David Rosca
2ed862c2fe radeonsi/vpe: Silence expected errors with unsupported output format
YUV formats are currently unsupported for output, so we should not
print any errors in case application uses YUV output format.
There is a shader fallback that will be correctly used in this case.
Don't print any vpelib errors unless AMDGPU_SIVPE_LOG_LEVEL is set.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12263
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32543>
2024-12-13 15:53:48 +00:00
Karol Herbst
a2339542f5 rusticl/util: fix duplicate key detection in Properties::new
We only need to check if the key exist, not the key as a value.

Fixes: efab5cab9f ("rusticl/util: reimplement Properties over Vec of scalars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32621>
2024-12-13 14:24:03 +00:00
Samuel Pitoiset
1291981ebd radv: mark HAWAII (GFX7) as Vulkan 1.3 conformant
https://www.khronos.org/conformance/adopters/conformant-products#submission_848

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32620>
2024-12-13 13:32:38 +00:00
Christian Gmeiner
fb67ad890a docs: Update perfetto with the latest status
v3d supports PPS counters.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
ea0784dfb8 perfetto: Add v3d data sources to gpu.cfg
Just like for msm and i915, so it works out-of-the-box.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
e6d83f1947 perfetto: Add v3d data sources to system.cfg
Just like for msm and i915, so it works out-of-the-box.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
27771b4d55 pps: Add support for v3d ds
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
3d2d3b2c10 broadcom: Add perfetto data source
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
27fb3c549a v3d: Sync v3d_drm.h with drm-misc-next
This pulls in changes based on 8a4b913df427 ("drm/log: Add integer scaling support")
and brings support for the perfmon set global ioctl(..).

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/31751>
2024-12-13 12:29:11 +00:00
Valentine Burley
f456642501 turnip/ci: Ony increase hangcheck timer for spilling tests on a630
This also allows deleting the baremetal-deqp-test-freedreno-vk
definition.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
2b67da4cea freedreno/ci: Drop redundant DEQP_VER
DEQP_VER isn't used with deqp-runner suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
cea8bafd59 turnip/ci: Update expectations
Decreasing the fractions uncovered some new flakes and fails.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
61a9ab27f3 turnip/ci: Remove a630-vk-asan skip
Memory leak detection is currently disabled in the a630-vk-asan
suite, so there's no point in skipping these tests.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
31ac69aebd turnip/ci: Adjust some timeouts
Reduce the timeouts for full runs. These values are still quite
conservative.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
3602e03428 turnip/ci: Decrease fraction for a630-vk-asan
Not related to the tests_per_group changes, but this has been has
been taking approximately 4 minutes, leaving us some space to run
more tests.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
0fb55f7697 turnip/ci: Bump the number of tests per group for a660
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
69aa988eca turnip/ci: Bump the number of tests per group for a630
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
36de4c8fb9 turnip/ci: Bump the number of tests per group for a618
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
680885d57e radv/ci: Convert Valve RADV jobs to deqp-runner suites
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32558>
2024-12-13 09:36:08 +00:00
Erik Faye-Lund
cae4c57b7a panvk/ci: add a few more g52 skips
When I last updated this, some of the jobs had too many tests that took
over 30 seconds to show them all in the output. So I only added the
longest ones. Here's the rest, and with this the skip-list seems correct
for now.

Note that there's a few tests that takes close to 30 seconds, so they
might end up getting pushed across the limit from time to time as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32603>
2024-12-13 08:35:04 +00:00
Erik Faye-Lund
ff9f4640c2 panvk/ci: fixup g52 skip sorting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32603>
2024-12-13 08:35:04 +00:00
Erik Faye-Lund
cbaf3c4849 panvk/ci: correct timeouts as crash
While these timeout when I run them locally,
MESA_VK_ABORT_ON_DEVICE_LOSS ends up turning them into crashes on the
CI. Correct this, so we don't accidentally fail the full job here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32603>
2024-12-13 08:35:04 +00:00
Sagar Ghuge
d3f9139e49 intel: Use Morton compute walk order
According to HSD 14016252163 if compute shader uses the sample
operation, morton walk order and set the thread group batch size to 4 is
expected to increase sampler cache hit rates by increasing sample
address locality within a subslice.

Rework:
 * Caio: "||" => "&&" for type checking in instr_uses_sampler()
 * Jordan: Use nir's foreach macros rather than
   nir_shader_lower_instructions()

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32430>
2024-12-12 19:56:47 -08:00
Sagar Ghuge
4bd958243d intel/genxml: Update COMPUTE_WALKER_BODY
For PTL, we can have one more additional walk order along with the
"Thread Group Batch Size" field.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32430>
2024-12-12 19:56:47 -08:00
Sagar Ghuge
41eda955af intel/genxml: Drop morton walk field from Xe2
Looks like this one got added accidently for Xe2. Xe2 doesn't support
Morton dispatch walk order.

Thanks to Rohan for bringing up this during review.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32430>
2024-12-12 19:56:47 -08:00
Caio Oliveira
0af8133f09 intel/executor: Add example using scalar register and send gather
Reviewed-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/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
5420c027e6 intel/brw: Add validation for ARF scalar register
Reviewed-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/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
f8c7348468 intel/brw: Add assembly support for ARF scalar register
And the SEND gather variant that uses a scalar register as its only
source.

Reviewed-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/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
46e9fe6981 intel/brw: Add TGL_PIPE_SCALAR value
Add the enum value for the (in-order) scalar pipe.

Reviewed-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/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
7acd84da51 intel/brw: Consider if SEND is gather variant when setting ex_desc
SEND instructions of gather variant will use the upcoming ARF scalar
register.  They use only Src0 and reuse the bits of Src1.Length (part of
ex_desc).  Src1.Length is (implicitly) defined as 0.

Adapt the helper functions to take the new variant into account when
manipulating ex_desc.

Reviewed-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/32236>
2024-12-13 02:18:15 +00:00
Friedrich Vock
0c02a7e8e8 radv/rt: Remove nir_intrinsic_execute_callable instrs in monolithic mode
It's allowed to place OpExecuteCallableKHR in a SPIR-V, even if the RT
pipeline doesn't contain any callable shaders. Unreal hits this case and
crashes. We can assume the intrinsic never gets executed, so we can
simply remove it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32613>
2024-12-13 01:50:58 +00:00
Ian Romanick
1b1003ca6f brw/algebraic: Pull brw_constant_fold_instruction out of the switch statement
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
f0bf68dd25 brw/const: Remove TODO that isn't allowed by the hardware
There are a lot of restrictions for bfloat16. The one that prevents this
very useful optimization from being possible is, "Broadcast of bfloat16
scalar is not supported."

Part of the reason this MR exists is to build up to implementing BF
support, and there are a couple more commits that implement
this. However, it fails on both real hardware and simulation:

    Instruction is: mad (8|M0) r6.0<1>:f 0xBF80:bf r2.0<8;1>:f r64.0<0>:f

    In bfloat/float mixed mode, bfloat src must be packed.

Alas.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
99d3755bdd brw/const: Allow HF constants in MAD on Gfx11
These can't mix with F values, but if the non-constant sources are
already HF, this is allowed in src0.

No shader-db changes on any Intel platform.

fossil-db:

Ice Lake
Totals:
Instrs: 236027458 -> 236027442 (-0.00%)
Cycle count: 24515944704 -> 24515945379 (+0.00%)

Totals from 8 (0.00% of 798454) affected shaders:
Instrs: 10226 -> 10210 (-0.16%)
Cycle count: 58567 -> 59242 (+1.15%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
4c462b6b32 brw/const: Allow constants in integer MAD
Nothing can generate this currently, but a future commit will.

The Bspec and experimentation support the following limitations:

- Gfx11: Either src0 or src2 can be W or UW.
- Gfx12: Either src0 or src2 can be W or UW.
- Gfx12.5: Both src0 and src2 can be W or UW.
- Gfx20: Both src0 and src2 can be W or UW.

v2: Add missing break statement.

v3: Leave the MAD handling in the case with the other 3 source
instructions. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
9fa6b68f9e brw/const: Refactor checking whether an immediate source is allowed
Should be no functional change here. This simplifies some later changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
69d74739fd brw/algebraic: Don't restrict MAD(a, b, 1) optimization to float32
This is very unlikely for floating point MAD. At some point I intend
to add internal integer MAD uses, and this could occur there.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
b605f76b2a brw/algebraic: Constant fold multiplicands of MAD
v2: Move the full constant folding part to
brw_constant_fold_instruction. Suggested by Caio. I did this by
extracting the core part of the folding to a helper function.

v3: Delete stale comment. Noticed by Caio.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 18090847 -> 18090843 (<.01%)
instructions in affected programs: 150 -> 146 (-2.67%)
helped: 1 / HURT: 0

total cycles in shared programs: 919664648 -> 919663210 (<.01%)
cycles in affected programs: 3426 -> 1988 (-41.97%)
helped: 1 / HURT: 0

LOST:   1
GAINED: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 220496486 -> 220496403 (-0.00%)
Cycle count: 31610880908 -> 31610879044 (-0.00%); split: -0.00%, +0.00%

Totals from 70 (0.01% of 702439) affected shaders:
Instrs: 47018 -> 46935 (-0.18%)
Cycle count: 6335504 -> 6333640 (-0.03%); split: -0.11%, +0.09%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
3a16ad71b7 brw/copy: Commute immediates for MAD multiplicands
This enables constant combining to do its job.

v2: Restore accidentally deleted line from a comment. Noticed by Caio.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total cycles in shared programs: 919668392 -> 919669310 (<.01%)
cycles in affected programs: 10125264 -> 10126182 (<.01%)
helped: 348 / HURT: 194

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Cycle count: 31610720660 -> 31610692748 (-0.00%); split: -0.00%, +0.00%

Totals from 9066 (1.29% of 702433) affected shaders:
Cycle count: 810411934 -> 810384022 (-0.00%); split: -0.01%, +0.00%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
e3e58d6f48 brw: Emit immediate value for MAD in canonical position
No shader-db changes on any Intel platform.

fossil-db:

Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results. (Meteor Lake shown)
Totals:
Cycle count: 25096109024 -> 25096108722 (-0.00%); split: -0.00%, +0.00%

Totals from 4106 (0.51% of 797610) affected shaders:
Cycle count: 63266176 -> 63265874 (-0.00%); split: -0.01%, +0.01%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
d9b019b683 brw/copy: Don't try to be clever about ADD3 constant propagation
Always propagate into any source. Let commute_immedates and constant
combining sort out the mess. It's literally their job.

No shader-db changes on any Intel platform. The fossil-db changes just
appear to be subtle changes in register allocation if the immediate
source changes from src0 to src2.

v2: Update the comment in commute_immediates. Suggested by Caio.

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Cycle count: 31610720510 -> 31610720660 (+0.00%); split: -0.00%, +0.00%

Totals from 8 (0.00% of 702433) affected shaders:
Cycle count: 5522382 -> 5522532 (+0.00%); split: -0.00%, +0.00%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
a84e3a0f55 brw/const: Allow mixing signed and unsigned immediate sources
No shader-db or fossil-db changes on any Intel platform. This commit
just prevents issues with a later commit, "brw/copy: Don't try to be
clever about ADD3 constant propagation."

v2: Use 'can_promote = true; break;' instead of 'return
true;'. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
a738c55d7b brw/algebraic: Partial constant folding of ADD3
Fold the cases where one of the sources is zero or two of the sources
are constants. Both case will result in a regular ADD.

No shader-db or fossil-db changes on any Intel platform. This commit
just prevents issues with a later commit, "brw/copy: Don't try to be
clever about ADD3 constant propagation."

v2: Move the full constant folding part to
brw_constant_fold_instruction. Suggested by Caio.

v3: Eliminate the impossible src.file == BAD_FILE case in
brw_fs_opt_algebraic. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
c52ce6157f brw/emit: Fix typo in recently added ADD3 assertion
The current assertion fails as soon as a MAD with src0 and src2 being
immediate is detected.

The assertion was supposted to catch, "If it's ADD3, only one of src0
and src2 can be immediate." The detect this, the opcode test should have
been !=.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c1c09e3c4a ("brw/emit: Add correct 3-source instruction assertions for each platform")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
25de9dcd76 brw/algebraic: Fix MUL constant folding
Some callers of brw_constant_fold_instruction depend on the result being
a MOV of immediate when progress is made. Previously `MUL dst:D src0:D
1:D` would be converted to `MOV dst:D src0:D`. There was also no
handling for `MUL dst:D imm0:D imm1:D`.

This could cause problems if one of the immedate values was -1. The
existing code would convert this to a `MOV dst:D imm0:D` and set the
negate flag on src0. That is not correct.

v2: Fix the is_negative_one case handling of the non-negative-one
source. Add a comment explaining the assertion. Both suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 2cc1575a31 ("brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
086e83ccd9 brw/algebraic: Fix ADD constant folding
Some callers of brw_constant_fold_instruction depend on the result being
a MOV of immediate when progress is made. Previously `ADD dst:D src0:D
0:D` would be converted to `MOV dst:D src0:D`. There was also no
handling for `ADD dst:D imm0:D imm1:D`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 2cc1575a31 ("brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
duncan.hopkins
191d7c6cb6 kopper: Add '#if' guard around loader_dri3_get_pixmap_buffer to stop missing symbol on MacOS.
MacOS does not support DRI3.

Reviewed-By: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
2024-12-13 00:39:16 +00:00
duncan.hopkins
568a4ca899 glx: ignore zink check for has_explicit_modifiers and DRI3 on MacOS.
MacOS has neither of these so always fails to start up zink.

Reviewed-By: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
2024-12-13 00:39:16 +00:00
duncan.hopkins
e89eba0796 glx: change #if guard around dri_common.h to stop missing 'driDestroyConfigs' symbol on MacOS builds.
Reviewed-By: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
2024-12-13 00:39:16 +00:00
Caio Oliveira
c8f6d8154f intel/brw: Remove overloads for brw_print_instruction/s functions
Almost all cases now handled with default arguments.  The only real
extra work that was being done was pushed to the client code in
debug_optimizer().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32596>
2024-12-12 22:01:48 +00:00
Alyssa Rosenzweig
41076b2a55 radeonsi: use mesa_prim_has_adjacency
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/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
b7f2d480da agx: optimize scratch access
so we can use designated initializers and other fun features.

all affected shaders are in gfxbench:

total instructions in shared programs: 2750549 -> 2750497 (<.01%)
instructions in affected programs: 10832 -> 10780 (-0.48%)
helped: 4
HURT: 2
Inconclusive result (value mean confidence interval includes 0).

total alu in shared programs: 2278478 -> 2278760 (0.01%)
alu in affected programs: 7040 -> 7322 (4.01%)
helped: 2
HURT: 4
Alu are HURT.

total fscib in shared programs: 2276985 -> 2277267 (0.01%)
fscib in affected programs: 7040 -> 7322 (4.01%)
helped: 2
HURT: 4
Fscib are HURT.

total bytes in shared programs: 19922466 -> 19922734 (<.01%)
bytes in affected programs: 71412 -> 71680 (0.38%)
helped: 4
HURT: 2
Inconclusive result (value mean confidence interval includes 0).

total regs in shared programs: 865070 -> 865086 (<.01%)
regs in affected programs: 142 -> 158 (11.27%)
helped: 0
HURT: 2

total uniforms in shared programs: 2120930 -> 2121034 (<.01%)
uniforms in affected programs: 244 -> 348 (42.62%)
helped: 0
HURT: 2

total scratch in shared programs: 11576 -> 11600 (0.21%)
scratch in affected programs: 2744 -> 2768 (0.87%)
helped: 0
HURT: 2

total spills in shared programs: 958 -> 868 (-9.39%)
spills in affected programs: 958 -> 868 (-9.39%)
helped: 6
HURT: 0

total fills in shared programs: 732 -> 626 (-14.48%)
fills in affected programs: 732 -> 626 (-14.48%)
helped: 4
HURT: 2

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/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
923e6361d1 compiler/glsl_types: add glsl_get_word_size_align_bytes
this alignment matches what nir_lower_scratch_to_var wants. this is not
correctness bearing but it mitigates stats regressions.

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/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
bd89279dd4 nir: add lower_scratch_to_var pass
to ease opencl pain.

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/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
d5a4aa756f asahi: use mesa_prim_has_adjacency
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/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
8abb043c19 compiler: add mesa_prim_has_adjacency helper
hk will use this, it's a pretty obvious thing to want.

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/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
e4f61771d8 compiler: use libcl.h for CL
instead of redefining BITFIELD_BIT.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
d695c84829 libagx: port to common libcl.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/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
a0694fd5c3 libagx: drop pointless 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/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
c34635c58d agx: implement halts
just translate to a stop. seems to work fine.

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/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
21c16fe343 asahi,hk: wire up printf, abort
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/32529>
2024-12-12 21:16:12 +00:00
Lionel Landwerlin
36623697d1 hk: fix timeline value type
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
dd4805fcc8 asahi/clc: remap __FILE__
important for reproducability. wondering if we can do this in common code but
not sure how yet.

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/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
bfe1fd737b asahi: allow c23 extensions
hk already does. this quiesches warnings with single argument static_assert
which we want for CL parity.

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/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
13a4186c96 util/bitpack_helpers: make partially CL safe
add enough preprocessor guards that we can include this from CL and get basic
implementations of things. FIXED packs are missing due to llroundf (probably
fixable).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
d64caf4161 libcl: add VkDraw(Indexed)IndirectCommand definitions
this is helpful to indirect draw munging code, which applies to at least 3
stacks using driver CL stuff (current Intel, shortterm Asahi, mediumterm
Panfrost)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
12e27497b3 libcl: add a common header for CPU/GPU stuff
In an attempt to make OpenCL shaders more "batteries included", start building
up a standard library. Based on libagx.h.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
13b8af95fb clc: plumb cl_khr_subgroup_ballot
although rusticl isn't lighting it up yet, it's helpful to get
sub_group_ballot for driver CL, which is all standard Vulkan-compatible spirv.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Paulo Zanoni
d4a54d4f92 brw: don't read past the end of old_src buffer in resize_sources()
In this case, num_sources is bigger than this->sources, so if we loop
up to num_sources (instead of this->sources) we'll end up reading past
the end of old_src[]. Only copy up to what we originally had.

This was found by code inspection, I'm not aware of any applications
failing due to the lack of this patch.

Fixes: d9e737212d ("intel/brw: Add a src array for the common case in fs_inst")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
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/32600>
2024-12-12 20:33:13 +00:00
Samuel Pitoiset
c7a7f0244f radv: add radv_lower_terminate_to_discard and enable for Indiana Jones
To workaround game bug.

This fixes the rendering issue with eyes.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32606>
2024-12-12 19:54:39 +00:00
Samuel Pitoiset
4d4418dbb3 spirv: add an options to lower SpvOpTerminateInvocation to OpKill
To workaround game bugs like Indiana Jones.

Original workaround found by Hans-Kristian.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32606>
2024-12-12 19:54:39 +00:00
Erik Faye-Lund
976eb6825e panvk: do not require opt-in for panvk on v10
As of writing, PanVK on v10 HW is in pretty good shape. It's not yet
conformant, but we were passing over 99.9% of the CTS last time I
checked. That's probably good enough to drop the opt-in here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32561>
2024-12-12 19:32:06 +00:00
Erik Faye-Lund
12067727fa panvk: soften the language around opt-in
We already have and use vk_warn_non_conformant_implementation(), so
we're already being clear that PanVK is not yet conformant. Let's not
repeat that information here, and instead focus on it not being
well-tested.

This brings the wording more or less in-line with NVK.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32561>
2024-12-12 19:32:06 +00:00
Timur Kristóf
deab81fb0d radv: Configure implicit VS primitive ID to be per-primitive.
This is beneficial to applications that rely on
the implicit primitive ID from VS.

- We don't have to disable provoking vertex reuse,
  which results in more efficient vertex processing.
- There is no LDS access needed to export the primitive ID,
  because it is already available to GS threads.
- As a consequence of not needing LDS, we can use this
  together with NGG passthrough mode.

Signed-off-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/32270>
2024-12-12 18:11:47 +00:00
Timur Kristóf
95ac0f8d76 radv: Reorder FS primitive ID input after layer and viewport.
We want to make the implicit VS primitive ID a per-primitive
output attribute, which means that this has to be last.

Signed-off-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/32270>
2024-12-12 18:11:47 +00:00
Timur Kristóf
9224b9a752 ac/nir/ngg: Add ability to store primitive ID as per-primitive.
This configuration will be enabled in RADV in a subsequent commit.

On GFX10.3:
Do this together with the primitive export, to avoid adding extra
CF, and to ensure optimal access of the export space.

On GFX11:
It's not an export but a memory store instruction, so always do
it earlier and ensure the optimal attribute ring access pattern.

Signed-off-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/32270>
2024-12-12 18:11:45 +00:00
Timur Kristóf
d670dc0c0b radv: Only set NGG_DISABLE_PROVOK_REUSE for VS.
It doesn't do anything useful for other stages.

In VS, we use this when the implicit primitive ID is needed,
so that we can export that as a per-vertex attribute of the
provoking vertex.

In TES, the patch ID (which is used as the primitive ID) is
already a per-vertex input VGPR, so it doesn't make sense to
configure this.

In GS, the primitive ID is explicitly written by the shader,
so it makes no sense to disable provoking vertex reuse in the
input.

Signed-off-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/32270>
2024-12-12 18:11:45 +00:00
Rhys Perry
9fe92689cc radv: increase maxComputeWorkGroupCount[0]
Match AMDVLK and radeonsi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577>
2024-12-12 17:38:47 +00:00
Rhys Perry
53d0187bab aco: decrease max_workgroup_size
Match the limit of radeonsi and RADV.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577>
2024-12-12 17:38:46 +00:00
Rhys Perry
87f2f77960 aco: fix max_workgroup_count[0]
This is necessary for radeonsi.

fossil-db (navi21):
Totals from 292 (0.37% of 79395) affected shaders:
Instrs: 305965 -> 306182 (+0.07%); split: -0.00%, +0.07%
CodeSize: 1624816 -> 1627212 (+0.15%); split: -0.00%, +0.15%
Latency: 5244652 -> 5243587 (-0.02%); split: -0.07%, +0.05%
InvThroughput: 1221089 -> 1225285 (+0.34%); split: -0.04%, +0.38%
Copies: 22712 -> 22702 (-0.04%)
PreSGPRs: 10713 -> 10712 (-0.01%)
PreVGPRs: 10918 -> 10920 (+0.02%)
VALU: 178613 -> 178836 (+0.12%)
SALU: 43490 -> 43493 (+0.01%); split: -0.02%, +0.03%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577>
2024-12-12 17:38:46 +00:00
Lionel Landwerlin
e0b5179869 blorp: use 2D dimension for 1D tiled images
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: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32608>
2024-12-12 17:10:45 +00:00
Erik Faye-Lund
cfb5687cb3 panvk: disable imageCubeArray on bifrost
We haven't wired this up correctly on Bifrost, so let's make this V10
only for now.

Fixes: 605c173fbd ("panvk: update feature support")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32610>
2024-12-12 15:10:26 +00:00
Erik Faye-Lund
1766e676fe panvk: do not expose subgroup support
We don't currently support it in the compiler, so we shouldn't claim
support for it either.

Fixes: a6e03ce428 ("panvk: advertise version 1.1 support")
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32604>
2024-12-12 14:50:25 +00:00
Hans-Kristian Arntzen
e815d6523c radv: Add radv_invariant_geom=true for Indiana Jones.
Water puddles expect invariant position, but does not declare such in
the vertex shaders, leading to random glitches.

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/32607>
2024-12-12 13:54:27 +00:00
Eric R. Smith
f8bc6c8663 panfrost: fix potential memory leak
In the very unlikely case that the packed AFBC image will not
save (enough) memory, we abort packing. In this case we should
free the BO associated with the metadata.

Fixes: 5a928f7563 ("panfrost: Add env variable for max AFBC packing ratio")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32597>
2024-12-12 13:08:28 +00:00
Eric R. Smith
b59e73e426 panfrost: fix read/write resource confusion in afbc_pack
We read the source rather than write it, due to a typo we were
not setting this correctly though.

Fixes: bc55d150a9 ("panfrost: Add support for AFBC packing")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32597>
2024-12-12 13:08:28 +00:00
Christian Gmeiner
2ebd5fb978 etnaviv: rs: Add DBG(..) why blt usage was not possible
Can be helpful to debug issues.

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/32592>
2024-12-12 12:52:37 +00:00
Christian Gmeiner
faf562651a etnaviv: blt: Add DBG(..) why blt usage was not possible
Can be helpful to debug issues.

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/32592>
2024-12-12 12:52:37 +00:00
Konstantin
815ca049cd vulkan: Fix the argument order of update_as
Also moves the src argument before dst which is more consistent.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32488>
2024-12-12 11:15:08 +00:00
Valentine Burley
3bff52da4e ci: Drop lava-piglit:(x86_64|arm64) definitions
As part of the migration to deqp-runner suites, remove these
definitions to prevent the introduction of additional piglit
jobs without test suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32461>
2024-12-12 10:35:41 +00:00
Valentine Burley
8e54b77910 panfrost/ci: Convert to deqp-runner suite
Convert the panfrost-g52-piglit-gles2:arm64 job to a deqp-runner
suite.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32461>
2024-12-12 10:35:41 +00:00
Valentine Burley
ca7df52af8 svga/ci: Convert to deqp-runner suite
Convert the vmware-vmx-piglit:x86_64 job to a deqp-runner suite.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32461>
2024-12-12 10:35:40 +00:00
Samuel Pitoiset
370886c898 Revert "radv: disable alphaToOne except for Zink"
This reverts commit 3b010a9e60.

This should be fixed properly now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32583>
2024-12-12 10:07:25 +00:00
Samuel Pitoiset
c3a050da07 radv: fix alpha-to-coverage with alpha-to-one without MRTZ
This injects a MRTZ export with only the alpha channel to select it
with COVERAGE_TO_MASK_ENABLE for alpha-to-coverage.

Co-Authored-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32583>
2024-12-12 10:07:25 +00:00
Samuel Pitoiset
838b1cfcbd radv: simplify determining some fragment shader info with epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32583>
2024-12-12 10:07:25 +00:00
Collabora's Gfx CI Team
8085984aa2 Uprev Piglit to 4c0fd15fd956ec70c5509bedee219d602b334464
468221c722...4c0fd15fd9

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32478>
2024-12-12 09:33:59 +00:00
Samuel Pitoiset
4d1aa9a2d0 radv: fix disabling DCC for stores with drirc
Displayable DCC should also be disabled, otherwise it's asserting
somewhere in ac_surface.c

Fixes: e3d1f27b31 ("radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32584>
2024-12-12 09:11:37 +00:00
Daniel Schürmann
26a3038b65 aco/lower_branches: remove edges between blocks if there is no direct branch
This way, linear predecessors and successors better reflect the
actual control flow which improves wait state insertion and hazard
mitigation.

Totals from 10252 (12.91% of 79395) affected shaders: (Navi31)

Instrs: 18824540 -> 18803823 (-0.11%); split: -0.11%, +0.00%
CodeSize: 99025464 -> 98942028 (-0.08%); split: -0.08%, +0.00%
Latency: 169291854 -> 165781877 (-2.07%); split: -2.07%, +0.00%
InvThroughput: 29701086 -> 29228602 (-1.59%); split: -1.59%, +0.00%
SClause: 510587 -> 510586 (-0.00%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32389>
2024-12-12 08:46:22 +00:00
Daniel Schürmann
22ffe72022 aco: move branch lowering optimization into separate file 'aco_lower_branches.cpp'
No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32389>
2024-12-12 08:46:22 +00:00
Friedrich Vock
845660f2b7 aco/lower_to_hw_instr: Check the right instruction's opcode
instr is the branch instruction, its opcode won't ever be writelane. We
should check inst instead.

Found by inspection.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32389>
2024-12-12 08:46:21 +00:00
Daniel Schürmann
28ab7f0168 aco/jump_threading: remove branch sequence optimization
This optimization gets applied during postRA optimization, now.

No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:22 +00:00
Daniel Schürmann
fcd94a8ca7 aco: move try_optimize_branching_sequence() to postRA optimizations
Totals from 196 (0.25% of 79206) affected shaders: (Navi31)

Instrs: 534343 -> 534438 (+0.02%); split: -0.00%, +0.02%
CodeSize: 2774852 -> 2775420 (+0.02%); split: -0.00%, +0.02%
Latency: 7103512 -> 7103021 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 959477 -> 959447 (-0.00%)
Copies: 42646 -> 42648 (+0.00%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:21 +00:00
Daniel Schürmann
95d44c7ce0 aco/optimizer_postRA: set branch()->never_taken if exec is constant non-zero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:21 +00:00
Daniel Schürmann
d67932f69e aco/print_ir: don't print disconnected empty blocks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:21 +00:00
Lionel Landwerlin
2bb98a8f99 anv: document UBO descriptor range alignments
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/32347>
2024-12-12 07:35:18 +00:00
Lionel Landwerlin
99bb2a087a intel/decoder: fix COMPUTE_WALKER handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17096f87 ("intel: Switch to COMPUTE_WALKER_BODY")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32347>
2024-12-12 07:35:18 +00:00
Kenneth Graunke
6341b3cd87 brw: Combine convergent texture buffer fetches into fewer loads
Borderlands 3 (both DX11 and DX12 renderers) have a common pattern
across many shaders:

  con 32x4 %510 = (uint32)txf %2 (handle), %1191 (0x10) (coord), %1 (0x0) (lod), 0 (texture)
  con 32x4 %512 = (uint32)txf %2 (handle), %1511 (0x11) (coord), %1 (0x0) (lod), 0 (texture)
  ...
  con 32x4 %550 = (uint32)txf %2 (handle), %1549 (0x25) (coord), %1 (0x0) (lod), 0 (texture)
  con 32x4 %552 = (uint32)txf %2 (handle), %1551 (0x26) (coord), %1 (0x0) (lod), 0 (texture)

A single basic block contains piles of texelFetches from a 1D buffer
texture, with constant coordinates.  In most cases, only the .x channel
of the result is read.  So we have something on the order of 28 sampler
messages, each asking for...a single uint32_t scalar value.  Because our
sampler doesn't have any support for convergent block loads (like the
untyped LSC transpose messages for SSBOs)...this means we were emitting
SIMD8/16 (or SIMD16/32 on Xe2) sampler messages for every single scalar,
replicating what's effectively a SIMD1 value to the entire register.
This is hugely wasteful, both in terms of register pressure, and also in
back-and-forth sending and receiving memory messages.

The good news is we can take advantage of our explicit SIMD model to
handle this more efficiently.  This patch adds a new optimization pass
that detects a series of SHADER_OPCODE_TXF_LOGICAL, in the same basic
block, with constant offsets, from the same texture.  It constructs a
new divergent coordinate where each channel is one of the constants
(i.e <10, 11, 12, ..., 26> in the above example).  It issues a new
NoMask divergent texel fetch which loads N useful channels in one go,
and replaces the rest with expansion MOVs that splat the SIMD1 result
back to the full SIMD width.  (These get copy propagated away.)

We can pick the SIMD size of the load independently of the native shader
width as well.  On Xe2, those 28 convergent loads become a single SIMD32
ld message.  On earlier hardware, we use 2 SIMD16 messages.  Or we can
use a smaller size when there aren't many to combine.

In fossil-db, this cuts 27% of send messages in affected shaders, 3-6%
of cycles, 2-3% of instructions, and 8-12% of live registers.  On A770,
this improves performance of Borderlands 3 by roughly 2.5-3.5%.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32573>
2024-12-12 00:05:42 +00:00
Daniel Schürmann
22881712c8 aco/assembler: Don't emit target basic block index when chaining branches
This could erroneously cause an assertion to fail if the
target block index was larger than UINT16_MAX.

Fixes: cab5639a09 ('aco/assembler: chain branches instead of emitting long jumps')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32599>
2024-12-11 23:28:55 +00:00
Erik Faye-Lund
445ff2e500 panvk/ci: update g52-vk-full job
On a single runner, this job currently times out due to taking over 5
hours. The estimate from dEQP runner itself suggests a full run might
take over 8 hours with the current configuration. We can't really work
with that long runs, even if they are manual.

We currently have 7 vim3 runners, so we can actually afford to
parallelize the run a bit, to make this a bit more manageable. If we
choose 4, we take up a bit more than half of the runners, but we leave
two runners (plus a spare) for the pre-merge CI.

With this, a each job takes about 2.5 hours. We leave the timeout at 3
hours for now, to have some headroom for new tests being enabled.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32591>
2024-12-11 20:19:43 +00:00
Erik Faye-Lund
bdbcd7c7e0 panvk/ci: update g52 results
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32591>
2024-12-11 20:19:43 +00:00
Erik Faye-Lund
8b969d7897 panvk/ci: remove duplicate skips
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32591>
2024-12-11 20:19:43 +00:00
Caio Oliveira
abe41b1d2c intel/compiler: Use #pragma once instead of header guards
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32534>
2024-12-11 19:47:44 +00:00
Tim Huang
ad75b9f1a6 amd: add GFX v11.5.3 support
This enables support for GFX version 11.5.3.

Signed-off-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32567>
2024-12-11 19:14:34 +00:00
Juan A. Suarez Romero
5b42da1be8 util/format: nr_channels is always <= 4
While the nr_channels is defined with 3 bits, which allows up to 7
channels, actually the number of channels is less or equal to 4.

This adds an assertion that helps static analyzers to avoid several
false positives related with this.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32589>
2024-12-11 18:34:47 +00:00
Samuel Pitoiset
167f4a87c6 radv: remove remaining discard to demote options
This is the default but the option wasn't completely removed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32590>
2024-12-11 17:59:13 +00:00
Tapani Pälli
97fc987497 intel/dev: update mesa_defs.json from internal database
This updates entry for 14017823839 which fixes issues on BMG with:
   dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.1

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/32550>
2024-12-11 17:32:52 +00:00
Eric R. Smith
a6e03ce428 panvk: advertise version 1.1 support
We know we have a broken Vulkan driver, so it's debatable whether it's
a broken Vulkan 1.0 or broken 1.1. Advertising 1.1 lets us run more
tests, and this patch does this. We also bump the instance version id
to 1.4, which seems appropriate since the overall Vulkan infrastructure
within Mesa is at that level.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32464>
2024-12-11 17:11:06 +00:00
Eric R. Smith
2627d793a2 panvk: split device and instance version numbers
We were using the same routine to find the device and instance
version numbers. This isn't correct; the device version may
vary based on the physical hardware we are using, but the
instance version should always be the same.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32464>
2024-12-11 17:11:06 +00:00
Eric R. Smith
605c173fbd panvk: update feature support
Turn on `imageCubeArray` and `fragmentStoresAndAtomics`, which we
already support (the latter only on v10 and later).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32464>
2024-12-11 17:11:06 +00:00
Job Noorman
f80ac64e8f ir3/cp: add support for swapping srcs of sad
Like mad, it's sometimes useful to swap the srcs of sad since not all
flags are allowed on all srcs. However, unlike mad, sad is 3-src
commutative so more srcs can be swapped.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:13 +00:00
Job Noorman
ea2a75f81a ir3/cp: make try_swap_mad_two_srcs more generic
In preparation for supporting sad, rename to try_swap_cat3_two_srcs and
add argument for src n.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:12 +00:00
Job Noorman
00656526d8 ir3/cp: extract common src swapping code
In preparation for supporting sad (which like mad may benefit from
swapping some of it srcs), extract the swapping from
try_swap_mad_two_srcs so that it can be reused for sad. This is
necessary since, unlike mad, sad might also benefit from swapping srcs
1->2 (instead of only 2->1) or 3->2.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:12 +00:00
Job Noorman
e615f30b5e ir3/cp: only mark mad srcs as swapped when swap succeeded
We would mark mad srcs as swapped once we tried swapping them, even if
it would not succeed. However, it might happen (especially after running
ir3_shared_folding) that a new opportunity for swapping comes up later.
Therefore, we should only mark the srcs as swapped when it actually
succeeded.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:12 +00:00
Job Noorman
2573c1d756 ir3: add codegen for sad
Turns out that sad is just iadd3. I assume it's an acronym for "Sum of
Absolute Differences" which may make sense since its 2nd src supports
(neg) which would allow SAD to be implemented using this instruction.

NIR already supports algebraic patterns for selecting iadd3 so adding
codegen support in ir3 is trivial. However, sad seems to have the same
hardware limitation as mad and doesn't support the scalar ALU so we have
to make sure to disable it when emitting iadd3.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:11 +00:00
Job Noorman
ed58a8688f ir3: teach backend about sad
It only supports (neg) in its 2nd src but other than that has the same
properties as mad.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:11 +00:00
Job Noorman
49c7a22ac8 ir3/isa: fix isaspec for sad.s32
FULL should be true here. Also tested in computerator and the comment
about uncertainty can be removed.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:10 +00:00
Job Noorman
943f666b69 ir3/isa: fix cat3-alt immed src
The override used for the immed encoding in #cat3-src-const-or-immed
used a pattern which isn't supported in overrides by isaspec. The
pattern in the base bitset (10) was too strict for immediates since it
didn't allow the most significant bit to be 1.

Fix this by making the base pattern 1 and adding an assert for the next
bit to be 0 in the non-immed case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1c6c200c0d ("ir3: add newly found shlg.b16 instruction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32549>
2024-12-11 16:09:46 +00:00
Eric R. Smith
6f95870561 format: Add R8_G8B8_422_UNORM format
This is the format that drivers will want to use for NV16
without YUV conversion (if they support this natively).
Previously we had NV16 working but it was always emulated
with R8 + GR88.

Fixes: 440b69210a ("dri, mesa: fix NV16 texture format")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32524>
2024-12-11 15:28:08 +00:00
Rhys Perry
26790e90d3 nir: make ballot ALU and mbcnt_amd operations reorderable
These can be lowered to ALU and load_subgroup_invocation, all of which are
reorderable.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32512>
2024-12-11 14:47:12 +00:00
Rhys Perry
650468fbdf nir/move_discards_to_top: don't move across more intrinsics
This missed dpp16_shift_amd, lane_permute_16_amd, last_invocation and
ballot_relaxed.

Instead, list the non-reorderable intrinsics which are allowed to be moved
after discards.

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/32512>
2024-12-11 14:47:12 +00:00
Rhys Perry
5368569d06 nir: make load_helper_invocation non-reorderable
This can't be moved to after demote, so it's not reorderable.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32512>
2024-12-11 14:47:12 +00:00
Erik Faye-Lund
d1357b1e9a panvk: expose scalarBlockLayout
This just works on Mali, nothing fancy needed.

Unfortunately, this triggers a lot of timeouts, presumably due to
uncached CPU access to memory. So lots of extra skips here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32562>
2024-12-11 13:19:19 +00:00
Georg Lehmann
65506e635b aco/ra: don't write to scc/ttmp with s_fmac
Fixes: 4bd229ac50 ("aco/gfx11.5: select SOP2 float instructions")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
2024-12-11 12:51:18 +00:00
Georg Lehmann
0b9e2a5427 aco/ra: disallow s_cmpk with scc operand
Fixes: 2d6b0a4177 ("aco/optimizer: Optimize SOPC with literal to SOPK.")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
2024-12-11 12:51:18 +00:00
Georg Lehmann
fe0c72caec aco/ra: don't write to exec/ttmp with mulk/addk/cmovk
ttmp sgprs are readonly outside of trap handlers, so the instructions were
probably skipped. RA should also never create additional exec writes.

Fixes: e06773281b ("aco/ra: Optimize some SOP2 instructions with literal to SOPK.")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
2024-12-11 12:51:18 +00:00
Georg Lehmann
576a2e798c aco/gfx12: don't assume memory operations complete in order
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32569>
2024-12-11 12:22:59 +00:00
Hans-Kristian Arntzen
c3becade15 wsi/wayland: Add forward progress guarantee for present wait.
When a timestamped present is not used (MAILBOX or the very first present),
it's possible that the very last queued present ID won't complete in finite time.
Similar to frame callback based workaround, apply a timeout to present
waits when they target the very last submitted presentID.

Only apply the workaround when we're not guaranteed forward progress.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:48 +00:00
Hans-Kristian Arntzen
d5509c147f wsi/wayland: Remove unused present_mode member.
We use chain->base.present_mode instead.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Hans-Kristian Arntzen
63cbbf2a1c wsi/wayland: Handle FIFO -> MAILBOX transitions correctly
When transitioning from FIFO to MAILBOX with swapchain_maintenance1,
we must make sure that the first MAILBOX after FIFO observes the wait
barrier. This was done implicitly in the timestamp path, but not for
the non-commit-timing path.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Hans-Kristian Arntzen
458842c3b5 wsi/wayland: Don't fallback to broken legacy throttling with FIFO
When commit-timing was not supported, but FIFO was we would end
up in a situation with throttling on FIFO barrier and legacy fence.
At that point, the entire point of FIFO falls flat.

There are some caveats with this approach, but it's not expected
that compositors will only support FIFO, and not commit-timing long
term.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Hans-Kristian Arntzen
4dde605924 wsi/wayland: Only use commit timing protocol alongside present time.
Comming timing is meaningless when we cannot receive timing feedback.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Samuel Pitoiset
553eb1a3fd radv: fix alpha-to-coverage with alpha-to-one when MRTZ is also exported
On AMD hardware, it's possible to export a separate alpha channel for
applying alpha-to-one after alpha-to-coverage and not before.

On GFX11+, it's already mostly supported but alpha needs to be exported
to MRTZ.a and one to MRT0.a. The hw always uses alpha for
alpha-to-coverage from MRTZ.a.

On older generations, the driver needs the same separate alpha export
but it also needs to configure the hardware with COVERAGE_TO_MASK_ENABLE
which selects alpha from MRTZ.a.

This should fix alpha-to-coverage with alpha-to-one when either
depth, stencil or samplemask are exported but it still needs a slightly
different solution without MRTZ. I will fix that later.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32523>
2024-12-11 10:50:31 +00:00
Samuel Pitoiset
70047e6bd6 aco: export alpha to MRTZ.a and one to MRT0.a for alpha-to-one on GFX11
For FS epilogs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32523>
2024-12-11 10:50:31 +00:00
Samuel Pitoiset
1037830098 ac/nir: export alpha to MRTZ.a and one to MRT0.a for alpha-to-one on GFX11
When alpha-to-coverage and alpha-to-one are both enabled in the
fragment shader, the alpha value should be exported through MRTZ and
one to MRT0.a. Otherwise, alpha-to-one will be performed before
alpha-to-coverage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32523>
2024-12-11 10:50:31 +00:00
Samuel Pitoiset
3b010a9e60 radv: disable alphaToOne except for Zink
It's just completely broken if alpha-to-coverage is also used. Given
this is a requirement for Zink and no known GL apps are affected, let's
disable for everything except Zink. This is going to be fixed but the
fixes aren't small enough for backporting.

This fixes a rendering issue with XPlane 12.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32576>
2024-12-11 08:28:25 +00:00
Samuel Pitoiset
310e03c8d3 radv/meta: move vk_meta_device_init() to radv_device_init_meta()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32571>
2024-12-11 07:25:29 +00:00
Samuel Pitoiset
cad6e1ea09 radv/meta: add missing vk_meta_device_finish()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32571>
2024-12-11 07:25:29 +00:00
Martin Roukala (né Peres)
b8054556a0 radv/ci: update the vkcts expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
df5fb64f48 zink/ci: update the radv expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
fe900be2b6 zink/ci: update the nvk-ga106 expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
427f36ced9 nvk/ci: update the ga106 expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
16e364e7d9 turnip/ci: skip a vkd3d test that causes a GPU hang on a750
This will hopefully allow the whole test suite to run.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
56b72144e5 turnip/ci: bump the vkcts a750 timeout by 15 minutes
This fixes spurious fails due to exceeding the timeout seconds ahead of
finishing the job :s

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
c4012f9adc turnip/ci: document the a750-vkcts expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
8dc307cdc2 freedreno-ci: document a a750-gl flake
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
654d5049d4 freedreno-ci: document more a618-gl flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
David Heidelberg
da69369382 ci/freedreno: increase Adreno 618 timeout to 1h
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
David Heidelberg
4cb139cc6a ci/freedreno: update Adreno 306 expectations
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Dave Airlie
699afb88ec radv/video: set max slice counts to 1 for h264/5 encode
Right now the driver doesn't support multi-slice encodes, so
report the correct value.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Autumn Ashton
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32580>
2024-12-11 01:11:32 +00:00
Simon Ser
34e6932eaa llvmpipe: handle llvmpipe_resource_map() errors
llvmpipe_resource_map() may fail, e.g. when the DMA-BUF cannot be
mmap'ed. Handle the error, either by returning NULL or by asserting.
Asserting is done in places where there is no good way to bubble up
the error (and is done in other places already, e.g. in
init_scene_texture).

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32537>
2024-12-10 22:05:19 +00:00
Sil Vilerino
ce1aad4505 vl/vl_winsys: Add missing include for function declaration
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12150
Fixes: 2548471ca1 ("vl/vl_win32_screen_create_from_d3d12_device: Allow winsys to be injected")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32559>
2024-12-10 21:29:15 +00:00
Georg Lehmann
e8b29abb25 nir: add unsigned upper bound support for fsat
Foz-DB Navi21:
Totals from 89 (0.11% of 79395) affected shaders:
Instrs: 97018 -> 96995 (-0.02%)
CodeSize: 492996 -> 492488 (-0.10%)
Latency: 504649 -> 504555 (-0.02%)
InvThroughput: 121968 -> 121875 (-0.08%)
VALU: 67427 -> 67404 (-0.03%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
2024-12-10 20:53:53 +00:00
Georg Lehmann
e78e63e3fe nir: add unsigned upper bound support for f2i32
Foz-DB Navi21:
Totals from 649 (0.82% of 79395) affected shaders:
CodeSize: 2330592 -> 2314112 (-0.71%)
Latency: 2068161 -> 2053370 (-0.72%)
InvThroughput: 346583 -> 329425 (-4.95%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
2024-12-10 20:53:53 +00:00
Georg Lehmann
0b366a7ab2 nir/uub: properly limit float support to 32bit
Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
2024-12-10 20:53:53 +00:00
Caio Oliveira
638802d68f intel/brw: Dump errors when brw_assemble() fails EU validation
This will allow executor to show proper inline errors.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32490>
2024-12-10 20:23:25 +00:00
Job Noorman
9052ad449b ir3/isa: fix conflict between stib.b and stsc
stsc was using don't care bits in a position position that is
significant for stib.b.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 11b2c54a9a ("ir3/a7xx: Add STSC definition")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32575>
2024-12-10 19:48:45 +00:00
Jesse Natalie
727c5a531e microsoft/clc: Initialize printf buffer for tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
83dd4889a7 nir/lower_point_size: skip non-var derefs
these can happen depending on pass order, otherwise we crash on the null
pointer.

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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
a667a5a5d6 vulkan: add vk_check_printf_status helper
to integrate debug printf/abort, vulkan drivers need to implement a device
status. we would need to thicken the runtime to do that entirely in common code,
but we can at least add a helper to make it easier for vk drivers to wire.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
33d839a72a util/printf: add context-ful helpers
drivers wishing to integrate driver CL printf/abort have to do some delicate
dances to maintain the data structure with the buffer size and abort flag. wrap
it all up in common helpers -- the driver just supplies the memory allocation
and calls in periodically.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
85e06f5a55 util/printf: be robust against truncated buffers
this can happen with shader aborts. don't blow up with theatrics.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
69a0962c70 nir/lower_printf: use 64-bit math
this lets load_store_vectorize vectorize the stores we produce. it also matches
actual OpenCL kernel code looks, so drivers need to have an optimized path for
these 64+32 patterns regardless.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
da967416db nir/lower_printf: use unsigned math
negative offsets/sizes don't make sense, and zero-extension is often easier
to optimize/lower than sign-extension.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
8db0751eb8 nir/lower_printf: lower aborts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
0b9072e2e5 nir/lower_printf: allow fixed address
fixed address printf buffers can avoid a lot of complexity, especially with the
general case of (e.g.) DGC-enqueued precompiled kernels. so add a knob for that
and save the driver the need to write a lowering pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
816c14d33d nir: add printf_abort intrinsic
abort() for the gpu, implemented with the printf infrastructure since they go
together.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/32564>
2024-12-10 19:13:07 +00:00
Tapani Pälli
03c9f164e8 drirc/anv: force_vk_vendor=-1 for Marvel Rivals
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12280
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32555>
2024-12-10 18:30:48 +00:00
Alyssa Rosenzweig
f2f5e634bb vulkan: bump layer api versions
these need to be kept in sync to avoid loader splat.

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/32557>
2024-12-10 17:17:12 +00:00
Georg Lehmann
7bb3f93fa9 radv: use nir_opt_clip_cull_const
This reduces the fixed function hardware bottleneck in vertex shading
heavy sections with d3d9 DXVK.

DXVK always declares 6 clip distances, and with
https://github.com/doitsujin/dxvk/pull/4508
it writes 0 for disabled clip planes.

But while working on this, I also discovered that other games also write
constant clip/cull distances:

Foz-DB Navi21:
Totals from 442 (0.56% of 79206) affected shaders:
MaxWaves: 10880 -> 10900 (+0.18%)
Instrs: 283569 -> 282493 (-0.38%); split: -0.38%, +0.01%
CodeSize: 1497596 -> 1491948 (-0.38%); split: -0.38%, +0.00%
VGPRs: 18928 -> 18888 (-0.21%)
Outputs: 3026 -> 2970 (-1.85%)
Latency: 1051990 -> 1048878 (-0.30%); split: -0.47%, +0.18%
InvThroughput: 184190 -> 183366 (-0.45%); split: -0.45%, +0.01%
VClause: 6071 -> 6077 (+0.10%); split: -0.38%, +0.48%
SClause: 6724 -> 6725 (+0.01%); split: -0.12%, +0.13%
Copies: 19624 -> 19160 (-2.36%); split: -2.44%, +0.08%
PreSGPRs: 18634 -> 18526 (-0.58%)
PreVGPRs: 15522 -> 15465 (-0.37%)
VALU: 156964 -> 156330 (-0.40%); split: -0.41%, +0.01%
SALU: 41802 -> 41748 (-0.13%); split: -0.13%, +0.00%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32518>
2024-12-10 16:35:01 +00:00
Georg Lehmann
c5c22fc3a3 nir: add constant clip/cull distance optimization
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/32518>
2024-12-10 16:35:01 +00:00
Georg Lehmann
4f88dbffa4 radv: track holes in the clip/cull masks
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/32518>
2024-12-10 16:35:01 +00:00
Erik Faye-Lund
5a06e75d4d panvk/ci: update g610 results
Seems like the multiview feature unlocked some tests that triggers a
previously unknown bug. This results in an assert triggering, but that
reveals a real, underlying issue.

A few of these doesn't trigger the assert, but still fails due to a GPU
hang.

Let's mark all of these as failures, to avoid holding back other MRs in
the mean time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32574>
2024-12-10 13:08:27 +00:00
Erik Faye-Lund
fc580a7b6e panvk/ci: update g52 results
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32574>
2024-12-10 13:08:27 +00:00
Georg Lehmann
4a977ea24f aco/gfx11+: use v_and_b32 to extract local id 0
Foz-DB Navi31:
Totals from 2561 (3.23% of 79206) affected shaders:
CodeSize: 10399004 -> 10389120 (-0.10%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32532>
2024-12-10 11:58:21 +00:00
Jordan Justen
1027b071f9 intel/dev: Add intel_check_hwconfig_items()
Rather than checking hwconfig items when using them, wait until after
devinfo has been fully initialized. This includes having workarounds
implemented.

We can then check if the hwconfig data and final Mesa initialization
agree. If the match fails, we need to investigate if Mesa or the
hwconfig data is wrong.

This code becomes a no-op when not on a release build.

Fixes: a4c5bfd34c ("intel/dev: Use hwconfig for urb min/max entry values")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/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/32359>
2024-12-10 09:01:45 +00:00
Jordan Justen
4eb10bc25e intel/dev: Don't process hwconfig table to apply items when not required
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/32359>
2024-12-10 09:01:45 +00:00
Jordan Justen
5a8107cef4 intel/dev: Split apply and check paths for hwconfig
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/32359>
2024-12-10 09:01:45 +00:00
Jordan Justen
832de579e1 intel/dev: Split hwconfig warning check into hwconfig_item_warning()
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/32359>
2024-12-10 09:01:45 +00:00
Karmjit Mahil
3f18c91a0b util/idalloc: Minor refactor of util_idalloc_foreach()
Changes the `for` loop code to be similar to
`util_idalloc_forach_no_zero_safe()` for cohesion.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32546>
2024-12-10 08:29:00 +00:00
Karmjit Mahil
af346cd77f util/idalloc: Fix util_idalloc_foreach() build issue
Currently `util_idalloc_foreach()` isn't being used in the codebase
but if used it causes a build error as `num_used` doesn't exist.
Fix that by using `num_set_elements`.

Fixes: 0589dfe4e2 ("util/idalloc: optimize foreach by tracking the greatest non-zero element")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32546>
2024-12-10 08:29:00 +00:00
Erik Faye-Lund
03fc483813 panvk: expose EXT_4444_formats
We already have all the bits wired up to support both
VK_FORMAT_A4R4G4B4_UNORM_PACK16 and VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT
from VK_EXT_4444_formats, and were already setting the feature-flags for
them.

Let's also expose the extension, which should just work.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32083>
2024-12-09 21:16:04 +00:00
Erik Faye-Lund
0688b0002a panfrost: add missing 4-bit formats
We were missing a couple of 4-bit formats, let's add them.

Vulkan 1.0 already requires VK_FORMAT_B4G4R4A4_UNORM_PACK16, which mapes
to PIPE_FORMAT_A4R4G4B4_UNORM, which we're currently missing support for.

But we can also support VK_FORMAT_R4G4B4A4_UNORM_PACK16, which maps to
PIPE_FORMAT_A4B4G4R4_UNORM. This format is optional, but there's no
reason we shouldn't expose support for it.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32083>
2024-12-09 21:16:04 +00:00
Erik Faye-Lund
6dab5fe0cd panfrost: match 4-bit format order
It's a bit easier to match things between the format and blendable
format arrays if the specific formats are somewhat similarly ordered. So
let's sort the various 4 bits per component formats to match.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32083>
2024-12-09 21:16:04 +00:00
Benjamin Lee
b01afd06cd nir: update docs for nir_get_io_arrayed_index_src
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
76b28c19fa panvk: add note about pan_lower_store_component requirements
This tripped me up in the multiview implementation. The commit message
that introduced the pass mentioned that we're relying on
nir_lower_io_to_temporaries, but this was dropped when it was copied to
the comment block.

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/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
e8d67f1f6a panvk: advertise multiview support on v10+
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/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
cc22061878 panvk: disable position fifo optimization when multiview enabled
Without multiview, a shader that doesn't write to the any of the
extended FIFO attributes (pointsize and layer) can be used with either
FIFO format. This allows us to switch to the basic FIFO format when
using the no_psiz variant. In multiview vertex shaders, output offsets
depend on the FIFO format. Instead of trying to patch these in the
no_psiz variant, just don't do the optimization for now.

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/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
f2b7217197 panvk: only clear enabled views
Two components to this: first we only issue fragment jobs for enabled
views. This prevents disabled layers from being cleared implicitly with
`LOAD_OP_CLEAR`, and also reduces overhead (these layers have no
primitives so the fragment job is wasted work). Second is hooking up the
view mask to vk_meta_clear.

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/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
448b5e0225 panvk: implement multiview support
In Valhall multiview, position/varying shaders are invoked once per
draw. Each invocation write separate outputs for all views. Fragment
processing is handled by the existing multilayer support. Note that
because the hardware only supports up to 8 views, we don't have to care
about the case where there are too many layers to fit in one tiler when
multiview is enabled.

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/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
74ccf6cbdc nir: add option to use compact view indices
In panvk we pass absolute view indices to the hardware, so we need to do
the conversion from compacted to absolute at some point. Emitting
absolute indices from nir_lower_multiview initially looks like the
simplest option, but nir_lower_io_to_temporaries will emit a write for
every element of array varyings. This results in unnecessary writes to
disabled views.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
becb014d27 nir: treat per-view outputs as arrayed IO
This is needed for implementing multiview in panvk, where the address
calculation for multiview outputs is not well-represented by lowering to
nir_intrinsic_store_output with a single offset.

The case where a variable is both per-view and per-{vertex,primitive} is
now unsupported. This would come up with drivers implementing
NV_mesh_shader or using nir_lower_multiview on geometry, tessellation,
or mesh shaders. No drivers currently do either of these. There was some
code that attempted to handle the nested per-view case by unwrapping
per-view/arrayed types twice, but it's unclear to what extent this
actually worked.

ANV and Turnip both rely on per-view outputs being assigned a unique
driver location for each view, so I've added on option to configure that
behavior rather than removing it.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
6d843cde45 nir: document index semantics in nir_lower_multiview
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
975c3ecd1e nir: handle arbitrary per-view outputs in nir_lower_multiview
This is needed for panvk, where multiview is "all or nothing". When
multiview is enabled, all outputs may be written with separate values
for each view.

The edge case mentioned in the previous `nir_can_lower_multiview` is now
handled because we now handle an arbitrary number of per-view output
vars instead of expecting to find exactly one.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Mi, Yanfeng
06d3eb8e01 anv:increase instruction heap to 3Gb
Black Myth Wukong is generating more than 2Gb of shaders in
pre-compiling stage after VK_EXT_shader_image_atomic_int64 extension
enabled. Driver will crash in create shader stages due to dereference
null pointer of kernel map.

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32548>
2024-12-09 19:14:38 +00:00
Mi, Yanfeng
0a5a04f509 anv:Fix memory grow calculation overflow issue
when old buffer size is large than 2G, 32bit cannot hold
2 times buffer size (>4G).

Fixes: 8d813a90d6 ("anv: fail pool allocation when over the maximal size")

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32551>
2024-12-09 18:49:17 +00:00
Samuel Pitoiset
a653654b8d radv: dump the Mesa version with RADV_DEBUG=hang
This was missing and it can be very useful to know.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32560>
2024-12-09 18:25:24 +00:00
Samuel Pitoiset
9d2b548825 radv: only dump device name info on Linux with RADV_DEBUG=hang
Doesn't make sense on Windows.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32560>
2024-12-09 18:25:24 +00:00
Samuel Pitoiset
e3d1f27b31 radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle
Likely a game bug but can't be 100% sure because the game uses RT by
default and renderdoc still doesn't have support for it.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32528>
2024-12-09 17:52:43 +00:00
Valentine Burley
1798809985 panfrost/ci: Turn redundant GLESCTS-full run into disabled Piglit job
The panfrost-g610-gl-full:arm64 was identical to the merge job,
panfrost-g610-gl:arm64. Turn the -full job into a Piglit job,
but keep it disabled until it gets more stable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32554>
2024-12-09 17:22:13 +00:00
Rhys Perry
033e76a82a ac/nir: have ac_nir_lower_mem_access_bit_sizes preserve >128 bit SMEM
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/32408>
2024-12-09 16:56:29 +00:00
Rhys Perry
77f8436c62 radv: skip loading unused push constants
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/32408>
2024-12-09 16:56:29 +00:00
Rhys Perry
2e63da865b radv: fix expanded push constant loads when all are inlined
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/32408>
2024-12-09 16:56:29 +00:00
Rhys Perry
0ccea63b6a radv: constant fold after lowering memory accesses
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/32408>
2024-12-09 16:56:29 +00:00
Paulo Zanoni
0dc2a5808e brw: don't forget the base when emitting SHADER_OPCODE_MOV_RELOC_IMM
The last argument seems to be used as brw_shader_reloc::delta (from
brw_add_reloc), and we're unconditionally setting it to 0 here, while
the other place where we handle nir_intrinsic_load_reloc_const_intel
seems to be setting the base appropriately.

I found this by inspection while debugging a bug related to this code,
so I'm not aware of any workloads that get improved by this patch.

Related patches:
 - ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
 - 99047451c9 ("intel/fs: add plumbing for embedded samplers")

Fixes: ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
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/32531>
2024-12-09 15:45:49 +00:00
Valentine Burley
4379545117 amd/ci: Increase fraction for radeonsi-raven-piglit
This job was taking longer than 10 minutes, so increase the
fraction of the quick_shader piglit profile to get the runtime
within acceptable limits.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:37 +00:00
Valentine Burley
a3d599e932 amd/ci: Convert LAVA RADV jobs to deqp-runner suites
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:37 +00:00
Valentine Burley
63b4765114 amd/ci: Merge and convert Raven piglit testing
Converting to deqp-runner suite allows merging the two jobs running
the two piglit profiles for more even distribution and granular
control of runtime.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:37 +00:00
Valentine Burley
e26391f7ff amd/ci: Drop x86_64 suffix from job names
These added no value and made the names unnecessarily long.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:36 +00:00
Lionel Landwerlin
de00fe3f66 anv: add BVH building tracking through u_trace
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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/32483>
2024-12-09 14:45:00 +00:00
Lionel Landwerlin
719e4dfa66 vulkan: track encode step of the BVH building
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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/32483>
2024-12-09 14:45:00 +00:00
Lionel Landwerlin
4c32469fa4 vulkan: add an enum for the build step
For Anv this will make more sense than strings.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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/32483>
2024-12-09 14:45:00 +00:00
Lionel Landwerlin
877a296b2c vulkan: make acceleration structure debug markers virtual
Not every implementation supports VK_EXT_debug_marker.
VK_EXT_debug_utils is also pretty similar, it would be nice to plug
into whatever is available.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
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/32483>
2024-12-09 14:45:00 +00:00
Karmjit Mahil
fd1511e42e ir3: Fix some Wsign-compare when compiling a generate-rd.cc
Fix a bunch of `warning: comparison of integer expressions of different
signedness: 'int' and 'long unsigned int' [-Wsign-compare]` which
appeared when compiling a rddecompiled generate-rd.cc .

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32503>
2024-12-09 14:18:15 +00:00
Karmjit Mahil
c22f88cbcf freedreno/rddecompiler: Fix some unsused function warnings
Some of the functions defined in the header might not be used
by the `generate-rd.cc` file being compiled so add `UNUSED`
to them.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32503>
2024-12-09 14:18:15 +00:00
Karmjit Mahil
0bbcb1f6f7 freedreno/rddecompiler: clang-format fix
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32503>
2024-12-09 14:18:14 +00:00
Hans-Kristian Arntzen
81526187a8 wsi/x11: Do not use allocation callbacks on a thread.
This is banned by spec.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32508>
2024-12-09 13:43:34 +00:00
Erik Faye-Lund
19ac94d68b panvk/ci: add a full panvk job
This allows us to collect accurate CI expectations.

A full run takes around 45 minutes per job, and spawns 5 jobs. Let's set
the timeout to 1.5 hours, to give some headroom.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
93ae871c75 panvk/ci: add a few flakes
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
6410bdd61b panvk/ci: update ci results for g610
This is based on doing full runs, and reveals some things we've missed
in pre-merge CI due to fractions.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
9e0e607809 panvk/ci: add some missing skips
There's a few more tests that takes more than 30 seconds, so let's skip
those as well. Some of them even occasionally take more than 60 seconds.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
68203caa08 panvk/ci: remove duplicate skips
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
853285aedd panvk/ci: correct name of skips-file
The slips-file should use the plural form of skip, otherwise it doesn't
end up being used.

We also had some tests that were supposed to be skipped in the expected
failures. Let's remove them, and add a new failure that should have been
turned into a skip to the list as well.

Fixes: eff8a3517d ("panvk: Enable CI on G610")
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
1ef21fa004 panvk, nvk: spell width correctly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32499>
2024-12-09 12:14:04 +00:00
Lars-Ivar Hesselberg Simonsen
5e5f4432cf panvk: Remove ZS texture_swizzle_replicate_x
The texture_swizzle_replicate_x functionality appears not to be required
for Vulkan anymore, so let's remove it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:20:07 +01:00
Lars-Ivar Hesselberg Simonsen
12f69d26dc panfrost: Standardize naming of sampler reswizzle
This aligns the functions for reswizzling the sampler with the
equivalent functionality in texture for easier grepping.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:31 +01:00
Lars-Ivar Hesselberg Simonsen
3a187036f0 panfrost: Decouple reswizzling from texture build
Move the decision on whether to enable AFBC reswizzle in the texture
descriptor from the shared function to the upper layers, as that allows
each API flexibility in when to apply it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:28 +01:00
Lars-Ivar Hesselberg Simonsen
d83e374150 panfrost: Limit reswizzle to AFBC formats
The texture/sampler reswizzle is implemented to allow AFBC for non
canonical component order formats, but it's enabled regardless of
whether the format supports AFBC.

Limit the reswizzling to only apply to formats that support AFBC.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:24 +01:00
Lars-Ivar Hesselberg Simonsen
afbcf675c5 panfrost: Only allow AFBC(RGB) and AFBC(BGR) on v7
The AFBC texture/sample reswizzle will not work for formats with
component orders that are not canonical or RB-swapped, as moving the
alpha channel breaks opaque black border-colors.

Disable AFBC for formats with other component orders than RGB and BGR on
v7.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:21 +01:00
Lars-Ivar Hesselberg Simonsen
1aa3bb4e22 panvk: Disable AFBC for mutable formats on v7
As v7 only allows AFBC for RGB and BGR component swizzles, we'll need to
disable AFBC in case an image is created with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT as we can no longer ensure they
adhere to this limitation.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:17 +01:00
Lars-Ivar Hesselberg Simonsen
86527273b9 panfrost: Disable AFRC texture/sampler reswizzle
There should be no limitation on component order support for AFRC, so
the reswizzling of texture/sampler should not be necessary in this case.

For PanVK, only the texture reswizzling was implemented (with the
equivalent sampler reswizzling missing), so removing it allows us to
pass various border-color tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:05 +01:00
Boris Brezillon
81d0c24e2f panvk: Ignore the view aspects when dealing with depth/stencil attachments
The spec says:
"
  When an image view of a depth/stencil image is used as a
  depth/stencil framebuffer attachment, the aspectMask is
  ignored and both depth and stencil image subresources are used.
"

Make sure we do that when initializing depth/stencil attachments.

Fixes the
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.*.subpass_count_*.d24_unorm_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.*.subpass_count_*.d32_sfloat_s8_uint
failures.

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/32379>
2024-12-09 08:24:22 +00:00
Boris Brezillon
ccced641b5 vk/meta: Pass depth/stencil attachments only when a clear is requested
If we pass both, and only one of them is cleared, the other aspect might
be disturbed if the format contains both aspects.

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/32379>
2024-12-09 08:24:22 +00:00
Boris Brezillon
63b99fde38 panvk: Move the descriptors preparation out of CreateImageView()
Let's try to make the CreateImageView() function shorter by moving
the descriptors preparation to sub-functions.

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/32379>
2024-12-09 08:24:21 +00:00
Dave Airlie
a0918ca13d lavapipe: fix beta build due to changes in AMDX ext
This is probably not correct, but this needs an overhaul,
fixes the -Dvulkan-beta=true build.

Fixes: fcaf0f2590 ("vulkan: update to 302 headers for av1 encode")
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32520>
2024-12-09 06:30:32 +10:00
GKraats
bed66430ab i915g: fix glClearColor using a 1 byte color format
Unscissored glClearColor is using i915_fill_blit().
Clearing can be done with the 1 byte formats
GL_ALPHA, GL_LUMINANCE or GL_INTENSITY.
Routine i915_fill_blit() is called with a rgba-mask containing
1 byte, but it is handling this as a 2-byte color.
This fix adds the needed 1 byte setup to both
i915_fill_blit() and i915_copy_blit().

It solves 1 piglit-test concerning arb_clear_texture-base-formats
and 15 tests concerning fbo-clear-formats.

No regression is shown at other piglit-tests.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32178>
2024-12-08 17:33:27 +01:00
liuqiang
8dda40c6e9 d3d10umd: Modify comment
Modify comments that do not match

Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Max Ramanouski <max8rr8@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32294>
2024-12-07 07:05:27 +00:00
José Roberto de Souza
2aae000edb intel/dev/xe: Fix size of eu_per_dss_mask
Real Xe KMD actually returns a uint64, so here changing from uint32
to uint64.

Fixes: 04bdbeec31 ("intel/dev/xe: Fix access to eu_per_dss_mask")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32527>
2024-12-06 19:52:50 +00:00
Alyssa Rosenzweig
972f8aa287 vulkan: rename depth bias graphics states
"constant" is a special keyword in OpenCL C, and we'd like to #define it
suitably in host C23 to facilitate compatiblity between host/device headers.
That means we can't have any identifiers named "global" or "constant".
Fortunately, this is the only 'constant' in any file I'm hitting.

To avoid the clash, don't abbreviate "constant factor", use "constant_factor"
instead. For consistency, "slope factor" then becomes "slope_factor".
The new names are longer but match the Vulkan API exactly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [Intel]
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> [NVK and panvk]
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [V3DV]
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com> [IMG]
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Alyssa Rosenzweig
c6021bd83c libagx: remove redundant source files
depfiles handles now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Alyssa Rosenzweig
11fc604f0e libagx: switch to depfile support
this fixes a lot of weirdness with #including common headers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Alyssa Rosenzweig
3d35ea6a6b mesa_clc: add depfile support
This allows the tool to tell ninja what headers it read, so ninja can
correctly rebuild when necessary.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Dylan Baker
33a1acb0da clc: Tell clang to track imported dependencies
Clang is capable of tacking what headers it imports, as long as we set
it up to do that. While that isn't important for rusticl, it would be
useful for the various `_clc` tools, as they can then tell Ninja which
headers they read to make rebuilds more reliable.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Nanley Chery
483c40a21d anv: Allow compressed memtypes with default buffer types
Source 2 games segfault if certain buffers are not able to use the same
memory types as images. CS2 specifically expects this to be the case for
vertex and index buffers (VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT,
VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT). I have not tested other Source 2
games to see how much the requirement differs for the usage (if at all).

Up until now, we've disabled CCS for the Source 2 engine with the
anv_disable_xe2_ccs driconf option. However, this option is not great
for performance. So, replace this with a new option to allow the same
memory types we use for images on buffers - anv_enable_buffer_comp.

Compression of buffers is generally not good for performance. I
collected the result of unconditionally enabling the feature in the
performance CI on BMG. I used the default configuration to average the
result of two runs of each trace.

The CI reports that 4 game traces would regress between 0.44-1.01% FPS
with buffer compression. However, the CI actually shows it to be
beneficial in three of our game traces:

* Cyberpunk-trace-dx12-1080p-high 106.51%
* Hitman3-trace-dx12-1080p-med    101.59%
* Blackops3-trace-dx11-1080p-high 100.44%

So, enable the option for the two games we already have driconf entries
for, Cyberpunk and Hitman3.

Of course, also enable the option for Source 2 games. Casey Bowman
reports that on BMG, some frame times drop from ~15ms to ~7ms in CS2.
This is in large part due to the removal of HiZ resolves, which is a
consequence of the game now using of HIZ_CCS_WT instead of plain HIZ.

Ref: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11520
Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32519>
2024-12-06 17:21:06 +00:00
Martin Krastev
fec6ef6d7f svga/ci: drop FDO_CI_CONCURRENT to 1
* drop FDO_CI_CONCURRENT to 1; eliminate intermittent piglit concurrecy issues
* bump PIGLIT_FRACTION to 2; lowering concurrency increases exec time, so
  for now compensate with job fraction set to 50%
* triage piglit failures

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
82d2e1df6c svga/ci: update svga/ci KERNEL_TAG
A new kernel build was provided, update the KERNEL_TAG accordingly.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
2f3335d878 svga/ci: triage piglit failures
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
3cf17feb2a svga/ci: set vmware piglit job parallelism to 2
Job parallelism controls the number of DUTs employed by the job.
As vmware CI farm enabled multiple DUTs recently, bump this to 2
DUTs for the time being.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
5f31cec10a svga/ci: enable vmware farm
* enable vmware farm after maintenance
* update svga/ci KERNEL_TAG

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Tomeu Vizoso
da77188d7d etnaviv/ml: Implement FullyConnected
Lower FullyConnected to a regular convolution so it executes in the NN
cores.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32510>
2024-12-06 16:03:05 +00:00
Tomeu Vizoso
ad82a7c388 teflon: Add tests for FullyConnected
Same as we do with convolutions and additions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32510>
2024-12-06 16:03:05 +00:00
Tomeu Vizoso
3d8f108514 teflon: Add support for FullyConnected
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32510>
2024-12-06 16:03:05 +00:00
Tomeu Vizoso
3e74234450 etnaviv/ml: Add support for tensor padding operations
Just one more TP operation, at least for the pad modes supported.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32509>
2024-12-06 15:09:52 +00:00
Tomeu Vizoso
02e92bbcea teflon: Add support for tensor padding operations
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32509>
2024-12-06 15:09:52 +00:00
Daniel Schürmann
b64fff7731 aco: remove definition from Pseudo branch instructions
They are not needed anymore.

Totals from 7019 (8.84% of 79395) affected shaders: (Navi31)

Instrs: 14805400 -> 14824196 (+0.13%); split: -0.00%, +0.13%
CodeSize: 78079972 -> 78132932 (+0.07%); split: -0.01%, +0.08%
SpillSGPRs: 4485 -> 4515 (+0.67%); split: -0.76%, +1.43%
Latency: 165862000 -> 165836134 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 30061764 -> 30057781 (-0.01%); split: -0.01%, +0.00%
SClause: 392323 -> 392286 (-0.01%); split: -0.01%, +0.00%
Copies: 1012262 -> 1012234 (-0.00%); split: -0.04%, +0.04%
Branches: 365910 -> 365909 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 360167 -> 355363 (-1.33%)
VALU: 8837197 -> 8837276 (+0.00%); split: -0.00%, +0.00%
SALU: 1402593 -> 1402621 (+0.00%); split: -0.03%, +0.03%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
7e4687fd04 aco: remove definition from SOPP branch instructions
Totals from 17942 (22.60% of 79395) affected shaders: (Navi31)

Instrs: 20334063 -> 20312676 (-0.11%); split: -0.11%, +0.00%
CodeSize: 108458732 -> 108377540 (-0.07%); split: -0.08%, +0.00%
Latency: 180510540 -> 180479666 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 28079325 -> 28077938 (-0.00%); split: -0.01%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
cab5639a09 aco/assembler: chain branches instead of emitting long jumps
As regular branch instructions cannot jump further than
32768 dwords, previously we used long jumps as fallback
solution. The disadvantage of that is that an extra SGPR
pair must be provided in order to temporarily store the PC.

This patch changes that to chained branch instructions by
inserting an artificial extra block into the code to be
targeted by the original branch. This block contains a
single branch instruction jumping to the original target.
Before the block, if necessary, we insert a <branch 1>
instruction for the existing code in order to jump over
the newly inserted block.

Only a few RT shaders are affected.

Totals from 29 (0.04% of 79395) affected shaders: (Navi31)

CodeSize: 17281176 -> 17276332 (-0.03%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
c3d777d8ac aco/assembler: change ctx.loop_header to uint32_t instead of Block*
We are about to add new blocks during assembly which makes
pointers into a vector unreliable.
Also, only set it if the loop has no back-edge.

Totals from 126 (0.16% of 79206) affected shaders: (Navi31)

CodeSize: 1486152 -> 1488152 (+0.13%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
592f3fd994 aco/assembler: Actually insert s_inst_prefetch instructions when aligning blocks for loops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
b92afdbd28 aco/assembler: constify assembly functions
Ensure that instruction formats and special operands
are not manipulated during assembly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
3a02bbd916 aco/print_asm: allow for empty blocks with arbitrary offsets
We will add empty blocks at the end of the shader,
in order to store some branch offset information.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Rhys Perry
ab26b99c2c aco: don't CSE p_shader_cycles_hi_lo_hi
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: fae2a85d57 ("aco/gfx12: implement subgroup shader clock")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12243
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32500>
2024-12-06 14:06:05 +00:00
Tomeu Vizoso
6c70b10f03 etna/ml: Write out the size of the requested tensor
Instead of the size of its backing resource.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
fe08834004 teflon: Limit support for Add to two unpopulated tensors
As the only implementations depend of both inputs coming from
convolutions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
c2d1f08116 etnaviv/ml: Add support for tensor split and concatenation operations
Just point previous and further operations to offsets in a combined
tensor.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
4ced6480ea teflon: Add support for tensor split and concatenation operations
These are often use to reuse the output from a previous operation, or to
implement convolution groups.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
418f864ae4 etnaviv/ml: Take offsets into account in TP operations
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
566166b0aa etnaviv/ml: Fix in_image_slice in transposes when width != height
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
10bd5c23c6 etnaviv/ml: Specify which of the input tensors need transposing.
In preparation for operations that have more than one input that may
need transposing, such as Add.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Georg Lehmann
d47deba142 zink: spec@ext_framebuffer_multisample@blit-mismatched-formats was fixed
Fixed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32522>
2024-12-06 12:58:47 +00:00
Georg Lehmann
da4b9ac4a5 radeonsi/ci: add vangogh ubo fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32522>
2024-12-06 12:58:47 +00:00
Georg Lehmann
b2464e3609 aco/gfx12+: do not use v_pack_b32_f16 to pack untyped data
GFX12 removed IEEE_MODE, and made its signalling NaN quieting the default.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12251
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32502>
2024-12-06 12:33:05 +00:00
Georg Lehmann
7425e71ae0 aco/gfx12: disable vinterp ddx/ddy optimization
This only seems to work on gfx11 and gfx11.5, and it's only faster on gfx11.5.

We could continue to use vinterp, with constants copied to vgprs, but
whether that's beneficial depends on the shader.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12250
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32495>
2024-12-06 12:01:39 +00:00
David Rosca
3dd6ddde3b radeonsi/vcn: Cleanup JPEG supported formats
Stop reporting L8_UNORM as supported.
Remove unsupported IYUV, YV12, P010 and P016 formats from list,
add rest of the supported formats and add assert.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
22ced06ee6 radeonsi/vcn: Make sure JPEG target buffer format matches sampling factor
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
1a7d956c75 radeonsi/vcn: Gracefully handle decode errors and report to frontend
Previously it would print error message and then most likely crash later.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
9a3a1027a6 radeonsi/vcn: Unmap bitstream buffer in radeon_dec_destroy
If an error occured, the bitstream buffer may still be mapped when
calling radeon_dec_destroy and this would trigger assert when destroying
the bo.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
ed5794c5e3 radeonsi/vcn: Remove code handling buffer_get_virtual_address failure
buffer_get_virtual_address can't return zero.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
5f3a93dacf frontends/va: Move mjpeg sampling_factor to pipe_mjpeg_picture_desc
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
Benjamin Lee
7a9f14d3c2 panvk: advertise VK_EXT_provoking_vertex
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32273>
2024-12-06 10:40:03 +00:00
Benjamin Lee
fec20b26dd panvk: set provoking vertex in fbinfo
This must match the value set in TILER_CONTEXT. Fixes
dEQP-VK.rasterization.flatshading.*, which were failing previously
because we were setting first_provoking_vertex to true in the tiler
descriptor and false in fbinfo.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32273>
2024-12-06 10:40:03 +00:00
Benjamin Lee
c324790ca8 panvk: treat provoking vertex as dynamic state
Needed for VK_EXT_provoking_vertex, and makes the fbinfo provoking
vertex requirements easier to follow.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32273>
2024-12-06 10:40:03 +00:00
Benjamin Lee
c383859a07 panvk: refactor fbinfo into a temp var in get_tiler_desc
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-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/32273>
2024-12-06 10:40:03 +00:00
David Rosca
1a90c3102b radeonsi/vcn: Don't allow encoding H264 B-frame references
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12242

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32479>
2024-12-06 10:00:47 +00:00
David Rosca
cd8ad03364 frontends/va: Store picture type for buffers in encode DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32479>
2024-12-06 10:00:47 +00:00
Friedrich Vock
c2f8f20ef7 radv,driconf: Apply DOOM Eternal/idTech workarounds for Indiana Jones
It's based on idTech and exhibits the same idTech bugs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32521>
2024-12-06 09:21:17 +00:00
Karmjit Mahil
047049dcb5 nir: Fix the spelling of compare
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32189>
2024-12-06 08:42:36 +00:00
Karmjit Mahil
b79994e92d nir,ir3: Add icsel_eqz
In IR3 `sel.b32` works based on the 0 so add `icsel_eqz` to fuse the
cmp and sel that we'd otherwise need.

total Instruction Count in shared programs: 1112814 -> 1110473 (-0.21%)
Instruction Count in affected programs: 162701 -> 160360 (-1.44%)
helped: 81
HURT: 29
Instruction count are helped.

total MOV Count in shared programs: 86777 -> 88671 (2.18%)
MOV Count in affected programs: 28119 -> 30013 (6.74%)
helped: 1
HURT: 292
Mov count are HURT.

total COV Count in shared programs: 15070 -> 14962 (-0.72%)
COV Count in affected programs: 5770 -> 5662 (-1.87%)
helped: 76
HURT: 2
Cov count are helped.

total Last helper instruction in shared programs: 592729 -> 590638 (-0.35%)
Last helper instruction in affected programs: 91331 -> 89240 (-2.29%)
helped: 30
HURT: 1
Last helper instruction are helped.

total Instructions with SS sync bit in shared programs: 29336 -> 29546 (0.72%)
Instructions with SS sync bit in affected programs: 4702 -> 4912 (4.47%)
helped: 8
HURT: 43
Instructions with ss sync bit are HURT.

total Estimated cycles stalled on SS in shared programs: 111590 -> 112401 (0.73%)
Estimated cycles stalled on SS in affected programs: 27708 -> 28519 (2.93%)
helped: 21
HURT: 61
Estimated cycles stalled on ss are HURT.

total cat1 instructions in shared programs: 101933 -> 103695 (1.73%)
cat1 instructions in affected programs: 35804 -> 37566 (4.92%)
helped: 18
HURT: 290
Cat1 instructions are HURT.

total cat2 instructions in shared programs: 380299 -> 377499 (-0.74%)
cat2 instructions in affected programs: 128609 -> 125809 (-2.18%)
helped: 322
HURT: 0
Cat2 instructions are helped.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32189>
2024-12-06 08:42:36 +00:00
Karmjit Mahil
aad0aa0a9c nir/algebraic: turn u{ge,lt} a, 1 to i{ne,eq} a, 0
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32189>
2024-12-06 08:42:36 +00:00
Samuel Pitoiset
6b671d4dab radv: remove redundant drirc for incorrect dual-source blending
The pass that lowers PS outputs has been rewritten since 45d8cd037a
("ac/nir: rewrite ac_nir_lower_ps epilog to fix dual src blending
with mono PS") to handle invalid uses of dual-source blending.

This drirc used to workaround game bugs on GFX11 only should no longer
be necessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32514>
2024-12-06 07:54:23 +00:00
Ian Romanick
e1bb53bb3c nir/algebraic: Optimize some trivial bfi
In fossil-db, one big compute shader on Hogwarts Legacy is helped for
spills and fills. It has a lot of instances of bfi(0x3f, a, a).

On Tiger Lake and Skylake, a compute shader in Unicom that has a
single instance of this pattern is hurt for spills and fills. I think
this is just due to non-determinism in the register allocation
algorithm.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16992643 -> 16992548 (<.01%)
instructions in affected programs: 17533 -> 17438 (-0.54%)
helped: 33 / HURT: 0

total cycles in shared programs: 914313986 -> 914316238 (<.01%)
cycles in affected programs: 3734544 -> 3736796 (0.06%)
helped: 26 / HURT: 6

fossil-db:

Lunar Lake, Meteor Lake, DG2, and Ice Lake had similar results. (Lunar Lake shown)
Totals:
Instrs: 208952780 -> 208952537 (-0.00%)
Send messages: 10934879 -> 10934875 (-0.00%)
Cycle count: 30988230904 -> 30988228660 (-0.00%); split: -0.00%, +0.00%
Spill count: 534864 -> 534843 (-0.00%)
Fill count: 667081 -> 667068 (-0.00%)
Max live registers: 65686656 -> 65686624 (-0.00%)
Non SSA regs after NIR: 244185358 -> 244185335 (-0.00%)

Totals from 3 (0.00% of 704834) affected shaders:
Instrs: 4708 -> 4465 (-5.16%)
Send messages: 234 -> 230 (-1.71%)
Cycle count: 264382 -> 262138 (-0.85%); split: -0.88%, +0.03%
Spill count: 91 -> 70 (-23.08%)
Fill count: 73 -> 60 (-17.81%)
Max live registers: 647 -> 615 (-4.95%)
Non SSA regs after NIR: 3957 -> 3934 (-0.58%)

Tiger Lake
Totals:
Instrs: 230516919 -> 230515185 (-0.00%); split: -0.00%, +0.00%
Send messages: 12657684 -> 12657680 (-0.00%)
Cycle count: 23060318600 -> 23060279758 (-0.00%); split: -0.00%, +0.00%
Spill count: 548462 -> 548446 (-0.00%); split: -0.00%, +0.00%
Fill count: 582304 -> 582294 (-0.00%); split: -0.00%, +0.00%
Scratch Memory Size: 19538944 -> 19539968 (+0.01%)
Max live registers: 41713622 -> 41713593 (-0.00%)
Non SSA regs after NIR: 260667939 -> 260667712 (-0.00%); split: -0.00%, +0.00%

Totals from 174 (0.02% of 794323) affected shaders:
Instrs: 158346 -> 156612 (-1.10%); split: -1.13%, +0.04%
Send messages: 14330 -> 14326 (-0.03%)
Cycle count: 24859875 -> 24821033 (-0.16%); split: -0.32%, +0.16%
Spill count: 183 -> 167 (-8.74%); split: -9.29%, +0.55%
Fill count: 284 -> 274 (-3.52%); split: -7.39%, +3.87%
Scratch Memory Size: 9216 -> 10240 (+11.11%)
Max live registers: 12587 -> 12558 (-0.23%)
Non SSA regs after NIR: 164466 -> 164239 (-0.14%); split: -0.16%, +0.02%

Skylake
Totals:
Instrs: 158904982 -> 158903764 (-0.00%)
Send messages: 8490500 -> 8490496 (-0.00%)
Cycle count: 19732284279 -> 19732345496 (+0.00%); split: -0.00%, +0.00%
Spill count: 519127 -> 519115 (-0.00%)
Fill count: 594283 -> 594290 (+0.00%); split: -0.00%, +0.00%
Max live registers: 33708764 -> 33708739 (-0.00%)
Non SSA regs after NIR: 169377234 -> 169377007 (-0.00%); split: -0.00%, +0.00%

Totals from 174 (0.03% of 648725) affected shaders:
Instrs: 160391 -> 159173 (-0.76%)
Send messages: 14354 -> 14350 (-0.03%)
Cycle count: 24776486 -> 24837703 (+0.25%); split: -0.07%, +0.32%
Spill count: 332 -> 320 (-3.61%)
Fill count: 587 -> 594 (+1.19%); split: -0.17%, +1.36%
Max live registers: 12709 -> 12684 (-0.20%)
Non SSA regs after NIR: 166557 -> 166330 (-0.14%); split: -0.16%, +0.02%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32493>
2024-12-05 21:39:07 +00:00
José Roberto de Souza
04bdbeec31 intel/dev/xe: Fix access to eu_per_dss_mask
DRM_XE_TOPO_EU_PER_DSS and DRM_XE_TOPO_SIMD16_EU_PER_DSS can be any
number of bytes long but it was assuming it was always 4 bytes long.
That was not a issue because Xe KMD return 4 bytes even if only needs
1 or 2 bytes but that is a problem with our HW simulator that was
returning 2 bytes.

Fixes: a24d93aa89 ("intel/dev: Query and compute hardware topology for Xe")
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/32307>
2024-12-05 20:30:44 +00:00
Lionel Landwerlin
371b7a9b0d anv: set pipeline flags correct for imported libs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3d49cdb71e ("anv: implement VK_EXT_graphics_pipeline_library")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32507>
2024-12-05 19:53:34 +00:00
Lionel Landwerlin
6e396b400a anv: fix missing bindings valid dynamic state change check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ddd296cd3 ("anv: implement VK_EXT_vertex_input_dynamic_state")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32507>
2024-12-05 19:53:34 +00:00
Adam Jackson
266dfb15c1 docs/envvars: Combine WGL sections
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32316>
2024-12-05 19:46:38 +00:00
Adam Jackson
f447e31daa docs/envvars: Remove mention of IRIS_ENABLE_CLOVER
This went away when clover dropped nir driver support.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32316>
2024-12-05 19:46:38 +00:00
Eric R. Smith
a2f96667e2 mesa: update more drivers to handle pipe_blit_info swizzle_enable
Handle swizzling by falling through to the software path. Swizzle
should be rarely enabled, so this shouldn't affect performance in
most cases.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378>
2024-12-05 18:27:37 +00:00
Eric R. Smith
3da4a404ae aux: add support for dumping the swizzle in pipe_blit_info
Just some additional debug code for the new blit swizzle feature.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378>
2024-12-05 18:27:37 +00:00
Eric R. Smith
b81aefcc19 mesa: when blitting between formats clear any unused components
If the state tracker chooses to implement one format with a more
general one (e.g. GL_ALPHA implemented with GL_RGBA) we end up
in a situation where some components should be ignored. Readpix
handles this correctly, but blit does not, which means that if
we blit between different formats we can end up writing garbage
into some components. Work around this by adding an explicit
swizzle to the pipe_blit_info struct, which can re-arrange elements
and/or put 0 or 1 into appropriate channels, and use this to
set the appropriate values into unused channels via the sampler
view.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378>
2024-12-05 18:27:37 +00:00
Erik Faye-Lund
9f69f7a66d panvk: free preload-shaders after compiling
These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32486>
2024-12-05 17:45:16 +00:00
Erik Faye-Lund
43738a9a94 vulkan/meta: plug a couple of memory leaks
We create NIR shaders here, and we need to free them when we're done with
them as well.

These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 514c10344e ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32486>
2024-12-05 17:45:16 +00:00
Tomeu Vizoso
3aad0afc30 teflon/tests: Also use the cache for models in the test suite
To speed things up now that we have more models under testing.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:27 +00:00
Tomeu Vizoso
74239aeb77 teflon/tests: Add support for models with float inputs and outputs
Ended up deciding to drop C++ collections and use instead C pointers
because the template use was starting to get ridiculous.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:27 +00:00
Tomeu Vizoso
f21d8af43a teflon: Don't crash when a tensor isn't quantized
We don't support yet hardware that can deal with floats, but it is
better not to crash.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:27 +00:00
Tomeu Vizoso
a548b17b4e teflon: Rename model tests so they aren't skipped by gtest-runner
The regular expression engine in gtest-runner was matching more tests
than we wanted, so we weren't testing all we thought.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:26 +00:00
Tomeu Vizoso
1e117478d4 teflon: Support tests with inputs with less than 4 dims
Needed in models such as YOLOX.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:26 +00:00
Tomeu Vizoso
140150083e teflon: Add tests for the YOLOX model
The model was generated from:

https://github.com/Megvii-BaseDetection/YOLOXa (Apache License 2.0)

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:26 +00:00
David Rosca
8d3d35bf05 frontends/va: Add support for VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32113>
2024-12-05 16:34:09 +00:00
Lionel Landwerlin
80c0d2718c anv: report formats supported by the common bvh framework
Enables DXR 1.1 with vkd3d-proton

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge<sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32487>
2024-12-05 15:54:10 +00:00
Eric R. Smith
aba90c1523 panfrost: check afbc status in panfrost_query_compression_modifiers
In panfrost_query_compression_modifiers we need to ignore AFBC
modifiers if the device does not support AFBC. In order to avoid
duplicating code, we do this by calling panfrost_walk_dmabuf_modifiers
with a flag that indicates we do not want AFRC modifiers.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32406>
2024-12-05 14:54:09 +00:00
Marek Olšák
dfc2f054b6 radeonsi/ci: update navi31 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
ed4606a062 radeonsi/ci: remove --slow
The tests were split or reduced in glcts.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
c0ccae84a7 radeonsi/ci: remove most flakes and some skips, update navi31 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
af618dd907 radeonsi/ci: stop using a global flakes list, only use a per-chip flakes list
We need to start treating flakes as fails and they are likely different
between chips.

I removed the gfx9 flakes file and renamed the original flakes file
to gfx6-tahiti-flakes.csv, but it would be better to add a new flakes
file for each generation we test.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
3ff8111fc6 radeonsi/ci: handle glinfo errors better
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
738a501e92 radeonsi: don't compute total_direct_count in si_draw if it's unused
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
ed372d4b7c radeonsi: try to fix Navi14 regression in debug builds
Assertion failure:
    ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:1369: unsigned int si_get_input_prim(const
    si_shader_selector*, const si_shader_key*, bool): Assertion `gs->stage == MESA_SHADER_VERTEX' failed.

Fixes: 7e959864b2 ("radeonsi: enable NGG culling for non-monolithic TES and GS")

Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
a3c293cdcd radeonsi: revert to always returning true for load_cull_any_enabled_amd
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
511a637a5c radeonsi: pass cull face state via user SGPRs for shader culling
The culling code always computes the determinant for culling zero-area
triangles, so passing the state via user SGPRs doesn't really add much
shader code to justify having shader variants for front/back face
culling that uses the same determinant.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Alyssa Rosenzweig
ca9bf43d0b nir,asahi: make argument alignment configurable
this is more flexible. Mali needs 32-bit alignment, for example.

I added an option struct in case we need to make this a callback or something
later.

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/32398>
2024-12-05 10:58:51 +00:00
Alyssa Rosenzweig
0d77e91ca3 nir/opt_load_store_vectorize: match amul like imul
for AGX, we preserve amul all the way until fusing address modes in order to be
able to fuse effectively. so the load/store vectorizer wouldn't vectorize before
fusing.

however, after fusing we get fused intrinsics which are tricky to teach the
vectorizer about as their semantics are pretty subtle. so we can't vectorize
after, either.

the easiest solution is to teach the vectorize about amul, which can always be
replaced by imul for our pattern matches.

this fixes certain cases of vectorization in OpenCL kernels on asahi.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Alyssa Rosenzweig
77d4ed0a01 nir/opt_algebraic: optimize sign bit manipulation
libclc loves to generate the iand(0x7fffffff) pattern. ior/ixor patterns are
added for completeness.

Shaves 4 instructions off libclc vec4 normalize.

v2: Loop over the bit sizes (Georg).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> [v1]
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Alyssa Rosenzweig
be049e1c14 nir/search_helpers: handle bcsel in is_only_used_as_float
this lets algebraic see through chains of instructions.

v2: Limit recursion depth (Georg).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> [v1]
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Pavel Ondračka
ecc4d5da67 i915/ci: update CI expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32494>
2024-12-05 09:35:43 +00:00
Boris Brezillon
19231c7ae3 pan: s/NIR_PASS_V/NIR_PASS/
Move away from NIR_PASS_V() like other drivers have done long ago.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
b47cf63cca panvk: s/NIR_PASS_V/NIR_PASS/
Move away from NIR_PASS_V() like other drivers have done long ago.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
7e78aa73dd panfrost: Use nir_shader_intrinsics_pass() for the line_smooth lowering pass
We have a helper function to iterate only on intrinsics, so let's use it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
34beb93635 panfrost: s/NIR_PASS_V/NIR_PASS/
Move away from NIR_PASS_V() like other drivers have done long ago.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
98e3c1e6fb nir: Let nir_lower_texcoord_replace_late() report progress
Useful if we want to wrap this pass with a NIR_PASS() to enforce
validation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Samuel Pitoiset
ea112cf84d ci: update VKCTS main to a9f7069b9a5ba94715a175cb1818ed504add0107
This contains many more tests for Vulkan 1.4, but the Vulkan loader
probably needs an update too.

This should only affect RADV which is the only user for VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32475>
2024-12-05 08:06:23 +00:00
Samuel Pitoiset
8b755840fc radv: fix initializing HTILE when the image has VRS rates
VRS rates should only be preserved for clears, otherwise the HTILE
buffer should be cleared completely.

This fixes some failures/flakes in CI.

Fixes: 8197d744f5 ("radv: Do not overwrite VRS rates when doing fast clears")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32463>
2024-12-05 07:34:58 +00:00
Samuel Pitoiset
e73fdac9a6 radv: enable DGC IES for compute with ESO
This was supposed to be enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32484>
2024-12-05 07:06:17 +00:00
Simon Perretta
e26a383ee8 pco: fix x86 build
Use inttypes.h when printing variables whose format specifier changes
across different archs.

Fixes: 37d47913
Fixes: e67e4452
Closes: #12238
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32492>
2024-12-05 00:50:16 +00:00
Dylan Baker
43bdc84831 docs: update calendar for 24.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32491>
2024-12-05 00:43:50 +00:00
Dylan Baker
fd0da8eb80 docs: Add SHA sums for 24.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32491>
2024-12-05 00:43:50 +00:00
Dylan Baker
a3715349fd docs: add release notes for 24.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32491>
2024-12-05 00:43:50 +00:00
Ian Romanick
0754a18621 brw/copy: Allow copy prop into src1 of broadcast
This is the selector, and it must always be a uniform UD, so there's no
reason to not propagate into it.

No shader-db change on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 220507131 -> 220507127 (-0.00%)
Cycle count: 31607052398 -> 31607053364 (+0.00%); split: -0.00%, +0.00%

Totals from 5 (0.00% of 702410) affected shaders:
Instrs: 995 -> 991 (-0.40%)
Cycle count: 86392 -> 87358 (+1.12%); split: -0.07%, +1.19%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Ian Romanick
662339a2ff brw/build: Use SIMD8 temporaries in emit_uniformize
The fossil-db results are very different from v1. This is now mostly
helpful on older platforms.

v2: When optimizing BROADCAST or FIND_LIVE_CHANNEL to a simple MOV,
adjust the exec_size to match the size allocated for the destination
register. Fixes EU validation failures in some piglit OpenCL tests
(e.g., atomic_add-global-return.cl).

v3: Use component_size() in emit_uniformize and BROADCAST to properly
account for UQ vs UD destination. This doesn't matter for
emit_uniformize because the type is always UD, but it is technically
more correct.

v4: Update trace checksums. Now amly expects the same checksum as
several other platforms.

v5: Use xbld.dispatch_width() in the builder for when scalar_group()
eventually becomes SIMD1. Suggested by Lionel.

shader-db:

Lunar Lake, Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18091701 -> 18091586 (<.01%)
instructions in affected programs: 29616 -> 29501 (-0.39%)
helped: 28 / HURT: 18

total cycles in shared programs: 919250494 -> 919123828 (-0.01%)
cycles in affected programs: 12201102 -> 12074436 (-1.04%)
helped: 124 / HURT: 108

LOST:   0
GAINED: 1

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20480808 -> 20480624 (<.01%)
instructions in affected programs: 58465 -> 58281 (-0.31%)
helped: 61 / HURT: 20

total cycles in shared programs: 874860168 -> 874960312 (0.01%)
cycles in affected programs: 18240986 -> 18341130 (0.55%)
helped: 113 / HURT: 158

total spills in shared programs: 4557 -> 4555 (-0.04%)
spills in affected programs: 93 -> 91 (-2.15%)
helped: 1 / HURT: 0

total fills in shared programs: 5247 -> 5243 (-0.08%)
fills in affected programs: 224 -> 220 (-1.79%)
helped: 1 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 220486064 -> 220486959 (+0.00%); split: -0.00%, +0.00%
Subgroup size: 14102592 -> 14102624 (+0.00%)
Cycle count: 31602733838 -> 31604733270 (+0.01%); split: -0.01%, +0.02%
Max live registers: 65371025 -> 65355084 (-0.02%)

Totals from 12130 (1.73% of 702392) affected shaders:
Instrs: 5162700 -> 5163595 (+0.02%); split: -0.06%, +0.08%
Subgroup size: 388128 -> 388160 (+0.01%)
Cycle count: 751721956 -> 753721388 (+0.27%); split: -0.54%, +0.81%
Max live registers: 1538550 -> 1522609 (-1.04%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 241601142 -> 241599114 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 9631168 -> 9631216 (+0.00%)
Cycle count: 25101781573 -> 25097909570 (-0.02%); split: -0.03%, +0.01%
Max live registers: 41540611 -> 41514296 (-0.06%)
Max dispatch width: 6993456 -> 7000928 (+0.11%); split: +0.15%, -0.05%

Totals from 16852 (2.11% of 796880) affected shaders:
Instrs: 6303937 -> 6301909 (-0.03%); split: -0.11%, +0.07%
Subgroup size: 323592 -> 323640 (+0.01%)
Cycle count: 625455880 -> 621583877 (-0.62%); split: -1.20%, +0.58%
Max live registers: 1072491 -> 1046176 (-2.45%)
Max dispatch width: 76672 -> 84144 (+9.75%); split: +14.04%, -4.30%

Tiger Lake
Totals:
Instrs: 235190395 -> 235193286 (+0.00%); split: -0.00%, +0.00%
Cycle count: 23130855720 -> 23128936334 (-0.01%); split: -0.02%, +0.01%
Max live registers: 41644106 -> 41620052 (-0.06%)
Max dispatch width: 6959160 -> 6981512 (+0.32%); split: +0.34%, -0.02%

Totals from 15102 (1.90% of 793371) affected shaders:
Instrs: 5771042 -> 5773933 (+0.05%); split: -0.06%, +0.11%
Cycle count: 371062226 -> 369142840 (-0.52%); split: -1.04%, +0.52%
Max live registers: 989858 -> 965804 (-2.43%)
Max dispatch width: 61344 -> 83696 (+36.44%); split: +38.42%, -1.98%

Ice Lake and Skylake had similar results. (Ice Lake shown)
Totals:
Instrs: 236063150 -> 236063242 (+0.00%); split: -0.00%, +0.00%
Cycle count: 24516187174 -> 24516027518 (-0.00%); split: -0.00%, +0.00%
Spill count: 567071 -> 567049 (-0.00%)
Fill count: 701323 -> 701273 (-0.01%)
Max live registers: 41914047 -> 41913281 (-0.00%)
Max dispatch width: 7042608 -> 7042736 (+0.00%); split: +0.00%, -0.00%

Totals from 3904 (0.49% of 798473) affected shaders:
Instrs: 2809690 -> 2809782 (+0.00%); split: -0.02%, +0.03%
Cycle count: 182114259 -> 181954603 (-0.09%); split: -0.34%, +0.25%
Spill count: 1696 -> 1674 (-1.30%)
Fill count: 2523 -> 2473 (-1.98%)
Max live registers: 341695 -> 340929 (-0.22%)
Max dispatch width: 32752 -> 32880 (+0.39%); split: +0.44%, -0.05%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Ian Romanick
d2b266187d brw: Use resize_sources several more places
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Ian Romanick
12d1886b87 brw/lower: Don't "fix" regioning of broadcast
The next two commits modify the destination regioning in a way that,
which still correct, trigger assertion failures if we try to fix the
regioning here.

Broadcast gets lowered in brw_eu_emit. For the purposes of region
restrictions, let's assume that the final code emission will do the
right thing. Doing a bunch of shuffling here is only going to make a
mess of things.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Chia-I Wu
f9b41056e9 panvk: use cs_tracing_ctx::enabled for exception handler
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32469>
2024-12-04 23:47:07 +00:00
Chia-I Wu
50c3615115 panvk/csf: fix subqueue ctx memory pool
We want NC when tracing and cached when not tracing.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32469>
2024-12-04 23:47:07 +00:00
Chia-I Wu
c83b3de729 panvk/csf: fix SIMULTANEOUS_USE gpu faults
tracing_ctx is always non-NULL in issue_fragment_jobs.  Check
tracing_ctx->enabled instead.  This fixes GPU faults when the desc
ringbuf wraps.

Fixes: bd49fa68b0 ("panvk/csf: Use event-based CS tracing")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32469>
2024-12-04 23:47:07 +00:00
Caio Oliveira
cbc45ac99e intel/brw: Enable EU validation and compaction tests for PTL
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32195>
2024-12-04 23:03:11 +00:00
Erik Faye-Lund
1f294e808c panvk: expose KHR_dedicated_allocation
Caterina already implemented this in ed64fa034b ("panvk: never prefer or
require dedicated allocation for buffers") and dbdaefb6ed ("panvk: never
require dedicated allocation for images"), so let's flip the switch.

We pass 4505 of the CTS tests, and fail a single one. Let's mark that
one as an expected failure and move on for now.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32466>
2024-12-04 21:34:59 +00:00
Kai Wasserbäch
8a453669e2 fix(FTBFS): clc/clover: pass a VFS instance explicitly
This just replicates what upstream did before breaking mesa with commit
df9a14d7bbf and requiring a VFS instance.

Reported-by: @Lone_Wolf
Reference: <df9a14d7bb>
Closes: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/12223>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32439>
2024-12-04 19:55:56 +00:00
Sagar Ghuge
9afb0480c4 intel/compiler: Extend nir_intrinsic_load_topology_id_intel for xe3
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32426>
2024-12-04 19:20:51 +00:00
Caio Oliveira
369942b76c mr-label-maker: Rules for intel/executor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32198>
2024-12-04 19:14:02 +00:00
Jose Maria Casanova Crespo
d0f4d0b6d0 v3d/ci: update rpi expectations by last piglit uprev
Fixes: 52f13f5603 ("Uprev Piglit to 468221c722481c470e6a23760b914c33143c2af6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32482>
2024-12-04 16:57:24 +00:00
Karol Herbst
12752228db rusticl/util: rename Properties::from_ptr to new
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:08 +00:00
Karol Herbst
d791135df1 rusticl/api: remove Option around Properties
It already has the right semantics we are looking for.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:08 +00:00
Karol Herbst
825936b3f8 rusticl/util: make Properties::from_ptr unsafe
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
86453fe053 rusticl/api: use Properties for 0 terminated arrays consistently
Now that the semantics of Properties match exactly what we need here,
let's use it for all queries with 0 terminated arrays.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
976dd83a7a rusticl/api: simplify CLProp implementation of Properties
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
efab5cab9f rusticl/util: reimplement Properties over Vec of scalars
Tuples don't have a well defined layout, which might make it inefficient
to copy from.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
237f081866 rusticl/util: make Properties::props private
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
b4b01498a6 rusticl/util: add Properties::iter()
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
da5cf9414e rusticl/util: add Properties::is_empty() and len()
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
ef9910df4f rusticl/api: mark get_info and get_info_obj as unsafe
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
3692bb3429 rusticl/proc: make generated entry points unsafe
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
3a155a4591 rusticl/context: use write_iter for CL_DEVICES_FOR_GL_CONTEXT_KHR
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
86a279c36b rusticl/api: use constant arrays instead of Vecs for queries
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
67abda9fd5 rusticl/platform: pass the slice directly for CL_PLATFORM_EXTENSIONS_WITH_VERSION
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
379e72e7ed rusticl/program: use write_len_only for CL_PROGRAM_IL
The spec mandates that if the program object isn't created from IL, it
should not touch the buffer. Passing an empty slice would achieve that,
but it's better to be explicit here.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
69fd3a33dc rusticl/program: pass the slice directly for CL_PROGRAM_IL
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
ac292ad452 rusticl/program: use write_iter for CL_PROGRAM_DEVICES
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
aed4a7bf83 rusticl/program: use write_len_only for CL_PROGRAM_BINARIES
This query would simply write back the same content, so skip it.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
45af2e45f3 rusticl/api: add a write_iter variant for writing API properties
This allows us to get rid of temporary vectors or other allocations.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
26e08accca rusticl/api: add a write_len_only variant for writing API properties
For some queries we do not want to touch the buffer at all, this helps out
with that.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
008caff86d rusticl: rework query APIs
The old way was quite annoying as it required to create a Vec to even get
the size of the result causing needless computations.

This also meant that copying into the result buffer always required to go
through a byte Vec even though we could just do the copy directly.

The main idea here is that instead of returning the result, we simply call
into a write function giving us more flexibility here.

Potentially this will also allow us to add overloads for Iterators or to
even use closures in case the size calculation is cheaper than creating
the value just to get the size.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
6fd6de46dc rusticl/program: check if provided binary pointers are null
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Friedrich Vock
ff76d27554 vulkan/runtime/bvh: Set leaf_node_count for updates
Since the leaf node pass doesn't run for updates, leaf_node_count never
got set. This resulted in updates always running on 0 leaves (i.e. being
no-ops).

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32451>
2024-12-04 15:36:15 +00:00
Marek Olšák
3effa3d53b nir/lower_io_passes: lower indirect IO for TCS
nir_lower_io_to_temporaries doesn't do anything and gives up when it gets TCS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
943360c86b amd/ci: add piglit failures due to a overzealous test
It's missing: https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/976

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
f5a0cde125 nir/opt_varyings: fix compile failures in the disabled PRINT code
linkage is a pointer, but it was used as a structure.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
dd788d0a7f nir/opt_varyings: remove rare dead output stores after inter-shader code motion
Backward inter-shader code motion left dead output stores in the producer
in rare cases. Those dead stores would then make their way into drivers
and hw.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
f0c4e71d58 nir/opt_varyings: fix getting deref variables for sysvals
This might fix array system values. Noticed by luck.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
dcc679ab3a nir/opt_varyings: add inter-shader code motion for uniform/UBO indexing
If input_value, index, index1 or index2 is an input, here are examples of
code that this commit moves from consumers to producers:
* input_value * uniform_array[index]
* uniform_array[index]
* ubo[0].array[index]
* ubo[index].var
* ubo[index1].array[index2]

If the array index is computed from an input, it must be flat or convergent
within a primitive to be moved. If the array index is not an input, it must
be a uniform expression.

dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.dynamically_uniform_fragment
has UBO indexing that is moved to the producer by this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
f52ae35d73 nir/opt_varyings: propagate indirect uniform/UBO loads into the next shader
Uniform and UBO loads with non-constant indices are now propagated.
The majority of this code implements cloning deref chains.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
d8468d5463 amd,zink: remove options.varying_estimate_instr_cost callbacks
They are a maintainenance burden since they would need changes to
support more instruction types that nir_opt_varyings will be able to
move between shaders, and they are almost identical to
default_varying_estimate_instr_cost, so just use that.

The cost threshold is adjusted for AMD because
default_varying_estimate_instr_cost is slightly different.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
c0de78f120 nir/opt_varyings: change try_move_postdominator param to nir_instr type
We want more instructions to be movable, like
load_deref(var, index = load_input).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
8e39e8ed4d nir/opt_varyings: make top-level compaction code for TES, TCS, GS separate
Add a separate "if" block for each and use a helper for repeated code.
There will be more code added here that keeping TES, TCS, and GS compaction
code unified would be a mess.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
d20e07dbad nir/opt_varyings: fix max_slot for color varying compaction
It should be in units of slots. This was unlikely to break anything.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
69b1853ecf nir/opt_varyings: count the number of unused components for compaction correctly
Holes due to indirectly-indexed inputs were ignored, making the compaction
worse when such inputs were present alongside convergent inputs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
1aa9fec542 nir/opt_varyings: fix compaction with sparse indirect FS inputs
Without this, compaction can put inputs into vec4 slots already occupied
by indirectly-accessed inputs while ignoring their interpolation qualifier,
which is incorrect.

All input components sharing the same vec4 slot must use interpolation
qualifiers that are compatible with each other.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
b01f3cea7a nir/opt_varyings: remove redundant conditions from a while loop
Most of these conditions are repeated below with a continue statement.
This just puts break at the end where all of them are false.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
a618a2aa8b nir/linking_helpers: don't promote interpolated varyings to flat
Even the most flexible interpolation that we have in NIR options
(nir_io_has_flexible_input_interpolation_except_flat) doesn't allow
mixing flat and non-flat in the same vec4. This (legacy) optimization
can't promote interpolated inputs to flat if it doesn't consider
the interpolation mode of the whole vec4 slot.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
16f7d22394 util/bitset: add BITSET_GET_RANGE_INSIDE_WORD
to be used later

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
da3f9e3626 util/bitset_test: test the return value of BITSET_TEST_RANGE_INSIDE_WORD better
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Konstantin Seurer
16f4b93cac lavapipe: Implement VK_KHR_compute_shader_derivatives
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31056>
2024-12-04 12:53:57 +00:00
Konstantin Seurer
eac613bc70 gallivm: Use an accurate log2 implementation for lodq
The fast implementation can be off by a lot for small values.

Fixes:

dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.16_1_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.16_1_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.4_4_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.4_4_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.16_1_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.16_1_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.4_4_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.4_4_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.16_1_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.16_1_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.4_4_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.4_4_1.mip_1

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31056>
2024-12-04 12:53:57 +00:00
Timothy Arceri
fcebbfc399 glsl: drop unused array refcount code and tests
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32450>
2024-12-04 11:50:57 +00:00
Sagar Ghuge
2af9853432 intel: Use the common RT BVH framework
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/31588>
2024-12-04 10:41:45 +00:00
Michael Cheng
ed620bcd41 anv : Add tracepoint for as_build
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/31588>
2024-12-04 10:41:45 +00:00
Kevin Chuang
5098c0c5df anv: Add INTEL_DEBUG for bvh dump and visualization tools
This commit allows you to dump different regions of memory related to
bvh building. An additional script to decode the memory dump is also
added, and you're able to view the built bvh in 3D view in html. See the
included README.md for usage.

Rework:
- you can now view the actual child_coord in internalNode in html
- change exponent to be int8_t in the interpreter
- fix the actual coordinates using an updated formula
- now you can have 3D view of the bvh
- blockIncr could be 2 and vk_aabb should be first
- Now, if any bvh dump is enabled, we will zero out tlas, to prevent gpu
  hang caused by incorrect tlas traversal
- rootNodeOffset is back to the beginning
- Add INTEL_DEBUG=bvh_no_build.
- Fix type of dump_size
- add assertion for a 4B alignment
- when clearing out bvh, only clear out everything after
  (header+bvh_offset)
- TODO: instead of dumping on destory, track in the command buffer

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
5561db68c3 anv: Add helper to copy data from src to dest anv_address
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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
41baeb3810 anv: Implement acceleration structure API
Rework: (Kevin)
- Properly setup bvh_layout
   Our bvh resides in contiguous memory and can be divided into two sections:
      1. anv_accel_struct_header, tightly followed by
      2. actual bvh, which starts with root node, followed by interleaving
         leaves or internal nodes.
- Update comments for some fields for BVH and nodes.
- Properly populate the UUIDs in serialization header
- separate header func into completely two paths based on compaction bit
- Encode rt_uuid at second VK_UUID_SIZE.
- Write query result at correct slot
- add assertion for a 4B alignment
- move bvh_layout to anv_bvh
- Use meson option to decide which files to compile
- The alignment of serialization size is not needed
- Change static_assert to STATIC_ASSERT and move them inside functions

Rework (Sagar)
- Use anv_cmd_buffer_update_buffer instead of MI to copy data

Rework (Lionel)
- Remove flush after builds, and add flush in copy before dispatch
- Handle the flushes in CmdWriteAccelerationStructuresPropertiesKHR properly

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
9002e52037 anv: Implement cmd_dispatch_unaligned callback
Rework: (Kevin)
- Calculate correct number of threads in GPGPU thread group based on
  SIMD size.
- Instead of round up, just use the simple division and let the
  remainder part handle groupCount < local_size_x.
- Drop indirect_unroll_off and fix the bug that we're not using is_unaligned_size_x

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
0cab02ca9b anv: Implement flush_buffer_write_cp callbck
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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
b2cffdb1ed anv: Implement write_buffer_cp callback
Rework: (Kevin)
 - Fix pointer arithmatic calculation.
 - Add assertion for a 4B alignment

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
8817ff26fc anv: Move update buffer code in helper
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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
0edf208ab9 anv: Implement cmd_fill_buffer_addr callback
Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Kevin Chuang
2fe57947e3 anv: Implement encode shader to fit in ANV BVH
This shader gets called and will construct ANV BVH from IR BVH. More
specifically, each invocation will take care of one internal node. The
internal nodes get processed starting from root node all the way to the
bottom leaves.

During processing, we keep track of the destination of
where the internal node should be encoded (tracked in
vk_ir_box.bvh_offset), and where its leaves should be encoded (tracked
in vk_ir_header.dst_node_offset).

The processed bvh is in contiguous memory, which starts with header,
followed by interleaving internal nodes and leaves. The nodes
information are also populated.

Rework: (Sagar)
- Return out of bounds threads early
- Mimic GRL internal node encoding
- Handle node mask
- Fix block_incr_and_start_prim
- Fix shader_index_and_geom_mask for instance node
- Fix instance flag
- Fix block_incr and instance_contribution_and_geom_flags initialized to be zero
- Fix lower_x and upper_x to be properly flipped for invalid child
- For invalid node, clear blockIncr and set startPrim to INVALID
- Calculated things upfront and assign, cutting down more than ~200
  instructions

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
692b5fa9f2 anv: Add shader to copy acceleration structures
Rework (Kevin)
- encode the address of anv_instance_leaf after header in order to
  handle serialization and deserialization part.
- draw serialized data layout and explanation

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
a6b1a1fce1 anv: Add shader to build BVH header
Rework: (Kevin)
- Calculate the compacted_size properly
- Update instance count and self pointer
- The alignment of serialization size is not needed

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
ef94b7097b anv: Add header to track BVH data structures
This commit adds build interface and helper header for ANV BVH.

Rework: (Kevin)
- Use block_size macro to represent bvh node/leaf size
- Rename BVH-related node/leaf size macros for clarity
- Updated comments for some fields for bvh and nodes.
- move bvh_layout to anv_bvh.h
- Draw anv_bvh layout
- rename child_offset to child_block_offset

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-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/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
617b7602ea anv: Split GRL code path in separate file
Rework (Kevin)
- Remove genX_acceleration_structure.c from meson option to avoid
  linking error

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/31588>
2024-12-04 10:41:44 +00:00
Sagar Ghuge
b002b2589c anv: Update include dir for anv_tests
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/31588>
2024-12-04 10:41:44 +00:00
Samuel Pitoiset
5d072e0e73 radv: fix stencil only copies of depth/stencil images with SDMA
This was broken for two reasons:
- the number of bytes per element should be 1 (8-bit for stencil)
- the base offset should be adjusted for the stencil

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32459>
2024-12-04 09:30:36 +00:00
Lionel Landwerlin
69edf4144a brw: use transpose unspill messages when possible
This simplifies the unspill messages quite a bit.

A/B testing on DG2 :

BlackOps3 : +0.96%
TotalWarPharaoh: +0.31%

DG2 shader changes :

  Assassin's Creed Valhalla:
  Totals from 19 (0.89% of 2131) affected shaders:
  Instrs: 70542 -> 64369 (-8.75%)
  Cycle count: 18810945 -> 18560169 (-1.33%); split: -1.40%, +0.06%

  Black Ops 3:
  Totals from 55 (3.41% of 1612) affected shaders:
  Instrs: 389549 -> 350646 (-9.99%)
  Cycle count: 344168275 -> 340652311 (-1.02%); split: -1.17%, +0.15%

  Control:
  Totals from 1 (0.11% of 878) affected shaders:
  Instrs: 3409 -> 3212 (-5.78%)
  Cycle count: 255991 -> 250411 (-2.18%)

  Cyberpunk 2077:
  Totals from 1 (0.08% of 1264) affected shaders:
  Instrs: 2363 -> 2337 (-1.10%)
  Cycle count: 69283 -> 69186 (-0.14%)

  Fallout 4:
  Totals from 1 (0.06% of 1601) affected shaders:
  Instrs: 27946 -> 20056 (-28.23%)
  Cycle count: 2391398 -> 2153658 (-9.94%)

  Fortnite:
  Totals from 273 (3.65% of 7470) affected shaders:
  Instrs: 634377 -> 601519 (-5.18%)
  Cycle count: 31870433 -> 31624089 (-0.77%); split: -0.78%, +0.01%

  Hogwarts Legacy:
  Totals from 50 (3.02% of 1656) affected shaders:
  Instrs: 110455 -> 103339 (-6.44%)
  Cycle count: 6613728 -> 6530832 (-1.25%); split: -1.28%, +0.03%

  Metro Exodus:
  Totals from 70 (0.16% of 43076) affected shaders:
  Instrs: 253847 -> 245321 (-3.36%)
  Cycle count: 13269473 -> 13209131 (-0.45%)
  Spill count: 1111 -> 1108 (-0.27%)
  Fill count: 2868 -> 2865 (-0.10%)

  Red Dead Redemption 2:
  Totals from 139 (2.38% of 5847) affected shaders:
  Instrs: 496551 -> 450180 (-9.34%)
  Cycle count: 43233944 -> 40947386 (-5.29%); split: -5.33%, +0.04%
  Spill count: 6322 -> 6326 (+0.06%)
  Fill count: 15558 -> 15568 (+0.06%)

  Rise Of The Tomb Raider:
  Totals from 1 (0.56% of 178) affected shaders:
  Instrs: 1682 -> 1437 (-14.57%)
  Cycle count: 603670 -> 586766 (-2.80%)

  Spiderman Remastered:
  Totals from 820 (11.77% of 6965) affected shaders:
  Instrs: 4622877 -> 3984893 (-13.80%)
  Cycle count: 235094963186 -> 234483925430 (-0.26%); split: -0.42%, +0.16%
  Spill count: 73414 -> 73581 (+0.23%); split: -0.02%, +0.25%
  Fill count: 215090 -> 215627 (+0.25%); split: -0.02%, +0.27%
  Scratch Memory Size: 3520512 -> 3528704 (+0.23%); split: -0.12%, +0.35%

Some of stats show spilling changes which is telling of how our spill
code is not adequate. Some of the spilled values are probably being
respilled which shouldn't be the case.

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/32110>
2024-12-04 08:59:07 +00:00
Pavel Ondračka
dcfa8851bd ci: bring back some i915g testing
Only single g33 as part of r300 ci-tron-based farm.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32376>
2024-12-04 08:18:43 +00:00
Kenneth Graunke
2ade3ec2a9 brw: Allow SIMD32 math instructions on Xe2
There's no restriction here AFAICT - only when HF types are involved.

fossil-db results on Lunar Lake:

   Totals:
   Instrs: 143665291 -> 142654109 (-0.70%)
   Cycle count: 22516049016 -> 22514172014 (-0.01%); split: -0.02%, +0.01%
   Max live registers: 49038116 -> 49017687 (-0.04%); split: -0.04%, +0.00%

   Totals from 117623 (21.07% of 558370) affected shaders:
   Instrs: 25098642 -> 24087460 (-4.03%)
   Cycle count: 1038884570 -> 1037007568 (-0.18%); split: -0.48%, +0.29%
   Max live registers: 12423219 -> 12402790 (-0.16%); split: -0.16%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32471>
2024-12-04 02:42:34 +00:00
Kenneth Graunke
815236b417 brw: Fix register unit calculation in SIMD32 LOAD_PAYLOAD lowering
We were wanting to check if the destination region spanned multiple
registers.  But we were checking against REG_SIZE, when the register
size is actually REG_SIZE * reg_unit(devinfo) now.

This meant that SIMD32 LOAD_PAYLOAD was always getting SIMD-split
on Xe2 platforms, generating a lot of unnecessary mess for compute
shaders.

fossil-db results on Lunar Lake:

   Totals:
   Instrs: 146178614 -> 143291988 (-1.97%); split: -1.98%, +0.00%
   Subgroup size: 11089632 -> 11089376 (-0.00%); split: +0.00%, -0.00%
   Cycle count: 22528892444 -> 22507551650 (-0.09%); split: -0.12%, +0.03%
   Max live registers: 48834202 -> 48886685 (+0.11%); split: -0.09%, +0.20%

   Totals from 134306 (24.10% of 557327) affected shaders:
   Instrs: 28806335 -> 25919709 (-10.02%); split: -10.02%, +0.00%
   Subgroup size: 4297680 -> 4297424 (-0.01%); split: +0.00%, -0.01%
   Cycle count: 956867650 -> 935526856 (-2.23%); split: -2.84%, +0.61%
   Max live registers: 13085711 -> 13138194 (+0.40%); split: -0.33%, +0.73%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32471>
2024-12-04 02:42:34 +00:00
Caio Oliveira
dfa4c55a4f intel/brw: Add is_control_source for the new subgroup ops
Fixes: 019770f026 ("intel/brw: Add SHADER_OPCODE_VOTE_*")
Fixes: 9537b62759 ("intel/brw: Add SHADER_OPCODE_REDUCE")
Fixes: 0ba1159b0a ("intel/brw: Add SHADER_OPCODE_*_SCAN")
Reviewed-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/32411>
2024-12-04 01:19:37 +00:00
Nanley Chery
428a970511 anv: Only consider R32 image formats as supporting atomics
Only consider R32 image formats as supporting atomics because we only
expose VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT for those formats.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:35 +00:00
Nanley Chery
122c01a496 anv: Enable more storage compression on gfx12+
On gfx12.0, allow storage compression unless the image may be used with
atomics.

On gfx20, use the CCS_E aux-usage for storage compression. This causes
ISL to create surface states with more appropriate render compression
formats.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5657
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:35 +00:00
Nanley Chery
01c4ea771c anv: Enable storage accesses with modifiers on gfx12+
I tested this patch with an ACM card. It enables "Halo: The Master Chief
Collection" to use the clear color modifier instead falling back to the
uncompressed Tile4 modifier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:35 +00:00
Nanley Chery
2dedd8dbb2 intel/isl: Fix DecompressInL3 assignment on gfx12.5
* In the ACM PRMs, the programming notes under
  RENDER_SURFACE_STATE::MemoryCompressionEnable state that the
  DecompressInL3 bit must be set for media compression.

* Unlike TGL, ACM seems to handle format reinterpretation just fine
  without using the bit.

Update the assignment accordingly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:34 +00:00
Autumn Ashton
7e9ea5c1b5 radv/video: Fix bitstreamStartOffset including dstBufferOffset
The bitstreamStartOffset from the VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR query in RADV is currently relative to the dstBuffer, and not dstBuffer + dstBufferOffset like the spec states.

To fix this, let's append the offset to the VA directly and not tell the encoder about the offset relative to the VA at all.

The Vulkan spec states:
"VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR specifies that queries managed by the pool will capture the byte offset of the bitstream data written by the video encode operation to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer relative to the offset specified in VkVideoEncodeInfoKHR::dstBufferOffset."

The relevant part being that is is relative to dstBufferOffset and not the start of the VkBuffer.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32452>
2024-12-03 22:19:43 +00:00
Georg Lehmann
1a7ebfd2a8 radv: rework vk_property initialization
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/32457>
2024-12-03 21:43:34 +00:00
Georg Lehmann
b961537a17 radv: fix reporting mesh/task/rt as supported dgc indirect stages
Fixes: 8300378bf3 ("radv: advertise VK_EXT_device_generated_commands on GFX8+")

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/32457>
2024-12-03 21:43:34 +00:00
Gurchetan Singh
03b527ea92 gfxstream: fix issues with VK1.4 build
Fixes build after VK1.4 update.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32446>
2024-12-03 20:35:44 +00:00
Gurchetan Singh
ade6a19f14 gfxstream: remove abort()
I have no idea why it just started complaining now about
this.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32446>
2024-12-03 20:35:44 +00:00
Erik Faye-Lund
7b8f5b0881 panvk: report minmax-support for sampled formats
We also need to report minmax as part of the format-features.

This fixes the following CTS tests for me:
- dEQP-VK.api.info.format_properties.r8_unorm
- dEQP-VK.api.info.format_properties.r8_snorm
- dEQP-VK.api.info.format_properties.r16_sfloat
- dEQP-VK.api.info.format_properties.r32_sfloat
- dEQP-VK.api.info.format_properties.d16_unorm

Fixes: 1fc454673a ("panvk: Implement VK_EXT_sampler_filter_minmax for v10")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32445>
2024-12-03 20:16:58 +00:00
Aleksi Sapon
0812a8bccc draw: front-face injection must check geometry shader primitive type
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32306>
2024-12-03 19:42:22 +00:00
Mary Guillemard
cdf822632a panvk: Add a nightly job for Mali-G52
We have quite a big fraction currently and it has been proven that we
are missing new failures right now.

This adds a new nightly job that run a full CTS on a single VIM3.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-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/32421>
2024-12-03 19:11:30 +00:00
Mary Guillemard
913a7b26e1 panvk: Update Mali-G52 CI baseline
We seems to have new regressions that were introduced but never seen
because of the massive fraction used.

This adds the failures seen with a full run while trying to document
some.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-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/32421>
2024-12-03 19:11:30 +00:00
Pavel Ondračka
61d890b6db r300/ci: update RV410 CI expectations
The test was almost passing before but we can't really always get the
required five decimal point tolerance with the R300/R400 hw.
nir_opt_algebraic improvements in 92797c6878
shuffled the ALUs a bit and we now do a bit better.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32458>
2024-12-03 18:48:32 +00:00
Konstantin Seurer
4ed867825a lavapipe: Implement VK_KHR_shader_float_controls2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31273>
2024-12-03 16:15:25 +00:00
Konstantin Seurer
540e84bedb gallivm: Preserve -0 and nan
Some operations need additional or different code to preserve the sign
of 0 or nan.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31273>
2024-12-03 16:15:25 +00:00
Konstantin Seurer
f5db70cb24 gallivm: Add float operation behavior flags to lp_type
Used to emit additional code if -0 or nan needs to be preserved.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31273>
2024-12-03 16:15:25 +00:00
Samuel Pitoiset
9df3c9e4a1 ac/parse_ib: print VA for the SDMA CONSTANT_FILL/WRITE packets
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32456>
2024-12-03 15:29:40 +00:00
Samuel Pitoiset
31524d42a2 ac/parse_ib: fix parsing SDMA CONSTANT_FILL packet
This packet only has 5 DWORDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32456>
2024-12-03 15:29:39 +00:00
Georg Lehmann
34a47e4b14 nir/opt_algebraic: mark a - ffract(a) as nan incorrect.
Inf + fract(Inf) -> Inf + NaN -> NaN
floor(Inf) -> Inf

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Georg Lehmann
2ee96cf514 nir/opt_algebraic: optimize d3d9 ceil
No Foz-DB changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Georg Lehmann
34caed8adb nir/opt_algebraic: optimize d3d9 ftrunc
Foz-DB Navi21:
Totals from 85 (0.11% of 79395) affected shaders:
MaxWaves: 1972 -> 1968 (-0.20%)
Instrs: 48682 -> 47067 (-3.32%)
CodeSize: 255664 -> 247172 (-3.32%)
VGPRs: 3752 -> 3768 (+0.43%)
Latency: 154414 -> 150360 (-2.63%)
InvThroughput: 37186 -> 35081 (-5.66%)
VClause: 847 -> 865 (+2.13%); split: -0.24%, +2.36%
SClause: 768 -> 796 (+3.65%)
Copies: 2763 -> 2869 (+3.84%); split: -0.14%, +3.98%
VALU: 28133 -> 26781 (-4.81%)
SALU: 7182 -> 6939 (-3.38%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Georg Lehmann
ea4aa8e5a6 nir/opt_algebraic: optimize ffma(b2f, b2f, c)
Foz-DB Navi21:
Totals from 134 (0.17% of 79395) affected shaders:
Instrs: 153297 -> 153326 (+0.02%); split: -0.03%, +0.05%
CodeSize: 829520 -> 828444 (-0.13%); split: -0.13%, +0.00%
Latency: 900489 -> 899964 (-0.06%); split: -0.07%, +0.01%
InvThroughput: 267838 -> 267478 (-0.13%); split: -0.14%, +0.00%
VClause: 2452 -> 2454 (+0.08%)
Copies: 8331 -> 8353 (+0.26%); split: -0.25%, +0.52%
PreSGPRs: 4974 -> 4964 (-0.20%)
PreVGPRs: 6209 -> 6218 (+0.14%)
VALU: 112317 -> 112092 (-0.20%); split: -0.21%, +0.01%
SALU: 12451 -> 12694 (+1.95%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Marek Olšák
1f69258fb4 st/mesa: replace EmitNoIndirectInput / EmitNoIndirectOutput with NIR options
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423>
2024-12-03 12:57:36 +00:00
Marek Olšák
7f4e36ff7d gallium: replace PIPE_SHADER_CAP_INDIRECT_INPUT/OUTPUT_ADDR with NIR options
This is a prerequisite for enabling nir_opt_varyings for all gallium
drivers.

nir_lower_io_passes (called by the GLSL linker) only uses NIR options
to lower indirect IO access before lowering IO and calling
nir_opt_varyings.

Most drivers report full support for indirect IO and lower it themselves,
which prevents compaction of lowered indirectly accessed varyings because
nir_opt_varyings doesn't touch indirect varyings.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> (Rb for asahi)
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> (for r300)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423>
2024-12-03 12:57:36 +00:00
Yogesh Mohan Marimuthu
f930201898 ac/gpu_info: populate fw info using new fw info ioctl for userq
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
8c91624614 winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT allocations
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
f0d31eda25 winsys/amdgpu: keep has_local_buffers true for userq
In case of userqueue, kernel bo kms_handle will not hold fences for non
shared bo. Non shared bo fences are taken care within mesa. Hence need
to copy the data to another shared buffer for export.

Keeping has_local_buffers true for userq will make non shared bo to
be copied to shared bo for export in si_texture_get_handle().

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
8447cb563f winsys/amdgpu: send hdp flush packet 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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
45fa34284f winsys/amdgpu: don't add fence dependency of other queues for userq
In case of userq, there will be only 1 userq per process. So all the jobs for
that process goes into single queue. Hence there is no need to add fence
of other queues even if info num_queues is > 1.

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
93703d2d19 winsys/amdgpu: add userq cmd submission support in amdgpu_cs_submit_ib()
This patch adds the job submission code for userq. An indirect buffer, in
short ib, can be considered a job. The job is submitted directly to the
userq ring buffer and the doorbell is rung to notify the firmware to
execute the job.

The packets that are submitted to execute the job is below,

1) fence wait multi packet for any dependency fence
2) hdp flush packs to flush host data path
3) indirect buffer packet
4) protected signal packet

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
97664d9e84 winsys/amdgpu: move legacy chunk init and submission to new function
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
afeb500498 winsys/amdgpu: move noop and ib_bytes adjustment to cs_flush
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
6e813b99af winsys/amdgpu: wait for vm syncobj before creating 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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
2a499412e5 winsys/amdgpu: pass job fences to VM ioctl
In case of userq, fences are not installed in kernel kms handled. fences are
handled internally in mesa. So when unmapping a buffer, fences will have to
be passed by mesa to kernel so that kernel can wait on these fences to unmap
the buffer.

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
37b217b0fb winsys/amdgpu: destroy bo_fence_lock late in do_winsys_deinit()
In case of userq when destroying bo, fences are gathered and passed to kernel.
Fences are gathered using bo_fence_lock, In do_winsys_deinit() currently
bo_cache is destroyed after destroying bo_fence_lock. This leads to crash.
Fix this by moving destroying bo_fence_lock late in do_winsys_deinit().

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
30e95cfd87 winsys/amdgpu: use timeline syncobj for userq vm operations
In case of kernel queues method of job submission, buffer list for the job
is passed to amdgpu_cs ioctl. Kernel can ensure that VM mapping is
completed before submitting the job.

With user queues amdgpu_cs ioctl is not called, so the kernel can't determine
automatically when BO should be prepared for submissions. To achieve this, a
timeline syncobj is attach to the gem_va ioctls, which can then be used as a
dependency for future jobs.

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
7c1ba1078b winsys/amdgpu: use bo_va_op_raw() function instead of bo_va_op()
This will make it easy when adding timeline syncobj parameter
for user queue.

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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
94c41852bd ac: add inherit vmid field to indirect buffer packet
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
cda75d6497 ac: add new userq signal and wait packet id
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
086741b3ae winsys/amdgpu: call userq init and destroy functions
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
093cf74b26 ac/gpuinfo: add use_userq and AMD_USERQ variable
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
0182629411 winsys/amdgpu: add userq helper functions
This patch adds init(), deinit(), ring packet
helpder macros functions 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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
48ea133c97 winsys/amdgpu: add CLEAR_VRAM flag to zero vram when creating bo
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
468ea03c6e winsys/amdgpu: add DOORBELL domain to bo
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/29010>
2024-12-03 12:02:06 +00:00
Shashank Sharma
42d49faee5 amd: add new AMDGPU_INFO subquery for userqueue metadata
This patch:
- adds a new subquery (AMDGPU_INFO_UQ_FW_AREAS) in AMDGPU_INFO_IOCTL
  to get the size and alignment of shadow and csa objects from the
  kernel. This information is required for a userqueue consumer (like
  MESA/libdrm) to create the userqueue metadata objects properly.
- also adds supporting metadata structures and a high level wrapper
  function (amdgpu_query_uq_metadata_info) to the query, to make it
  easy to use.

The corresponding kernel changes for this UAPI extension can be found
in amd-gfx mailing list, link:
https://patchwork.freedesktop.org/patch/621390/?series=139715&rev=2

This patch adds support only for the GFX IP, and the other engines may
be supported in subsequent development.

This patch was reviewed in libdrm library at
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/400

Cc: Marek Olsak <marek.olsak@amd.com>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Arvind Yadav <arvind.yadav@amd.com>
Reviewed-by: Marek Olsak <marek.olsak@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Arvind Yadav
b0a70da496 amd: Add amdgpu userqueue IOCTL functions
This patch adds new IOCTL functions to support
userqueue create, remove, signal and wait etc.

This patch was reviewed in libdrm library at
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392

Cc: Deucher, Alexander <alexander.deucher@amd.com>
Cc: Koenig, Christian <christian.koenig@amd.com>
Cc: Sharma, Shashank <shashank.sharma@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Arvind Yadav <arvind.yadav@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
3981b017eb amd: include amdgpu_drm.h from mesa instead of system for ac_fake_hw_db.h
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/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
367856bc72 amd: update amdgpu_drm.h for new userq ioctl
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/29010>
2024-12-03 12:02:05 +00:00
Lucas Stach
e6b018c9dd etnaviv: stall after RS/BLT operation when draw_stall debug option is enabled
RS and BLT operations can exhibit issues in some cases. To help in debugging
such issues stall after RS and BLT operations when ETNA_MESA_DEBUG=draw_stall
is enabled. In that case the FE will point right at the faulty RS/BLT
operation, instead of the next stall which may be many state loads later.

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/32444>
2024-12-03 11:18:45 +00:00
Jose Maria Casanova Crespo
a5485a9414 v3d: Don't load/store if rasterizer discard is enabled
This moves the tlb job load/store logic to the new helper
v3d_update_job_tlb_load_store. Then an early return is included
so if the rasterizer discard is enabled, no load/stores are
emitted because of the draw call.

This helps in situations where transform feedback is used
and there is only interest in the geometry results. We identified
that some jobs were not rendering at all, but they were having the
performance cost of doing several loads and stores.

This generates a huge performance improvement on manhattan benchmarks.

fps_avg  helped:  gl_gfxbench_manhattan.trace:     8.37 -> 11.54 (37.85%)
fps_avg  helped:  gl_gfxbench_manhattan31.trace:   6.02 ->  7.51 (24.62%)

total fps_avg in affected (through threshold) runs: 14.39 -> 19.04 (32.32%)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32351>
2024-12-03 10:56:17 +00:00
Samuel Pitoiset
9535f27d8f radv/ci: mark few tests as expected failures
RADV is the only driver in Mesa CI to use VKCTS main but it doesn't
recognize 1.4 correctly yet. This will be fixed with a VKCTS uprev.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
40f95c63f4 radv: bump VKCTS conformance version to 1.4.0.0 for some GFX8+ GPUs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
00afc4e353 radv: advertise Vulkan 1.4 on GFX8+
GFX6-7 can't support Vulkan 1.4 because indexTypeUint8 isn't supported
in hardware, and emulating features for very old hardware isn't the
option I would personally choose.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
db61d45b94 radv: add new Vulkan 1.4 features/properties
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
75691dd59c radv: promote VK_EXT_pipeline_robustness to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
7892e8600b radv: promote VK_KHR_shader_subgroup_rotate to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
8c2ff0a80b radv: promote VK_KHR_push_descriptor to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
e20d5173fd radv: promote VK_KHR_map_memory2 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
5b9ebe331c radv: promote VK_KHR_maintenance6 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
54cd43f93e radv: promote VK_KHR_maintenance5 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
81798d9ebe radv: promote VK_KHR_line_rasterization to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
5917f70a6e radv: promote VK_KHR_index_type_uint8 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
64101baecf radv: promote VK_KHR_global_priority to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:54 +00:00
Samuel Pitoiset
ac26c5af52 radv: promote VK_KHR_dynamic_rendering_local_read to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:54 +00:00
Samuel Pitoiset
a437af59fc zink/ci: skip one more modifier test on POLARIS10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32453>
2024-12-03 08:46:00 +00:00
Samuel Pitoiset
3d804851be radv: try to detect use-after-free with address binding report
This performs some very basic verifications with the faulty VA we get
from the kernel. This will probably be improved over time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
1b68a92c59 radv: dump address binding report with RADV_DEBUG=hang
This contains much more info than the BO history from the winsys and
it will be helpful for debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
1ae6fcfbaf radv: add a small helper to dump VM fault with the GPU hang report
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
f8af89aaa0 radv: add address binding report support for BOs imported with a ptr
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
723cbc95d8 radv: add address binding report support for BOs imported with a fd
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Deborah Brouwer
caa6ccd7d6 ci: move pipeline_summary tool to .marge/hooks
Move the tool to summarize a failed pipeline to a generic .marge/hooks
directory. This will allow the fdo-bots repo to handle all marge hooks in
a consistent way across repositories that use this service.

Add a symlink to the bin/ci directory so that the pipeline summary tool
can still be run locally as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32413>
2024-12-02 19:22:59 -08:00
Timothy Arceri
fd431a5b71 glsl: drop unused ir_equals.cpp
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32448>
2024-12-03 02:46:39 +00:00
Kenneth Graunke
6fd10a6620 brw: Tune vectorizer conditions to allow overfetching with holes
Notably, our convergent block loads were already overfetching - we
rounded up to block sizes of 8, 16, 32, or 64(LSC-only).  But we did
so in the backend, rather than NIR.

With recent changes, nir_opt_load_store_vectorizer allows holes of up
to 28 bytes (7 components at 4 bytes each).  This allows us to detect
cases where we did a convergent block load for 1 component (but loaded
a whole vec8), then another load for the next vec8, and combine them
into a single V16 load.  Single component loads aren't the most common,
but convergent loads of a vec2 in one group and a vec3 in another are
quite common, and it makes no sense to do V8+V8 loads instead of V16.

For non-block loads, we allow a max hole of 4 bytes.  This allows the
common case of XYZ_ + XYZ_ loads (where the last component is unread)
to combine into a single larger load.

fossil-db results on Lunarlake:

   Totals:
   Instrs: 146692608 -> 146246432 (-0.30%); split: -0.33%, +0.02%
   Subgroup size: 11100528 -> 11100512 (-0.00%)
   Send messages: 7003425 -> 6862529 (-2.01%); split: -2.01%, +0.00%
   Cycle count: 22396273274 -> 22523048654 (+0.57%); split: -1.08%, +1.64%
   Spill count: 67671 -> 67594 (-0.11%); split: -1.59%, +1.48%
   Fill count: 128999 -> 130223 (+0.95%); split: -1.73%, +2.68%
   Scratch Memory Size: 5986304 -> 6042624 (+0.94%); split: -1.40%, +2.34%
   Max live registers: 48898858 -> 48881655 (-0.04%); split: -0.05%, +0.01%
   Non SSA regs after NIR: 172397792 -> 167577380 (-2.80%); split: -2.80%, +0.00%

   Totals from 451003 (80.87% of 557667) affected shaders:
   Instrs: 134111754 -> 133665578 (-0.33%); split: -0.36%, +0.03%
   Subgroup size: 9039104 -> 9039088 (-0.00%)
   Send messages: 6127775 -> 5986879 (-2.30%); split: -2.30%, +0.00%
   Cycle count: 20306336726 -> 20433112106 (+0.62%); split: -1.19%, +1.81%
   Spill count: 56230 -> 56153 (-0.14%); split: -1.92%, +1.78%
   Fill count: 112920 -> 114144 (+1.08%); split: -1.97%, +3.06%
   Scratch Memory Size: 3769344 -> 3825664 (+1.49%); split: -2.23%, +3.72%
   Max live registers: 43750259 -> 43733056 (-0.04%); split: -0.05%, +0.01%
   Non SSA regs after NIR: 158449343 -> 153628931 (-3.04%); split: -3.04%, +0.00%

   In particular, sends get cut by 20.85% for Borderlands 3 DX12, 13.82%
   on Cyberpunk 2077, 10.75% on Strange Brigade, and 10.20% on Red Dead
   Redemption 2.  Yet, spill/fills remain about the same.

fossil-db results on Alchemist are similar though not quite as good.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
f88eb48ff2 anv: Don't consider nir_var_mem_global for vectorizer robustness checks
nir_opt_load_store_vectorize checks for potential address wrapping
when vectorizing two loads ("low" and "high").  It looks for cases where
"low" might have a large address, and "high" has a positive offset
which, when added together, could trigger integer wraparound.  The issue
here is that if the large address of "low" was considered out-of-bounds,
adding offset could wrap around to a small address, which might actually
be in-bounds.  Thus, when loaded separately, "low" will fail and trigger
robustness out-of-bound-read behavior, but "high" would read correctly.
When vectorized, the entire load would fail.  This is explicitly tested
for with 32-bit SSBO addresses in the Vulkan CTS.

However, anv's 64-bit global addresses and VMA handling effectively
prevent this case.  Addresses 0-4095 are a reserved page so that if
people try to use 0 as a NULL pointer, it never maps to a valid BO.
That alone guarantees that the above case where "high" gets a small
address would never be in-bounds, so we don't need to check for it.

In fact, we allocate most user allocations out of high addresses,
and have specialized allocation heaps for certain types of GPU data
structures in the lower GB of memory.  For a load to wrap around and
successfully land in the right heap, it would have to load gigabytes.

Disabling this allows load vectorization and overfetching in more cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
5712fc48a9 nir: Allow large overfetching holes in the load store vectorizer
The load_*_uniform_block_intel intrinsics always load either 8x or 16x
32-bit components worth of data (so 32 byte increments).  This leads to
cases where we load a few components from one vec8, followed by a few
components of an adjacent vec8.  We want to combine those into a vec16
load, as that loads a whole cacheline at a time, and requires less hoops
to calculate addresses and request memory loads.

So, we allow 7 * 4 = 28 bytes of holes, which handles vec8+vec8 where
only the .x component is read.

Most drivers and intrinsics will not want such large holes.  I thought
about adding a per-intrinsic max_hole to the core code, but decided that
since we already have driver callbacks, we can just rely on them to
reject what makes sense to them.

No driver callbacks currently allow holes, so this should not currently
affect any drivers.  But any work in progress branches may need to be
updated to reject larger holes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
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/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
01680a66a9 brw: Simplify choose_oword_block_size_dwords()
Just calculate the block size using util_logbase2() - it's simpler.

Also drop the name "oword" as this refers to legacy HDC messages,
rather than the newer LSC "vector size" field.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
e8c85f8476 brw: Only consider components read for UBO push analysis
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
e703ff5e02 brw: Only consider components read for UBO loads
This will matter more with overfetching, where we may suggest loading
additional data that we don't actually need for vectorization purposes.

We want to make sure that push ranges have the data we actually need;
any extra padding is irrelevant.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
da93b13f8b brw: Use nir_combined_align in brw_nir_should_vectorize_mem
Better than open-coding this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Kenneth Graunke
8c795af0b8 brw: Drop a few crocus references in comments
crocus no longer uses brw.  It uses elk.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Kenneth Graunke
46af23649c brw: Drop "regular uniform" concept from UBO push analysis
i965 used to upload its own regular GL uniforms and push those in
addition to UBO ranges.  st/mesa instead uploads regular uniforms
and presents those to use as UBO 0.  So this really isn't a thing
anymore.

nir_intrinsic_load_uniform is still used today but it represents
Vulkan push constants.  anv_nir_compute_push_layout already takes
care of ensuring too many ranges aren't present, so it doesn't need
the pass to do so.  iris doesn't use this intrinsic at all.

We can also drop the compute shader check, because neither iris nor
anv use UBO push analysis for compute shaders - except for anv's
internal kernels, which already have well specified push layouts.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Kenneth Graunke
586a470a00 brw: Drop image deref handling from brw_analyze_ubo_ranges
This was for pre-Skylake image load/store handling with image params.

We don't support that in brw anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Marek Olšák
8752401e03 nir/algebraic: optimize (a & b) | (a | c) => a | c, (a & b) & (a | c) => a & b
No change in shader-db with ACO, but it doesn't seem to be optimized by
any other patterns.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Marek Olšák
3670d42c74 nir/algebraic: optimize (a | b) | (a | c) ==> (a | b) | c
shader-db with ACO:
    3 shaders have -0.11% average decrease in the code size

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Marek Olšák
978ad93375 nir/algebraic: optimize (a & b) & (a & c) ==> (a & b) & c
shader-db with ACO:
    3 shaders have -0.57% average decrease in the code size

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Marek Olšák
83b093f95e nir/algebraic: use is_used_once in a few iand/ior patterns
shader-db with ACO:
    1 shader has -4 decrease in the code size

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Antonino Maniscalco
2b9738ce6d nir,zink,asahi: support passing through gl_PrimitiveID
When this pass is used with Zink, gl_PrimitiveID needs to be passed
through, however this is unnecessary for other divers.

Analogous to previous commit

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
2024-12-03 00:24:04 +00:00
Alyssa Rosenzweig
23601d6632 zink: fix gl_PrimitiveID reads with quads
Zink emulates quads with a GS, which imposes requirements for gl_PrimitiveID.
Handle them here. Previously Zink went out of spec.

Fixes spec@glsl-1.50@execution@primitive-id-no-gs-quads and
spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Fixes: e2220ee55e ("zink: filled quad emulation gs generation function")
Closes: #12214
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
2024-12-03 00:24:04 +00:00
Dylan Baker
845f5eca27 maintainer-scripts: Bump Vulkan release version to 1.4
Since support is landed or landing for several drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32442>
2024-12-03 00:20:05 +00:00
Faith Ekstrand
69bce622e9 nvk: Move Vulkan 1.4 properties to the 1.4 section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443>
2024-12-02 23:20:07 +00:00
Faith Ekstrand
cf4e10e466 nvk: Move Vulkan 1.4 features to the 1.4 section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443>
2024-12-02 23:20:07 +00:00
Faith Ekstrand
01046afae5 nvk: Only support Vulkan 1.4 on Turing+
It needs hostImageCopy which we don't have working pre-Turing yet.

Fixes: 173171f73e ("nvk: Advertise Vulkan 1.4")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443>
2024-12-02 23:20:07 +00:00
Jesse Natalie
128caf94ca microsoft/compiler: Put holes in driver_location based on I/O variable sizes
DXIL requires that each I/O variable has a unique semantic name, but when
dealing with semantics that take up multiple slots, that variable implicitly
takes up multiple names. So when assigning driver_location, we need to do
the same.

That means also updating outputs and patch constants to have a mapping from
driver_location to a compacted index, since the metadata arrays *can't* have
holes.

This would be simpler if we could hang it off the nir_variable but there's
not really any free fields to be able to do that. We only need this compacted
mapping inside the DXIL backend anyway so we can just store the array in the
module.

Tested-by: Benjamin Otte <otte@gnome.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12128
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32047>
2024-12-02 22:40:39 +00:00
Dylan Baker
5a6531b5d6 anv: bump conformance version to 1.4
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:40 +00:00
Dylan Baker
212565f42e anv: Add new Vulkan 1.4 features and properties
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:39 +00:00
Dylan Baker
953d8a61f8 anv: bump max number of push constants to 256
As is required by Vulkan 1.4

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:39 +00:00
Dylan Baker
8105f80244 anv: advertise Vulkan 1.4
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:39 +00:00
Connor Abbott
0c55770b3e tu: Expose Vulkan 1.4 on a7xx
Vulkan 1.4 can only be exposed on a7xx devices due to a number of bumps
in the required limits, including bumping maxDescriptorSets to 7. a7xx
bumped the number of bindless bases from 5 to 8, with one reserved for
the driver.

I've followed what we've already done and exposed a conformanceVersion
of 1.4.0.0 for all a7xx devices, even though I've only submitted
conformance for X1-85. I'm not sure if we want to change this, but at
least for now a618 on Chromebooks and X1-85 on laptops are the only
cases where turnip is being "shipped" to users in some official
capacity, so it shouldn't be a huge deal.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32437>
2024-12-02 21:22:44 +00:00
Connor Abbott
21838dcbb6 tu: Add Vulkan 1.4 features and properties
Only add features and properties new to Vulkan 1.4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32437>
2024-12-02 21:22:44 +00:00
Caterina Shablia
2cac1389e5 panvk: enable shaderInt8, VK_KHR_8bit_storage and VK_KHR_shader_float16_int8
We already could handle int8 load/stores and arithmetic.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Caterina Shablia
d9ce6b266f panvk: implement vkGetDeviceImageMemoryRequirements
Vulkan runtime doesn't layer vkGetImageMemoryRequirements2
on top of vkGetDeviceImageMemoryRequirements, as that would
require initializing a full image, which is expensive on
certain drivers such as NVK, so it's up to us to implement
both functions.

In our implementation of vkGetDeviceImageMemoryRequirements,
we initialize a slimmed down image and then forward everything
to vkGetImageMemoryRequirements2.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Caterina Shablia
110f5edf7a panvk: add panvk_image_init helper
This factors out the initialization of panvk_image, so we can reuse the
logic for computing requirements without crating an actual VkImage
object first.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Constantine Shablia
dbdaefb6ed panvk: never require dedicated allocation for images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Constantine Shablia
ed64fa034b panvk: never prefer or require dedicated allocation for buffers
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Constantine Shablia
ef120460e7 panvk: replace vkGetBufferMemoryRequirements2 with vkGetDeviceBufferMemoryRequirements
Mesa's Vulkan runtime will implement the former in terms of the
latter for us.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:22 +00:00
Rebecca Mckeever
07b8ce4351 panvk: Support D32_S8 as a multiplanar format
This format was already supported on Bifrost as a single
plane format. Valhall doesn't support this interleaved D32_S8,
so we add support for multiplanar D32_S8 and move Bifrost to
this layout too, as it's more memory efficient than the
interleaved layout.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
cc2cb69e2e pan/texture: Pass pan_image_section_info around
Pass pan_image_section_info around instead of passing each field
of the struct separately.

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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
0dfb28cebc pan/texture: Stop passing a layout to panfrost_emit_plane()
The layout can be extracted from the iview and plane_index arguments.

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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
d731abb17a pan/texture: s/index/plane_index/ in panfrost_emit_plane()
Index is vague as it could refer to the array index too. Let's clarify
the situation by renaming the argument plane_index.

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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
3cf2658a9a pan/texture: Stop passing the view format around
The format is never adjusted, and can thus be extracted from the view.

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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
726dec5abd pan/texture: Move the plane info retrieval logic to a helper function
This allows us to properly split the multiplanar and single plane cases
in panfrost_emit_surface(), which makes the code easier to follow.

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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
a8ed53881e pan/desc: Add a pan_image_view_get_s_plane() helper and use it
The depth and stencil planes might be different. Let's add a specific
helper to retrieve the stencil plane. We keep using
pan_image_view_get_zs_plane() for the depth plane, because it's
guaranteed to always be on the first plane.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
c9b4030f33 pan/desc: Pass an image to pan_force_clean_write_rt()
Pass an image to pan_force_clean_write_rt() so we can easily
support the multiplanar depth-stencil case, and rename the
function pan_force_clean_write_on() to avoid the confusion.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
878a7d6de0 pan/texture: Accept holes in the pan_image_view::planes array
We are about to add multiplanar depth/stencil support. A stencil
only view of a multiplanar d32_s8 format will have NULL depth plane
(plane0), so we need to prepare the texture logic to deal with that.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
5df95a97f1 pan/texture: s/pan_image_view_get_rt_image/pan_image_view_get_color_plane/
Pick a name that's consistent with pan_image_view_get_plane().

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
c0140148f1 pan/texture: s/pan_image_view_get_zs_image/pan_image_view_get_zs_plane/
Pick a name that's consistent with pan_image_view_get_plane().

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Eric R. Smith
a0dd108b8a panfrost: convert resources before binding them to images
pan_resource_modifier_convert can use a blit to convert images
from AFBC. If we call this from panfrost_set_shader_images then
we end up crashing due to using an inconsistent set of images.
Fix this by doing the AFBC/AFRC conversion before the image
bindings.

This fixes a crash in piglit oes_egl_image_external_essl3 tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243>
2024-12-02 19:49:58 +00:00
Eric R. Smith
fc3cfaa4aa panfrost: add a perf warning when resources need to be converted
This is a minor debugging aid.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243>
2024-12-02 19:49:58 +00:00
Alyssa Rosenzweig
56acdca86d hk: claim 1.4
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
3f5086016b hk: implement timestamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
55cd987de2 asahi: fix agxdecode memory mapping
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Asahi Lina
fbb38a30a6 asahi: Add timestamp buffer ops
TODO: virt support (needs virglrenderer changes & virt ABI break)

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
6697fb26ed asahi: UAPI update to add support for user timestamp buffers
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
751bd986fb asahi: add =bodump debug help
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
8caddd2ca1 asahi: fix agx_batch_add_bo
when we have exactly POT BOs. fixes crash in portal 2. oh lord.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f34cd9e966 asahi: add more asserts around bo add
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f98971e776 asahi,hk: mmap BO on first use
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
e7b3dcb9f7 asahi: label individual pools
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
09c8520293 asahi: fix u_blitter related leaks
see also 689f38b2b4 ("panfrost: fix refcnt imbalance related to blitter")

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d49f0786c8 asahi: fix page size alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
59b0dd7c64 asahi: drop dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
07e836b932 asahi: Fix agx_gpu_time_to_ns & implement DRM_ASAHI_GET_TIME
agx_gpu_time_to_ns() was broken since it was overflowing the u64
timestamp after just ~10 minutes. Fix that by automatically computing a
reduced conversion fraction, and add support for DRM_ASAHI_GET_TIME
where supported (replacing the CPU timer hack).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
925eca02c4 asahi: UAPI update to add GET_TIME & cleanup
Also fix editor config for this file & disable clang-format, to make
syncing with the kernel easier.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d894941895 hk,asahi,libagx: unify a bit of code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
b41b7e6bc8 asahi: don't leak rodata
needs a bigger refactor but that's not a right now problem.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
1ac82c8d24 asahi: drop dead pool stuff
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
fe92abf82b agx: reduce preamble/main alignment
this was overkill.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
91ce434103 agx: disable bounds check optimization
fixes Fallout 4. needs more investigation when we have better debug tooling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
2b3b0cd339 hk: clarify bounds check calculations
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4d4f82b739 hk: implement hack for layered no attachments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4386150ab3 hk: fix z bias perf regression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
57447cbb82 hk: fix incorrect index size translate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
be8a24f3b2 asahi: crash on fault
now that we have soft fault we don't need this w/a to pass cts, and this will
help us with avoiding flakes in other places.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
ecd94113ca libagx: increase wg size for query copy
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Simon Ser
105fcb9cfd dri: revert INVALID modifier special-casing
Commit 361f362258 ("dri: Unify createImage and createImageWithModifiers")
has introduced new behavior for drivers which don't support explicit
format modifiers. Before this commit, INVALID was not special-cased
and any call to dri_create_image() with one or more modifiers returned
NULL. After this commit, INVALID gained a special meaning: it indicates
that the implicit modifier is accepted by the caller. This is surprising
and is an API break.

This causes further API breaks: for instance, before this commit a BO
created via gbm_bo_create_with_modifiers() was guaranteed to always
return a non-INVALID modifier in gbm_bo_get_modifier().

This is inconsistent with gbm_dri_surface_create(): that function
treats INVALID as a bad entry in the modifier list, and fails if
it's the only acceptable modifier.

Additionally, drivers don't special-case INVALID and just ignore it
if they see it in a modifier list. This causes more inconsistencies.
For instance, let's say that a library user passes the modifier list
{ INVALID, FOO } to GBM. If a driver supports explicit modifiers and
doesn't support FOO for scanout, it'll return NULL. If a driver
doesn't support explicit modifiers, the current logic would return
a non-NULL BO with an INVALID modifier. This discrepency makes it
harder to reason about the system: half of the API ignores INVALID,
while the other half assumes INVALID indicates an implicit modifier.

To fix these issues, revert to the behavior before the commit, and
require use of the dedicated API without supplying any modifier for
implicit modifiers.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32396>
2024-12-02 18:42:59 +00:00
Connor Abbott
1b42bc76da ir3: Fix reload_live_out() in shared RA
We never split live ranges, so we don't need to store the location of
each live value when recording live outs, but the physreg assigned to a
register will still be clobbered when we reload it so we have to record
the original physreg and then make sure to use it when reloading the
live out.

We probably never encountered a case where we needed to reload live outs
in a loop before, but after enabling clustered subgroup reductions
dEQP-VK.subgroups.clustered.compute.subgroupclusteredmin_{i,u}64vec4_requiredsubgroupsize
hits this case and fails in RA validation without this fix.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32435>
2024-12-02 18:06:18 +00:00
Faith Ekstrand
173171f73e nvk: Advertise Vulkan 1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
dbf4424d07 nvk: Add new Vulkan 1.4 features and properties
These are the features and properties that don't already exist in
extensions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
f9e993dfaf nvk: No-op implement VK_KHR_global_priority
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
0819e04f21 nvk: Increase push constant space to 256B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
218fff2d5c vulkan: Update XML and headers to 1.4.303
Also fix vk_cmd_queue generation for dropped KHR suffixes

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/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
2fae75b278 treewide: Stop putting enum in front of Vulkan enum types
The Vulkan headers add typedefs to fix aliasing issues whenever a type
gets renamed.  However, C doesn't allow "enum typedef" so this doesn't
work if people stick the "enum" keyword in front.

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/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
54aeff37ee vulkan: Add Vulkan 1.4 feature aliases
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/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
6fe6c42903 vulkan: Allow the same item to show up twice in core version <requires>
The way the XML is being organized these days, they're doing one
<requires> section for each promoted thing and if something gets
promoted twice by different extensions.  As long as we grab the lowest
of those core versions, we should be fine.

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/32433>
2024-12-02 17:22:49 +00:00
Job Noorman
25eee91016 ir3: add reformatting commits to .git-blame-ignore-revs
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32429>
2024-12-02 16:44:50 +00:00
Bas Nieuwenhuizen
0702c554de util/perf: Fix some warnings.
Warnings about long unsigned vs. long long unsigned, so lets use the proper thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32019>
2024-12-02 15:15:52 +00:00
Christian Gmeiner
105fbaab49 v3dv: Switch to use libbroadcom_perfcntr
Switch to a common library that does all the performance counter
readout. This converts one version-dependend file to a generic one.

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/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
bb3fc7a44f v3d: Switch to use libbroadcom_perfcntrs
Switch to a common library that does all the performance counter
readout. This converts one version-dependend file to a generic one.

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/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
e531e9d616 broadcom: Add perfcount library
Copy the code from the gallium driver into a small library located
in src/broadcom.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
5d186d1386 v3dv: Switch to v3d_X(..)
Use the common helper.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
3b4636c769 v3d: Move v3d_X(..) to src/broadcom/common
It will be re-used by libbroadcom_perfcntrs

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/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
787da655d1 v3dv: Switch to v3d_ioctl(..)
Use the common helper.

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/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
0d4313951f v3d: Move v3d_ioctl(..) to src/broadcom/common
It will be re-used by libbroadcom_perfcntrs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:23 +00:00
Christian Gmeiner
fadcea80c0 broadcom/common: Make v3d_device_info.h usable for C++
We need it for our pps ds.

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/32277>
2024-12-02 14:13:23 +00:00
David Rosca
4da1756be4 radeonsi/vcn: Create encode DPB surfaces with PIPE_BIND_VIDEO_ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
7d27de70af radeonsi/vcn: Create decode DPB surfaces with PIPE_BIND_VIDEO_DECODE_DPB
Always use surface for DPB now that it is not GFX12 only.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
1d206ca94c radeonsi: Support PIPE_BIND_VIDEO_DECODE/ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
308bae950f ac/surface: Add RADEON_SURF_VIDEO_REFERENCE
Select supported swizzle mode for VCN DPB surfaces.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
Kenneth Graunke
92797c6878 nir/algebraic: Reassociate fadd into fmul in DP4-like pattern
This extends the optimization from commit 09705747d7 ("nir/algebraic:
Reassociate fadd into fmul in DPH-like pattern") to a chain of 4 ffmas
for a DP4-style pattern.

Moving the add to the other end of the sequence allows it to be fused
into an FMA.

fossil-db results from Alchemist:

   Totals:
   Instrs: 158544142 -> 158490516 (-0.03%); split: -0.04%, +0.00%
   Subgroup size: 7808912 -> 7808920 (+0.00%); split: +0.00%, -0.00%
   Cycle count: 17859550672 -> 17859491966 (-0.00%); split: -0.01%, +0.01%
   Spill count: 84652 -> 84494 (-0.19%); split: -0.37%, +0.18%
   Fill count: 160728 -> 160623 (-0.07%); split: -0.29%, +0.23%
   Scratch Memory Size: 4278272 -> 4272128 (-0.14%); split: -0.29%, +0.14%
   Max live registers: 32411695 -> 32409789 (-0.01%); split: -0.01%, +0.00%
   Max dispatch width: 5627856 -> 5627920 (+0.00%); split: +0.00%, -0.00%
   Non SSA regs after NIR: 185359099 -> 185307703 (-0.03%); split: -0.03%, +0.00%

   Totals from 16378 (2.56% of 640872) affected shaders:
   Instrs: 9818723 -> 9765097 (-0.55%); split: -0.58%, +0.04%
   Subgroup size: 194056 -> 194064 (+0.00%); split: +0.01%, -0.01%
   Cycle count: 294967108 -> 294908402 (-0.02%); split: -0.58%, +0.56%
   Spill count: 10088 -> 9930 (-1.57%); split: -3.09%, +1.53%
   Fill count: 24738 -> 24633 (-0.42%); split: -1.90%, +1.48%
   Scratch Memory Size: 439296 -> 433152 (-1.40%); split: -2.80%, +1.40%
   Max live registers: 1297204 -> 1295298 (-0.15%); split: -0.22%, +0.07%
   Max dispatch width: 133232 -> 133296 (+0.05%); split: +0.14%, -0.10%
   Non SSA regs after NIR: 11999084 -> 11947688 (-0.43%); split: -0.43%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32197>
2024-12-02 13:15:16 +00:00
Lionel Landwerlin
888f63cf1b anv/iris: leave 4k alignments for clear colors with modifiers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17f97a69c1 ("iris: Reduce clear color state alignment to 64B")
Fixes: 063715ed45 ("anv: Reduce clear color state alignment to 64B")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12195
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13057
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32422>
2024-12-02 12:51:45 +00:00
Collabora's Gfx CI Team
52f13f5603 Uprev Piglit to 468221c722481c470e6a23760b914c33143c2af6
d04d6fff00...468221c722

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32272>
2024-12-02 12:13:05 +00:00
Sergi Blanch Torne
a4e3ff0464 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit fd14b34923.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32420>
2024-12-02 11:38:20 +00:00
Michel Dänzer
8197111881 winsys/amdgpu: Always use amdgpu_device_get_fd for aws->fd
If the caller passed in the same DRM file description, use it for sws->fd
as well. This is simpler than the previously reverted commit and also
fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/12208.

v2:
* Move fallback sws->fd assignment to proper scope, fixes CI failures.
* Remove close(sws->fd) from amdgpu_winsys_create failure path, it can
  never be a valid file descriptor != aws->fd there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32377>
2024-12-02 10:38:22 +00:00
Michel Dänzer
f873ee506f Revert "winsys/amdgpu: fix FD mismatch"
This reverts commit 9223528059.

Not needed. (The amdgpu_screen_winsys::input_fd reference in the comment
didn't make sense, there was no such thing)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32377>
2024-12-02 10:38:22 +00:00
Rhys Perry
fd19ff0b9e aco: force linear for event_vmem_sample and event_vmem_bvh
I don't know if this issue affects GFX12, but workaround it anyway to be
safe.

fossil-db (gfx1200):
Totals from 3463 (4.36% of 79395) affected shaders:
Instrs: 9794280 -> 9833253 (+0.40%); split: -0.00%, +0.40%
CodeSize: 52306040 -> 52457988 (+0.29%); split: -0.01%, +0.30%
Latency: 90549385 -> 93617517 (+3.39%); split: -0.00%, +3.39%
InvThroughput: 13189030 -> 13602942 (+3.14%); split: -0.00%, +3.14%

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/32373>
2024-12-02 10:13:39 +00:00
Rhys Perry
86c63b29bc aco/gfx12: insert wait between VMEM WaW
https://github.com/llvm/llvm-project/pull/105549

fossil-db (gfx1200):
Totals from 1783 (2.25% of 79395) affected shaders:
Instrs: 7398391 -> 7404566 (+0.08%); split: -0.00%, +0.08%
CodeSize: 38862456 -> 38886364 (+0.06%); split: -0.00%, +0.06%
Latency: 83191513 -> 84211504 (+1.23%); split: -0.00%, +1.23%
InvThroughput: 15185936 -> 15345744 (+1.05%); split: -0.01%, +1.06%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32373>
2024-12-02 10:13:39 +00:00
Rhys Perry
9f3607de76 nir/tests: fix SSA dominance in opt_if_merge tests
It isn't necessary for these ALU instructions to be used in the next IF.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c437f2e79c ("nir/tests: Add tests for opt_if_merge")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12211
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32391>
2024-12-02 09:38:22 +00:00
Benjamin Cheng
e9d9c67eab radv/video: enable by default on vcn2/3 with latest fw
The latest FW in the linux-firmware repo provides the required features
to pass all the CTS tests.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32407>
2024-12-02 08:30:08 +00:00
Sergi Blanch Torne
fd14b34923 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-12-02 08:00 UTC
* End: 2024-12-02 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32183>
2024-12-02 07:07:07 +00:00
David Rosca
76e3004fef radv/video: Always use setup reference slot when valid
Reviewed-by: Benjamin Cheng <ben@bcheng.me>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10977
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414>
2024-12-02 06:26:34 +00:00
David Rosca
ef6facac15 radv/video: Fix IB signature checksum
Reviewed-by: Benjamin Cheng <ben@bcheng.me>
Fixes: 152b06acd8 ("ac/vcn: allow sq signature package to be skipped")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414>
2024-12-02 06:26:34 +00:00
Timothy Arceri
6ca81adffc nir: allow loops with unknown induction var initialiser to unroll
If the condition of the loop terminator is based on an unsigned value we
can in some cases find the max number of possible loop trips. With the
max loop trips know a complex unroll can unroll the loop.

For example:

   uniform uint x;
   uint i = x;
   while (true) {
      if (i >= 4)
         break;

      i += 6;
   }

The above loop can be unrolled even though we don't know the initial
value of the induction variable because it can have at most 1 iteration.

There were no changes with my shader-db collection. Change was inspired
by MR #31312 where builtin shader code failed to unroll.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31701>
2024-12-02 11:44:33 +11:00
Dave Airlie
fcaf0f2590 vulkan: update to 302 headers for av1 encode
Some of the spirv AMDX stuff probably broke things, but it should
still build.

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32401>
2024-12-02 06:29:00 +10:00
Connor Abbott
8fe3674df8 vulkan/runtime,radv: Add shared BVH building framework
This is mostly adapted from radv's BVH building. This defines a common
"IR" for BVH trees, two algorithms for constructing it, and a callback
that the driver implements for encoding. The framework takes care of
parallelizing the different passes, so the driver just has to split the
encoding process into "stages" and implement just one part for each
stage.

The runtime changes are:
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
The radv changes are;

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 20:08:35 +01:00
Connor Abbott
f8b584d6a5 vulkan/runtime,radv: Add shared BVH building framework
This is mostly adapted from radv's BVH building. This defines a common
"IR" for BVH trees, two algorithms for constructing it, and a callback
that the driver implements for encoding. The framework takes care of
parallelizing the different passes, so the driver just has to split the
encoding process into "stages" and implement just one part for each
stage.

The runtime changes are:
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
The radv changes are;

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 16:08:06 +00:00
Konstantin
d19af11e49 vulkan/meta: Add a pipeline cache
RADV has a pipeline cache for meta shaders that can be used. It is also
required to correctly identify the pipelines as meta pipelines.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 16:08:06 +00:00
Connor Abbott
c1c39116a7 vulkan/runtime: Add driver callbacks for BVH building
All of these are functions that could reasonably be incorporated into a
Vulkan extension, but are currently missing. While we could in theory do
BVH building without them, using them simplifies the code significantly
and both radv and turnip can reasonably implement them.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 16:08:06 +00:00
Job Noorman
8ae5b27ee0 ir3: reformat after refactoring in previous commit
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
fda91b49d7 ir3: refactor builders to use ir3_builder API
All functions that used to take an ir3_block as argument to append
instructions to now take an ir3_builder as argument.

Add an ir3_builder field to ir3_context and replace all uses of
ir3_context::block for creating instructions with ir3_context::build.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
6c38402e9a ir3: use generic INSTR0 implementation for ir3_NOP
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
af92e4934e ir3: add ir3_after_instr_and_phis helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
62b23f175e ir3: don't update builder cursor for IR3_CURSOR_AFTER_BLOCK
During instruction selection, instructions are sometimes emitted to
blocks other than the current one. For example, to predecessor blocks
for phi sources or to the first block for inputs. For those cases, a new
builder is created to emit at the end of the target block. However, if
the target block happens to be the same as the current block, the main
builder would not be updated to point past the new instructions.
Therefore, don't update the cursor when it points to the end of a block
to ensure that new instructions will always be added at the end.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Arseny Kapoulkine
6a3944a195 radv: On GFX11, use box sorting heuristic based on ray flags
Use box with largest ray interval for shadow rays (terminate on first
hit) as it maximizes the probability of finding some object in that box;
for reflection (closest hit) rays, use midpoint instead, which defers
processing of larger boxes the ray origin is in in favor of smaller
boxes closer to origin.

Since the sorting mode must be uniform, when terminate_on_first_hit flag
is divergent, we leave it as closest.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32416>
2024-12-01 05:20:58 +00:00
Robert Mader
379de4cdce freedreno: Support offset query for multi-planar planes
This allows `gbm_bo_get_offset()` to return the correct offset for e.g.
the second plane of a resource with the NV12 format. Crucially this
fixes direct scanout / hardware plane usage in Mutter and possibly other
clients.

While on it also add support for stride, modifier and n_planes queries.
The later two should not change in behavior and just safe a few CPU
cycles. The stride query support in theory fixes queries for multi-plane
formats, however in practice most/all currently used formats such as NV12,
P010 and YUV420 use the same stride for all planes.

Cc: mesa-stable
Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32282>
2024-11-29 18:10:28 +01:00
Job Noorman
1cd09a0177 tu: advertise VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
659e033897 ir3: lower clustered rotates to shuffles
shfl.rdown only works for the non-clustered case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
d5d0628728 nir/lower_subgroups: add option to only lower clustered rotates
On ir3, we have native support for full rotates but not for clustered
ones.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
eba6a70a66 tu: advertise VK_SUBGROUP_FEATURE_CLUSTERED_BIT
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
c44f998d69 ir3: add support for clustered subgroup reductions
This is implemented differently depending on the cluster size:
- At most 8: in this case, executing brcst.active will leave the
  reduction in the last invocation of each cluster. Simply iterate the
  clusters and broadcast the last invocation to the rest.
- Otherwise, also iterate the clusters but execute the usual
  reduce_clusters_ir3 loop for each of them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
5dbd2b08f4 nir/lower_subgroups: disable boolean reduce when not supported
lower_boolean_reduce only supports ballot_components == 1. Fall back to
lower_scan_reduce when this is not the case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
493f7b8084 nir/lower_subgroups: add extra filter data to options
It might be convenient for filter implementations to have access to
extra information. This will be used, for example, by ir3 to access
compiler features.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
c789a0a3d3 ir3: rename cluster_size to brcst_cluster_size
In preparation for the next commit where we'll want to use cluster_size
for the intrinsic's cluster size.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
0be9ff47b4 ir3: add helper to get the subgroup size
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
2e2a36ddb0 ir3: add codegen for read_getlast_ir3
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
e6c63a88fb nir: add read_getlast_ir3 intrinsic
Like read_first_invocation but using getlast. Note that I intentionally
used the name of the ir3 instruction in the name as its semantics are
tricky to exactly describe otherwise.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
7bab441ae6 ir3: remove unused ir3_nir_lower_64b_subgroups
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
5e9cf354ca ir3: use generic lowering for 64b scan/reduce
Now that we use shfl for lowering shuffle operations, the generic
lowering of scan/reduce to shuffles results in faster code than our
custom loop for 64b operations.

Note that this was measured using a micro benchmark on full subgroups.
The generic lowering might be slower when not all invocations are active
but this should be a rare case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
60e1615ced nir/lower_subgroups: support unknown subgroup size
Some targets (e.g., ir3) don't always know the exact subgroup size.
Calculate the maximum subgroup size in that case by multiplying
ballot_components and ballot_bit_size.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Simon Perretta
cee548095a CODEOWNERS: update for new pco compiler tree
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
e67e44522f pco: initial validation boilerplate and SSA checks
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
b35ba3a8a5 pco: modifier propagation optimization, shared opt context boilerplate
Tackles cases where mod propagation candidate ops have a restriction on one
of their sources but are commutative, thus allowing the restriction to be
worked around by swapping the sources.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
527b38d1fd pvr, pco: rewrite compiler/driver interface for vs & fs I/O
Basic vertex/fragment shader I/O and sysval allocation rewritten to use
the new compiler/driver interface, with allocation moved entirely into
the driver.

RHW coeffs now only emitted when required.

Boilerplate support for converting formats for vs inputs/fs outputs.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
99852fbe4d pco: track the number of bytes encoded for each function
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
0f720a5c98 pco: add opt subpass for propagating comps referencing hw regs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
37d4791343 pco: vec coalescing improvement to register allocation
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
ce8392024d pco: add helpers for overriding ref chans and offsetting vals
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
71480c075e pco: temporarily add hardcoded vs/fs I/O for testing, BXS-4-64 iteration support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
cf83858a47 pco: add mappings and translation for ditr
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
a89a9b65f8 pco: re-indexing debug option and additional vector and component tracking
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
d55e98a32d pco: vector component tracking, vector collation when ingesting NIR
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
b4049c9b0a pco: add public print wrappers
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
e57c4b5b3b pco: initial implementation of translation and passes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
f6a729563c pco, pygen: isa itrsmp op
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
d5bab0c157 pco, pygen: isa ditr op
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
84766a9157 pco, pygen: amend bitfield assertion messages
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
58337957ac pco, pygen: restructure igrp alu components into arrays
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
fee1f029cc pco, pygen: add defs and mappings for common ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
3c081c9abf pco, pygen: drop unspecified bit sizes for references
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
fcf05a732e pco: print ranges of non-ssa refs with >1 channel, datatypes for immediates
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
981e6cfabc pco, pygen: re-order some mods to match their evaluation order
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
fab0ef7d59 pco, pygen: add support for instructions with variable srcs/dests
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
45139c72f7 pco: set up and tear down glsl type singleton with context
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
1b36e34095 pco, pygen: support querying ref mods, if op/ref mods have been set
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
687abeee5a pco: adjust align padding to be per-function instead of per-shader
Shaders may contain more than one function, e.g. a preamble
and an entrypoint, which require alignment.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
59a4b9ff2d pco, pygen: add better exception messages
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
f57b817f7b pco, pygen: add initial uvsw op boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
70aa0df836 pco: boilerplate nir lowering passes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
bf22e4076b pco: additional ref functions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
6a3ba1f1f4 pco, pygen: instruction to instruction group mapping, printing
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
0d85b71387 pco, pygen: distinguish hw ops that are built directly into instruction groups
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
f3cc7c128c pco: add verbose printing debug option
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
6b0a738bfd pco, pygen: common underscore replacement for op names
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
561098cf7d pco, pygen: add bitset support for op mods
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
7c57e25550 pco, pygen: move unnamed tuple structs into classes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
08ce5c0e23 pco: basic instruction printing
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8b193b4dd2 pco, pygen: generate string representations of enum elements
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
f014a14e2c pco: printing and validation boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
3c51c6ac17 pco: NIR translation and PCO IR pass boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
f179e5a220 pco: define data structures and basic builder implementation with ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
d47ac545d5 pco, pygen: generate op and mod info
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8887bc0d47 pco, pygen: query bytes required for each variant
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
5670eb6732 pco, pygen: isa control alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
d423ac4fc7 pco, pygen: isa bitwise alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
f886677843 pco, pygen: isa backend alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
9fa96b6140 pco, pygen: isa main alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ba959bc992 pco, pygen: isa destination definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
b03d618f63 pco, pygen: isa internal source selector definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ed5dc3e64d pco, pygen: isa upper sources definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
9b64e1a8de pco, pygen: isa lower source definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ce5de01d1a pco, pygen: isa instruction group header validation and encoding support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
4ca21e7038 pco, pygen: define and emit isa instruction group header variant fields
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ee312ebd6f pco, pygen: define basic isa field types
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
77a183fc14 pco, pygen: enum emit support, define some enums and op/ref mods/types
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
4d8653a643 pco: pygen stubs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
fa9892026e pco: suppress warning for functions passing structs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
14d7ade582 pvr: drop PVRX macro
All core-specific selections will take place at runtime.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
cbc9896264 pvr: fix GetInstanceProcAddr ubsan warning when _instance == NULL
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8f1613accf pvr: add device info for additional iterator features
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
898dd3bdf6 pvr: track pipeline flags
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8d440ece64 pvr: add shader compilation stubs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
7a32dc673b pvr: add device info and functions for calculating available temps
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
aea38c1e47 pvr: remove pipeline shader hard-coding support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8702dfce62 pvr: connect basic pco functions to the driver
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
008b635031 pco: stubs for SPIR-V/NIR compilation options
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
3349b5b296 pco: add env debug option parsing
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
e90c851b8c pvr, pco: Add new compiler framework and shader gen stubs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
ab1298e926 pvr: add initial pco stub/boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Frank Binns
b82793221a pvr: add 36.53.104.796 (BXS-4-64) to the list of supported GPUs
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Frank Binns
cd630fe704 pvr: add TI j721s2 as a supported device
This is found in various boards, such as the TI SK-AM68.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
David (Ming Qiang) Wu
e359b3c525 radeonsi/vcn: support 12bit YUV420 AV1 decoding
Add 12bit AV1 decoding support for PIPE_VIDEO_PROFILE_AV1_PROFILE2.
This feature is tested on VCN5 and VCN4.

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
2024-11-29 14:38:30 +00:00
David (Ming Qiang) Wu
389c77d127 frontends/va: add PIPE_VIDEO_PROFILE_AV1_PROFILE2
Add PIPE_VIDEO_PROFILE_AV1_PROFILE2 and
enable with VA_CHECK_VERSION(1, 23, 0) check

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
2024-11-29 14:38:30 +00:00
David (Ming Qiang) Wu
9c6d14d736 frontends/va: adding PIPE_FORMAT_P012
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
2024-11-29 14:38:30 +00:00
Erik Faye-Lund
284952b864 mesa: error-check GL_TEXTURE_TILING_EXT params
This just seems like the right thing to do. We shouldn't allow
unexpected params just like that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
7b0d401265 st/mesa: check requirements for MESA_texture_const_bandwidth
This extension depends on EXT_memory_object, and is not usable without
it. So let's disable it, so applications don't try to use it.

Fixes: 5cccd6d689 ("mesa: Implement MESA_texture_const_bandwidth")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
42205ac386 mesa/main: properly check for EXT_semaphore_win32
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
640837ff78 mesa/main: properly check for EXT_semaphore
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
da04f4cb92 mesa/main: properly check for EXT_memory_object_win32
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
d90c81740d mesa/main: properly check for EXT_memory_object_fd
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
0284e7fedb mesa/main: properly check for EXT_memory_object
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:26 +00:00
Philipp Zabel
dddec9a66d teflon: Support fused ReLU6 activation via output saturation
If the output tensor quantization range does not exceed 6.0, ReLU6 can
be replaced with ReLU: output values larger than 6.0 are clipped by
output saturation.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32388>
2024-11-29 13:32:42 +00:00
Hans-Kristian Arntzen
6370acbead radv: Add sparse mappings to radv_check_va.py.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146>
2024-11-29 12:57:42 +00:00
Hans-Kristian Arntzen
cb15b34295 radv/winsys: Report VA mappings in bo_log too.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146>
2024-11-29 12:57:42 +00:00
Philipp Zabel
a9f0624d6b teflon: Reject per-axis quantization
Until a workaround for missing hardware support is implemented, stop
pretending to support convolution operations on tensors with per-axis
quantization.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32387>
2024-11-29 11:20:27 +00:00
Philipp Zabel
0501a3b5c1 etnaviv/ml: Create combined input tensors for addition first
Fix addition where one summand was already used as input to an earlier
operation, for example in the last operation of MobileNet V2 residual
blocks.

Fixes an assertion when trying to run MobileNet V2:

  .../src/gallium/drivers/etnaviv/etnaviv_ml.c:58: etna_ml_create_tensor: Assertion `size == pipe_buffer_size(res)' failed.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31987>
2024-11-29 10:46:33 +00:00
Philipp Zabel
47b4aef5db teflon/tests: Enable int8 tests
Enable signed 8-bit convolution tests.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:53:01 +01:00
Philipp Zabel
563316417a teflon/tests: prep test executor for signed convolutions
Subtract 128 from the input and output tensor zero points, to keep
them in int8_t range (conv2d.tflite is set up for uint8_t).

Set weight tensor zero point to zero, as required by TensorFlow Lite
for int8_t weight tensors.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:52:58 +01:00
Philipp Zabel
4153154423 etnaviv/nn: Add support for signed 8-bit tensors
The hardware only supports unsigned 8-bit tensors, but with the
configurable zero point we can map signed 8-bit integers to unsigned
8-bit integers by adding a constant offset of 128 to all values and to
the zero point setting.

This requires adding 128 to all input tensors and subtracting 128
from all output tensors during inference.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:52:56 +01:00
Philipp Zabel
f9c34a3eb0 teflon: Add is_signed parameter to ml_subgraph_invoke and ml_subgraph_read_output
There probably is a better way to provide this information to the
gallium driver, but this allows the driver to apply conversions as
needed when writing input tensors and reading back output tensors.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:52:48 +01:00
Peyton Lee
1ca2137a84 radeonsi/vpe: optimize software functions
1. Break down the configuration functions
2. Remove unnecessary debug messages and redundant coding
3. Add support for color primaries

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32296>
2024-11-29 08:37:47 +00:00
Timothy Arceri
05d2fe2372 glsl: remove glsl/program.h
It is now unused.

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/32402>
2024-11-29 14:31:30 +11:00
Timothy Arceri
8142797721 glsl: move _mesa_glsl_compile_shader() declaration
The function is in glsl_parser_extras.cpp so move the declaration to
glsl_parser_extras.h

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/32402>
2024-11-29 14:30:03 +11:00
Benjamin Cheng
323b59a5b5 radv/video: support event for pre-VCN4 decode queues
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400>
2024-11-29 10:03:48 +10:00
Benjamin Cheng
1689d88e4a radv/video: support event for pre-VCN4 encode queues
Prior to VCN4, the encode queue is separate from the decode queue. For
encode, the WRITE_MEMORY command can be executed with similar framing as
for VCN4, but notably there is no signature support, so it must be
skipped.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400>
2024-11-29 10:02:14 +10:00
Benjamin Cheng
152b06acd8 ac/vcn: allow sq signature package to be skipped
This is preparing for radv event support on pre-VCN4 encode queues.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400>
2024-11-29 10:01:49 +10:00
Boris Brezillon
25c0a11cf7 panvk: Add a flag to force SIMULTANEOUS_USE
Turns out we have a bunch of test that fail when the descriptor
ring-buffer is involved. Add a flag so we can extend testing coverage
without adding more CTS tests.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
46a0231c9c panvk/csf: Don't disable SIMULTANEOUS_USE when tracing is enabled
Now that we switched to event-based tracing, we can keep the
SIMULTANEOUS_USE flag even when tracing is enabled.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
bd49fa68b0 panvk/csf: Use event-based CS tracing
Use the new event-based tracing system to capture IDVS/COMPUTE/FRAGMENT
jobs and their context.

When tracing is enabled, the descriptor ring buffer is replaced by
a bigger linear buffer such that descriptors are not recycled before
we get a change to decode the trace.

If the decode buffer is too small and a OOB is detected, the driver will
suggest the user to allocate a bigger buffer with the
PANVK_{DESC,CS}_TRACEBUF_SIZE env vars.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
bf05842a8d pan/cs: Add an event-based tracing mechanism
Interpreting the command buffer only really works if everything is
static, but panvk started to make extensive use of loops, and
conditionals which depends on memory values that get updated by the
command stream itself. This makes it impossible to walk back to the
original state in order to replay the CS actions.

Move away from this approach in favor of an event-based tracing
mechanism recording particular CS commands and their context at
execution time. Of course, that means the auxiliary descriptors
shouldn't be recycled until the traces are decoded, but that's more
tractable. We just need to turn the descriptor ring buffers into
linear buffers with a guard page, and crash on OOB, with a message
suggesting the user to tweak the maximum trace buffer sizes.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
4e5f75d1d7 pan/cs: Add a LOAD_IP pseudo instruction
Will be useful if we want to be able to make the trace events point to
the instruction they are recording.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
8c30c2924f pan/decode: Provide a helper to print messages outside of the decoding path
Just a wrapper around pandecode_log() taking the lock and making sure
the dump stream is opened.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
7d0dc3d30c pan/decode: Add a helper to print CS binaries without interpreting them
In panvk, we want to switch from interpretation-based decoding to
event-tracing based decoding, so we no longer depend on the memory state
to get accurate job information.

Even if we're not interested in interpreting the CS, we still want to
dump CS binaries so developers can know what's passed to the GPU.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
41d3f16a28 pan/decode: Rename pandecode_cs() into pandecode_interpret_cs()
pandecode_cs() does both the decoding and the interpretation.
Rename the function to avoid the confusion.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
1a8ef18aeb pan/decode: s/interpret_ceu/interpret_cs/
Everything else is prefixed cs, not ceu, so let's drop the remaining
ceu occurrences.

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/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
3778df8778 pan/decode: Untangle CS disassembling and interpretation
Despite the name, disassemble_ceu_instr() does more than disassembling
the instruction, it also partially interpret it.

Add a print_cs_instr() helper that does just the disassembling/printing
part, and move the remaining of disassemble_ceu_instr() to
interpret_ceu_instr().

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/32284>
2024-11-28 20:21:52 +00:00
Rob Clark
dfd519ed80 vdrm+tu+fd: Make cross-device optional
Similar to commit 087e9a96d1 ("venus: make cross-device optional"),
make VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE use optional, because qemu does
not support this.

Fixes: 06e57e3231 ("virtio: Add vdrm native-context helper")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32392>
2024-11-28 19:55:11 +00:00
Caio Oliveira
a9acc0bea4 util/ra: Remove unimplemented function declaration
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32395>
2024-11-28 19:19:26 +00:00
Timur Kristóf
2089bf7b57 radv: Use default 0 for undefined builtin PS inputs.
The previous code not only left them undefined, but also
didn't increment the array index, so subsequent PS inputs
would be broken after the undefined one.

Note that this doesn't affect any valid Vulkan apps, but it makes
the code a bit simpler and it makes undefined inputs a little more
forgiving, at no expense for valid PS.

This code actually uncovers a bug in Zink, so I'm also documenting
the failing Zink test case.

Signed-off-by: Timur Kristóf <timur.kristof@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/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
b0b1a07193 radv: Remove now unused num_prim_interp from shader_info.
Signed-off-by: Timur Kristóf <timur.kristof@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/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
12b9b461e5 radv: Emit SPI_PS_IN_CONTROL when emitting PS inputs on GFX10.3.
GFX10.3 keeps track of per-vertex and per-primitive PS inputs
separately in NUM_INTERP / NUM_PRIM_INTERP,
which we only really know when emitting the inputs.

Signed-off-by: Timur Kristóf <timur.kristof@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/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
e2b8c4a9ac radv, aco: Consolidate num_interp + num_prim_interp into num_inputs.
num_inputs contains the total number of FS inputs.

Note that this also fixes a bug where some calculations in RADV
and ACO were missing the per-primitive attributes from the LDS
usage of PS.

Signed-off-by: Timur Kristóf <timur.kristof@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/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
e5a9ae912b radv: Slightly simplify potentially per-primitive FS inputs.
Add export_prim_id_per_primitive for mesh shaders.
This prepares to also configure some of these to be per-primitive
in the future, even in the traditional pipeline.

Signed-off-by: Timur Kristóf <timur.kristof@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/32220>
2024-11-28 18:14:56 +00:00
Timur Kristóf
930243bf36 radv: Reorder potentially per-primitive FS builtins.
There are some FS built-ins that can be per-vertex or
per-primitive depending on whether a mesh shader is used:
primitive ID (implicit in VS), layer and viewport.

However, the HW requires per-primitive FS inputs to be ordered last.
This causes bugs when the same unlinked FS is used together
with VS/TES/GS and MS (with unlinked ESO or fast-linked GPL).

To solve this problem, we reorder the FS inputs so that these
potentially per-primitive inputs go after per-vertex inputs but
before per-primitive inputs.

Signed-off-by: Timur Kristóf <timur.kristof@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/32220>
2024-11-28 18:14:56 +00:00
Alyssa Rosenzweig
f4a3ba5302 asahi,vtn: precompile kernels
switch libagx to the precompilation pipeline. see the big comment in the
previous commit for why we're doing this.

while doing so, we move some dispatch stuff. there was so much churn from
precompile that this avoids doing the churn twice. that new header will be used
for DGC down the road.

there's also a small vtn/bindgen patch in here to skip bindgen'ing entrypoints,
as that conflicts with the new dispatch macros. this is the sane behaviour, we
just need to do the full precomp switch across the tree at once.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32339>
2024-11-28 17:34:12 +00:00
Alyssa Rosenzweig
e3001352ad nir: add helpers for precompiled shaders
v2: generalize function signatures.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> [v1]
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> [v1]
Acked-by: Mary Guillemard <mary.guillemard@collabora.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32339>
2024-11-28 17:34:12 +00:00
Rhys Perry
4c3809e7fc aco: use small_vec in RegCounterMap
This seems to be a little faster.

insert_NOPs (navi31):
Difference at 95.0% confidence
	-11.484 +/- 6.13377
	-1.62767% +/- 0.860593%
	(Student's t, pooled s = 5.71913)

insert_NOPs (gfx1200):
Difference at 95.0% confidence
	-35.6745 +/- 4.97972
	-8.1236% +/- 1.10453%
	(Student's t, pooled s = 4.6431)

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/32374>
2024-11-28 17:07:34 +00:00
Rhys Perry
7a500c8b22 aco: make small_vec copyable
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/32374>
2024-11-28 17:07:34 +00:00
Marek Olšák
c26da94b4c nir/opt_varyings: replace options::lower_varying_from_uniform with a cost number
This is a simple way for drivers to enable uniform expression propagation
without having to set any callbacks for it. It replaces the old option.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32390>
2024-11-28 15:39:46 +00:00
Marek Olšák
428613b690 nir/opt_varyings: add a default callback for varying_estimate_instr_cost
used when the driver doesn't set it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32390>
2024-11-28 15:39:46 +00:00
Marek Olšák
1f238f0a2e nir/opt_varyings: always call remove_dead_varyings in init_linkage
so that we don't have to do it after every init_linkage call.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32390>
2024-11-28 15:39:46 +00:00
Scott Moreau
7d1a32fafd dri: Fix hardware cursor for cards without modifier support
After the breaking commit, gbm_bo_create_with_modifiers({LINEAR}) returns
a BO with gbm_bo_get_modifier() = INVALID. This restores the functionality
and fixes most notably, hardware cursors for cards without modifiers.

Fixes #12039.

Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31725>
2024-11-28 14:52:42 +00:00
Marek Olšák
c1442030ec vc4: lower clip planes in st/mesa
This fixes:
    spec@glsl-1.20@execution@clipping@vs-clip-vertex-enables
with the latest nir_lower_clip changes.

The driver breaks when POS is stored before CLIP_DIST.
That's the only change caused by previous commits according to
VC4_DEBUG=nir.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
c50c9e9bf9 nir/lower_clip: implement ClipVertex lowering for GS + lowered IO correctly
This is currently needed to fix d3d12 for st_unlower_io_to_vars.

The idea is to track the current value of ClipVertex in a temporary
variable, and for every emit_vertex, we load the ClipVertex value from
the temporary (which matches the stored value) and insert new CLIP_DIST
stores before emit_vertex.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
a648acc287 nir/lower_clip: convert nir_lower_clip_gs to nir_shader_intrinsics_pass
and add struct lower_clip_state to hold the state for both
nir_lower_clip_gs and nir_lower_clip_vs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
3b8e4a71fe nir/lower_clip: set clip_distance_array_size outside of create_clipdist_vars
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
b4ef50bca8 nir/lower_clip: separate code for IO variables and intrinsics
The code for IO variables was interleaved with code for IO intrinsics,
which was difficult to follow.

lower_clip_outputs is split and replaced by more accurate names:
lower_clip_vertex_var and lower_clip_vertex_intrin

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
3e40c2010e nir/lower_clip: don't set cursor to fix crashes due to removed instructions
The original builder already points at the end of the function impl.
Just use that.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Job Noorman
1a0b4531d1 ir3: add workaround for predication hardware bug
Predication instructions sometimes need extra nops to workaround what
seems to be a hardware bug: prede needs 6 nops and the second
predt/predf of a predt/predf pair needs 4 nops.

The prede workaround is enabled starting from a6xx gen3 and the
predf/predt workaround from a6xx gen4, following the blob.

Fixes rendering corruption in God of War (2018).

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32366>
2024-11-28 13:08:36 +00:00
Job Noorman
c129547d9c ir3/isa: allow rpt6/rpt7
The blob sometimes uses this for nop.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32366>
2024-11-28 13:08:36 +00:00
Danylo Piliaiev
794a092693 tu: Handle cmdbuf and rp_blit flags of TU_DEBUG_STALE_REGS_FLAGS
The flags handling was accidentally dropped before.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32352>
2024-11-28 12:48:15 +00:00
Erik Faye-Lund
14bca200be panvk: widen type before multiplying
This function returns an uint64_t, but returns the result of two
uint32_t values. If we don't widen at least one of them before
returning, the multiplication wraps large results.

So let's widen the type first, so we can preserve large offsets.

Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1634943
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
2024-11-28 10:22:22 +00:00
Erik Faye-Lund
2c6bc9615d panvk: correct signedness of timestamps
These functions returns signed values, so we shouldn't use an unsigned
variable to store one of them in.

Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1635021
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
2024-11-28 10:22:22 +00:00
Erik Faye-Lund
22985caf3f panfrost: sanity-check alignment
The page-alignment should always be a positive power of two. Let's
assert that, to avoid confusion.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1605086
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
2024-11-28 10:22:21 +00:00
Erik Faye-Lund
0d51248e5d lima: avoid memleak on error
We should free this pointer, otherwise we're leaking it.

CID: 1521251
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
2024-11-28 09:59:51 +00:00
Erik Faye-Lund
b8bb9e08bc lima: add assert to validate list-lenght
If this could be zero, we'd end up with divisions by zero here, which
uh... would be bad? I don't think that can happen, so let's assert about
this, to make it clear what's going on.

CID: 1444660
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
2024-11-28 09:59:51 +00:00
Erik Faye-Lund
e50f7fad86 lima: fixup typo
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
2024-11-28 09:59:51 +00:00
Boris Brezillon
0109e012b8 panvk: Filter out input-attachment usage on non renderable formats
Fixes dEQP-VK.api.info.unsupported_image_usage.*.input_attachment_*
failures.

Signed-off-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/32378>
2024-11-28 09:28:14 +00:00
David Rosca
489ba819b0 radeonsi/vcn: Support tiling for JPEG decode
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32301>
2024-11-28 08:52:37 +00:00
Caterina Shablia
7ca8c19246 Revert "nir: introduce instance_index system value"
This reverts commit b9be1f1f20.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32332>
2024-11-28 07:53:01 +00:00
Caterina Shablia
9d5ba87ca1 Revert "nir: lower INSTANCE_{ID,INDEX} to an offset load_instance_{index,id} respectively"
This reverts commit a5bcf566a9.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32332>
2024-11-28 07:53:01 +00:00
Samuel Pitoiset
9bae92f659 radv: add support for capturing RGP per-submit
This is pretty basic but it can be enabled with MESA_VK_TRACE=rgp and
MESA_VK_TRACE_PER_SUBMIT=1.

Can be useful for compte-only workloads.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12202
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
f3272f0044 radv: add new start/stop sqtt helpers for capturing with SQTT
They will be also used for per-submit captures.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
df52c70b8a radv: finish tools after cleaning meta resources
Otherwise, the number of registered RGP pipelines could be non-zero
and this will assert.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
851a8a481b vulkan: add MESA_VK_TRACE_PER_SUBMIT
To capture RGP per-submit for compute-only workloads. Other capture
tools like RMV are not covered here.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:20 +00:00
Job Noorman
86465a3f2b ir3: add pass to select bitwise triops
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
faba4ca5f8 ir3: add codegen for bitwise triops
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
5879e4470e ir3: fix backend support for bitwise triops
- Immediates are not allowed in 2nd src.
- Immediates are 12 bits, not sign-extended.
- Only one of the first two sources can be shared when not scalar ALU.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
1333af5d77 nir/search: add is_only_used_by_{iand,ior} helpers
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
a8c947df9a nir/search: make is_only_used_by_iadd reusable
The algorithm is exactly the same for other opcodes so we don't have to
have to copy paste it.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
22fc90a116 nir: add ir3-specific bitwise triop opcodes
ir3 has a number of bitwise triops (e.g., shrm == (src0 >> src1) & src2)
that don't have NIR-equivalents. Doing instruction selection for them is
a lot more convenient using algebraic patterns than to have to manually
match for them. This patch add NIR opcodes for these instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Eric Engestrom
c51378fa6c docs: add sha sum for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Eric Engestrom
955bdb82c3 docs: add release notes for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Eric Engestrom
4b0c600fa2 docs: update calendar for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Marek Olšák
1a7c54b840 Revert "gbm: mark surface buffers as explicit flushed"
This reverts commit c49a71c03c.

It broke radeonsi.

GBM can't set __DRI_IMAGE_USE_BACKBUFFER if gbm itself doesn't use it as
a back buffer by rendering to it and calling SwapBuffers. If another
library uses it as a back buffer, that library should set
__DRI_IMAGE_USE_BACKBUFFER, not GBM. A different flag could be added
to indicate the behavior that the original commit expected.

Fixes: c49a71c03c - gbm: mark surface buffers as explicit flushed
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11996
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32345>
2024-11-27 22:48:04 +00:00
Timothy Arceri
1f954a207b glsl: remove now unused ir reader
This was used to parse glsl ir in string format and create real ir with
it. It was previously used for some really old test infrastructure which
has now been removed so lets burn this with fire also.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
722f939614 glsl: drop last remaining lower jump test
This test only tests that a redundant continue is removed. This test is
not very useful and there are hundreds of lines of supporting test
infrastructure that can be removed if we drop it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
cf188a0efb glsl: remove return lowering from glsl ir
We don't need it as nir does it for us anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
6c86b56c06 glsl: disable function return lowering in glsl ir
We just let the nir lowering pass do it instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Eric Engestrom
a37d5dcd63 radv/ci: use deqp-vk-main in radv jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
596c58b582 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
beab815670 ci/deqp: add a deqp-vk build on the main branch
To be able to run new tests as soon as they are merged, instead of
having to wait for the next official CTS release

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
328a3de7cc ci/lava: turn the $BUILD_VK check into a proper if block
Allows us to simply add something in the block in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
ec27d138cb ci/deqp: only print the commit list header when the list is not empty
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
044cab6751 ci/deqp: mention the deqp api in the version string
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
ffb6c3e1de ci/deqp: simplify generating the version description file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
72a2b92e3e ci/deqp: support having commit backports and local patches for main too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
1634ad2782 ci/deqp: fix the "is this a build on main?" check
Suggested-by: Antonio Ospite
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
601088aebb ci/deqp: simplify paths since we are already in /deqp-$deqp_api/
Some commands used relative paths, while most used complex absolute
paths; let's just avoid unnecessary complexity.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Antonio Ospite
3bdb77e378 ci/deqp: replace local android patches with upstream solution
In commit a34982063 (Support standalone executable builds on Android,
2024-09-12) upstream VK-GL-CTS added support for building deqp as an
executable command for Android, this change is included in the vulkan
branch used by build-deqp.sh so the custom patches can be dropped for
the Vulkan CTS build.

After that and by passing -DDEQP_ANDROID_EXE=ON deqp can now be built
with DEQP_API=tools.

[Eric]
Note that the upstream solution seems to be broken on EGL, so GL & GLES
continue to use the local android patches; for more details, see:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168#note_2676128

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Alyssa Rosenzweig
c2973765e2 nir: add nir_lower_constant_to_temp helper
this comes up with clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
12cc22af4c nir: add nir_remove_entrypoints helper
opposite of nir_remove_non_entrypoint. this operation comes up with
precompiling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
c076900360 nir: add nir_function::pass_flags
convenience, asahi will stash stuff here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
7d6e923a4f vtn: gather workgroup size in libraries
we have multiple kernels. that's fine, gather sizes for each.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
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/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
9c37745f9d vtn: plumb through OpEntryPoint
mark nir_functions as entrypoints according to the source.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
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/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
5555769102 nir: add workgroup size to functions
for cl kernel libraries with many entrypoints. spirv can represent, nir should
be able to as well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
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/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
ba30eb9f40 nir: add nir_foreach_entrypoint macros
for compiling libraries full of kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
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/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
83581b3f1f asahi/clc: switch to nir_lower_calls_to_builtins
common code has a generic version, so we don't need to handroll this.

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/32382>
2024-11-27 20:02:04 +00:00
Alyssa Rosenzweig
d8ece9bf3a nir: add nir_lower_calls_to_builtins pass
nir_builder for the GPU

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/32382>
2024-11-27 20:02:04 +00:00
Pierre-Eric Pelloux-Prayer
879e8bfe6d radeonsi: use bytes units in streamout
GFX10.3 and earlier were configured to count the number of dwords written,
and VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE was also configured in dw units.

GFX11+ on the other hand used nir code that would use bytes.

This commit aligns radeonsi's logic on the radv's one, and use STRMOUT_DATA_TYPE
to configure older chips to use bytes as well.

This fixes GTF-GL46.gtf40.GL3Tests.transform_feedback2.transform_feedback2_two_buffers.

It also seems to have an effect on:
  - dEQP-GLES3.functional.transform_feedback.random.separate.*
  - dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.*
but the results seem flaky so need further investigation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
272addc672 ac/nir: remove prim_stride_ret arg from ngg_build_streamout_buffer_info
This is not used outside of this function, so declare it as a local
variable instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
9f4ab06842 glx: return BadMatch for invalid reset notification strategy
The specification doesn't say which error should be reported, but
piglit expects BadMatch:

   /* The GLX_ARB_create_context_robustness spec does not say what error
    * code should be generated.  However, similar cases (e.g., valid GL
    * versions) specify BadMatch.  This is also the behavior of NVIDIA's
    * closed-source driver.
    */

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
d3798130ad radeonsi: disable DCC for PIPE_BIND_USE_FRONT_RENDERING
Front rendering and (display) DCC are causing artifacts on screen.

si_texture_get_handle deals with this problem by disabling dcc, but
we can make it simpler by not allocating DCC at all when this flag
is set.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
666a6eb871 radeonsi/gfx12: disable display dcc for front buffer rendering
Same logic as other chips, except we need to reallocate the texture
as we can't disable dcc.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
df7bb6bfd2 dri: Remove unused function
This function is unused so get rid of it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Zan Dobersek
be9f2e5189 tu/a7xx: support 8x MSAA
a7xx hardware has 8x MSAA capabilities we can expose. The 8-bit sample
count flag is included in the supported sample counts when computing image
format properties for MSAA-capable image creation conditions, with the
exception of 128-bit formats that don't support 8x MSAA.

UBWC blocksize logic is updated to cover cases of 16-bit and 32-bit formats
that support 8x MSAA. The per-cpp blocksize array is adjusted to also cover
128-byte values for which UBWC has to be disabled anyway.

VK_EXT_sample_locations implementation is adjusted to support sampling in
up to 8 locations, achieved by writing into additional sample location
registers.

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/32180>
2024-11-27 17:26:02 +00:00
Lionel Landwerlin
292c6a5156 anv: avoid using cmd_buffer for flushing runtime
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/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
ce4f884fcc anv: avoid using cmd_buffer for TBIMR state computation
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/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
6096586893 anv: rework Wa_18038825448 to track state on anv_gfx_dynamic_state
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/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
337763f461 anv: reuse device local variable in hw state emission
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/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
fc404c962c anv: try to avoid using cmd_buffer in gfx runtime flushing
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/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
560ce4ba1d anv: move primitive_topology to anv_gfx_dynamic_state
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/32372>
2024-11-27 16:51:57 +00:00
Georg Lehmann
fd669fa69d aco/optimizer: label fcanonicalize like a copy if there is nothing to flush
Allows copy propagation into non alu instructions like phis.

Foz-DB Navi21:
Totals from 138 (0.17% of 79395) affected shaders:
Instrs: 308135 -> 307792 (-0.11%); split: -0.12%, +0.01%
CodeSize: 1567924 -> 1566484 (-0.09%); split: -0.10%, +0.01%
VGPRs: 9696 -> 9720 (+0.25%)
Latency: 1162719 -> 1161663 (-0.09%); split: -0.10%, +0.00%
InvThroughput: 256944 -> 256590 (-0.14%); split: -0.15%, +0.01%
VClause: 5631 -> 5626 (-0.09%); split: -0.14%, +0.05%
Copies: 29962 -> 30028 (+0.22%); split: -0.10%, +0.32%
Branches: 8241 -> 8237 (-0.05%)
PreVGPRs: 7800 -> 7797 (-0.04%)
VALU: 216243 -> 215898 (-0.16%); split: -0.17%, +0.01%
SALU: 30768 -> 30767 (-0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32355>
2024-11-27 15:14:31 +00:00
Konstantin
8197d744f5 radv: Do not overwrite VRS rates when doing fast clears
Fixes a whole bunch of VRS tests on navi24.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318>
2024-11-27 14:45:31 +00:00
Konstantin
1a3f6c586c radv/printf: Guard against helper invocations
Helper invocations can allocate printf buffer space but they do not
write any data which can cause crashes in radv_dump_printf_data.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318>
2024-11-27 14:45:31 +00:00
Eric R. Smith
5bc4d33fa5 panvk: fix depth bias calculation
We don't need to multiply the depth bias constant by 2.0. This brings
panvk in line with other vulkan implementations (like asahi and nvk)
and fixes the one failing CTS test while still passing the other
CTS depth_bias tests.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-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/32358>
2024-11-27 13:22:02 +00:00
Mary Guillemard
e1a8fd80d4 panvk: Use vk_zalloc for queue array allocation
No need to call memset that way.

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/32368>
2024-11-27 09:42:03 +01:00
Mary Guillemard
e5877cefc4 panvk: Call vk_free on queue array instead of vk_object_free
This is allocated using vk_alloc and isn't a vk_object.
This fixes an invalid free that could manifest as a double free error.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 5b0ff2643f ("panvk: Make the device creation/destruction per-arch")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32368>
2024-11-27 09:41:58 +01:00
Samuel Pitoiset
4308668a25 radv: allow shaders caching with RADV_DEBUG=hang and the trap handler
When debugging a game that compiles a ton of shaders at beginning, it
can be very very slow because shaders cache was disabled by default
with RADV_DEBUG=hang.

To make debugging such a game faster, let's cache shaders with
RADV_DEBUG=hang. Note that only the backend IR (ACO or LLVM) and the
disassembly are stored in the cache. To get SPIR-V and NIR, you might
need RADV_DEBUG=hang,nocache.

This also handles the trap handler.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32246>
2024-11-27 08:04:59 +00:00
Samuel Pitoiset
f1d103f7de radv: capture shader executable info at shader creation time
This doesn't need to be delayed and it will allow us to support
caching with eg. RADV_DEBUG=hang.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32246>
2024-11-27 08:04:59 +00:00
Samuel Pitoiset
acc84133f1 radv: only pass relevant stages when emitting DGC push constants
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32346>
2024-11-27 07:35:40 +00:00
Vignesh Raman
aa8cd5ea7b ci: Uprev crosvm
With Linux kernel 6.12-rc2, crosvm crashes in drm-ci
with the following error,
[ERROR crosvm::sys::linux::panic_hook] thread 'crosvm_vcpu0' panicked at devices/src/virtio/gpu/mod.rs:1761:14:
[ERROR crosvm::sys::linux::panic_hook] failed to send activation resources to worker thread: SendError { .. }

Uprev crosvm to fix this issue.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31900>
2024-11-27 03:07:02 +00:00
Mauro Rossi
b192c6927b nvk/android: Add support for ANDROID_native_buffer
ANB implementation aims to rely as much as possible on 'ANB common' code in vulkan/runtime
and vk_common_* entry points automatically handled by mesa at build time.

(v1) Initial Vulkan HAL skeleton with vk_android_{init,destroy}_ugralloc() in nvk_open_hal()

Changelog:

nvk_android.{c,h}: skeleton nvk_open_hal()/nvk_close_hal() and meson.build changes
nvk_instance.h: nvk_*() functions declaration required by nvk_android.c
nvk_device.c: add ANB support
nvk_image.c: add ANB code paths
nvk_physical_device.c: enable ANB extension support

NOTE: Avoid including any AHB code/headers <vndk/hardware_buffer.h>
use only <vulkan/vk_android_native_buffer.h>

Achievements:

Vulkan HAL is detected by Android build, but no Vulkan application is rendering
Android libvulkan.so loader performs dlopen() of /vendor/lib64/hw/vulkan.nouveau.so
Sascha Willems vulkanCapsViewer App detects the Vulkan HAL in Android builds on RTX2060
Android CTS 11 dEQP-VK can be run and completed, but com.drawelements.deqp app shows black surface

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568738	   161	568899

(v2) Further replication of other using 'ANB common' implementation

Changelog:

Move vk_android_{init,destroy}_ugralloc() from nvk_open_hal() to nvk_CreateInstance()
Remove nvk_GetPhysicalDeviceProperties2() and rely on vk_common_GetPhysicalDeviceProperties2()

Achievements:

Improvements in dEQP-VK test results, but many dEQP.wsi.android.* tests are still failing

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568783	   115	568899

(v3) Get inspiration from lavapipe recent llvmpipe ANB implementation and cleanups

nvk_physical_device.c: brace nvk_init_wsi,nvk_finish_wsi with #ifdef NVK_USE_WSI_PLATFORM/#endif
nvk_image.c: if (!mem) return VK_SUCCESS in DETECT_OS_ANDROID path
nvk_android.h: remove nvk_ahb_format_for_vk_format() and add vk_format_from_android()

Achievements:

Improvement in dEQP.wsi.android.* test results, only dEQP.wsi.android.swapchain.simulae_oom.* are failing.
Most of Vulkan Apps generate these errors in logcat:
... E BufferQueueConsumer: [tech.incr.vulkanandroid/tech.incr.vulkanandroid.MinimalNativeActivity#0](id:85900000010,api:1,p:5060,c:2137) acquireBuffer: max acquired buffer count reached: 2 (max 1)
... E BufferLayerConsumer: [tech.incr.vulkanandroid/tech.incr.vulkanandroid.MinimalNativeActivity#0] updateTexImage: acquire failed: Function not implemented (-38)
while some other apps (vkCube and GearsVK) generate these errors:
... E RenderEngine: failed to wait on fence fd
... E Layer   : [Surface(name=Task=136)/@0x832783c - animation-leash#0] No local sync point found
... E Layer   : [Surface(name=Task=1)/@0xd82067 - animation-leash#0] No local sync point found

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568820	    79	568899

(v4) Vulkan HAL implement nvk specific ANB gralloc and synchronization, inspired by llvmpipe ANB

Changelog:

nvk_android.c: nvk_GetSwapchainGrallocUsageANDROID, nvk_AcquireImageANDROID, nvk_QueueSignalReleaseImageANDROID
               implemented as porting of llvmpipe commit 0dce939e with 's/lvp_/nvk_/g' for functions rename

NOTE: at this stage nvk_GetSwapchainGrallocUsageANDROID is only setting gralloc SW usage flags
nvk_image.h: NVK_MAX_PLANE_COUNT 1 - NOTE: I don' know how many max planes are supported by NVK

Achievements:

GearsVK working
dEQP-VK tests produce colored output on screen
3DMARK API Overhead, Slingshot Extreme: running but meshes are not rendered
Other Vulkan API enabled Android Apps (Sascha Willems vulkanTriangle) are showing black surface,
which is due to basic gralloc SW usage flags implemented in nvk_GetSwapchainGrallocUsageANDROID()

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568820	    79	568899

The failed tests are in the following modules/test:

dEQP-VK.api.driver_properties#driver_id_match					 1
dEQP-VK.pipeline.multisample.min_sample_shading_enabled.*			 9
dEQP-VK.pipeline.multisample.min_sample_shading.*				56
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32i#256_256_6	 1
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32ui#256_256_6	 1
dEQP-VK.ssbo.layout.random.all_shared_buffer#5					 1
dEQP-VK.wsi.android.swapchain.simulate_oom					10

(v5) use ANB common code for GetSwapchainGrallocUsage*ANDROID

Changelog:

Replace the "SW usage only" nvk_GetSwapchainGrallocUsage{,2}ANDROID
and rely on vk_common_GetSwapchainGrallocUsage{,2}ANDROID

Achievements:

Vulkan Apps are rendering on screen
Tested on Android 11 with Vulkan 1.1 API

Android apps working:

Khronos Vulkan-Samples
Sacha Willems Vulkan Examples
Vulkan Android Test
vkCube
GearsVK
PPSSPP
3DMARK API Overhead, Slingshot Extreme - Still with meshes issue

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568820	    79	568899

The failed tests are in the following modules/test (same as per previous iteration):

dEQP-VK.api.driver_properties#driver_id_match					 1
dEQP-VK.pipeline.multisample.min_sample_shading_enabled.*			 9
dEQP-VK.pipeline.multisample.min_sample_shading.*				56
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32i#256_256_6	 1
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32ui#256_256_6	 1
dEQP-VK.ssbo.layout.random.all_shared_buffer#5					 1
dEQP-VK.wsi.android.swapchain.simulate_oom#					10

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30833>
2024-11-26 21:45:16 +00:00
Mauro Rossi
63fa21334f nvk/android: Advertise Vulkan 1.1 for Android 12L and lower
Vulkan 1.3 is supported starting from Android 13

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30833>
2024-11-26 21:45:16 +00:00
Mauro Rossi
07e60fb255 nvk/android: Avoid building error in nak bindings
Required to compile nvk for android

Fixes the following building error:

FAILED: src/nouveau/compiler/nak_bindings.rs
...
/usr/include/xf86drm.h:40:10: fatal error: 'drm.h' file not found
panicked at 'Unable to generate bindings: ClangDiagnostic("/usr/include/xf86drm.h:40:10:
fatal error: 'drm.h' file not found\n")', main.rs:52:36

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30833>
2024-11-26 21:45:16 +00:00
Marek Olšák
9223528059 winsys/amdgpu: fix FD mismatch
The original fd was only used like this. Importing the ioctl wrappers
started using it for calling ioctls, which was incorrect.

Fixes: 049641ca54 - amd: import libdrm_amdgpu ioctl wrappers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12208

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32356>
2024-11-26 21:21:29 +00:00
Marek Olšák
733e0ebf19 radeonsi: handle a failure to create gfx_cs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32356>
2024-11-26 21:21:29 +00:00
Marek Olšák
b23161ace1 radeonsi: don't call set_framebuffer_state in si_destroy_context
si_set_framebuffer_state can allocate a buffer for sample positions,
and we don't want to create new buffers in si_destroy_context because
it might not work.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32356>
2024-11-26 21:21:29 +00:00
Eric Engestrom
ffd02b8ad8 meson/megadriver: support various lib suffixes
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
6586f755b9 meson/megadriver: simplify setting common megadriver arguments
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
b029974aab meson/megadriver: s/_/-/ in an argument name to be consistent
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
6f493ec517 meson: reuse variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
aa31c286c6 meson: drop unused variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
a093806798 meson: simplify logic a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Chia-I Wu
a562047b60 panvk: move pandecode_next_frame a bit earlier
Call pandecode_next_frame (to close the file stream) before validating
against queue->debug_syncobjs which may abort.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
b078cacce5 panvk: clean up panvk_queue_submit
Now that panvk_queue_submit is fully refactored, clean it up.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
def0fa0fc3 panvk: add panvk_queue_submit_process_debug
It handles PANVK_DEBUG_{TRACE,SYNC,DUMP}.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
2c0a76cdf7 panvk: add panvk_queue_submit_process_signals
It transfers queue->syncobj_handle to vk_sync_signal.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
934fafe90c panvk: add panvk_queue_submit_ioctl
It makes the DRM_IOCTL_PANTHOR_GROUP_SUBMIT ioctl call.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
9679150ed9 panvk: add panvk_queue_submit_init_signals
It initializes drm_panthor_sync_op and drm_panthor_queue_submit to
signal queue->syncobj_handle.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
460cbc0491 panvk: add panvk_queue_submit_init_cmdbufs
It parses panvk_cmd_buffer to drm_panthor_queue_submit.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
21edb20746 panvk: add panvk_queue_submit_init_waits
It parses vk_sync_wait to drm_panthor_sync_op and
drm_panthor_queue_submit.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
c8fcbc2990 panvk: add panvk_queue_submit_init_storage
It prepares the storage for panvk_queue_submit.

There is a small functional change, in that signal_ops is allocated only
when necessary.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
dc75b4c755 panvk: add panvk_queue_submit_init
This is the first step toward panvk_queue_submit refactoring.  It
introduces "struct panvk_queue_submit" and adds panvk_queue_submit_init
to initialize the struct.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:05 +00:00
Chia-I Wu
2cbb8467c1 panvk: fix vs image support
Since valhall, panvk_per_arch(nir_lower_descriptors) separates the
driver set and the user sets, and does not need pan_lower_image_index.

Fixes: 5db135f66a ("panvk: Advertize v10 support")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
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/32308>
2024-11-26 19:47:22 +00:00
Danylo Piliaiev
7fa31b7eea tu,ir3: Add workaround for reading shading rate on A7XX gen1,gen2
On A7XX reading fragment shading rate correctly requires declare
SAMPLEMASK input. It doesn't need to be used anywhere, just declared.

This workaround was seen in the prop driver v512.762.12

Fixes a lot of tests in:
 dEQP-VK.fragment_shading_rate.*

Fixes: 2ab8eff511
("tu/a7xx: Implement VK_KHR_fragment_shading_rate")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32335>
2024-11-26 19:20:44 +00:00
Danylo Piliaiev
8858b16e4a tu: Disable fragmentShadingRateWithShaderSampleMask due to issues
FSR with VK_EXT_post_depth_coverage enabled has wrong values of
gl_SampleMaskIn[0]. Prop driver has fragmentShadingRateWithShaderSampleMask
enabled, but it doesn't support VK_EXT_post_depth_coverage.

Sample mask is supplied by HW and there is no flag in sight to fix it.

The failing tests were:
 dEQP-VK.pipeline.fast_linked_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.fast_linked_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage
 dEQP-VK.pipeline.monolithic.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.monolithic.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage
 dEQP-VK.pipeline.pipeline_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.pipeline_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage

Fixes: 2ab8eff511
("tu/a7xx: Implement VK_KHR_fragment_shading_rate")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32335>
2024-11-26 19:20:44 +00:00
Georg Lehmann
239c0124df radv: optimize sample mask comparisons
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:39 +00:00
Georg Lehmann
3f26e9ca19 nir/opt_intrinsic: fix sample mask opt with demote
Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:39 +00:00
Georg Lehmann
22557497ec nir/opt_intrinsic: rework sample mask opt with vector alu
Purely theoretical issue, for example gl_SampleMaskIn.xx == 0.xx.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:38 +00:00
Ian Romanick
08fa4635c7 Fix copy-and-paste bug in nir_lower_aapoint_impl
Reported-by: Anddy Ren(WH-RD) <AnddyRen@glenfly.com>
Tested-by: Anddy Ren(WH-RD) <AnddyRen@glenfly.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: d3a95f0f71 ("gallium/draw: Enable aapoint NIR helpers to generate bool1, bool32, or float32 Booleans")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32313>
2024-11-26 18:12:07 +00:00
Yinjie Yao
64ea1175cc radeonsi/vcn: Disable 2pass encode for VCN 5.0.
VCN 5.0 will not support 2pass encoding.
Backport-to: 24.3

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/32336>
2024-11-26 16:55:30 +00:00
Boris Brezillon
b11e9168d8 panfrost: Use the handler size returned by cs_exception_handler_def()
Use the handler size returned by cs_exception_handler_def() instead
of extracting it from the cs_builder 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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
16dd990bac panvk/csf: Use the information returned by cs_exception_handler_def()
cs_exception_handler contains the handler size and the dump region
size. Use those instead of deducing them from the cs_builder state
or using a maximum value.

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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
7a8e560c4e panfrost: Add cs_exception_handler_def() to the ForEachMacros list
And fix the call-sites accordingly.

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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
7a32fac596 pan/cs: Return exception handler size/address
Will be useful when we start allocating exception handlers from a
memory pool that grows over time without having to fix a maximum
handler size.

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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
d0cff9e4c1 pan/cs: Return the dump region size when an exception handler is defined
Useful to reserve only what we need for spilling regs.

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/32353>
2024-11-26 15:16:43 +00:00
Lionel Landwerlin
cafec54c79 Revert in correct commit "fix"
This reverts commit 38c7e40bc02578585cc56c3a2d016d0b06ade184.

Fixes: b625a573 ("fix")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32354>
2024-11-26 16:36:06 +02:00
Georg Lehmann
28dff72d3b freedreno/ci: update a630 KSP checksum
This causes warnings in CI for quite a while now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32348>
2024-11-26 13:51:30 +00:00
Boris Brezillon
00e232d5f0 panvk/csf: Fix register overlap in issue_fragment_jobs()
add_val is a 64-bit register, meaning release_sz points to the high word
of add_val, which leads to corruptions of the value added to the sync
object when simul_use=true.

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/32350>
2024-11-26 13:31:39 +00:00
Lionel Landwerlin
b625a573da fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
6eb48a3e47 brw: move fs_msaa_flags logic to intel_shader_enums.h
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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
ba3ff8b3bb brw: move barycentric_mode enum to intel_shader_enums.h
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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
bfcb9bf276 brw: rename brw_sometimes to intel_sometimes
Moving it to intel_shader_enums.h

The plan is to make it visible to OpenCL shaders.

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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
9016a5458a brw: change fs_msaa flags checks to test compiled flag first
There should be no functional change here. This is just trying to make
things more clear, we use the compiled value if != BRW_SOMETIMES and
otherwise use the dynamically computed flags.

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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
54e6a8b019 anv: split runtime flushing code for reuse
We'll want to reuse some of this for device generated commands.

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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
d9d1894bb9 anv: move tracking of tcs_input_vertices/fs_msaa_flags to hw state
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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
d1795a73e2 anv: move gfx tracking values to anv_cmd_graphics_state
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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
db258503fa anv: split vertex buffer emission in a different function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
195350c5da anv: rework vertex input helper
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
c4e7578fa6 anv: pass anv_device to batch_set_preemption
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-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/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
c36f7e42a7 anv: remove 3DSTATE_VF_STATISTICS from pipeline
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-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/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
ce40a1e05b anv: remove 3DSTATE_MULTISAMPLE from the pipeline
We can make this completely dynamic, there is no information from the
pipeline.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-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/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
2b49249a4d anv: remove 3DSTATE_RASTER from pipeline
At a pipeline level, we only put fixed values in this instruction.
Might has well put that in the final emission and avoid :
  - store the instruction on the anv_graphics_pipeline
  - diff the instructions between pipelines

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-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/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
9d8950e435 anv: move helpers out of genX_pipeline.c/anv_private.h
Those are only used in genX_gfx_state.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Tapani Pälli
f0b7262209 iris: allow bo cache for compressed bos on verx10 == 200
Test list mentioned in the issue is passing fine on current main.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11362
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/32325>
2024-11-26 12:36:29 +00:00
Maíra Canal
3594a35610 v3dv: use Mesa log infrastructure instead of using stderr
The Mesa log infrastructure is really useful as it allows us to get
debug and error information in Android systems. Apart from that, it also
allows us to forward diagnostics into the right logs and files.

Therefore, instead of using stderr for all messages, use Mesa log and
separate the messages into debugging and error messages.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32304>
2024-11-26 12:09:29 +00:00
Maíra Canal
2c45a999a6 v3dv: delete v3dv_debug.h
It's not being used anymore.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32304>
2024-11-26 12:09:29 +00:00
Lars-Ivar Hesselberg Simonsen
afaf454eb7 panvk: Add incremental rendering support on v10+
This commit adds support for incremental rendering on V10+ in PanVK by
setting a tiler out-of-memory exception handler in the fragment subqueue
when waiting for the tiler work to complete.

In case the tiler is unable to finish its work due to lack of memory,
the handler is invoked which will render out the fragment work available
so far, recycle the tiler heap memory and trigger a preload for the
remaining fragment work.

Once the fragment subqueue is made aware that the tiler work has
completed, it will disable the exception handler until the state for the
next renderpass has been set up correctly, as we could otherwise get the
handler invoked based on state from a previous renderpass.

The implementation based on the similar implementation in Panfrost [1],
but works slightly differently due to PanVK utilizing multiple subqueues
and supporting layered rendering.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:28 +01:00
Lars-Ivar Hesselberg Simonsen
687fd95399 panvk: Build cmd_fb_preload on explicit fb_info
Start explicitly passing the pan_fb_info-pointer to use for building
preloads rather than implicitly fetching it from the passed
command_buffer.

This allows building preloads for different fb_infos, which is required
for incremental rendering.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:28 +01:00
Boris Brezillon
7ae7152b0b pan/cs: Add block macro for exception handler
This commit provides a block-like macro to to define exception handlers
instead of requiring the user to call the start/end helpers.

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/31941>
2024-11-26 11:58:24 +01:00
Boris Brezillon
a502841fec pan/cs: Add dynamic save_reg to exception handler
Make the register dump address dynamic instead of passing it at handler
creation time. This is needed for PanVK if we want to re-use the same
handlers for different VkQueues, since the dump buffer needs to be per
VkQueue.

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/31941>
2024-11-26 11:58:20 +01:00
Boris Brezillon
1acc5e1433 pan/cs: Align exception handlers with NOPs
Align exception handlers to cache lines to allow having multiple
exception handlers in the same BO.

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/31941>
2024-11-26 11:58:15 +01:00
Boris Brezillon
0ae8e69810 pan/cs: Add cs_exception_handler_ctx
This allows us to modify the exception handler start arguments without
having to modify the function declaration.

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/31941>
2024-11-26 11:57:47 +01:00
Lars-Ivar Hesselberg Simonsen
2941a44b69 pan/cs: Add mask support for reg_perm
Add support for masks to reg_perm in order to not erroneously hit
asserts for restricted registers that are parts of tuples but are not
read/written to due to register mask.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Lars-Ivar Hesselberg Simonsen
565476d3b2 pan/genxml: Fix decode of exception_handler 0x0
Fixes the check for address 0x0 or length 0 when decoding
set_exception_handler.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Marek Olšák
8fc640b256 nir/lower_io_to_temporaries: fix interp_deref_at_* lowering
The pass converts:
    ...
    %.. = load_deref(input)
to:
    temp = copy_deref(input) // beginning of the shader
    ...
    %.. = load_deref(temp)

If interp_deref_at_* occurs between copy_deref and load_deref,
the interp_deref_at_* lowering overwrites temp, so all future
load_deref(temp) return the result of interp_deref_at_* instead of
copy_deref, which is incorrect.

The issue manifests when the same input is used by both load_deref
and interp_deref_at_* in the same shader and when interp_deref_at_*
happens to be before load_deref.

This fixes it by using a completely new temporary for each instance
of interp_deref_at_*.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
Marek Olšák
c23abb12e8 nir: allow cloning indirect array derefs in nir_clone_deref_instr
but only if cloning within the same shader. This will be used to fix
nir_lower_io_to_temporaries.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
Marek Olšák
a3516dafc9 util,amd: add inlinable versions of drmIoctl/drmCommandWrite*
The reason for this is to inline those calls in drivers.
They are very trivial, so why not.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067>
2024-11-26 00:16:02 -05:00
Marek Olšák
049641ca54 amd: import libdrm_amdgpu ioctl wrappers
This imports 35 libdrm_amdgpu functions into Mesa.

The following 15 functions are still in use:
   amdgpu_bo_alloc
   amdgpu_bo_cpu_map
   amdgpu_bo_cpu_unmap
   amdgpu_bo_export
   amdgpu_bo_free
   amdgpu_bo_import
   amdgpu_create_bo_from_user_mem
   amdgpu_device_deinitialize
   amdgpu_device_get_fd
   amdgpu_device_initialize
   amdgpu_get_marketing_name
   amdgpu_query_sw_info
   amdgpu_va_get_start_addr
   amdgpu_va_range_alloc
   amdgpu_va_range_free

We can't import them because they make sure that we only use 1 VMID
per process shared by all APIs. (except the marketing name)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067>
2024-11-25 21:03:41 -05:00
Timothy Arceri
65b73e6d87 glsl: drop unused symbol table from gl_shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
340f7edfba glsl: use symbol table directly for builtin functions
Builtin functions do no make use of gl_shader at all other than to store
a symbol table. So lets just create and use the symbol table directly
instead. This will allow us to drop the symbol table member from
gl_shader in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
4ce9421acb glsl: drop _mesa_glsl_copy_symbols_from_table()
Unused since the previous commit

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
3b40db0ef6 glsl: don't copy symbol table to shaders
This is no longer needed since we switched to a full nir base linker. The
symbol table witchcraft is now only used in the ast code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Marek Olšák
6f0333920b nir/opt_varyings: use a hash table to make cloning SSA faster
Cloning recursively can have an exponential time complexity if
we don't skip already cloned nodes.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32337>
2024-11-25 22:24:22 +00:00
Timur Kristóf
8653abac09 ac/nir/ngg: Remove erroneous NUW addition from workgroup scan.
This may add constant -1 so naturally it can indeed cause
an unsigned wrap.

Fixes: 492d8f3778
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12204
Signed-off-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/32338>
2024-11-25 21:43:45 +00:00
Alyssa Rosenzweig
96b38119ea nir/pack_bits: handle 8-bit vec8 -> 64-bit
This is a very silly case, but there's no reason not to handle it efficiently,
and this implementation is faster than the fallback. Noticed when playing with
scratch optimizations.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32322>
2024-11-25 15:53:31 -05:00
Alyssa Rosenzweig
4c84321683 vtn: ignore SpvFunctionParameterAttributeSret
this can happen with CL, but it seems it's just informational.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32322>
2024-11-25 15:53:31 -05:00
Manuel Dun
e928fc09d4 gfxstream: Using DETECT_OS_LINUX from util instead of __linux__
The DETECT_OS_LINUX constant defined in util/detect_os.h allows
replacing the ocurrences of defined(__linux__) and __linux__. They
are equivalent in functionality but the util's one is easier to read and
write. Also it does not require the define() syntax.

The change involve replacing every ocurrence of defined(__linux__) with
DETECT_OS_LINUX. Then replacing every ocurrence of #ifdef __linux__
with #if DETECT_OS_LINUX.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32286>
2024-11-25 19:05:00 +00:00
Manuel Dun
5cf2d8efa3 gfxstream: Using DETECT_OS_FUCHSIA from util instead of __Fushsia__
The DETECT_OS_FUCHSIA constant defined in util/detect_os.h allows
replacing the ocurrences of defined(__Fushsia__) and __Fuschsia__. They
are equivalent in functionality but the util's one is easier to read and
write. Also it does not require the define() syntax.

The change involve replacing every ocurrence of defined(__Fuchsia__) with
DETECT_OS_FUCHSIA. Then replacing every ocurrence of #ifdef __Fuchsia__
with #if DETECT_OS_FUCHSIA.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32286>
2024-11-25 19:04:59 +00:00
Manuel Dun
870aa88a5f gfxstream: Using DETECT_OS_ANDROID from util instead of __ANDROID__
The DETECT_OS_ANDROID constant defined in util/detect_os.h allows
replacing the ocurrences of defined(__ANDROID__) and __ANDROID__. They are
equivalent in functionality but the util's one is easier to read and
write. Also it does not require the define() syntax.

The change involve replacing every ocurrence of defined(__ANDROID__) with
DETECT_OS_ANDROID. Then replacing every ocurrence of #ifdef __ANDROID__
with #if DETECT_OS_ANDROID.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32286>
2024-11-25 19:04:59 +00:00
Mary Guillemard
dec5523e33 panvk: Advertise VK_EXT_pipeline_robustness
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/32331>
2024-11-25 18:33:40 +00:00
Mary Guillemard
8485b3fcff panvk: Advertise VK_EXT_image_robustness
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/32331>
2024-11-25 18:33:40 +00:00
Mary Guillemard
bacdf351f6 panvk: Disable integer array indices clamping
This is required to support VK_EXT_image_robustness properly as
otherwise the array index would be clamped to the array size on
TEX_FETCH and would not end up returning zeroes as expected by
the extension.

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/32331>
2024-11-25 18:33:40 +00:00
Chia-I Wu
f9c39ceaf5 panvk: use u_foreach_bit to loop over mask bits
It is both faster and more readable.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32324>
2024-11-25 18:07:10 +00:00
Rebecca Mckeever
412c286331 panvk: Enable multiplane images and image views
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Rebecca Mckeever
9aa2c1ec56 panvk: Replace tab with spaces
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/31776>
2024-11-25 17:34:35 +00:00
Rebecca Mckeever
3295cb9700 panvk: Use vk_image::drm_format_mod instead of pan_image::layout.modifier
This will help prepare for multiplane, where panvk_image will have an array
of pan_image structs to represent the planes. The format modifier is the
same for all planes, so we can use vk_image::drm_format_mod.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Boris Brezillon
1289c5a30b panvk: Fix panvk_plane_index() for D32_SFLOAT_S8_UINT
We currently support D32_S8 as a single-planar format on Bifrost, so
fix the panvk_plane_index() accordingly.

We will restore this once we move to multi-planar D32_S8, which should
happen soon.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Erik Faye-Lund
ad8da772ab docs: add missing panfrost extensions
We've supported GL_ARB_transform_feedback3 since 2019,
GL_ARB_draw_indirect and GL_ARB_texture_cube_map_array since 2021.

...you get the picture. There's more, and they've all been around for a
good while. But it seems we forgot to tell features.txt about them.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:58 +01:00
Erik Faye-Lund
75fbf492ac docs: fixup a few mistakes with panfrost
Both of GL_OES_sample_shading and GL_OES_shader_multisample_interpolation
are enabled on panfrost when GL_OES_gpu_shader5 is enabled. And that's
the case on Bifrost and later, but not Midgard.

Let's fix up features.txt to match reality here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:58 +01:00
Erik Faye-Lund
d7342a0179 docs: refer to panfrost by version
The different Mali architecture versions are an easier way of reasoning
about what is and what isn't supported, so let's switch to that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:57 +01:00
Erik Faye-Lund
dc8c6d9978 docs: update GL_ARB_multi_draw_indirect support
This is always supported when GL_ARB_draw_indirect is supported, so
let's not needlessly repeat drivers here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:56 +01:00
Erik Faye-Lund
dcf380d1b6 docs: update GL_OES_shader_image_atomic support
This is always supported on GLES 3.1 now, so let's update features.txt
with that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:56 +01:00
Erik Faye-Lund
a9b662908c docs: mark GL_ARB_get_program_binary as always supported
We always support the extension. Wether we support any formats or not
depends on one of two conditions:

1. If Mesa is built with shader-cache support or not, which is not a
   driver decision.
2. If GL_ARB_gl_spirv is supported or not, which is covered elsewhere.

So there's no reason to list individual drivers here, as that doesn't
really change anything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:55 +01:00
Erik Faye-Lund
71b9848c07 docs: mark GL_ARB_shader_subroutine as always supported
This extension is always supported, no need to maintain a list of
drivers that support it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:55 +01:00
Eric R. Smith
3022258de5 panfrost: add panfrost support for NV15, NV16 and NV20
Update panfrost to add support for NV16 and for the 10 bit
NV15 and NV20 formats.

Signed-off-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/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
f539763cfc dri: fix NV15 and NV20 definitions to make sure they will be used
Although there are no DRI formats directly corresponding to 10bpp
planes (as used in e.g. NV15), some hardware can emulate NV15 with
R10_G10B10_420. Check for this in dri2_yuv_dma_buf_supported, so
that we can advertise support for these formats if available.

Signed-off-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/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
1ea79ec164 egl, mesa: add support for NV15 and NV20 textures
Support external images with 10 bit YUV in NV15 and NV20 formats.
These are produced by some hardware decoders, so this will be
useful.

Signed-off-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/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
440b69210a dri, mesa: fix NV16 texture format
Support for NV16 was kind of half done, by declaring it to be
NV12. That didn't actually work though, so add some more stuff
to make it work.

Signed-off-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/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
b6531e45ed util: rename PIPE_FORMAT_Y8_U8V8_422_UNORM
Y8_U8V8_422_UNORM is more commonly known as NV16. There has been
a fourcc for NV16 for a while now, so let's rename it to be in
line with NV12 and similar formats.

Signed-off-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/31854>
2024-11-25 13:04:19 +00:00
Hans-Kristian Arntzen
fc9ae4b974 radv: Fix missing gang barriers for task shaders.
It's also possible to use ALL_GRAPHICS and PRE_RASTERIZATION as
alternatives.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32323>
2024-11-25 12:37:47 +00:00
Georg Lehmann
2865dc5fa5 radv/ci: document test_shader_sm66_is_helper_lane as fixed
This reverts commit 480fcf7aff.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32310>
2024-11-25 11:50:27 +00:00
Georg Lehmann
5edae68966 nir/move_discards_to_top: don't move across is_helper_invocation
This was obviously broken because demote results in more helper invocations.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b447f5049b ("nir: Add a discard optimization pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32310>
2024-11-25 11:50:27 +00:00
Boris Brezillon
74f76f8df2 panvk/csf: Explain why the tiler is set to 0xdeadbeefdeadbeef
When simul_use=true, the tiler descriptors are allocated from
the descriptor ringbuf. We set state.gfx.render.tiler to a
non-NULL value to satisfy the is_tiler_desc_allocated() tests,
but we want it to point to a faulty address so we can easily
detect if it's used in the command stream/framebuffer
descriptors.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Boris Brezillon
3d5d6327be panvk/csf: Fix cross command buffer render pass suspend/resume
Fix cross command buffer render pass suspend/resume by
emitting a render context (tiler+framebuffer descriptors)
on suspend that we can re-use on resume.

This involves splitting the issue_fragment_jobs() logic to
decouple the framebuffer descriptor initialization and the
run_fragment emission. This also requires patching a few
places where we were testing the tiler/fbd values to
determine if we are in a render pass, which no longer works
when a render pass is resumed.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Boris Brezillon
5a6e992048 panvk/csf: Keep a cache of the CS reg file at the panvk_queue level
This allows us to start from the HW reg file state instead of a
zero-initialized reg file.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Boris Brezillon
b2bac439d5 pan/decode: Flush the dump file before crashing
Useful when debugging GPU faults.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Pavel Ondračka
9838024547 r300: always transform sin/cos input for fs
We don't need to check anymore if this was already applied and it turned
out the check was not working properly in the first place.

The check for vs is kept in place, because that one still detects that
few wine shaders already have the sin/cos input in correct range.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
2024-11-25 10:59:38 +00:00
Marek Olšák
ec1a00f507 r300: don't lower sin/cos in finalize_nir
finalize_nir requires that calling it multiple times on the same shader
doesn't break it.

RV530 shader-db:
total instructions in shared programs: 132915 -> 132851 (-0.05%)
instructions in affected programs: 2016 -> 1952 (-3.17%)
helped: 16
HURT: 0
total temps in shared programs: 18238 -> 18232 (-0.03%)
temps in affected programs: 42 -> 36 (-14.29%)
helped: 6
HURT: 0
total cycles in shared programs: 197510 -> 197446 (-0.03%)
cycles in affected programs: 2102 -> 2038 (-3.04%)
helped: 16
HURT: 0

Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
2024-11-25 10:59:37 +00:00
Pavel Ondračka
d406dbbde9 r300: run nir_opt_algebraic in the backend
No effect in shader-db right now, but without it the next commit
leads to small regression in instruction numbers (0.03%) instead
of the small win we have now (-0.05%).

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
2024-11-25 10:59:37 +00:00
Rhys Perry
63b0692eac aco: don't use uniform continues if exec might be empty
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/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
aa0ede751d aco/tests: add tests for empty exec masks
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/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
f35e229fae aco: skip code if exec is empty
This is safer and potentially faster.

fossil-db (navi21):
Totals from 690 (0.87% of 79395) affected shaders:
Instrs: 4534778 -> 4535916 (+0.03%)
CodeSize: 25268516 -> 25272080 (+0.01%); split: -0.00%, +0.01%
Latency: 48482721 -> 48513907 (+0.06%); split: -0.00%, +0.07%
InvThroughput: 13213965 -> 13217828 (+0.03%); split: -0.00%, +0.03%
Copies: 432307 -> 432295 (-0.00%); split: -0.05%, +0.04%
Branches: 187305 -> 188249 (+0.50%)
VALU: 2904490 -> 2904508 (+0.00%); split: -0.00%, +0.00%
SALU: 674962 -> 675133 (+0.03%)

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/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
f00c3a14c0 aco: require WQM after demote in control flow
fossil-db (navi21):
Totals from 424 (0.53% of 79395) affected shaders:
Instrs: 404496 -> 404752 (+0.06%); split: -0.07%, +0.13%
CodeSize: 2150608 -> 2151616 (+0.05%); split: -0.05%, +0.09%
Latency: 9124298 -> 9115957 (-0.09%); split: -0.12%, +0.03%
InvThroughput: 1883570 -> 1883468 (-0.01%); split: -0.01%, +0.00%
VClause: 6832 -> 6830 (-0.03%)
SClause: 13801 -> 13778 (-0.17%); split: -0.17%, +0.01%
Copies: 26758 -> 26673 (-0.32%); split: -0.44%, +0.12%
Branches: 9819 -> 9567 (-2.57%)
PreSGPRs: 17902 -> 17934 (+0.18%)
SALU: 45407 -> 45906 (+1.10%); split: -0.01%, +1.11%

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/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
8a175b02bc aco: use repair pass for LCSSA workaround
This makes instruction selection simpler and fixes potential issues with
allocated_vec or the optimizer moving SGPR uses out of the loop.

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/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
5de990f5a9 aco: add SSA repair pass
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/31143>
2024-11-25 10:32:58 +00:00
Roman Stratiienko
83b4b829fd v3dv/android: Suppress AHB-related log spam
The VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID is handled
by the common code.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32314>
2024-11-25 08:08:25 +00:00
Samuel Pitoiset
ba77b2d65d radv: fix printing with RADV_DEBUG=psocachestats
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32254>
2024-11-25 07:36:49 +00:00
Samuel Pitoiset
6c967c9bbe radv: fix dumping the trap handler shader disassembly
This has been broken in the recent RADV_DEBUG=shaders refactoring.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32254>
2024-11-25 07:36:49 +00:00
Samuel Pitoiset
5c3a757ba6 radv: add a pipeline helper to skip shaders cache
It's common for the three type of pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32254>
2024-11-25 07:36:48 +00:00
Samuel Pitoiset
3f646d43dd radv: fix dumping debug/perftest options when there are holes
Also fix the wrong assertion.

Fixes: 8c1e2ac03b ("radv: Refactor RADV_DEBUG=shaders to be a combination of other options.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32276>
2024-11-25 07:01:06 +00:00
Boris Brezillon
e0f48568c7 panfrost: Advertise support for AFBC(32x8,sparse,split)
Some MTK display controller drivers support only this AFBC modifier.
Give it a chance to use AFBC for scanout resources.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:36 -05:00
Boris Brezillon
4af57952b1 panfrost: Add support for AFBC(split)
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:26 -05:00
Boris Brezillon
762a0f4133 panfrost: Add the concept of render block
When dealing with AFBC render targets using wide blocks, the GPU needs to
keep rendering tiles that are a multiple of 16x16. This is described
as AFBC render block size, and adds extra constraints:

- render target buffers need to be aligned on 16 pixels in the vertical
  direction, even if the AFBC super block size is 4 or 8 pixels.
- if the effective tile size is smaller than the render block size, we
  should force a clean write and discard+ignore the CRC

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:14 -05:00
Boris Brezillon
303acdef07 panfrost: Add a helper to expose the maximum effective tile size
On all previous GPUs, the effective tile size was limited to 16x16, but
it got increased on v10. Add an helper to query this maximum effective
tile size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:02 -05:00
Louis-Francis Ratté-Boulianne
a3c8258908 panfrost: Select the effective tile size as part of pan_fb_info
This allows using the tile size to make decisions not related to the
framebuffer descriptor. Mainly, for the near future, to decide
whether some tiling hierarchy levels should be disabled.

The color buffer allocation size is also calculated at the same time
as it's using common data underneath.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:25:58 -05:00
Louis-Francis Ratté-Boulianne
eead8b6efd panfrost: Split up allocation and packing of tiler descriptor
This is mostly useful so that we can set the hierarchy level mask
using information from the `pan_fb_info` structure that isn't filled
yet when the tiler descriptor is first allocated.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:25:51 -05:00
Boris Brezillon
ca84b1e9b5 panfrost: Increase AFBC body alignment requirement on v6+
AFBC body is required to be aligned on 128 bytes on v6+ hardware.

Cc: mesa-stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:25:05 -05:00
Timur Kristóf
45c523104a ac/nir/ngg: Implement optional primitive compaction.
It's an experimental feature that we may enable later.
Instead of exporting NULL primitives, perform a compaction
on primitives after culling.

Signed-off-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/32290>
2024-11-25 01:56:20 +01:00
Timur Kristóf
492d8f3778 ac/nir/ngg: Workgroup scan over two bools.
Implement two workgroup scans over two boolean values in parallel,
so that they can be done with very minimal ALU overhead.

Signed-off-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/32290>
2024-11-25 01:56:08 +01:00
Timur Kristóf
78f77e161c ac/nir/ngg: Pass wg_repack_result as pointer instead of returning it.
Signed-off-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/32290>
2024-11-25 01:55:30 +01:00
Patrick Lerda
ac78692be4 r600: evergreen stencil/depth mipmap blit workaround
In certain cases, the hardware fails to properly process a mipmap level
of these special stencil and depth formats. This happens at width=16.
This change adds a software workaround.

Modifying the corresponding mipmap nblk_x, and the other related
values, could make the tests below to work. Anyway, this method
generates regressions.

This change was tested on palm and cayman and fixes the following tests:
spec/arb_framebuffer_object/framebuffer-blit-levels read stencil: fail pass
spec/arb_depth_buffer_float/fbo-clear-formats stencil/gl_depth32f_stencil8: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31957>
2024-11-24 21:01:54 +00:00
Patrick Lerda
81889f4d5c r600: ensure that the last vertex is always processed on evergreen
This situation is happening, for instance, when the hardware is
using the type FMT_8_8_8_8 (4 bytes) while the software was
requesting a 3 bytes type. The width should be adjusted to the
expected hardware size; otherwise, the last vertex is lost.

Note: The rv770 didn't behave like this. This is definitely
a hardware change between these gpus.

This change was tested on palm and cayman. Here are the tests fixed:
spec/!opengl 2.0/gl-2.0-vertexattribpointer-size-3: fail pass
deqp-gles2/functional/draw/random/62: fail pass
deqp-gles2/functional/vertex_arrays/single_attribute/strides/buffer_0_32_byte3_vec4_dynamic_draw_quads_1: fail pass
deqp-gles2/functional/vertex_arrays/single_attribute/strides/buffer_0_32_short3_vec4_dynamic_draw_quads_1: fail pass
deqp-gles2/functional/vertex_arrays/single_attribute/strides/buffer_0_32_short3_vec4_dynamic_draw_quads_256: fail pass
deqp-gles3/functional/draw/random/117: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/strides/byte/buffer_stride32_components3_quads1: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/strides/short/buffer_stride32_components3_quads1: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/strides/short/buffer_stride32_components3_quads256: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32184>
2024-11-24 20:23:38 +00:00
Patrick Lerda
275535774c r600: restructure r600_create_vertex_fetch_shader() to remove memcpy()
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32184>
2024-11-24 20:23:38 +00:00
Patrick Lerda
4d24995adb r600: fix the evergreen sampler when the minification and the magnification are not identical
This change fixes the evergreen nonconformity issue on non-mipmap
textures when the minification and the magnification are not in
the same state.

This modification disables 5278436d67 when the minification and
the magnification are different. This fixes the nonconformity
without new regressions. Anyway, I was unable to reproduce
the issue described by 5278436d67 on palm and cayman.

This change was tested on cayman and palm. It fixes 84 deqp-gles2
tests and 128 deqp-gles3 tests:
deqp-gles2/functional/texture/filtering/2d/linear_nearest_*
deqp-gles2/functional/texture/filtering/2d/nearest_linear_*
deqp-gles2/functional/texture/filtering/cube/linear_nearest_*
deqp-gles2/functional/texture/filtering/cube/nearest_linear_*
deqp-gles2/functional/texture/vertex/2d/filtering/linear_nearest_*
deqp-gles2/functional/texture/vertex/2d/filtering/nearest_linear_*
deqp-gles2/functional/texture/vertex/cube/filtering/linear_nearest_*
deqp-gles2/functional/texture/vertex/cube/filtering/nearest_linear_*
deqp-gles3/functional/texture/filtering/2d/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/2d/combinations/nearest_linear_*
deqp-gles3/functional/texture/filtering/2d_array/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/2d_array/combinations/nearest_linear_*
deqp-gles3/functional/texture/filtering/3d/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/3d/combinations/nearest_linear_*
deqp-gles3/functional/texture/filtering/cube/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/cube/combinations/nearest_linear_*
deqp-gles3/functional/texture/vertex/2d/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/2d/filtering/nearest_linear_*
deqp-gles3/functional/texture/vertex/2d_array/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/2d_array/filtering/nearest_linear_*
deqp-gles3/functional/texture/vertex/3d/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/3d/filtering/nearest_linear_*
deqp-gles3/functional/texture/vertex/cube/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/cube/filtering/nearest_linear_*

Fixes: 5278436d67 ("r600: force LOD range to be only one value when mip.min filter is NONE")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32185>
2024-11-24 20:07:42 +00:00
Gert Wollny
42be38a8fb radeon/evergreen: ensure equal sizes for depth-stencil npot textures
On evergreen depth-stencil textures are allocated as two objects, and
when using the eg_surface_init_1d_miptrees code path the size evaluation
uses the generalized surf_minify function. Here when allocating the
depth texture the alignment takes the depth bpe value into account, and
uses bpe=1 for the stencil texture. As a result the texture pair may
consist of textures with two different nblk_x sizes and this seems to
be a problem with some textures, namely npot and small (width < 32), but
not for mipmapped textures. In the problematic cases, if the so allocated
depth texture is larger than the stencil texture, then the kernel may reject
sent data with an error message like:

 evergreen_cs_track_validate_stencil:622 stencil read bo too
  small (layer size 131072, offset 524288, max layer 1, bo size 606208)

- because apparently the expected layer size is evaluated from the depth
texture size, but the actual bo size is evaluated based on the true texture
size values. If, on the other hand, the stencil texture is larger than the
depth texture, then the data is send with a wrong alignment, and certain
dEQP-GLES31 tests fail.

In order to obtain equal texture sizes in the problematic cases magnify
the depth texture alignment requirement by its bpe, so that the relative
alignment is the same for depth and stencil texture.

Fixes:
  dEQP-GLES31.functional.stencil_texturing.format
    .depth32f_stencil8_2d
    .depth32f_stencil8_2d_array
    .depth24_stencil8_2d
    .depth24_stencil8_2d_array
    .stencil_index8_2d
    .stencil_index8_2d_array
    .depth32f_stencil8_draw
    .depth24_stencil8_draw

  dEQP-GLES31.functional.texture.border_clamp.formats
    .stencil_index8.nearest_size_npot
    .depth24_stencil8_sample_stencil.nearest_size_npot
    .depth32f_stencil8_sample_stencil.nearest_size_npot

  dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d
    .uint_stencil.nearest.s_clamp_to_edge_t_clamp_to_border_npot
    .uint_stencil.nearest.s_repeat_t_clamp_to_border_npot
    .uint_stencil.nearest.s_mirrored_repeat_t_clamp_to_border_npot

  piglits:
    arb_framebuffer_object-depth-stencil-blit *stencil*
    framebuffer-blit-levels draw stencil
    arb_texture_stencil8/
       texwrap formats offset/gl_stencil_index8, npot
       texwrap formats/gl_stencil_index8, npot
    ext_framebuffer_multisample
       accuracy all_samples stencil_resolve small depthstencil
       unaligned-blit * stencil downsample
    ext_texture_array/fbo-depth-array *stencil
    egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24

v2: use util_is_power_of_two_or_zero (Marek)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32169>
2024-11-24 20:43:57 +01:00
Benjamin Lee
7eda433095 nir: document order requirement for nir_lower_viewport_transform
This requirement is currently satisfied by the usage in panfrost and
lima.

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/32084>
2024-11-24 17:25:14 +00:00
Benjamin Lee
11b6e47618 nir: clamp small W in nir_lower_viewport_transform
Because we are doing perspective division before clipping, small
gl_Position.w values will give Inf for positions and interpolated
varyings. Before this change, primitives containing a vertex with w=0
were invisible.

This is only used in panfrost and lima.

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/32084>
2024-11-24 17:25:14 +00:00
Tapani Pälli
19b6991160 anv/android: always create 2 graphics and compute capable queues
Android hwui requires 2 queues.

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/32279>
2024-11-24 16:39:33 +00:00
Alyssa Rosenzweig
430fa29953 asahi: refmt
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
0755b6d3d5 asahi: add XML for cdm stream link with return
I don't know of any case of Apple's driver using this, but it seems to work. The
stream link bit is identical to VDM so that was easy, the tricky part was the
return but I bruteforced the encoding space and this is the (only) thing that
worked. So add the XML.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
ebdca6344e asahi/genxml: define missing macros
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
e01dc7a588 asahi/genxml: optimize out masking with shr
noticed in the agx asm.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
6a1a3dac21 asahi/genxml: fix 128-bit in CL path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
a34b3ecb75 asahi/genxml: fix 0 encoding for groups
this was breaking launch word merging.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
65cc99a916 libagx: don't export vertex_id_for_top
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
810971532f libagx: fix return type
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
6dea5f49f2 hk: dce
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
33b41e029a hk: add cmd buffer to hk_cs
convenient.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
7609a974a3 hk: use common wg size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
7c921fa0d7 hk: do not increment GS queries for passthru GS
fixes vkd3d-proton test_query_pipeline_statistics

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
6b8d4cca7e hk: be robust against invalid MSAA inputs
fixes vkd3d-proton test_multisample_rendering

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
1f7598c202 hk: implement EXT_depth_bias_control
fixes Z24 depth bias with Proton

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
94160615ef hk: handle mismatching colour vs z/s dimensions
hw doesn't really care. fixes test_mismatching_rtv_dsv_size

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
628a119d82 hk: expose missing eds3 feature
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
0caf6e0440 hk: generalize internal launch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
aae0c1d5a8 asahi,hk: reenable rgb32 buffer textures
Apparently Direct3D has this. Boo :'(

This reverts commit 049808630e.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
02d4f49bcd agx: gather workgroup size
deduplicate this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
f4bd5466ee agx: vectorize scratch access
can help a lot for scratchy shaders. affected shader is a compute shader in
graphics bench.

total instructions in shared programs: 2751334 -> 2750950 (-0.01%)
instructions in affected programs: 4308 -> 3924 (-8.91%)
helped: 2
HURT: 0

total bytes in shared programs: 21482512 -> 21480592 (<.01%)
bytes in affected programs: 27448 -> 25528 (-7.00%)
helped: 2
HURT: 0

total fills in shared programs: 732 -> 540 (-26.23%)
fills in affected programs: 396 -> 204 (-48.48%)
helped: 2
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
e99418919c asahi/clc: drop getopt
I don't think it's buying us anything anymore.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
a1fe60fd98 asahi/decode: disasm 3D helper progs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
b001d68c69 asahi: drop desc align alloc
might bring it back later idk we'll see.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
ae8e45e19c asahi,agx: move texture lowering into the compiler
this untangles things for precomp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
2c17df7010 asahi: drop dead ACCESS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
c602832471 libagx: DCE
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
6aad96f6cd libagx: move out of lib/
make the hierarchy saner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
liuqiang
82e68de681 lavapipe: Resolved write to pointer after free
Write to "alloc" pointer variable after free "alloc"

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")

Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32292>
2024-11-24 06:11:40 +00:00
Karol Herbst
6088a4373c rusticl/mesa: make driver_name() return a &CStr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32253>
2024-11-23 11:29:18 +00:00
Karol Herbst
4750619491 rusticl/kernel: convert name and type_name to Option<CString>
This also lets us throw CL_KERNEL_ARG_INFO_NOT_AVAILABLE easily on non
existing metadata.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32253>
2024-11-23 11:29:18 +00:00
Karol Herbst
813edb6cea rusticl: check for overrun status when deserializing
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32253>
2024-11-23 11:29:18 +00:00
Mike Lothian
3aa7497cc0 gallium/radeon: Fix r600_pci_ids.h include
The new location is pci_ids/r600_pci_ids.h

Fixes: 1299f5c50a ("gallium/radeon: import libdrm_radeon source code, drop the dependency")
Signed-off-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/32298>
2024-11-23 02:35:57 +00:00
Alyssa Rosenzweig
41958cfc73 libagx: switch to vtn_bindgen
this splits out our headers properly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226>
2024-11-22 23:04:17 +00:00
Alyssa Rosenzweig
0b588506ff vtn: introduce vtn_bindgen tool
This is a small command line utility to generate NIR bindings for a SPIR-V
library, using vtn's infrastructure for this. This is split out from asahi_clc
in an effort to make clc more modular. Notably, this tool does not depend on:

* LLVM, SPIRV-LLVM, CLC, etc (important for Android, and gets us closer to the
  clang spir-v future)
* Driver details other than addressing modes (which are already largely
  hardcoded, setting them to anything else doesn't make a ton of sense for CL C)
* The driver itself, or its backend compiler. That means that the backend
  compiler can depend on the generated bindings header, even if the compiler is
  also used for internal shader precompiling. This breaks the dep loop.

So in short term, this solves the dependency problem for asahi, and in the long
term helps more drivers use clc infrastructure without re-rolling things
themselves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226>
2024-11-22 23:04:17 +00:00
Alyssa Rosenzweig
6874c4f516 nir: add nir_fixup_is_exported pass
See comment in the pass for motivation. To be used for asahi clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226>
2024-11-22 23:04:17 +00:00
Caio Oliveira
0c0b61b029 intel/brw: Dump IR after lower scoreboard pass
Acked-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32269>
2024-11-22 21:47:46 +00:00
Caio Oliveira
90343f452d intel/brw: Fix SWSB output when printing IR
The printing routine was ignoring dependencies that
were only unordered.

Acked-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32269>
2024-11-22 21:47:46 +00:00
Caio Oliveira
1d704af515 intel/brw: Fix decoding of cond_modifier and saturate in EU validation
These fields are only valid in certain formats, so set them accordingly.
Note the check if !is_send is used because FORMAT_BASIC is reused for
SEND/SENDS in some platforms.  If we start to see more cases like that,
we can create a new FORMAT for it.

The cond_modifier is trickier because on top of that, it is not valid
for 64-bit immediates in some platforms.  Found when EU validation
complained about moving 64-bit immediates with higher bits.

Fixes: e4440df2d8 ("intel/brw: Add pred/cmod/sat to brw_hw_decoded_inst")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32287>
2024-11-22 21:15:46 +00:00
Eric Engestrom
480fcf7aff radv/ci: document regression of test_shader_sm66_is_helper_lane in 7469f99e...25b8f4f7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32309>
2024-11-22 20:49:52 +00:00
Nanley Chery
385080fb92 intel: Allow CCS on 3D surfaces for gfx120
According to HSD 1406738321, full resolves and fast-clears don't work
properly on 3D textures. Up until now, we've disabled CCS for this case.
Instead, redescribe the surface as 2-dimensional to perform auxiliary
surface operations.

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/31880>
2024-11-22 20:11:43 +00:00
Nanley Chery
84208d514e intel/isl: Allow CCS on 3D 64bpp+ Tile64
The restriction is incorrectly tagged for gfx12.5.

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/31880>
2024-11-22 20:11:43 +00:00
Nanley Chery
e32203827a intel/blorp: Assert 3D Ys fast-clear restriction
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/31880>
2024-11-22 20:11:43 +00:00
Chia-I Wu
4d35002949 panvk: expand top-of-pipe and bottom-of-pipe
Use vk_expand_src_stage_flags2 and vk_expand_dst_stage_flags2, instead
of vk_expand_pipeline_stage_flags2, to expand bottom-of-pipe and
top-of-pipe respectively.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32289>
2024-11-22 19:46:35 +00:00
Deborah Brouwer
4c8ff06449 ci/pipeline_message: add unit tests for tool
Add initial unit tests for pipeline_summary.py

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32151>
2024-11-22 19:42:32 +00:00
Deborah Brouwer
76648a60bb ci: add a tool to summarize a failed pipeline
pipeline_summary.py generates a markdown summary of the reasons why a
gitlab pipeline failed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32151>
2024-11-22 19:42:32 +00:00
Caio Oliveira
9383a62d95 intel/executor: Enable PTL
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32196>
2024-11-22 10:26:12 -08:00
Derek Foreman
2e49448a43 vulkan/wsi/wayland: Move timing calculations to the swapchain
When we create a new swapchain to replace the one currently presenting on
a surface, we need to reset all these timing variables. Otherwise we can
lose track of corrections that were made for the old swapchain when we
delete undelivered presentation feedback results.

Also, we use these variables when queuing a presentation, but we also use
them in the dispatch code that can be called by WaitForPresent from another
thread. We need to protect these variables against concurrent usage.

This is all much easier to do when they're stored as part of the swapchain
instead of the surface, so just move them there and adjust the locking.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32121>
2024-11-22 15:50:35 +00:00
Derek Foreman
b9c8afae33 vulkan/wsi/wayland: Avoid spurious discard event at startup
When we start using timestamps, the current code will generate an event
stream like:

feedback
set barrier
wait barrier
commit

feedback
set timestamp
set barrier
commit

wait barrier
commit

The second content update can cause the feedback request from the first to
send a discarded event if the timestamp is in the past.

Be less clever and just put waits in both our content updates.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32121>
2024-11-22 15:50:35 +00:00
Derek Foreman
ed2bb692f7 vulkan/wsi/wayland: Fix time calculation
When occluded, the current math always rounds down to 0 cycles and leads
to improperly throttled frame delivery.

Improve the comment, and use a formula that leads to generating future
times even when occluded.

Also remove some dead code, as we can never get here with a period of 0.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32121>
2024-11-22 15:50:34 +00:00
Boris Brezillon
f1665024b8 panvk/ci: Update CI expectations to have a green CI
Update just enough of the fail list to have a green CI. I'm sure a
no-fraction run would uncover other improvements/failures/flakes, but
the goal here is to detect improvements/regressions introduced by new
MRs, not to make the list accurate. This will be tackled in a follow-up
MR.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32302>
2024-11-22 15:00:51 +00:00
David Rosca
12fff8005a frontends/va: Enable 3-plane YUV formats as postproc output
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
6c83f3c3bb gallium/vl: Don't support planar RGB as video format
We assume everywhere that RGB is not planar, so sampling
and color space conversions will not work correctly with RGBP.
Drivers can still support RGBP, but processing entrypoint with
shaders doesn't support it.

Fixes: bdb7f36aa8 ("frontends/va: add support for RGBP rt_format")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
0f533b387c gallium/vl: Implement rendering to 3-plane YUV formats
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
7d1ce3d802 frontends/va: Change default fourcc for RGB 10bit to X2R10G10B10
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
3e3eb62cae frontends/va: Return correct pixel formats in surface attributes query
This matches the supported formats we query for in config attributes.
Also prefer YUY2 over YUYV (identical formats), as YUY2 has a VA_FOURCC_YUY2
definition and some applications will only try to use this fourcc code.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
Eric Engestrom
c20e9868bf ci/container: setup sections in all image builds
Several of them don't use sections yet, but let's just have it
everywhere to avoid weird surprised when moving code around and suddenly
a section is used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32299>
2024-11-22 11:40:56 +01:00
Eric Engestrom
712eccf544 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
ad42be50c9 ci/deqp: fully isolate deqp builds
Since the builds can be from very different versions of the code, we
need to make sure the common bits are compiled from the correct code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
1b973278bd ci/deqp: make sure the main commit is actually from the main branch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
84e855953c ci/deqp: add build of main branch
For now, this just contains the tools unrelated to any API being tested
(`testlog-to-{xml,csv,junit})`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
e3c3b270d8 ci/deqp: build glcts in gles build, for gles*-khr tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
393eafe10b ci/deqp: error out in case of invalid build API
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
9a689b15d9 ci/deqp: avoid downloading 1.47 GiB multiple times
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
7832ff9b26 ci/deqp: fetch & checkout exactly the commit/tag/branch requested
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
97e6bda35c ci/deqp: build testlog tools on android
`cuttlefish-runner.sh` uses them so we can't skip them

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
e549b6fba2 ci/deqp: only compress caselists when they exist
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
08e5a50921 ci/deqp: move testlog-to-* tools to /deqp
While at it, make it a move instead of copy + delete.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
55eb200e81 zink+radv/ci: fix deqp binary used for gles tests
I did half the job in that commit: I split the two apis into two
invocations, but I didn't fix the binary used for the gles one...

Fixes: 14279087fb ("ci/deqp-runner: split gl & gles groups to use the correct binary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
25bf8e9682 zink+nvk/ci: fix deqp binary used for gles tests
Fixes: 5a6ffd1420 ("zink/ci: add zink+nvk glcts+piglit job on a GA106 (RTX 3060)")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Daniel Schürmann
bb87832ce0 aco/insert_NOPs: add early exit to handle_valu_partial_forwarding_hazard_instr
No need to continue if there was already a hazard found in
a different control flow path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
2024-11-22 08:46:32 +00:00
Daniel Schürmann
07df37ba01 aco/insert_NOPs: use RegCounterMap as replacement for the CounterMap implementation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
2024-11-22 08:46:32 +00:00
Daniel Schürmann
fb5e5adfb3 aco/insert_NOPs: implement vector-based RegCounterMap as replacement for VGPRCounterMap
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
2024-11-22 08:46:32 +00:00
Lionel Landwerlin
b44faa22ab anv: document the X4 Foundations workaround a bit more
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/32297>
2024-11-22 10:19:26 +02:00
Lionel Landwerlin
0fa3be44aa anv: add a workaround for X4 Foundations
This title incorrectly tries to allocate descriptor sets larger than
the number of sampler items in the descriptor pool.

Workaround by taking other largest item count in the descriptor pool
and use that for samplers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11795
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285>
2024-11-22 06:44:34 +00:00
Lionel Landwerlin
14d8da4c3c anv: indent driconf code
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285>
2024-11-22 06:44:34 +00:00
Lionel Landwerlin
d483f7d984 anv: track allocated descriptor pool sizes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285>
2024-11-22 06:44:34 +00:00
Dave Airlie
25b8f4f714 venus: handle device probing properly.
Currently if you try to probe the virtio ICD on a non-virtio system
it will fail in CreateInstance which causes the loader to spit on the
screen.

However instance creation shouldn't fail, the driver should just
not enumerate any devices in this case. It's a bit tricky to ensure
this, but return instance and then handle instance destruction
and fail device enumeration.

Cc: mesa-stable
Reviewed-by: Ryan Neph
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32266>
2024-11-22 13:06:11 +10:00
Dave Airlie
0d15376647 v3dv: report correct error on failure to probe
When probing ICDs, the broadcom driver returns the wrong error code
which spews on the console instead of silently failing.

Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32266>
2024-11-22 13:05:57 +10:00
Caio Oliveira
3e2599d475 intel/brw: Use <V,W,H> notation for FIXED_GRF and ARF source when printing IR
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32260>
2024-11-21 17:36:34 -08:00
Caio Oliveira
71d362db66 intel/brw: Omit type and region in payload sources when printing IR
These are not really used since SEND messages deal with full GRFs.

Before

```
send(8) (mlen: 1) (ex_mlen: 1) (null):UD, 0u, 0u, g1:UD, g8:UD
send(8) (mlen: 1) g5:UD, 0u, 0u, g4:UD, (null):UD
send(8) (mlen: 1) (ex_mlen: 1) (null):UD, 0u, 16777216u, g1:D, g6:UD
send(8) (mlen: 1) (EOT) (null):UD, 0u, 0u, g126:UD, (null):UD NoMask
```

and after

```
send(8) (mlen: 1) (ex_mlen: 1) (null), 0u, 0u, g1, g8
send(8) (mlen: 1) g5, 0u, 0u, g4, (null)
send(8) (mlen: 1) (ex_mlen: 1) (null), 0u, 16777216u, g1, g6
send(8) (mlen: 1) (EOT) (null), 0u, 0u, g126, (null) NoMask
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32259>
2024-11-22 00:50:40 +00:00
Caio Oliveira
8474dc853d intel/brw: Add SHADER_OPCODE_QUAD_SWAP
For the horizontal, vertical and diagonal variants.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31053>
2024-11-22 00:27:01 +00:00
Timur Kristóf
73fc29b25c ac/nir/ngg: Slightly refactor workgroup scan.
No functional changes, just makes the code more readable.
Use inverse_ballot instead of elect.
Wrap if contents, rename if.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-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/31973>
2024-11-22 01:01:39 +01:00
Timur Kristóf
24ccd134a6 ac/nir/cull: Slightly refactor control flow for small primitive culling.
Move the NIR control flow out of the cull_small_primitive_triangle
function to make it more readable and follow the other functions.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-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/31973>
2024-11-22 01:01:35 +01:00
Timur Kristóf
218c824e27 ac/nir/ngg: Trade 1 VALU shift for 2 SALU add.
Change the workgroup scan to be inclusive and adjust
the scalar operations after it.
This gets rid of 1 VALU instruction for 2 SALU. Win!

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-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/31973>
2024-11-22 01:01:31 +01:00
Timur Kristóf
340ec61984 ac/nir/ngg: Don't emit dead code with dot_op.
dot_op would be dead code when v_dot instructions are unavailable.
It was originally added there because ACO didn't have an ILP
scheduler yet, but now it does so let's trust it to do its job.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-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/31973>
2024-11-22 01:01:09 +01:00
Timur Kristóf
b9d2b5e100 radv: Don't flush at the end of each command buffer on GFX6.
It should be enough to do this at the end of each submit instead.

Signed-off-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/31695>
2024-11-21 23:23:09 +00:00
Timur Kristóf
030a7510ce radv: Add a flush postamble on GFX6.
Create a CS which contains just a cache flush,
that can be used as a postamble in command submissions.

According to RadeonSI code, the kernel flushes L2
before shaders are finished on GFX6.

Previously, RADV always added a flush at the end of
each command buffer. The flush postamble should be
a less wasteful alternative to that.

Signed-off-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/31695>
2024-11-21 23:23:09 +00:00
Chia-I Wu
b3adf02b22 panvk: fix dirty check for prepare_blend
Add the missing fs_user_dirty and PANVK_CMD_GRAPHICS_DIRTY_RENDER_STATE
checks.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32267>
2024-11-21 23:02:22 +00:00
Chia-I Wu
e6f0c473ca panvk: minor clean up to prepare_blend
Sort the dirty states and make it clear that we use
panvk_rendering_state.

Constify color_attachment_samples for panvk_per_arch(blend_emit_descs).

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32267>
2024-11-21 23:02:21 +00:00
Danylo Piliaiev
fc50fb35b0 tu,freedreno: Enable linear mipmap tail for UBWC images
There is no point in using UBWC for last small mip levels,
it's an additional overhead for memory and likely less performant.

Additionaly this change fixes multi-planar formats with `noubwc`.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31631>
2024-11-21 22:28:34 +00:00
Danylo Piliaiev
9fc01ec4df freedreno/fdl: Pass fd_dev_info to fdl6_layout
In the next commit we will need to make a decision about layouts
based on GPU capabilities.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31631>
2024-11-21 22:28:34 +00:00
Danylo Piliaiev
4ccbc924b5 tu: Enable UBWC for 3D images without mipmaps
Many D3D11 games use 3D images writing to them from compute shaders.
Most of such 3D images don't use mipmaps, and in such case enabling
UBWC is trivial.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31631>
2024-11-21 22:28:34 +00:00
Alyssa Rosenzweig
0aaf174e31 nir/lower_system_values: add ID to 32-bit lowering
OpenCL has 64-bit global IDs, but for driver-internal OpenCL we only need
32-bit. Might as well lower in nir_lower_system_values instead of bringing up a
whole new pass just for this.

Will be used for asahi precomp

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/32210>
2024-11-21 21:50:30 +00:00
Aleksi Sapon
f682982e53 zink: spec@arb_tessellation_shader@execution@gs-primitiveid-instanced is fixed
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32231>
2024-11-21 21:10:00 +00:00
Aleksi Sapon
f5379608fe llvmpipe: spec@arb_tessellation_shader@execution@gs-primitiveid-instanced is fixed
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32231>
2024-11-21 21:10:00 +00:00
Aleksi Sapon
b80d0d8bf4 draw: primitive ID is per-patch
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32231>
2024-11-21 21:10:00 +00:00
Tapani Pälli
c2b7bafd76 intel/dev: lower amount of max gs threads for Wa_18040209780
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32245>
2024-11-21 20:43:38 +00:00
Tapani Pälli
7117e14026 intel/dev: update mesa_defs.json from workaround database
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32245>
2024-11-21 20:43:38 +00:00
Eric Engestrom
2d1e0788d4 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
4facfd6f4d ci/container: add section around strip-rootfs.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
31a23d9801 ci/lava: add setup-test-env.sh to the rootfs
This allows strip-rootfs.sh to use sections, useful in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
05b2024c36 ci/container: close debian_{setup,cleanup} sections
Allowing users to collapse them without hiding everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
b693b704d9 ci/container: add sections around the other build scripts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
bc59acee8e ci/container: move wayland build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
b18cb0cb31 ci/container: move vulkan-validation build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
5655a30412 ci/container: move vkd3d-proton build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
b791074f2e ci/container: move rust build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
bc5ae2e5cb ci/container: move piglit build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
999cc1a86f ci/container: move ninetests build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
500c1c2d7c ci/container: move mold build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
0a7ab7da1a ci/container: move llvm-spirv build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
0cebd6b097 ci/container: move libclc build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
aba579811b ci/container: move kdl build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
5bfd49215b ci/container: move gfxreconstruct build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
493bebb9e9 ci/container: move fossilize build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
a824381408 ci/container: move deqp-runner build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
33ea8d3b81 ci/container: move crosvm build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
07de2140a3 ci/container: move apitrace build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
6551fb6504 ci/container: move deqp build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Caio Oliveira
2bd7592b0b intel/brw: Add SHADER_OPCODE_BALLOT
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31052>
2024-11-21 19:32:59 +00:00
Dylan Baker
50e7a8ef25 docs: Add calendar entries for 24.3 release.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Dylan Baker
94d3415dcb docs/release-calendar: remove 24.3 RC dates
Those are done

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Dylan Baker
3b5d135fad docs/relnotes/24.3.0: Add SHA sums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Dylan Baker
8661ff683a docs: add release notes for 24.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Danylo Piliaiev
e1efe655a7 ir3/parser: Add fullnop and fullsync sections for debugging
@fullnopstart
some assembly instructions
@fullnopend

Similar to fullnop and fullsync IR3 dbg options, but useful for
bisecting the assembly via shader override to find the problematic
place.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32256>
2024-11-21 18:45:15 +00:00
Danylo Piliaiev
2ab8eff511 tu/a7xx: Implement VK_KHR_fragment_shading_rate
- A650+ - should be able to support pipelineFragmentShadingRate
          but in some other way than A7XX. Not implemented here.
- A7XX  - support pipelineFragmentShadingRate and attachmentFragmentShadingRate
- A740+ - support primitiveFragmentShadingRate

layeredShadingRateAttachments is unsupported at the moment due to tests
failure, but prop driver supports it.

Passes:
  dEQP-VK.fragment_shading_rate.*
On A750/A740

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30905>
2024-11-21 17:59:09 +00:00
Danylo Piliaiev
117379a77a ir3,tu: Add support for Fragment Shading Rate and plumb it into Turnip
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30905>
2024-11-21 17:59:09 +00:00
Danylo Piliaiev
2038d363e7 freedreno/registers: Define Fragment Shading Rate registers
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30905>
2024-11-21 17:59:09 +00:00
Ruijing Dong
a53e6ae699 radeosi/vcn: enable EFC for VCN5.0+ when gfx >= 12
When gfx version >=12, EFC should be enabled for
VCN5 and plus, in that case DCC is transparent to
VCN engine.

The previous condition for DCC will be invalid, in
that case.

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/32263>
2024-11-21 16:14:11 +00:00
Eric Engestrom
db2806cf52 radeonsi/ci: drop two failures that are mysteriously fixed by using mold?
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
518ccd1ff3 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
524231d119 ci: when installing mold, make its use automatic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
ba0bb03c84 ci: drop override forcing ld to be gold (and forcing gold to be installed everywhere)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
657f8a08b7 ci/build: drop mold wrapper for ninja install
`install` doesn't perform any linking, it just installs what we built in
the previous command.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Georg Lehmann
43f77214a0 nir/move_discards_to_top: single final iteration
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Georg Lehmann
12d026d679 util: add BITSET_LAST_BIT_BEFORE
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
4c7d6e9437 nir/algebraic: optimize more bcsel(, bcsel())
This inot should be pretty optimizable.

fossil-db (navi21);
Totals from 2361 (2.97% of 79395) affected shaders:
MaxWaves: 50808 -> 50890 (+0.16%)
Instrs: 4168195 -> 4167332 (-0.02%); split: -0.05%, +0.03%
CodeSize: 22727496 -> 22708088 (-0.09%); split: -0.12%, +0.03%
VGPRs: 135160 -> 134824 (-0.25%)
SpillSGPRs: 723 -> 725 (+0.28%)
Latency: 37498671 -> 37479794 (-0.05%); split: -0.07%, +0.02%
InvThroughput: 10468406 -> 10453028 (-0.15%); split: -0.16%, +0.01%
VClause: 98258 -> 98283 (+0.03%); split: -0.04%, +0.07%
SClause: 111281 -> 111323 (+0.04%); split: -0.06%, +0.09%
Copies: 299281 -> 300155 (+0.29%); split: -0.17%, +0.46%
Branches: 115951 -> 116111 (+0.14%); split: -0.00%, +0.14%
PreSGPRs: 109404 -> 109462 (+0.05%); split: -0.14%, +0.19%
PreVGPRs: 114558 -> 114421 (-0.12%)
VALU: 2876823 -> 2869990 (-0.24%); split: -0.24%, +0.00%
SALU: 500286 -> 506124 (+1.17%); split: -0.03%, +1.20%

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/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
7ef1585fd6 nir/algebraic: add is_used_once to bcsel(, bcsel()) opts
fossil-db (navi21):
Totals from 888 (1.12% of 79395) affected shaders:
MaxWaves: 18034 -> 18046 (+0.07%)
Instrs: 3422053 -> 3418446 (-0.11%); split: -0.11%, +0.01%
CodeSize: 18520912 -> 18500604 (-0.11%); split: -0.12%, +0.01%
VGPRs: 53200 -> 53176 (-0.05%)
Latency: 27739575 -> 27735200 (-0.02%); split: -0.06%, +0.04%
InvThroughput: 6784257 -> 6782188 (-0.03%); split: -0.06%, +0.03%
VClause: 83188 -> 83199 (+0.01%); split: -0.00%, +0.02%
SClause: 91350 -> 91362 (+0.01%); split: -0.00%, +0.02%
Copies: 263277 -> 262638 (-0.24%); split: -0.29%, +0.05%
PreSGPRs: 52478 -> 51940 (-1.03%); split: -1.03%, +0.01%
PreVGPRs: 47418 -> 47397 (-0.04%); split: -0.06%, +0.02%
VALU: 2235368 -> 2234513 (-0.04%); split: -0.05%, +0.01%
SALU: 547587 -> 544839 (-0.50%); split: -0.51%, +0.00%
VMEM: 142861 -> 142871 (+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/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
b8c8482dbb nir/algebraic: add ddxy to is_only_used_as_float
The sources for these intrinsics are floating point.

fossil-db (navi21):
Totals from 67 (0.08% of 79395) affected shaders:
MaxWaves: 1128 -> 1116 (-1.06%)
Instrs: 113552 -> 113319 (-0.21%); split: -0.21%, +0.01%
CodeSize: 595248 -> 593360 (-0.32%)
VGPRs: 4344 -> 4392 (+1.10%)
Latency: 578158 -> 577526 (-0.11%); split: -0.18%, +0.07%
InvThroughput: 170150 -> 169908 (-0.14%); split: -0.23%, +0.09%
SClause: 3787 -> 3780 (-0.18%)
Copies: 4305 -> 4294 (-0.26%); split: -0.51%, +0.26%
PreVGPRs: 3883 -> 3925 (+1.08%)
VALU: 90007 -> 89774 (-0.26%); split: -0.27%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
69f1a035ff nir/lcssa: use nir_intrinsic_can_reorder
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
ca27951743 nir/opt_move_discards_to_top: allow multiple discards to be moved
fossil-db (navi21):
Totals from 755 (0.95% of 79395) affected shaders:
MaxWaves: 19732 -> 19808 (+0.39%); split: +0.61%, -0.22%
Instrs: 518468 -> 518982 (+0.10%); split: -0.09%, +0.19%
CodeSize: 2837120 -> 2841432 (+0.15%); split: -0.10%, +0.26%
VGPRs: 33240 -> 32592 (-1.95%); split: -2.48%, +0.53%
Latency: 5583293 -> 5651636 (+1.22%); split: -0.41%, +1.64%
InvThroughput: 1417459 -> 1416762 (-0.05%); split: -0.22%, +0.17%
VClause: 8477 -> 8461 (-0.19%); split: -1.06%, +0.87%
SClause: 16058 -> 16292 (+1.46%); split: -1.20%, +2.66%
Copies: 27310 -> 27288 (-0.08%); split: -1.27%, +1.19%
Branches: 11165 -> 11223 (+0.52%); split: -0.09%, +0.61%
PreSGPRs: 28883 -> 29096 (+0.74%); split: -0.99%, +1.73%
PreVGPRs: 25318 -> 25044 (-1.08%); split: -1.38%, +0.30%
VALU: 388566 -> 388586 (+0.01%); split: -0.05%, +0.06%
SALU: 46783 -> 47037 (+0.54%); split: -0.38%, +0.93%
VMEM: 12181 -> 12186 (+0.04%)
SMEM: 27818 -> 27772 (-0.17%); split: -0.17%, +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/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
37d77a12e9 nir/opt_move_discards_to_top: add more intrinsics to add_src_to_worklist
fossil-db (navi21):
Totals from 115 (0.14% of 79395) affected shaders:
MaxWaves: 2882 -> 2886 (+0.14%); split: +0.62%, -0.49%
Instrs: 71640 -> 71686 (+0.06%); split: -0.21%, +0.28%
CodeSize: 395820 -> 395084 (-0.19%); split: -0.39%, +0.20%
VGPRs: 5224 -> 5256 (+0.61%); split: -0.61%, +1.23%
Latency: 1114025 -> 1145891 (+2.86%); split: -0.12%, +2.98%
InvThroughput: 239149 -> 239028 (-0.05%); split: -0.07%, +0.02%
VClause: 1289 -> 1291 (+0.16%); split: -0.62%, +0.78%
SClause: 2267 -> 2203 (-2.82%); split: -5.38%, +2.56%
Copies: 4359 -> 4372 (+0.30%); split: -2.18%, +2.48%
Branches: 1215 -> 1225 (+0.82%)
PreSGPRs: 4225 -> 4265 (+0.95%); split: -1.35%, +2.30%
PreVGPRs: 4166 -> 4189 (+0.55%); split: -0.96%, +1.51%
VALU: 53590 -> 53614 (+0.04%); split: -0.10%, +0.14%
SALU: 6527 -> 6539 (+0.18%); split: -0.84%, +1.03%
SMEM: 4120 -> 4117 (-0.07%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
08e355a287 nir/opt_move_discards_to_top: use nir_intrinsic_can_reorder
fossil-db (navi21):
Totals from 2306 (2.90% of 79395) affected shaders:
MaxWaves: 65920 -> 65952 (+0.05%); split: +0.22%, -0.17%
Instrs: 1056765 -> 1058517 (+0.17%); split: -0.09%, +0.26%
CodeSize: 5802396 -> 5808076 (+0.10%); split: -0.13%, +0.23%
VGPRs: 79976 -> 79248 (-0.91%); split: -1.46%, +0.55%
Latency: 17215154 -> 17527774 (+1.82%); split: -0.11%, +1.92%
InvThroughput: 4911203 -> 4918838 (+0.16%); split: -0.06%, +0.22%
VClause: 16214 -> 16268 (+0.33%); split: -0.44%, +0.78%
SClause: 33208 -> 34167 (+2.89%); split: -1.02%, +3.91%
Copies: 58352 -> 58343 (-0.02%); split: -1.20%, +1.18%
Branches: 21857 -> 21863 (+0.03%); split: -0.02%, +0.05%
PreSGPRs: 73666 -> 74298 (+0.86%); split: -0.82%, +1.67%
PreVGPRs: 55234 -> 55720 (+0.88%); split: -0.41%, +1.29%
VALU: 756386 -> 756329 (-0.01%); split: -0.06%, +0.05%
SALU: 123838 -> 124320 (+0.39%); split: -0.35%, +0.74%
VMEM: 25002 -> 25009 (+0.03%)
SMEM: 60765 -> 60580 (-0.30%); split: -0.41%, +0.11%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
fff3eb7848 nir/opt_move_discards_to_top: update variable name
Discard doesn't exist anymore. There is only terminate.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
eea5be2e28 nir/opt_move_discards_to_top: remove recursion
This kind of recursion is unreliable with large shaders or small stack
limits.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
4c6fdb113f nir: fix return value of nir_instr_move for some cases
This fixes a potential issue where nir_opt_move_discards_to_top would
always return progress.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: f97fb1fa55 ("nir: Add a nir_instr_move helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:44 +00:00
Rhys Perry
8bbc8284d9 nir/opt_move_discards_to_top: use nir_tex_instr_has_implicit_derivative
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 48158636bf ("nir: add is_gather_implicit_lod")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:44 +00:00
Georg Lehmann
f3926c9d4e aco/isel: use undef Operands for p_create_vector created from nir vecs
Foz-DB Navi31:
Totals from 27464 (34.59% of 79395) affected shaders:
Instrs: 9595601 -> 9535260 (-0.63%); split: -0.63%, +0.00%
CodeSize: 47900112 -> 47658648 (-0.50%); split: -0.50%, +0.00%
Latency: 43928471 -> 43918448 (-0.02%); split: -0.05%, +0.02%
InvThroughput: 4940105 -> 4903447 (-0.74%); split: -0.75%, +0.01%
Copies: 667294 -> 604603 (-9.39%); split: -9.39%, +0.00%
VALU: 5282264 -> 5219604 (-1.19%); split: -1.19%, +0.00%
VOPD: 342 -> 311 (-9.06%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
ec487d01e2 nir/opt_undef: handle unpack/pack like mov/vec
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/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
af974b5fe9 nir/opt_undef: keep undefs used by partial undef vectors
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/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
a9d3caf3bf nir/opt_undef: use some nir helpers
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/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
6630c6d912 nir/opt_undef: replace undef in a separate pass
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/32249>
2024-11-21 14:09:52 +00:00
Eric Engestrom
5ba6200b99 intel/ci: add missing .intel-common-manual-rules to .{iris,crocus,i915g}-manual-rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32278>
2024-11-21 11:37:01 +00:00
Eric Engestrom
5ffd170033 intel/ci: disable CML jobs because of networking issues
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32278>
2024-11-21 11:37:01 +00:00
Maíra Canal
2af12c5b36 v3dv: Check multiple DRM primary nodes before picking the display fd
Raspberry Pi 5 has different drivers for different types of connectors.
For example, HDMI connections are handled through vc4, but DSI
connections are handled through drm-rp1-dsi.

Currently, we only allow vc4 as display driver, which means that, when
we use VK_KHR_display with a DSI display, we won't get any available
displays.

In order to make sure we have available displays when using DSI/DPI/VEC
displays, enumerate all DRM primary nodes and use the first fd that has
a connected output. For example, in the case we have only a DSI display
connected to the RPi 5, it will pick the drm-rp1-dsi as the device. In
the case we have both DSI and HDMI displays connected, it will pick the
first fd that it checks.

Ideally, we would like to see all displays available in the return of
`vkGetPhysicalDeviceDisplayProperties2KHR`, but `wsi->fd` is a variable,
not an array. Therefore, it only supports one fd.

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/32123>
2024-11-21 11:13:07 +00:00
Gert Wollny
2a35d1a13f ci: Upref virglrenderer version
The host has changes that are required by the latest virgl patches.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
41c6738882 virgl/vtest: Add support for creating blob resources
Buffers that are created using MAP_PERSISTENT or
MAP_COHERENT will created as blob resources.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
8b33eece30 virgl/vtest: change interface of virgl_vtest_submit_cmd
Instead of passing the whole command buffer structure just pass
the actual command stream buffer and its size. With that we can
submit a command ad-hoc.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
a32de23a9d virgl/vtest: When trying to use protocol 3 check host feature
Protocol version 3 used host side resource IDs that may be reused.
Because with older host versions index-buffer binding may go wrong
in this case, we have to check whether the host vrend version is
actually ready for protocol version 3, and if not we re-negotiate
the protocol version only allowing up to version 2.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
4e3f21533a virgl/vtest: take handle from host when using protocol version >=3
When the protocol is >=3 multiple contexts may be handled by one host
process, and therefore we have to use the handle/resource ID that is
assigned by the host.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Erik Faye-Lund
58498ab806 panvk: document reason for maxResourceSize-limit
There's no reason to calculate this more closely; the Vulkan spec
explicitly allows for it to be conservative. And there's no other Vulkan
driver in Mesa that currently does anything else.

But, we have another reason to limit to this specific value (which also
happens to be the minimum value allowed by the spec); we'll overflow the
32-bits of slice_stride for resources where the product of width, height
and texel-size is over UINT32_MAX. But with this limit in place, we
avoid this.

This limit will go away in v11, beacuse there's an additional five bits
of slice_stride there. But let's leave that for later.

Anyway, let's document why this is the correct limit, insted of having
the FINISHME-comment.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32265>
2024-11-21 08:59:15 +00:00
Erik Faye-Lund
b81eb99b42 panvk: check for maxResourceSize-overflow in vkCreateImage
We're supposed to report an error if we're attempting to allocate images
larger than maxResourceSize. So let's add the logic for this.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32265>
2024-11-21 08:59:15 +00:00
Iago Toral Quiroga
f988a2f336 broadcom: move double-buffer heuristic helpers to the compiler
This avoids pulling the dependency on NIR headers in
libbroadcom_v3d.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32240>
2024-11-21 07:21:47 +00:00
John Anthony
653808c209 panvk: Enable VK_KHR_vertex_attribute_divisor
Panvk currently enables VK_EXT_vertex_attribute_divisor, but Mali HW
does not support a non-zero firstInstance when a divisor is used.
supportsNonZeroFirstInstance is correctly set to false to advertise
this, however this property was only added when the extension was
promoted. Thus we need to remove support for
VK_EXT_vertex_attribute_divisor and enable
VK_KHR_vertex_attribute_divisor instead.

Also fixes an issue with non-zero divisor for v10.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32137>
2024-11-21 06:02:13 +00:00
Martin Roukala (né Peres)
5e40ccf979 Revert "ci: disable mupuf's farm"
This reverts commit bb228bc684e63f392bbbb7e859dfde4725a5a30d now that the
electric renovation is essentially over \o/.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32274>
2024-11-21 04:50:29 +00:00
Guilherme Gallo
2e8e14fa9f ci/iris: Update iris-cml-deqp CI expectations
One test has timed out when the parallel number changed.
And other one flaked.
Both are inside the `KHR-Single-GL46.arrays_of_arrays_gl` test group.
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/66875845

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
17e36bc894 ci/iris: Fix iris-cml-traces expectations
The results just changed a tiny bit, nothing relevant, so let's update
the traces checksums.

See also:
https://mesa.pages.freedesktop.org/-/mesa/-/jobs/66830844/artifacts/results/summary/problems.html

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
9b567a59f4 ci/iris: Rebalance iris-cml-deqp jobs
There are more puffs available in the farm, so let's use them to reduce
from 20 minutes on average to 10 minutes.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
b15eeff992 ci/iris: Force UART for puff boards
We are expericing some difficulties with the LAVA IP addressing for puff
DUTs atm, blocking the SSH session to happen smoothly.

So, let's force the UART only communication to bypass this issue until
it is solved.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
f7e7a9ed57 ci/intel: Set HWCI modules for puff DUT
We were missing the i915 during the boot, making the intel-cml jobs fail

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
f4301626cd ci/lava: Uprev freezegun
The former version was presenting some bugs running fixtures in parallel
testing.
With the new version, we need to change the side effects on mocks a
little bit and fix a start time to make the tests reproducible.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
93ce733425 ci/lava: Improve exception handling for job failures
Include detailed error messages when raising exceptions on LAVA job
failures to enhance debugging and error tracking.

Also, handle additional error types by extracting error messages from
metadata and retrying accordingly.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
b2c2f0d187 ci/lava: Set default exit code to 1 for failed jobs
Sets the default exit code to 1 to ensure the GitLab job fails when the
LAVA job fails or is interrupted. Adds tests to verify the exit code is
correctly set based on the logs or the lack of them (unexpected
finishing: timeouts and canceling).

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Timothy Arceri
7469f99ea1 glsl: remove more now unused params from glsl_to_nir()
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Timothy Arceri
44de5f1c46 Revert "glsl: Move ForceGLSLAbsSqrt handling to glsl-to-nir."
This reverts commit 46bf687882.

We wont be removing this lowering file and having this workaround in
glsl_to_nir() creates a dependency on the const values that we could
otherwise avoid, so lets just move this back. Dropping the consts
will be useful in a follow up series that aims to drop all the glsl
ir function inlining code by converting builtin functions to nir.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Timothy Arceri
10c292acf6 glsl: remove unused member
Unused since 063d62f142

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Timothy Arceri
8ac81c5bb4 glsl: tidy up glsl_to_nir() params
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Juston Li
cbb3bb5c7b util/cache_test: Fix racey Cache.List test
Instead of using unreliable polling to wait for foz db updater to parse
and load from the dynamic list, also use inotify to wait for foz db
updater close the list file after its done updating.

Fixes: 4dfd306454 ("disk_cache: Disable the "List" test for RO disk cache.")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32237>
2024-11-21 02:11:32 +00:00
Chia-I Wu
3e9b8488b6 panvk: fix frag_completed for layered rendering
Make sure frag_completed is incremented once per render pass, regardless
of layer count.

This fixes

  [44354.379592] panthor fb000000.gpu: [drm] Failed to extend the tiler heap

in some cases.

Fixes: 157a4dc509 ("panvk/csf: Fix multi-layer rendering")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32234>
2024-11-21 01:01:08 +00:00
Chia-I Wu
9c6b71217d panvk: clang-format issue_fragment_jobs
To avoid mixing cosmetic and functional changes in the following commit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32234>
2024-11-21 01:01:08 +00:00
Chia-I Wu
79a99a2c05 panvk: no need to map IB internally on valhall
The hack is only needed before valhall.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12178
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32232>
2024-11-21 00:33:18 +00:00
Georg Lehmann
0776b56ad6 nir: cse terminate/demote
Foz-DB Navi21:
Totals from 32 (0.04% of 79206) affected shaders:
MaxWaves: 984 -> 976 (-0.81%)
Instrs: 7719 -> 7496 (-2.89%)
CodeSize: 43220 -> 42264 (-2.21%)
VGPRs: 856 -> 872 (+1.87%)
Latency: 62689 -> 62453 (-0.38%); split: -0.72%, +0.34%
InvThroughput: 8988 -> 8968 (-0.22%); split: -0.23%, +0.01%
VClause: 248 -> 249 (+0.40%)
SClause: 296 -> 293 (-1.01%)
Copies: 580 -> 534 (-7.93%); split: -9.31%, +1.38%
Branches: 181 -> 139 (-23.20%)
PreSGPRs: 841 -> 834 (-0.83%)
SALU: 1091 -> 933 (-14.48%)

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/32235>
2024-11-20 23:54:04 +00:00
Georg Lehmann
a67ca0eb59 nir/instr_set: support instrs with no def
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/32235>
2024-11-20 23:54:04 +00:00
Georg Lehmann
7097b705b5 nir/instr_set: replace nir_instr_get_def_def with nir_instr_def
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/32235>
2024-11-20 23:54:04 +00:00
Georg Lehmann
4299809321 nir: return def for debug info in nir_instr_def
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/32235>
2024-11-20 23:54:04 +00:00
Benjamin Lee
8f25cc0bbc panvk: inherit sample count in secondary cmdbufs
Fixes crashes in dEQP-VK.draw.dynamic_rendering.partial_secondary_cmd_buff.multiple_interpolation.*

    src/panfrost/vulkan/csf/panvk_vX_cmd_draw.c:1413: void panvk_cmd_draw(struct panvk_cmd_buffer *, struct panvk_draw_info *): Assertion `rasterization_samples == fbinfo->nr_samples' failed.

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/32238>
2024-11-20 22:20:43 +00:00
Marek Olšák
680f7afe0b radeonsi: don't use nir_io_dont_optimize because it's deprecated
There is a new environment variable that can be used instead.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:30 +00:00
Marek Olšák
7e959864b2 radeonsi: enable NGG culling for non-monolithic TES and GS
It doesn't enable back face culling and small line culling. Those can only
be enabled for monolithic shaders. It only enables view culling and small
triangle culling.

Doing this has these minor advantages:

1. We can enable at least some culling immediately instead of when the first
   monolithic shader finishes compilation.

2. If back face culling and clip planes are disabled, we no longer compile
   monolithic TES and GS shader variants to get only view culling and small
   triangle culling.

3. shader-db will show culling code changes for TES and GS.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:30 +00:00
Marek Olšák
d75df43b5f radeonsi: only compute and use min_direct_count on gfx7-8
min_direct_count and multi_instances_smaller_than_primgroup
are only used by gfx7-8.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
06292538ae radeonsi: add helper si_shader_culling_enabled
it will contain more logic

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
d7415d3717 radeonsi: clean up and rename gfx10_edgeflags_have_effect
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
5bf1ef94db radeonsi: return a better value for load_initial_edgeflags_amd
Handle points and lines for all relevant shader stages.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
6988967a1f radeonsi: rewrite/replace gfx10_ngg_get_vertices_per_prim
Reuse si_get_input_prim (which is similar) and split it into 2 functions:
- si_get_output_prim_simplified
- si_get_num_vertices_per_output_prim

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
963a84677e radeonsi: optionally return MESA_PRIM_UNKNOWN from si_get_input_prim
it will be used later

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
691a9ccb33 radeonsi: prepare for making SI_NGG_CULL_TRIANGLES/LINES VS only, rename them
They will have no effect on TES and GS, so this will make it more obvious.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
1b03b78bf8 ac/surface: adjust HiZ enablement
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Samuel Pitoiset
aca20fd2e1 radv: mark VERDE (GFX6) as Vulkan 1.3 conformant
https://www.khronos.org/conformance/adopters/conformant-products#submission_820

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32255>
2024-11-20 19:26:20 +00:00
Karmjit Mahil
21baf2f6c1 tu: Fix memory leaks on VK_PIPELINE_COMPILE_REQUIRED
For a TU_PIPELINE_GRAPHICS_LIB we were taking a ref to the descriptor
set layout but never releasing on VK_PIPELINE_COMPILE_REQUIRED.
Since VK_PIPELINE_COMPILE_REQUIRED is technically an error, the user
doesn't call vkDestroyPipeline() for it so the descriptor sets
referenced were never getting freed.

Addresses:
```
Direct leak of 304 byte(s) in 1 object(s) allocated from:
    #0 0x7fa5a93ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7fa44bac84 in vk_default_alloc ../src/vulkan/util/vk_alloc.c:26
    #2 0x7fa32ea5d8 in vk_alloc ../src/vulkan/util/vk_alloc.h:48
    #3 0x7fa32ea60c in vk_zalloc ../src/vulkan/util/vk_alloc.h:56
    #4 0x7fa32ea750 in vk_descriptor_set_layout_zalloc
       ../src/vulkan/runtime/vk_descriptor_set_layout.c:49
    #5 0x7fa306fc98 in tu_CreateDescriptorSetLayout(VkDevice_T*,
       VkDescriptorSetLayoutCreateInfo const*, VkAllocationCallbacks
const*, VkDescriptorSetLayout_T**)
../src/freedreno/vulkan/tu_descriptor_set.cc:161
```
and
```
Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f9b4b3ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f9925e900 in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f9925e8d4 in ralloc_context ../src/util/ralloc.c:105
    #3 0x7f98b4b214 in tu_pipeline_builder_build<(chip)7>
       ../src/freedreno/vulkan/tu_pipeline.cc:3898
    #4 0x7f98b46bd8 in tu_graphics_pipeline_create<(chip)7>
       ../src/freedreno/vulkan/tu_pipeline.cc:4203
    #5 0x7f98b22588 in VkResult
       tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.pipeline.pipeline_library.shader_module_identifier.pipeline_from_id.graphics.4_variants.no_spec_constants.no_pipeline_cache.all_zeros_id.no_exec_properties.vert_tesc_tese_frag

Cc: mesa-stable
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32188>
2024-11-20 18:52:35 +00:00
Zan Dobersek
2817a286e0 tu: ensure completion of generic-clear resolves for color, depth/stencil clears
Combination of concurrent resolve groups and generic clear support on a750
exposed a problem around color and depth/stencil clears. With all resolves
now non-blocking in nature, we need a guarantee that clears issued through
commands will complete before any future resolves.

To achieve that, in case of generic clears being used, a cache flush is
done in order to generate the CCU_RESOLVE_CLEAN event that will ensure any
future resolve will block until the just-emitted clears are completed.

Fixes following flaky CTS tests on a750:
  dEQP-VK.pipeline.monolithic.framebuffer_attachment.2d_array_32x32_48x48_4_ms
  dEQP-VK.pipeline.pipeline_library.framebuffer_attachment.2d_array_32x32_48x48_4_ms

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 25b73dff5a ("tu/a7xx: use concurrent resolve groups")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32242>
2024-11-20 17:39:31 +00:00
Alyssa Rosenzweig
4477eed302 compiler: make glsl_sampler_dim available to CL
useful with the NIR bindings for image load/store.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
39afffe956 nir: split off some definitions for OpenCL
we want some enum values on device for NIR->CL bindings. specifically,
src_type/dest_type indices.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
e3b14481e3 vtn: preserve name, is_return in bindings
we want to plumb as much signature through as possible.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
733ec7c675 vtn: use named parameters in bindgen
If the input spir-v isn't stripped, preserving the names makes the generated
header more readable. This makes semantic autocomplete (IDEs) work properly with
vtn_bindgen prototypes.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
f25b7103fe vtn: use rzalloc in bindgen
we don't want garbage.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
5d7a230324 vtn: gather function parameter names
Unstripped SPIR-V libraries generated from OpenCL have lots of function
parameter names. Gather them.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
d248618d81 nir/print: print parameter names in calls
if we have them. example:

call libagx_geometry_input_address %10, p %3, vtx %9, location %0 (0x0)

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
6b35d7eb13 nir/print: annotate entrypoints
we can have multiple in a collection of OpenCL kernels.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
eebfbf5ecd nir/print: print function signature
parameter dimensions and names if we have them. example:

decl_function libagx_geometry_input_address (64 return, 64 p, 32 vtx, 32 location)

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
3da8444be5 nir: add names to function parameters
SPIR-V has this information. We should try to preserve it.

Signed-off-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/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
61862b209e nir/opt_algebraic: optimize convert_uint_sat(ulong)
I wrote this in my query copy shader, it didn't get the codegen I expected, so I
investigated.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:50 +00:00
Alyssa Rosenzweig
07ba9335ae nir/conversion_builder: avoid redundant uint->uint clamp
algebraic will clean up but there's no reason to generate it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:50 +00:00
Alyssa Rosenzweig
76927a3b43 nir/lower_convert_alu_types: use intrinsics_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:50 +00:00
Alyssa Rosenzweig
b94d640ba0 agx: make needs_g13x_coherency a tri-state
If we know the shader doesn't use global atomics, we don't care if the target
has this quirk or not and we can produce a single binary for all G13/G14
hardware. Model that in the shader key.

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/32224>
2024-11-20 16:10:11 +00:00
Alyssa Rosenzweig
358f40ea90 panfrost: switch to u_tristate
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/32224>
2024-11-20 16:10:11 +00:00
Alyssa Rosenzweig
847e0e78f8 util: add u_tristate data structure
rip the pan_tristate enum from panfrost and move it to common.

I've often wanted some sort of "yes/no/maybe" or "true/false/unknown" or
"always/never/sometimes" data structure. This adds a common one that is
hopefully neutral enough to cover all of the above.

Asahi will use this.

The Intel drivers could be ported to this (brw_sometimes/elk_sometimes), it
should be straightforward but I don't want to do that without being able to
easily test those changes.

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/32224>
2024-11-20 16:10:11 +00:00
David Rosca
1cf5ae4854 radeonsi/vpe: Don't allow DCC surfaces
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32136>
2024-11-20 15:43:30 +00:00
David Rosca
f5903ab60d radeonsi/vpe: Set correct surface swizzle mode
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32136>
2024-11-20 15:43:30 +00:00
Erik Faye-Lund
60146cc57c panvk: implement sampleRateShading
It doesn't feel great that we need to compile multiple identical shaders
just because we're going to toggle a bit in the command-stream, but this
seems to be the current state-of-art in mesa, so hmpf...

It makes state-validation trivial, so there's that.

This is loosely based on what NVK does.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32004>
2024-11-20 15:16:18 +00:00
Mary Guillemard
83c2d82637 panvk: Advertise VK_KHR_map_memory2
Already supported.

Signed-off-by: Mary Guillemard <mary.guillemard@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/32248>
2024-11-20 14:45:14 +00:00
Mary Guillemard
6ffde9294e panvk: Advertise VK_KHR_index_type_uint8
We already support VK_EXT_index_type_uint8 and this is the promoted
version of it.

Signed-off-by: Mary Guillemard <mary.guillemard@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/32248>
2024-11-20 14:45:14 +00:00
Mary Guillemard
52a03ab179 panvk: Enable shaderInt16
We already have all the lowering we need for this.

Signed-off-by: Mary Guillemard <mary.guillemard@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/32248>
2024-11-20 14:45:14 +00:00
Mary Guillemard
6e8cfc3ce4 panvk: Enable depthClamp and depthBiasClamp
Both are implemented but were not enabled.

Signed-off-by: Mary Guillemard <mary.guillemard@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/32248>
2024-11-20 14:45:14 +00:00
Jose Maria Casanova Crespo
48978d5ce5 rpi4/ci: Increase timeout for rusticl jobs.
Test run time has increased to 26min so last days
the nightly jobs have reached the 30min timeout just
before finishing the test execution.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32243>
2024-11-20 14:09:04 +00:00
Jose Maria Casanova Crespo
4675dfb959 vc4/ci: fails udpate after last piglit uprev
spec@arb_clear_texture@arb_clear_texture-supported-formats was fixed
with https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/970

Fixes: 93c8a65dee ("Uprev Piglit to d04d6fff00849a2a8e29ef3251c6ca04a2f68dc7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32243>
2024-11-20 14:09:04 +00:00
Philipp Zabel
7805a20d7b etnaviv/nn: Enable fused ReLU activation
Handle fused ReLU activation by setting the corresponding
flag in the NN engine configuration.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Philipp Zabel
01dc82bc63 teflon: Support fused ReLU activation
Enable support for fused ReLU activation on Conv2D and
DepthwiseConv2D operations.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Philipp Zabel
ad0ea175d5 teflon: Mark dilated convolutions and fused activation as not supported
Dilation and fused activations are not yet implemented.
Mark them as unsupported for now.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Philipp Zabel
319c56b10a teflon: Use correct convolution params struct
Use TfLiteDepthwiseConvParams for kTfLiteBuiltinDepthwiseConv2d.
The layout of stride_width, stride_height, and padding struct members
happens to be the same, but we shouldn't depend on that.
This prepares for using the activation, dilation_width_factor, and
dilation_height_factor members, which are at different offsets.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Lucas Stach
e3257f7461 etnaviv: drm: use list_first_entry
Instead of open-coding the same logic.

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/32233>
2024-11-20 13:08:28 +00:00
Lucas Stach
916bd73f1d etnaviv: drm: assert mutual exclusivity between cache and zombie list
The BO list member is used to track the BO both on the cache bucket list
as well as the zombie list. The BO being on both lists at the same time
is an invalid state. Add some asserts to validate this assumption.

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/32233>
2024-11-20 13:08:28 +00:00
Lucas Stach
6dd1640ff6 etnaviv: drm: properly handle BO list member
The BO list member isn't the head/entrypoint for a list, but is only
to be used to link the BO in various lists, so it should not be
initialized as a list head.

Now that the member is properly NULL initialized, we can use the
proper list_is_linked() function to check if the BO is on any
cache bucket or the zombie list.

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/32233>
2024-11-20 13:08:28 +00:00
Eric Engestrom
b471f75215 docs: fix invalid expression in teflon docs
Fixes: 4d23156127 ("teflon/docs: Clarify smoke test instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32247>
2024-11-20 12:54:28 +00:00
Eric Engestrom
d61dc62c59 docs: fix invalid expression in new pipe cap
Fixes: 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32247>
2024-11-20 12:54:28 +00:00
Peyton Lee
8ee52b5e23 frontends/va: function process_frame has return value
if the video post-processing is failed with some reason, the flow can
fall back to use shader/gfx to perform the processing.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32106>
2024-11-20 12:18:48 +00:00
Erik Faye-Lund
efe62ee03f panvk: remove duplicate property
We're setting this twice, whoops.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32244>
2024-11-20 11:51:15 +00:00
Erik Faye-Lund
3305f772fa panvk: wire up swapchain image creation
This is also needed to properly support VK_KHR_swapchain, so we should
implement it.

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/32216>
2024-11-20 11:28:39 +00:00
Erik Faye-Lund
f77fe432c1 panvk: support binding swapchain memory
This is required by VK_KHR_swapchain, so let's support it.

Fixes a crash in this CTS test-case:
dEQP-VK.wsi.wayland.swapchain.simulate_oom.image_swapchain_create_info

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/32216>
2024-11-20 11:28:39 +00:00
Daniel Schürmann
1ff9a0fe80 aco: remove Pseudo_instruction::tmp_in_scc
This information is redundant, now.

No fossil-changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Daniel Schürmann
a1a4a6061c aco/ra: explicitly assign scratch SGPR for linear phis
We are about to remove the branch definitions which previously
served this purpose. Also remove Block::scc_live_out.
Some changes due to round-robin RA.

Totals from 939 (1.18% of 79395) affected shaders: (Navi31)

Instrs: 5038786 -> 5038611 (-0.00%); split: -0.01%, +0.00%
CodeSize: 26153412 -> 26152904 (-0.00%); split: -0.00%, +0.00%
Latency: 41649989 -> 41650120 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 6447508 -> 6447536 (+0.00%); split: -0.00%, +0.00%
SClause: 131319 -> 131276 (-0.03%); split: -0.03%, +0.00%
Copies: 359362 -> 359256 (-0.03%); split: -0.05%, +0.02%
SALU: 639275 -> 639169 (-0.02%); split: -0.03%, +0.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Daniel Schürmann
17da551133 aco/ra: use bitset for sgpr_operands_alias_defs
We cannot rely on SGPR Temps being fully aligned to 64 SGPRs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Daniel Schürmann
a04e096339 aco/ra: set Pseudo_instruction::scratch_sgpr to SCC if it doesn't need to be preserved
Also ensure that 'needs_scratch_reg' is always true if SCC might be overwritten.
Few changes, because some p_split_vector get SCC as scratch reg assigned,
and thus, can inhibit some postRA optimizations.

Totals from 3 (0.00% of 79395) affected shaders: (Navi31)
Instrs: 10501 -> 10500 (-0.01%); split: -0.02%, +0.01%
CodeSize: 51580 -> 51520 (-0.12%); split: -0.12%, +0.01%
Latency: 84166 -> 84174 (+0.01%)
InvThroughput: 13109 -> 13111 (+0.02%)
SALU: 859 -> 860 (+0.12%)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Samuel Pitoiset
08c9dca8db radv: fix skipping on-disk shaders cache when not useful
This was just broken because individual shaders were still stored
on-disk in many situations:
- for shader object, all compute/graphics shaders were stored
- for fast-GPL, graphics shaders were stored
- for pipeline binaries, when the create flag was used
- for rt capture/replay and ray history

This should stop storing unused binaries on-disk and save space.

Found this by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32227>
2024-11-20 10:01:26 +00:00
Erik Faye-Lund
9c1de5c6b3 panvk: set correct max extents for images
We updated maxImageDimension2D etc to report the actual max size, but we
forgot to update GetPhysicalDeviceImageFormatProperties in the same way.
Let's do that to make things consistent.

This fixes the following CTS test-case:
dEQP-VK.wsi.wayland.swapchain.create.image_extent

Fixes: d5ed77800e ("panvk: Fix GetPhysicalDeviceProperties2() to report accurate info")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32221>
2024-11-20 09:20:17 +00:00
Erik Faye-Lund
00b25ec769 panfrost: use 64-bits for layout calculations
On modern Mali GPUs, we can have 16 bits for the X and Y sizes, already
overflowing 32-bit barrier even with a single layer of byte-sized
formats.

So let's make sure we have enough bits to avoid overflows here.

Fixes: d5ed77800e ("panvk: Fix GetPhysicalDeviceProperties2() to report accurate info")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32221>
2024-11-20 09:20:17 +00:00
Samuel Pitoiset
92446a2dcc radv: remove VK_VALVE_descriptor_set_host_mapping
This extension was only enabled for vkd3d-proton and it's obsolete
since VK_EXT_descriptor_buffer, which landed in September 2022.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32218>
2024-11-20 08:56:41 +00:00
David Rosca
c3ee2129ae pipe: Remove video update_decoder_target
Not used anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32095>
2024-11-20 08:31:00 +00:00
David Rosca
c324364f39 frontends/va: Only use interlaced surfaces when progressive is not supported
There is no good reason to use interlaced surfaces when progressive
is supported and it only creates issues when exporting the surface
or trying to do transcoding.
This allows to remove all workarounds that handled reallocating
from interlaced to progressive because a given operation would not
work for interlaced.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32095>
2024-11-20 08:31:00 +00:00
Samuel Pitoiset
2abbd361e2 radv,aco: dump LDS from the trap handler
Can be useful for debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32182>
2024-11-20 07:35:47 +00:00
Martin Roukala (né Peres)
2878a1343a ci: disable mupuf's farm
This is the second phase of the electric renocation I'm currently going
through, and hopefully will be the last time the system needs to be
taken down.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32212>
2024-11-20 06:09:37 +00:00
Lina Versace
56116c4da5 anv: Fix feature pipelineProtectedAccess
We enable VK_EXT_pipeline_protected_access only if
anv_physical_device::has_protected_contexts. Therefore we should do the
same for vk_features::pipelineProtectedAccess.

Fixes: 0b5408f ("anv: expose VK_EXT_pipeline_protected_access")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32206>
2024-11-20 04:31:54 +00:00
Lina Versace
4743695e91 anv: Update features.txt
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32205>
2024-11-20 03:53:19 +00:00
Lina Versace
906b1a0678 anv: Sort extensions in enablement table
Several extensions were unsorted in
anv_physical_device.c:get_device_extensions().
The worse was an EXT found between INTEL/NV.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32205>
2024-11-20 03:53:19 +00:00
Timothy Arceri
e34357015c glsl: fix compiler global temp collisions
glsl ir creates these temps to copy global initialiser values for
example. To avoid collisions during linking due to 2 shaders in the same
stage having temps with the same name we make sure to define these as
function variables not shader globals. This will put the temps into the
global instructions wrapper created in 7c5b21c032.

Fixes: cbfc225e2b ("glsl: switch to a full nir based linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12136

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32202>
2024-11-20 03:20:47 +00:00
Marek Olšák
25d4943481 nir: make use_interpolated_input_intrinsics a nir_lower_io parameter
This will need to be set to true when the GLSL linker lowers IO, which
can later be unlowered by st/mesa, and then drivers can lower it again
without load_interpolated_input. Therefore, it can't be a global
immutable option.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32229>
2024-11-20 02:45:37 +00:00
Timur Kristóf
c294e7f138 amd: Rename GFX1103_R1/R2 to PHOENIX/2
This is to match the code names used in other enums.
Also add comments to separate GFX11.5 and GFX12 chips.

v2 by Marek Olšák:
- Rename GFX1103 to in addrlib also
- Rework ac_get_family_name

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32170>
2024-11-20 02:14:40 +00:00
Caio Oliveira
d918edaf9a intel/common: Enable mi_builder test for PTL
Reviewed-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/32194>
2024-11-20 01:47:04 +00:00
Caio Oliveira
6b931a68c7 intel/common: Implement Xe KMD in mi_builder tests
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32194>
2024-11-20 01:47:04 +00:00
Caio Oliveira
3998602d0e intel/common: Prepare mi_builder tests to support Xe KMD
No functional change, just move i915 specific data to a struct
and check for kmd_type where appropriate.  This will make the
next patch (which adds Xe KMD support here) cleaner.

This patch had to make intel_kmd.h header C++ friendly so it
can use its symbols.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32194>
2024-11-20 01:47:04 +00:00
Caio Oliveira
3735652be8 intel/common: Properly dispose resources in mi_builder tests
Since we will already use SetUp()/TearDown(), remove the ctor/dtor
that now would be unused.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32194>
2024-11-20 01:47:04 +00:00
Chia-I Wu
1be7e2e89d panvk: implement check_status on v10+
vk_common_*Wait* calls vk_device_check_status to detect device lost.
This allows device lost to be reported more timely.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32166>
2024-11-20 01:19:32 +00:00
Chia-I Wu
a52ffa9f24 panvk: report queue lost timely when PANVK_DEBUG=sync
When PANVK_DEBUG=sync detects a failed job, report queue lost
immediately.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32166>
2024-11-20 01:19:32 +00:00
Chia-I Wu
c631f1d1b6 ci: update the comment on MESA_VK_ABORT_ON_DEVICE_LOSS
deqp-runner version is 0.20.2 already.  But we would like to keep
MESA_VK_ABORT_ON_DEVICE_LOSS globally because, without it, after the
first VK_ERROR_DEVICE_LOST in a test group, the error is sticky and the
remaining tests will be considered failed as well.

deqp-vk gained --deqp-terminate-on-device-lost since 1.3.8.0 and enabled
it by default since 1.3.10.0.  But let's prefer our own mechanism.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32228>
2024-11-20 00:37:28 +00:00
Marek Olšák
3affe3cb17 vc4/lower_blend: don't read non-existent channels
nir_lower_texcoord_replace_late had swapped parameters in nir_undef.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
4da5b11ca9 nir: add nir_io_separate_clip_cull_distance_arrays to replace PIPE_CAP
to make the flag available in NIR passes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
23eb4f3454 nir: rename nir_io_glsl_opt_varyings to nir_io_dont_optimize and deprecate it
The meaning is negated.

This NIR option is deprecated and shouldn't be used. It means any IO
optimizations can be disabled and it's a currently a workaround for zink,
which is the only driver that asks for it by default. The original option
is replaced by an environment variable for the GLSL linker.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
dacae272bf nir: add nir_io_semantics::fb_fetch_output_coherent
Lowering IO should preserve this. Freedreno needs it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
5d5a7bd221 nir/lower_two_sided_color: fix for lowered IO
1-bit input loads are illegal in NIR.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
65d32b96cf nir/lower_fragcoord_wtrans: handle trimmed fragcoord loads
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
dcca0e590c nir/lower_clip: rewrite find_output to handle vec2/3 and make it readable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
45b20c8249 nir/lower_clip: fixes for lowered IO without compact arrays
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
878d23e171 nir/lower_pntc_ytransform: handle lowered IO
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
18f3c92b87 nir/print: print fb_fetch_output for variables
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Chia-I Wu
3f84573be4 panvk: fix base_workgroup_id sysval
Make sure the sysval is pushed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-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/32203>
2024-11-19 23:13:54 +00:00
Lionel Landwerlin
9b779068c3 anv: prevent access to destroyed vk_sync objects post submission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 36ea90a361 ("anv: Convert to the common sync and submit framework")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12145
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32219>
2024-11-19 19:40:03 +00:00
Rhys Perry
6c07c0b862 glsl/list: remove underscores in foreach_list_typed macros
I'm not sure why they're here, but I find them to be annoying to read.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
66df291513 glsl/list: remove parenthesis in foreach_list_typed macros
These are not necessary because __node is only a single token. The
variable declaration wouldn't work otherwise.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
02e353a066 glsl/list: add and use helpers in foreach_list_typed macros
This reduces noise when reading them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
17045b9465 glsl/list: add comments above foreach macros
The _safe suffix is misleading.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
65a54b4ec4 nir/lcssa: fix premature exit of loop after rematerializing derefs
If we have NIR such as:

32x4  %48 = @load_vulkan_descriptor (%47) (desc_type=SSBO)
32x4  %76 = deref_cast (tint_symbol_11 *)%48 (ssbo tint_symbol_11)  (ptr_stride=0, align_mul=4, align_offset=0)
32x4  %77 = deref_struct &%76->tint_symbol_10 (ssbo int)  // &((tint_symbol_11 *)%48)->tint_symbol_10

A single nir_rematerialize_deref_in_use_blocks() will rematerialize the
deref_struct and then it's deref_cast. However,
nir_foreach_instr_reverse_safe is not safe if the next iteration's
instruction is removed. This can result in the instruction loop exiting
and the load_vulkan_descriptor never having an LCSSA phi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 439e8c42cc ("nir/lcssa: Fix rematerializing derefs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11770
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
327e5465fc nir/algebraic: check bit sizes in lowered unpack(pack()) optimization
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 894f7f4387 ("nir_opt_algebraic: Add a couple optimizations for lowered unpack(pack())")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32157>
2024-11-19 18:17:18 +00:00
Rhys Perry
ecd6ae12fb nir/algebraic: fix iabs(ishr(iabs(a), b)) optimization
iabs(a) is not positive if "a" is the minimum signed value, so this is
incorrect in that case for some values of "b".

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 2b76de9b5d ("nir/algebraic: Add a couple optimizations for iabs and ishr")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32157>
2024-11-19 18:17:17 +00:00
David Rosca
217d70fc38 frontends/va: Use compositor blit with different number of planes
This fixes Y8_U8_V8_444_UNORM -> NV12 conversion for example.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
6a01102efe frontends/va: Stop reallocating buffers in EndPicture
This is not used anymore and can be removed now.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
6bd21e4a06 frontends/va: Check if target buffer is supported in EndPicture
Check for all entrypoints, not just encode.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
7925f13a41 frontends/va: Stop reallocating according to JPEG sampling factor
Tested with FFmpeg 7.1, it uses correct formats for each sampling factor,
so this has been fixed and is not needed anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
0df7e80179 frontends/va: Stop reallocating buffers for protected playback
Instead set the protected flag on allocation and return error
when the protected state of surface doesn't match context.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
63fd685b31 frontends/va: Stop reallocating from progressive to interlaced in EndPicture
No driver should be hitting this path anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
910b81f73d frontends/va: Stop reallocating to prefered format in EndPicture
This was needed because of the issue with using NV12 regardless
of RT format that was fixed in previous commit.
There was a special case for AV1, because AV1 Profile 0 supports
both 8 and 10 bit, but this is also not needed anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
c8a893becd frontends/va: Create surfaces with correct fourcc for RT format
If applications doesn't send any attributes to describe the format,
we would always use driver preferred format (NV12). This is wrong
for any RT format other than the driver preferred (YUV420).
Driver doesn't have a choice here, we must use the matching format.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
f70ecba49a radeonsi: Check all supported formats in si_vid_is_target_buffer_supported
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:17 +00:00
Matt Turner
ba5c65f10b nir: Get correct number of components
The code wants the number of components used by the variable in the
current attribute slot, not the total number of components.

For e.g. a 4x3 matrix, glsl_get_components() returns 12, leading to the
following error reported by AddressSanitizer:

```
Test case 'dEQP-VK.tessellation.shader_input_output.cross_invocation_per_patch_mat4x3'..
../src/compiler/nir/nir_lower_io_to_vector.c:265:16: runtime error: index 4 out of bounds for type 'nir_variable *[4]'
```

Fixes: 5ef2b8f1f2 ("nir: Add a pass for lowering IO back to vector when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32193>
2024-11-19 16:35:17 +00:00
Timur Kristóf
cf36fc134e radv: Set dump flags in a smarter way by default.
If shader stages are specified but compilation stages aren't,
dump NIR, backend IR and disassembly.

If compilation stages are specified but shader stages aren't,
dump all shader stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:45 +01:00
Timur Kristóf
14ea24ab6f radv: Also allow filtering SPIR-V dump per stage.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:43 +01:00
Timur Kristóf
e6eaf7b950 radv: Slightly reword preoptir debug flag.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:42 +01:00
Timur Kristóf
8c1e2ac03b radv: Refactor RADV_DEBUG=shaders to be a combination of other options.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:40 +01:00
Timur Kristóf
6d5caabdd7 radv: Separate option to dump backend IR.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:38 +01:00
Timur Kristóf
649da9e744 radv: Separate option to print shader disassembly.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:35 +01:00
Timur Kristóf
3f92c0bbe9 radv: Separate option to dump NIR.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:33 +01:00
Timur Kristóf
d94e65574f aco: Separate options for printing IR and recording disassembly.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:28 +01:00
Timur Kristóf
ab89fdc3d4 radv: Add ability to dump shaders based on stage.
The new debug flags can make the output less overwhelming
and only dump what we want to see.

The old RADV_DEBUG=shaders will still print all stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:23 +01:00
Timur Kristóf
57161f516e radv: Mark GS copy shaders as internal.
Instead of passing the meta_shader arg.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:14:45 +01:00
Job Noorman
86795a6337 ir3: fold shared movs into other movs
Handle cases like this in ir3_shared_fold:

cov.f32f16 sssa_1, c0.x
mov.u16u16 ssa_2, sssa_1
=>
cov.f32f16 ssa_1, c0.x

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32211>
2024-11-19 14:30:35 +00:00
Mary Guillemard
957db02fed panvk: Advertise VK_EXT_host_query_reset
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:40:07 +01:00
Mary Guillemard
89e65dd227 panvk: Expose precise occlusion queries
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
cbdb4757d4 panvk: Implement occlusion queries for CSF
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
d1934e44fc panvk: Implement occlusion queries for JM
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
61534faf4e panvk: Wire occlusion queries to internals
Prepare CSF & JM to support occlusion queries.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
be023a3fe0 panfrost: Remove faulty assert in cs_loop_conditional_*
In case of nested if/else, the current block will not be the loop block.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
25248fae83 panvk: Take rasterization samples into account in draw
We were ignoring rasterization samples count before.

This fix "dEQP-VK.query_pool.occlusion_query.no_attachments_multisample"
failure.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
0d0547ee4a panvk: Only flag rw_nc pool as uncached on v10+
Panfrost doesn't support PAN_KMOD_BO_FLAG_GPU_UNCACHED and to keep
things usable on all generation, let's do that for now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Marek Olšák
ef4342e3c3 radeonsi/ci: add options to test llvmpipe, softpipe, virgl, zink
for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
51aa1d8381 radeonsi: fix gl_FrontFace elimination when one side is culled
Fixes: 55d81214c9 - radeonsi: replace gl_FrontFacing with a constant if one side is always culled

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
48c1c6247c radeonsi: handle nir_intrinsic_component in kill_ps_outputs
The assertion was failing with AMD_DEBUG=mono.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
5be9d76861 radeonsi: fix an assertion failure in si_shader_ps with AMD_DEBUG=mono
assert(!shader->key.ps.part.prolog.force_persp_center_interp ||
       (!G_0286CC_PERSP_SAMPLE_ENA(input_ena) && !G_0286CC_PERSP_CENTROID_ENA(input_ena)));
failed when all FS inputs have been eliminated by optimizations, which
causes LLVM to set PERSP_SAMPLE_ENA because at least 1 of those must be
enabled, which this code didn't expect.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
5b09aaf44d radeonsi: fix buffer_size for emulated GS statistics
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Mary Guillemard
1fc454673a panvk: Implement VK_EXT_sampler_filter_minmax for v10
This is supported by the hardware since v10.

Signed-off-by: Mary Guillemard <mary.guillemard@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/32215>
2024-11-19 11:55:05 +01:00
Caterina Shablia
a5bcf566a9 nir: lower INSTANCE_{ID,INDEX} to an offset load_instance_{index,id} respectively
If the hardware does not support INSTANCE_INDEX natively, it will be
lowered to load_instance_id + base_instance. Otherwise, INSTANCE_ID
will be lowered to load_instance_index - base_instance.

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/32158>
2024-11-19 09:18:47 +00:00
Caterina Shablia
b9be1f1f20 nir: introduce instance_index system value
The semantics of this newly introduced system value match
Vulkan's InstanceIndex exactly, and are equivalent to
instance_id + base_instance.

Some hardware, such as Mali Valhall or later, only provides
instance id offset by base_instance. Introducing a new system
value to represent this, rather than handling the mismatch
when lowering to BIR lets us use NIR to eliminate redundant
arithmetic that would follow from mismatched semantics, e.g.
instance_id could be lowered to instance_index - base_instance,
so expressions such as instance_id + base_instance would be
optimized to a simple instance_index.

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/32158>
2024-11-19 09:18:47 +00:00
Samuel Pitoiset
2f13723c0a radv: add a new drirc option to disable DCC for mips and enable it for RDR2
The game aliases two images. It binds a memory object to two different
images, the first one being an image with 4 mips and the second with
only one mip but the bind offset is incorrect. It's like it queried
the first image size with different usage flags, so that DCC was
disabled.

Force disabling DCC for mips fixes the incorrect rendering and doesn't
hurt performance.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10200
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32190>
2024-11-19 07:39:13 +00:00
Samuel Pitoiset
2e51d0c724 radv: add a helper to destroy a logical device
It's less error prone than duplicating every cleanups with a bunch of
gotos.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32112>
2024-11-19 07:02:52 +00:00
Samuel Pitoiset
2181ddf383 radv: destroy meta resources properly when creating the device failed
Better to call radv_device_finish_meta().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32112>
2024-11-19 07:02:52 +00:00
Caio Oliveira
0b66cb1f82 intel/brw: Allow extra SWSB encodings for Xe2
There are new combinations of ordered and unordered dependencies
available for the instructions to use, which among others include:

- combining FLOAT and INT pipe deps in SENDs;
- combining SRC mode deps in regular instructions for the inferred type.

This patch enables a couple of tests checking for the first case.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31375>
2024-11-19 04:27:00 +00:00
Caio Oliveira
1b13eea642 intel/brw: Add test for combining SWSB dependencies in SENDs
These are currently DISABLED_ since they fail.  A later patch will
enable them.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31375>
2024-11-19 04:27:00 +00:00
Dave Airlie
6714689613 nir/functions: force inlining for barriers.
A recent algebraic opt made a function that used to inline
with llvmpipe CL not inline anymore. However that function
has a barrier in it.

Handling barriers from inside a callstack is hard for llvmpipe
coroutines, so just force functions with barriers to be inlined.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32204>
2024-11-19 12:26:28 +10:00
Aaron Ruby
4614097756 meson: Remove experimental from gfxstream driver build
We (QNX) is using this with our VMM, and our Linux reference distro (which is currently in development).
With libaemu removed, it's much easier to integrate into a Linux-guest
build.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32161>
2024-11-19 00:42:52 +00:00
Chia-I Wu
0fb4609d94 panvk: add support for VK_EXT_queue_family_foreign
We can treat VK_QUEUE_FAMILY_FOREIGN_EXT as the host,  This makes sure
that, on release, all subqueues self-wait and all caches are flushed.
On acquire, all caches are invalidated.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
Chia-I Wu
715d6e740a panvk: improve VK_QUEUE_FAMILY_EXTERNAL support
The spec says that the user-specified srcStageMask/srcAccessMask should
be ignored for the acquire operation and the user-specified
dstStageMask/dstAccessMask should be ignored for the release operation.

Since we don't need any special handling for VK_QUEUE_FAMILY_EXTERNAL,
override them to NONE.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
Chia-I Wu
9e90e50362 panvk: add normalize_dependency
It normalizes the stage and access masks of a barrier.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
LingMan
0f47e362a6 rusticl: Use C-string literals for DiskCache::new
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
85aaeb4bf8 rusticl: Use C-string literals for NirShader::add_var
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
b9ccee0071 rusticl/core: Use C-string literals for XPlatManager::get_proc_address_func
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
fab6fa2bc8 rusticl/cl_prop: Use C-string literals
Avoids some pointless allocations when converting `&str` to `&CStr`.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
7ac2846c96 rusticl: Use C-string literals for spirv extension names
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
612ad0cb70 rusticl: Use C-string literals
They got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
62b8e053f7 mesa: Add rustfmt.toml
Unless rustfmt gets informed that we use the 2021 edition, it chokes on
C-string literals.

Passing the `--edition` parameter with every invocation would be annoying.
Create a config file instead.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
0ff3e2a0f9 compiler/rust: Use std::mem::offset_of!()
It got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
LingMan
190fbbe1d6 nak/hw_test: Use std::mem::offset_of!()
It got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
LingMan
718407e806 mesa: Bump required Rust version to 1.78
The Linux kernel requires Rust 1.78 since version 6.10. Thus, this update is
in line with our Rust update policy.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
Michel Zou
795a36325a ac/gpu_info: Fix missing prototype mingw error
Fixes: 246051ebc6 ("ac/gpu_info: print 32bpp modifiers")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Closes #8858

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32177>
2024-11-18 21:49:24 +00:00
Vldly
6d14cad330 freedreno: Fix resource tracking on repeated map with discard
In two functions implementing resource discard rebind_resource is called
on resource before its track record is reset. This prevents update of
dirty_resource or dirty_shader_resource because of conditions in
needs_dirty_resource. With rsc->track reset and dirty_resource bits
missing further calls to transfer_map will not try to reallocate
resource storage when needed.

A way to reproduce the issue in both functions is by executing at least
3 draws modifying bound texture or VBO each time. This patch fixes those
cases and some related piglit tests on a5xx and should fix it on other
GPUs. Also it fixes rendering in Firefox and vsraytrace (except vertical
line at right edge).

Fixes: 0a62a874fc ("freedreno: Re-work dirty-resource tracking")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10374
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32167>
2024-11-18 21:17:50 +00:00
Jordan Justen
eb10dc2e73 intel/dev: Add PTL 0xb0b0 PCI ID
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32149>
2024-11-18 20:53:06 +00:00
Job Noorman
554494e2cd ir3,tu: filter debug flags included in the hash key
Only include debug flags that have an influence on codegen.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
2024-11-18 20:19:56 +00:00
Job Noorman
d8c90806e4 ir3,tu: include ir3 debug flags in shader hash key
Many debug flags influence shader codegen but are currently not included
in the hash key. This causes surprising effects as cache lookups may
return shaders compiled with different debug flags than currently in
effect. This patch fixes this by including all debug flags  in the
shader hash key.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: c323848b0b ("ir3, tu: Plumb through support for per-shader robustness")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
2024-11-18 20:19:56 +00:00
David Rosca
4ec43c59da radeonsi/vcn: Use correct frame context buffer for preencode on VCN5
Fixes: 3c5fe03b92 ("radeonsi/vcn: Add support for VCN5 dpb tier2")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31985>
2024-11-18 19:41:05 +00:00
Karol Herbst
c0edb9344f rusticl: enable cl_khr_depth_images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:29 +00:00
Karol Herbst
67212c2fa6 rusticl/device: advertize cl_khr_depth_images if supported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:29 +00:00
Karol Herbst
2aec563acf rusticl/image: fix clEnqueueFillImage for CL_DEPTH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Karol Herbst
2acfb55dfb rusticl/mem: add restrictions for CL_DEPTH, CL_DEPTH_STENCIL and msaa images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Karol Herbst
fa379a9495 nir/lower_cl_images: lower scalar image_loads to vec4
This will be required for supporting depth images as the rest of mesa assumes those
to always return vec4.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Gurchetan Singh
b805e23f40 gfxstream: change output location
Change the output location for codegen to guest/vulkan_enc.
This is only run by AOSP devs, so it won't affect upstream.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
214dee0447 gfxstream: for Android, look for the autogenerated files
This is mostly a developer preference issue.  Some Android
devs like to commit auto-generated files for ${reasons},
though the style of Mesa is not to do so.

I personally like the Mesa style, since otherwise a 25 million
LoC project would be 40 million, but whatever.

An easy solution to just to check them in AOSP Mesa, but not
in upstream.  There are various mechanisms, particularly
auto-rollers, that enable this.  For example, there is no plan to
check in Blueprint files upstream, but they will be checked-in
and committed by the auto-roller.

For the scheme to work, we'll need slightly different meson
rules when the build target is Android versus otherwise.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
7c219ae7e0 gfxstream: delete qemu_pipe target
It has no sources..

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
9a1654f5ce gfxstream: conditionals for using gfxstream::aemu
It's a guest-only build target, and shouldn't be on the host.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Joshua Duong
04f5bfaee6 gfxstream: update auto-generated comments.
gfxstream-protocols/scripts/generate-vulkan-sources.sh ==>
mesa3d/src/gfxstream/codegen/generate-gfxstream-vulkan.sh

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Bo Hu
cd8b4d730b gfxstream: snapshot: DescriptorSet allocate and update
When batched descriptorset udpate optimization is turned
off, the descriptorset is not handled in snapshot.
This cl handles this situation.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Bo Hu
94b906ae44 gfxstream: snapshot: avoid double boxing dispatchable handle
For dispatchable handle, such as commandBuffer, it is always
left as boxed by decoder; consequently snapshoter should not
box it again.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Lionel Landwerlin
8845255881 anv: fix missing push constant reallocation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 62d96a6546 ("anv: add dirty tracking for push constant data")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12151
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30007>
2024-11-18 16:31:33 +00:00
Manuel
217c17e8a2 gfxstream: Avoid repeated functionality
Removed a function that creates anonymous file descriptors when called.
Additionally replaced a call of said function with the one from the "util"
directory. The intention is to avoid repeated functionality

util: Allow code to be compatible in c++ compilers

Added an extern "C" statement and preprocessor directives to make the
“os_create_anonymous_file” function compatible with c++ compilers

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32096>
2024-11-18 15:51:48 +00:00
Nanley Chery
f1724b44d0 anv: Drop fast-clear value conversion check
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5622
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Nanley Chery
93e42f9700 anv: Store fast-clear colors with the view swizzle
Prevents the next patch from failing CTS tests such as:

   dEQP-VK.api.image_clearing.core.clear_color_image.*.b4g4r4a4*

Brings back the feature that was introduced in commit 46187bb54f
("anv: Swizzle fast-clear values"), but went unused in commit
721d0c3e77 ("anv,hasvk: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR").

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Nanley Chery
2a9d7a3bd0 anv: Support non-0/1 sRGB fast-clear colors on gfx9
We're going to drop a generic restriction on clear color conversions in
anv_can_fast_clear_color(). Without preparing for it, the following
tests would fail:

* piglit.spec.arb_framebuffer_srgb.blit texture srgb msaa disabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit renderbuffer srgb msaa disabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit texture srgb downsample enabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit renderbuffer srgb downsample enabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit renderbuffer srgb msaa enabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit texture srgb msaa enabled clear.gen9_zinkm64

So, add support for sRGB sampling via BLORP transfer operations and drop
the gfx9-specific restriction on sRGB fast-clears.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Marek Olšák
899bee4af8 nir/opt_varyings: don't count the cost of the same instruction multiple times
Use pass_flags to indicate whether the instruction has already been added
to the total cost of the expression.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
405e9d9b74 nir/opt_varyings: implement compaction without flexible interpolation
We have to honor drivers when they say that different interpolation
qualifiers can't be mixed in the same vec4, indicated by
nir_io_has_flexible_input_interpolation_except_flat not being set.

This is a prerequisite for enabling nir_opt_varyings for all drivers.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
a7c671efc6 nir/opt_varyings: fix packing color varyings
BITSET_TEST_RANGE_INSIDE_WORD uses first_bit .. last_bit, same as
BITSET_RANGE, not first_bit .. size like BITFIELD_RANGE.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
f9b03cf405 nir/opt_varyings: add nir_io_compaction_rotates_color_channels
This was enabled by default in nir_opt_varyings, but vc4 can't handle
when shader outputs write Y but not X. Add an option for it and enable
it only for the driver that benefits from it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
8518e1cfd7 nir/opt_varyings: add nir_io_always_interpolate_convergent_fs_inputs
for Asahi

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Kenneth Graunke
95bc42af74 nir: Use load_global_constant for reorderable nir_var_mem_global access
The main difference between load_global and load_global_constant is that
the latter can be reordered arbitrarily.  If the access being lowered is
already tagged as being reorderable, then we can preserve that by using
the load_global_constant intrinsics instead of load_global.  This gives
us more flexibility.

On Intel, this lets us use the load_global_constant_uniform_block_intel
intrinsic for doing convergent block loads in more cases.  This nets us
significant reductions in spill/fills: Borderlands 3 on Lunarlake sees
spills/fills reduced by 53%.  Alchemist sees a 13% reduction.

Improves performance of Borderlands 3 DX12 on Intel Battlemage by
around 44%.  Improves Hogwarts Legacy by around 14%.

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/31995>
2024-11-18 12:55:47 +00:00
Kenneth Graunke
5848035443 brw: Fix try_rebuild_source's ult32/ushr handling to use unsigned types
We were accidentally doing a signed integer comparison here for ult32,
or a sign-extending shift for ushr.

One notable bit of fallout was that load_global_uniform_block_intel
address calculations broke on platforms that don't have native 64-bit
integer support, as the iadd64 lowering for "do I need to carry?" was
using ult32...and performing the wrong comparison.  We spotted this in
Borderlands 3 on Alchemist once we turned on other optimizations.

Thanks to Lionel Landwerlin for helping spot the problem!

Fixes: c7b312ad45 ("brw: factor out source extraction for rematerialization")
Fixes: 339630ab05 ("brw: enable A64 loads source rematerialization")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31995>
2024-11-18 12:55:47 +00:00
Kenneth Graunke
0a376a672a brw: Fix emit_a64_oword_block_header UNIFORM -> VGRF copies
This was triggering an assertion in the fs_builder::MOV helper that
the destination stride can't be 0 when dispatch_width > 1.  What we
want to do is copy the single 64-bit channel of data from the UNIFORM
file to a VGRF.  We can use a SIMD1 builder for that.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31995>
2024-11-18 12:55:47 +00:00
Karol Herbst
d0560f59ce vtn: handle struct kernel arguments passed by value
Due to LLVM ABI reasons the SPIRV-LLVM-Translator always uses pointers to
private memory for struct function parameters. This includes kernel entry
points.

However technically it's also legal to pass those parameters by value
according to the OpenCL SPIR-V Env spec.

One compiler making use of this is e.g. artic based on Thorin.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12149
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32141>
2024-11-18 12:12:21 +00:00
Marek Olšák
237ed6fd08 mesa: capture shaders to disk before invoking the linker
If there is an infinite loop in the GLSL linker, we want to write shaders
to disk before that.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
3179c65a5a st/mesa: add ST_DEBUG=xfb printing xfb info
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
89dad5618d gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER
It's required by the latest IO refactoring.

screen.rst explains it and it's not pretty. It can be argued that
finalize_nir shouldn't exist.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
b8ee69f7fe st/mesa: call pipe_screen::finalize_nir outside of st_finalize_nir
This is easier to read.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
7717e458f1 gallium: use struct nir_shader * type in finalize_nir instead of void *
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
6cd302dc39 glsl: add a helper for duplicated code calling nir_opt_varyings
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Collabora's Gfx CI Team
93c8a65dee Uprev Piglit to d04d6fff00849a2a8e29ef3251c6ca04a2f68dc7
eebe1b555f...d04d6fff00

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32085>
2024-11-18 10:05:34 +00:00
Erik Faye-Lund
5ced8b0ea2 glx: avoid null-deref
psc can be NULL here, so let's avoid dereferencing it.

Fixes: 34dea2b38e ("glx: unify extension binding")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32144>
2024-11-18 09:13:14 +00:00
Iago Toral Quiroga
d2fb489e0c v3dv: use the double buffer heuristic helpers
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
6d54a5514c v3d: use heuristic to enable double-buffer mode
This is still experimental and only enabled if V3D_DEBUG=db
is set.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
d81bcbe3de broadcom: add helpers for double-buffer heuristic
So we can share them between vulkan and gl.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
3355ceec3b v3d: store size of qpu program for compiled shaders
We will use this to inform heuristics about double-buffer.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
0ba8f65d44 v3d: drop blank line
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
234bea1bca v3dv: add missing support for double-buffer on V3D 7.x
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
f78d3833ef v3d: only enable double-buffer for jobs where it might make sense
Previously, double-buffer mode would apply to all jobs except msaa,
but this is not smart, since not all jobs can benefit from this. In
particular, if jobs load the tile buffer and don't store tiles
double buffer mode won't be effective and we would instead pay the
cost of the smaller tile size so we only want to enable in jobs
that meet these requirements.

In order to achieve this we need to postpone the decision about
double buffering until we know the loads and stores of the job,
which means we need to do this late after we have recorded draws.
This means that by default, we assume no double-buffer mode is
used and if we find we want to enable after emitting the draws
we need to re-compute tile sizes and rewrite the
TILE_BINNING_MODE_CFG packet accordingly.

Making the decison about double-buffer late will also enable us to
add heuristics to decide about double-buffer based on the draw calls
emitted in the job, but we will do this in a separate patch.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
c958dd4b6b v3d: do tile state BO allocation later
We don't need this until we are ready to emit the RCL for
the job and we want to do this late because double-buffering
will impact how big the allocations need to be.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
93ef28a134 v3d: save a pointer to the TILE_BINNING_MODE_CFG packet in the CL
We want to make the decision about double-buffer enablement much later
when we have enough information to make it. That means we might need
to rewrite this packet, so we need to save a pointer to its location
in the CL.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
3c0f84aa41 v3d: group tile spec into a struct inside the job
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
f0543d79aa broadcom: handle double buffer on V3D 7.1 tile size calculations
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
87acd4cde5 v3d: add a V3D_DEBUG option to force synchronous execution of jobs
This is useful to debug sync issues and can also can be used to
instrument tooling for dumping job execution times in the future.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Mary Guillemard
e5d64ca69c bi: Execute nir_opt_algebraic after nir_lower_pack
nir_lower_pack can generate split operations, execute algebraic again
to handle them.

This fix an assert on
"dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_float16" and
probably others tests.

Fixes: 3904cfabd6 ("bi: Use nir_opt_load_store_vectorize")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
98cff2e098 panvk: Implement VK_KHR_zero_initialize_workgroup_memory
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
f88ecf6bb1 panvk: Advertise VK_KHR_shader_relaxed_extended_instruction
Handled by common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
3478f01b0d panvk: Advertise VK_KHR_shader_non_semantic_info
Handled by common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
b13643f16e panvk: Advertise VK_EXT_tooling_info
Already implemented in common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
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/32131>
2024-11-18 09:05:31 +01:00
Lionel Landwerlin
431f353bfe anv: fix incorrect aspect flag for depth/stencil formats
We're asking if compression is supported and
anv_formats_ccs_e_compatible() is assuming color aspect.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0317c44872 ("anv: add VK_EXT_host_image_copy support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12155
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32153>
2024-11-18 07:01:28 +00:00
Sagar Ghuge
e5776bcb39 blorp: Use the calculated execution mask
Instead of setting execution mask to 0xFFFFFFFF, use the previously
calculated execution mask.

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/30474>
2024-11-18 04:42:52 +00:00
Brad Smith
67333c2632 util: Support elf_aux_info() on OpenBSD arm and ppc
Signed-off-by: Brad Smith <brad@comstyle.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31102>
2024-11-18 01:03:28 +00:00
Jianxun Zhang
8db71c95e1 isl: Move a CCS restriction in GFX 12.x
3D+MSAA is not supported and depth-stencil formats are all
32bpp or less. Move this restriction into single-sample
case.

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
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/31496>
2024-11-17 22:41:56 +00:00
Jianxun Zhang
ab56a9eecd isl: Allow CCS in more cases (xe2)
By restricting these limitations up to GFX 12, CCS support
can be present on these cases that we think Xe2+ platform
should support compression.

Noticeably, CCS is allowed on depth resources without HiZ,
multi-sampled resources without CCS, and multi-sampled
stencil resources.

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/31496>
2024-11-17 22:41:56 +00:00
Jianxun Zhang
dc70e2d556 iris: Allow compression on multi-sampled stencil (xe2)
Two aux functions are updated to fix piglit test once CCS is enabled on
multi-sampled stencil resources in a following change. As reviewers
suggested, we don't see much value of the assertion.
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496#note_2601233

Piglit test:
fbo-depthstencil blit default_fb -samples=16 -auto

iris_resolve.c:972: iris_resource_get_aux_state: Assertion
`res->surf.samples == 1 || res->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY' failed.

iris_resolve.c:996: iris_resource_set_aux_state: Assertion
`res->surf.samples == 1 || res->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY' failed.

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/31496>
2024-11-17 22:41:55 +00:00
Jianxun Zhang
705555b6b0 isl: Refactor WA 22015614752
Using intel_needs_workaround() within a block of GFX version
checker requires extra carefulness on the road because both
of them specify a range of applicable platforms. The WA block
can be unexpectedly skipped once the GFX version checker gets
updated later.

Moving the WA implementation out of the GFX block to decouple
them for more clarity and less chance of messing up next time.

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/31496>
2024-11-17 22:41:55 +00:00
Tomeu Vizoso
4d23156127 teflon/docs: Clarify smoke test instructions
Some improvements suggested by users.

Suggested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Tomeu Vizoso
778ca0824f teflon/docs: Add i.MX8MP to list of supported NPUs
It's working now!

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Tomeu Vizoso
5adb9d03ae teflon/docs: Update performance measurements on LibreComputer Alta
We got faster!

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Marek Olšák
a37c8b4e7c radeonsi/ci: update navi31 failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 22:01:06 -05:00
Marek Olšák
8deb32ac2e radeonsi: split outputs_written_before_tes_gs into ls_es_* and tcs_* masks
these will have different values later

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:29 -05:00
Marek Olšák
1d16d88e1e radeonsi: set *outputs_written in scan_io_usage instead of later
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:25 -05:00
Marek Olšák
3f6bc3e58d radeonsi: remove unused si_shader_info::output_readmask
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:21 -05:00
Marek Olšák
b10bb9f0ba radeonsi: don't set tess level outputs in patch_outputs_written unconditionally
It doesn't do anything. The tess level outputs that are actually written are
set just below that.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:17 -05:00
Marek Olšák
3a9e7e1e82 radeonsi: remove unused function si_get_tcs_out_patch_stride
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:13 -05:00
Marek Olšák
25ac573140 radeonsi: reduce si_shader_key_ge::tes_prim_mode size to 2 bits
enum tess_primitive_mode has only 4 values.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:10 -05:00
Marek Olšák
a00ed96585 radeonsi: replace are_tessfactors_def_in_all_invocs with nir_gather_tcs_info
This is now in common code.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:06 -05:00
Marek Olšák
702982d399 radeonsi: get the value for load_tcs_primitive_mode_amd from shader info
This is possible thanks to the commit:
    "st/mesa: copy some TES shader info fields to TCS".

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:00 -05:00
Marek Olšák
e28e05ffe4 radeonsi: don't overwrite info.tess._primitive mode when it can be correct
The linker now sets TCS info to match TES, and the key can contain 0
if it's not optimized.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:56 -05:00
Marek Olšák
3570edeae2 radeonsi: fix passing TCS wave ID from LS to HS for monolithic LS+HS
required by the new HS shader message code

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:34 -05:00
Marek Olšák
a7ba36f589 ac/nir: get pass_tessfactors_by_reg from nir_gather_tcs_info
If nir_tcs_info::all_invocations_define_tess_levels is true, the pass
doesn't have to insert a barrier and use output loads to get tess level
output values. It can just use the SSA defs that are being stored (or phis
thereof) to get the tess level output values.

The remaining tcs_info fields will be used by the HS shader message.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:29 -05:00
Marek Olšák
b258a9aa4e aco: remove unused TCS fields from aco_shader_info
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:26 -05:00
Eric Engestrom
985285f30a v3dv/ci: mark whole group as flaky
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32162>
2024-11-16 21:50:39 +00:00
Matt Turner
3d24f0ece1 vulkan: Avoid pointer aliasing
Avoids the sanitizer errors:

```
Test case 'dEQP-VK.pipeline.monolithic.spec_constant.graphics.vertex.basic.mixed_packed'..
../src/vulkan/util/vk_util.c:111:38: runtime error: load of misaligned address 0x603002b1c591 for type 'const uint16_t', which requires 2 byte alignment
0x603002b1c591: note: pointer points here
 00 00 00  98 76 98 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff
              ^
../src/vulkan/util/vk_util.c:108:38: runtime error: load of misaligned address 0x603002b1c593 for type 'const uint32_t', which requires 4 byte alignment
0x603002b1c593: note: pointer points here
 00  98 76 98 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
              ^
../src/vulkan/util/vk_util.c:105:38: runtime error: load of misaligned address 0x603002b1c597 for type 'const uint64_t', which requires 8 byte alignment
0x603002b1c597: note: pointer points here
 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  03 11 00
             ^
```

Fixes: 476dc3c050 ("vulkan: add vk_spec_info_to_nir_spirv util method")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32159>
2024-11-16 03:14:31 +00:00
Eric Engestrom
ad4e5538ba ci/crosvm: remove noise inside deqp-runner output
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32156>
2024-11-15 20:24:17 +00:00
Pavel Ondračka
8d3f2d2c23 r300: group KIL for R300/R400
Separate KIL counts to the indirection limit, so try to schedule it
within the TEX block on R300/R400, except for small shaders, where we
already know we are fine.

42 gained shaders on R400 (40 Trine and 2 This war of mine) at the
expense of some increase in register pressure.

shader-db:
total temps in shared programs: 18107 -> 18129 (0.12%)
temps in affected programs: 262 -> 284 (8.40%)
helped: 0
HURT: 22

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32023>
2024-11-15 18:02:55 +00:00
Tomeu Vizoso
6cdfc2d51c teflon: Add files mentioned in the docs for image classification
It is an easy way to check that the installation works and is in a
useful state.

The Python script is based on a example in the TensorFlow repository at:

tensorflow/lite/examples/python/label_image.py

The labels file is distributed by Google along the MobileNetV1 model
that we already have. These files are released under the Apache
license.

Reported-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31860>
2024-11-15 17:24:19 +00:00
Tomeu Vizoso
3f096c6995 etnaviv/ml: Support addition operations on V8
The proprietary driver on V8 uses a different way of lowering the
addition to a convolution that seems to be faster.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:05 +00:00
Tomeu Vizoso
eaecd0ffd6 etnaviv/ml: Adapt to changes in teflon regarding multiple inputs
The Gallium API that Teflon uses now supports a variable number of
inputs per operation.

Adapt to this change without any change in functionality.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:05 +00:00
Tomeu Vizoso
986f8c7ff2 teflon: Support multiple graph inputs and outputs
Operations other than tensor addition will also need to be able to
handle multiple inputs, and a variable number of them.

And for testing individual operations, we also need to support models
with multiple inputs.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:04 +00:00
Boris Brezillon
c0f47b12fc panvk/cs: Poison cmdbuf registers when PANVK_DEBUG=cs is set
Poison all cmdbuf registers to make sure we don't inherit state from
a previously executed cmdbuf.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
c3ff3f2405 panvk/csf: Fix a wait-LS operation in finish_cs()
cs_wait_slots() expects a mask, cs_wait_slot() a slot ID.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b9eed7a0d4 panvk: Cache the fs_required() result
get_fs() (and thus fs_required()) is called enough times during a draw
that it makes sense to cache the value in the graphics state instead of
calling fs_required() repeatedly.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
fd497b2278 panvk: Move common gfx bits to a new source file in the common dir
Keeping those distinct makes it hard to maintain (fixes hitting one
version but not the other). Let's make it common code and guard CSF/JM
specific code under #if PAN_ARCH blocks.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
79e5146378 panvk: Sanitize the driver-internal dirty state tracking
Coalesce all the dirty bits into a single bitset, and use dirty bits for
stuff that were already tracked through NULL GPU pointers.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
8b70f66440 panvk: Don't link the VS and FS shaders on v10
When IDVS+malloc is used, there's no linking involved (getting the
VS and FS shaders to agree on the varyings attributes), so we can
purely and simply skip this phase.

If we ever have to support the non-malloc or non-IDVS case, we'll need
to revisit the linking logic anyway, so let's kill the linking on v10
for 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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b07fd26211 panvk: Move is_dirty() to panvk_cmd_draw.h and rename it
We're about to bitset-based driver-internal dirty state tracking, and
we'll need to define new xx_is_dirty() macros, so let's rename the
existing one dyn_gfx_state_dirty() to avoid the confusion, and move it
to panvk_cmd_draw.h, since it's the same for JM and 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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b304a0c49b panvk: Move panvk_cmd_compute_state to a common place
panvk_cmd_compute_state is exactly the same in JM and CSF, so let's move
it to a common place.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b67b350b4c panvk: Move the panvk_cmd_graphics_state definition to panvk_cmd_draw.h
Those structs are almost the same on JM and CSF, so let's move them to a
common place and use #ifdef sections for fields that only apply to
CSF or JM.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
f211e5f9c5 panvk: Kill unused fields in panvk_cmd_graphics_state
Some fields are never used, others are set but never checked.

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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
8a5814b456 panvk: Change the prototype of panvk_select_tiler_hierarchy_mask()
We're going to put the panvk_cmd_graphics_state definition to
panvk_cmd_draw.h, which involves including panvk_cmd_draw.h from
panvk_cmd_buffer.h, which in turn means we can't include
panvk_cmd_buffer.h from panvk_cmd_draw.h.

Kill the circular inclusion by changing the prototype of
panvk_select_tiler_hierarchy_mask() to take a panvk_physical_device
and a panvk_cmd_graphics_state instead of a panvk_cmd_buffer oject.

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/31911>
2024-11-15 16:00:25 +00:00
Tomeu Vizoso
f6c3544392 etnaviv/ml: Zero all BOs
A few bugs due to uninitialized buffers have cropped up. For now let's
zero them all and see if we want to do something else when we get
concerned about compilation times.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32104>
2024-11-15 15:35:32 +00:00
Karol Herbst
a5149f3fef rusticl/kernel: fix kernel variant selection
Apparently I messed up enough so that the optimized kernel variant was
almost never selected.

This fixes that :)

Fixes: f098620c21 ("rusticl/kernel: add optimized Kernel variant")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32139>
2024-11-15 14:21:36 +00:00
Lars-Ivar Hesselberg Simonsen
0291f62c6a panvk: update expectations for G610
The prior commit fixed various dEQP-VK.*.suballocation.multisample*
tests.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32155>
2024-11-15 13:03:10 +01:00
Lars-Ivar Hesselberg Simonsen
595019526d panvk: Add frag->frag barrier before resolve
As resolve is implemented as a separate renderpass, we'll need to add a
frag->frag barrier before executing it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32155>
2024-11-15 13:03:07 +01:00
Corentin Noël
a7c8677241 virgl: Simply loop over the resources to figure-out if it is already added
There is not that many resources added to a command buffer to justify the resource
id being cached.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32134>
2024-11-15 11:33:52 +00:00
Robert Mader
758941ab0c v3d: Support SAND128 base modifier
The BROADCOM_SAND128 modifier is usually used with an extra parameter
to pass in the stride via a side channel. Quoting from drm_fourcc.h:
> The pitch between the start of each column is set to optimally
> switch between SDRAM banks. This is passed as the number of lines
> of column width in the modifier (we can't use the stride value due
> to various core checks that look at it , so you should set the
> stride to width*cpp).

So apparently this is just a workaround for limitations in some kernel
APIs. DRM modifiers, however, are arguably a bad fit for extra
parameters that aren't known in advance. In the Wayland/KMS ecosystem
many components depend on being able to treat modifiers as opaque, e.g.
for negotiations etc. In practice the current approach requires various
software components to manually use the
`DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT()` macro - using the
`DRM_FORMAT_MOD_BROADCOM_SAND128` modifier directly with formats like
`NV12` results in a rejection in the KMS driver and corrupted output
in Mesa (because we'd bail out early in `v3d_sand8_blit()`).

Fortunately the stride check limitations mentioned above don't seem to
apply to Mesa though. Thus we can just add support for the base modifier
and stride (coming from V4L2), allowing various toolkits, Wayland
compositors and V4L2 decoder implementations to support e.g.
`NV12` + `DRM_FORMAT_MOD_BROADCOM_SAND128` (`NC12` in V4L2) in a generic
way.

Notes:
1. Wayland compositors trying to offload composition to KMS will still
fail when doing a test commit.
2. There is another limitation - in the V4L2 MPLANE API - that
requires userspace to know the correct offset of the second plane. That's
a known API limitation though and only affects V4L2 decoder implementations.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32033>
2024-11-15 11:09:02 +00:00
Jose Maria Casanova Crespo
808ae13042 rpi4/ci: another detected flaky timeline_semaphore test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32154>
2024-11-15 10:48:54 +00:00
John Anthony
eb84f1e61f panvk: Enable storageBuffer16BitAccess
This is a mandatory feature if VK_KHR_16bit_storage is enabled.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32138>
2024-11-15 10:28:08 +00:00
Sam Lantinga
4ed8ef74b4 util: Fixed crash in HEVC encoding on 32-bit systems
This builds on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25059, and extends that change to all 32-bit systems.

This fixes a crash on SteamOS with the following test case:

        unsigned char data[] = {
          0x00, 0x00, 0x00, 0x01, 0x40, 0x01, 0x0c, 0x01, 0xff, 0xff, 0x01, 0x60,
          0x00, 0x00, 0x03, 0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
          0x99, 0x2c, 0x0c, 0x01, 0x64, 0x7c, 0x00, 0x7c, 0xd2, 0x56, 0x01, 0x40,
          0x00, 0x00, 0x00, 0x01, 0x42, 0x01, 0x01, 0x01, 0x60, 0x00, 0x00, 0x03,
          0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x99, 0xa0, 0x02,
          0x80, 0x80, 0x32, 0x16, 0x24, 0xbb, 0x90, 0x84, 0x48, 0x9a, 0x83, 0x03,
          0x03, 0x02, 0x00, 0xb2, 0x3e, 0x00, 0x3e, 0x69, 0x2b, 0x00, 0x5f, 0x08,
          0x04, 0x10, 0x00, 0x00, 0x00, 0x01, 0x44, 0x01, 0xc0, 0x62, 0x0f, 0x02,
          0x24
        };
        vlVaContext context;
        vlVaBuffer buf;

        memset(&context, 0, sizeof(context));
        memset(&buf, 0, sizeof(buf));
        context.packed_header_emulation_bytes = true;
        buf.data = data;
        buf.size = sizeof(data);
        vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(&context, &buf);

Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31596>
2024-11-15 09:51:39 +00:00
Lars-Ivar Hesselberg Simonsen
4ab14de32f panvk: Set fs.multisampled sysval for v10+
This allows us to observe writes to SampleMask, which would otherwise be
ignored.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32132>
2024-11-15 09:24:06 +00:00
Constantine Shablia
9b7f547fef panvk: adjust maxSamplerAllocationCount limit
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
a245b397c6 panvk: elaborate the comment on the maxMemoryAllocationCount limit
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
c01449ef5c panvk: enable shaderInt64
We already were lowering int64

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
bdb2f0dc2a panvk: move samplerAnisotropy in the order it appears in struct definition
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Samuel Pitoiset
d2960a8430 radv: consider VK_PIPELINE_STAGE_2_NONE like BOTTOM_OF_PIPE
VK_PIPELINE_STAGE_2_NONE from sync2 is similar to BOTTOM_OF_PIPE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32115>
2024-11-15 08:22:23 +00:00
Samuel Pitoiset
c08d2c40ed radv: fix ignoring src stage mask when dst stage mask is BOTTOM_OF_PIPE
Otherwise the driver doesn't synchronize if there are image layout
transitions.

This fixes rendering issues with displayable DCC (usually black squares
in the bottom of screen). This mostly happens when an application
uses a lower resolution than the screen supports and fshack
(wine/proton) which upscales images uses COMPUTE_SHADER->BOTTOM_OF_PIPE
for the barrier after a dispatch.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11547
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11600
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11789
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8705
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9890
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32115>
2024-11-15 08:22:23 +00:00
Francisco Jerez
0ad835a929 intel/fs/xe2: Fix up subdword integer region restriction with strided byte src and packed byte dst.
This fixes a corner case of the LNL sub-dword integer restrictions
that wasn't being detected by has_subdword_integer_region_restriction(),
specifically:

> if(Src.Type==Byte && Dst.Type==Byte && Dst.Stride==1 && W!=2) {
>    // ...
>    if(Src.Stride == 2) && (Src.UniformStride) && (Dst.SubReg%32  ==  Src.SubReg/2 ) { Allowed }
>    // ...
> }

All the other restrictions that require agreement between the SubReg
number of source and destination only affect sources with a stride
greater than a dword, which is why
has_subdword_integer_region_restriction() was returning false except
when "byte_stride(srcs[i]) >= 4" evaluated to true, but as implied by
the pseudocode above, in the particular case of a packed byte
destination, the restriction applies for source strides as narrow as
2B.

The form of the equation that relates the subreg numbers is consistent
with the existing calculations in brw_fs_lower_regioning (see
required_src_byte_offset()), we just need to enable lowering for this
corner case, and change lower_dst_region() to call lower_instruction()
recursively, since some of the cases where we break this restriction
are copy instructions introduced by brw_fs_lower_regioning() itself
trying to lower other instructions with byte destinations.

This fixes some Vulkan CTS test-cases that were hitting these
restrictions with byte data types.

Fixes: 217d412360 ("intel/fs/gfx20+: Implement sub-dword integer regioning restrictions.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30630>
2024-11-15 07:39:33 +00:00
Tapani Pälli
50243892b4 isl: modify existing assert by allowing CCS_E aux usage
Relax this assert based on x/y offsets for GFX_VERx10 >= 200.

This is getting hit when running gfxbench5 on LNL/BMG.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32128>
2024-11-15 05:20:07 +00:00
Iván Briano
d32a26b3e6 anv: remove unused/misleading/wrong parameters from the RT trampoline
Since the shader parameters are passed as inline data, push constants
are no longer used and so, not actually set on dispatch. But the
nr_params = 4 was still making the shader emit the code to load them,
causing page faults on simulation, and would also on HW if we didn't
always have a scratch page set.

The uses_inline_data parameter will be set from brw_compile_cs(), called
shortly after this point, so we don't need it here.

The subgroup_size is misleading, as we don't actually require that size
and the code that checks for it isn't even running for this shader.

Fixes: 97b17aa0b1 ("brw/nir: rework inline_data_intel to work with compute")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12152

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32150>
2024-11-14 19:23:42 -08:00
David Heidelberg
1368ee5e1a compiler/rust: drop duplicated bindgen check
The same check is present in meson file in root directory.

Cc: mesa-stable # 24.3
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32101>
2024-11-14 20:12:31 +00:00
Chia-I Wu
97be761f92 vulkan: include host write in expanded dst access flags
From the perspective of the gpu, host read or host write has the same
implication (gpu cache flush) in the dst access flags.  We should
include host write in the dst access flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32102>
2024-11-14 19:29:00 +00:00
Chia-I Wu
8d31cb8747 panvk: update expectations for G610
The prior commit fixed dEQP-VK.glsl.440.linkage.varying.component.*.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
619463837f panvk: fix a missing cache invalidation
For the host-to-device domain operation, it is possible that
wait_sb_mask is empty but there is a cache invalidaton,

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
a23c0eb61a panvk: improve should_split_render_pass
Fragments are processed in rasterization order within a fragment job.
The fragment subqueue self-wait is nop in most cases.  The only
exception is when there is a feedback loop.

When there is a feedback loop, because we lower subpassLoad to
texelFetch, we have to split the render pass.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
bee7ef4670 panvk: skip tiler subqueue self-wait within a render pass
IDVS jobs within a render pass use the same scoreboard slot.  There is
no need to wait.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
1b2ea10d68 panvk: skip frag subqueue self-wait within a render pass
We don't emit the fragment job until the end of a render pass.  There is
nothing to wait.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
764a294059 panvk: always skip frag->tiler subqueue wait
The fragment subqueue always waits for the tiler subqueue.  There is no
need to emit additional waits for barriers.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
ca7814ccf4 panvk: rework collect_cs_deps
src_stages and dst_stages together define an execution dependency.  Both
of them should be considered at the same time.

Add a low-level helper, add_execution_dependency, to translate pipeline
stages to subqueue wait masks.  The subqueue wait masks only specify
which subqueues should wait for which.  The callers will decide how the
waits are performed exactly.

Update collect_cs_deps to call add_execution_dependency and use the
subqueue wait masks to initialize panvk_cs_deps.

The main difference is that barriers such as

  .srcStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
  .dstStageMask = VK_PIPELINE_STAGE_2_NONE,

are ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
f1f3b56834 panvk: rework collect_cache_flush_info
src_access defines the availability op and the host-to-device domain op.
dst_access defines the visibility op and the device-to-host domain op.
They should be treated separately.

Add a low-level helper, add_memory_dependency, to translate access flags
to panvk_cache_flush_info.

Update collect_cache_flush_info to use add_memory_dependency.  Also
replace the custom subqueue access flag mappings by
vk_filter_{src,dst}_access_flags2.

The main difference is that barriers such as

  .srcAccessMask = VK_ACCESS_2_MEMORY_WRITE_BIT,
  .dstAccessMask = VK_ACCESS_2_NONE,

or

 .srcAccessMask = VK_ACCESS_2_NONE,
 .dstAccessMask = VK_ACCESS_2_MEMORY_READ_BIT,

are no longer ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
4a598e946c panvk: add get_subqueue_stages
This is a minor refactoring with no functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
764cb8aebb panvk: update CI expectations
The prior commit fixed
dEQP-VK.memory.mapping.suballocation.full.variable.implicit_unmap.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-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/32125>
2024-11-14 18:45:44 +00:00
Chia-I Wu
7a60e1dcd7 panvk: do not leak mapped memory
vkFreeMemory implies vkUnmapMemory.  Without the implied unmap, mapped
memories leak.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-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/32125>
2024-11-14 18:45:44 +00:00
Chia-I Wu
3419fc0d8a panvk: add memory mmap/munmap helpers
Add and use panvk_memory_mmap and panvk_memory_munmap.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-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/32125>
2024-11-14 18:45:44 +00:00
Martin Roukala (né Peres)
8ef5734185 Revert "ci: disable mupuf's farm"
This reverts commit acb48bde44, now that
the first part of the electric renovation is done. It will be
re-disabled for a day later next week.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32147>
2024-11-14 20:01:34 +02:00
Yinjie Yao
19c4b734f2 radeonsi/vcn: Fix compile warnings with previously uninitialized variables.
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/32126>
2024-11-14 17:01:54 +00:00
Yinjie Yao
03462aff8f radeonsi/vcn: Indentation fix
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/32126>
2024-11-14 17:01:54 +00:00
Casey Bowman
b8d253b30c vulkan/screenshot-layer: Add region command option
Adds an optional region selection, based off percentages of the
starting/ending of an image's X & Y values.

This is intended as a performance enhancement tradeoff for smaller
images to be created.

With a smaller image size, the screenshotting layer will change the
region boundaries on the GPU side, which will decrease the amount of
time it takes to copy the image over to CPU-accessible memory.

Using vkcube as an example, the original image size is 500x500:

mesa-screenshot: DEBUG: Screenshot Authorized!
mesa-screenshot: DEBUG: Needs 2 steps
mesa-screenshot: DEBUG: Time to copy: 123530 nanoseconds

Then, by cropping the area to a 100x100 image, we get the following:

mesa-screenshot: DEBUG: Screenshot Authorized!
mesa-screenshot: DEBUG: Using region: startX = 40% (200), startY = 40% (200), endX = 60% (300), endY = 60% (300)
mesa-screenshot: DEBUG: Needs 2 steps
mesa-screenshot: DEBUG: Time to copy: 12679 nanoseconds

For this example, this is a ~90% time reduction improvement!

Overall, this option reduces the copy time to a point where it can
become negligible, relative to the frame time of the application.

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/32016>
2024-11-14 16:35:24 +00:00
Samuel Pitoiset
45c0ef3bb4 radv: dump SPIR-V and NIR for the faulty shader detected with the trap
More logs is always better for debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32116>
2024-11-14 15:57:07 +00:00
Samuel Pitoiset
9149488a9d radv: mark live invocations when dumping VGPRS with the trap handler
Similar to UMR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32116>
2024-11-14 15:57:07 +00:00
Georg Lehmann
3e037ac2a9 aco/gfx8: use ds_swizzle_b32 rotate mode
Despite only being mentioned in the ISA docs since vega, rotate (and fft)
swizzle mode seem to exist since gfx8.

https://github.com/llvm/llvm-project/issues/28975#issuecomment-980964939

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31348>
2024-11-14 15:34:48 +00:00
Michel Dänzer
fdc1c61306 Revert "util: Use persistent array of index entries"
This reverts commit 031f2c2a69.

It broke the macOS build.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12083
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32078>
2024-11-14 14:20:18 +00:00
Michel Dänzer
66d68263f8 Revert "util/mesa-db: Further simplify mesa_db_compact"
This reverts commit 92893309bc.

Need to revert this as well for the next revert.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32078>
2024-11-14 14:20:18 +00:00
Lionel Landwerlin
5cfd841dda anv: fix descriptor asserts
Lots of tests are hitting the assert, one in particular :

dEQP-VK.binding_model.mutable_descriptor.single.switches.sampler_combined_image_sampler.update_copy.nonmutable_source.normal_source.pool_same_types.pre_update.no_array.comp

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b6d11ba5b4 ("anv: Protect memcpy/memset/qsort calls against NULL arguments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32133>
2024-11-14 13:45:19 +00:00
Jose Maria Casanova Crespo
07f44ecd31 rpi4/ci: mark another flaky timeline_semaphore test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32135>
2024-11-14 12:54:44 +01:00
Alejandro Piñeiro
7c3e2927fe docs/features: mark VK_EXT_scalar_block_layout as supported for vc7+
This feature is available on vc7+ (rpi5) since commit
3b9aaf25a0

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32072>
2024-11-14 11:38:37 +00:00
Danylo Piliaiev
b501cbf153 nir/nir_opt_offsets: Do not fold load/store with const offset > max
When (off_const > max) there is a wrap around uint when calling
try_extract_const_addition.
Exit early since folding doesn't make sense in this case.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32118>
2024-11-14 10:22:39 +00:00
Friedrich Vock
73d513c5be vulkan/rmv: Correctly set heap size
RMV expects the size to be in bits 5-68, not 4-68.

Fixes: 845792db ("vulkan: Add RMV file exporter")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31903>
2024-11-14 09:11:25 +00:00
Lionel Landwerlin
a21cd8c5b6 brw: allocate physical register sizes for spilling
All of the spilling code should work with physical register units
because for example SEND messages will expect a physical register as
destination.

So always allocate a full physical register for the spilled/unspilled
values and adjust the offsets of the registers to physical sizes too.

Cc: mesa-stable
Fixes: aa494cba ("brw: align spilling offsets to physical register sizes")
Closes: mesa/mesa#11967

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Found-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32124>
2024-11-14 08:44:03 +00:00
Boris Brezillon
d13bcd1daf pan/ci: Move g610-vk jobs to post-merge CI
The g610-vk jobs are just too unstable to be pre-merge jobs. Let's keep
them as post-merge so people can still execute them manually if they
care.

Signed-off-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/32129>
2024-11-14 08:16:36 +00:00
David Rosca
dcfc956521 radv/video: Override pic_init_qp_minus26 in PPS
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
d166bb5dd1 radv/video: Use 64x16 alignment for HEVC encode
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
d1c1a33b35 radv/video: Avoid selecting rc layer over maximum
Vulkan spec doesn't say if this is allowed or not, but trying
to do this will hang.

Fixes: 4a19047d32 ("radv/video: Select temporal layer when encoding each frame")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
e941acfb9d radv/video: Report correct encodeInputPictureGranularity
Only aligned size can be encoded.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
e4ec135d8b radv/video: Fix HEVC slice control
This needs to use aligned size, otherwise it will output two
slices when the size is not 64 aligned.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
6a121f1507 radv/video: Fix H264 slice control
This needs to use aligned size, otherwise it will output two
slices when the size is not 16 aligned.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
Caio Oliveira
15ea28b835 intel/executor: Fix exec_size in @read macro for Xe2
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32122>
2024-11-14 05:31:03 +00:00
Matt Turner
b3a14d7b91 intel: Avoid unaligned pointer access
Avoids the sanitizer error:

```
../src/intel/common/intel_debug_identifier.c:122:15: runtime error: member access within misaligned address 0x7f5ca8b32051 for type 'struct intel_debug_block_base', which requires 4 byte alignment
0x7f5ca8b32051: note: pointer points here
 66 30 29  00 03 00 00 00 10 00 00  00 00 00 00 00 00 00 00  00 01 00 00 00 08 00 00  00 00 00 00 00
              ^
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:02 +00:00
Matt Turner
1f3e24f4f3 anv: Avoid null ptr dereference
Avoids the sanitizer error:

```
../src/intel/vulkan/anv_instance.c:266:37: runtime error: member access within null pointer of type 'struct anv_instance'
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:01 +00:00
Matt Turner
b6d11ba5b4 anv: Protect memcpy/memset/qsort calls against NULL arguments
Avoids sanitizer errors like:

```
../src/intel/vulkan/anv_pipeline_cache.c:409:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_descriptor_set.c:696:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_descriptor_set.c:2709:10: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_descriptor_set.c:2709:10: runtime error: null pointer passed as argument 2, which is declared to never be null
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:01 +00:00
Matt Turner
6e544214d5 vulkan: Skip memcpy() call if passed null pointers
Avoids sanitizer errors like:

```
../src/intel/vulkan/anv_pipeline_cache.c:406:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:406:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:417:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:435:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:435:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:439:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:439:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:443:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:443:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:447:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:447:4: runtime error: null pointer passed as argument 2, which is declared to never be null
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:01 +00:00
David Heidelberg
d21f7f75ff llvmpipe: align with u_cpu_detect struct changes
Cc: mesa-stable # 24.3
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
962b996d4c util: drop XOP detection code
Introduced in 2013 with prospect of being used in future.
... 11 years later.

Fixes: 4b45b61fef ("util: add avx2 and xop detection to cpu detection code") # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
ca947e1295 util: Drop ancient Intel CPU detection
We don't use it for anything.

Cc: mesa-stable # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
a78c2bf2a4 util: Remove MMX/MMXext detection code
Currently pointless, Pentium II or Celeron and later has SSE.

Cc: mesa-stable # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
ae85e6920c util: Drop 3Dnow optimisation leftovers
Fixes: a3218e65d1 ("mesa: remove long dead 3Dnow optimisation") # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
Timothy Arceri
59b2549279 glsl/nir: fix function cloning at link time
As per the code comment added in this commit the nir produced from
glsl to nir doesn't always keep function declarations before the
code that calls them e.g. calls from within other function
implementations. The change in this commit works around this problem by
first cloning all function declarations in a first pass, then cloning
the implementations in a second pass once we have filled the remap
table.

Fixes: cbfc225e2b ("glsl: switch to a full nir based linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12115

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32100>
2024-11-13 22:47:50 +00:00
Eric Engestrom
6a6e37728d turnip/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32117>
2024-11-13 17:14:06 +00:00
Eric Engestrom
b0c9789bc1 docs: add sha sum for 24.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32114>
2024-11-13 16:13:44 +00:00
Eric Engestrom
c2c89b1a49 docs: add release notes for 24.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32114>
2024-11-13 16:13:44 +00:00
Eric Engestrom
b4654cef70 docs: update calendar for 24.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32114>
2024-11-13 16:13:44 +00:00
Samuel Pitoiset
b4b5f9eeb0 radv,aco: dump VGPRS from the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
132b7a85c7 aco: drop the second M0 operand for s_set_gpr_idx_on
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
c712555a9f aco: save/restore VGPRS on GFX8 in the trap handler shader
This will be needed for dumping VGPRs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
a77af57e83 aco: use all invocations from the current wave in the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
034014a165 aco: restore m0/exec before exiting the trap handler
Dumping VGPRs will overwrite m0 and exec and they need to be restored
if we want to return to the shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Samuel Pitoiset
185a165a85 aco: fix validation for v_movrels_b32 and friends
m0 is the second operand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Samuel Pitoiset
40b343bbee aco: add a new variant for vop1() with two operands
For v_movrels_b32 and friends which need a second operand for m0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Samuel Pitoiset
f4cf6a71ed aco: use a 64-bit mov to save exec in the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Rhys Perry
7d4cc04156 radv,ac/nir: split global access using nir_lower_mem_access_bit_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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
17cc8a5a54 aco: remove load byte_align
8/16-bit loads given to instruction selection now always use VMEM and
scalar load instructions unless alignment easily allows a vector load.

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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
8fdc5d7f9f radv,ac/nir: lower sub-dword loads using nir_lower_mem_access_bit_sizes
fossil-db (navi21):
Totals from 427 (0.54% of 79395) affected shaders:
Instrs: 2939637 -> 2937224 (-0.08%); split: -0.08%, +0.00%
CodeSize: 15982272 -> 15969880 (-0.08%); split: -0.08%, +0.00%
Latency: 21128645 -> 21125738 (-0.01%); split: -0.04%, +0.03%
InvThroughput: 5626811 -> 5626220 (-0.01%); split: -0.03%, +0.02%
SClause: 65771 -> 65731 (-0.06%); split: -0.07%, +0.00%
Copies: 243247 -> 242917 (-0.14%); split: -0.14%, +0.01%
Branches: 100089 -> 100085 (-0.00%)
PreSGPRs: 17879 -> 18118 (+1.34%)
VALU: 1899641 -> 1899278 (-0.02%)
SALU: 468508 -> 466469 (-0.44%)
SMEM: 84305 -> 84291 (-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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
d3ae1842a2 aco,ac/nir: flag loads to use smem in NIR
This pass will be re-used later.

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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
7fe4f4c14c nir_lower_mem_access_bit_sizes: support load_constant
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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
45c1280d2c nir_lower_mem_access_bit_sizes: pass access to callback
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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
61752152f7 nir_lower_mem_access_bit_sizes: add nir_mem_access_shift_method
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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
e2dd36c66e nir_lower_mem_access_bit_sizes: support 64-bit offsets
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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
0619e4db63 nir,aco,ac/llvm: add nir_op_alignbyte_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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
db0cbb7e9b aco: optimize nir_op_shfr with <32 src1
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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
bd88c8733a ac/nir: add ACCESS_CAN_REORDER to lowered load_global_constant
fossil-db (navi21):
Totals from 39 (0.05% of 79395) affected shaders:
Instrs: 2619146 -> 2619273 (+0.00%); split: -0.00%, +0.01%
CodeSize: 14158064 -> 14158304 (+0.00%)
Latency: 17277051 -> 17274098 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 4242241 -> 4241746 (-0.01%); split: -0.01%, +0.00%
SClause: 56514 -> 57561 (+1.85%); split: -0.02%, +1.87%

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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
0c7830eb85 nir/algebraic: optimize ushr(a, ishl(iand(b, 3), 3))
nir_lower_mem_access_bit_sizes creates this.

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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
e95a3364b8 nir/algebraic: optimize bcsel(ieq(b, 0), a, shift(a, b))
nir_lower_mem_access_bit_sizes can create this.

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/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
80b76ba692 nir: add more intrinsics to nir_intrinsic_can_reorder
Including nir_intrinsic_load_global.

fossil-db (navi21):
Totals from 2725 (3.43% of 79395) affected shaders:
MaxWaves: 71972 -> 71964 (-0.01%); split: +0.01%, -0.02%
Instrs: 2831052 -> 2819902 (-0.39%); split: -0.45%, +0.06%
CodeSize: 15047548 -> 14973072 (-0.49%); split: -0.57%, +0.08%
VGPRs: 108864 -> 108856 (-0.01%); split: -0.02%, +0.01%
SpillSGPRs: 906 -> 926 (+2.21%)
SpillVGPRs: 196 -> 1092 (+457.14%)
Scratch: 729088 -> 741376 (+1.69%)
Latency: 16621317 -> 16586551 (-0.21%); split: -0.34%, +0.13%
InvThroughput: 4169987 -> 4164876 (-0.12%); split: -0.23%, +0.11%
VClause: 63247 -> 63471 (+0.35%); split: -0.21%, +0.56%
SClause: 56978 -> 55276 (-2.99%); split: -3.50%, +0.51%
Copies: 252545 -> 252495 (-0.02%); split: -0.98%, +0.96%
Branches: 91378 -> 91388 (+0.01%); split: -0.03%, +0.04%
PreSGPRs: 112753 -> 126850 (+12.50%); split: -0.48%, +12.98%
PreVGPRs: 90617 -> 90708 (+0.10%)
VALU: 1709034 -> 1709368 (+0.02%); split: -0.01%, +0.03%
SALU: 463554 -> 462253 (-0.28%); split: -0.57%, +0.29%
VMEM: 115952 -> 116272 (+0.28%); split: -0.21%, +0.49%
SMEM: 129097 -> 120538 (-6.63%); split: -6.64%, +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/31904>
2024-11-13 12:59:26 +00:00
Eric Engestrom
c925730779 freedreno/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:50 +00:00
Eric Engestrom
234b9c72f9 nvk/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:50 +00:00
Eric Engestrom
d688a25d7e broadcom/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:50 +00:00
Eric Engestrom
6018d15f32 radv/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:49 +00:00
Samuel Pitoiset
0c77469995 aco: fix saving/restoring VGPRS in the trap handler on GFX9
When ADD_TID_ENABLE=1, DATA_FORMAT is STRIDE[14:17], so the stride
was too large.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32109>
2024-11-13 11:12:54 +00:00
Eric Engestrom
b32d0d4b45 meson: define only once the versions of the x11 deps
This was a "bumped the version, missed one copy" bug waiting to happen.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32032>
2024-11-13 10:35:55 +00:00
Eric Engestrom
9dc872c4c7 meson: move openmp block out of the middle of the x11 deps block
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32032>
2024-11-13 10:35:55 +00:00
Eric Engestrom
594b8d9f81 ci: reduce priority of nightly pipeline jobs from 50 to 45
This means the fork jobs now have clear priority over nightly jobs,
although it might not matter much as nightly jobs are mostly
long-running jobs and pre-merge & forks will have to wait regardless of
priority.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32093>
2024-11-13 10:01:32 +00:00
Eric Engestrom
50f9bec3ce ci: raise priority of release manager pipelines
KernelCI jobs have priority 44 and are very long-running jobs (and
there might be an issue with the KernelCI that makes it create hundreds
of jobs, @sergi is looking into that).

While bumping to 45+ would be enough to allow Mesa release staging
pipelines to run despite the KernelCI, during the CI meeting with @sergi
and @mupuf it was determined that the Mesa releases are an important
enough operation to warrant being a higher priority than user forks
pipelines, so priority 70 was picked (still under the 75 of Marge
pipelines).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32093>
2024-11-13 10:01:31 +00:00
Erik Faye-Lund
62da644221 panfrost: use mesa_log infra instead of stdio
It's generally useful to use mesa_log for error messages etc. This makes
it easier to forward diagnostics into the right logs etc.

So let's be more consistent about where we're logging things.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32094>
2024-11-13 09:15:05 +00:00
Erik Faye-Lund
c53b944453 panvk: drop unused include
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32094>
2024-11-13 09:15:05 +00:00
Tomeu Vizoso
936da3eb9c etnaviv/ml: Zero out the NN config
As some bits were being left unitialized and causing flakiness.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
b3057ab511 etnaviv/ci: Update expectations for the NPU in the A311D
Several tests have been fixed with the changes to enable the NPU in the
i.MX8MP.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
459da82db6 etnaviv/ml: Make use of the new depthwise support in V8
The V8 hardware supports a faster way of executing depthwise
convolutions, instead of having to fully lower them to regular
convolutions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
63a10f770c etnaviv/ml: Only reshuffle when needed on V8
Because of how depthwise convolutions are implemented on V8, we
sometimes don't need reshuffling the input with strided convolutions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
93298a873b etnaviv/ml: Fix reshuffle TP jobs on V8
What we had didn't work on V8, but with these fixes for V8, these jobs
still run well on V7.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
f186844545 etnaviv/ml: Disable caching on V8
The assumptions we make on V7 doesnt work as-is on V8.

Revisit this later.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
41a9540ab9 etnaviv/ml: Set two bits in the NN instruction for V8
Not sure why they have to be set, but they are always on V8.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
bb06e082f8 etnaviv/ml: Implement tiling for V8
Have had to tweak the code to stay safe on the i.MX8MP.

Also, we are for now being very conservative with tiling to prevent
underruns.

In the future, we may want to consider testing different possibilities
during compilation and choosing the optimal one. Also maybe detecting
underruns by checking whether the NPU hung with a given combination.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
0ef5aa5fb6 etnaviv/ml: Fix padding for convolutions in V8
Two bits that aren't used in V7 seem to be used for this in V8.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
b4ba62fcda etnaviv/ml: Add encoding of coefficients for V8
In V8 the weights and biases of convolution operations are encoded with
a totally different scheme.

The initial reverse engineering and implementation was done by:

Philipp Zabel <p.zabel@pengutronix.de>

Support for zero run length encoding and average bias is not implemented yet.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
f3d765ed5d etnaviv/ml: Split V7 coefficient encoding to a new file
In preparation for V8 support, which uses a completely different
encoding.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
3744defc7e etnaviv: Add script to decode weights in Huffman format
The bitstream encoding is based on information reverse engineered by:

Philipp Zabel <p.zabel@pengutronix.de>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
88b5b998d2 etnaviv/ml: Rework the dumping of tensors
Name the file dumps after the operation and suboperation they belong to.

Also dump the command stream for each operation.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
4ca98fa662 etnaviv/ci: Add expectation files for the VIPNano-SI+ NPU
This is the NPU in the NXP i.MX8MP SoC.

Initially, only convolutions are supported.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
f9bb9aa7d5 etnaviv/nn: Fix use of etna_core_info
Right now we were retrieving the properties of the NPU from the
etna_core_info of the GPU.

Fixes: 92a6f697d5 ("etnaviv: npu: Switch to use etna_core_info")
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
70bff0c971 etnaviv/ml: Fix includes
etnaviv_ml.h uses dynarray, but the u_inlines.h header is needed by
some of the files that include it.

Fixes: d6473ce28e ("etnaviv: Use NN cores to accelerate convolutions")
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Peyton Lee
79b34a6539 frontends/va: add support for VAProcColorStandardExplicit
for video post processing,
add support for VAProcColorStandardExplicit

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32087>
2024-11-13 06:52:39 +00:00
Peyton Lee
a9e4461c26 frontends/va: add support for VAProcColorStandardExplicit
for video post processing,
add support for VAProcColorStandardExplicit

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32087>
2024-11-13 06:52:39 +00:00
Martin Roukala (né Peres)
acb48bde44 ci: disable mupuf's farm
I'm about to have an electric renovation at my house, which will start
by having a 4h downtime.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32091>
2024-11-13 06:29:55 +00:00
Tapani Pälli
fbe5d41b58 anv: extend Wa_14017794102 with lineage Wa_14023061436
This workaround is applicable for Xe3 with new lineage.

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/31963>
2024-11-13 04:54:32 +00:00
Tapani Pälli
9429c0075b anv: utilize ray query bo per queue for Wa_14022863161
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/31963>
2024-11-13 04:54:32 +00:00
Tapani Pälli
1bd9e51a73 intel/dev: update mesa_defs.json from workaround database
Brings in some PTL workarounds.

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/31963>
2024-11-13 04:54:32 +00:00
Benjamin Otte
e757238370 vulkan/wsi: Support alpha swapchains on win32
Map VkSwapchainCreateInfoKHR.compositeAlpha to corresponding
DXGI_SWAP_CHAIN_DESC1.alphaMode.

Add VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR to capabilities as
it was missing there.

Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32048>
2024-11-13 04:26:46 +00:00
Iván Briano
f2f4206d49 intel/decoder: fix INTEL_DEBUG=bat
Now that all genxml filenames are in verx10 format, we don't need to fix
the number up when we look them up.

Fixes: 8906816f49 ("anv,hasvk,genxml: Rename genxml files using verx10")

Acked-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/32099>
2024-11-13 00:45:40 +00:00
M Henning
68cdcf5bbc nvk: Fix two typos in comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
M Henning
05770374a3 nvk: Remove params for dirty_cbufs_for_descriptors
dyn_start/dyn_end are unused now.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
M Henning
dc12c78235 nvk: Fix invalidation of NVK_CBUF_TYPE_DYNAMIC_UBO
Because dyn_start and dyn_end are indices into
nvk_root_descriptor_table->dynamic_buffers, we would need to offset
cbuf->dynamic_idx by
nvk_root_descriptor_table->set_dynamic_buffer_start[cbuf->desc_set]
in order to do those comparisons correctly.

We could do that, but it's simpler and no less precise to sinply
re-use the same comparison that we do in the other cases here.

This fixes a rendering artifact in Baldur's Gate 3 (Vulkan), which
regressed with the commit listed below.

Fixes: 091a945b57 ("nvk: Be much more conservative about rebinding cbufs")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
M Henning
64f17c1391 nvk/cmd_buffer: Pass count to set_root_array
Previously, we were passing the end index which was incorrect.
Also, improve the macros so that they can take an expression for
the count.

Fixes: b2d85ca36f ("nvk: Use helper macros for accessing root descriptors")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
Lionel Landwerlin
08530462bd anv: implement Wa_16011107343/22018402687 for generated draws
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/32059>
2024-11-12 22:48:39 +00:00
Lionel Landwerlin
53eed61a90 intel: make sure intel_wa.h can be included by opencl code
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/32059>
2024-11-12 22:48:39 +00:00
Lionel Landwerlin
672d41d22a anv: split generated draw flags from mocs/dword-count
We'll add more flags.

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/32059>
2024-11-12 22:48:39 +00:00
Lionel Landwerlin
d6acb56f11 anv: update shader descriptor resource limits
Some limits got stuck to the old binding table limits. Those don't
apply anymore since EXT_descriptor_indexing was implemented.

Fixes: 6e230d7607 ("anv: Implement VK_EXT_descriptor_indexing")
Fixes: 96c33fb027 ("anv: enable direct descriptors on platforms with extended bindless offset")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31999>
2024-11-12 22:01:52 +00:00
Gurchetan Singh
1794ff7309 gfxstream: use canonical Mesa dependencies
drm_dep -> dep_libdrm, essentially.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
5e9c14395d gfxstream: guest: use internal version of AEMU headers + impls
This removes the dependency of libaemu-v0.1.2 on
gfxstream guest vulkan.

ALSO:

find ./ -type f -exec sed -i -e 's/android::base/gfxstream::aemu/g' {} \;

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
a8c1021d79 gfxstream: modify libaemu for Mesa use case
- Modifications to directory paths.
- saveStringArray moved to Stream.h/Stream.cpp to avoid
  importing StreamSerializing
- C++ include guards
- Namespace changes

find ./ -type f -exec sed -i -e 's/namespace android/namespace gfxstream/g' {} \;

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
43e378c537 gfxstream: aemu: vendor it
This imports certain files from libaemu into gfxstream
guest.

Some are quite specific to gfxstream (Stream, ring_buffer) and others
we expect to Mesa-ify with time (AlignedBuf, Allocator) [probably
while keeping some C++ interface].

The main benefit of importing is easier refactoring and packaging.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
c7decb61ee gfxstream: nuke EntityManager.h include
So this is not actually used.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Georg Lehmann
8f094a7762 nir: handle fmul(a,a)/ffma(a,a,b) in nir_def_all_uses_ignore_sign_bit
Foz-DB Navi31:
Totals from 436 (0.55% of 79395) affected shaders:
Instrs: 808917 -> 805868 (-0.38%)
CodeSize: 4269056 -> 4246512 (-0.53%)
Latency: 5827077 -> 5819815 (-0.12%); split: -0.13%, +0.00%
InvThroughput: 625482 -> 622959 (-0.40%); split: -0.41%, +0.00%
SClause: 21797 -> 21756 (-0.19%); split: -0.23%, +0.04%
Copies: 48502 -> 48505 (+0.01%); split: -0.04%, +0.05%
VALU: 481686 -> 479074 (-0.54%); split: -0.54%, +0.00%
SALU: 76699 -> 76700 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Georg Lehmann
7e8a08ae77 aco: use nir_def_all_uses_ignore_sign_bit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Georg Lehmann
7d5db1ee52 pan/bi: use nir_def_all_uses_ignore_sign_bit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Georg Lehmann
34f41abe24 nir: add nir_def_all_uses_ignore_sign_bit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Samuel Pitoiset
44fa24580f radv: optimize the pipe misaligned L2 cache invalidation on GFX11
When using the subresource range, it's possible to reduce the number
of L2 cache invalidations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
7a3a65c0c4 radv: pass the image subresource range to radv_{src,dst}_access_flush()
This will allow us to optimize the pipe misaligned special case for
GFX11 because only the first mip in the mip-tail needs the L2 cache
invalidation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
f7a39fac10 radv: use vk_image_view_subresource_range() when possible
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
7a8b725d03 radv: determine the first mip that is pipe misaligned on GFX10+
This will allow us to optimize the GFX11 case where not all mips are
affected by the L2 invalidation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
c5d5f2fbef radv: move the GFX11 special case for mips to radv_image_is_pipe_misaligned()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
65bb39bf96 radv: do not always invalidate L2 for GPUs with non-coherent RBs on GFX10+
According to PAL, L2 should be invalidated only for images with
DCC/HTILE even on GPUs with non-coherent RBs. In practice, most of
the images have either DCC/HTILE but this can reduce the number of L2
flushes for images without any compression.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Boris Brezillon
eff8a3517d panvk: Enable CI on G610
The number of failures/crashes/flakes is still considerable, but the
goal is to catch regressions when fixing bugs or adding features, so
let's enable CI on G610 anyway.

We might decide to turn g610-vk into a post-merge jobs if CI on G610
is too unstable.

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/31524>
2024-11-12 16:46:47 +00:00
Samuel Pitoiset
5e0b81413d radv: emit nir_debug_break instructions when the trap handler is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Samuel Pitoiset
2d5df46c25 aco: emit nir_intrinsic_debug_break
s_trap is used to enter the trap.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Samuel Pitoiset
b6c72b3717 spirv: handle NonSemantic.DebugBreak to emit nir_debug_break()
NonSemantic SPIR-V allows to declare extended instructions. This
NonSemantic.DebugBreak allows to emit a breakpoint.

See https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.DebugBreak.html

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Samuel Pitoiset
a85f0143e0 nir: add nir_intrinsic_debug_break instruction
This instruction can be used as a breakpoint in shaders to enter a
trap if supported by the driver. It will be used to handle
NonSemantic.DebugBreak in SPIR-V.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Jose Maria Casanova Crespo
5b951bcdd7 v3d: Enable Early-Z with discards when depth updates are disabled
The Early-Z optimization is disabled when there is a discard
instruction in the shader used in the draw call.

But if discard is the only reason to disable Early-Z, and at
draw call time the updates in the draw call are disabled we
can enable Early-Z using a shader variant.

If there are occlussion queries active we also need to disable
Early-z optimization.

So this patch enables Early-Z in this scenario.

The performance improvement is significant when running gfxbench
benchmark showing an average improvement of 11.15%

fps_avg  helped:  gl_gfxbench_aztec_high.trace:  3.13 ->  3.73 (19.13%)
fps_avg  helped:  gl_gfxbench_aztec.trace:       4.82 ->  5.68 (17.88%)
fps_avg  helped:  gl_gfxbench_manhattan31.trace: 5.10 ->  6.00 (17.59%)
fps_avg  helped:  gl_gfxbench_manhattan.trace:   7.24 ->  8.36 (15.52%)
fps_avg  helped:  gl_gfxbench_trex.trace:       19.25 -> 20.17 ( 4.81%)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32028>
2024-11-12 13:26:38 +00:00
Sagar Ghuge
fef8490eb9 anv: Enable MCS_CCS compression on Gfx12+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32009>
2024-11-12 12:27:21 +00:00
Karmjit Mahil
2a7df331af nir: Fix no_lower_set leak on early return
Addresses:
```
Indirect leak of 256 byte(s) in 2 object(s) allocated from:
    #0 0x7faaf53ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7fa8cfe900 in ralloc_size ../src/util/ralloc.c:118
    #2 0x7fa8cfeb20 in rzalloc_size ../src/util/ralloc.c:152
    #3 0x7fa8cff004 in rzalloc_array_size ../src/util/ralloc.c:232
    #4 0x7fa8d06a84 in _mesa_set_init ../src/util/set.c:133
    #5 0x7fa8d06bcc in _mesa_set_create ../src/util/set.c:152
    #6 0x7fa8d0939c in _mesa_pointer_set_create ../src/util/set.c:613
    #7 0x7fa95e5790 in nir_lower_mediump_vars
       ../src/compiler/nir/nir_lower_mediump.c:574
    #8 0x7fa862c1c8 in tu_spirv_to_nir(tu_device*, void*, unsigned long,
       VkPipelineShaderStageCreateInfo const*, tu_shader_key const*,
pipe_shader_type) ../src/freedreno/vulkan/tu_shader.cc:116
    #9 0x7fa8646f24 in tu_compile_shaders(tu_device*, unsigned long,
       VkPipelineShaderStageCreateInfo const**, nir_shader**,
tu_shader_key const*, tu_pipeline_layout*, unsigned char const*,
tu_shader**, char**, void*, nir_shader**, VkPipelineCreationFeedback*)
../src/freedreno/vulkan/tu_shader.cc:2741
    #10 0x7fa85a16a4 in tu_pipeline_builder_compile_shaders
	../src/freedreno/vulkan/tu_pipeline.cc:1887
    #11 0x7fa85eb844 in tu_pipeline_builder_build<(chip)7>
	../src/freedreno/vulkan/tu_pipeline.cc:3923
    #12 0x7fa85e6bd8 in tu_graphics_pipeline_create<(chip)7>
	../src/freedreno/vulkan/tu_pipeline.cc:4203
    #13 0x7fa85c2588 in VkResult
	tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.binding_model.mutable_descriptor.single.switches.uniform_texel_buffer_storage_image.update_write.no_source.no_source.pool_expand_types.pre_update.no_array.vert

Fixes: 7e986e5f04 ("nir/lower_mediump_vars: Don't lower mediump shared vars with atomic access.")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
2024-11-12 11:48:11 +00:00
Karmjit Mahil
c923eff742 tu: Fix potential alloc of 0 size
We can end up calling vk_multialloc_alloc with 0 size when
`attachment_count` is 0 and `clearValueCount` is 0.

Addressed:
```
Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7faf033ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7fada5cc10 in vk_default_alloc ../src/vulkan/util/vk_alloc.c:26
    #2 0x7fac50b270 in vk_alloc ../src/vulkan/util/vk_alloc.h:48
    #3 0x7fac555040 in vk_multialloc_alloc
       ../src/vulkan/util/vk_alloc.h:234
    #4 0x7fac555040 in void
       tu_CmdBeginRenderPass2<(chip)7>(VkCommandBuffer_T*,
VkRenderPassBeginInfo const*, VkSubpassBeginInfo const*)
../src/freedreno/vulkan/tu_cmd_buffer.cc:4634
    #5 0x7fac900760 in vk_common_CmdBeginRenderPass
       ../src/vulkan/runtime/vk_render_pass.c:261
```
seen in:
dEQP-VK.robustness.robustness2.bind.notemplate.r32i.dontunroll.nonvolatile.uniform_texel_buffer.no_fmt_qual.len_252.samples_1.1d.frag

Fixes: 4cfd021e3f ("turnip: Save the renderpass's clear values in the cmdbuf state.")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
2024-11-12 11:48:11 +00:00
Karmjit Mahil
53c2d5e426 tu: Fix push_set host memory leak on command buffer reset
Addresses:
```
Direct leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0x7fbe5e4230 in __interceptor_realloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0x7fbd008bf4 in vk_default_realloc
       ../src/vulkan/util/vk_alloc.c:37
    #2 0x7fbbabb2fc in vk_realloc ../src/vulkan/util/vk_alloc.h:70
    #3 0x7fbbaead38 in tu_push_descriptor_set_update_layout
       ../src/freedreno/vulkan/tu_cmd_buffer.cc:3173
    #4 0x7fbbaeb0b4 in tu_push_descriptor_set
       ../src/freedreno/vulkan/tu_cmd_buffer.cc:3203
    #5 0x7fbbaeb500 in tu_CmdPushDescriptorSet2KHR(VkCommandBuffer_T*,
       VkPushDescriptorSetInfoKHR const*)
../src/freedreno/vulkan/tu_cmd_buffer.cc:3235
    #6 0x7fbbe35c80 in vk_common_CmdPushDescriptorSetKHR
       ../src/vulkan/runtime/vk_command_buffer.c:300
```
seen in:
dEQP-VK.binding_model.shader_access.secondary_cmd_buf.bind.with_push.sampler_mutable.tess_eval.multiple_discontiguous_descriptors.1d_array

Fixes: 03294e1dd1 ("turnip: Keep a host copy of push descriptor sets.")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
2024-11-12 11:48:11 +00:00
Samuel Pitoiset
5f79b8ea2d radv,aco: save/restore overwritten VGPRs in the trap handler shader
The trap currently doesn't return to the shader but it will be needed
for example for the debug mode.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
ccde8ecd64 radv: compute the TMA BO size instead of using a constant
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
3e88f996a5 radv: fix the TMA descriptor size
The TMA BO contains the descriptor first.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
6ec0c85908 radv,aco: use the trap handler layout struct while compiling the shader
It's less error prone to rely on the layout for offsets.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
6bfd92123f aco: simplify postprocessing the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
44dfeb4479 radv,aco: add a separate function to compile the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
62e335c779 radv,aco: dump more SQ_WAVE regs from the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
0cc21d0601 radv: cleanup printing SGPRS dumped from the trap handler
It's more readable like that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Georg Lehmann
ee74b090db nir/opt_16bit_tex_image: optimize extract half sources
I also tried extract_i16/u16, but that causes a lot of regressions.

Foz-DB Navi21:
Totals from 3 (0.00% of 79395) affected shaders:
Instrs: 367 -> 355 (-3.27%)
CodeSize: 2156 -> 2136 (-0.93%)
VGPRs: 80 -> 72 (-10.00%)
Latency: 3163 -> 3153 (-0.32%); split: -0.51%, +0.19%
InvThroughput: 424 -> 404 (-4.72%)
Copies: 31 -> 42 (+35.48%); split: -3.23%, +38.71%
PreVGPRs: 27 -> 25 (-7.41%)
VALU: 208 -> 196 (-5.77%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32058>
2024-11-12 10:19:40 +00:00
Mary Guillemard
bad38c1e76 panvk: Implement global priority extensions
Wire up with common kmod code.

On JM, this is a no-op implementation only allowing medium priority.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31961>
2024-11-12 08:46:22 +00:00
Mary Guillemard
e2c81380a9 pan/kmod: Expose medium priority on panfrost
Panfrost currently doesn't support priorities, assumes default priority as
medium to properly support global priorities on Vulkan.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31961>
2024-11-12 08:46:22 +00:00
Mary Guillemard
2237cff1af panfrost: Report default value for GROUP_PRIORITIES_INFO in drm-shim
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31961>
2024-11-12 08:46:22 +00:00
Zan Dobersek
25b73dff5a tu/a7xx: use concurrent resolve groups
Establish groups of resolve and unresolve operations that the a7xx
hardware can then use to improve efficiency. Creating such groups enables
continuation of command stream processing while these (un)resolves are in
progress, as long as those latter operations don't depend on the grouped
(un)resolves.

To enable concurrent resolves and unresolves, corresponding fields on the
RB_CCU_CNTL register have to be set appropriately.

Resolve groups are tracked through a scoped struct that logs any pending
resolve operation. Once the group is complete, the emit helper function
will write out the CCU_END_RESOLVE_GROUP event to the command stream.

The buffer ID field on the RB_BLIT_INFO register can be used to disperse
different resolve operations across all available slots in the resolve
engine. The 0x8 and 0x9 IDs are reserved for depth and stencil buffers,
while the 0x0-0x7 range is used for color buffers. A simple incremented
counter is used to assign IDs for all color buffers inside any resolve
group. While it can occur for two color or depth/stencil buffers inside
the same resolve group to have identical IDs, hardware doesn't seem to
have a problem with handling that.

Two TU_DEBUG options are provided, 'noconcurrentresolves' and
'noconcurrentunresolves` disable respective operations by adjusting the
mode set through RB_CCU_CNTL.

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/31190>
2024-11-12 07:50:45 +00:00
Zan Dobersek
f0e5331b21 freedreno/registers: update RB_BLIT_INFO, RB_CCU_CNTL
For RB_BLIT_INFO, documentation of the buffer ID field is updated to
explain its use on a7xx.

RB_CCU_CNTL definition for a7xx is updated with fields for concurrent
resolve/unresolve modes and enhanced with dedicated enum types.

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/31190>
2024-11-12 07:50:45 +00:00
Job Noorman
b36a7ce0f1 ir3/ra: prevent moving source intervals for shared collects
Non-trivial collects (i.e., ones that will introduce moves because the
sources don't line-up with the destination) may cause source intervals
to get implicitly moved when they are inserted as children of the
destination interval. Since we don't support moving intervals in shared
RA, this may cause illegal register allocations. Prevent this by
creating a new top-level interval for the destination so that the source
intervals will be left alone.

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/31978>
2024-11-11 20:08:34 +00:00
Matt Turner
a2c4a34303 anv: Align anv_descriptor_pool::host_mem
Otherwise anv_descriptor_set is accessed through an unaligned pointer,
which is undefined behavior in C.

```
anv_descriptor_set.c:1620:17: runtime error: member access within misaligned address 0x61900002c2b5
               for type 'struct anv_descriptor_set', which requires 8 byte alignment 0x61900002c2b5
```

Fixes: 2570a58bcd ("anv: Implement descriptor pools")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32070>
2024-11-11 19:45:14 +00:00
Georg Lehmann
ece1ab3b87 radv: run copy prop before vectorizing
Otherwise there are a lot of scalar movs between texture instructions
and alu. With those removed, the top down vectorizer has more starting
points.

Totals from 296 (0.37% of 79206) affected shaders:
MaxWaves: 5710 -> 5754 (+0.77%)
Instrs: 388051 -> 386630 (-0.37%); split: -0.46%, +0.09%
CodeSize: 2120800 -> 2117144 (-0.17%); split: -0.30%, +0.13%
VGPRs: 17496 -> 17344 (-0.87%)
Latency: 8893751 -> 8901364 (+0.09%); split: -0.10%, +0.18%
InvThroughput: 1740411 -> 1731710 (-0.50%); split: -0.57%, +0.07%
VClause: 6573 -> 6576 (+0.05%); split: -0.21%, +0.26%
SClause: 11233 -> 11209 (-0.21%); split: -0.28%, +0.07%
Copies: 31582 -> 31635 (+0.17%); split: -1.49%, +1.66%
PreSGPRs: 15878 -> 15876 (-0.01%)
PreVGPRs: 15380 -> 15274 (-0.69%)
VALU: 278528 -> 277036 (-0.54%); split: -0.65%, +0.11%
SALU: 49062 -> 49054 (-0.02%); split: -0.03%, +0.02%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32060>
2024-11-11 18:33:48 +00:00
Samuel Pitoiset
107f29c39a aco: do not reorder s_trap instructions
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32055>
2024-11-11 15:46:36 +00:00
Asahi Lina
252e9a4cdf hk: Bump up max buffer size
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
81546c769e asahi: Use 64bit size fields
This allows for BOs >4G.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
63dd4c13d0 asahi: move agx_gather_device_key
for precomp

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
7e57e0aa7d asahi: factor out more compiled shader
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f36ea1818b asahi: drop dead param
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
e7f100013f asahi: don't take compiled_shader in agx_build_internal_usc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
8d73a3ae40 asahi: assert/cse resource valid
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
b94bcf0318 asahi: fix a2c with sample shading, harder
Fixes: 9bbe93d158 ("hk: fix alpha-to-coverage with sample shading")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
b9429930b9 asahi: correct core count, max freq
fixes clinfo.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
beab5d2792 asahi: extract agx_get_num_cores
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
e145425746 agx: fuse also 8-bit address math
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
75d3c51e51 libagx: drop silliness in restart kernel
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
4660911cf9 libagx: fix unroll kernel constant qualifier
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2963cd900f libagx: don't key unroll to index size
Probably a premature optimization, it's annoying for precomp and for DGC.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6030b204d5 libagx: simplify index patch expression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
5e4e8df95a libagx: drop Clockwise
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
0c0097ab34 libagx: vectorize triangle def'n
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c54fdde1a4 libagx: drop dead code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d00a504cb0 libagx: drop branch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
28a2844309 libagx: fix cl warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
663b367a76 hk: fix meta shader name
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f8b69ebdc2 hk: drop assert
works fine without.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ece3bd74db agx: make imad+ishl rules actually work
total instructions in shared programs: 2750211 -> 2750184 (<.01%)
instructions in affected programs: 50499 -> 50472 (-0.05%)
helped: 27
HURT: 0
Instructions are helped.

total alu in shared programs: 2273669 -> 2273642 (<.01%)
alu in affected programs: 29874 -> 29847 (-0.09%)
helped: 27
HURT: 0
Alu are helped.

total fscib in shared programs: 2271986 -> 2271959 (<.01%)
fscib in affected programs: 29874 -> 29847 (-0.09%)
helped: 27
HURT: 0
Fscib are helped.

total bytes in shared programs: 21475184 -> 21474968 (<.01%)
bytes in affected programs: 371574 -> 371358 (-0.06%)
helped: 27
HURT: 0
Bytes are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f737470736 agx: fuse iadd+large shift into imad
total instructions in shared programs: 2750352 -> 2750211 (<.01%)
instructions in affected programs: 86944 -> 86803 (-0.16%)
helped: 32
HURT: 18
Instructions are helped.

total alu in shared programs: 2273810 -> 2273669 (<.01%)
alu in affected programs: 76720 -> 76579 (-0.18%)
helped: 32
HURT: 18
Alu are helped.

total fscib in shared programs: 2272127 -> 2271986 (<.01%)
fscib in affected programs: 76720 -> 76579 (-0.18%)
helped: 32
HURT: 18
Fscib are helped.

total bytes in shared programs: 21476424 -> 21475184 (<.01%)
bytes in affected programs: 649884 -> 648644 (-0.19%)
helped: 33
HURT: 18
Bytes are helped.

total regs in shared programs: 865114 -> 865090 (<.01%)
regs in affected programs: 525 -> 501 (-4.57%)
helped: 3
HURT: 0

total uniforms in shared programs: 2120792 -> 2120848 (<.01%)
uniforms in affected programs: 414 -> 470 (13.53%)
helped: 0
HURT: 8
Uniforms are HURT.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c9e42073a1 agx: optimize signext imad
improves clpeak short.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
cf0261980a hk: Enable missing swapchainMaintenance1 support
This was inconsistent with claiming the extension is supported, and that
trips up GTK4.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d449800e46 hk: don't advertise impossible modifiers
fixes dEQP-VK.drm_format_modifiers.bound_to_dma_buf.a2b10g10r10_sint_pack32,Crash

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
e5d61631fe hk: Fix DRM modifier selection for compressed surfaces
We have to reject DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED for surfaces
which are too small. Since the modifier is for all planes, that means
that for multiplane images we need to test all planes for compression
support.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
da1601a4ec hk: Add virtio implicit sync support
Since we can't know what BOs are written easily, just sync against all
external BOs.

This should go away once we have proper fence passing support so we can
do implicit sync passing in muvm-x11bridge.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Mary Guillemard
1a621a6967 agx: Add support for EGL_NV_context_priority_realtime
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ddc6d9e984 agx: fix atomics in tess count shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2c7635ab63 agx: add tests for sign/zero-extend propagate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6d56c8bc02 agx: fold zext into int sources
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
200d0794e2 agx: optimize signext+iadd
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
cfe0a9acec agx: add pseudo for signext
easier to optimize

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
8de339c0d8 agx: change int conversion test
it's not useful as is but we can salvage

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
85c5a25ec3 asahi: In-place decompress shared resources for feedback loops
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
f04387a415 asahi: Introduce batch->feedback to disable compression in PBE
Used for RTs that have feedback with in-place decompression.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
9288a3a583 asahi: Extract agx_decompress_inplace()
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
f28a1b3fcf asahi: Add PIPE_BIND_SHARED to imported resources
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
59501af723 asahi: Add pipe bind flags to resource debug
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Zan Dobersek
e17038cc88 fd/pps: provide derived counters on a7xx
Provide various derived counters that can be reported by the freedreno
perfetto producer on a7xx devices.

Specific to a7xx is the split of counters for some countables between the
rendering and visibility bins. Such counters have to be configured
separately inside the appropriate perfcounter group, which then enables
the derived counter to use the separate counter values in its measured
metrics.

Not all possible derived counters are enabled because the perfcounter
groups cannot handle as many counters as would be necessary. There's also
disabled derived counters that would require counters from the VBIF group
which isn't exposed for now due to its more complex way of enabling the
relevant counters.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29677>
2024-11-11 13:39:40 +00:00
Zan Dobersek
fae4a23ab1 fd/pps: specify counter group for each countable
For each countable that's being set up, the specific counter group is now
also required. This way on a7xx it will be possible to differentiate
between countables that have the same name but can be used through counter
groups for rendering bin or for visibility bin (e.g. CP and BV_CP).

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29677>
2024-11-11 13:39:39 +00:00
Danylo Piliaiev
21359417ba ir3/parser: Print the line where parsing error occurred
Super useful with rddecompiler, otherwise it's impossible to
determine the instruction which is failed to be parsed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31954>
2024-11-11 11:38:17 +00:00
Samuel Pitoiset
30d9166d80 radv: dump the trap handler shader with RADV_DEBUG=dump_trap_handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32031>
2024-11-11 09:34:05 +00:00
Samuel Pitoiset
4d50691ae9 radv: remove unused parameter to radv_fill_nir_compiler_options()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32031>
2024-11-11 09:34:05 +00:00
Samuel Pitoiset
fb5a3cca7a docs: add missing documentation for RADV_DEBUG=psocachestats
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32077>
2024-11-11 09:26:28 +00:00
Konstantin Seurer
e3cf6290e0 radv: Add RADV_DEBUG=nirdebuginfo
Annotates the shader with source locations into the nir shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
cf447c5da1 nir: Do not gather source locations for phis
Phi instructions are expected to be the first instructions in a block.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
f2c204daf0 nir: Add a first_line parameter to gather_debug_info
Useful when the file contains multiple shaders.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
736c8c6f23 radv: Dump nir shaders before compiling
It will allow adding source locations that point to the nir_string to
the shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
aaf65d6219 radv: Store debug info inside radv_shader
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
54c22656b8 radv: Add a helper for accessing the shader binary
Use pointers into the blob instead of hardcoding the layout everywhere.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin Seurer
69ebba82d4 aco: Pass debug information to the driver
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin Seurer
f8ef1afec8 aco: Handle nir_debug_info_instr
Propagated debug info using p_debug_info and Program::debug_info.
Offsets into the shader binary are gathered during assembly.
This will be usefull for mapping back the disassembled shader to
nir, glsl or spirv.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin Seurer
7dd9840128 amd: Add ac_shader_debug_info
This is very similar to nir_debug_info_instr but it can exist outside of
a nir shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin
4d09cd7fa5 nir/lower_non_uniform_access: Group accesses using the same resource
Avoids emitting the waterfall loop for every access if they use the same
resource:

waterfall_loop {
   access
}
waterfall_loop {
   access
}

->

waterfall_loop {
   access
   access
}

Totals from 276 (0.33% of 84770) affected shaders:
MaxWaves: 3360 -> 3356 (-0.12%)
Instrs: 3759927 -> 3730650 (-0.78%)
CodeSize: 21125784 -> 20899580 (-1.07%)
VGPRs: 23096 -> 23104 (+0.03%)
Latency: 35593716 -> 35315455 (-0.78%); split: -0.78%, +0.00%
InvThroughput: 7353071 -> 7297309 (-0.76%); split: -0.76%, +0.00%
VClause: 120983 -> 118579 (-1.99%)
SClause: 113073 -> 110671 (-2.12%)
Copies: 358272 -> 348686 (-2.68%)
Branches: 166706 -> 159500 (-4.32%)
PreSGPRs: 18598 -> 18596 (-0.01%)
PreVGPRs: 21417 -> 21424 (+0.03%); split: -0.01%, +0.04%
VALU: 2354862 -> 2350053 (-0.20%)
SALU: 582291 -> 567638 (-2.52%)
SMEM: 139875 -> 137473 (-1.72%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Konstantin Seurer
c5e40a60f8 radv: Lower non-uniform access after vectorization
Scalar access can make nir_lower_non_uniform_access emit a lot of
waterfall loops.

Totals from 83 (0.10% of 84770) affected shaders:
Instrs: 2747926 -> 2745959 (-0.07%); split: -0.07%, +0.00%
CodeSize: 15022460 -> 14998240 (-0.16%); split: -0.16%, +0.00%
Latency: 18602932 -> 18404976 (-1.06%); split: -1.18%, +0.12%
InvThroughput: 4500730 -> 4450364 (-1.12%); split: -1.18%, +0.06%
VClause: 93651 -> 91848 (-1.93%); split: -1.93%, +0.00%
SClause: 63672 -> 63595 (-0.12%); split: -0.13%, +0.00%
Copies: 229377 -> 229896 (+0.23%); split: -0.04%, +0.27%
Branches: 107630 -> 107627 (-0.00%); split: -0.01%, +0.00%
PreSGPRs: 5247 -> 5253 (+0.11%)
PreVGPRs: 5911 -> 5903 (-0.14%); split: -0.29%, +0.15%
VALU: 1761158 -> 1761540 (+0.02%); split: -0.01%, +0.03%
SALU: 419743 -> 419783 (+0.01%); split: -0.01%, +0.02%
VMEM: 152142 -> 150208 (-1.27%)
SMEM: 80251 -> 80244 (-0.01%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Konstantin Seurer
d44f74896e nir: Add missing access flags to print_access
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Konstantin Seurer
01ca436263 util: Fix some brackets in util_dynarray_.*_ptr
Fixes a compiler error when directly accessing members of the returned
pointer.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Visan, Tiberiu
d379a3a428 amd/vpelib: remove luma offset (#459)
\[WHY\]
Shader and VPE does not apply brightness adjs in the same manner

\[HOW\]
Removed luma offset added in VPE

\[TESTING\]
Tested on real time video rendering

Co-authored-by: Tiberiu Visan <tvisan@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32075>
2024-11-11 13:00:54 +08:00
Visan, Tiberiu
2172ab2c2a amd/vpelib: patch to match shader (#456)
\[WHY\]
Shader and VPE had different behavior while adjusting the brightness

\[HOW\]
Apply the same normalization factor

\[TESTING\]
Tested on real video outputs

Co-authored-by: Tiberiu Visan <tvisan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32075>
2024-11-11 13:00:44 +08:00
Leder, Brendan Steve
891c4694ba amd/vpelib: Refactor OCSC and update missing check
Missing check for 601 in limited format check, updated that.
Refactored OCSC to use specific limited depths.
Cleaned up general color processing.

Co-authored-by: Brendan <breleder@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32075>
2024-11-11 13:00:29 +08:00
Martin Roukala (né Peres)
dc1fe83aa5 zink/ci: document new-ish vangogh flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32071>
2024-11-10 07:21:41 +02:00
Marek Olšák
1299f5c50a gallium/radeon: import libdrm_radeon source code, drop the dependency
Only radeon_surface.h/c is used from libdrm and radeon_drm.h is imported
too. This code doesn't change anymore. We don't need the dependency.

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31827>
2024-11-10 00:52:18 +00:00
Russell Greene
ae9d365686 perfetto: fix macos compile
On macos, <sys/types.h> does not declare clockid_t,
but it's instead in <time.h>, which also includes
<sys/types.h> on Linux, so just include <time.h> on
all UNIX platforms.

Fixes: a871eabc
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12064
Tested-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31881>
2024-11-09 09:23:22 +00:00
Deborah Brouwer
276447ef81 ci/b2c: update RESULTS_DIR for .b2c-test jobs
Since $RESULTS_DIR is now centrally defined in setup-test-env.sh it's no
longer necessary to manually add a hard-coded results directory for the
b2b-test job results.

This keeps the results directory consistent between b2c-test jobs and lava.

Fixes: 9b6d14aed1 ("ci: Always create results dir from init")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32051>
2024-11-09 08:40:48 +00:00
Deborah Brouwer
b5b2515f86 ci: Remove duplicate slash before $RESULTS_DIR
The RESULTS_DIR variable is defined by reference to the present
working directory, but if the pwd is the root directory then the
$RESULTS_DIR begins with two slashes instead of one like this: //results.

This is harmless but not necessary, so remove it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32051>
2024-11-09 08:40:48 +00:00
Deborah Brouwer
e368623fff freedreno/ci: add prefix for a630-vk-asan tests
Currently a630-vk-asan has separate files for its expected failures and
skips, but by using the deqp-runner prefix option, the job can use the
common a630 expectation files. This simplifies `a630-vk-asan` without any
substantive changes to the ci job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31970>
2024-11-09 08:15:36 +00:00
Alyssa Rosenzweig
0a81434adf agx: rewrite address mode lowering
AGX load/stores supports a single family of addressing modes:

   64-bit base + sign/zero-extend(32-bit) << (format shift + optional shift)

This is a base-index addressing mode, where the index is minimally in elements
(never bytes, unless we're doing 8-bit load/stores). Both base and the resulting
address must be aligned to the format size; the mandatory shift means that
alignment of base is equivalent to alignment of the final address, which is
taken care of by lower_mem_access_bit_size anyhow.

The other key thing to note is that this is a 64-bit shift, after the sign- or
zero-extension of the 32-bit index. That means that AGX does NOT implement

   64-bit base + sign/zero-extend(32-bit << shift)

This has sweeping implications.

For addressing math from C-based languages (including OpenCL C), the AGX mode is
more helpful, since we tend to get 64-bit shifts instead of 32-bit shifts.
However, for addressing math coming from GLSL, the AGX mode is rather annoying
since we know UBOs/SSBOs are at most 4GB so nir_lower_io & friends are all
32-bit byte indexing. It's tricky to teach them to do otherwise, and would not
be optimal either since 64-bit adds&shifts are *usually* much more expensive
than 32-bit on AGX *except* for when fused into the load/store.

So we don't want 32-bit NIR, since then we can't use the hardware addressing
mode at all. We also don't want 64-bit NIR, since then we have excessive 64-bit
math resulting from deep deref chains from complex struct/array cases. Instead,
we want a middle ground: 32-bit operations that are guaranteed not to overflow
32-bit and can therefore be losslessly promoted to 64-bit.

We can make that no-overflow guarantee as a consequence of the maximum UBO/SSBO
size, and indeed Mesa relies on this already all over the place. So, in this
series, we use relaxed amul opcodes for addressing
math. Then, we rewrite our address mode pattern matching to fuse AGX address
modes.

The actual pattern matching is rewritten. The old code was brittle handwritten
nir_scalar chasing, based on a faulty model of the hardware (with the 32-bit
shift). We delete it all, it's broken. In the new approach, we add some NIR
pseudo-opcodes for address math (ulea_agx/ilea_agx) which we pattern match with
NIR algebraic rules. Then the chasing required to fuse LEA's into load/stores is
trivial because we never go deeper than 1 level. After fusing, we then lower the
leftover lea/amul opcodes and let regular nir_opt_algebraic take it from
here.

We do need to be very careful around pass order to make sure things like
load/store vectorization still happen. Some passes are shuffled in this commit
to make this work. We also need to cleanup amul before fusing since we
specifically do not have nir_opt_algebraic do so - the entire point of the
pseudo-opcodes is to make nir_opt_algebraic ignore the opcodes until we've had a
chance to fuse. If we simply used the .nuw bit on iadd/imul, nir_opt_algebraic
would "optimize" things and lose the bit and then we would fail to fuse
addressing modes, which is a much more expensive failure case than anything
nir_opt_algebraic can do for us. I don't know what the "optimal" pass order for
AGX would look like at this point, but what we have here is good enough for now
and is a net positive for shader-db.

That all ends up being much less code and much simpler code, while fixing the
soundness holes in the old code, and also optimizing a significantly richer set
of addressing calculations. Now we don't juts optimize GL/VK modes, but also CL.
This is crucial even for GL/VK performance, since we rely on CL via libagx even
in graphics shaders.

Terraintessellation is up 10% to ~310fps, which is quite nice.

The following stats are for the end of the series together, including this
change + libagx change + the NIR changes building up to this... but not
including the SSBO vectorizer stats or the IC modelling fix. In other words,
these are the stats for "rewriting address mode handling". This is on OpenGL,
and since the old code was targeted at GL, anything that's not a loss is good
enough - we need this for the soundness fix regardless.

total instructions in shared programs: 2751356 -> 2750518 (-0.03%)
instructions in affected programs: 372143 -> 371305 (-0.23%)
helped: 715
HURT: 75
Instructions are helped.

total alu in shared programs: 2279559 -> 2278721 (-0.04%)
alu in affected programs: 304170 -> 303332 (-0.28%)
helped: 715
HURT: 75
Alu are helped.

total fscib in shared programs: 2277843 -> 2277008 (-0.04%)
fscib in affected programs: 304167 -> 303332 (-0.27%)
helped: 715
HURT: 75
Fscib are helped.

total ic in shared programs: 632686 -> 621886 (-1.71%)
ic in affected programs: 113078 -> 102278 (-9.55%)
helped: 1159
HURT: 82
Ic are helped.

total bytes in shared programs: 21489034 -> 21477530 (-0.05%)
bytes in affected programs: 3018456 -> 3006952 (-0.38%)
helped: 751
HURT: 107
Bytes are helped.

total regs in shared programs: 865148 -> 865114 (<.01%)
regs in affected programs: 1603 -> 1569 (-2.12%)
helped: 10
HURT: 9
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 2120735 -> 2120792 (<.01%)
uniforms in affected programs: 22752 -> 22809 (0.25%)
helped: 76
HURT: 49
Inconclusive result (value mean confidence interval includes 0).

total threads in shared programs: 27613312 -> 27613504 (<.01%)
threads in affected programs: 1536 -> 1728 (12.50%)
helped: 3
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
d466ccc6bd libagx: promote math to use AGX address mode
we want to fit into the 64 + ext() << #n pattern to let us fuse address
arithmetic into our loads, so rework some libagx addressing to better match that

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
77ce91e99b hk: reduce max SSBO size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
01d2aa1d53 agx: fix bfeil timing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
db8d467ec6 agx: model IC dispatch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
3c222da6c0 agx: vectorize SSBOs
this was missed due to the lowering, and mitigates a lot of stats weirdness with
the address mode rework.

total instructions in shared programs: 2755170 -> 2751399 (-0.14%)
instructions in affected programs: 16323 -> 12552 (-23.10%)
helped: 71
HURT: 0
helped stats (abs) min: 10 max: 178 x̄: 53.11 x̃: 42
helped stats (rel) min: 2.04% max: 50.00% x̄: 34.73% x̃: 40.79%
95% mean confidence interval for instructions value: -60.94 -45.28
95% mean confidence interval for instructions %-change: -37.81% -31.65%
Instructions are helped.

total alu in shared programs: 2169888 -> 2168281 (-0.07%)
alu in affected programs: 9547 -> 7940 (-16.83%)
helped: 71
HURT: 0
helped stats (abs) min: 5 max: 90 x̄: 22.63 x̃: 16
helped stats (rel) min: 1.02% max: 43.33% x̄: 25.39% x̃: 29.41%
95% mean confidence interval for alu value: -26.33 -18.93
95% mean confidence interval for alu %-change: -27.91% -22.87%
Alu are helped.

total fscib in shared programs: 2165597 -> 2163990 (-0.07%)
fscib in affected programs: 9547 -> 7940 (-16.83%)
helped: 71
HURT: 0
helped stats (abs) min: 5 max: 90 x̄: 22.63 x̃: 16
helped stats (rel) min: 1.02% max: 43.33% x̄: 25.39% x̃: 29.41%
95% mean confidence interval for fscib value: -26.33 -18.93
95% mean confidence interval for fscib %-change: -27.91% -22.87%
Fscib are helped.

total bytes in shared programs: 21517750 -> 21489352 (-0.13%)
bytes in affected programs: 126270 -> 97872 (-22.49%)
helped: 71
HURT: 0
helped stats (abs) min: 80 max: 1084 x̄: 399.97 x̃: 324
helped stats (rel) min: 1.77% max: 50.57% x̄: 35.07% x̃: 42.31%
95% mean confidence interval for bytes value: -455.66 -344.28
95% mean confidence interval for bytes %-change: -38.34% -31.79%
Bytes are helped.

total regs in shared programs: 864490 -> 865162 (0.08%)
regs in affected programs: 4567 -> 5239 (14.71%)
helped: 4
HURT: 61
helped stats (abs) min: 6 max: 6 x̄: 6.00 x̃: 6
helped stats (rel) min: 4.51% max: 5.13% x̄: 4.82% x̃: 4.82%
HURT stats (abs)   min: 2 max: 24 x̄: 11.41 x̃: 12
HURT stats (rel)   min: 1.98% max: 82.35% x̄: 21.05% x̃: 16.00%
95% mean confidence interval for regs value: 8.52 12.16
95% mean confidence interval for regs %-change: 14.91% 24.00%
Regs are HURT.

total threads in shared programs: 27613056 -> 27613312 (<.01%)
threads in affected programs: 3200 -> 3456 (8.00%)
helped: 4
HURT: 0
helped stats (abs) min: 64 max: 64 x̄: 64.00 x̃: 64
helped stats (rel) min: 7.69% max: 8.33% x̄: 8.01% x̃: 8.01%
95% mean confidence interval for threads value: 64.00 64.00
95% mean confidence interval for threads %-change: 7.42% 8.60%
Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
b593a6aa98 rusticl: respect late_lower_int64
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
5c73a8af44 nir/lower_uniforms_to_ubo: use amul
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
fc460e7f20 nir/opt_algebraic: don't lower amul if requested
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
1f3c97547a nir/builder: use amul over ishl on agx
ishl can wrap, amul cannot. so we need amul in the backend, or otherwise we
would need to introduce an ashl opcode instead. that doesn't seem better.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
9ab8d70fa6 nir: add ilea_agx/ulea_agx opcodes
to facilitate address mode lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
23afe968ad nir: add late_lower_int64 option
Some drivers generally need int64 lowered, but prefer to do this lowering
themselves late, to have a chance to optimize targeted int64 patterns before
lowering the rest. This isn't currently possible since nir_lower_int64 takes no
options except what's const* in the shader, and frontends call nir_lower_int64
before passing the shader off to the driver. Add an option to defer int64
lowering. This is a bit ugly but the alternative is replumbing nir_lower_int64's
option handling cross-tree and no-thank-you-not-right-now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
eaf75169ee nir: add amul flag
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
227026b7ad nir/opt_algebraic: add another 64-bit pattern
clpeak

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
2a3f133fd0 nir/opt_algebraic: add more 64-bit patterns
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:41 -04:00
Alyssa Rosenzweig
a4a3487aae nir/opt_algebraic: optimize patterns from Skia
shaders/skia/1567.shader_test relies on algebraic + constant folding, subtle
changes in the input compiling flow can cause it to baloon. these patterns fix
that. annoying!

shader-db results aren't amazing, but they avert a major stats regression for
that one Skia shader.

total instructions in shared programs: 2751399 -> 2751295 (<.01%)
instructions in affected programs: 6509 -> 6405 (-1.60%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 14 x̄: 5.62 x̃: 6
helped stats (rel) min: 0.53% max: 13.73% x̄: 3.57% x̃: 1.62%
HURT stats (abs)   min: 14 max: 14 x̄: 14.00 x̃: 14
HURT stats (rel)   min: 2.45% max: 2.45% x̄: 2.45% x̃: 2.45%
95% mean confidence interval for instructions value: -7.09 -2.36
95% mean confidence interval for instructions %-change: -5.14% -1.45%
Instructions are helped.

total alu in shared programs: 2274577 -> 2274468 (<.01%)
alu in affected programs: 6178 -> 6069 (-1.76%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 14 x̄: 5.86 x̃: 7
helped stats (rel) min: 0.55% max: 16.47% x̄: 3.93% x̃: 1.72%
HURT stats (abs)   min: 14 max: 14 x̄: 14.00 x̃: 14
HURT stats (rel)   min: 2.83% max: 2.83% x̄: 2.83% x̃: 2.83%
95% mean confidence interval for alu value: -7.35 -2.56
95% mean confidence interval for alu %-change: -5.67% -1.57%
Alu are helped.

total fscib in shared programs: 2272894 -> 2272785 (<.01%)
fscib in affected programs: 6178 -> 6069 (-1.76%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 14 x̄: 5.86 x̃: 7
helped stats (rel) min: 0.55% max: 16.47% x̄: 3.93% x̃: 1.72%
HURT stats (abs)   min: 14 max: 14 x̄: 14.00 x̃: 14
HURT stats (rel)   min: 2.83% max: 2.83% x̄: 2.83% x̃: 2.83%
95% mean confidence interval for fscib value: -7.35 -2.56
95% mean confidence interval for fscib %-change: -5.67% -1.57%
Fscib are helped.

total bytes in shared programs: 21489352 -> 21488668 (<.01%)
bytes in affected programs: 53362 -> 52678 (-1.28%)
helped: 21
HURT: 2
helped stats (abs) min: 6 max: 98 x̄: 35.52 x̃: 40
helped stats (rel) min: 0.39% max: 10.63% x̄: 2.27% x̃: 1.27%
HURT stats (abs)   min: 2 max: 60 x̄: 31.00 x̃: 31
HURT stats (rel)   min: 0.08% max: 1.40% x̄: 0.74% x̃: 0.74%
95% mean confidence interval for bytes value: -42.73 -16.74
95% mean confidence interval for bytes %-change: -3.13% -0.89%
Bytes are helped.

total regs in shared programs: 865162 -> 865148 (<.01%)
regs in affected programs: 509 -> 495 (-2.75%)
helped: 4
HURT: 5
helped stats (abs) min: 2 max: 14 x̄: 6.00 x̃: 4
helped stats (rel) min: 3.17% max: 35.90% x̄: 14.01% x̃: 8.48%
HURT stats (abs)   min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel)   min: 3.17% max: 3.17% x̄: 3.17% x̃: 3.17%
95% mean confidence interval for regs value: -5.75 2.64
95% mean confidence interval for regs %-change: -14.31% 5.39%
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 2120731 -> 2120735 (<.01%)
uniforms in affected programs: 358 -> 362 (1.12%)
helped: 1
HURT: 2
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 2.94% max: 2.94% x̄: 2.94% x̃: 2.94%
HURT stats (abs)   min: 2 max: 4 x̄: 3.00 x̃: 3
HURT stats (rel)   min: 1.05% max: 4.00% x̄: 2.53% x̃: 2.53%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:41 -04:00
Chia-I Wu
015f6a7aff panvk: ensure res table is restored after meta
Set res_table to 0 to ensure that the res table is re-emitted.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Fixes: 5067921349 ("panvk: Switch to vk_meta")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32044>
2024-11-09 00:48:47 +00:00
Jianxun Zhang
8906816f49 anv,hasvk,genxml: Rename genxml files using verx10
It could be confusing that a newer platform named with a smaller
number than a half-generation of an older platform like 'gfx20' and
'gfx75' in xml files.

Down the road, it can be a little worse once we pass something like
'gfx40' when there is already a gfx45.xml for the oldest platform.

Unify naming xml files with verx10 numbers to resolve the issue.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-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/31943>
2024-11-09 00:04:47 +00:00
Eric Engestrom
7e0e433482 radv+zink/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
66df09ffda nvk+zink/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
f9593d9eb5 freedreno/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
4ab210f588 broadcom/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
8d2620569c ci: make error handling quieter
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32054>
2024-11-08 20:56:46 +00:00
Eric Engestrom
e5708ab2b4 ci: use quiet alias for commands
And set x_off again when nesting these functions but we're not done and
we have more after.

Fixes: d69bd58365 ("ci: consistently restore `-x` after temporarily disabling it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32054>
2024-11-08 20:56:46 +00:00
Eric Engestrom
5cd054ebe5 ci: move error handling functions at the end
So that everything is defined by the time we use it in here.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32054>
2024-11-08 20:56:46 +00:00
Iván Briano
aee04bf4fb intel/rt: fix ray_query stack address calculation
While the documentation says to use NUM_SIMD_LANES_PER_DSS for the stack
address calculation, what the HW actually uses is
NUM_SYNC_STACKID_PER_DSS. The former may vary depending on the platform,
while the latter is fixed to 2048 for all current platforms.

Fixes: 6c84cbd8c9 ("intel/dev/xe: Set max_eus_per_subslice using topology query")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32049>
2024-11-08 18:31:52 +00:00
Ian Romanick
7aad19ccd2 brw/lower: Lower invalid source conversion to better code
There are two fragment shaders from RDR2 that is hurt for spills and
fills on Lunar Lake.

    Totals from 2 (0.00% of 551413) affected shaders:
    Spill count: 1252 -> 1317 (+5.19%)
    Fill count: 2518 -> 2642 (+4.92%)

Those shaders... have a lot of room for improvement. There are some
patterns in those shaders that we handle very, very poorly. Improving
those patterns would likely improve the spills and fills in these
shaders quite dramatically.

Given how much other platforms are helped, I don't this should block
this commit.

No shader-db or fossil-db changes on any pre-Gfx12.5 Intel platforms.

v2: Add some comments and an additional assertion. Suggested by Ken.

shader-db:

Lunar Lake
total instructions in shared programs: 18094517 -> 18094511 (<.01%)
instructions in affected programs: 809 -> 803 (-0.74%)
helped: 6 / HURT: 0

total cycles in shared programs: 921532158 -> 921532168 (<.01%)
cycles in affected programs: 2266 -> 2276 (0.44%)
helped: 0 / HURT: 3

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19820845 -> 19820839 (<.01%)
instructions in affected programs: 803 -> 797 (-0.75%)
helped: 6 / HURT: 0

total cycles in shared programs: 906372999 -> 906372949 (<.01%)
cycles in affected programs: 3216 -> 3166 (-1.55%)
helped: 6 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 141887377 -> 141884465 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21990301498 -> 21990267232 (-0.00%); split: -0.00%, +0.00%
Spill count: 69732 -> 69797 (+0.09%)
Fill count: 128521 -> 128645 (+0.10%)

Totals from 349 (0.06% of 551413) affected shaders:
Instrs: 506117 -> 503205 (-0.58%); split: -0.79%, +0.21%
Cycle count: 32362996 -> 32328730 (-0.11%); split: -0.52%, +0.41%
Spill count: 1951 -> 2016 (+3.33%)
Fill count: 4899 -> 5023 (+2.53%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152773732 -> 152761383 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17187529968 -> 17187450663 (-0.00%); split: -0.00%, +0.00%
Spill count: 79279 -> 79003 (-0.35%)
Fill count: 148803 -> 147942 (-0.58%)
Scratch Memory Size: 3949568 -> 3946496 (-0.08%)
Max live registers: 31879325 -> 31879230 (-0.00%)

Totals from 366 (0.06% of 633185) affected shaders:
Instrs: 557377 -> 545028 (-2.22%); split: -2.22%, +0.01%
Cycle count: 26171205 -> 26091900 (-0.30%); split: -0.54%, +0.24%
Spill count: 3238 -> 2962 (-8.52%)
Fill count: 10018 -> 9157 (-8.59%)
Scratch Memory Size: 257024 -> 253952 (-1.20%)
Max live registers: 28187 -> 28092 (-0.34%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
2a57568ebd brw/build: Add scalar_group() helper
Some uses of the old pattern still exist. The use in brw_fs_nir.cpp is
deleted by commits !29884. The use in brw_lower_logical_sends.cpp seems
different, so I decided to keep it.

The next commit wants to use this.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
5dfea87623 brw/opt: Always do both kinds of copy propagation before lower_load_payload
shader-db:

All Intel platforms except Skylake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18092932 -> 18092713 (<.01%)
instructions in affected programs: 139290 -> 139071 (-0.16%)
helped: 103
HURT: 18
helped stats (abs) min: 1 max: 8 x̄: 2.43 x̃: 2
helped stats (rel) min: 0.02% max: 9.09% x̄: 0.73% x̃: 0.29%
HURT stats (abs)   min: 1 max: 5 x̄: 1.72 x̃: 1
HURT stats (rel)   min: 0.02% max: 0.55% x̄: 0.10% x̃: 0.08%
95% mean confidence interval for instructions value: -2.17 -1.45
95% mean confidence interval for instructions %-change: -0.83% -0.38%
Instructions are helped.

total cycles in shared programs: 922792268 -> 921495900 (-0.14%)
cycles in affected programs: 400296984 -> 399000616 (-0.32%)
helped: 765
HURT: 635
helped stats (abs) min: 2 max: 77018 x̄: 6739.33 x̃: 60
helped stats (rel) min: <.01% max: 35.59% x̄: 1.98% x̃: 0.32%
HURT stats (abs)   min: 2 max: 88658 x̄: 6077.51 x̃: 152
HURT stats (rel)   min: <.01% max: 51.33% x̄: 2.75% x̃: 0.63%
95% mean confidence interval for cycles value: -1620.41 -231.54
95% mean confidence interval for cycles %-change: -0.10% 0.44%
Inconclusive result (%-change mean confidence interval includes 0).

LOST:   4
GAINED: 3

Skylake
total instructions in shared programs: 18658324 -> 18579715 (-0.42%)
instructions in affected programs: 2089957 -> 2011348 (-3.76%)
helped: 9842
HURT: 23
helped stats (abs) min: 1 max: 24 x̄: 7.99 x̃: 8
helped stats (rel) min: 0.05% max: 40.00% x̄: 5.37% x̃: 4.52%
HURT stats (abs)   min: 1 max: 5 x̄: 1.57 x̃: 1
HURT stats (rel)   min: 0.02% max: 1.28% x̄: 0.36% x̃: 0.24%
95% mean confidence interval for instructions value: -7.98 -7.95
95% mean confidence interval for instructions %-change: -5.43% -5.29%
Instructions are helped.

total cycles in shared programs: 860031654 -> 860237548 (0.02%)
cycles in affected programs: 449175235 -> 449381129 (0.05%)
helped: 7895
HURT: 4416
helped stats (abs) min: 1 max: 14129 x̄: 113.70 x̃: 22
helped stats (rel) min: <.01% max: 40.95% x̄: 1.31% x̃: 0.56%
HURT stats (abs)   min: 1 max: 33397 x̄: 249.89 x̃: 34
HURT stats (rel)   min: <.01% max: 67.47% x̄: 2.65% x̃: 0.65%
95% mean confidence interval for cycles value: 1.46 31.98
95% mean confidence interval for cycles %-change: 0.02% 0.19%
Cycles are HURT.

LOST:   557
GAINED: 900

fossil-db:

Lunar Lake
Totals:
Instrs: 141933621 -> 141884681 (-0.03%); split: -0.03%, +0.00%
Cycle count: 21990657282 -> 21990200212 (-0.00%); split: -0.14%, +0.14%
Spill count: 69754 -> 69732 (-0.03%); split: -0.05%, +0.02%
Fill count: 128559 -> 128521 (-0.03%); split: -0.05%, +0.02%
Scratch Memory Size: 5934080 -> 5925888 (-0.14%)
Max live registers: 48021653 -> 48051253 (+0.06%); split: -0.00%, +0.06%

Totals from 13510 (2.45% of 551410) affected shaders:
Instrs: 19497180 -> 19448240 (-0.25%); split: -0.25%, +0.00%
Cycle count: 2455370202 -> 2454913132 (-0.02%); split: -1.25%, +1.23%
Spill count: 10975 -> 10953 (-0.20%); split: -0.32%, +0.12%
Fill count: 21709 -> 21671 (-0.18%); split: -0.28%, +0.10%
Scratch Memory Size: 674816 -> 666624 (-1.21%)
Max live registers: 2502653 -> 2532253 (+1.18%); split: -0.01%, +1.19%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152763523 -> 152772716 (+0.01%); split: -0.00%, +0.01%
Cycle count: 17188701887 -> 17187510768 (-0.01%); split: -0.10%, +0.09%
Spill count: 79280 -> 79279 (-0.00%); split: -0.00%, +0.00%
Fill count: 148809 -> 148803 (-0.00%)
Max live registers: 31879240 -> 31879093 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5559984 -> 5559712 (-0.00%); split: +0.00%, -0.01%

Totals from 20524 (3.24% of 633183) affected shaders:
Instrs: 20366964 -> 20376157 (+0.05%); split: -0.01%, +0.05%
Cycle count: 2406162382 -> 2404971263 (-0.05%); split: -0.68%, +0.63%
Spill count: 19935 -> 19934 (-0.01%); split: -0.02%, +0.01%
Fill count: 34487 -> 34481 (-0.02%)
Max live registers: 1745598 -> 1745451 (-0.01%); split: -0.01%, +0.01%
Max dispatch width: 117992 -> 117720 (-0.23%); split: +0.03%, -0.26%

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150694108 -> 150683859 (-0.01%); split: -0.01%, +0.00%
Cycle count: 15526754059 -> 15529031079 (+0.01%); split: -0.10%, +0.12%
Max live registers: 31791599 -> 31791441 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5569488 -> 5569296 (-0.00%); split: +0.00%, -0.01%

Totals from 15000 (2.37% of 632406) affected shaders:
Instrs: 10965577 -> 10955328 (-0.09%); split: -0.11%, +0.02%
Cycle count: 2025347115 -> 2027624135 (+0.11%); split: -0.80%, +0.91%
Max live registers: 983373 -> 983215 (-0.02%); split: -0.02%, +0.00%
Max dispatch width: 83064 -> 82872 (-0.23%); split: +0.12%, -0.35%

Skylake
Totals:
Instrs: 140588784 -> 140413758 (-0.12%); split: -0.13%, +0.00%
Cycle count: 14724286265 -> 14723402393 (-0.01%); split: -0.04%, +0.04%
Fill count: 100130 -> 100129 (-0.00%)
Max live registers: 31418029 -> 31417146 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5513400 -> 5535192 (+0.40%); split: +0.89%, -0.49%

Totals from 39733 (6.35% of 625986) affected shaders:
Instrs: 17240737 -> 17065711 (-1.02%); split: -1.02%, +0.01%
Cycle count: 1994668203 -> 1993784331 (-0.04%); split: -0.31%, +0.27%
Fill count: 44481 -> 44480 (-0.00%)
Max live registers: 2766781 -> 2765898 (-0.03%); split: -0.03%, +0.00%
Max dispatch width: 210600 -> 232392 (+10.35%); split: +23.23%, -12.89%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
be26012f1d brw/opt: Always do copy prop, DCE, and register coalesce after lower_regioning
shader-db:

Lunar Lake
total instructions in shared programs: 18100289 -> 18083853 (-0.09%)
instructions in affected programs: 790048 -> 773612 (-2.08%)
helped: 3058 / HURT: 1

total cycles in shared programs: 921691992 -> 921293816 (-0.04%)
cycles in affected programs: 37210762 -> 36812586 (-1.07%)
helped: 2329 / HURT: 624

LOST:   27
GAINED: 26

Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 19825635 -> 19821391 (-0.02%)
instructions in affected programs: 138675 -> 134431 (-3.06%)
helped: 877 / HURT: 0

total cycles in shared programs: 907900598 -> 907885713 (<.01%)
cycles in affected programs: 7127161 -> 7112276 (-0.21%)
helped: 318 / HURT: 242

total spills in shared programs: 5790 -> 5758 (-0.55%)
spills in affected programs: 660 -> 628 (-4.85%)
helped: 8 / HURT: 0

total fills in shared programs: 6744 -> 6712 (-0.47%)
fills in affected programs: 708 -> 676 (-4.52%)
helped: 8 / HURT: 0

LOST:   10
GAINED: 0

Skylake
total instructions in shared programs: 18722197 -> 18637637 (-0.45%)
instructions in affected programs: 2757553 -> 2672993 (-3.07%)
helped: 12290 / HURT: 1

total cycles in shared programs: 859716039 -> 859432560 (-0.03%)
cycles in affected programs: 113731837 -> 113448358 (-0.25%)
helped: 9555 / HURT: 2422

LOST:   265
GAINED: 714

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 142000618 -> 141928331 (-0.05%); split: -0.05%, +0.00%
Subgroup size: 10995136 -> 10995072 (-0.00%)
Cycle count: 21994723230 -> 21990481140 (-0.02%); split: -0.08%, +0.06%
Spill count: 69911 -> 69754 (-0.22%); split: -0.23%, +0.00%
Fill count: 128723 -> 128559 (-0.13%); split: -0.15%, +0.02%
Scratch Memory Size: 5936128 -> 5934080 (-0.03%)
Max live registers: 48006880 -> 48020936 (+0.03%); split: -0.01%, +0.04%

Totals from 17450 (3.16% of 551410) affected shaders:
Instrs: 14984149 -> 14911862 (-0.48%); split: -0.48%, +0.00%
Subgroup size: 365744 -> 365680 (-0.02%)
Cycle count: 2585095128 -> 2580853038 (-0.16%); split: -0.71%, +0.54%
Spill count: 20893 -> 20736 (-0.75%); split: -0.76%, +0.00%
Fill count: 44181 -> 44017 (-0.37%); split: -0.44%, +0.07%
Scratch Memory Size: 995328 -> 993280 (-0.21%)
Max live registers: 2378069 -> 2392125 (+0.59%); split: -0.20%, +0.79%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150719758 -> 150676269 (-0.03%); split: -0.04%, +0.01%
Subgroup size: 7764560 -> 7764632 (+0.00%)
Cycle count: 15526689814 -> 15525687740 (-0.01%); split: -0.03%, +0.02%
Spill count: 60120 -> 59472 (-1.08%); split: -1.17%, +0.10%
Fill count: 105973 -> 104675 (-1.22%); split: -1.40%, +0.17%
Scratch Memory Size: 2396160 -> 2381824 (-0.60%); split: -0.73%, +0.13%
Max live registers: 31782879 -> 31788857 (+0.02%); split: -0.01%, +0.03%
Max dispatch width: 5569200 -> 5569344 (+0.00%); split: +0.00%, -0.00%

Totals from 10089 (1.60% of 632405) affected shaders:
Instrs: 6389866 -> 6346377 (-0.68%); split: -0.87%, +0.19%
Subgroup size: 102912 -> 102984 (+0.07%)
Cycle count: 681310278 -> 680308204 (-0.15%); split: -0.65%, +0.51%
Spill count: 19571 -> 18923 (-3.31%); split: -3.61%, +0.30%
Fill count: 38229 -> 36931 (-3.40%); split: -3.88%, +0.48%
Scratch Memory Size: 808960 -> 794624 (-1.77%); split: -2.15%, +0.38%
Max live registers: 677473 -> 683451 (+0.88%); split: -0.45%, +1.33%
Max dispatch width: 88672 -> 88816 (+0.16%); split: +0.27%, -0.11%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
b2d7a823be brw/lower: Don't emit spurious moves to or from NULL register
Previously an instruction like

    cmp.l.f0.0(16) null:F, v359:F, 0f

would get lowered to

    undef(16) v13703:UD
    cmp.l.f0.0(16) v13703:F, v359:F, 0f
    mov(16) null:UD, v13703:UD

After copy propagation and dead-code elimination are run again, the
original CMP gets turned back into its original form!

Some cases can also emit MOVs from the original NULL register.

It should be possible to not do any lowering here, but there are some
interactions with source lowering passes for things like

    cmp.l.f0.0(16) null:HF, g89.1<16,16,1>:HF, 0hf

What inspired this was... diff'ing step-by-step dumps from
INTEL_DEBUG=optimizer had a lot of useless changes due to these MOVs
and undefs. It was very annoying.  This low-effort change gets the
majority of the possible benefit.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
9aba731d03 brw/cse: Don't eliminate instructions that write flags
With other changes in my tree, I observed this code from
dEQP-VK.subgroups.vote.compute.subgroupallequal_float have the second
cmp.z removed.

    undef(8) %69:UD
    cmp.z.f0.0(8) %69:F, %37:F, %57+0.0<0>:F
    mov(1) v58+0.0:D, 0d NoMask group0
    (+f0.0) mov(1) v58+0.0:D, -1d NoMask group0
    cmp.nz.f0.0(8) null:D, v58+0.0<0>:D, 0d
    ...
    undef(8) %72:UD
    cmp.z.f0.0(8) %72:F, %37:F, %57+0.0<0>:F
    mov(1) v63+0.0:D, 0d NoMask group0
    (+f0.0) mov(1) v63+0.0:D, -1d NoMask group0

This was also fixed by running dead-code elimination before CSE. That
seems more like avoiding the problem than fixing it, though.

I believe this affects shader-db results because leaving the second
CMP in the shader can give more opportunities for cmod propagation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: 234c45c929 ("intel/brw: Write a new global CSE pass that works on defs")

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total cycles in shared programs: 922097690 -> 922260862 (0.02%)
cycles in affected programs: 3178926 -> 3342098 (5.13%)
helped: 130
HURT: 88
helped stats (abs) min: 2 max: 2194 x̄: 296.71 x̃: 16
helped stats (rel) min: <.01% max: 16.56% x̄: 1.86% x̃: 0.18%
HURT stats (abs)   min: 4 max: 11992 x̄: 2292.55 x̃: 47
HURT stats (rel)   min: 0.04% max: 57.32% x̄: 11.82% x̃: 0.61%
95% mean confidence interval for cycles value: 320.36 1176.63
95% mean confidence interval for cycles %-change: 1.59% 5.73%
Cycles are HURT.

LOST:   2
GAINED: 1

fossil-db:

Lunar Lake, Meteor Lake, Tiger Lake had similar results. (Lunar Lake shown)
Totals:
Instrs: 142022960 -> 142022928 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21995242782 -> 21995384040 (+0.00%); split: -0.00%, +0.00%
Max live registers: 48013385 -> 48013343 (-0.00%)

Totals from 507 (0.09% of 551441) affected shaders:
Instrs: 886191 -> 886159 (-0.00%); split: -0.01%, +0.01%
Cycle count: 69302492 -> 69443750 (+0.20%); split: -0.66%, +0.86%
Max live registers: 94413 -> 94371 (-0.04%)

DG2
Totals:
Instrs: 152856370 -> 152856093 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17237159885 -> 17236804052 (-0.00%); split: -0.00%, +0.00%
Fill count: 150673 -> 150631 (-0.03%)
Max live registers: 31871520 -> 31871476 (-0.00%)

Totals from 506 (0.08% of 633197) affected shaders:
Instrs: 831795 -> 831518 (-0.03%); split: -0.04%, +0.01%
Cycle count: 55578509 -> 55222676 (-0.64%); split: -1.38%, +0.74%
Fill count: 2779 -> 2737 (-1.51%)
Max live registers: 51383 -> 51339 (-0.09%)

Ice Lake and Skylake had similar results. (Ice Lake shown)
Totals:
Instrs: 152017826 -> 152017793 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15180773451 -> 15180761166 (-0.00%); split: -0.00%, +0.00%
Fill count: 106610 -> 106614 (+0.00%)
Max live registers: 32195006 -> 32194966 (-0.00%)

Totals from 411 (0.06% of 637268) affected shaders:
Instrs: 705935 -> 705902 (-0.00%); split: -0.01%, +0.01%
Cycle count: 47830019 -> 47817734 (-0.03%); split: -0.05%, +0.02%
Fill count: 2865 -> 2869 (+0.14%)
Max live registers: 42883 -> 42843 (-0.09%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
80a5d158ae brw/copy: Don't copy propagate through smaller entry dest size
Copy propagation would incorrectly occur in this code

    mov(16) v4+2.0:UW, u0<0>:UW NoMask
    ...
    mov(8) v6+2.0:UD, v4+2.0:UD NoMask group0

to create

    mov(16) v4+2.0:UW, u0<0>:UW NoMask
    ...
    mov(8) v6+2.0:UD, u0<0>:UD NoMask group0

This has different behavior. I think I just made a mistake when I
changed this condition in e3f502e007.

It seems like this condition could be relaxed to cover cases like (note
the change of destination stride)

    mov(16) v4+2.0<2>:UW, u0<0>:UW NoMask
    ...
    mov(8) v6+2.0:UD, v4+2.0:UD NoMask group0

I'm not sure it's worth it.

No shader-db or fossil-db changes on any Intel platform. Even the code
for the test case mentioned in the original commit did not change.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: e3f502e007 ("intel/fs: Allow copy propagation between MOVs of mixed sizes")
Closes: #12116
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Samuel Pitoiset
ced2404cb4 vulkan/runtime: return same cmdbuf level from the command pool freelist
This fixes a performance issue on RADV because secondaries are
allocated in GTT instead of VRAM for primaries.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12119
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32010>
2024-11-08 17:20:43 +00:00
Ian Romanick
c1c09e3c4a brw/emit: Add correct 3-source instruction assertions for each platform
Specifically, allow two immediate sources for BFE on Gfx12+. I stumbled
on this while trying some stuff with !31852.

v2: Don't be lazy. Add proper assertions for all the things on all the
platforms. Based on a suggestion by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: 7bed11fbde ("intel/brw: Allow immediates in the BFE instruction on Gfx12+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31858>
2024-11-08 16:48:57 +00:00
Gurchetan Singh
aebc6c974f gfxstream: use vulkan_lite_runtime
This results in faster compiles.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:10:09 -08:00
Gurchetan Singh
dd5244e6ac gfxstream: nuke android::base::SubAllocator
Use u_mm, one less dependency on libaemu v0.1.2

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:10:05 -08:00
Gurchetan Singh
6a9eb986c2 gfxstream: move isHostVisible function
It's separable from the rest of CoherentMemory class.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:10:00 -08:00
Gurchetan Singh
5d299a0bd4 util: add c++ guards to u_mm.h
Needed for gfxstream.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:09:49 -08:00
Hans-Kristian Arntzen
5f70858ece vulkan/wsi/wayland: Use X11-style image count strategy when using FIFO.
This is required, otherwise we regress latency in cases where
applications are using FIFO without explicit KHR_present_wait.
This is an unacceptable regression.

The fix is to normalize the behavior to X11 WSI.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: d052b0201e ("vulkan/wsi/wayland: Use fifo protocol for FIFO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32029>
2024-11-08 14:28:08 +00:00
Samuel Pitoiset
437bd63265 radv,aco: dump m0 and exec from the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:15 +00:00
Samuel Pitoiset
d1d41be43f aco: declare phys regs for tba_hi/tma_hi
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:15 +00:00
Samuel Pitoiset
13bab450a2 aco: fix storing SQ_WAVE_STATUS in the trap handler shader
SQ_WAVE_STATUS can change inside the trap because of SCC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
494050d2ea aco: add a helper to dump SGPR to memory for the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
8c6f2fef1b aco: use scalar buffer stores for dumping SGPRS from the trap on GFX8
This avoids using any VGPRs on GFX8.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
17f6b4e51e aco: save/restore SCC in the trap handler shader
SCC is only updated on GFX9+ but let's do it by default because the
trap handler shader is likely going to be more and more complex over
time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
7b4386facd aco: cleanup using fixed registers in the trap handler shader
It's easier to read and potentially less error prone.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Pierre-Eric Pelloux-Prayer
9c3ac69568 ac/perfcounter: fix buffer overflow
If block->b->selectors is larger than 999, "+ 4" is not enough.

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/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
8467f57e30 radeonsi/tests: update expected results
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
cce45dc0bf ac: switch AMD_FORCE_FAMILY handling to using ac_fake_hw_db
ac_fake_hw_db can be the single place where radeon_info content
is emulated when overriding the GPU type.

For some fields we need to avoid overriding them with the value
coming from the ioctls to get the correct behavior.

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/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
c097c37455 ac: add 'polaris12' gpu to ac_fake_hw_db
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/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
1c31cec31e ac: rename ac_surface_test_common -> ac_fake_hw_db
The next commit will reuse the radeon_info when AMD_FORCE_FAMILY
is used.

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/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
2ff67083e5 radeonsi: refuse to import texture with family_overriden being set
If the gfx version is overriden by the exporter process, the surface
layout might not be compatible with the importer process (which uses
the real gfx version).

So fail early, except if the layout is LINEAR (because it should work
on all gen) or a modifier is used (which should be rejected elsewhere
if not supported).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
9d0aba1f97 ac/surface: add flags to surface metadata
Instead of increasing the version number to describe which fields
are set, use the lower 16 bits for the metadata format version,
and the other bits as flags.
This way the version number defines the layout, and the flags
tell which values are set.

The format version is bumped to 3 (= can have flags), and 2 flags
are defined:
* AC_SURF_METADATA_FLAG_EXTRA_MD_BIT: replaces what was version
  number = 2. This means the metadata contains extra information
  for tools.
* AC_SURF_METADATA_FLAG_FAMILY_OVERRIDEN_BIT: if set, it means the
  surface was allocated from a context that used an overriden gfx
  family. This allows the importer process to fail the import early,
  as the surface is likely to be invalid.
  It also adds an extra dw at the end, to store the fake family.

This is a breaking change for existing code that interpreted
"version > 1" as 2, but only in one case:
AC_SURF_METADATA_FLAG_FAMILY_OVERRIDEN_BIT being set, but not
AC_SURF_METADATA_FLAG_EXTRA_MD_BIT, which produces a version number
of 0x20001 but there's not extra data.
I think this is ok, since both gfx family overriding and extra_md
are debugging tools.

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/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
acc32cadf5 radv: set info->family_overridden when RADV_FORCE_FAMILY is used
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/31841>
2024-11-08 13:31:02 +00:00
Karol Herbst
3154920c36 gallium: drop PIPE_SHADER_IR_NIR_SERIALIZED
It's not used anymore

Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
2024-11-08 12:49:23 +00:00
Karol Herbst
80c4ffb61a clover: drop support for nir drivers
People had enough time to migrate to rusticl, also nobody would support
this anyway anymore.

Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
2024-11-08 12:49:23 +00:00
Karol Herbst
277925471e nvc0: return NULL instead of asserting in nvc0_resource_from_user_memory
Fixes: 212f1ab40e ("nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY")
Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
2024-11-08 12:49:23 +00:00
Corentin Noël
89d709a43e virgl: Propagate the GL_MAX_stage_SHADER_STORAGE_BLOCKS for each stage
Some hardware have a higher number in the computer stage than in others, let's
simply propagate everything when possible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12003

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31666>
2024-11-08 12:26:06 +00:00
Collabora's Gfx CI Team
85d25cc5c8 Uprev Piglit to eebe1b555f51dbb702f696d08ad5ae8153bcdcdd
c2b3133392...eebe1b555f

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32020>
2024-11-08 11:21:05 +00:00
David Rosca
79b12001fd radeonsi/vcn: Stop clearing decode internal buffers
FW will clear them if needed.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
1f00dfd1a7 radeonsi: Support PIPE_VIDEO_CAP_SKIP_CLEAR_SURFACE
Starting with .59 amdgpu now clears VRAM on allocation, so we don't
need to clear video buffers which are always allocated in VRAM.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
b4b74617ae frontends/vdpau: Support skip clear on surface creation
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
5df9097c95 frontends/va: Support skip clear on surface creation
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
76df53f59b gallium: Add PIPE_VIDEO_CAP_SKIP_CLEAR_SURFACE
Used to skip calling clear_render_target when creating surface.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
Karol Herbst
47a1565c3d nv/codegen: Do not use a zero immediate for tex instructions
They aren't always legal for tex instructions, specifically for TXQ when
an actual source is needed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11999
Fixes: 85a31fa1fc ("nv50/ir/nir: fix txq emission on MS textures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32043>
2024-11-08 09:18:54 +00:00
David Rosca
2c3dd2a37d frontends/va: Add minus_1 to AV1 render_width/height
Rename to match the spec and to match the actual value.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31977>
2024-11-08 08:39:49 +00:00
David Rosca
7f2624e6ae radeonsi/vcn: Fix coding AV1 render size
This is only header metadata hint, so it should be passed directly
from packed headers to output. Also fix the value as render_width from
frontend is actually render_width_minus_1 (and same for height).

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31977>
2024-11-08 08:39:49 +00:00
Eric Engestrom
4ad8a5443b ci/build: add workaround for incorrect maybe-uninitialized error
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31890>
2024-11-08 07:09:15 +00:00
Eric Engestrom
f09ae95c10 ci/build: drop "verify after bump to F39" as that did not help
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31890>
2024-11-08 07:09:15 +00:00
Eric Engestrom
45e1ffeceb ci: upgrade the fedora image from 38 to 41
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31890>
2024-11-08 07:09:15 +00:00
Lionel Landwerlin
3ecf2a0518 anv: fix extent computation in image->image host copies
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0317c44872 ("anv: add VK_EXT_host_image_copy support")
Reviewed-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/32027>
2024-11-07 22:44:41 +00:00
Eric Engestrom
625ad5bc52 freedreno/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Eric Engestrom
a1b309a177 broadcom/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Eric Engestrom
e83613d906 radv/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Eric Engestrom
9229bcaf13 radeonsi/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Dylan Baker
b130cc0af7 docs/release-calendar: update one more time for pushed back release
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32042>
2024-11-07 19:27:31 +00:00
Eric Engestrom
95c2496412 meson: bump spirv-tools version needed to v2022.1
Since c60a421f0c ("vtn: Add a debug flag to dump SPIR-V
assembly"), we use SPIR-V 1.6, which was added in `spirv-tools 2022.1`.

Fixes: c60a421f0c ("vtn: Add a debug flag to dump SPIR-V assembly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11802
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32034>
2024-11-07 18:23:53 +00:00
Dylan Baker
d301046eaa docs: reset new_features.txt
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32040>
2024-11-07 17:57:57 +00:00
Dylan Baker
ad0c3c4ebf VERSION: bump to 25.0
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32040>
2024-11-07 17:57:57 +00:00
4530 changed files with 386841 additions and 194078 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

@@ -65,3 +65,12 @@ c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
# ir3: Reformat source with clang-format
177138d8cb0b4f6a42ef0a1f8593e14d79f17c54
# ir3: reformat after refactoring in previous commit
8ae5b27ee0331a739d14b42e67586784d6840388
# ir3: don't use deprecated NIR_PASS_V anymore
2fedc82c0cc9d3fb2e54707b57941b79553b640c
# ir3: reformat after previous commit
7210054db8cfb445a8ccdeacfdcfecccf44fa266

View File

@@ -30,11 +30,18 @@ workflow:
# do not duplicate pipelines on merge pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
# tag pipelines are disabled as it's too late to run all the tests by
# then, the release has been made based on the staging pipelines results
- if: $CI_COMMIT_TAG
when: never
# merge pipeline
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
MESA_CI_PERFORMANCE_ENABLED: 1
VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:high
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:high-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:high-aarch64
CI_TRON_JOB_PRIORITY_TAG: "" # Empty tags are ignored by gitlab
JOB_PRIORITY: 75
# fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes
DEQP_RUNNER_MAX_FAILS: 40
@@ -47,19 +54,27 @@ workflow:
# nightly pipeline
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
variables:
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: priority:low
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: priority:low-kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: priority:low-aarch64
JOB_PRIORITY: 45
# (some) nightly builds perform LTO, so they take much longer than the
# short timeout allowed in other pipelines.
# Note: 0 = infinity = gitlab's job `timeout:` applies, which is 1h
BUILD_JOB_TIMEOUT_OVERRIDE: 0
# pipeline for direct pushes that bypassed the CI
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $GITLAB_USER_LOGIN != "marge-bot"
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
JOB_PRIORITY: 40
JOB_PRIORITY: 70
# pipeline for direct pushes from release maintainer
- if: &is-staging-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
variables:
JOB_PRIORITY: 70
variables:
FDO_UPSTREAM_REPO: mesa/mesa
MESA_TEMPLATES_COMMIT: &ci-templates-commit e195d80f35b45cc73668be3767b923fd76c70ed5
MESA_TEMPLATES_COMMIT: &ci-templates-commit 48e4b6c9a2015f969fbe648999d16d5fb3eef6c4
CI_PRE_CLONE_SCRIPT: |-
set -o xtrace
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
@@ -67,7 +82,12 @@ variables:
rm download-git-cache.sh
set +o xtrace
S3_JWT_FILE: /s3_jwt
S3_JWT_FILE_SCRIPT: |-
echo -n '${S3_JWT}' > '${S3_JWT_FILE}' &&
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
S3_ANDROID_BUCKET: mesa-rootfs
# This bucket is used to fetch the kernel image
S3_KERNEL_BUCKET: mesa-rootfs
# Bucket for git cache
@@ -91,15 +111,20 @@ variables:
ARTIFACTS_BASE_URL: https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts
# Python scripts for structured logger
PYTHONPATH: "$PYTHONPATH:$CI_PROJECT_DIR/install"
# Drop once deqp-runner is upgraded to > 0.18.0
# No point in continuing once the device is lost
MESA_VK_ABORT_ON_DEVICE_LOSS: 1
# Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job log, hiding away useful output
MESA_SPIRV_LOG_LEVEL: error
# Default priority for non-merge pipelines
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64: "" # Empty tags are ignored by gitlab
FDO_RUNNER_JOB_PRIORITY_TAG_X86_64_KVM: kvm
FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64: aarch64
CI_TRON_JOB_PRIORITY_TAG: ci-tron:priority:low
JOB_PRIORITY: 50
DATA_STORAGE_PATH: data_storage
default:
timeout: 1m # catch any jobs which don't specify a timeout
id_tokens:
S3_JWT:
aud: https://s3.freedesktop.org
@@ -111,9 +136,8 @@ default:
- >
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" &&
. ${SCRIPTS_DIR}/setup-test-env.sh &&
echo -n "${S3_JWT}" > "${S3_JWT_FILE}" &&
unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
. ${SCRIPTS_DIR}/setup-test-env.sh
- eval "$S3_JWT_FILE_SCRIPT"
after_script:
# Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
@@ -196,6 +220,8 @@ include:
when: never
# Note: make sure the branches in this list are the same as in
# `.build-only-delayed-rules` below.
.container+build-rules:
rules:
- !reference [.common-rules, rules]
@@ -211,6 +237,7 @@ include:
- bin/git_sha1_gen.py
- bin/install_megadrivers.py
- bin/symbols-check.py
- bin/ci/**/*
# GitLab CI
- .gitlab-ci.yml
- .gitlab-ci/**/*
@@ -241,6 +268,9 @@ include:
# Build everything after someone bypassed the CI
- if: *is-direct-push
when: on_success
# Build everything when pushing to staging branches
- if: *is-staging-push
when: on_success
# Build everything in scheduled pipelines
- if: *is-scheduled-pipeline
when: on_success
@@ -248,10 +278,53 @@ include:
# manually triggered
- when: manual
# Repeat of the above but with `when: on_success` replaced with
# `when: delayed` + `start_in:`, for build-only jobs.
# Note: make sure the branches in this list are the same as in
# `.container+build-rules` above.
.build-only-delayed-rules:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
- !reference [.disable-farm-mr-rules, rules]
# Never run immediately after merging, as we just ran everything
- !reference [.never-post-merge-rules, rules]
# Build everything in merge pipelines, if any files affecting the pipeline
# were changed
- if: *is-merge-attempt
changes: *all_paths
when: delayed
start_in: &build-delay 5 minutes
# Same as above, but for pre-merge pipelines
- if: *is-pre-merge
changes: *all_paths
when: manual
# Skip everything for pre-merge and merge pipelines which don't change
# anything in the build
- if: *is-merge-attempt
when: never
- if: *is-pre-merge
when: never
# Build everything after someone bypassed the CI
- if: *is-direct-push
when: delayed
start_in: *build-delay
# Build everything when pushing to staging branches
- if: *is-staging-push
when: delayed
start_in: *build-delay
# Build everything in scheduled pipelines
- if: *is-scheduled-pipeline
when: delayed
start_in: *build-delay
# Allow building everything in fork pipelines, but build nothing unless
# manually triggered
- when: manual
.ci-deqp-artifacts:
artifacts:
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
untracked: false
paths:
@@ -260,6 +333,7 @@ include:
- artifacts
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log
# Git archive
@@ -269,24 +343,23 @@ make git archive:
stage: git-archive
rules:
- !reference [.scheduled_pipeline-rules, rules]
# ensure we are running on packet
tags:
- packet.net
script:
# Compactify the .git directory
- git gc --aggressive
# Download & cache the perfetto subproject as well.
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
# compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
- ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
- s3_upload ../$CI_PROJECT_NAME.tar.gz "https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/"
# Sanity checks of MR settings and commit logs
sanity:
extends:
- .fdo.ci-fairy
stage: sanity
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
rules:
- if: *is-pre-merge
when: on_success
@@ -327,14 +400,14 @@ sanity:
when: on_failure
reports:
junit: check-*.xml
tags:
- placeholder-job
mr-label-maker-test:
extends:
- .fdo.ci-fairy
stage: sanity
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
rules:
- !reference [.mr-label-maker-rules, rules]
variables:
@@ -350,9 +423,9 @@ mr-label-maker-test:
# Jobs that need to pass before spending hardware resources on further testing
.required-for-hardware-jobs:
needs:
- job: clang-format
optional: true
- job: rustfmt
optional: true
- job: toml-lint
artifacts: false
- job: yaml-toml-shell-py-test
optional: true
artifacts: false

33
.gitlab-ci/.flake8 Normal file
View File

@@ -0,0 +1,33 @@
[flake8]
exclude = .venv*,
# PEP 8 Style Guide limits line length to 79 characters
max-line-length = 159
ignore =
# continuation line under-indented for hanging indent
E121
# continuation line over-indented for hanging indent
E126,
# continuation line under-indented for visual indent
E128,
# whitespace before ':'
E203,
# missing whitespace around arithmetic operator
E226,
# missing whitespace after ','
E231,
# expected 2 blank lines, found 1
E302,
# too many blank lines
E303,
# imported but unused
F401,
# f-string is missing placeholders
F541,
# local variable assigned to but never used
F841,
# line break before binary operator
W503,
# line break after binary operator
W504,

View File

@@ -85,3 +85,31 @@ wayland-dEQP-EGL.functional.render.multi_thread.gles2_gles3.other
# Vulkan loader in Debian is too old
dEQP-VK.api.get_device_proc_addr.non_enabled
dEQP-VK.api.version_check.unavailable_entry_points
# These tests are flaking too much recently on almost all drivers, so better skip them until the cause is identified
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT
# These tests attempt to read from the front buffer after a swap. They are skipped
# on both X11 and gbm, but for different reasons:
#
# On X11: Given that we run piglit tests in parallel in Mesa CI, and don't have a
# compositor running, the frontbuffer reads may end up with undefined results from
# windows overlapping us.
# Piglit does mark these tests as not to be run in parallel, but deqp-runner
# doesn't respect that. We need to extend deqp-runner to allow some tests to be
# marked as single-threaded and run after the rayon loop if we want to support
# them.
# Other front-buffer access tests like fbo-sys-blit, fbo-sys-sub-blit, or
# fcc-front-buffer-distraction don't appear here, because the DRI3 fake-front
# handling should be holding the pixels drawn by the test even if we happen to fail
# GL's window system pixel occlusion test.
# Note that glx skips don't appear here, they're in all-skips.txt (in case someone
# sets PIGLIT_PLATFORM=gbm to mostly use gbm, but still has an X server running).
#
# On gbm: gbm does not support reading the front buffer after a swapbuffers, and
# that's intentional. Don't bother running these tests when PIGLIT_PLATFORM=gbm.
# Note that this doesn't include tests like fbo-sys-blit, which draw/read front
# but don't swap.
spec@!opengl 1.0@gl-1.0-swapbuffers-behavior
spec@!opengl 1.1@read-front

View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
export PATH=/android-tools/android-cts/jdk/bin/:/android-tools/build-tools:$PATH
export JAVA_HOME=/android-tools/android-cts/jdk
# Wait for the appops service to show up
while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done
SKIP_FILE="$INSTALL/${GPU_VERSION}-android-cts-skips.txt"
EXCLUDE_FILTERS=""
if [ -e "$SKIP_FILE" ]; then
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -s 's/.*/--exclude-filter "\0" /g')"
fi
INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
if [ -e "$INCLUDE_FILE" ]; then
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -s 's/.*/--include-filter "\0" /g')"
else
INCLUDE_FILTERS=$(printf -- "--include-filter %s " $ANDROID_CTS_MODULES | sed -e 's/ $//g')
fi
set +e
eval "/android-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
$EXCLUDE_FILTERS \
$INCLUDE_FILTERS
[ "$(grep "^FAILED" /android-tools/android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ]
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
cp -r "/android-tools/android-cts/results/latest"/* $RESULTS_DIR
cp -r "/android-tools/android-cts/logs/latest"/* $RESULTS_DIR
section_end cuttlefish_results

View File

@@ -0,0 +1,96 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
# deqp
$ADB shell mkdir -p /data/deqp
$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
$ADB push /deqp-gles/mustpass/egl-main.txt.zst /data/deqp
$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
$ADB push /deqp-tools/* /data/deqp
$ADB push /deqp-runner/deqp-runner /data/deqp
$ADB push "$INSTALL/all-skips.txt" /data/deqp
$ADB push "$INSTALL/angle-skips.txt" /data/deqp
if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-fails.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-skips.txt" /data/deqp
fi
$ADB push "$INSTALL/deqp-$DEQP_SUITE.toml" /data/deqp
BASELINE=""
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
BASELINE="--baseline /data/deqp/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
fi
if [ -n "$ANGLE_TAG" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
fi
AOSP_RESULTS=/data/deqp/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
set +e
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
XDG_CACHE_HOME=/data/local/tmp \
./deqp-runner \
suite \
--suite /data/deqp/deqp-$DEQP_SUITE.toml \
--output $AOSP_RESULTS \
--skips /data/deqp/all-skips.txt $DEQP_SKIPS \
--flakes /data/deqp/$GPU_VERSION-flakes.txt \
--testlog-to-xml /data/deqp/testlog-to-xml \
--shader-cache-dir /data/local/tmp \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$BASELINE \
${DEQP_RUNNER_MAX_FAILS:+--max-fails \"$DEQP_RUNNER_MAX_FAILS\"} \
"
# shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one
EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
$ADB pull "$AOSP_RESULTS/." "$RESULTS_DIR"
# Remove all but the first 50 individual XML files uploaded as artifacts, to
# save fd.o space when you break everything.
find $RESULTS_DIR -name \*.xml | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
$ADB shell "cd ${AOSP_RESULTS}/..; \
./deqp-runner junit \
--testsuite dEQP \
--results $AOSP_RESULTS/failures.csv \
--output $AOSP_RESULTS/junit.xml \
--limit 50 \
--template \"See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml\""
$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
section_end cuttlefish_results

118
.gitlab-ci/android-runner.sh Executable file
View File

@@ -0,0 +1,118 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
# Set default ADB command if not set already
: "${ADB:=adb}"
$ADB wait-for-device root
sleep 1
# overlay
REMOUNT_PATHS="/vendor"
if [ "$ANDROID_VERSION" -ge 15 ]; then
REMOUNT_PATHS="$REMOUNT_PATHS /system"
fi
OV_TMPFS="/data/overlay-remount"
$ADB shell mkdir -p "$OV_TMPFS"
$ADB shell mount -t tmpfs none "$OV_TMPFS"
for path in $REMOUNT_PATHS; do
$ADB shell mkdir -p "${OV_TMPFS}${path}-upper"
$ADB shell mkdir -p "${OV_TMPFS}${path}-work"
opts="lowerdir=${path},upperdir=${OV_TMPFS}${path}-upper,workdir=${OV_TMPFS}${path}-work"
$ADB shell mount -t overlay -o "$opts" none ${path}
done
$ADB shell setenforce 0
# download Android Mesa from S3
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
mkdir /mesa-android
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" &
INSTALL="/mesa-android/install"
# replace libraries
$ADB shell rm -f /vendor/lib64/libgallium_dri.so*
$ADB shell rm -f /vendor/lib64/egl/libEGL_mesa.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_mesa.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_mesa.so*
$ADB push "$INSTALL/lib/libgallium_dri.so" /vendor/lib64/libgallium_dri.so
$ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
$ADB shell rm -f /vendor/lib64/hw/vulkan.lvp.so*
$ADB shell rm -f /vendor/lib64/hw/vulkan.virtio.so*
$ADB shell rm -f /vendor/lib64/hw/vulkan.intel.so*
$ADB push "$INSTALL/lib/libvulkan_lvp.so" /vendor/lib64/hw/vulkan.lvp.so
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
$ADB push "$INSTALL/lib/libvulkan_intel.so" /vendor/lib64/hw/vulkan.intel.so
$ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so*
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so*
ANGLE_DEST_PATH=/vendor/lib64/egl
if [ "$ANDROID_VERSION" -ge 15 ]; then
ANGLE_DEST_PATH=/system/lib64
fi
$ADB shell rm -f "$ANGLE_DEST_PATH/libEGL_angle.so"*
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"*
$ADB shell rm -f "$ANGLE_DEST_PATH/libGLESv2_angle.so"*
$ADB push /angle/libEGL_angle.so "$ANGLE_DEST_PATH/libEGL_angle.so"
$ADB push /angle/libGLESv1_CM_angle.so "$ANGLE_DEST_PATH/libGLESv1_CM_angle.so"
$ADB push /angle/libGLESv2_angle.so "$ANGLE_DEST_PATH/libGLESv2_angle.so"
get_gles_runtime_version() {
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
$ADB shell dumpsys SurfaceFlinger | grep GLES
}
# Check what GLES implementation is used before loading the new libraries
get_gles_runtime_version
# restart Android shell, so that services use the new libraries
$ADB shell stop
$ADB shell start
# Check what GLES implementation is used after loading the new libraries
GLES_RUNTIME_VERSION="$(get_gles_runtime_version)"
if [ -n "$ANGLE_TAG" ]; then
# Note: we are injecting the ANGLE libs too, so we need to check if the
# ANGLE libs are being used after the shell restart.
ANGLE_HASH=$(head -c 12 /angle/version)
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${ANGLE_HASH}"; then
echo "Fatal: Android is loading a wrong version of the ANGLE libs: ${ANGLE_HASH}" 1>&2
exit 1
fi
else
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
if ! printf "%s" "$GLES_RUNTIME_VERSION" | grep --quiet "${MESA_BUILD_VERSION}$"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D GLES libs: ${GLES_RUNTIME_VERSION}" 1>&2
exit 1
fi
fi
if [ -n "$USE_ANDROID_CTS" ]; then
# The script sets EXIT_CODE
. "$(dirname "$0")/android-cts-runner.sh"
else
# The script sets EXIT_CODE
. "$(dirname "$0")/android-deqp-runner.sh"
fi
exit $EXIT_CODE

View File

@@ -2,47 +2,67 @@ version: 1
# Rules to match for a machine to qualify
target:
id: '{{ ci_runner_id }}'
id: '{{ CI_RUNNER_DESCRIPTION }}'
timeouts:
first_console_activity: # This limits the time it can take to receive the first console log
minutes: {{ timeout_first_console_activity_minutes | default(0, true) }}
seconds: {{ timeout_first_console_activity_seconds | default(0, true) }}
retries: {{ timeout_first_console_activity_retries }}
minutes: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_FIRST_CONSOLE_ACTIVITY_RETRIES }}
console_activity: # Reset every time we receive a message from the logs
minutes: {{ timeout_console_activity_minutes | default(0, true) }}
seconds: {{ timeout_console_activity_seconds | default(0, true) }}
retries: {{ timeout_console_activity_retries }}
minutes: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_CONSOLE_ACTIVITY_RETRIES }}
boot_cycle:
minutes: {{ timeout_boot_minutes | default(0, true) }}
seconds: {{ timeout_boot_seconds | default(0, true) }}
retries: {{ timeout_boot_retries }}
minutes: {{ B2C_TIMEOUT_BOOT_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_BOOT_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_BOOT_RETRIES }}
overall: # Maximum time the job can take, not overrideable by the "continue" deployment
minutes: {{ timeout_overall_minutes | default(0, true) }}
seconds: {{ timeout_overall_seconds | default(0, true) }}
minutes: {{ B2C_TIMEOUT_OVERALL_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_OVERALL_SECONDS | default(0, true) }}
retries: 0
# no retries possible here
watchdogs:
boot:
minutes: {{ B2C_TIMEOUT_BOOT_WD_MINUTES | default(0, true) }}
seconds: {{ B2C_TIMEOUT_BOOT_WD_SECONDS | default(0, true) }}
retries: {{ B2C_TIMEOUT_BOOT_WD_RETRIES | default(0, true) }}
console_patterns:
session_end:
regex: >-
{{ session_end_regex }}
{% if session_reboot_regex %}
{{ B2C_SESSION_END_REGEX }}
{% if B2C_SESSION_REBOOT_REGEX %}
session_reboot:
regex: >-
{{ session_reboot_regex }}
{{ B2C_SESSION_REBOOT_REGEX }}
{% endif %}
job_success:
regex: >-
{{ job_success_regex }}
{% if job_warn_regex %}
{{ B2C_JOB_SUCCESS_REGEX }}
{% if B2C_JOB_WARN_REGEX %}
job_warn:
regex: >-
{{ job_warn_regex }}
{{ B2C_JOB_WARN_REGEX }}
{% endif %}
{% if B2C_BOOT_WD_START_REGEX and B2C_BOOT_WD_STOP_REGEX %}
watchdogs:
boot:
start:
regex: >-
{{ B2C_BOOT_WD_START_REGEX }}
reset:
regex: >-
{{ B2C_BOOT_WD_RESET_REGEX | default(B2C_BOOT_WD_START_REGEX, true) }}
stop:
regex: >-
{{ B2C_BOOT_WD_STOP_REGEX }}
{% endif %}
# Environment to deploy
@@ -50,20 +70,49 @@ deployment:
# Initial boot
start:
storage:
{% if B2C_IMAGESTORE_PLATFORM %}
imagestore:
public:
# List of images that should be pulled into the image store ahead of execution
images:
mars:
name: "{{ B2C_MACHINE_REGISTRATION_IMAGE }}"
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
tls_verify: false
{% set machine_registration_image="{% raw %}{{ job.imagestore.public.mars.image_id }}{% endraw %}" %}
telegraf:
name: "{{ B2C_TELEGRAF_IMAGE }}"
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
tls_verify: false
{% set telegraf_image="{% raw %}{{ job.imagestore.public.telegraf.image_id }}{% endraw %}" %}
image_under_test:
name: "{{ B2C_IMAGE_UNDER_TEST }}"
platform: "{{ B2C_IMAGESTORE_PLATFORM }}"
tls_verify: false
{% set image_under_test="{% raw %}{{ job.imagestore.public.image_under_test.image_id }}{% endraw %}" %}
nbd:
storage:
max_connections: 5
size: 10G
{% endif %}
http:
- path: "/install.tar.zst"
url: "{{ B2C_INSTALL_TARBALL_URL }}"
- path: "/b2c-extra-args"
data: >
b2c.pipefail b2c.poweroff_delay={{ poweroff_delay }}
b2c.pipefail b2c.poweroff_delay={{ B2C_POWEROFF_DELAY }}
b2c.minio="gateway,{{ '{{' }} minio_url }},{{ '{{' }} job_bucket_access_key }},{{ '{{' }} job_bucket_secret_key }}"
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in job_volume_exclusions %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
{% for volume in volumes %}
b2c.volume="{{ '{{' }} job_bucket }}-results,mirror=gateway/{{ '{{' }} job_bucket }},pull_on=pipeline_start,push_on=changes,overwrite{% for excl in B2C_JOB_VOLUME_EXCLUSIONS.split(',') %},exclude={{ excl }}{% endfor %},remove,expiration=pipeline_end,preserve"
{% for volume in B2C_VOLUMES %}
b2c.volume={{ volume }}
{% endfor %}
b2c.service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/telegraf:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.container="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd | replace('"', '\\\"') }}"
b2c.run_service="--privileged --tls-verify=false --pid=host {{ B2C_TELEGRAF_IMAGE }}" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.run="-ti --tls-verify=false {{ B2C_MACHINE_REGISTRATION_IMAGE }} {% if B2C_MARS_SETUP_TAGS %}setup --tags {{ B2C_MARS_SETUP_TAGS }}{% else %}check{% endif %}"
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ CI_PROJECT_DIR }} -w {{ CI_PROJECT_DIR }} {% for mount_volume in B2C_MOUNT_VOLUMES %} -v {{ mount_volume }}{% endfor %} --tls-verify=false --entrypoint bash {{ B2C_IMAGE_UNDER_TEST }} -euc 'curl --fail -q {{ '{{' }} job.http.url }}/install.tar.zst | tar --zstd -x; {{ B2C_CONTAINER_CMD }}'"
kernel:
{% if kernel_url %}
url: '{{ kernel_url }}'
{% if B2C_KERNEL_URL %}
url: '{{ B2C_KERNEL_URL }}'
{% endif %}
# NOTE: b2c.cache_device should not be here, but this works around
@@ -71,18 +120,36 @@ deployment:
cmdline: >
SALAD.machine_id={{ '{{' }} machine_id }}
console={{ '{{' }} local_tty_device }},115200
b2c.cache_device=auto b2c.ntp_peer=10.42.0.1
b2c.ntp_peer=10.42.0.1
b2c.extra_args_url={{ '{{' }} job.http.url }}/b2c-extra-args
{% if kernel_cmdline_extras is defined %}
{{ kernel_cmdline_extras }}
{% if B2C_IMAGESTORE_PLATFORM is defined %}
{{ '{{' }} imagestore.mount("public").nfs.to_b2c_filesystem("publicimgstore") }}
b2c.storage="additionalimagestores=publicimgstore"
b2c.nbd=/dev/nbd0,host=ci-gateway,port={% raw %}{{ '{{' }} job.nbd.storage.tcp_port }}{% endraw %},connections=5
b2c.cache_device=/dev/nbd0
{% else %}
b2c.cache_device=auto
{% endif %}
{% if B2C_KERNEL_CMDLINE_EXTRAS is defined %}
{{ B2C_KERNEL_CMDLINE_EXTRAS }}
{% endif %}
{% if initramfs_url %}
{% if B2C_INITRAMFS_URL or B2C_FIRMWARE_URL %}
initramfs:
url: '{{ initramfs_url }}'
{% if B2C_FIRMWARE_URL %}
- url: '{{ B2C_FIRMWARE_URL }}'
{% endif %}
{% if B2C_INITRAMFS_URL %}
- url: '{{ B2C_INITRAMFS_URL }}'
{% endif %}
{% endif %}
{% if dtb_url %}
{% if B2C_DTB_URL %}
dtb:
url: '{{ dtb_url }}'
url: '{{ B2C_DTB_URL }}'
{% if B2C_DTB_MATCH %}
format:
archive:
match: "{{ B2C_DTB_MATCH }}"
{% endif %}
{% endif %}

View File

@@ -25,31 +25,16 @@ from jinja2 import Environment, FileSystemLoader
from os import environ, path
# Pass all the environment variables prefixed by B2C_
# Pass through all the CI and B2C environment variables
values = {
key.removeprefix("B2C_").lower(): environ[key]
for key in environ if key.startswith("B2C_")
key: environ[key]
for key in environ if key.startswith("B2C_") or key.startswith("CI_")
}
env = Environment(loader=FileSystemLoader(path.dirname(values['job_template'])),
env = Environment(loader=FileSystemLoader(path.dirname(environ['B2C_JOB_TEMPLATE'])),
trim_blocks=True, lstrip_blocks=True)
template = env.get_template(path.basename(values['job_template']))
template = env.get_template(path.basename(environ['B2C_JOB_TEMPLATE']))
values['ci_job_id'] = environ['CI_JOB_ID']
values['ci_runner_id'] = environ['CI_RUNNER_ID']
values['job_volume_exclusions'] = [excl for excl in values['job_volume_exclusions'].split(",") if excl]
values['working_dir'] = environ['CI_PROJECT_DIR']
# Use the gateway's pull-through registry caches to reduce load on fd.o.
values['local_container'] = environ['IMAGE_UNDER_TEST']
values['local_container'] = values['local_container'].replace(
'registry.freedesktop.org',
'{{ fdo_proxy_registry }}'
)
if 'kernel_cmdline_extras' not in values:
values['kernel_cmdline_extras'] = ''
with open(path.splitext(path.basename(values['job_template']))[0], "w") as f:
with open(path.splitext(path.basename(environ['B2C_JOB_TEMPLATE']))[0], "w") as f:
f.write(template.render(values))

View File

@@ -82,11 +82,7 @@ else
# Finally, pack it up into a cpio rootfs. Skip the vulkan CTS since none of
# these devices use it and it would take up space in the initrd.
if [ -n "$PIGLIT_PROFILES" ]; then
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
else
EXCLUDE_FILTER="piglit|python"
fi
EXCLUDE_FILTER="deqp|arb_gpu_shader5|arb_gpu_shader_fp64|arb_gpu_shader_int64|glsl-4.[0123456]0|arb_tessellation_shader"
pushd rootfs
find -H . | \

View File

@@ -17,16 +17,13 @@ cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
date +'%F %T'
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
cp $CI_COMMON/intel-gpu-freq.sh $rootfs_dst/
cp $CI_COMMON/kdl.sh $rootfs_dst/
cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
set +x
# Pass through relevant env vars from the gitlab job to the baremetal init script
echo "Variables passed through:"
"$CI_COMMON"/generate-env.sh | tee $rootfs_dst/set-job-env-vars.sh
"$CI_COMMON"/export-gitlab-job-env-for-dut.sh | tee $rootfs_dst/set-job-env-vars.sh
set -x

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang++-15
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang++
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang-15
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=g++
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=gcc
. compiler-wrapper.sh

View File

@@ -1,21 +0,0 @@
# shellcheck disable=SC1091
# shellcheck disable=SC2086 # we want word splitting
if command -V ccache >/dev/null 2>/dev/null; then
CCACHE=ccache
else
CCACHE=
fi
if echo "$@" | grep -E 'meson-private/tmp[^ /]*/testfile.c' >/dev/null; then
# Invoked for meson feature check
exec $CCACHE $_COMPILER "$@"
fi
if [ "$(eval printf "'%s'" "\"\${$(($#-1))}\"")" = "-c" ]; then
# Not invoked for linking
exec $CCACHE $_COMPILER "$@"
fi
# Compiler invoked by ninja for linking. Add -Werror to turn compiler warnings into errors
# with LTO. (meson's werror should arguably do this, but meanwhile we need to)
exec $CCACHE $_COMPILER "$@" -Werror

View File

@@ -4,24 +4,34 @@
# 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
timeout: 1h
# 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: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
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
@@ -53,74 +63,51 @@
paths:
- subprojects/packagecache
.meson-build:
.meson-build-for-tests:
extends:
- .build-linux
- .use-debian/x86_64_build
stage: build-only
variables:
LLVM_VERSION: 15
stage: build-for-tests
script:
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} .gitlab-ci/meson/build.sh
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} bash --login .gitlab-ci/meson/build.sh
- .gitlab-ci/prepare-artifacts.sh
# Make sure this list stays the same as all the jobs with
# `stage: build-for-tests`, except for the windows job as
# explained below.
.build-for-tests-jobs:
- job: debian-testing
optional: true
- job: debian-testing-asan
optional: true
- job: debian-build-testing
optional: true
- job: debian-arm32
optional: true
- job: debian-arm32-asan
optional: true
- job: debian-arm64
optional: true
- job: debian-arm64-asan
optional: true
# Windows runners don't have more than one build right now, so there is
# no need to wait on the "first one" to be done.
# - job: windows-msvc
# optional: true
- job: python-test
optional: true
.meson-build-only:
extends:
- .meson-build-for-tests
- .build-only-delayed-rules
stage: build-only
script:
- *meson-build
debian-testing:
extends:
- .meson-build
- .meson-build-for-tests
- .use-debian/x86_64_build
- .build-run-long # but it really shouldn't! tracked in mesa#12544
- .ci-deqp-artifacts
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D gbm=enabled
-D glvnd=disabled
-D glx=dri
-D platforms=x11,wayland
GALLIUM_ST: >
-D gallium-nine=true
-D gallium-va=enabled
-D gallium-nine=false
-D gallium-rusticl=true
GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,crocus,iris,i915,r300,svga"
VULKAN_DRIVERS: "swrast,amd,intel,intel_hasvk,virtio,nouveau"
-D gallium-va=enabled
GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,iris,svga"
VULKAN_DRIVERS: "swrast,amd,intel,virtio"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D intel-elk=false
-D spirv-to-dxil=true
-D valgrind=disabled
-D perfetto=true
-D tools=drm-shim
-D valgrind=disabled
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
LLVM_VERSION: 15
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
RUN_MESON_TESTS: "false" # debian-build-testing already runs these
artifacts:
reports:
junit: artifacts/ci_scripts_report.xml
@@ -128,45 +115,54 @@ debian-testing:
debian-testing-asan:
extends:
- debian-testing
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "swrast"
GALLIUM_DRIVERS: "llvmpipe,softpipe"
C_ARGS: >
-Wno-error=stringop-truncation
EXTRA_OPTION: >
-D b_sanitize=address
-D valgrind=disabled
-D gallium-va=false
-D gallium-nine=false
-D gallium-rusticl=false
-D mesa-clc=system
-D tools=dlclose-skip
-D intel-clc=system
-D valgrind=disabled
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Do a host build for intel-clc (asan complains not being loaded
# as the first library)
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 vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D install-mesa-clc=true
-D mesa-clc=enabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D video-codecs=
-D vulkan-drivers=
debian-testing-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 intel-clc=system
-D mesa-clc=system
-D precomp-compiler=system
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Don't run all the tests yet:
@@ -175,8 +171,9 @@ 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
# Do a host build for intel-clc (msan complains about
# uninitialized values in the LLVM libs)
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
@@ -186,14 +183,52 @@ debian-testing-msan:
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D mesa-clc=enabled
-D install-mesa-clc=true
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
debian-testing-ubsan:
extends:
- debian-testing
- .meson-build-for-tests
- .build-run-long
variables:
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
CPP_ARGS: >
-Wno-error=array-bounds
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
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=
-D video-codecs=
-D glx=disabled
-D platforms=
-D mesa-clc=enabled
-D install-mesa-clc=true
debian-build-testing:
extends: .meson-build
stage: build-for-tests
extends:
- .meson-build-for-tests
- .use-debian/x86_64_build
variables:
BUILDTYPE: debug
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
@@ -201,65 +236,29 @@ debian-build-testing:
-D egl=enabled
-D glvnd=disabled
-D platforms=x11,wayland
-D legacy-x11=dri2
GALLIUM_ST: >
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
-D gallium-nine=true
-D gallium-rusticl=false
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: swrast
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"
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
LLVM_VERSION: 15
-D perfetto=true
S3_ARTIFACT_NAME: debian-build-testing
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
shader-db:
stage: code-validation
extends:
- .use-debian/x86_64_build
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.core-rules, rules]
# Keep this list in sync with the drivers tested in run-shader-db.sh
- !reference [.freedreno-common-rules, rules]
- !reference [.intel-common-rules, rules]
- !reference [.lima-rules, rules]
- !reference [.v3d-rules, rules]
- !reference [.vc4-rules, rules]
- !reference [.nouveau-rules, rules]
- !reference [.r300-rules, rules]
# Also run if this job's own config or script changes
- changes:
- .gitlab-ci/build/gitlab-ci.yml
- .gitlab-ci/run-shader-db.sh
needs:
- debian-build-testing
variables:
S3_ARTIFACT_NAME: debian-build-testing
before_script:
- !reference [.download_s3, before_script]
script: |
.gitlab-ci/run-shader-db.sh
artifacts:
paths:
- shader-db
timeout: 15m
# Test a release build with -Werror so new warnings don't sneak in.
debian-release:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
extends:
- .meson-build-only
- .use-debian/x86_64_build
variables:
LLVM_VERSION: 15
UNWIND: "enabled"
C_ARGS: >
-Wno-error=stringop-overread
@@ -277,13 +276,13 @@ debian-release:
-D gallium-nine=false
-D gallium-rusticl=false
-D llvm=enabled
GALLIUM_DRIVERS: "i915,iris,nouveau,freedreno,r300,svga,llvmpipe,softpipe,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus"
VULKAN_DRIVERS: "amd,imagination-experimental,microsoft-experimental"
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 intel-clc=enabled
-D mesa-clc=enabled
-D precomp-compiler=enabled
-D intel-rt=enabled
-D imagination-srv=true
BUILDTYPE: "release"
@@ -294,19 +293,16 @@ debian-release:
alpine-build-testing:
extends:
- .meson-build
- .meson-build-only
- .use-alpine/x86_64_build
needs:
- !reference [.use-alpine/x86_64_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: "release"
C_ARGS: >
-Wno-error=cpp
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=misleading-indentation
DRI_LOADERS: >
-D glx=disabled
-D gbm=enabled
@@ -328,31 +324,29 @@ 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, verify after bump to F39
# array-bounds are pure non-LTO gcc buggy warning
# maybe-uninitialized is misfiring in nir_lower_gs_intrinsics.c, and
# a "maybe" warning should never be an error anyway.
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=array-bounds
-Wno-error=maybe-uninitialized
CPP_ARGS: >
-Wno-error=dangling-reference
-Wno-error=overloaded-virtual
C_LINK_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
CPP_LINK_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -360,7 +354,6 @@ fedora-release:
-D glvnd=enabled
-D platforms=x11,wayland
EXTRA_OPTION: >
-D osmesa=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
-D vulkan-layers=device-select,overlay
-D intel-rt=enabled
@@ -379,18 +372,16 @@ fedora-release:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
LLVM_VERSION: ""
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
debian-android:
extends:
- .android-variables
- .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"
@@ -411,20 +402,21 @@ debian-android:
-D egl=enabled
-D glvnd=disabled
-D platforms=android
FORCE_FALLBACK_FOR: llvm
EXTRA_OPTION: >
-D android-stub=true
-D llvm=disabled
-D platform-sdk-version=33
-D platform-sdk-version=${ANDROID_SDK_VERSION}
-D cpp_rtti=false
-D valgrind=disabled
-D android-libbacktrace=disabled
-D intel-clc=system
-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
LLVM_VERSION: "15"
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
HOST_BUILD_OPTIONS: >
-D build-tests=false
@@ -435,29 +427,37 @@ debian-android:
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
ARTIFACTS_DEBUG_SYMBOLS: 1
-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-x86_64-android-${BUILDTYPE}
script:
# 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
- export VULKAN_DRIVERS=intel,virtio,swrast
- .gitlab-ci/create-llvm-meson-wrap-file.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
# remove all the files created by the previous build before the next build
- git clean -dxf .
# aarch64 build:
# build-only, to catch compilation regressions
# without calling .gitlab-ci/prepare-artifacts.sh so that the
# artifacts are not shipped in mesa-x86_64-android-${BUILDTYPE}
- export CROSS=aarch64-linux-android
- export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d
- export VULKAN_DRIVERS=freedreno,broadcom,virtio
- *meson-build
# x86_64 build:
# Can't do Intel because gen_decoder.c currently requires libexpat, which
# is not a dependency that AOSP wants to accept. Can't do Radeon Gallium
# drivers because they requires LLVM, which we don't have an Android build
# of.
- export CROSS=x86_64-linux-android
- export GALLIUM_DRIVERS=iris,virgl
- export VULKAN_DRIVERS=amd,intel
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
.meson-cross:
extends:
- .meson-build
- .meson-build-only
- .use-debian/x86_64_build
variables:
UNWIND: "disabled"
DRI_LOADERS: >
@@ -465,7 +465,6 @@ debian-android:
-D gbm=enabled
-D egl=enabled
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
-D gallium-vdpau=disabled
-D gallium-va=disabled
@@ -476,43 +475,56 @@ debian-android:
extends:
- .meson-cross
- .use-debian/arm64_build
needs:
- debian/arm64_build
variables:
VULKAN_DRIVERS: asahi,freedreno,broadcom
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:
-D glvnd=disabled
# remove asahi & llvmpipe from the .meson-arm list because here we have llvm=disabled
VULKAN_DRIVERS: freedreno,broadcom
VULKAN_DRIVERS: "broadcom,freedreno"
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,softpipe,tegra,v3d,vc4,zink"
EXTRA_OPTION: >
-D llvm=disabled
-D valgrind=disabled
-D gallium-rusticl=false
-D mesa-clc=system
-D precomp-compiler=system
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D platforms=
-D mesa-clc=enabled
-D install-mesa-clc=true
-D precomp-compiler=enabled
-D install-precomp-compiler=true
-D tools=panfrost
S3_ARTIFACT_NAME: mesa-arm32-default-${BUILDTYPE}
# The strip command segfaults, failing to strip the binary and leaving
# tempfiles in our artifacts.
ARTIFACTS_DEBUG_SYMBOLS: 1
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
debian-arm32-asan:
extends:
- debian-arm32
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
GALLIUM_DRIVERS: "etnaviv"
VULKAN_DRIVERS: ""
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@@ -520,71 +532,94 @@ debian-arm32-asan:
-D b_sanitize=address
-D valgrind=disabled
-D tools=dlclose-skip
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm32-asan-${BUILDTYPE}
MESON_TEST_ARGS: "--no-suite mesa:compiler --no-suite mesa:util"
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
VULKAN_DRIVERS: "asahi,freedreno,broadcom,panfrost,imagination-experimental"
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D valgrind=disabled
-D imagination-srv=true
-D perfetto=true
-D freedreno-kmds=msm,virtio
-D teflon=true
GALLIUM_ST:
-D gallium-rusticl=true
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
debian-arm64-asan:
extends:
- debian-arm64
stage: build-for-tests
- .meson-build-for-tests
- .build-run-long
variables:
VULKAN_DRIVERS: "broadcom,freedreno"
GALLIUM_DRIVERS: "freedreno,vc4,v3d"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D b_sanitize=address
-D valgrind=disabled
-D tools=dlclose-skip
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
MESON_TEST_ARGS: "--no-suite mesa:compiler"
debian-arm64-ubsan:
extends:
- debian-arm64
- .meson-build-for-tests
- .build-run-long
variables:
VULKAN_DRIVERS: "broadcom"
GALLIUM_DRIVERS: "v3d,vc4"
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
CPP_ARGS: >
-Wno-error=array-bounds
-fno-var-tracking-assignments
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D b_sanitize=undefined
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
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,nouveau"
VULKAN_DRIVERS: "amd,asahi,imagination-experimental,nouveau"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-Dtools=panfrost,imagination
-D tools=panfrost,imagination
-D perfetto=true
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}
@@ -599,10 +634,7 @@ debian-arm64-release:
debian-no-libdrm:
extends:
- .meson-arm
stage: build-only
needs:
- !reference [.meson-arm, needs]
- !reference [.build-for-tests-jobs]
- .meson-build-only
variables:
VULKAN_DRIVERS: freedreno
GALLIUM_DRIVERS: "zink,llvmpipe"
@@ -616,15 +648,14 @@ debian-no-libdrm:
-D glx=disabled
-D gbm=disabled
-D egl=disabled
-D perfetto=true
debian-clang:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
extends:
- .meson-build-only
- .use-debian/x86_64_build
variables:
BUILDTYPE: debug
LLVM_VERSION: 15
UNWIND: "enabled"
C_ARGS: >
-Wno-error=constant-conversion
@@ -637,6 +668,7 @@ debian-clang:
-Wno-error=overloaded-virtual
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=unused-private-field
-Wno-error=vla-cxx-extension
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -654,18 +686,17 @@ debian-clang:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D opencl-spirv=true
-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 intel-clc=enabled
-D mesa-clc=enabled
-D precomp-compiler=enabled
-D intel-rt=enabled
-D imagination-srv=true
-D teflon=true
@@ -673,10 +704,11 @@ debian-clang:
CXX: clang++-${LLVM_VERSION}
debian-clang-release:
extends: debian-clang
# `needs:` inherited from debian-clang
extends:
- debian-clang
- .meson-build-only
- .build-run-long
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: "release"
DRI_LOADERS: >
-D glx=xlib
@@ -692,8 +724,6 @@ debian-clang-release:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D opencl-spirv=true
-D shared-glapi=disabled
windows-msvc:
extends:
@@ -709,14 +739,11 @@ 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
LLVM_VERSION: 15
UNWIND: "disabled"
DRI_LOADERS: >
-D glx=disabled
@@ -727,7 +754,6 @@ debian-vulkan:
-D gles2=disabled
-D glvnd=disabled
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
-D gallium-vdpau=disabled
-D gallium-va=disabled
@@ -741,6 +767,7 @@ debian-vulkan:
VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination-experimental,microsoft-experimental,nouveau
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D build-radv-tests=true
-D build-aco-tests=true
-D intel-rt=disabled
-D imagination-srv=true
@@ -749,20 +776,22 @@ 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
VULKAN_DRIVERS: intel,amd,swrast,virtio
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,llvmpipe,softpipe,virgl,zink,crocus,d3d12"
LLVM_VERSION: 15
VULKAN_DRIVERS: intel,amd,swrast,virtio,panfrost
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,llvmpipe,softpipe,virgl,zink,crocus,d3d12,panfrost"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D intel-clc=system
-D mesa-clc=system
C_LINK_ARGS: >
-Wl,--no-warn-rwx-segments
CPP_LINK_ARGS: >
-Wl,--no-warn-rwx-segments
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
@@ -772,8 +801,8 @@ debian-x86_32:
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D mesa-clc=enabled
-D install-mesa-clc=true
# While s390 is dead, s390x is very much alive, and one of the last major
# big-endian platforms, so it provides useful coverage.
@@ -782,16 +811,13 @@ 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
GALLIUM_DRIVERS: "llvmpipe,virgl,zink"
LLVM_VERSION: 15
VULKAN_DRIVERS: "swrast,virtio"
DRI_LOADERS:
-D glvnd=disabled
@@ -800,28 +826,26 @@ 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 tests our Python scripts, and also emits our scripts into
# artifacts, so they can be reused for job submission to hardware devices.
python-test:
# 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
- .meson-build-for-tests
variables:
GIT_STRATEGY: fetch
S3_ARTIFACT_NAME: mesa-python-test
S3_ARTIFACT_NAME: mesa-python-ci-artifacts
timeout: 10m
script:
- .gitlab-ci/run-pytest.sh
- .gitlab-ci/prepare-artifacts-python.sh

View File

@@ -2,6 +2,9 @@
VARS=(
ACO_DEBUG
ANGLE_TAG
ANGLE_TRACE_FILES_TAG
ANV_DEBUG
ARTIFACTS_BASE_URL
ASAN_OPTIONS
BASE_SYSTEM_FORK_HOST_PREFIX
@@ -10,9 +13,8 @@ VARS=(
CI_COMMIT_REF_NAME
CI_COMMIT_TITLE
CI_JOB_ID
S3_JWT_FILE
CI_JOB_STARTED_AT
CI_JOB_NAME
CI_JOB_STARTED_AT
CI_JOB_URL
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
CI_MERGE_REQUEST_TITLE
@@ -31,24 +33,23 @@ VARS=(
CROSVM_GPU_ARGS
CURRENT_SECTION
DEQP_BIN_DIR
DEQP_CONFIG
DEQP_EXPECTED_RENDERER
DEQP_FORCE_ASAN
DEQP_FRACTION
DEQP_HEIGHT
DEQP_RUNNER_MAX_FAILS
DEQP_RUNNER_OPTIONS
DEQP_SUITE
DEQP_TEMP_DIR
DEQP_VER
DEQP_WIDTH
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
@@ -65,6 +66,7 @@ VARS=(
HWCI_START_XORG
HWCI_TEST_ARGS
HWCI_TEST_SCRIPT
INTEL_XE_IGNORE_EXPERIMENTAL_WARNING
IR3_SHADER_DEBUG
JOB_ARTIFACTS_BASE
JOB_RESULTS_PATH
@@ -74,6 +76,7 @@ VARS=(
LD_LIBRARY_PATH
LIBGL_ALWAYS_SOFTWARE
LP_NUM_THREADS
LVP_POISON_MEMORY
MESA_BASE_TAG
MESA_BUILD_PATH
MESA_DEBUG
@@ -88,18 +91,15 @@ VARS=(
MESA_TEMPLATES_COMMIT
MESA_VK_ABORT_ON_DEVICE_LOSS
MESA_VK_IGNORE_CONFORMANCE_WARNING
S3_HOST
S3_RESULTS_UPLOAD
NIR_DEBUG
PANVK_DEBUG
PAN_I_WANT_A_BROKEN_VULKAN_DRIVER
PAN_MESA_DEBUG
PANVK_DEBUG
PIGLIT_FRACTION
PIGLIT_NO_WINDOW
PIGLIT_OPTIONS
PIGLIT_PLATFORM
PIGLIT_PROFILES
PIGLIT_REPLAY_ANGLE_TAG
PIGLIT_REPLAY_ANGLE_ARCH
PIGLIT_REPLAY_ARTIFACTS_BASE_URL
PIGLIT_REPLAY_DEVICE_NAME
PIGLIT_REPLAY_EXTRA_ARGS
@@ -113,18 +113,22 @@ VARS=(
PIPELINE_ARTIFACTS_BASE
RADEON_DEBUG
RADV_DEBUG
radv_enable_float16_gfx8
RADV_PERFTEST
S3_HOST
S3_JWT_FILE
S3_RESULTS_UPLOAD
SKQP_ASSETS_DIR
SKQP_BACKENDS
STORAGE_FORK_HOST_PATH
STORAGE_MAINLINE_HOST_PATH
TU_DEBUG
USE_ANGLE
VIRGL_HOST_API
VIRGL_RENDER_SERVER
WAFFLE_PLATFORM
VK_DRIVER
ZINK_DESCRIPTORS
WAFFLE_PLATFORM
ZINK_DEBUG
LVP_POISON_MEMORY
ZINK_DESCRIPTORS
# Dead code within Mesa CI, but required by virglrender CI
# (because they include our files in their CI)

View File

@@ -92,9 +92,9 @@ if [ "$HWCI_KVM" = "true" ]; then
} || \
modprobe ${KVM_KERNEL_MODULE}
mkdir -p /lava-files
mkdir -p /kernel
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${KERNEL_IMAGE_NAME}" \
-o "/kernel/${KERNEL_IMAGE_NAME}" \
"${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}"
fi
@@ -140,13 +140,14 @@ if [ "$HWCI_FREQ_MAX" = "true" ]; then
# and enable throttling detection & reporting.
# Additionally, set the upper limit for CPU scaling frequency to 65% of the
# maximum permitted, as an additional measure to mitigate thermal throttling.
/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
/install/common/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
fi
# Start a little daemon to capture sysfs records and produce a JSON file
if [ -x /kdl.sh ]; then
KDL_PATH=/install/common/kdl.sh
if [ -x "$KDL_PATH" ]; then
echo "launch kdl.sh!"
/kdl.sh &
$KDL_PATH &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
else
echo "kdl.sh not found!"
@@ -160,8 +161,9 @@ fi
# Start a little daemon to capture the first devcoredump we encounter. (They
# expire after 5 minutes, so we poll for them).
if [ -x /capture-devcoredump.sh ]; then
/capture-devcoredump.sh &
CAPTURE_DEVCOREDUMP=/install/common/capture-devcoredump.sh
if [ -x "$CAPTURE_DEVCOREDUMP" ]; then
$CAPTURE_DEVCOREDUMP &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
fi
@@ -225,10 +227,10 @@ set -x
# kill the job.
cleanup
# upload artifacts
# upload artifacts (lava jobs)
if [ -n "$S3_RESULTS_UPLOAD" ]; then
tar --zstd -cf results.tar.zst results/;
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst;
s3_upload results.tar.zst "https://${S3_RESULTS_UPLOAD}/"
fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such

View File

@@ -35,6 +35,27 @@
# - gt_act_freq_mhz (the actual GPU freq)
# - gt_cur_freq_mhz (the last requested freq)
#
# Intel later switched to per-tile sysfs interfaces, which is what the Xe DRM
# driver exlusively uses, and the capabilites are now located under the
# following directory for the first tile:
#
# /sys/class/drm/card<n>/device/tile0/gt0/freq0/<freq_info>
#
# Where <n> is the DRM card index and <freq_info> one of the following:
#
# - max_freq (enforced maximum freq)
# - min_freq (enforced minimum freq)
#
# The hardware capabilities can be accessed via:
#
# - rp0_freq (supported maximum freq)
# - rpn_freq (supported minimum freq)
# - rpe_freq (most efficient freq)
#
# The current frequency can be read from:
# - act_freq (the actual GPU freq)
# - cur_freq (the last requested freq)
#
# Also note that in addition to GPU management, the script offers the
# possibility to adjust CPU operating frequencies. However, this is currently
# limited to just setting the maximum scaling frequency as percentage of the
@@ -50,10 +71,25 @@
# Constants
#
# Check if any /sys/class/drm/cardX/device/tile0 directory exists to detect Xe
USE_XE=0
for i in $(seq 0 15); do
if [ -d "/sys/class/drm/card$i/device/tile0" ]; then
USE_XE=1
break
fi
done
# GPU
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
ENF_FREQ_INFO="max min boost"
CAP_FREQ_INFO="RP0 RPn RP1"
if [ "$USE_XE" -eq 1 ]; then
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/device/tile0/gt0/freq0/%s_freq"
ENF_FREQ_INFO="max min"
CAP_FREQ_INFO="rp0 rpn rpe"
else
DRM_FREQ_SYSFS_PATTERN="/sys/class/drm/card%d/gt_%s_freq_mhz"
ENF_FREQ_INFO="max min boost"
CAP_FREQ_INFO="RP0 RPn RP1"
fi
ACT_FREQ_INFO="act cur"
THROTT_DETECT_SLEEP_SEC=2
THROTT_DETECT_PID_FILE_PATH=/tmp/thrott-detect.pid
@@ -112,7 +148,11 @@ identify_intel_gpu() {
}
path=$(print_freq_sysfs_path "" ${i})
path=${path%/*}/device/vendor
if [ "$USE_XE" -eq 1 ]; then
path=${path%/*/*/*/*/*}/device/vendor
else
path=${path%/*}/device/vendor
fi
[ -r "${path}" ] && read vendor < "${path}" && \
[ "${vendor}" = "0x8086" ] && INTEL_DRM_CARD_INDEX=$i && return 0
@@ -197,13 +237,13 @@ compute_freq_set() {
case "$1" in
+)
val=${FREQ_RP0}
val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") # FREQ_rp0 or FREQ_RP0
;;
-)
val=${FREQ_RPn}
val=$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") # FREQ_rpn or FREQ_RPn
;;
*%)
val=$((${1%?} * FREQ_RP0 / 100))
val=$((${1%?} * $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") / 100))
# Adjust freq to comply with 50 MHz increments
val=$((val / 50 * 50))
;;
@@ -232,15 +272,17 @@ set_freq_max() {
read_freq_info n min || return $?
[ ${SET_MAX_FREQ} -gt ${FREQ_RP0} ] && {
# FREQ_rp0 or FREQ_RP0
[ ${SET_MAX_FREQ} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}") ] && {
log ERROR "Cannot set GPU max freq (%s) to be greater than hw max freq (%s)" \
"${SET_MAX_FREQ}" "${FREQ_RP0}"
"${SET_MAX_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f1)}")"
return 1
}
[ ${SET_MAX_FREQ} -lt ${FREQ_RPn} ] && {
# FREQ_rpn or FREQ_RPn
[ ${SET_MAX_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
log ERROR "Cannot set GPU max freq (%s) to be less than hw min freq (%s)" \
"${SET_MIN_FREQ}" "${FREQ_RPn}"
"${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
return 1
}
@@ -252,12 +294,21 @@ set_freq_max() {
[ -z "${DRY_RUN}" ] || return 0
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) \
$(print_freq_sysfs_path boost) > /dev/null;
# Write to max freq path
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path max) > /dev/null;
then
log ERROR "Failed to set GPU max frequency"
return 1
fi
# Only write to boost if the sysfs file exists, as it's removed in Xe
if [ -e "$(print_freq_sysfs_path boost)" ]; then
if ! printf "%s" ${SET_MAX_FREQ} | tee $(print_freq_sysfs_path boost) > /dev/null;
then
log ERROR "Failed to set GPU boost frequency"
return 1
fi
fi
}
#
@@ -274,9 +325,9 @@ set_freq_min() {
return 1
}
[ ${SET_MIN_FREQ} -lt ${FREQ_RPn} ] && {
[ ${SET_MIN_FREQ} -lt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && {
log ERROR "Cannot set GPU min freq (%s) to be less than hw min freq (%s)" \
"${SET_MIN_FREQ}" "${FREQ_RPn}"
"${SET_MIN_FREQ}" "$(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")"
return 1
}
@@ -294,7 +345,7 @@ set_freq_min() {
#
set_freq() {
# Get hw max & min frequencies
read_freq_info n RP0 RPn || return $?
read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f1,2) || return $? # RP0 RPn
[ -z "${SET_MAX_FREQ}" ] || {
SET_MAX_FREQ=$(compute_freq_set "${SET_MAX_FREQ}")
@@ -397,7 +448,7 @@ detect_throttling() {
}
(
read_freq_info n RPn || exit $?
read_freq_info n $(echo $CAP_FREQ_INFO | cut -d' ' -f2) || return $? # RPn
while true; do
sleep ${THROTT_DETECT_SLEEP_SEC}
@@ -406,13 +457,13 @@ detect_throttling() {
#
# The throttling seems to occur when act freq goes below min.
# However, it's necessary to exclude the idle states, where
# act freq normally reaches RPn and cur goes below min.
# act freq normally reaches rpn and cur goes below min.
#
[ ${FREQ_act} -lt ${FREQ_min} ] && \
[ ${FREQ_act} -gt ${FREQ_RPn} ] && \
[ ${FREQ_act} -gt $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}") ] && \
[ ${FREQ_cur} -ge ${FREQ_min} ] && \
printf "GPU throttling detected: act=%s min=%s cur=%s RPn=%s\n" \
${FREQ_act} ${FREQ_min} ${FREQ_cur} ${FREQ_RPn}
printf "GPU throttling detected: act=%s min=%s cur=%s rpn=%s\n" \
${FREQ_act} ${FREQ_min} ${FREQ_cur} $(eval "echo \${FREQ_$(echo $CAP_FREQ_INFO | cut -d' ' -f2)}")
done
) &

View File

@@ -0,0 +1,2 @@
variables:
CONDITIONAL_BUILD_ANGLE_TAG: ab19bccfd3858c539ba8cb8d9b52a003

View File

@@ -6,6 +6,9 @@
# ALPINE_X86_64_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
EPHEMERAL=(
@@ -53,16 +56,16 @@ DEPS=(
spirv-tools-dev
spirv-llvm-translator-dev
util-macros
wayland-dev
wayland-protocols
)
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages sphinx===5.1.1 hawkmoth===0.16.0
pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
. .gitlab-ci/container/container_pre_build.sh
EXTRA_MESON_ARGS='--prefix=/usr' \
. .gitlab-ci/container/build-wayland.sh
############### Uninstall the build software

View File

@@ -4,6 +4,9 @@
# shellcheck disable=SC1091
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
EPHEMERAL=(

View File

@@ -7,7 +7,7 @@ set -o xtrace
# network transfer, disk usage, and runtime on test jobs)
# shellcheck disable=SC2154 # arch is assigned in previous scripts
if curl -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
if curl --fail -L -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
else
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
@@ -31,7 +31,7 @@ if [[ $arch == "arm64" ]]; then
-O "${KERNEL_IMAGE_BASE}"/arm64/cheza-kernel
DEVICE_TREES=""
DEVICE_TREES="$DEVICE_TREES apq8016-sbc.dtb"
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"

View File

@@ -0,0 +1,121 @@
#!/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
: "${CI:=}"
: "${CI_PROJECT_PATH:=}"
# Early check for required env variables, relies on `set -u`
: "$ANDROID_NDK_VERSION"
: "$ANDROID_SDK_VERSION"
: "$ANDROID_LLVM_VERSION"
: "$ANDROID_LLVM_ARTIFACT_NAME"
: "$S3_JWT_FILE"
: "$S3_HOST"
: "$S3_ANDROID_BUCKET"
# Check for CI if the auth file used later on is non-empty
if [ -n "$CI" ] && [ ! -s "${S3_JWT_FILE}" ]; then
echo "Error: ${S3_JWT_FILE} is empty." 1>&2
exit 1
fi
if curl -s -o /dev/null -I -L -f --retry 4 --retry-delay 15 "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"; then
echo "Artifact ${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst already exists, skip re-building."
# Download prebuilt LLVM libraries for Android when they have not changed,
# to save some time
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
tar -C / --zstd -xf "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
rm "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
exit
fi
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
unzip
)
apt-get update
apt-get install -y --no-install-recommends --no-remove "${EPHEMERAL[@]}"
ANDROID_NDK="android-ndk-${ANDROID_NDK_VERSION}"
ANDROID_NDK_ROOT="/${ANDROID_NDK}"
if [ ! -d "$ANDROID_NDK_ROOT" ];
then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "${ANDROID_NDK}.zip" \
"https://dl.google.com/android/repository/${ANDROID_NDK}-linux.zip"
unzip -d / "${ANDROID_NDK}.zip" "$ANDROID_NDK/source.properties" "$ANDROID_NDK/build/cmake/*" "$ANDROID_NDK/toolchains/llvm/*"
rm "${ANDROID_NDK}.zip"
fi
if [ ! -d "/llvm-project" ];
then
mkdir "/llvm-project"
pushd "/llvm-project"
git init
git remote add origin https://github.com/llvm/llvm-project.git
git fetch --depth 1 origin "$ANDROID_LLVM_VERSION"
git checkout FETCH_HEAD
popd
fi
pushd "/llvm-project"
# Checkout again the intended version, just in case of a pre-existing full clone
git checkout "$ANDROID_LLVM_VERSION" || true
LLVM_INSTALL_PREFIX="/${ANDROID_LLVM_ARTIFACT_NAME}"
rm -rf build/
cmake -GNinja -S llvm -B build/ \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM="android-${ANDROID_SDK_VERSION}" \
-DANDROID_NDK="${ANDROID_NDK_ROOT}" \
-DCMAKE_ANDROID_ARCH_ABI=x86_64 \
-DCMAKE_ANDROID_NDK="${ANDROID_NDK_ROOT}" \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION="${ANDROID_SDK_VERSION}" \
-DCMAKE_INSTALL_PREFIX="${LLVM_INSTALL_PREFIX}" \
-DCMAKE_CXX_FLAGS="-march=x86-64 --target=x86_64-linux-android${ANDROID_SDK_VERSION} -fno-rtti" \
-DLLVM_HOST_TRIPLE="x86_64-linux-android${ANDROID_SDK_VERSION}" \
-DLLVM_TARGETS_TO_BUILD=X86 \
-DLLVM_BUILD_LLVM_DYLIB=OFF \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_ENABLE_RTTI=OFF \
-DLLVM_BUILD_INSTRUMENTED_COVERAGE=OFF \
-DLLVM_NATIVE_TOOL_DIR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin" \
-DLLVM_ENABLE_PIC=False \
-DLLVM_OPTIMIZED_TABLEGEN=ON
ninja "-j${FDO_CI_CONCURRENT:-4}" -C build/ install
popd
rm -rf /llvm-project
tar --zstd -cf "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "$LLVM_INSTALL_PREFIX"
# If run in CI upload the tar.zst archive to S3 to avoid rebuilding it if the
# version does not change, and delete it.
# The file is not deleted for non-CI because it can be useful in local runs.
if [ -n "$CI" ]; then
s3_upload "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/"
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
fi
apt-get purge -y "${EPHEMERAL[@]}"

137
.gitlab-ci/container/build-angle.sh Normal file → Executable file
View File

@@ -2,13 +2,26 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# KERNEL_ROOTFS_TAG
set -uex
ANGLE_REV="76025caa1a059f464a2b0e8f879dbd4746f092b9"
SCRIPTS_DIR="$(pwd)/.gitlab-ci"
ANGLE_PATCH_DIR="${SCRIPTS_DIR}/container/patches"
uncollapsed_section_start angle "Building ANGLE"
# Do a very early check to make sure the tag is correct without the need of
# setting up the environment variables locally
ci_tag_build_time_check "ANGLE_TAG"
ANGLE_REV="a3f2545f6bb3e8d27827dceb2b4e901673995ad1"
# Set ANGLE_ARCH based on DEBIAN_ARCH if it hasn't been explicitly defined
if [[ -z "${ANGLE_ARCH:-}" ]]; then
case "$DEBIAN_ARCH" in
amd64) ANGLE_ARCH=x64;;
arm64) ANGLE_ARCH=arm64;;
esac
fi
# DEPOT tools
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot-tools
@@ -23,37 +36,39 @@ git remote add origin https://chromium.googlesource.com/angle/angle.git
git fetch --depth 1 origin "$ANGLE_REV"
git checkout FETCH_HEAD
angle_patch_files=(
build-angle_deps_Make-more-sources-conditional.patch
)
for patch in "${angle_patch_files[@]}"; do
echo "Apply patch to ANGLE from ${patch}"
GIT_COMMITTER_DATE=$(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
@@ -69,31 +84,81 @@ 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
popd
rm -rf /depot-tools
rm -rf /angle-build
section_end angle

View File

@@ -9,7 +9,9 @@
set -uex
APITRACE_VERSION="0a6506433e1f9f7b69757b4e5730326970c4321a"
uncollapsed_section_start apitrace "Building apitrace"
APITRACE_VERSION="952bad1469ea747012bdc48c48993bd5f13eec04"
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
pushd /apitrace
@@ -23,3 +25,5 @@ cp _build/eglretrace build
${STRIP_CMD:-strip} build/*
find . -not -path './build' -not -path './build/*' -delete
popd
section_end apitrace

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
uncollapsed_section_start bindgen "Building bindgen"
BINDGEN_VER=0.65.1
CBINDGEN_VER=0.26.0
@@ -18,3 +20,4 @@ RUSTFLAGS='-L native=/usr/local/lib' cargo install \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local
section_end bindgen

View File

@@ -1,18 +1,27 @@
#!/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_BASE_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -uex
uncollapsed_section_start crosvm "Building crosvm"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
CROSVM_VERSION=1641c55bcc922588e24de73e9cca7b5e4005bd6d
CROSVM_VERSION=e27efaf8f4bdc4a47d1e99cc44d2b6908b6f36bd
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
pushd /platform/crosvm
git checkout "$CROSVM_VERSION"
git submodule update --init
VIRGLRENDERER_VERSION=d9c002fac153b834a2c17731f2b85c36e333e102
VIRGLRENDERER_VERSION=7570167549358ce77b8d4774041b4a77c72a021c
rm -rf third_party/virglrenderer
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
pushd third_party/virglrenderer
@@ -21,14 +30,14 @@ meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true $
meson install -C build
popd
cargo update -p pkg-config@0.3.26 --precise 0.3.27
rm rust-toolchain
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
bindgen-cli \
--locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local \
--version 0.65.1 \
--version 0.71.1 \
${EXTRA_CARGO_ARGS:-}
CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
@@ -42,3 +51,5 @@ CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L nati
popd
rm -rf /platform/crosvm
section_end crosvm

View File

@@ -9,7 +9,9 @@
set -uex
DEQP_RUNNER_VERSION=0.20.2
uncollapsed_section_start deqp-runner "Building deqp-runner"
DEQP_RUNNER_VERSION=0.20.3
commits_to_backport=(
)
@@ -94,3 +96,5 @@ popd
if [ -z "${DEQP_RUNNER_GIT_TAG:-}${DEQP_RUNNER_GIT_REV:-}" ]; then
rm -f /usr/local/bin/igt-runner
fi
section_end deqp-runner

244
.gitlab-ci/container/build-deqp.sh Normal file → Executable file
View File

@@ -8,15 +8,24 @@
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -uex -o pipefail
set -ue -o pipefail
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
uncollapsed_section_start deqp-$deqp_api "Building dEQP $DEQP_API"
set -x
# See `deqp_build_targets` below for which release is used to produce which
# binary. Unless this comment has bitrotten:
# - the commit from the main branch produces the deqp tools and `deqp-vk`,
# - the VK release produces `deqp-vk`,
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_VK_VERSION=1.3.10.0
DEQP_MAIN_COMMIT=76c1572eaba42d7ddd9bb8eb5788e52dd932068e
DEQP_VK_VERSION=1.4.1.1
DEQP_GL_VERSION=4.6.5.0
DEQP_GLES_VERSION=3.2.11.0
@@ -26,45 +35,53 @@ DEQP_GLES_VERSION=3.2.11.0
# Both list variables would have comments explaining the reasons behind the
# patches.
# 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 :)
)
# shellcheck disable=SC2034
main_cts_patch_files=(
)
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Remove multi-line test results in DRM format modifier tests
8c95af68a2a85cbdc7e1d9267ab029f73e9427d2
# Stop querying device address from unbound buffers
046343f46f7d39d53b47842d7fd8ed3279528046
)
# shellcheck disable=SC2034
vk_cts_patch_files=(
)
if [ "${DEQP_TARGET}" = 'android' ]; then
vk_cts_patch_files+=(
build-deqp-vk_Allow-running-on-Android-from-the-command-line.patch
build-deqp-vk_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
# 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
)
# shellcheck disable=SC2034
gl_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
)
if [ "${DEQP_TARGET}" = 'android' ]; then
gl_cts_patch_files+=(
build-deqp-gl_Allow-running-on-Android-from-the-command-line.patch
build-deqp-gl_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
# shellcheck disable=SC2034
# GLES builds also EGL
gles_cts_commits_to_backport=(
# 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
)
if [ "${DEQP_TARGET}" = 'android' ]; then
@@ -83,86 +100,150 @@ git config --global user.name "Mesa CI"
# shellcheck disable=SC2153
case "${DEQP_API}" in
tools) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
*-main) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
VK) DEQP_VERSION="vulkan-cts-$DEQP_VK_VERSION";;
GL) DEQP_VERSION="opengl-cts-$DEQP_GL_VERSION";;
GLES) DEQP_VERSION="opengl-es-cts-$DEQP_GLES_VERSION";;
*) echo "Unexpected DEQP_API value: $DEQP_API"; exit 1;;
esac
git clone \
https://github.com/KhronosGroup/VK-GL-CTS.git \
-b $DEQP_VERSION \
--depth 1 \
/VK-GL-CTS
mkdir -p /VK-GL-CTS
pushd /VK-GL-CTS
[ -e .git ] || {
git init
git remote add origin https://github.com/KhronosGroup/VK-GL-CTS.git
}
git fetch --depth 1 origin "$DEQP_VERSION"
git checkout FETCH_HEAD
DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
mkdir -p /deqp
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
merge_base="$(curl --fail -s https://api.github.com/repos/KhronosGroup/VK-GL-CTS/compare/main...$DEQP_MAIN_COMMIT | jq -r .merge_base_commit.sha)"
if [[ "$merge_base" != "$DEQP_MAIN_COMMIT" ]]; then
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
exit 1
fi
fi
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
mkdir -p /deqp-$deqp_api
cts_commits_to_backport="${deqp_api}_cts_commits_to_backport[@]"
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
prefix="main"
else
prefix="$deqp_api"
fi
cts_commits_to_backport="${prefix}_cts_commits_to_backport[@]"
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=$(date -d@0) git am -
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
done
cts_patch_files="${deqp_api}_cts_patch_files[@]"
cts_patch_files="${prefix}_cts_patch_files[@]"
for patch in "${!cts_patch_files}"
do
echo "Apply patch to ${DEQP_API} CTS from $patch"
GIT_COMMITTER_DATE=$(date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch
done
{
echo "dEQP base version $DEQP_VERSION"
echo "The following local patches are applied on top:"
git log --reverse --oneline $DEQP_VERSION.. --format='- %s'
} > /deqp/version-$deqp_api
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
commit_desc=$(git show --no-patch --format='commit %h on %ci' --abbrev=10 "$DEQP_COMMIT")
echo "dEQP $DEQP_API at $commit_desc"
else
echo "dEQP $DEQP_API version $DEQP_VERSION"
fi
if [ "$(git rev-parse HEAD)" != "$DEQP_COMMIT" ]; then
echo "The following local patches are applied on top:"
git log --reverse --oneline "$DEQP_COMMIT".. --format='- %s'
fi
} > /deqp-$deqp_api/deqp-$deqp_api-version
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
# libpng (sigh). The archives get their checksums checked anyway, and git
# always goes through ssh or https.
python3 external/fetch_sources.py --insecure
# Save the testlog stylesheets:
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
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
fi
popd
pushd /deqp
deqp_build_targets=()
case "${DEQP_API}" in
VK|VK-main)
deqp_build_targets+=(deqp-vk)
;;
GL)
deqp_build_targets+=(glcts)
;;
GLES)
deqp_build_targets+=(deqp-gles{2,3,31})
deqp_build_targets+=(glcts) # needed for gles*-khr tests
# deqp-egl also comes from this build, but it is handled separately below.
;;
tools)
deqp_build_targets+=(testlog-to-xml)
deqp_build_targets+=(testlog-to-csv)
deqp_build_targets+=(testlog-to-junit)
;;
esac
OLD_IFS="$IFS"
IFS=";"
CMAKE_SBT="${deqp_build_targets[*]}"
IFS="$OLD_IFS"
pushd /deqp-$deqp_api
if [ "${DEQP_API}" = 'GLES' ]; then
if [ "${DEQP_TARGET}" = 'android' ]; then
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=android \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="deqp-egl" \
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-android
ninja modules/egl/deqp-egl
mv modules/egl/deqp-egl{,-android}
else
# When including EGL/X11 testing, do that build first and save off its
# deqp-egl binary.
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=x11_egl_glx \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="deqp-egl" \
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
ninja modules/egl/deqp-egl
mv modules/egl/deqp-egl{,-x11}
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=wayland \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="deqp-egl" \
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-wayland
ninja modules/egl/deqp-egl
mv modules/egl/deqp-egl{,-wayland}
fi
fi
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=${DEQP_TARGET} \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="${CMAKE_SBT}" \
${EXTRA_CMAKE_ARGS:-}
# Make sure `default` doesn't silently stop detecting one of the platforms we care about
@@ -172,90 +253,73 @@ if [ "${DEQP_TARGET}" = 'default' ]; then
grep -q DEQP_SUPPORT_XCB=1 build.ninja
fi
deqp_build_targets=()
case "${DEQP_API}" in
VK)
deqp_build_targets+=(deqp-vk)
;;
GL)
deqp_build_targets+=(glcts)
;;
GLES)
deqp_build_targets+=(deqp-gles{2,3,31})
# deqp-egl also comes from this build, but it is handled separately above.
;;
esac
if [ "${DEQP_TARGET}" != 'android' ]; then
deqp_build_targets+=(testlog-to-xml)
deqp_build_targets+=(testlog-to-csv)
deqp_build_targets+=(testlog-to-junit)
fi
ninja "${deqp_build_targets[@]}"
mold --run ninja "${deqp_build_targets[@]}"
if [ "${DEQP_TARGET}" != 'android' ]; then
if [ "$DEQP_API" != tools ]; then
# Copy out the mustpass lists we want.
mkdir -p /deqp/mustpass
mkdir -p mustpass
if [ "${DEQP_API}" = 'VK' ]; then
if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
>> /deqp/mustpass/vk-main.txt
>> mustpass/vk-main.txt
done
fi
if [ "${DEQP_API}" = 'GL' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass/main/*-main.txt \
/deqp/mustpass/
mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass_single/main/*-single.txt \
/deqp/mustpass/
mustpass/
fi
if [ "${DEQP_API}" = 'GLES' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/aosp_mustpass/main/*.txt \
/deqp/mustpass/
mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/egl/aosp_mustpass/main/egl-main.txt \
/deqp/mustpass/
mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/khronos_mustpass/main/*-main.txt \
/deqp/mustpass/
mustpass/
fi
# Compress the caselists, since Vulkan's in particular are gigantic; higher
# compression levels provide no real measurable benefit.
zstd -1 --rm mustpass/*.txt
fi
if [ "$DEQP_API" = tools ]; then
# Save *some* executor utils, but otherwise strip things down
# to reduct deqp build size:
mkdir /deqp/executor.save
cp /deqp/executor/testlog-to-* /deqp/executor.save
rm -rf /deqp/executor
mv /deqp/executor.save /deqp/executor
mv executor/testlog-to-* .
rm -rf executor
fi
# Compress the caselists, since Vulkan's in particular are gigantic; higher
# compression levels provide no real measurable benefit.
zstd -1 --rm /deqp/mustpass/*.txt
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
rm -rf /deqp/external/**/mustpass/
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-main*
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-default
rm -rf assets/**/mustpass/
rm -rf external/**/mustpass/
rm -rf external/vulkancts/modules/vulkan/vk-main*
rm -rf external/vulkancts/modules/vulkan/vk-default
rm -rf /deqp/external/openglcts/modules/cts-runner
rm -rf /deqp/modules/internal
rm -rf /deqp/execserver
rm -rf /deqp/framework
rm -rf external/openglcts/modules/cts-runner
rm -rf modules/internal
rm -rf execserver
rm -rf framework
find . -depth \( -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' \) -exec rm -rf {} \;
if [ "${DEQP_API}" = 'VK' ]; then
if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
fi
if [ "${DEQP_API}" = 'GL' ]; then
if [ "${DEQP_API}" = 'GL' ] || [ "${DEQP_API}" = 'GLES' ]; then
${STRIP_CMD:-strip} external/openglcts/modules/glcts
fi
if [ "${DEQP_API}" = 'GLES' ]; then
${STRIP_CMD:-strip} modules/*/deqp-*
fi
du -sh ./*
rm -rf /VK-GL-CTS
popd
section_end deqp-$deqp_api

View File

@@ -7,9 +7,13 @@
set -uex
uncollapsed_section_start directx-headers "Building directx-headers"
git clone https://github.com/microsoft/DirectX-Headers -b v1.614.1 --depth 1
pushd DirectX-Headers
meson setup build --backend=ninja --buildtype=release -Dbuild-test=false ${EXTRA_MESON_ARGS:-}
meson install -C build
popd
rm -rf DirectX-Headers
section_end directx-headers

View File

@@ -0,0 +1,39 @@
#!/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
# Install fluster in /usr/local.
FLUSTER_REVISION="e997402978f62428fffc8e5a4a709690d9ca9bc5"
git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
pushd fluster || exit
git checkout ${FLUSTER_REVISION}
popd || exit
if [ "${SKIP_UPDATE_FLUSTER_VECTORS}" != 1 ]; then
# Download the necessary vectors: H264, H265 and VP9
# When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
# fluster-runner will report Missing results.
fluster/fluster.py download \
JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-SVC_V1 \
JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
# Build fluster vectors archive and upload it
tar --zstd -cf "vectors.tar.zst" fluster/resources/
s3_upload vectors.tar.zst "https://${S3_PATH_FLUSTER}/"
touch /lava-files/done
s3_upload /lava-files/done "https://${S3_PATH_FLUSTER}/"
# Don't include the vectors in the rootfs
rm -fr fluster/resources/*
fi
mkdir -p "${ROOTFS}/usr/local/"
mv fluster "${ROOTFS}/usr/local/"

View File

@@ -7,6 +7,8 @@
set -ex
uncollapsed_section_start fossilize "Building fossilize"
git clone https://github.com/ValveSoftware/Fossilize.git
cd Fossilize
git checkout b43ee42bbd5631ea21fe9a2dee4190d5d875c327
@@ -17,3 +19,5 @@ cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja -C . install
cd ../..
rm -rf Fossilize
section_end fossilize

View File

@@ -2,6 +2,8 @@
set -ex
uncollapsed_section_start gfxreconstruct "Building gfxreconstruct"
GFXRECONSTRUCT_VERSION=761837794a1e57f918a85af7000b12e531b178ae
git clone https://github.com/LunarG/gfxreconstruct.git \
@@ -17,3 +19,5 @@ cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:
cmake --build _build --parallel --target tools/{replay,info}/install/strip
find . -not -path './build' -not -path './build/*' -delete
popd
section_end gfxreconstruct

View File

@@ -3,6 +3,8 @@
set -ex
uncollapsed_section_start kdl "Building kdl"
KDL_REVISION="cbbe5fd54505fd03ee34f35bfd16794f0c30074f"
KDL_CHECKOUT_DIR="/tmp/ci-kdl.git"
@@ -26,3 +28,5 @@ popd
)
rm -rf ${KDL_CHECKOUT_DIR}
section_end kdl

View File

@@ -2,6 +2,8 @@
set -uex
uncollapsed_section_start libclc "Building libclc"
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
LLVM_TAG="llvmorg-15.0.7"
@@ -29,3 +31,5 @@ ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
du -sh ./*
rm -rf /libclc /llvm-project
section_end libclc

View File

@@ -5,6 +5,8 @@
set -uex
uncollapsed_section_start libdrm "Building libdrm"
export LIBDRM_VERSION=libdrm-2.4.122
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
@@ -15,3 +17,5 @@ meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled ${EX
meson install -C build
cd ..
rm -rf "$LIBDRM_VERSION"
section_end libdrm

View File

@@ -2,7 +2,13 @@
set -ex
VER="${LLVM_VERSION:?llvm not set}.0.0"
uncollapsed_section_start llvm-spirv "Building LLVM-SPIRV-Translator"
if [ "${LLVM_VERSION:?llvm version not set}" -ge 18 ]; then
VER="${LLVM_VERSION}.1.0"
else
VER="${LLVM_VERSION}.0.0"
fi
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${VER}.tar.gz"
@@ -20,3 +26,5 @@ popd
du -sh "SPIRV-LLVM-Translator-${VER}"
rm -rf "SPIRV-LLVM-Translator-${VER}"
section_end llvm-spirv

View File

@@ -10,6 +10,8 @@ set -ex
# FEDORA_X86_64_BUILD_TAG
# KERNEL_ROOTFS_TAG
uncollapsed_section_start mold "Building mold"
MOLD_VERSION="2.32.0"
git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
@@ -19,5 +21,12 @@ cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D MOLD_LTO=ON
cmake --build . --parallel "${FDO_CI_CONCURRENT:-4}"
cmake --install . --strip
# Always use mold from now on
find /usr/bin \( -name '*-ld' -o -name 'ld' \) \
-exec ln -sf /usr/local/bin/ld.mold {} \; \
-exec ls -l {} +
popd
rm -rf mold
section_end mold

View File

@@ -6,6 +6,8 @@
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"
@@ -23,3 +25,5 @@ mv NineTests/NineTests /NineTests/
popd
rm -rf /Xnine
section_end ninetests

View File

@@ -2,13 +2,15 @@
# shellcheck disable=SC2086 # we want word splitting
set -uex
uncollapsed_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="c2b31333926a6171c3c02d182b756efad7770410"
REV="0ecdebb0f5927728ddeeb851639a559b0f7d6590"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit
@@ -32,3 +34,5 @@ if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
-exec rm -rf {} \; 2>/dev/null
fi
popd
section_end piglit

View File

@@ -5,17 +5,10 @@
set -ex
# 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
uncollapsed_section_start rust "Building Rust toolchain"
# Rusticl requires at least Rust 1.66.0 and NAK requires 1.73.0
#
# Also, pick a specific snapshot from rustup so the compiler doesn't drift on
# us.
RUST_VERSION=1.76.0-2024-02-08
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
RUST_VERSION=1.78.0-2024-05-02
# 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
@@ -26,14 +19,20 @@ 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"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
EOF
section_end rust

View File

@@ -6,9 +6,13 @@
set -ex
uncollapsed_section_start shader-db "Building shader-db"
pushd /usr/local
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
rm -rf shader-db/.git
cd shader-db
make
popd
section_end shader-db

View File

@@ -10,6 +10,8 @@
set -uex
uncollapsed_section_start skqp "Building skqp"
SKQP_BRANCH=android-cts-12.1_r5
SCRIPT_DIR="$(pwd)/.gitlab-ci/container"
@@ -66,8 +68,8 @@ cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
# hack for skqp see the clang
pushd /usr/bin/
ln -s "../lib/llvm-${LLVM_VERSION:-15}/bin/clang" clang
ln -s "../lib/llvm-${LLVM_VERSION:-15}/bin/clang++" clang++
ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang" clang
ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang++" clang++
popd
# Fetch some needed build tools needed to build skia/skqp.
@@ -98,3 +100,5 @@ popd
rm -Rf "${SKIA_DIR}"
set +ex
section_end skqp

View File

@@ -34,6 +34,11 @@ extra_cflags_cc = [
"-Wno-unused-but-set-variable",
"-Wno-sizeof-array-div",
"-Wno-string-concatenation",
"-Wno-unsafe-buffer-usage",
"-Wno-switch-default",
"-Wno-cast-function-type-strict",
"-Wno-format",
"-Wno-enum-constexpr-conversion",
]
cc_wrapper = "ccache"

View File

@@ -6,6 +6,8 @@
set -uex
uncollapsed_section_start va-tools "Building va-tools"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
@@ -17,9 +19,11 @@ 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
popd
rm -rf /va-utils
section_end va-tools

View File

@@ -3,10 +3,11 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
VKD3D_PROTON_COMMIT="59d6d4b5ed23766e69fe252408a3401d2fd52ce8"
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
VKD3D_PROTON_COMMIT="078f07f588c849c52fa21c8cfdd1c201465b1932"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
@@ -45,3 +46,5 @@ popd
rm -rf "$VKD3D_PROTON_BUILD_DIR"
rm -rf "$VKD3D_PROTON_SRC_DIR"
section_end vkd3d-proton

View File

@@ -7,13 +7,19 @@
set -uex
VALIDATION_TAG="snapshot-2024wk39"
uncollapsed_section_start vulkan-validation "Building Vulkan validation layers"
VALIDATION_TAG="snapshot-2025wk15"
git clone -b "$VALIDATION_TAG" --single-branch --depth 1 https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
pushd Vulkan-ValidationLayers
python3 scripts/update_deps.py --dir external --config release --generator Ninja
# we don't need to build SPIRV-Tools tools
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
section_end vulkan-validation

View File

@@ -3,8 +3,12 @@
set -uex
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
@@ -13,7 +17,7 @@ set -uex
# 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
@@ -30,3 +34,5 @@ meson setup -Dtests=false _build ${EXTRA_MESON_ARGS:-}
meson install -C _build
cd ..
rm -rf wayland-protocols
section_end wayland

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# When changing this file, all the linux tags in
# .gitlab-ci/image-tags.yml need updating.
set -eu
# Early check for required env variables, relies on `set -u`
: "$S3_JWT_FILE_SCRIPT"
if [ -z "$1" ]; then
echo "usage: $(basename "$0") <CONTAINER_CI_JOB_NAME>" 1>&2
exit 1
fi
CONTAINER_CI_JOB_NAME="$1"
# Tasks to perform before executing the script of a container job
eval "$S3_JWT_FILE_SCRIPT"
unset S3_JWT_FILE_SCRIPT
trap 'rm -f ${S3_JWT_FILE}' EXIT INT TERM
bash ".gitlab-ci/container/${CONTAINER_CI_JOB_NAME}.sh"

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
@@ -23,19 +26,6 @@ if test -x /usr/bin/ccache; then
ccache --show-stats
fi
# When not using the mold linker (e.g. unsupported architecture), force
# linkers to gold, since it's so much faster for building. We can't use
# lld because we're on old debian and it's buggy. mingw fails meson builds
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
if [ -e /usr/bin/ld.gold ]; then
find /usr/bin -name \*-ld -o -name ld | \
grep -v mingw | \
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
else
echo "ld.gold is missing, not replacing ld with it."
echo "Builds might be slower, consider installing gold."
fi
# Make a wrapper script for ninja to always include the -j flags
{
echo '#!/bin/sh -x'
@@ -55,3 +45,30 @@ echo -e "retry_connrefused = on\n" \
"retry_on_host_error = on\n" \
"retry_on_http_error = 429,500,502,503,504\n" \
"wait_retry = 32" >> /etc/wgetrc
# Ensure that rust tools are in PATH if they exist
CARGO_ENV_FILE="$HOME/.cargo/env"
if [ -f "$CARGO_ENV_FILE" ]; then
# shellcheck disable=SC1090
source "$CARGO_ENV_FILE"
fi
ci_tag_early_checks() {
# Runs the first part of the build script to perform the tag check only
uncollapsed_section_switch "ci_tag_early_checks" "Ensuring component versions match declared tags in CI builds"
echo "[Structured Tagging] Checking components: ${CI_BUILD_COMPONENTS}"
# shellcheck disable=SC2086
for component in ${CI_BUILD_COMPONENTS}; do
bin/ci/update_tag.py --check ${component} || exit 1
done
echo "[Structured Tagging] Components check done"
section_end "ci_tag_early_checks"
}
# Check if each declared tag component is up to date before building
if [ -n "${CI_BUILD_COMPONENTS:-}" ]; then
# Remove any duplicates by splitting on whitespace, sorting, then joining back
CI_BUILD_COMPONENTS="$(echo "${CI_BUILD_COMPONENTS}" | xargs -n1 | sort -u | xargs)"
ci_tag_early_checks
fi

View File

@@ -18,7 +18,7 @@ cat > "$cross_file" <<EOF
[binaries]
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '--start-no-unused-arguments', '-static-libstdc++', '--end-no-unused-arguments']
c_ld = 'lld'
cpp_ld = 'lld'
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'

View File

@@ -2,10 +2,13 @@
# shellcheck disable=SC2086 # we want word splitting
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(

31
.gitlab-ci/container/debian/android_build.sh Normal file → Executable file
View File

@@ -5,7 +5,11 @@
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
set -ex
set -e
. .gitlab-ci/setup-test-env.sh
set -x
EPHEMERAL=(
autoconf
@@ -15,11 +19,13 @@ 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
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 "$ndk/toolchains/llvm/*"
unzip -d / $ndk.zip "$ndk/source.properties" "$ndk/build/cmake/*" "$ndk/toolchains/llvm/*"
rm $ndk.zip
# Since it was packed as a zip file, symlinks/hardlinks got turned into
# duplicate files. Turn them into hardlinks to save on container space.
@@ -34,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 \
@@ -85,9 +97,22 @@ for arch in \
--libdir=/usr/local/lib/${arch}
make install
make distclean
unset CC
unset CC
unset CXX
unset LD
unset RANLIB
done
cd ..
rm -rf $LIBELF_VERSION
# Build LLVM libraries for Android only if necessary, uploading a copy to S3
# to avoid rebuilding it in a future run if the version does not change.
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

@@ -2,14 +2,18 @@
# shellcheck disable=SC2086 # we want word splitting
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set}"
apt-get -y install ca-certificates
apt-get -y install ca-certificates curl gnupg2
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
apt-get update
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
@@ -78,6 +82,8 @@ DEPS=(
zstd
)
apt-get update
apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2

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

@@ -6,6 +6,9 @@
# KERNEL_ROOTFS_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
############### Install packages for baremetal testing

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Check to see if we need a separate repo to install LLVM.
case "${FDO_DISTRIBUTION_VERSION%-*},${LLVM_VERSION}" in
bookworm,15)
NEED_LLVM_REPO="false"
;;
*)
NEED_LLVM_REPO="true"
;;
esac
if [ "$NEED_LLVM_REPO" = "true" ]; then
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

@@ -2,6 +2,8 @@
set -e
. .gitlab-ci/setup-test-env.sh
arch=s390x
# Ephemeral packages (installed for this script and removed again at the end)

View File

@@ -15,13 +15,15 @@ uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y ca-certificates gnupg2 software-properties-common
apt-get install -y curl ca-certificates gnupg2 software-properties-common
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
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
@@ -40,17 +42,32 @@ EPHEMERAL=(
libasound2-dev
libcap-dev
"libclang-cpp${LLVM_VERSION}-dev"
"libclang-rt-${LLVM_VERSION}-dev"
libdrm-dev
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
@@ -62,45 +79,66 @@ EPHEMERAL=(
python3-pip
python3-setuptools
python3-wheel
spirv-tools
wayland-protocols
xz-utils
)
DEPS=(
apt-utils
clinfo
curl
git
git-lfs
inetutils-syslogd
iptables
jq
kmod
libasan8
libcap2
libdrm2
libegl1
libepoxy0
libexpat1
libfdt1
"libclang-common-${LLVM_VERSION}-dev"
"libclang-cpp${LLVM_VERSION}"
"libllvm${LLVM_VERSION}"
liblz4-1
libpng16-16
libpython3.11
libubsan1
libvulkan1
libwayland-client0
libwayland-server0
libxcb-ewmh2
libxcb-randr0
libxcb-shm0
libxcb-xfixes0
libxkbcommon0
libxrandr2
libxrender1
ocl-icd-libopencl1
pciutils
python3-lxml
python3-mako
python3-numpy
python3-packaging
python3-pil
python3-renderdoc
python3-requests
python3-simplejson
python3-six
python3-yaml
socat
spirv-tools
sysvinit-core
vulkan-tools
waffle-utils
weston
xwayland
xinit
xserver-xorg-video-amdgpu
xserver-xorg-video-ati
xauth
xvfb
zlib1g
@@ -126,62 +164,64 @@ pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedeskt
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
section_end debian_setup
############### Download prebuilt kernel
if [ "$DEBIAN_ARCH" = amd64 ]; then
uncollapsed_section_switch kernel "Downloading kernel"
uncollapsed_section_start kernel "Downloading kernel for crosvm"
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /lava-files/
. .gitlab-ci/container/download-prebuilt-kernel.sh
mkdir -p /kernel
# shellcheck disable=SC2153 # KERNEL_IMAGE_BASE is set in the root .gitlab-ci.yml file
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/kernel/${KERNEL_IMAGE_NAME}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${KERNEL_IMAGE_NAME}"
section_end kernel
fi
############### Build mold
uncollapsed_section_switch mold "Building mold linker"
. .gitlab-ci/container/build-mold.sh
############### Build LLVM-SPIRV translator
uncollapsed_section_switch llvmspv "Building LLVM-SPIRV-Translator"
. .gitlab-ci/container/build-llvm-spirv.sh
############### Build libclc
uncollapsed_section_switch libclc "Building libclc"
. .gitlab-ci/container/build-libclc.sh
############### Build Wayland
uncollapsed_section_switch wayland "Building Wayland"
. .gitlab-ci/container/build-wayland.sh
############### Install Rust toolchain
uncollapsed_section_switch rust "Installing Rust toolchain"
. .gitlab-ci/container/build-rust.sh
############### Build Crosvm
uncollapsed_section_switch crosvm "Building 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
uncollapsed_section_switch deqpr "Building 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
section_end debian_cleanup

View File

@@ -10,7 +10,7 @@ set -o xtrace
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
apt-get install -y libelogind0 # this interfere with systemd deps, install separately
@@ -44,6 +44,7 @@ EPHEMERAL=(
libxrandr-dev
libxrender-dev
"llvm-${LLVM_VERSION}-dev"
"lld-${LLVM_VERSION}"
make
meson
ocl-icd-opencl-dev
@@ -54,24 +55,6 @@ EPHEMERAL=(
)
DEPS=(
clinfo
iptables
kmod
"libclang-common-${LLVM_VERSION}-dev"
"libclang-cpp${LLVM_VERSION}"
libcap2
libegl1
libepoxy0
libfdt1
libxcb-shm0
ocl-icd-libopencl1
python3-lxml
python3-renderdoc
python3-simplejson
spirv-tools
sysvinit-core
weston
xwayland
)
apt-get update
@@ -82,9 +65,16 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
. .gitlab-ci/container/container_pre_build.sh
############### Build piglit
section_end debian_setup
uncollapsed_section_switch piglit "Building Piglit"
############### Build ANGLE
if [ "$DEBIAN_ARCH" == "arm64" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
fi
############### Build piglit
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=ON
@@ -104,32 +94,26 @@ PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
############### Build dEQP GL
uncollapsed_section_switch piglit_gl "Building dEQP for GL"
DEQP_API=tools \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
uncollapsed_section_switch piglit_gles "Building dEQP for GLES"
DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
rm -rf /VK-GL-CTS
############### Build validation layer for zink
uncollapsed_section_switch vvl "Building Vulkan validation layers"
. .gitlab-ci/container/build-vulkan-validation.sh
############### Build nine tests
uncollapsed_section_switch nine "Building Nine tests"
. .gitlab-ci/container/build-ninetests.sh
############### Uninstall the build software
@@ -139,3 +123,9 @@ uncollapsed_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

@@ -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,92 +47,97 @@ 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 ...
. .gitlab-ci/container/container_pre_build.sh
section_end debian_setup
############### Build piglit replayer
uncollapsed_section_switch piglit "Building Piglit for Vulkan (traces only)"
# 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
uncollapsed_section_switch deqp "Building Vulkan CTS (dEQP)"
DEQP_API=tools \
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 \
. .gitlab-ci/container/build-deqp.sh
############### Build apitrace
uncollapsed_section_switch apitrace "Building apitrace"
. .gitlab-ci/container/build-apitrace.sh
rm -rf /VK-GL-CTS
############### Build Fossilize
uncollapsed_section_switch fossilize "Building Fossilize"
. .gitlab-ci/container/build-fossilize.sh
if [ "$DEBIAN_ARCH" != "armhf" ]; then
. .gitlab-ci/container/build-fossilize.sh
fi
############### Build gfxreconstruct
uncollapsed_section_switch gfxreconstruct "Building 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
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
# 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
@@ -143,3 +146,9 @@ uncollapsed_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

@@ -6,15 +6,20 @@
# DEBIAN_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
apt-get install -y ca-certificates
apt-get install -y ca-certificates curl gnupg2
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
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
# Ephemeral packages (installed for this script and removed again at
# the end)
EPHEMERAL=(

View File

@@ -6,10 +6,13 @@
# DEBIAN_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
@@ -28,6 +31,7 @@ DEPS=(
libarchive-dev
libdrm-dev
"libclang-cpp${LLVM_VERSION}-dev"
"libclang-rt-${LLVM_VERSION}-dev"
libgbm-dev
libglvnd-dev
liblua5.3-dev

View File

@@ -6,6 +6,9 @@
# DEBIAN_PYUTILS_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive

109
.gitlab-ci/container/debian/x86_64_test-android.sh Normal file → Executable file
View File

@@ -1,8 +1,15 @@
#!/usr/bin/env bash
# The relative paths in this file only become valid at runtime.
# shellcheck disable=SC1091
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
@@ -16,6 +23,7 @@ EPHEMERAL=(
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
)
@@ -32,12 +40,18 @@ apt-get install -y --no-remove --no-install-recommends \
############### Downloading NDK for native builds for the guest ...
# Fetch the NDK and extract just the toolchain we want.
ndk=$ANDROID_NDK
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"
rm "$ndk.zip"
############### Build ANGLE
ANGLE_TARGET=android \
DEBIAN_ARCH=amd64 \
. .gitlab-ci/container/build-angle.sh
############### Build dEQP runner
export ANDROID_NDK_HOME=/$ndk
@@ -45,42 +59,65 @@ 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=GL \
DEQP_API=tools \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
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=VK \
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
rm -rf /VK-GL-CTS
############### Downloading Cuttlefish resources ...
CUTTLEFISH_VERSION=9082637 # Chosen from https://ci.android.com/builds/branches/aosp-master/grid?
uncollapsed_section_start cuttlefish "Downloading, building and installing Cuttlefish"
CUTTLEFISH_PROJECT_PATH=ao2/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS=mesa-venus
CUTTLEFISH_BUILD_NUMBER=20250215.001
mkdir /cuttlefish
pushd /cuttlefish
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip https://ci.android.com/builds/submitted/$CUTTLEFISH_VERSION/aosp_cf_x86_64_phone-userdebug/latest/raw/aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
unzip aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
rm aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
-o aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip"
unzip aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
rm aosp_cf_x86_64_only_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
ls -lhS ./*
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
https://ci.android.com/builds/submitted/$CUTTLEFISH_VERSION/aosp_cf_x86_64_phone-userdebug/latest/raw/cvd-host_package.tar.gz | tar -xzvf-
-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
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"
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"
popd
############### Building and installing Debian package ...
ANDROID_CUTTLEFISH_VERSION=f6494d9fbeaa9974b56923e3029909e5d5f440dd
ANDROID_CUTTLEFISH_VERSION=v1.0.1
mkdir android-cuttlefish
pushd android-cuttlefish
@@ -89,11 +126,9 @@ git remote add origin https://github.com/google/android-cuttlefish.git
git fetch --depth 1 origin "$ANDROID_CUTTLEFISH_VERSION"
git checkout FETCH_HEAD
pushd base
dpkg-buildpackage -uc -us
popd
./tools/buildutils/build_packages.sh
apt-get install -y ./cuttlefish-base_*.deb
apt-get install -y --allow-downgrades ./cuttlefish-base_*.deb ./cuttlefish-user_*.deb
popd
rm -rf android-cuttlefish
@@ -101,12 +136,52 @@ rm -rf android-cuttlefish
addgroup --system kvm
usermod -a -G kvm,cvdnetwork root
section_end cuttlefish
############### Downloading Android CTS tools
uncollapsed_section_start android-cts "Downloading Android CTS tools"
ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1"
ANDROID_CTS_DEVICE_ARCH="x86"
mkdir /android-tools
pushd /android-tools
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" \
"https://dl.google.com/dl/android/cts/android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
unzip "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
rm "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip"
# Keep only the interesting tests to save space
# shellcheck disable=SC2086 # we want word splitting
ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" $ANDROID_CTS_MODULES | sed -e 's/|$//g')
find android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "build-tools_r${ANDROID_SDK_VERSION}-linux.zip" "https://dl.google.com/android/repository/build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
unzip "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
rm "build-tools_r${ANDROID_SDK_VERSION}-linux.zip"
mv "android-$ANDROID_VERSION" build-tools
popd
section_end android-cts
############### Uninstall the build software
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
rm -rf "/${ndk:?}"
export SUDO_FORCE_REMOVE=yes
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup
############### Remove unused packages
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="amd64" \
. .gitlab-ci/container/debian/test-gl.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env bash
DEBIAN_ARCH="amd64" \
. .gitlab-ci/container/debian/test-vk.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC2153
set -uex
mkdir -p kernel
pushd kernel
if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
KERNEL_IMAGE_NAME+=" cheza-kernel"
fi
for image in ${KERNEL_IMAGE_NAME:-}; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${image}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${image}"
done
for dtb in ${DEVICE_TREES:-}; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${dtb}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${dtb}"
done
mkdir -p "/lava-files/rootfs-${DEBIAN_ARCH}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/modules.tar.zst"
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C "/lava-files/rootfs-${DEBIAN_ARCH}/"
popd
rm -rf kernel

View File

@@ -6,6 +6,9 @@
# FEDORA_X86_64_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
@@ -74,13 +77,15 @@ DEPS=(
python-unversioned-command
python3-devel
python3-mako
python3-packaging
python3-ply
python3-pycparser
python3-yaml
rust-packaging
vulkan-headers
spirv-tools-devel
spirv-llvm-translator-devel
vulkan-headers
which
)
dnf install -y --setopt=install_weak_deps=False "${DEPS[@]}" "${EPHEMERAL[@]}"

View File

@@ -52,15 +52,44 @@
.container:
stage: container
timeout: 1h
extends:
- .container+build-rules
- .incorporate-templates-commit
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
variables:
FDO_REPO_SUFFIX: $CI_JOB_NAME
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
# no need to pull the whole repo to build the container image
GIT_STRATEGY: none
.container-builds-angle:
variables:
ANGLE_TAG: "${CONDITIONAL_BUILD_ANGLE_TAG}"
.container-builds-android:
extends:
- .container-builds-angle
variables:
# CI_BUILD_COMPONENTS is a space-separated list of components used during early tag checks
# If this job inherits from multiple .container-builds-*, it needs to combine them
# e.g: inherits from .container-builds-angle and .container-builds-piglit
# should make CI_BUILD_COMPONENTS="angle piglit"
CI_BUILD_COMPONENTS: "angle"
.container-builds-x86_64:
extends:
- .container-builds-angle
variables:
CI_BUILD_COMPONENTS: "angle"
.container-builds-arm64:
extends:
- .container-builds-angle
variables:
CI_BUILD_COMPONENTS: "angle"
.use-base-image:
extends:
- .container
@@ -72,16 +101,20 @@ debian/x86_64_build-base:
- .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_IMAGE}
MESA_BASE_IMAGE: "debian/x86_64_build-base"
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_ARTIFACTS_BASE_TAG: *debian-x86_64_build-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build-base
@@ -91,14 +124,18 @@ debian/x86_64_build:
- .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_IMAGE_PATH}
MESA_IMAGE_PATH: "debian/x86_64_build"
MESA_IMAGE_TAG: *debian-x86_64_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build
@@ -110,12 +147,15 @@ debian/x86_32_build:
MESA_IMAGE_TAG: &debian-x86_32_build ${DEBIAN_BUILD_TAG}
.use-debian/x86_32_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image-base-tag
variables:
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
@@ -125,14 +165,18 @@ debian/ppc64el_build:
- .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:
- debian/ppc64el_build
@@ -142,29 +186,52 @@ debian/s390x_build:
- .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:
- debian/s390x_build
# Android NDK cross-build image
.android-variables:
extends:
- .container-builds-android
variables:
ANDROID_VERSION: 14
ANDROID_NDK_VERSION: "r27c"
ANDROID_SDK_VERSION: 34
# Space-separated list of interesting CTS modules
ANDROID_CTS_MODULES: CtsGraphicsTestCases
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
debian/android_build:
extends:
- .android-variables
- .container-builds-android
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
ANDROID_SDK_VERSION: 33
ANDROID_NDK: android-ndk-r25b
.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"
@@ -172,157 +239,6 @@ debian/android_build:
needs:
- debian/android_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}"
.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
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}"
.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
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: .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
ANDROID_NDK: android-ndk-r25b
.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}"
rules:
# python-test requires this job
- !reference [python-test, rules]
- !reference [.container, rules]
.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
# Debian based ARM build image
debian/arm64_build:
extends:
@@ -330,28 +246,31 @@ debian/arm64_build:
- .container
- .debian-container-version
tags:
- aarch64
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
variables:
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-arm64-llvm 19
.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:
- 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_DISTRIBUTION_VERSION: "3.21"
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
# Alpine based x86_64 build image
@@ -363,14 +282,16 @@ alpine/x86_64_build:
LLVM_VERSION: &alpine-llvm_version 19
rules:
# Note: the next three lines must remain in that order, so that the rules
# in `linkcheck-docs` catch nightly pipelines before the rules in `pages`
# in `linkcheck-docs` catch nightly pipelines before the rules in `deploy-docs`
# exclude them.
- !reference [linkcheck-docs, rules]
- !reference [pages, rules]
- !reference [deploy-docs, rules]
- !reference [test-docs, rules]
- !reference [.container, rules]
.use-alpine/x86_64_build:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .set-image
variables:
@@ -393,24 +314,263 @@ fedora/x86_64_build:
- .fdo.container-build@fedora
- .container
variables:
FDO_DISTRIBUTION_VERSION: 38
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:
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:
- 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:
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:
- debian/x86_64_test-base
# Debian based ARMv7/armhf test image base
debian/arm32_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .debian-container
- .firmware_arm32
variables:
MESA_IMAGE_TAG: &debian-arm32_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: *debian-arm64-llvm
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
.use-debian/arm32_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .use-base-image
variables:
MESA_BASE_IMAGE: "debian/arm32_test-base"
MESA_BASE_TAG: *debian-arm32_test-base
LLVM_VERSION: *debian-arm64-llvm
FDO_DISTRIBUTION_PLATFORM: "linux/arm/v7"
needs:
- debian/arm32_test-base
# Debian based aarch64 test image base
debian/arm64_test-base:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_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:
- $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:
- 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:
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:
- 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:
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:
- 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:
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:
- 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:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_X86_64
extends:
- .fdo.container-build@debian
- .debian-container-version
- .set-image
variables:
MESA_IMAGE_PATH: "debian/x86_64_pyutils"
MESA_IMAGE_TAG: *debian-x86_64_pyutils
needs:
- debian/x86_64_pyutils
# Debian based ARMv7/armhf test image for GL
debian/arm32_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm32_test-base
variables:
MESA_IMAGE_TAG: &debian-arm32_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/arm32_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm32_test-base
MESA_IMAGE_PATH: "debian/arm32_test-gl"
MESA_IMAGE_TAG: *debian-arm32_test-gl
needs:
- debian/arm32_test-gl
# Debian based ARMv7/armhf test image for VK
debian/arm32_test-vk:
rules:
- when: never # There are currently no arm32 VK jobs
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm32_test-base
variables:
MESA_IMAGE_TAG: &debian-arm32_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/arm32_test-vk:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-arm32_test-base
MESA_IMAGE_PATH: "debian/arm32_test-vk"
MESA_IMAGE_TAG: *debian-arm32_test-vk
needs:
- debian/arm32_test-vk
# Debian based aarch64 test image for GL
debian/arm64_test-gl:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends:
- .use-debian/arm64_test-base
- .container-builds-arm64
variables:
MESA_IMAGE_TAG: &debian-arm64_test-gl ${DEBIAN_TEST_GL_TAG}
.use-debian/arm64_test-gl:
tags:
- $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:
- debian/arm64_test-gl
# Debian based aarch64 test image for VK
debian/arm64_test-vk:
tags:
- $FDO_RUNNER_JOB_PRIORITY_TAG_AARCH64
extends: .use-debian/arm64_test-base
variables:
MESA_IMAGE_TAG: &debian-arm64_test-vk ${DEBIAN_TEST_VK_TAG}
.use-debian/arm64_test-vk:
tags:
- $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:
- 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/adl-fw.json
.gitlab-ci/firmware/i915/mtl-fw.json
.firmware_arm64:
@@ -427,7 +587,7 @@ fedora/x86_64_build:
- .container+build-rules
- .debian-container-version
stage: container
timeout: 90m
timeout: 120m
variables:
GIT_STRATEGY: fetch
MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
@@ -440,20 +600,22 @@ kernel+rootfs_x86_64:
- .use-debian/x86_64_build-base
- .kernel+rootfs
- .firmware_x86_64
- .container-builds-x86_64
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
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
- .container-builds-arm64
variables:
DEBIAN_ARCH: "arm64"
LLVM_VERSION: *debian-arm64-llvm
kernel+rootfs_arm32:
extends:
@@ -461,6 +623,7 @@ kernel+rootfs_arm32:
- .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:
@@ -570,7 +733,7 @@ windows_msvc:
extends:
- .windows_container_build
variables:
MESA_IMAGE_PATH: &windows_msvc_image_path ${WINDOWS_X64_MSVC_PATH}
MESA_IMAGE_PATH: &windows_msvc_image_path "windows/x86_64_msvc"
MESA_IMAGE_TAG: ${WINDOWS_X64_MSVC_TAG}
DOCKERFILE: Dockerfile_msvc
MESA_BASE_IMAGE: "mcr.microsoft.com/windows/server:ltsc2022"
@@ -585,7 +748,7 @@ windows_build_msvc:
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
MESA_IMAGE_PATH: &windows_build_image_path ${WINDOWS_X64_BUILD_PATH}
MESA_IMAGE_PATH: &windows_build_image_path "windows/x86_64_build"
MESA_IMAGE_TAG: &windows_build_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_BUILD_TAG}
DOCKERFILE: Dockerfile_build
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path
@@ -604,7 +767,7 @@ windows_test_msvc:
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
MESA_IMAGE_PATH: &windows_test_image_path ${WINDOWS_X64_TEST_PATH}
MESA_IMAGE_PATH: &windows_test_image_path "windows/x86_64_test"
MESA_IMAGE_TAG: &windows_test_image_tag ${WINDOWS_X64_MSVC_TAG}--${WINDOWS_X64_TEST_TAG}
DOCKERFILE: Dockerfile_test
MESA_BASE_IMAGE_PATH: *windows_msvc_image_path

View File

@@ -6,6 +6,10 @@
# 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
@@ -14,22 +18,36 @@ set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${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 \
if curl -L --retry 4 -f --retry-delay 60 -s \
"https://${S3_PATH}/done"; then
echo "Remote files are up-to-date, skip rebuilding them."
exit
fi
}
check_fluster()
{
S3_PATH_FLUSTER="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DATA_STORAGE_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
if curl -L --retry 4 -f --retry-delay 60 -s \
"https://${S3_PATH_FLUSTER}/done"; then
echo "Fluster vectors are up-to-date, skip downloading them."
export SKIP_UPDATE_FLUSTER_VECTORS=1
fi
}
check_minio "${FDO_UPSTREAM_REPO}"
check_minio "${CI_PROJECT_PATH}"
check_fluster "${FDO_UPSTREAM_REPO}"
check_fluster "${CI_PROJECT_PATH}"
. .gitlab-ci/container/container_pre_build.sh
# Install rust, which we'll be using for deqp-runner. It will be cleaned up at the end.
@@ -40,34 +58,12 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
BUILD_VK="ON"
GCC_ARCH="aarch64-linux-gnu"
KERNEL_ARCH="arm64"
DEFCONFIG="arch/arm64/configs/defconfig"
DEVICE_TREES="rk3399-gru-kevin.dtb"
DEVICE_TREES+=" meson-g12b-a311d-khadas-vim3.dtb"
DEVICE_TREES+=" meson-gxl-s805x-libretech-ac.dtb"
DEVICE_TREES+=" meson-gxm-khadas-vim2.dtb"
DEVICE_TREES+=" sun50i-h6-pine-h64.dtb"
DEVICE_TREES+=" imx8mq-nitrogen.dtb"
DEVICE_TREES+=" mt8192-asurada-spherion-r0.dtb"
DEVICE_TREES+=" mt8183-kukui-jacuzzi-juniper-sku16.dtb"
DEVICE_TREES+=" tegra210-p3450-0000.dtb"
DEVICE_TREES+=" apq8016-sbc.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
@@ -87,9 +83,6 @@ else
BUILD_VK="ON"
GCC_ARCH="x86_64-linux-gnu"
KERNEL_ARCH="x86_64"
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
DEVICE_TREES=""
KERNEL_IMAGE_NAME="bzImage"
CONTAINER_ARCH_PACKAGES=(
libasound2-dev libcap-dev libfdt-dev libva-dev p7zip wine
)
@@ -143,6 +136,7 @@ CONTAINER_EPHEMERAL=(
libxcb-dri2-0-dev
libxkbcommon-dev
libwayland-dev
"lld-${LLVM_VERSION}"
ninja-build
openssh-server
patch
@@ -165,6 +159,8 @@ CONTAINER_EPHEMERAL=(
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' \
@@ -184,6 +180,7 @@ PKG_CI=(
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
@@ -196,6 +193,7 @@ PKG_MESA_DEP=(
)
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
@@ -212,6 +210,7 @@ PKG_DEP=(
[ "$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
@@ -245,7 +244,8 @@ mmdebstrap \
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"
"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
@@ -280,7 +280,8 @@ mv /apitrace/build $ROOTFS/apitrace
rm -rf /apitrace
############### Build ANGLE
if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
if [ "$DEBIAN_ARCH" != "armhf" ]; then
ANGLE_TARGET=linux \
. .gitlab-ci/container/build-angle.sh
mv /angle $ROOTFS/.
rm -rf /angle
@@ -293,6 +294,11 @@ 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
@@ -301,11 +307,21 @@ DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
[ "$BUILD_VK" == "ON" ] && DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
if [ "$BUILD_VK" == "ON" ]; then
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
mv /deqp $ROOTFS/.
if [ "$DEBIAN_ARCH" == "amd64" ]; then
DEQP_API=VK-main \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
fi
fi
rm -rf /VK-GL-CTS
mv /deqp-* $ROOTFS/.
############### Build SKQP
@@ -349,10 +365,15 @@ if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
fi
############### Build ci-kdl
section_start kdl "Prepare a venv for kdl"
. .gitlab-ci/container/build-kdl.sh
mv /ci-kdl $ROOTFS/
section_end kdl
############### 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
@@ -361,10 +382,6 @@ if [[ -e ".gitlab-ci/local/build-rootfs.sh" ]]; then
. .gitlab-ci/local/build-rootfs.sh
fi
############### Download prebuilt kernel
. .gitlab-ci/container/download-prebuilt-kernel.sh
############### Delete rust, since the tests won't be compiling anything.
rm -rf /root/.cargo
rm -rf /root/.rustup
@@ -375,21 +392,26 @@ if [ "$DEBIAN_ARCH" = "amd64" ]; then
fi
############### Fill rootfs
cp .gitlab-ci/setup-test-env.sh $ROOTFS/.
cp .gitlab-ci/container/setup-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/strip-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key $ROOTFS/.
cp .gitlab-ci/container/debian/winehq.gpg.key $ROOTFS/.
chroot $ROOTFS bash /setup-rootfs.sh
rm $ROOTFS/{llvm-snapshot,winehq}.gpg.key
rm "$ROOTFS/setup-test-env.sh"
rm "$ROOTFS/setup-rootfs.sh"
rm "$ROOTFS/strip-rootfs.sh"
cp /etc/wgetrc $ROOTFS/etc/.
# Copy all tags to the rootfs, so test jobs can check if they are using the intended version
TAG_FILE_DIR="$(get_tag_file)"
if [ -d "${TAG_FILE_DIR}" ]; then
cp --parents -r "${TAG_FILE_DIR}" $ROOTFS/.
fi
if [ "${DEBIAN_ARCH}" = "arm64" ]; then
mkdir -p /lava-files/rootfs-arm64/lib/firmware/qcom/sm8350/ # for firmware imported later
# 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"
@@ -400,8 +422,7 @@ popd
. .gitlab-ci/container/container_post_build.sh
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/"${ROOTFSTAR}" \
https://${S3_PATH}/"${ROOTFSTAR}"
s3_upload /lava-files/"${ROOTFSTAR}" "https://${S3_PATH}/"
touch /lava-files/done
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done https://${S3_PATH}/done
s3_upload /lava-files/done "https://${S3_PATH}/"

View File

@@ -1,144 +0,0 @@
From 2f4a38ecfde470abcd5d3c0ae7337bf780343469 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Tue, 15 Oct 2024 16:02:26 +0100
Subject: [PATCH] deps: Make more sources conditional
Fetching all the dependent sources - including at least one copy of LLVM
- can take a surprising amount of time. Mesa needs to build ANGLE as
part of CI, and the cost of downloading all the sources all of the time
is not OK for the number of dependencies we don't need during the build.
---
DEPS | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Submitted upstream at:
https://chromium-review.googlesource.com/c/angle/angle/+/5937820
diff --git a/DEPS b/DEPS
index 61263fb7af..0cff8c3126 100644
--- a/DEPS
+++ b/DEPS
@@ -17,6 +17,17 @@ gclient_gn_args = [
]
vars = {
+ 'angle_enable_cl': True,
+ 'angle_enable_cl_testing': False,
+ 'angle_enable_vulkan': True,
+ 'angle_enable_vulkan_validation_layers': True,
+ 'angle_enable_wgpu': True,
+ 'build_angle_deqp_tests': True,
+ 'build_angle_perftests': True,
+ 'build_with_swiftshader': True,
+ 'use_custom_libcxx': True,
+ 'export_libcxxapi_from_executables': True,
+
'android_git': 'https://android.googlesource.com',
'chromium_git': 'https://chromium.googlesource.com',
'chrome_internal_git': 'https://chrome-internal.googlesource.com',
@@ -673,7 +684,7 @@ deps = {
'third_party/catapult': {
'url': Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_with_catapult and not build_with_chromium',
},
# Cherry is a dEQP/VK-GL-CTS management GUI written in Go. We use it for viewing test results.
@@ -689,7 +700,7 @@ deps = {
'third_party/clspv/src': {
'url': Var('chromium_git') + '/external/github.com/google/clspv@a173c052455434a422bcfe5c12ffe44d574fd6e1',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_cl and angle_enable_vulkan and not build_with_chromium',
},
'third_party/cpu_features/src': {
@@ -700,7 +711,7 @@ deps = {
'third_party/dawn': {
'url': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'),
- 'condition': 'not build_with_chromium'
+ 'condition': 'angle_enable_wgpu and not build_with_chromium'
},
'third_party/depot_tools': {
@@ -745,6 +756,7 @@ deps = {
# glmark2 is a GPL3-licensed OpenGL ES 2.0 benchmark. We use it for testing.
'third_party/glmark2/src': {
'url': Var('chromium_git') + '/external/github.com/glmark2/glmark2@ca8de51fedb70bace5351c6b002eb952c747e889',
+ 'condition': 'build_angle_perftests',
},
'third_party/googletest': {
@@ -777,7 +789,7 @@ deps = {
# libjpeg_turbo is used by glmark2.
'third_party/libjpeg_turbo': {
'url': Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git@927aabfcd26897abb9776ecf2a6c38ea5bb52ab6',
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_angle_perftests and not build_with_chromium',
},
'third_party/libpng/src': {
@@ -787,7 +799,7 @@ deps = {
'third_party/llvm/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project@d222fa4521531cc4ac14b8e157d231c108c003be',
- 'condition': 'not build_with_chromium',
+ 'condition': '(build_with_swiftshader or (angle_enable_cl and angle_enable_vulkan)) and not build_with_chromium',
},
'third_party/jdk': {
@@ -824,12 +836,12 @@ deps = {
'third_party/libc++/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git@6a68fd412b9aecd515a20a7cf84d11b598bfaf96',
- 'condition': 'not build_with_chromium',
+ 'condition': 'use_custom_libcxx and not build_with_chromium',
},
'third_party/libc++abi/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git@9a1d90c3b412d5ebeb97a6e33d98e1d0dd923221',
- 'condition': 'not build_with_chromium',
+ 'condition': 'export_libcxxapi_from_executables and not build_with_chromium',
},
'third_party/libunwind/src': {
@@ -872,7 +884,7 @@ deps = {
'third_party/OpenCL-CTS/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenCL-CTS@e0a31a03fc8f816d59fd8b3051ac6a61d3fa50c6',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_cl_testing and not build_with_chromium',
},
'third_party/OpenCL-Docs/src': {
@@ -968,7 +980,7 @@ deps = {
'third_party/SwiftShader': {
'url': Var('swiftshader_git') + '/SwiftShader@7a9a492a38b7c701f7c96a15a76046aed8f8c0c3',
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_with_swiftshader and not build_with_chromium',
},
'third_party/turbine/cipd': {
@@ -984,6 +996,7 @@ deps = {
'third_party/VK-GL-CTS/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/VK-GL-CTS' + '@' + Var('vk_gl_cts_revision'),
+ 'condition': 'build_angle_deqp_tests',
},
'third_party/vulkan-deps': {
@@ -1038,7 +1051,7 @@ deps = {
'third_party/vulkan-validation-layers/src': {
'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@b63e9bd51fbd7bf8fea161a4f7c06994abc24b75',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_vulkan_validation_layers and not build_with_chromium',
},
'third_party/vulkan_memory_allocator': {
--
2.46.2

View File

@@ -1,182 +0,0 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 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 eb58cc7ba..98b8fc6cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,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 )
@@ -316,7 +316,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}")
@@ -338,7 +338,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}")
@@ -390,37 +390,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 6f8cd8fc5..b83e30f41 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,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 b8a35898c..cf02e6b70 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"
@@ -170,7 +171,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);
}
@@ -292,6 +293,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;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
} // Android
} // tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0

View File

@@ -1,26 +0,0 @@
From a602822c53e22e985f942f843ccadbfb64613212 Mon Sep 17 00:00:00 2001
From: Helen Koike <helen.koike@collabora.com>
Date: Tue, 27 Sep 2022 12:35:22 -0300
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
framework/qphelper/qpDebugOut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
index 6579e9f48..c200c6f6b 100644
--- a/framework/qphelper/qpDebugOut.c
+++ b/framework/qphelper/qpDebugOut.c
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
}
/* print() implementation. */
-#if (DE_OS == DE_OS_ANDROID)
+#if (0)
#include <android/log.h>
--
2.42.0

View File

@@ -0,0 +1,391 @@
From bcb1110cc00398dfb501aac83eddbd66d8fae425 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Wed, 29 Jan 2025 12:50:33 +0000
Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
Change-Id: Ie412f914bb6264ffbd502deea57d80cc11a9948e
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
framework/platform/CMakeLists.txt | 9 --
.../platform/android/tcuAndroidPlatform.cpp | 126 +-----------------
.../platform/android/tcuAndroidPlatform.hpp | 14 +-
framework/platform/lnx/tcuLnxPlatform.cpp | 9 +-
.../surfaceless/tcuSurfacelessPlatform.cpp | 54 --------
5 files changed, 3 insertions(+), 209 deletions(-)
diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
index ec1deb5c2..49fe412a7 100644
--- a/framework/platform/CMakeLists.txt
+++ b/framework/platform/CMakeLists.txt
@@ -15,8 +15,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
win32/tcuWin32Window.hpp
win32/tcuWin32EGLNativeDisplayFactory.hpp
win32/tcuWin32EGLNativeDisplayFactory.cpp
- win32/tcuWin32VulkanPlatform.hpp
- win32/tcuWin32VulkanPlatform.cpp
)
elseif ((DE_OS_IS_UNIX OR DE_OS_IS_OSX) AND (DEQP_USE_X11 OR DEQP_USE_WAYLAND OR DEQP_USE_HEADLESS))
@@ -28,8 +26,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
lnx/tcuLnxPlatform.hpp
lnx/tcuLnxEglPlatform.hpp
lnx/tcuLnxEglPlatform.cpp
- lnx/tcuLnxVulkanPlatform.hpp
- lnx/tcuLnxVulkanPlatform.cpp
)
include_directories(lnx)
@@ -164,8 +160,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
set(TCUTIL_PLATFORM_SRCS
osx/tcuOSXPlatform.cpp
osx/tcuOSXPlatform.hpp
- osx/tcuOSXVulkanPlatform.cpp
- osx/tcuOSXVulkanPlatform.hpp
osx/tcuOSXMetalView.mm
osx/tcuOSXMetalView.hpp
)
@@ -191,9 +185,6 @@ if (DEQP_USE_WAYLAND)
add_dependencies(tcutil-platform deqp-xdg-shell)
endif()
-# Add vkutil to the deps before tcutil so that it picks up the c++11 dependencies
-target_link_libraries(tcutil-platform vkutil)
-
target_link_libraries(tcutil-platform tcutil ${TCUTIL_PLATFORM_LIBS})
# Always link to glutil as some platforms such as Win32 always support GL
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index 0472fa615..40f523ee2 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -31,7 +31,6 @@
#include "eglwLibrary.hpp"
#include "eglwEnums.hpp"
#include "tcuFunctionLibrary.hpp"
-#include "vkWsiPlatform.hpp"
// Assume no call translation is needed
#include <android/native_window.h>
@@ -217,102 +216,6 @@ eglu::NativeDisplay *NativeDisplayFactory::createDisplay(const EGLAttrib *attrib
return new NativeDisplay();
}
-// Vulkan
-
-class VulkanLibrary : public vk::Library
-{
-public:
- VulkanLibrary(const char *libraryPath)
- : m_library(libraryPath != DE_NULL ? libraryPath : "libvulkan.so")
- , m_driver(m_library)
- {
- }
-
- const vk::PlatformInterface &getPlatformInterface(void) const
- {
- return m_driver;
- }
-
- const tcu::FunctionLibrary &getFunctionLibrary(void) const
- {
- return m_library;
- }
-
-private:
- const tcu::DynamicFunctionLibrary m_library;
- const vk::PlatformDriver m_driver;
-};
-
-DE_STATIC_ASSERT(sizeof(vk::pt::AndroidNativeWindowPtr) == sizeof(ANativeWindow *));
-
-class VulkanWindow : public vk::wsi::AndroidWindowInterface
-{
-public:
- VulkanWindow(tcu::Android::Window &window)
- : vk::wsi::AndroidWindowInterface(vk::pt::AndroidNativeWindowPtr(window.getNativeWindow()))
- , m_window(window)
- {
- }
-
- void setVisible(bool visible)
- {
- DE_UNREF(visible);
- }
-
- void resize(const UVec2 &newSize)
- {
- DE_UNREF(newSize);
- }
-
- void setMinimized(bool minimized)
- {
- DE_UNREF(minimized);
- TCU_THROW(NotSupportedError, "Minimized on Android is not implemented");
- }
-
- ~VulkanWindow(void)
- {
- m_window.release();
- }
-
-private:
- tcu::Android::Window &m_window;
-};
-
-class VulkanDisplay : public vk::wsi::Display
-{
-public:
- VulkanDisplay(WindowRegistry &windowRegistry) : m_windowRegistry(windowRegistry)
- {
- }
-
- vk::wsi::Window *createWindow(const Maybe<UVec2> &initialSize) const
- {
- Window *const window = m_windowRegistry.tryAcquireWindow();
-
- if (window)
- {
- try
- {
- if (initialSize)
- window->setBuffersGeometry((int)initialSize->x(), (int)initialSize->y(), WINDOW_FORMAT_RGBA_8888);
-
- return new VulkanWindow(*window);
- }
- catch (...)
- {
- window->release();
- throw;
- }
- }
- else
- TCU_THROW(ResourceError, "Native window is not available");
- }
-
-private:
- WindowRegistry &m_windowRegistry;
-};
-
static size_t getTotalSystemMemory(ANativeActivity *activity)
{
const size_t MiB = (size_t)(1 << 20);
@@ -338,8 +241,7 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
// Platform
Platform::Platform(NativeActivity &activity)
- : m_activity(activity)
- , m_totalSystemMemory(getTotalSystemMemory(activity.getNativeActivity()))
+ : m_totalSystemMemory(getTotalSystemMemory(activity.getNativeActivity()))
{
m_nativeDisplayFactoryRegistry.registerFactory(new NativeDisplayFactory(m_windowRegistry));
m_contextFactoryRegistry.registerFactory(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
@@ -355,16 +257,6 @@ bool Platform::processEvents(void)
return true;
}
-vk::Library *Platform::createLibrary(const char *libraryPath) const
-{
- return new VulkanLibrary(libraryPath);
-}
-
-void Platform::describePlatform(std::ostream &dst) const
-{
- tcu::Android::describePlatform(m_activity.getNativeActivity(), dst);
-}
-
void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
{
// Worst-case estimates
@@ -398,21 +290,5 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
limits.devicePageTableHierarchyLevels = 3;
}
-vk::wsi::Display *Platform::createWsiDisplay(vk::wsi::Type wsiType) const
-{
- if (wsiType == vk::wsi::TYPE_ANDROID)
- return new VulkanDisplay(const_cast<WindowRegistry &>(m_windowRegistry));
- else
- TCU_THROW(NotSupportedError, "WSI type not supported on Android");
-}
-
-bool Platform::hasDisplay(vk::wsi::Type wsiType) const
-{
- if (wsiType == vk::wsi::TYPE_ANDROID)
- return true;
-
- return false;
-}
-
} // namespace Android
} // namespace tcu
diff --git a/framework/platform/android/tcuAndroidPlatform.hpp b/framework/platform/android/tcuAndroidPlatform.hpp
index 32cc9068c..3c3f02d98 100644
--- a/framework/platform/android/tcuAndroidPlatform.hpp
+++ b/framework/platform/android/tcuAndroidPlatform.hpp
@@ -27,7 +27,6 @@
#include "tcuPlatform.hpp"
#include "egluPlatform.hpp"
#include "gluPlatform.hpp"
-#include "vkPlatform.hpp"
#include "tcuAndroidWindow.hpp"
#include "tcuAndroidNativeActivity.hpp"
@@ -36,7 +35,7 @@ namespace tcu
namespace Android
{
-class Platform : public tcu::Platform, private eglu::Platform, private glu::Platform, private vk::Platform
+class Platform : public tcu::Platform, private eglu::Platform, private glu::Platform
{
public:
Platform(NativeActivity &activity);
@@ -52,10 +51,6 @@ public:
{
return static_cast<const eglu::Platform &>(*this);
}
- virtual const vk::Platform &getVulkanPlatform(void) const
- {
- return static_cast<const vk::Platform &>(*this);
- }
virtual void getMemoryLimits(tcu::PlatformMemoryLimits &limits) const;
WindowRegistry &getWindowRegistry(void)
@@ -63,14 +58,7 @@ public:
return m_windowRegistry;
}
- // Vulkan Platform API
- vk::Library *createLibrary(const char *libraryPath) const;
- void describePlatform(std::ostream &dst) const;
- vk::wsi::Display *createWsiDisplay(vk::wsi::Type wsiType) const;
- bool hasDisplay(vk::wsi::Type wsiType) const;
-
private:
- NativeActivity &m_activity;
WindowRegistry m_windowRegistry;
const size_t m_totalSystemMemory;
};
diff --git a/framework/platform/lnx/tcuLnxPlatform.cpp b/framework/platform/lnx/tcuLnxPlatform.cpp
index 8c0a3ef06..6b1a4985a 100644
--- a/framework/platform/lnx/tcuLnxPlatform.cpp
+++ b/framework/platform/lnx/tcuLnxPlatform.cpp
@@ -23,12 +23,10 @@
#include "tcuLnxPlatform.hpp"
-#include "tcuLnxVulkanPlatform.hpp"
#include "tcuLnxEglPlatform.hpp"
#include "deUniquePtr.hpp"
#include "gluPlatform.hpp"
-#include "vkPlatform.hpp"
#if defined(DEQP_SUPPORT_X11)
#include <X11/Xlib.h>
@@ -64,10 +62,6 @@ public:
return !m_eventState.getQuitFlag();
}
- const vk::Platform &getVulkanPlatform(void) const
- {
- return m_vkPlatform;
- }
const eglu::Platform &getEGLPlatform(void) const
{
return m_eglPlatform;
@@ -79,12 +73,11 @@ public:
private:
EventState m_eventState;
- VulkanPlatform m_vkPlatform;
egl::Platform m_eglPlatform;
LinuxGLPlatform m_glPlatform;
};
-LinuxPlatform::LinuxPlatform(void) : m_vkPlatform(m_eventState), m_eglPlatform(m_eventState)
+LinuxPlatform::LinuxPlatform(void) : m_eglPlatform(m_eventState)
{
#if defined(DEQP_SUPPORT_GLX)
m_glPlatform.registerFactory(x11::glx::createContextFactory(m_eventState));
diff --git a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
index 1cea9dd97..3d5bd8b62 100644
--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
@@ -43,7 +43,6 @@
#include "tcuPixelFormat.hpp"
#include "tcuPlatform.hpp"
#include "tcuRenderTarget.hpp"
-#include "vkPlatform.hpp"
#include <EGL/egl.h>
@@ -93,52 +92,6 @@ namespace tcu
namespace surfaceless
{
-class VulkanLibrary : public vk::Library
-{
-public:
- VulkanLibrary(const char *libraryPath)
- : m_library(libraryPath != DE_NULL ? libraryPath : DEQP_VULKAN_LIBRARY_PATH)
- , m_driver(m_library)
- {
- }
-
- const vk::PlatformInterface &getPlatformInterface(void) const
- {
- return m_driver;
- }
- const tcu::FunctionLibrary &getFunctionLibrary(void) const
- {
- return m_library;
- }
-
-private:
- const tcu::DynamicFunctionLibrary m_library;
- const vk::PlatformDriver m_driver;
-};
-
-// Copied from tcuX11Platform.cpp
-class VulkanPlatform : public vk::Platform
-{
-public:
- vk::Library *createLibrary(const char *libraryPath) const
- {
- return new VulkanLibrary(libraryPath);
- }
-
- void describePlatform(std::ostream &dst) const
- {
- utsname sysInfo;
-
- deMemset(&sysInfo, 0, sizeof(sysInfo));
-
- if (uname(&sysInfo) != 0)
- throw std::runtime_error("uname() failed");
-
- dst << "OS: " << sysInfo.sysname << " " << sysInfo.release << " " << sysInfo.version << "\n";
- dst << "CPU: " << sysInfo.machine << "\n";
- }
-};
-
bool isEGLExtensionSupported(const eglw::Library &egl, eglw::EGLDisplay, const std::string &extName)
{
const vector<string> exts = eglu::getClientExtensions(egl);
@@ -185,13 +138,6 @@ public:
{
return *this;
}
- const vk::Platform &getVulkanPlatform(void) const
- {
- return m_vkPlatform;
- }
-
-private:
- VulkanPlatform m_vkPlatform;
};
class ContextFactory : public glu::ContextFactory
--
2.47.2

View File

@@ -1,4 +1,4 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 Mon Sep 17 00:00:00 2001
From 2503bf1be98eaa810672f6a6eb8f735a33511a4f 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
@@ -20,10 +20,10 @@ Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
3 files changed, 34 insertions(+), 52 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb58cc7ba..98b8fc6cc 100644
index 309bdda18..7c833751f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,7 @@ include_directories(
@@ -275,7 +275,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
@@ -32,7 +32,7 @@ index eb58cc7ba..98b8fc6cc 100644
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -316,7 +316,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
@@ -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)
@@ -41,7 +41,7 @@ index eb58cc7ba..98b8fc6cc 100644
# 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}")
@@ -338,7 +338,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
@@ -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})
@@ -50,7 +50,7 @@ index eb58cc7ba..98b8fc6cc 100644
# 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}")
@@ -390,37 +390,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
@@ -393,37 +393,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
@@ -90,54 +90,54 @@ index eb58cc7ba..98b8fc6cc 100644
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 6f8cd8fc5..b83e30f41 100644
index 82a9ab699..4eab14a39 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,25 @@ namespace Android
NativeActivity::NativeActivity (ANativeActivity* activity)
: m_activity(activity)
@@ -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;
+ }
- 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)
NativeActivity::~NativeActivity(void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index b8a35898c..cf02e6b70 100644
index 0472fa615..ff8929409 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
@@ -148,35 +148,35 @@ index b8a35898c..cf02e6b70 100644
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
Window* window = m_windowRegistry.tryAcquireWindow();
@@ -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__);
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);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -292,6 +293,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
@@ -319,6 +320,9 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
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;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
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
} // Android
} // tcu
} // namespace Android
} // namespace tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0
2.45.2

View File

@@ -1,173 +0,0 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 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 | 36 ++-----------------
.../android/tcuAndroidNativeActivity.cpp | 36 ++++++++++---------
.../platform/android/tcuAndroidPlatform.cpp | 12 ++++++-
3 files changed, 33 insertions(+), 51 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9c61d0db..d6ad2990b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,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 )
@@ -316,7 +316,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}")
@@ -390,37 +390,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 6f8cd8fc5..b83e30f41 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,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 b8a35898c..cf02e6b70 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"
@@ -170,7 +171,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);
}
@@ -292,6 +293,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;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
} // Android
} // tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0

View File

@@ -1,26 +0,0 @@
From a602822c53e22e985f942f843ccadbfb64613212 Mon Sep 17 00:00:00 2001
From: Helen Koike <helen.koike@collabora.com>
Date: Tue, 27 Sep 2022 12:35:22 -0300
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
framework/qphelper/qpDebugOut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
index 6579e9f48..c200c6f6b 100644
--- a/framework/qphelper/qpDebugOut.c
+++ b/framework/qphelper/qpDebugOut.c
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
}
/* print() implementation. */
-#if (DE_OS == DE_OS_ANDROID)
+#if (0)
#include <android/log.h>
--
2.42.0

View File

@@ -5,6 +5,8 @@
# KERNEL_ROOTFS_TAG
set -ex
. setup-test-env.sh
export DEBIAN_FRONTEND=noninteractive
# Needed for ci-fairy, this revision is able to upload files to

View File

@@ -2,6 +2,8 @@
set -u
uncollapsed_section_start wine "Setting up Wine"
export WINEPREFIX="$1"
export WINEDEBUG="-all"
@@ -24,3 +26,5 @@ rm crashdialog.reg
# it a bit more of time for it to be created solves the problem
# ...
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
section_end wine

View File

@@ -2,9 +2,14 @@
# Strip the image to a small minimal system.
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
section_start strip-rootfs "Stripping rootfs"
export DEBIAN_FRONTEND=noninteractive
UNNEEDED_PACKAGES=(
@@ -155,3 +160,5 @@ EOF
chmod +x /usr/bin/apt-get
ln -s /usr/bin/apt-get /usr/bin/apt
section_end strip-rootfs

View File

@@ -0,0 +1,42 @@
#!/usr/bin/env bash
set -exu
# Early check for required env variables, relies on `set -u`
: "$ANDROID_LLVM_ARTIFACT_NAME"
# if DEST_DIR is not set, assing an empty value, this prevents -u to fail
: "${DEST_DIR:=}"
# TODO, check if meson can do the download and wrap file generation for us.
LLVM_INSTALL_PREFIX="${DEST_DIR}/${ANDROID_LLVM_ARTIFACT_NAME}"
if [ ! -d "$LLVM_INSTALL_PREFIX" ]; then
echo "Cannot find an LLVM build in $LLVM_INSTALL_PREFIX" 1>&2
exit 1
fi
mkdir -p subprojects/llvm
cat << EOF > subprojects/llvm/meson.build
project('llvm', ['cpp'])
cpp = meson.get_compiler('cpp')
_deps = []
_search = join_paths('$LLVM_INSTALL_PREFIX', 'lib')
foreach d: ['libLLVMAggressiveInstCombine', 'libLLVMAnalysis', 'libLLVMAsmParser', 'libLLVMAsmPrinter', 'libLLVMBinaryFormat', 'libLLVMBitReader', 'libLLVMBitstreamReader', 'libLLVMBitWriter', 'libLLVMCFGuard', 'libLLVMCFIVerify', 'libLLVMCodeGen', 'libLLVMCodeGenTypes', 'libLLVMCore', 'libLLVMCoroutines', 'libLLVMCoverage', 'libLLVMDebugInfoBTF', 'libLLVMDebugInfoCodeView', 'libLLVMDebuginfod', 'libLLVMDebugInfoDWARF', 'libLLVMDebugInfoGSYM', 'libLLVMDebugInfoLogicalView', 'libLLVMDebugInfoMSF', 'libLLVMDebugInfoPDB', 'libLLVMDemangle', 'libLLVMDiff', 'libLLVMDlltoolDriver', 'libLLVMDWARFLinker', 'libLLVMDWARFLinkerClassic', 'libLLVMDWARFLinkerParallel', 'libLLVMDWP', 'libLLVMExecutionEngine', 'libLLVMExegesis', 'libLLVMExegesisX86', 'libLLVMExtensions', 'libLLVMFileCheck', 'libLLVMFrontendDriver', 'libLLVMFrontendHLSL', 'libLLVMFrontendOffloading', 'libLLVMFrontendOpenACC', 'libLLVMFrontendOpenMP', 'libLLVMFuzzerCLI', 'libLLVMFuzzMutate', 'libLLVMGlobalISel', 'libLLVMHipStdPar', 'libLLVMInstCombine', 'libLLVMInstrumentation', 'libLLVMInterfaceStub', 'libLLVMInterpreter', 'libLLVMipo', 'libLLVMIRPrinter', 'libLLVMIRReader', 'libLLVMJITLink', 'libLLVMLibDriver', 'libLLVMLineEditor', 'libLLVMLinker', 'libLLVMLTO', 'libLLVMMC', 'libLLVMMCA', 'libLLVMMCDisassembler', 'libLLVMMCJIT', 'libLLVMMCParser', 'libLLVMMIRParser', 'libLLVMObjCARCOpts', 'libLLVMObjCopy', 'libLLVMObject', 'libLLVMObjectYAML', 'libLLVMOption', 'libLLVMOrcDebugging', 'libLLVMOrcJIT', 'libLLVMOrcShared', 'libLLVMOrcTargetProcess', 'libLLVMPasses', 'libLLVMProfileData', 'libLLVMRemarks', 'libLLVMRuntimeDyld', 'libLLVMScalarOpts', 'libLLVMSelectionDAG', 'libLLVMSupport', 'libLLVMSymbolize', 'libLLVMTableGen', 'libLLVMTableGenCommon', 'libLLVMTarget', 'libLLVMTargetParser', 'libLLVMTextAPI', 'libLLVMTextAPIBinaryReader', 'libLLVMTransformUtils', 'libLLVMVectorize', 'libLLVMWindowsDriver', 'libLLVMWindowsManifest', 'libLLVMX86AsmParser', 'libLLVMX86CodeGen', 'libLLVMX86Desc', 'libLLVMX86Disassembler', 'libLLVMX86Info', 'libLLVMX86TargetMCA', 'libLLVMXRay']
_deps += cpp.find_library(d, dirs : _search)
endforeach
dep_llvm = declare_dependency(
include_directories : include_directories('$LLVM_INSTALL_PREFIX/include'),
dependencies : _deps,
version : '$(sed -n -e 's/^#define LLVM_VERSION_STRING "\([^"]*\)".*/\1/p' "${LLVM_INSTALL_PREFIX}/include/llvm/Config/llvm-config.h" )',
)
has_rtti = false
irbuilder_h = files('$LLVM_INSTALL_PREFIX/include/llvm/IR/IRBuilder.h')
EOF

View File

@@ -76,13 +76,16 @@ set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
# Securely pass the current variables to the crosvm environment
echo "Variables passed through:"
SCRIPTS_DIR=$(readlink -en "${0%/*}")
${SCRIPTS_DIR}/common/generate-env.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
${SCRIPTS_DIR}/common/export-gitlab-job-env-for-dut.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
cp ${SCRIPTS_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
# Set the crosvm-script as the arguments of the current script
echo "export SCRIPTS_DIR=${SCRIPTS_DIR}" > ${VM_TEMP_DIR}/crosvm-script.sh
echo ". ${VM_TEMP_DIR}/setup-test-env.sh" >> ${VM_TEMP_DIR}/crosvm-script.sh
echo "$@" >> ${VM_TEMP_DIR}/crosvm-script.sh
{
echo "export SCRIPTS_DIR=${SCRIPTS_DIR}"
echo "export RESULTS_DIR=${RESULTS_DIR}"
echo ". ${VM_TEMP_DIR}/setup-test-env.sh"
echo "$@"
} > ${VM_TEMP_DIR}/crosvm-script.sh
# Setup networking
/usr/sbin/iptables-legacy -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE
@@ -102,7 +105,12 @@ CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPTS_DIR}/crosvm-init.sh -- ${VS
[ "${CROSVM_GALLIUM_DRIVER:-}" = "llvmpipe" ] && \
CROSVM_LIBGL_ALWAYS_SOFTWARE=true || CROSVM_LIBGL_ALWAYS_SOFTWARE=false
set +e -x
set +e
if [ "${INSIDE_DEQP_RUNNER:-}" != "true" ]
then
set -x
fi
# We aren't testing the host driver here, so we don't need to validate NIR on the host
NIR_DEBUG="novalidate" \
@@ -116,7 +124,7 @@ crosvm --no-syslog run \
--net "host-ip=192.168.30.1,netmask=255.255.255.0,mac=AA:BB:CC:00:00:12" \
-s $VM_SOCKET \
--cid ${VSOCK_CID} -p "${CROSVM_KERN_ARGS}" \
/lava-files/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1
/kernel/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1
CROSVM_RET=$?
@@ -129,7 +137,7 @@ CROSVM_RET=$?
# Show crosvm output on error to help with debugging
[ ${CROSVM_RET} -eq 0 ] || {
set +x
{ set +x; } 2>/dev/null
echo "Dumping crosvm output.." >&2
cat ${VM_TEMP_DIR}/crosvm >&2
set -x

View File

@@ -7,115 +7,72 @@
section_start cuttlefish_setup "cuttlefish: setup"
set -xe
export HOME=/cuttlefish
export PATH=$PATH:/cuttlefish/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CI_PROJECT_DIR}/install/lib/:/cuttlefish/lib64
export EGL_PLATFORM=surfaceless
# Structured tagging check for angle
if [ -n "$ANGLE_TAG" ]; then
# Bail out if the ANGLE_TAG differs from what is offered in the system
ci_tag_test_time_check "ANGLE_TAG"
fi
export PATH=/cuttlefish/bin:$PATH
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:$LD_LIBRARY_PATH
# Pick up a vulkan driver
ARCH=$(uname -m)
export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER:-}_icd.$ARCH.json
syslogd
chown root.kvm /dev/kvm
chown root:kvm /dev/kvm
/etc/init.d/cuttlefish-host-resources start
pushd /cuttlefish
cd /cuttlefish
# Add a function to perform some tasks when exiting the script
function my_atexit()
{
# shellcheck disable=SC2317
HOME=/cuttlefish stop_cvd -wait_for_launcher=40
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR || true
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR || true
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR || true
}
# stop cuttlefish if the script ends prematurely or is interrupted
trap 'my_atexit' EXIT
trap 'exit 2' HUP INT PIPE TERM
ulimit -S -n 32768
VSOCK_BASE=10000 # greater than all the default vsock ports
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
HOME=/cuttlefish launch_cvd \
-daemon \
-verbosity=VERBOSE \
-file_verbosity=VERBOSE \
-use_overlay=false \
-vsock_guest_cid=$VSOCK_CID \
-enable_audio=false \
-enable_bootanimation=false \
-enable_minimal_mode=true \
-enable_modem_simulator=false \
-guest_enforce_security=false \
-report_anonymous_usage_stats=no \
-gpu_mode="$ANDROID_GPU_MODE" \
-cpus=${FDO_CI_CONCURRENT:-4} \
-memory_mb 8192 \
-kernel_path="/cuttlefish/bzImage" \
-initramfs_path="/cuttlefish/initramfs.img"
launch_cvd --verbosity=DEBUG --report_anonymous_usage_stats=n --cpus=8 --memory_mb=8192 --gpu_mode="$ANDROID_GPU_MODE" --daemon --enable_minimal_mode=true --guest_enforce_security=false --use_overlay=false
sleep 1
cd -
popd
adb connect vsock:3:5555
ADB="adb -s vsock:3:5555"
# shellcheck disable=SC2034 # used externally
ADB=adb
$ADB root
sleep 1
$ADB shell echo Hi from Android
# shellcheck disable=SC2035
$ADB logcat dEQP:D *:S &
# overlay vendor
OV_TMPFS="/data/overlay-remount"
$ADB shell mkdir -p "$OV_TMPFS"
$ADB shell mount -t tmpfs none "$OV_TMPFS"
$ADB shell mkdir -p "$OV_TMPFS/vendor-upper"
$ADB shell mkdir -p "$OV_TMPFS/vendor-work"
opts="lowerdir=/vendor,upperdir=$OV_TMPFS/vendor-upper,workdir=$OV_TMPFS/vendor-work"
$ADB shell mount -t overlay -o "$opts" none /vendor
$ADB shell setenforce 0
# deqp
$ADB push /deqp/modules/egl/deqp-egl-android /data/.
$ADB push /deqp/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt /data/
$ADB push /deqp-runner/deqp-runner /data/.
# download Android Mesa from S3
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
tar -xvf ${S3_ARTIFACT_NAME}.tar.zst
rm "${S3_ARTIFACT_NAME}.tar.zst" &
$ADB push install/all-skips.txt /data/.
$ADB push install/$GPU_VERSION-flakes.txt /data/.
$ADB push install/deqp-$DEQP_SUITE.toml /data/.
# remove 32 bits libs from /vendor/lib
$ADB shell rm /vendor/lib/dri/${ANDROID_DRIVER}_dri.so
$ADB shell rm /vendor/lib/libglapi.so
$ADB shell rm /vendor/lib/egl/libGLES_mesa.so
$ADB shell rm /vendor/lib/egl/libEGL_angle.so
$ADB shell rm /vendor/lib/egl/libEGL_emulation.so
$ADB shell rm /vendor/lib/egl/libGLESv1_CM_angle.so
$ADB shell rm /vendor/lib/egl/libGLESv1_CM_emulation.so
$ADB shell rm /vendor/lib/egl/libGLESv2_angle.so
$ADB shell rm /vendor/lib/egl/libGLESv2_emulation.so
# replace on /vendor/lib64
$ADB push install/lib/dri/${ANDROID_DRIVER}_dri.so /vendor/lib64/dri/${ANDROID_DRIVER}_dri.so
$ADB push install/lib/libglapi.so /vendor/lib64/libglapi.so
$ADB push install/lib/libEGL.so /vendor/lib64/egl/libEGL_mesa.so
$ADB shell rm /vendor/lib64/egl/libEGL_angle.so
$ADB shell rm /vendor/lib64/egl/libEGL_emulation.so
$ADB shell rm /vendor/lib64/egl/libGLESv1_CM_angle.so
$ADB shell rm /vendor/lib64/egl/libGLESv1_CM_emulation.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_angle.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_emulation.so
AOSP_RESULTS=/data/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
set +e
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; ./deqp-runner \
suite \
--suite /data/deqp-$DEQP_SUITE.toml \
--output $RESULTS \
--skips /data/all-skips.txt $DEQP_SKIPS \
--flakes /data/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS"
EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
$ADB pull $RESULTS $RESULTS_DIR
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR
section_end cuttlefish_results
exit $EXIT_CODE
# The script exits with the appropriate exit code
. "$(dirname "$0")/android-runner.sh"

View File

@@ -25,7 +25,9 @@ ARCH=$(uname -m)
export VK_DRIVER_FILES="$PWD"/install/share/vulkan/icd.d/"$VK_DRIVER"_icd."$ARCH".json
export OCL_ICD_VENDORS="$PWD"/install/etc/OpenCL/vendors/
if [ -n "$USE_ANGLE" ]; then
if [ -n "$ANGLE_TAG" ]; then
# Are we using the right angle version?
ci_tag_test_time_check "ANGLE_TAG"
export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
fi
@@ -38,69 +40,9 @@ findmnt -n tmpfs ${SHADER_CACHE_HOME} || findmnt -n tmpfs ${SHADER_CACHE_DIR} ||
mount -t tmpfs -o nosuid,nodev,size=2G,mode=1755 tmpfs ${SHADER_CACHE_DIR}
}
if [ -z "$DEQP_SUITE" ]; then
if [ -z "$DEQP_VER" ]; then
echo 'DEQP_SUITE must be set to the name of your deqp-gpu_version.toml, or DEQP_VER must be set to something like "gles2", "gles31-khr" or "vk" for the test run'
exit 1
fi
DEQP_WIDTH=${DEQP_WIDTH:-256}
DEQP_HEIGHT=${DEQP_HEIGHT:-256}
DEQP_CONFIG=${DEQP_CONFIG:-rgba8888d24s8ms0}
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-width=$DEQP_WIDTH --deqp-surface-height=$DEQP_HEIGHT"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=${DEQP_SURFACE_TYPE:-pbuffer}"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-gl-config-name=$DEQP_CONFIG"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden"
if [ "$DEQP_VER" = "vk" ] && [ -z "$VK_DRIVER" ]; then
echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
exit 1
fi
# Generate test case list file.
if [ "$DEQP_VER" = "vk" ]; then
MUSTPASS=/deqp/mustpass/vk-main.txt.zst
DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk
elif [ "$DEQP_VER" = "gles2" ] || [ "$DEQP_VER" = "gles3" ] || [ "$DEQP_VER" = "gles31" ] || [ "$DEQP_VER" = "egl" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER
elif [ "$DEQP_VER" = "gles2-khr" ] || [ "$DEQP_VER" = "gles3-khr" ] || [ "$DEQP_VER" = "gles31-khr" ] || [ "$DEQP_VER" = "gles32-khr" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/external/openglcts/modules/glcts
else
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/external/openglcts/modules/glcts
fi
[ -z "${DEQP_FRACTION:-}" ] && DEQP_FRACTION=1
[ -z "${CI_NODE_INDEX:-}" ] && CI_NODE_INDEX=1
[ -z "${CI_NODE_TOTAL:-}" ] && CI_NODE_TOTAL=1
# This ugly sed expression does a single pass across the case list to take
# into account the global fraction and sharding.
#
# First, we select only every n'th line, according to DEQP_FRACTION; for a
# fraction of 3, it will select lines 1, 4, 7, 10, etc.
#
# Then, we select $CI_NODE_INDEX/$CI_NODE_TOTAL for sharding; for a two-way
# shard, the first node will select lines 1 and 7, and the second node will
# select lines 4 and 10.
#
# Sharding like this gives us the best coverage, as sequential tests often
# test very slightly different permutations of the same functionality. So
# by distributing our skips as widely across the set as possible, rather
# than grouping them together, we get the broadest coverage.
zstd -d $MUSTPASS -c | sed -n "$(((CI_NODE_INDEX - 1) * DEQP_FRACTION + 1))~$((DEQP_FRACTION * CI_NODE_TOTAL))p" > /tmp/case-list.txt
if [ ! -s /tmp/case-list.txt ]; then
echo "Caselist generation failed"
exit 1
fi
fi
BASELINE=""
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
BASELINE="--baseline $INSTALL/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
@@ -127,27 +69,10 @@ if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-slow-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" != "gbm" ] ; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/x11-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" = "gbm" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/gbm-skips.txt"
fi
if [ -n "$USE_ANGLE" ]; then
if [ -n "$ANGLE_TAG" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/angle-skips.txt"
fi
if [ -n "$VK_DRIVER" ] && [ -z "$DEQP_SUITE" ]; then
# Bump the number of tests per group to reduce the startup time of VKCTS.
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --tests-per-group ${DEQP_RUNNER_TESTS_PER_GROUP:-5000}"
fi
if [ -n "${DEQP_RUNNER_MAX_FAILS:-}" ]; then
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --max-fails ${DEQP_RUNNER_MAX_FAILS}"
fi
# Set the path to VK validation layer settings (in case it ends up getting loaded)
# Note: If you change the format of this filename, look through the rest of the
# tree for other places that need to be kept in sync (e.g.
@@ -174,60 +99,37 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
sleep 1
fi
if [ -z "$DEQP_SUITE" ]; then
if [ -n "$DEQP_EXPECTED_RENDERER" ]; then
export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --renderer-check $DEQP_EXPECTED_RENDERER"
fi
if [ $DEQP_VER != vk ] && [ $DEQP_VER != egl ]; then
VER=$(sed 's/[() ]/./g' "$INSTALL/VERSION")
export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --version-check $VER"
fi
fi
uncollapsed_section_switch deqp "deqp: deqp-runner"
# Print the detailed version with the list of backports and local patches
{ set +x; } 2>/dev/null
for api in vk gl gles; do
deqp_version_log=/deqp/version-$api
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
# If you change the format of the suite toml filenames or the
# $GPU_VERSION-{fails,flakes,skips}.txt filenames, look through the rest
# of the tree for other places that need to be kept in sync (e.g.
# src/**/ci/gitlab-ci*.yml)
set +e
deqp-runner -V
if [ -z "$DEQP_SUITE" ]; then
deqp-runner \
run \
--deqp $DEQP \
--output $RESULTS_DIR \
--caselist /tmp/case-list.txt \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS \
-- \
$DEQP_OPTIONS; DEQP_EXITCODE=$?
else
# If you change the format of the suite toml filenames or the
# $GPU_VERSION-{fails,flakes,skips}.txt filenames, look through the rest
# of the tree for other places that need to be kept in sync (e.g.
# src/**/ci/gitlab-ci*.yml)
deqp-runner \
suite \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS_DIR \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS; DEQP_EXITCODE=$?
fi
deqp-runner \
suite \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS_DIR \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp-tools/testlog-to-xml \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$BASELINE \
${DEQP_RUNNER_MAX_FAILS:+--max-fails "$DEQP_RUNNER_MAX_FAILS"} \
${DEQP_FORCE_ASAN:+--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so}; DEQP_EXITCODE=$?
{ set +x; } 2>/dev/null
@@ -247,7 +149,7 @@ find $RESULTS_DIR -name \*.xml | \
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp/testlog.css /deqp/testlog.xsl "$RESULTS_DIR/" ";" \
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
deqp-runner junit \

View File

@@ -28,6 +28,22 @@
# that are used by a driver. See the various `.$DRIVER-rules` in the
# corresponding `src/**/ci/gitlab-ci.yml`.
# In case of issues with a farm, here are the people to contact:
# farm name | ci infrastructure used | admin(s)
# -----------------|----------------------------------|---------
# anholt | baremetal/poe-powered | @anholt
# austriancoder | ci-tron | @austriancoder
# collabora | lava | @daniels, @sergi
# google-freedreno | baremetal/{fastboot,cros-servo} | @robclark
# igalia | baremetal/poe-powered | @jasuarez, @chema
# lima | lava | @enunes
# microsoft | custom | @jenatali, @alatiera
# ondracka | ci-tron | @ondracka
# pengutronix | lava | @hnez, @lynxeye
# valve-kws | ci-tron | @mupuf, @eric
# valve-mupuf | ci-tron | @mupuf, @eric
# vmware | lava | @blu
.microsoft-farm-rules:
rules:
- exists: [ .ci-farms-disabled/microsoft ] # 1. Is disabled, never run
@@ -278,6 +294,27 @@
- !reference [.ondracka-farm-rules, rules]
.pengutronix-farm-rules:
rules:
- exists: [ .ci-farms-disabled/pengutronix ]
when: never
- if: '$CI_PIPELINE_SOURCE != "schedule"'
changes: [ .ci-farms-disabled/pengutronix ]
when: on_success
- if: '$CI_PIPELINE_SOURCE != "schedule"'
changes: [ .ci-farms-disabled/* ]
when: never
.pengutronix-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/pengutronix ]
when: never
- if: '$CI_PIPELINE_SOURCE != "schedule"'
changes: [ .ci-farms-disabled/pengutronix ]
when: never
- !reference [.pengutronix-farm-rules, rules]
# Skip container & build jobs when disabling any farm, and run them if any
# farm gets re-enabled.
# Only apply these rules in MR context, because otherwise we get a false
@@ -334,6 +371,10 @@
changes: [ .ci-farms-disabled/vmware ]
exists: [ .ci-farms-disabled/vmware ]
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/pengutronix ]
exists: [ .ci-farms-disabled/pengutronix ]
when: never
# Any other change to ci-farms/* means some farm is getting re-enabled.
# Run jobs in Marge pipelines (and let it fallback to manual otherwise)
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $GITLAB_USER_LOGIN == "marge-bot"'

Some files were not shown because too many files have changed in this diff Show More