Commit Graph

188142 Commits

Author SHA1 Message Date
Connor Abbott bfa189b6e8 docs/android: Improve instructions for replacing driver
"adb remount -R" doesn't actually remount partitions read/write, it just
enables the overlayfs and it needs to be followed by "adb remount" after
rebooting to actually remount.

Also, patchelf seems to work for changing the soname and is probably
better than hacking meson.build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28812>
2024-04-19 12:39:31 +00:00
Connor Abbott 57abef5af1 docs/android: Fix example meson cross file
The system needs to be android, or else we run into the libarchive build
error fixed in 735fe243a773cc3a13d0f4afedd0adb8f1bbd36f:

In file included from ../subprojects/libarchive-3.7.2/libarchive/archive_write_open_memory.c:33: ../subprojects/libarchive-3.7.2/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found

Also, it uses the aarch64 clang but "cpu = 'armv8'", which doesn't
work (armv8 is the 32-bit version). Use aarch64 as presumably intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28812>
2024-04-19 12:39:31 +00:00
Connor Abbott 61b2bd861f ir3: Rewrite nop insertion
Don't try to chase across blocks to find a matching destination for a
given source. This can be prone to exponential blowup when there is a
complicated series of if-ladders and we have to crawl through every
possible path. With scalar ALU, this was causing timeouts on one test
when we stopped counting scalar ALU. Rather than adding yet more
band-aids, just switch to a different approach that most other backends
are using where we have a scoreboard of outstanding registers and we
keep track of the cycle when each register becomes "ready". This
integrates nicely into the pre-existing ir3 legalize infrastructure for
(ss) and (sy), although it does require duplicating the logic in
ir3_delayslots() in a different form.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28750>
2024-04-19 12:02:59 +00:00
Connor Abbott 9df3323564 ir3/legalize: Fix intra-block state propagation with loops
At the beginning of each block we were taking the state for the current
block, which after traversing the block already will contain the state
at the *end* of the block, and combining it with the predecessors to get
the state for the *start* of the block. This will cause
over-synchronization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28750>
2024-04-19 12:02:58 +00:00
Sergi Blanch Torne ec45e8294c Uprev Piglit to f7ece74a107a2f99b2f494d978c84f8d51faa703
dd6f7eaf82...f7ece74a10

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28820>
2024-04-19 11:25:20 +00:00
Mary Guillemard 6c00441bfa panvk: Advertise VK_KHR_driver_properties
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Mary Guillemard f7f9b3d170 panvk: Move to vk_properties
This remove GetPhysicalDeviceProperties2 in favor of vk_properties.

This report the same values as previous on vulkaninfo.

In case some missing values, the same values as the ARM proprietary
driver were used.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Mary Guillemard a9f170f613 panvk: Fix driver UUID not being filled
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Mary Guillemard a0f80774ce panvk: Return os_page_size for minMemoryMapAlignment
The spec says "When mapping a memory allocation with vkMapMemory,
subtracting offset bytes from the returned pointer will always produce
an integer multiple of this limit", meaning the OS page size.

As the page size depends on the kernel configuration, this should be
queried at runtime.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28715>
2024-04-19 11:03:22 +00:00
Boris Brezillon c040283e7a panvk: Dissociate UBO and push_constant emission
Now that push constants are pushed to the FAU buffer, we can dissociate
UBO preparation from push constant preparation, and have
panvk_cmd_prepare_push_constants() called explicitly from
panvk_cmd_draw()/panvk_CmdDispatch().

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/28397>
2024-04-19 10:41:51 +00:00
Boris Brezillon 0721de3bb9 panvk: Stop lowering push constant loads to UBO loads
Now that we populate the push constant array properly, and the bifrost
compiler lowers dynamic push constant indexing, we can kill the push
constant lowering pass we had in panvk.

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/28397>
2024-04-19 10:41:51 +00:00
Boris Brezillon 46e764c5e1 panvk: Pass the push constant array to draw/dispatch calls
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/28397>
2024-04-19 10:41:51 +00:00
Boris Brezillon 04d7b9c396 panvk: Stop declaring one push constant array per graphics stage
The push constant array is shared by all stages anyway, so let's just
declare one array. While at it, change the name into push_uniforms to
be consistent with the name we have in panvk_dispatch.

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/28397>
2024-04-19 10:41:51 +00:00
Eric Engestrom fac41af93c rpi4/ci: add new flakes from last night's run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
Eric Engestrom 2d24561da9 rpi4/ci: sort flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
Eric Engestrom 3432abd611 rpi5/ci: add flakes from last night's run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
Eric Engestrom e34850ea23 rpi5/ci: sort flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28827>
2024-04-19 10:14:35 +00:00
David Rosca 9bfb07586c radv/video: Implement per picture type min/max QP
Bump required FW version for VCN 1 and 2.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28727>
2024-04-19 09:51:07 +00:00
David Rosca 694cc4728d radv/video: Avoid resetting rate control every frame
begin() resets rate control state, calling it every frame will cause
issues such as not reaching the desired target bitrate.
Rate control only has to be reset when changing rate control mode,
otherwise it's enough to update the parameters.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28727>
2024-04-19 09:51:06 +00:00
David Rosca 1000260ed8 radv/video: Set maxSublayerCount to 4 for H265
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28727>
2024-04-19 09:51:06 +00:00
Eric Engestrom b65341fd3a docs/ci: explain how gitlab considers "changes" when pushing on a fork branch
And add a workaround for people hitting this unexpected behaviour.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28809>
2024-04-19 09:42:42 +00:00
Juan A. Suarez Romero ea1f09a5f2 v3dv/ci: update expected list
Add new failures due CTS upgrade.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28824>
2024-04-19 09:19:09 +00:00
Timur Kristóf b3c6b48493 ac/nir/tess: Use LDS IO mapping when loading tess levels from LDS.
By accident, the VRAM mapping was used. This doesn't cause issues
in practice because the offsets are really the same, but it's still
better to fix this.

Fixes: c61eb54806
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:24 +00:00
Timur Kristóf 0fdb388698 ac/nir/tess: Split I/O mapping to two functions.
No functional changes, just improves code clarity.

Fixes: c61eb54806
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:24 +00:00
Timur Kristóf 2d9e38dbe5 radv: Calculate VRAM tess patch size independently of LDS size.
We recently made some effort to reduce the LDS use of TCS:
The lowering no longer uses the same output location mapping when
storing TCS outputs to LDS and VRAM. This means that the same
patch will use a different amount of LDS and VRAM.

Therefore, we need to properly calculate the patch size in VRAM
when determining the number of output patches.

Fixes: 0e481a4adc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:23 +00:00
Timur Kristóf 8190a65c78 radv: Rename LDS related variables in get_tcs_num_patches.
No functional changes, just improves code clarity.

Fixes: 0e481a4adc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28739>
2024-04-19 08:54:23 +00:00
Samuel Pitoiset 54b08d6bbf radv: return per plane requirements for disjoint images
Returning the whole image size/alignment isn't wrong but it's wasteful
for disjoint images which requires a separate bound memory object per
plane.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10997
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28808>
2024-04-19 08:17:55 +00:00
Samuel Pitoiset e18cc3b39b radv: fix waiting for occlusion queries on GFX6-8
Occlusion queries don't go through L2 on GFX6-8, and waiting properly
in shaders is more complicated to implement. Use the previous
WAIT_REG_MEM logic on these GPUs to fix this.

This fixes flickering on many games on GFX8.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8954
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9415
Fixes: d44651bfc3 ("radv: wait for occlusion queries in the resolve query shader")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28796>
2024-04-19 07:36:37 +00:00
Mary Guillemard fe1aa98ab9 nak: Allow SHF to use immediate encoding for shift
This is pretty common and avoid using a register for nothing in most
cases.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28819>
2024-04-19 07:18:22 +00:00
Eric Engestrom f008f6a33b util/futex: replace double-cast check with a simple sign check
We want to know whether the signed int can be represented by an unsigned int
of the same size (no down-cast); for that, all we need is for it to be `>= 0`,
so let's check that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28804>
2024-04-19 06:38:58 +00:00
Mike Blumenkrantz 042b8a65d3 brw/lower_a2c: fix for scalarized fs outputs
it's legal for a fs to write xyzw components separately,
and this pass should handle such cases

cc: mesa-stable

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28752>
2024-04-18 23:27:22 +00:00
Jordan Justen 4e5ed7ebd5 intel/brw: Avoid getting a stride of 0 for nir_intrinsic_exclusive_scan
Ref: 671745b616 ("intel/fs: Don't allow 0 stride on MOV destination")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28821>
2024-04-18 23:03:57 +00:00
Ian Romanick 90e12ed843 intel/brw/xe2+: Only apply Wa 22016140776 to math instructions
The check in has_invalid_src_region incorrectly omitted inst->is_math()
from the condition.

Fixes: 0e817ba548 ("intel/brw/xe2+: Implement Wa 22016140776")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28821>
2024-04-18 23:03:57 +00:00
Lucas Fryzek 112063a060 llvmpipe: Only use udmabuf if header is found
Fixes #11032

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28810>
2024-04-18 22:20:58 +00:00
Lucas Fryzek 053b5f3e0c llvmpipe: Only return null resource handle when dt is not mapped
Fixes #10995

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28810>
2024-04-18 22:20:57 +00:00
Robin Kertels 639fe038ce nvk: Enable EXT_nested_command_buffer.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27856>
2024-04-18 21:40:18 +00:00
Faith Ekstrand 8d56c89b55 nvk: Improve the unsupported handle type error
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28714>
2024-04-18 20:25:07 +00:00
Arthur Huillet 9542449397 nvk: remove useless MME scratch 26 usage
The blob uses MME shadow scratch 26 to indicate whether or not it is running in
a simulated environment (not real hardware).  If true, the SET_FALCON04
firmware method used to modify PRI registers isn't used.

As Nouveau only runs on real hardware, this is useless and can be removed.

Tested by running dEQP-VK.subgroups.vote.frag_helper.subgroupallequal_bvec2_fragment,
which exposes the original issue with a ~50% failure rate on RTX3080
(when disabling the register write altogether). With this change, the
success rate remains at 100%.

Signed-off-by: Arthur Huillet <ahuillet@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28714>
2024-04-18 20:25:07 +00:00
Iván Briano 164c0951a0 anv, hasvk: check requirements for USAGE_INPUT_ATTACHMENT properly
If the format doesn't support the COLOR_ATTACHMENT or DEPTH_STENCIL
features, it can't be used as an input attachment.

Fixes future CTS tests: dEQP-VK.api.info.unsupported_image_usage.*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28818>
2024-04-18 20:04:39 +00:00
Paulo Zanoni f3e97d30d9 anv: const-correct anv_{image,buffer}_is_sparse()
I had to do this in a debugging session when I wrote some extra code
to debug sparse issues. I also have a pending patch that will require
this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni 1cca5e8b32 anv/sparse: fail the right way in anv_GetDeviceImageSparseMemoryRequirements()
If an application tries to call
vkGetDeviceImageSparseMemoryRequirements() for an image that's not
supported by Sparse, then anv_image_init_from_create_info() will fail
and we will either hit the assertion in case of a debug build or just
pretend everything works in case of a release build. Properly return
no properties to signal the image is not supported.

The spec is not clear in specifying that this is what should be done
in this case, but this behavior should match the other
query-properties-from-sparse-images-we-didn't-create-yet functions
such as vkGetPhysicalDeviceSparseImageFormatProperties().

No known application outside my computer is tripping on this failure.
I discovered it when writing my own micro test cases for MSAA sparse.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni 10ee2a510a anv/xe: rename and refactor xe_exec_fill_sync()
While it lived inside anv_batch_chain.c it made sense to call this
function xe_exec_fill_sync() because, well, the function was used to
fill the sync objects for the xe execbuf ioctl. Now that the function
is exported to the .h file and accessible to the rest of the driver,
let's give it a name that reflects what it does instead of what it was
used for when it was static: call it vk_sync_to_drm_xe_sync() because
it converts a vk_sync to a drm_xe_sync.

Also let's bikeshed the implementation so that it returns the struct
it builds: this should make callers cleaner and easier to understand.

No functional changes, only bikeshedding.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni 1c9b13119e anv/xe: de-duplicate xe_exec_fill_sync()
I had accidentally hardcoded an alternative implementation in
xe_vm_bind_op().

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni 5346442e74 anv/xe: assert we're using drm_syncobjs only once
Everything on our xe.ko backend is built on top of this assertion.
Assert it during driver initialization and just don't bother with it
anymore later.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni 045182092e anv/xe: slightly improve error handling for the vm_bind ioctl
The reason we made the vm_bind ioctl return DEVICE_LOST on error is
that we thought there wasn't anything we could do if the ioctl failed.

Thomas Hellstrom pointed us that in case the system is under memory
pressure ENOMEM will be returned and there are things we can try to do
to make it work: either free memory or do fewer bind operations per
ioctl. For now let's just return the appropriate error for the case
(OUT_OF_HOST_MEMORY) so that maybe applications can try to something
about it. In the next patch we'll implement an additional strategy to
try to make things work.

Due to an unrleated failure, our CI system has also pointed out that
we were submitting invalid arguments, so we were getting an EINVAL.
Although we fixed that, these situations really shouldn't happen and
they should be easy to detect, so just put an assertion there, which
will make it easier for us developers to spot any issues.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni f17d7655fe anv/xe: add a 'flags' parameter to the vm_bind() kmd_backend function
For now there's only one flag, but we're about to add another.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
Paulo Zanoni 15b6f321af anv/xe: extract anv_vm_bind_to_drm_xe_vm_bind()
The xe_vm_bind_op() function is already way too big for my tiny little
brain. Make it 42 lines shorter.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28792>
2024-04-18 19:42:27 +00:00
José Roberto de Souza 461794554a intel/tools/error2hangdump: Add Xe KMD support
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza 0db081f096 intel/tools/error2hangdump: Move i915 parser to a function
This is needed so we can run i915 or xe function depending on
the error dump.

No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00
José Roberto de Souza 52d2d4ae2c intel/tools/error2hangdump: Move code that will be shared with Xe parser to error2hangdump_lib
No changes in behavior expected here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28720>
2024-04-18 19:12:41 +00:00