Commit graph

189224 commits

Author SHA1 Message Date
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
Yiwei Zhang
5b11c3ff0a venus: use common cmd pool_link
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
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
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
Pavel Ondračka
1b63ffc31e r300: remove support for tgsi_texcoord
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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