Commit graph

206790 commits

Author SHA1 Message Date
Marek Olšák
caddd67b8c nir/opt_vectorize_io: don't vectorize 16-bit IO to vec8 - it's illegal
NIR represents low bits of 16-bit IO as a separate vec4, and high bits as
another separate vec4. There is no representation that allows vec8.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:35 +00:00
Marek Olšák
1f80ff5550 nir/opt_vectorize_io: convert bool merge_low_high_16_to_32 to an enum
refactoring for the next commit

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:35 +00:00
Marek Olšák
6270136b7d nir/opt_varyings: set prev_stage/next_stage if they are NONE and validate them
Doing it here ensures that any linked shader will have the correct values
there.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:34 +00:00
Marek Olšák
e3d122ed7b nir/opt_varyings: completely exclude mediump from type changes
It broke mediump XFB, which needs the correct type for the up-conversion.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:34 +00:00
Marek Olšák
cf26760218 glsl: set prev/next_stage according to the new definition
Keep MESA_SHADER_NONE if there is no previous/next shader.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:34 +00:00
Marek Olšák
aba7b0831c nir: add shader_info::prev_stage
When lowering mediump to 16 bits, this will allow drivers to enable
the lowering only for certain pairs of stages, e.g. a driver can lower
mediump for VS->FS, but not GS->FS.

This could also be useful for other things.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
2025-06-12 19:35:33 +00:00
Eric Engestrom
3649f28771 lavapipe/ci: add missing VKD3D_PROTON_TAG
Fixes: 2b7ddc7d71 ("ci/vkd3d: Use structured tagging for vkd3d-proton")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35498>
2025-06-12 19:13:56 +00:00
Eric Engestrom
a07cd0e255 turnip/ci: add missing VKD3D_PROTON_TAG
Fixes: 2b7ddc7d71 ("ci/vkd3d: Use structured tagging for vkd3d-proton")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35498>
2025-06-12 19:13:56 +00:00
Eric Engestrom
03c73bdc35 nvk/ci: add missing VKD3D_PROTON_TAG
Fixes: 2b7ddc7d71 ("ci/vkd3d: Use structured tagging for vkd3d-proton")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35498>
2025-06-12 19:13:56 +00:00
LingMan
1853886023 rusticl: Initialize NIR option structs with default values
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Eases NIR maintenance since adding new members no longer requires touching rusticl.

The one const `nir_remove_dead_variables_options` has been duplicated as two local variables because
`default()` cannot be called from const contexts, yet.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35497>
2025-06-12 18:52:25 +00:00
Jonathan Gray
68be3b7159 util: fix OpenBSD/powerpc64 build
use defined(HAVE_ELF_AUX_INFO) as HAVE_ELF_AUX_INFO is not defined to a value
avoids 'error: expected value in expression' on powerpc64

Fixes: 67333c2632 ("util: Support elf_aux_info() on OpenBSD arm and ppc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35422>
2025-06-12 16:49:23 +00:00
Jason Macnak
3bf5347436 gfxstream: Fix strict aliasing violations in VkDecoder
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Test: cvd create --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35494>
2025-06-12 08:48:23 -07:00
Bo Hu
f3e9f0e9a6 gfxstream: update codegen for vkQueueFlushCommandsGOOGLE
This method requires removal of obsolete recording

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35494>
2025-06-12 08:48:23 -07:00
Daniel Stone
7bfb51a7e6 ci: Fix missing pipelines on user pipelines in MRs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Oops. We were being a bit too extensive with our rules and also skipping
the container stage for user (non-marge) pipelines in MRs unless
image-tags.yml had changed. We can't actually do this, because we might
still need to run the jobs to copy the containers into the user's
namespace, even if we don't need to rebuild them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35491>
2025-06-12 13:15:54 +00:00
Karol Herbst
ee1fe1a1e5 rusticl: implement cl_khr_spirv_queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35439>
2025-06-12 12:41:48 +00:00
Karol Herbst
3b2af3006e rusticl/device: refactor Device::new
Adding a DeviceBase type will allow us to do pass in a proper spirv_caps
object into SPIRVBin::get_lib_clc. Should also make device creation more
flexible.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35439>
2025-06-12 12:41:48 +00:00
Karol Herbst
95eb537548 include: update CL headers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35439>
2025-06-12 12:41:48 +00:00
Lionel Landwerlin
d0608425f4 anv: handle REMAINING_LAYERS with 3D images & maintenance9
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9a1485ec5c ("anv: missing bit from maintenance9")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35487>
2025-06-12 11:34:33 +00:00
Tapani Pälli
58c4b31d31 anv: small cleanup, remove unused helper function
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35450>
2025-06-12 11:15:21 +00:00
Erik Faye-Lund
b58dd5508e panfrost/ci: add new half-float fails
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35451>
2025-06-12 08:56:21 +00:00
Erik Faye-Lund
53c3943f4c panfrost/ci: fix sorting of fails
These were mostly sorted, but not quite. Let's fix that up, so it's
easier to add new fails in the right place.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35451>
2025-06-12 08:56:21 +00:00
Lars-Ivar Hesselberg Simonsen
5d0465a253 panvk: Skip barrier QFOT if src_qfi equals dst_qfi
Do not perform a queue family ownership transfer during memory barriers
if srcQueueFamilyIndex equals dstQueueFamilyIndex, as the Vulkan spec
mandates that this should only happen if the two values are unequal.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Fixes: 715d6e740a ("panvk: improve VK_QUEUE_FAMILY_EXTERNAL support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35458>
2025-06-12 08:12:23 +00:00
Peyton Lee
75736aa494 amd/gmlib: remove the executable bit
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
remove the executable bit for all files.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
fd1930b035 amd: add vpe_version
vpe_version describes which generation of vpe capabilities a chip has.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
548b026297 radeonsi/vpe: correct capability
should return the capability that hardware can support

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
ce3c1b018a radeonsi/vpe: remove background color
remove un-used background color value

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:27 +00:00
Peyton Lee
47163fa8d3 radeonsi/vpe: enhance scaling quality
add support for lanczos coefficients
which enhaces the quality of scaling down

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
2025-06-12 07:44:26 +00:00
Pierre-Eric Pelloux-Prayer
75f596d909 radeonsi: fix attribute_pos_prim_ring handling
Apply the same logic as the other rings.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35452>
2025-06-12 07:23:33 +00:00
Lionel Landwerlin
9a1485ec5c anv: missing bit from maintenance9
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 595889018a ("anv: implement VK_KHR_maintenance9")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35467>
2025-06-12 09:14:20 +03:00
Jianxun Zhang
a9aad4565f anv: Enable compression on CCS modifiers (xe2)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Don't report compressed memory type in the case of Xe2 modifiers
as the Vulkan spec requires identical memory types behind the
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.

Instead, we require dedicated allocation to get the right
compressed memory in allocation stage. The BMG modifier also
requires scanout flag to set. Refer to comments.

Thanks for the help from:
Nanley Chery <nanley.g.chery@intel.com>
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Kenneth Graunke <kenneth@whitecape.org>
and other people not listed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:12 +00:00
Jianxun Zhang
a45143e04c anv: Don't choose compression modifier when aux is disabled
When aux has to be disabled (ISL_SURF_USAGE_DISABLE_AUX_BIT)
for some reasons like VK_SHARING_MODE_CONCURRENT, we simply
cannot implicitly choose any modifier with compression.

Otherwise, we run into a situation that an image is created
with a modifier but without the aux support that modifier
requires. It will fail a CTS test once Xe2 modifiers are
enabled:

dEQP-VK.wsi.wayland.swapchain.private_data.image_sharing_mode

MESA: warning: ../src/intel/vulkan/anv_image.c:1198: image with
modifier unexpectedly has wrong aux usage (VK_ERROR_UNKNOWN)

GFX12.x (MTL) does not show this failure because only one queue
family is present. But they will face the same issue when aux is
disabled for any other reasons:

NotSupported (Only 1 queue families available for
VK_SHARING_MODE_CONCURRENT at vktWsiSwapchainTests.cpp:715)

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:12 +00:00
Jianxun Zhang
7c2f340d37 anv: Align size of compressed scanout buffers to 64KB on BMG (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
b7f7f1c74f anv: Treat imported compressed buffers as displayable (xe2)
As a part of the effort to unify the displayable attribute
on dmabuf sharing across drivers, we set scanout flag on
imported bos on Xe2+.

Refer to the comment in the change.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
0af794fe50 iris: Enable Xe2 modifier (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
b96d677c42 iris: Refactor function iris_flush_resource
Setting the removed flag true is not needed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
f88e153635 iris: Update conditions when flushing resource (xe2)
Update the conditions of reallocation for Xe2 modifiers and also
ensure the realloation to happen on all bos.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:11 +00:00
Jianxun Zhang
1149f1c5a1 iris: Choose PAT entry on imported buffers (xe2)
Refer to the comment added into the change, buffers imported
with a Xe2 modifier supporting compression should get a
compression-enabled PAT entry.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Jianxun Zhang
665f5e8757 iris: Add new modifiers into code (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Jianxun Zhang
785d1c3b86 iris: Align size of compressed scanout buffers to 64KB on BMG (xe2)
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Jianxun Zhang
2660b7c49d isl: Add Xe2 CCS modifiers (xe2)
Narrow down the definition of two compression flags suggested by
Nanley Chery <nanley.g.chery@intel.com> so that we can address
the unified compression support of Xe2 modifiers and don't have
to set media compression flag thats result more update in the
stack.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34567>
2025-06-12 04:07:10 +00:00
Christian Gmeiner
f261370995 asahi/lib: Don't use deprecated NIR_PASS_V macro
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35479>
2025-06-11 21:43:01 +00:00
Collabora's Gfx CI Team
350eccd032 Uprev Piglit to a0a27e528f643dfeb785350a1213bfff09681950
685ea49b47...a0a27e528f

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:59 +00:00
Valentine Burley
c793d20c9c ci/piglit: Collapse build section
Make the container build more readable and easier to follow in CI logs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:59 +00:00
Valentine Burley
33f5e6472d ci/vkd3d: Fix build when not uploading vkd3d-proton archive
Only delete vkd3d-proton.tar.zst if it exists.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:58 +00:00
Sergi Blanch-Torne
da1c8994bb Uprev ANGLE to c39f4a5c553cbee39af8f866aa82a9ffa4f02f5b
b135927706...c39f4a5c55

Signed-off-by: Sergi Blanch-Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35303>
2025-06-11 21:14:58 +00:00
Mike Blumenkrantz
2b39cd0722 util/box: make u_box_test_intersection_2d() consistent with other funcs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21738>
2025-06-11 20:46:29 +00:00
Georg Lehmann
ad80b554f4 spirv: use feq for OpIsInf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This effectively reverts fcca6a83cd because feq was clarified to be ordered
when used with exact and without fast math flags.

It's common for HW to only have free abs for floating point instructions.

Foz-DB Navi21:
Totals from 63 (0.08% of 80065) affected shaders:
Instrs: 337027 -> 336667 (-0.11%); split: -0.12%, +0.02%
CodeSize: 1846752 -> 1845000 (-0.09%); split: -0.13%, +0.03%
Latency: 3401087 -> 3400633 (-0.01%); split: -0.04%, +0.03%
InvThroughput: 847299 -> 845939 (-0.16%); split: -0.19%, +0.03%
VClause: 7693 -> 7694 (+0.01%)
Copies: 45175 -> 45240 (+0.14%); split: -0.12%, +0.27%
PreSGPRs: 3555 -> 3553 (-0.06%)
PreVGPRs: 4565 -> 4564 (-0.02%)
VALU: 225473 -> 225245 (-0.10%); split: -0.13%, +0.03%
SALU: 44735 -> 44625 (-0.25%)

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35437>
2025-06-11 18:34:21 +00:00
Faith Ekstrand
9c83e9f120 nvk: Drop nvk_buffer_address()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35472>
2025-06-11 18:09:38 +00:00
Rob Clark
cd4f6caa0d vtn: Handle non-32b tex dests
With cl_khr_fp16 we can get texture instructions w/ f16 dest.  Not all
drivers handle this, so convert to 32b dest and insert alu conversion to
the requested type.  Drivers that can handle f16 texture loads would
fold away the extra conversion with nir_opt_16bit_tex_image.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35470>
2025-06-11 17:48:10 +00:00
Mel Henning
d764e1c062 zink: Return NULL on vkCreateInstance failure
Previously we were returning uninitialized data on the error path.

Fixes: 015eda4a41 ("zink: deduplicate VkDevice and VkInstance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35471>
2025-06-11 17:32:27 +00:00