Commit graph

201327 commits

Author SHA1 Message Date
Samuel Pitoiset
3939214906 radv/nir: fix checking if task shader invocations query is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Samuel Pitoiset
91cdee8a38 radv: only enable emulated mesh/task shader queries on GFX10.3
It's not emulated on GFX11+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Louis-Francis Ratté-Boulianne
30825140d0 panfrost: Re-emit texture descriptor if the data size has changed
When updating an AFBC-packed resource, the size of the resulting
texture data can change while the BO and modifier stay the same. We
still need to update the texture descriptor in that situation so
that the size is properly reported. Having a smaller size than the
real one might cause artifacts as the GPU doesn't want to read past
the reported size.

A future (more foolproof) fix might involve having a hash key to
track the size of all slices independently, but this patch still
improves the situation and make sure we don't hit a relatively
common issue when using `PAN_MESA_DEBUG=forcepack`.

Fixes: bc55d150a9 ("panfrost: Add support for AFBC packing")
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32598>
2024-12-18 22:58:20 -05:00
Qiang Yu
8609f49d05 radeonsi: fix unigine heaven crash when use aco on gfx8/9
Unigine Heaven crash on GFX8/9 when use aco:
  heaven_x64: ../../amd/mesa/src/gallium/drivers/radeonsi/si_nir_lower_abi.c:813: lower_tex: Assertion `samp_index >= 0 && comp_index >= 0' failed.

GFX8/9 will clamp texture comparison value in si_nir_lower_abi,
but it has to be done after si_nir_lower_resource.

Fixes: ae933169 ("radeonsi: lower NIR resource srcs to descriptors last")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32694>
2024-12-19 02:40:50 +00:00
Felix DeGrood
5bb1b38409 anv: remove unnecessary driconf entries for anv_enable_buffer_comp
Prior commit enables this option for all vkd3d apps, making these
entries superfluous.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32692>
2024-12-18 21:02:19 +00:00
Felix DeGrood
e8a81ba98e anv: allow compressed buffers types on vkd3d titles
Extending MR !23519 to all vkd3d titles.

Additional improvements/regressions:
 - AssassinsCreedValhalla +6%
 - DyingLight2.dx12 +5%
 - Witcher3.dx12 +2%
 - SpidermanRemastered -0.5%

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12282
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32692>
2024-12-18 21:02:19 +00:00
Connor Abbott
247d11d635 tu: Allow UBWC with images with swapped formats.
While we're here, refactor the logic to split out the mutable and
pre-mutable cases since they are now very different.

The special case for NV12 is now necessary to avoid test failures, but
it was always necessary and we didn't notice it before because tests
didn't specify a format list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
113cb94343 freedreno/fdl, tu: Allow swaps with mutable tiled images
With the MUTABLEEN bit, swaps when rendering is now allowed. Plumb
through the mutable bit to the various format functions to allow them to
return the correct format and swap.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
c8782f3ac7 freedreno/fdl: Don't enable r8g8 special case for mutable images
The blob seems to always use the R16 pitch align. I don't check the
block size, because the blob seems to disable UBWC when setting the
MUTABLEEN bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
ca91844fc7 freedreno/fdl, tu: Make mutable part of the image layout
Right now the image layout depends on the format for the R8G8 special
case, but this is clearly wrong if we set the mutable bit because it
could be reinterpreted. Refactor how it's set to make it part of the
layout struct, rather than specified in the view.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
ef4c752b6e freedreno/fdl: Fix 3d mipmapping height alignment
We can get into a situation where the layer size for a given mip isn't
large enough to hold the pitch times the aligned height, i.e. the height
isn't aligned. This can happen even if the size is 4K aligned. The
hardware seems not to align the height for us, so we have to use the
MINLAYERSZ hammer.

This was found with a Vulkan test when enabling tiling for mutable
textures on a750, but it's also reproducable via
"bin/texelFetch fs sampler3D 76x76" using piglit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Valentine Burley
d5f88190fd turnip/ci: Update expectations
Seen in the last couple nightlies with the lower fractions.
(With a bonus a750-gl UnexpectedImprovement.)

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
2cbc93e4df ci/windows: Update expectations
Decreasing the fraction uncovered some new failures.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
435017700d ci/windows: Add a manual full job
Add the test-dozen-deqp-full nightly job, which runs VKCTS
without a fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
6076b8a49c ci/windows: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite,
which allows decreasing the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Mel Henning
d99b9d5937 nak: Fix two warnings of elided_named_lifetimes
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32667>
2024-12-18 18:12:45 +00:00
M Henning
5a65300439 nvk: Fix uninitialized var warnings in host_copy
Fixes: 6c5420cd30 ("nvk: Add host copy functions")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32667>
2024-12-18 18:12:45 +00:00
José Roberto de Souza
8e8097245f iris: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS
According to HAS it is necessary to emit this instruction once per
context so MI_MEM_FENCE works properly.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
2bd3df75e5 anv: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS
According to HAS it is necessary to emit this instruction once per
context so MI_MEM_FENCE works properly.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
b8f93bfd38 anv: Always create anv_async_submit in init_copy_video_queue_state()
A next patch will emit more instructions in video and copy queues
for Gfx 200 and newer but the current code only creates anv_async_submit
if device has aux_map.
Instead we can always create anv_async_submit and only submit it to
hardware if any instruction was emited.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
edb33b47ab intel/genxml/xe2: Add STATE_SYSTEM_MEM_FENCE_ADDRESS instruction
Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
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/32680>
2024-12-18 17:16:05 +00:00
Connor Abbott
9e8824371b tu: Re-enable tiled non-ubwc R8G8 images
This effectively reverts a70b197741 ("turnip: Force linear mode for
non-ubwc R8G8 formats"), except that in the meantime we added HIC
support without supporting R8G8 so we still have to force linear tiling
in that case. The previous commit is a better fix.

Tiled uncompressed images will be used for sparse residency support,
it's not valid to arbitarily not support sparse texturing on R8G8,
the blob does use a tiled uncompressed image in that case, and we will
have to also.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
2024-12-18 16:46:30 +00:00
Connor Abbott
c0404da1e5 freedreno/fdl: Make tiled r8g8 images have 4k alignment
This fixes an unrecoverable hang in the trace from #5926 without having
to disable tiling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
2024-12-18 16:46:29 +00:00
Connor Abbott
6615cbfeaf tu: Make userspace RD dump generic
Stop relying on the submit BO list, which won't exist with the new
"VM_BIND" uAPI. Instead, create a separate list in generic code, only
when dumping is enabled. As a bonus this means that it should work on
virtio and kgsl too, and more code is removed from the kernel backend.
We need to use the generic fence wait introduced in the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
a8b2f45346 util/dynarray: Add macro for appending an array
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
2b428e6b3a tu: Rename bo_list to submit_bo_list
There will be another similar bo_list for dumping purposes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
f97998ff17 tu/knl: Move u_trace fence handling to generic code
Contrary to what the comment said, kgsl and drm actually have very
similar semantics for fences. Add a common function to wait on a fence,
and embed the queue + fence directly instead of a syncobj abstraction
that doesn't actually gain us much. This common fence wait function will
also be helpful for making more code generic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
0e7a91595f tu/kgsl: Make wait_timestamp_safe() return VkResult
All of its callers want a VkResult.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
84d6eedd5e tu: Refactor the submit path
Each driver implemented the Vulkan runtime submit callback itself, which
resulted in a lot of duplicated code to iterate through the command
buffers and gather the list of IBs to execute, deal with autotune and
command buffers with suspending/resuming dynamic renderpasses, etc. This
has been getting steadliy worse and was only going to get worse with
sparse, since to implement sparse bind submissions we have to similarly
traverse and flatten an array of bind structures.

Borrow an idea from nvk, and add an abstraction of a "submit" object
which holds a (dynamically growing) list of pending commands to submit.
We add kernel-specific functions to create a submit, add commands to it,
and finally submit it. For sparse, we will add additional an additional
function that adds a sparse bind and then we will parse the Vulkan
structures in common code. For now, we move various misc.
driver-independent parts of the submission path into a common
tu_queue_submit() that calls into the new abstractions.

In the future, if we need to add driver-internal syncobjs to the
user-provided ones, we could use the same approach with waits and
signals. For now we provide them as part of the submit function.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
d8c9856e75 tu: Move queue-related code to a new file
We will be expanding this shortly, as we move device state over to queue
state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
David Rosca
6115cf93b0 radeonsi: Update minimum supported encode size for VCN5
Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32655>
2024-12-18 15:23:21 +00:00
Mykhailo Skorokhodov
ffdbc3bbef drirc/anv: force_vk_vendor=-1 for Bellwright
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12301

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32649>
2024-12-18 14:48:04 +00:00
Erik Faye-Lund
75ef006b6d pan/ci: update t860 ci xfails
Update to the latest nightly results

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32660>
2024-12-18 14:29:07 +00:00
Erik Faye-Lund
385301db2f panfrost: try to survive start-up alloc fails
If we fail to allocate memory this early on, we would otherwise fall
over and die. This propagates the errors up to the caller.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
c8a6709cbc panfrost: handle errors allocating csf oom-handler
This just wires up error-handling in the csf_oom_handler_init function,
and propagates it up to the csf_init_context function, as appropriate.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
56abe1e472 panfrost: handle pool-allocation errors
Because most pool-allocations happens during rendering, we have the same
issue as in the previous commit; we don't have a good way to report
the out-of-memory error here. So we do one of two things; we either
return a NULL-ish pointer, or we print an error and ignore the call.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
09cd92e283 panfrost: propagate cs_builder error instead of asserting
This makes csf_emit_batch_end propagage errors instead of asserting.
This will matter more for upcoming changes, but this starts reporting it
properly.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
a06c1eb88f panfrost: handle NULL-batches
When allocations fail, we can end up with NULL-batches. This means we
can't really do much, so let's bail what we're trying to do here.

Unfortunately, we can't always report this up to the call-site easily,
because some pipe_context functions don't allows us to return a
pipe_error value. So in those cases, make let's just return log an error
and return as if nothing happened. It's not great, but there's nothing
super obvious to do here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
e3f2bc7963 panfrost: handle mmap failures
This makes the call-sites to panfrost_bo_mmap check for allocation
errors, and try to do the right thing to handle it.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
054fbe5e4e panfrost: report errors from panfrost_bo_mmap
If we just set the pointer to NULL, a lot of the call-sites will end up
trying to dereference it. So let's give them a better chance to realize
what's happened, and return -1 here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
d5f4f918f3 panfrost: clean up mmap-diagnostics
Do not double-print the failure. While we're at it, make sure the
diagnostic includes plenty of details for easier debugging.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Boris Brezillon
3006c2a7b6 pan/cs: Fix cs_builder allocation failure robustness
There's more than one error-path out of cs_alloc_ins_block(), but only
one of them got the discar_instr_slot treatment. Instead of plugging
this in one more time, let's move this handling up to cs_alloc_ins(),
where we can easily whack two birds with one stone. This makes us
consistently return NULL on error here.

At the same time, we need to patch up cs_flush_block_instrs() here,
because we don't actually set the buffer invalid here. So let's
check for NULL here instead, which is the new contract.

Fixes: 0e6aaab00a ("pan/cs: add block to handle registers backup in exception handler")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
41a2b86666 pan/cs: fix broken allocation-failure check
We need to check the new buffer we allocated instead of the old one.
While we're at it, we also need to mark the builder as invalid.

Fixes: 3b82448f47 ("panfrost: Add a library to build CSF command streams")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Juan A. Suarez Romero
2abd85bbc0 v3d: make v3d_flush_resource reallocate non-shareable resources
When we create a tiled resource originally to be non shareable, if later
we want to share it, it could happen the tile format is not valid for
sharing: only UIF formats are appropiate.

In this case, we need to re-create the resource with a valid format.

For more details, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154.

This commit is heavily inspired by asahi.

Fixes
`spec@ext_image_dma_buf_import@ext_image_dma_buf_import-tex-modifier`.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32661>
2024-12-18 12:56:01 +00:00
Lucas Stach
734ba8d785 etnaviv: add debug switch to disable texture descriptor usage
Halti5 GPUs still support the state based sampler configuration,
alongside the new texture descriptor based method. Allow to switch
between both methods with a debug switch, to allow easy comparisons
between them.

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/32662>
2024-12-18 12:42:37 +00:00
Lucas Stach
66512cd897 etnaviv: Update headers from rnndb
Update to rnndb commit 1d174e311be6, documenting the TX
descriptor enable bit.

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/32662>
2024-12-18 12:42:37 +00:00
Erik Faye-Lund
4a1dd45850 st/mesa: document ARB_texture_float quirk
We're not strictly speaking doing the right thing for ARB_texture_float,
but for a very good reason. This has come up a few times in the past, so
let's document the decision for future readers.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32404>
2024-12-18 11:42:20 +00:00
Marek Olšák
4d8a508510 ac/nir: call nir_gather_tcs_info only once for RADV
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
8c2f9f0665 radv: switch to the new TCS LDS/offchip size computation
to use the same logic as radeonsi. This could be improved, see TODOs.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
823e9e846e radeonsi: switch to the new TCS LDS/offchip size computation
The new TCS LDS size should be less than what it was before.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00