Commit graph

190104 commits

Author SHA1 Message Date
Faith Ekstrand
b26b0211b6 nak: sm32: Add Texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
2929dae1e8 nak: Initial SM32 support
This commit adds most operations to enable compute and basic draw tasks
for KeplerB (also known as Kepler 2.0, chips GK110 to GK180 or codename
NVF0-NVF1).  There are still major aspects such as as textures,
surfaces, shared atomics and scheduling that still need work and will be
added in other commits.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
ee4cff7603 nvk: nak: Add OpViLd support
Kepler and earlier GPUs do not support the ISBERD instruction but have a
different VILD (Vertex Indirect Load) instruction that provides less
functionality.  This commit adds support for the op in nak and nir,
needed for the upcoming encoder commit.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Konstantin Seurer
2d48b2cb47 radv: Use subgroup OPs for BVH updates on GFX12
This patch changes the update code to launch 8 invocations for every
internal node. The internal nodes update their child leaf nodes using
the geometry index and primitive index stored inside the primitive node.

Processing 8 child nodes in parallel is faster than looping over them.
Moving to one dispatch that updates all nodes in one go lets us get rid
of atomics and will also enable updatable BVHs to use pair compression.

Improves Elden Ring (high settings, max RT settings, 1080p) by around
10%.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:31 +02:00
Konstantin Seurer
c6fdf11303 radv: Make radv_update_memory non-static
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:25 +02:00
Konstantin Seurer
4a8e232e39 vulkan: Add more information to BVH update callbacks
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:16 +02:00
Konstantin Seurer
5da0810e5d vulkan/bvh: Add type information for vk_bvh_geometry_data
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:11 +02:00
Konstantin Seurer
8157f84246 radv: Refactor the update scratch layout code
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:06 +02:00
Konstantin Seurer
b2aa0647d5 radv: Use a specialized shader for in place updates
If src == dst, we only need to update aabbs for the internal nodes.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:00 +02:00
Konstantin Seurer
e1110d20f8 vulkan: Add acceleration structure update keys
The driver can use an optimized shader when src == dst.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:44:56 +02:00
Sergi Blanch Torne
0796d8c502 fluster: xfile update
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
During the maintenance, and proably the previous MR to the first attempt
to merge, fixed a failing test without testing on fluster because the
farm was disabled.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922>
2025-05-12 14:25:54 +00:00
Corentin Noël
77c0ff9fc7 virgl: Bail out on file descriptor duplication failure
Do not try to use a negative file descriptor.

CID: 1465120 Argument cannot be negative

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
965f41b550 virgl: Ensure to not overflow when encoding string marker
The maximal length is 65535 as an offset of 16 bits is being used to encode it.

Afterwards in VIRGL_CMD0, the buf_len equals 65536, so buf_len << 16 overflows its type which is uint32_t.

CID: 1604743 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
11a7b112cb vtest: Be more resilient when a resource creation has failed
Do not override the handle number with 0 if we fail to create a new resource.

Also make sure to store the handle consistently in an uint32_t.

CID: 1644460 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
5bec582e30 vtest: Silence some coverity issues
Add assertion about the returned read/written size being smaller than the size
left

CID: 1605126, 1604911
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
David Rosca
4fca9d9699 pipe/video: Remove st_rps_bits and UseStRpsBits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836>
2025-05-12 13:12:05 +00:00
David Rosca
7d55b510e8 frontends/va: Set HEVC NumShortTermPictureSliceHeaderBits
This is the same value as st_rps_bits, which VDPAU already uses.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836>
2025-05-12 13:12:05 +00:00
Matthieu Oechslin
4e68e422e0 r600: Take dual source blending in account when creating target mask with RATs
This is properly checked when filling CB_... registers in
evergreen_emit_image_state(), but not when generating CB_TARGET_MASK.
It would lead to an invalid command steam if a fragment shader
uses SSBO/Image load/store alongside dual source blending.

Acked-by: Patrick Lerda <patrick9876@free.fr>
Fixes: a6b3792843
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/622
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34333>
2025-05-12 11:42:37 +00:00
Martin Krastev
034cb260ac svga/ci: Increase vmware-vmx-piglit job parallelism to 4
Bump up vmware farm's vmware-vmx-piglit job parallelism to 4.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34925>
2025-05-12 11:23:20 +00:00
Rhys Perry
d0a09b6ff7 ac/llvm: correctly set alignment of vector global load/store
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For coherent/volatile access, this would be too high for vector access.

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

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

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903>
2025-05-12 10:51:57 +00:00
Rhys Perry
c1ecad2b11 ac/llvm: correctly split vector 8/16-bit stores
This assumes that the start of the load is 32-bit aligned.

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

This probably also fixed splitting with 8-bit stores.

Fixes arb_copy_buffer-overlap

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903>
2025-05-12 10:51:57 +00:00
Rhys Perry
ab09822b86 util: fix float to bfloat16 conversion with NaN
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: ecd2d2cf46 ("util: Add functions to convert float to/from bfloat16")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34882>
2025-05-12 10:26:01 +00:00
Karol Herbst
f0fa2209a8 nir: add nir_opt_algebraic_integer_promotion
This handles basic operations where clang promotes integers to 32 bits
according to the C99 spec in OpenCL C source code.

This is its own opt_algerbraic pass, because we don't wanna fight with
nir_lower_bit_size.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34641>
2025-05-12 09:29:20 +00:00
Danylo Piliaiev
2582cf9971 tu/lrz: Don't disable LRZ test for blend+depth write
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Only LRZ write should be disabled for this draw call, while
test is ok since failing the test doesn't affect blending.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34901>
2025-05-12 08:53:57 +00:00
Lars-Ivar Hesselberg Simonsen
7451bc3bef panvk/v9+: Set up limited texture descs for storage use
Storage access to images using LEA_TEX[_IMM] has limitations on some
fields in the texture descriptors, making them incompatible with the
descriptors required for texture access, specifically in the case
non-zero levels.

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

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

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

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

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

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

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

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

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

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

This change fixes this check.

Fixes: db20152c8a ("panfrost: Handle Valhall texturing")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
8b2ff9a8cf panfrost: Add pan_unpack to ForEachMacros
While various pan_pack macros were already there, pan_unpack was
missing.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839>
2025-05-12 08:37:08 +00:00
David Rosca
4ea52147c1 pipe/video: Remove unused UseRefPicList
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:59 +00:00
David Rosca
5edac5cd92 frontends/va: Only keep current slice RefPicList for HEVC
This is only used for slice header parsing now.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
David Rosca
639a95cd77 radeonsi/uvd: Stop using HEVC direct reflist
Not needed now that va frontend provides correct ref pic sets.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
David Rosca
203e9c29b4 radeonsi/vcn: Stop using HEVC direct reflist
Not needed now that va frontend provides correct ref pic sets.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
David Rosca
779edc0759 frontends/va: Correctly derive HEVC StCurrBefore, StCurrAfter and LtCurr
StCurrBefore and StCurrAfter are sorted by POC.
For LtCurr there is no defined order, so if there are multiple long term
references in a picture, we need to parse the slice header.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698>
2025-05-12 08:14:58 +00:00
Corentin Noël
c5d3a73f5e mesa: enable GL name reuse for virgl
This is now fixed upstream, the workaround is not required anymore.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34296>
2025-05-12 07:15:44 +00:00
Samuel Pitoiset
219a2b1e32 radv: ignore radv_zero_vram=true if zeroInitialDeviceMemory is enabled
To let applications like vkd3d-proton to take full control.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
21badbf336 radv: advertise VK_EXT_zero_initialize_device_memory
Only expose this extension when AMDGPU supports zerovram allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
eaf646d020 radv: implement VK_EXT_zero_initialize_device_memory
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
4b16de5e0d ac/gpu_info: add has_zerovram_support
AMDGPU 3.59.0+ clears VRAM on allocations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
2f2a5d31bd vulkan: add support for VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
62ec7e1056 vulkan: Update XML and headers to 1.4.315
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896>
2025-05-12 06:53:55 +00:00
Eric Engestrom
96d5c5df6f lavapipe/ci: document flakes
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/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
df3f279233 lavapipe/ci: replace large (and growing) list of flakes with a regex
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
055594f886 broadcom/ci: document fixed tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
86a29ce0ea radv/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
50c60dd07e radeonsi/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00
Eric Engestrom
6935f28cb3 radeonsi/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916>
2025-05-11 18:46:12 +00:00