Commit graph

195769 commits

Author SHA1 Message Date
Lionel Landwerlin
05b641becc isl/tests: add TileX memcpy testing
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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
2994eca831 isl/tests: fix inclusive coordinate checking
The coordinates are supposed to be inclusive.

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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
0b22d43f86 isl/tests: use modulo for more variability per pixel
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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
e80a02f52d isl/tests: bump coordinate types to 32bits
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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
451b9e6850 isl/tests: rename ytile to be consistent with other names
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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
25d6b47298 isl/tests: fix coordinates for comparison scan
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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
3384179e26 isl/tests: fixup multi-tile testing
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
86900e3cf6 isl/tests: add a space in memcpy test error printouts
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/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
b2b654d851 isl: fix comment typo
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/31469>
2024-10-01 22:26:44 +00:00
Caio Oliveira
b4acc3fc42 intel/brw: Remove Gfx8- from test_eu_validate.c
These tests only run for Gfx9+.

Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31272>
2024-10-01 21:16:54 +00:00
Aleksi Sapon
06dfcffd20 llvmpipe: correctly implement output variables loads
GLSL 4.60 spec, section 4.3.6: output variables
should behave like private variables during shader
execution. Framebuffer fetching now also checks
that fb_fetch_output is set on the variable.

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31047>
2024-10-01 20:28:00 +00:00
Aleksi Sapon
942a584db2 llvmpipe: fix quad group helper invocation masking
https://docs.vulkan.org/spec/latest/chapters/shaders.html#shaders-helper-invocations

Concretely, this fixes implicit derivatives of SSBO
variables on triangle edges, which are used in USD.

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31047>
2024-10-01 20:28:00 +00:00
Mike Blumenkrantz
8a1ce9a144 util/vbuf: delete/fix broken incompatible stride calc
this was accidentally duplicated from the conditional below,
except this one didn't have the buffer_stride_unaligned
caps check, which meant any 4-byte attrib which was
unaligned got marked for rewrites even on drivers
supporting unaligned strides

the correct change should have checked the stride against
the component size in the top case

Fixes: 7672545223 ("gallium: move vertex stride to CSO")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31425>
2024-10-01 19:52:02 +00:00
Craig Stout
e2388350f2 tu: add OS guards to drm_format_mod
vk_image.h has these guards, and any non-{Linux}/{BSD}
compile would hit this issue.

The alternative is just to remove the OS-specific guards
in vk_image.h, since the modifier is just 64-bit opaque
number and theoretically can work on any OS, though the
non-Linux spec language is lacking.

Acked-by: Rob Clark <robdclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31453>
2024-10-01 19:17:25 +00:00
Valentine Burley
38ba3ea469 tu: Add an assert to tu6_plane_index
Like hk_image_aspects_to_plane in Honeykrisp, assert that non-depth/stencil formats have one aspect.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
9aaf115316 tu: Update comments about the blob driver
Newer versions of the blob don't seem to expose linear features for VK_FORMAT_D32_SFLOAT_S8_UINT,
but they advertise VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT for more formats now.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
087679343f tu: Use v2 format feature flags
Turnip supports VK_KHR_format_feature_flags2 but has been using a mixture of VK_FORMAT_FEATURE and
VK_FORMAT_FEATURE_2 flags. Always use the new 64-bit flags.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
296ea45bc9 tu: Set some feature bits earlier
Assign the feature bits for depth formats and VK_FORMAT_*_PACK16 earlier.
If we configure their optimalTilingFeatures before we copy those over to linearTilingFeatures
we don't have repeat them.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
c3dd62840b tu: Unify zeroing bufferFeatures
We have to disable bufferFeatures for a format for various reasons. Do this in one place for comprehensibility.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
03c75d32fd tu: Introduce tu_aspects_to_plane helper function
Add and use a new helper function, tu_aspects_to_plane, that combines tu6_plane_index and tu6_plane_format.

This allowed for spotting and fixing a copy-paste mistake in tu6_blit_image, in dst_format for D32_S8.
The existing code wouldn't return the right dst_format if you blitted an S8 image to the stencil aspect
of a D32_S8 image, which should be a legal thing to do.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
21181fb4f2 tu: Use existing helpers in tu_clear_blit
Use existing helpers for deciding the VK format to treat our data as for memcpy-style blits.
No need to special case these a second time when it's already done in our helpers.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
827e9bc0f4 tu: Use vk_format_get_plane_format
Use vk_format_get_plane_format for determining the plane format of multi-plane YCbCr formats where possible.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
39d943874e tu: Fix conditional check in tu_image_view_init
Only call tu6_plane_format for VK_FORMAT_D32_SFLOAT_S8_UINT in tu_image_view_init.
vk_format is always a single plane format here but checking the aspect mask wasn't enough.
It was possible for e.g. R8_UNORM to not have VK_IMAGE_ASPECT_COLOR_BIT apsect mask but a
PLANE aspect mask in formats like G8_B8_R8_3PLANE_420_UNORM.

This was masked by the default case in tu6_plane_format, which just returned vk_format_to_pipe_format
anyway without checking the plane index.

We need to fix this for when we switch tu6_plane_format to using vk_format_get_plane_format, where we
would otherwise trip an assert.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
7bd97313e5 tu: Use vk_format_get_plane_count instead of special casing
Use the vk_format_get_plane_count helper in tu_image_view_init instead of
checking the formats directly.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
913d452dc5 tu: Be more consistent with using vk_format helpers
We've been using a mixture of util_format and vk_format helpers.
Always use the vk_format ones when available.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
c5d180a0bb tu: Streamline setting YCbCr feature bits
Use ycbcr_info instead of checking the layout or the format directly.
Swap the order of the if statement for clarity.
These should make the code significanntly easier to read.

Also document Chia-I's findings on SEPARATE_RECONSTRUCTION_FILTER_BIT.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:00 +00:00
Juan A. Suarez Romero
c46a704e92 v3d/ci: use special kernel for full jobs
This kernel unmask all the MMU errors, so it gives us more visibility
for driver issues.

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/31445>
2024-10-01 18:06:31 +00:00
Samuel Pitoiset
e120176c58 ci: uprev VKCTS to 1.3.9.2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31423>
2024-10-01 17:30:38 +00:00
Lionel Landwerlin
17c3bd358e anv: limit render target cache flushing due to color output remapping
Fixes a performance regression of 1%/2% introduced in badb3f6301
("anv: Only flush render target cache when detecting RT changes")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31380>
2024-10-01 15:52:39 +00:00
Connor Abbott
5a42df669b ir3: Ban conversions with mismatching sizes
This prevents folding something like this:

add.u hrA, hrB, hrC
mov.u8u32 rD, hrA

When I wrote this I assumed that because the conversion source and ALU
destination were the same register that meant the types must have the
same size, but that's not the case with u8 which is an 8-bit type in a
16-bit register, so this could've been broken with 8-bit types.

Fixes: f58e1ef7ec ("tu: enable shaderInt8 support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31399>
2024-10-01 15:17:11 +00:00
Boris Brezillon
084f87915b panvk: Catch indirect allocation failures
The kmod layer allocates memory through the vulkan allocator for its
internal objects. When the allocation fails, we should return
VK_ERROR_OUT_OF_HOST_MEMORY, and the
dEQP-VK.api.object_management.alloc_callback_fail.* tests check this.

Generalize the errno trick we have and hide it behind panvk_error[f]()
macros, which serve as a replacement for vk_error[f]().

We also catch allocation failures in the panvk_cmd_alloc_xxx() path
so we can report the right error on the command buffer.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
b2ef147f33 panvk: Let panvk_priv_bo_create() return a VkResult
Knowing that a private BO couldn't be allocated is not enough, in some
situations we need to know why. Rework the panvk_priv_bo_create() to
return a VkResult.

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/31382>
2024-10-01 14:36:38 +00:00
Mary Guillemard
18068517a9 panvk: Cleanup rw_nc pool in panvk_device_cleanup_mempools
panvk_pool_cleanup call was missing.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7049d31676 ("panvk: Add a read-write non-cached memory pool for CSF events"
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
ce14681ebf panvk: Don't leak vertex shader program descriptors
Vertex shaders can have up to three different program descriptors. Free
all of them in panvk_shader_destroy().

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
bea7c59113 panvk: Don't call queue_finish() on non-initialized queues
panvk_per_arch(queue_init)() can fail, and we need to undo the
initialization only on queues that were properly initialized.

In order to do that, increment queue_count only after the
initialization succeeds, and adjust the test in the error path to not
leave an allocated but non-initialized panvk_queue object behind.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
904cf2b189 panvk/v10: Add missing cleanup_queue() in queue_finish()
Fixes a memory leak reported by
dEQP-VK.api.object_management.alloc_callback_fail.device_group.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
4645384b37 panvk: Fix stencil attachment resolve on JM
We need to update resolve_info to point to the stencil resolve info,
otherwise it's still pointing to the depth resolve info.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
2b00d080b6 panvk: Fix FB initialization when using non-compressed views of compressed images
vk_image_view::extent is adjusted to take non-compressed views of
compressed images into account, so let's use it instead of calling
vk_image_mip_level_extent() on the image.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
63fb2e2c04 panvk: Report allocation failures in the CreateImageView path
Allocation of the texture payload can fail, we need to report
VK_ERROR_OUT_OF_DEVICE_MEMORY in that case.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
7da23be734 panvk: Check allocation failures in panvk_shader_upload()
Allocations done in panvk_shader_upload() can fail. Add NULL checks so
we don't silently ignore such allocation 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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
bf9d6b96e0 panvk: Use the proper alignment for texture payloads
Texture is aligned on 32-byte, which matches the plane or multiplanar
surface descriptor constraint, and exceeds the surface descriptor one,
but let's be accurate and use the right descriptor alignment.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
cfc9448e82 panvk: Stop including pan_blend.h from panvk_device.h
We don't depend on it, and panvk_vX_blend.c already includes it.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
5d0072ae7e panvk: Don't reset errno in panvk_kmod_zalloc()
We shouldn't reset errno when the allocation succeeds, otherwise we might
be overriding previous allocation 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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
ea23d4f04e pan/kmod: Try to use local storage in panthor_kmod_vm_bind()
panthor_kmod_vm_bind() is usually called with a single op and at most
one sync, so let's optimize the low-number-of-ops-or-syncs case to
avoid transient heap allocation.

This also fixes some dEQP-VK.api.object_management.alloc_callback_fail.*
crashes where panthor_kmod_vm_bind(UNBIND) is called and not expected
to fail.

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/31382>
2024-10-01 14:36:38 +00:00
Job Noorman
211616cc98 ir3: disallow immediates for shfl src1
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: d43f39678c ("ir3: make backend aware of shfl:")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31457>
2024-10-01 13:48:40 +00:00
Juan A. Suarez Romero
306cc0e0d5 v3d/v3dv/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31458>
2024-10-01 13:04:21 +00:00
Rhys Perry
be64454710 nir/tests: test opt_loop_peel_initial_break with derefs in header block
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/31324>
2024-10-01 12:24:22 +00:00
Rhys Perry
0484044b1a nir/opt_loop: rematerialize header block derefs in their use blocks
Otherwise, we could end up with phis of derefs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31324>
2024-10-01 12:24:22 +00:00
Christian Gmeiner
1421319dcf compiler/rust: Copy MappedInstrs from NAK
Rename it to SmallVec, make it more generic and switch NAK
to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31409>
2024-10-01 11:33:35 +00:00
Tapani Pälli
8d82b7cfe8 drirc/anv: force_vk_vendor=-1 for Faaast Penguin
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11955
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/31438>
2024-10-01 10:53:10 +00:00