Commit graph

195747 commits

Author SHA1 Message Date
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
Boris Brezillon
85bc72ad26 pan/genxml: Fix resource table alignment constraint on v9
While a resource entry indeed has an alignment requirement of 16 byte,
the resource table itself needs to be aligned on 64-byte. Given the
alignment is only used for allocation, make it 64 byte in the XML (as
done in v10.xml).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31440>
2024-10-01 09:09:51 +00:00
Boris Brezillon
77571b6b5b pan/genxml: Fix surface descriptor alignment on v6
Surface descriptors need to be aligned on 16-byte.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31440>
2024-10-01 09:09:51 +00:00
Boris Brezillon
cead2eae15 pan/genxml: Remove surface descriptors on v6/v7
Those don't exist on Bifrost.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31440>
2024-10-01 09:09:51 +00:00
Samuel Pitoiset
053c19e996 zink/ci: update expected list of failures for VANGOGH
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
493d5910a3 radv: advertise sampler2DViewOf3D
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
f5805bcb8e radv: implement 2D views of 3D images using 2D_ARRAY descriptors on GFX9+
This also allows us to disable a workaround in ACO for GFX9, but it
can't be removed completely because RadeonSI needs to use it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
dc5ef90547 ac/surface: add RADEON_SURF_VIEW_3D_AS_2D_ARRAY for GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Vignesh Raman
04f30870b6 ci: add Gen10 Arm Mali firmware to rootfs
Add firmware for Gen10 Arm Mali GPUs directly to rootfs since
it is not available from debian package. For the panthor kernel
driver to be able to execute jobs on the GPU it needs this firmware.

Update the kernel, which contains a fix to build the panthor driver
as module and use HWCI_KERNEL_MODULES to load panthor module.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31342>
2024-10-01 07:57:42 +00:00
Mike Blumenkrantz
8494849b92 vl: add pipe_video_buffer::flags to sync up with pipe_resource::flags
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31319>
2024-10-01 17:00:39 +10:00
Dave Airlie
caafa50af6 va: add some h264 fields
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31319>
2024-10-01 17:00:36 +10:00
Valentine Burley
1e623ad308 freedreno/ci: Document new flake
KHR-GL46.texture_view.view_classes started flaking after the CTS
uprev and is blocking merges.

Fixes: 3178170516 ("ci: bump gl cts versions")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31456>
2024-10-01 06:17:13 +00:00
Marek Olšák
765d1c4757 st/mesa: copy some TES shader info fields to TCS
radeonsi would like to have the tess prim mode and spacing in TCS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31448>
2024-10-01 02:48:30 +00:00
Hyunjun Ko
f76781feb8 anv: enable KHR_video_maintenance1
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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
ac2fd8ae66 anv: support VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR
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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
0981d20850 anv: support for inline query for vulkan video
v1. Removed the unnecessary query begin code.
(lionel.g.landwerlin@intel.com)

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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
1b06d4a8ea anv: consider VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR when
allocating mv storgae.

Fixes: 3ec8f7f99 ("anv/video: initial support for h264 encoding")

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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
8a3f852119 anv/video: support VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.
Which means to support CQP mode.

Fixes: 3ec8f7f99 ("anv/video: initial support for h264 encoding")
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/31436>
2024-10-01 10:45:14 +09:00
Faith Ekstrand
bf013cf8de vulkan: Add a comment explainint SEVERITY_WARNING_BIT for vk_error*()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31449>
2024-10-01 00:48:36 +00:00
Gert Wollny
29fd096d91 Revert: r600/sfn: call nir_lower_doubles explicitely"
This reverts commit 36c81b5e88.

With

   nir/opt_algebraic: Allow two-step lowering of ftrunc@64 to use ffract@64

it is no longer necessary to call nir_lower_doubles explicitely in r600/sfn.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29281>
2024-09-30 23:51:02 +00:00
Gert Wollny
f19f1ec17b nir/opt_algebraic: Allow two-step lowering of ftrunc@64 to use ffract@64
If ftrunc@64 is lowered by nir_lower_doubles it is turned into a
comparable long series of 32 bit operations. If the hardware
supports ffract@64 then nir_opt_algebraic can first lower ftrunc@64
to use some combinations with ffloor@64. They can then be turned
into a combination of fsub@64 and ffract@64 resulting in less
all-over instructions.

Fixes: 5218cff34b
   nir/algebraic: avoid double lowering of some fp64 operations

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29281>
2024-09-30 23:51:02 +00:00
Konstantin Seurer
8aa314d3e1 lavapipe: Set minAccelerationStructureScratchOffsetAlignment to 8
The 128 alignment was copied from RADV (which does not need it). 8 bytes
should be enough.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31365>
2024-09-30 23:24:05 +00:00
Konstantin Seurer
4cb8ecd47c Revert "lavapipe: Do not return in report_ray_intersection"
This reverts commit 466bbaf40f.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31405>
2024-09-30 22:58:12 +00:00