An AHB with IMPLEMENTATION_DEFINED format is commonly backed by NV12 or
XBGR8888. The former is the usual pick for camera <-> GPU interop, while
the latter is mostly only seen in Android CTS. Ideally, we can rely on
the queried fourcc to resolve everything instead of being on the
fallback path, but keeping this a minimal fix is easy for porting.
Cc: mesa-stable
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36866>
(cherry picked from commit 25a8e124e0)
After the commit mentioned below the `extra` variable only holds the
last added extra sampler. For 3-plane formats this results in one extra
sampler being leaked.
Add the bits for each extra sampler instead.
Fixes: abcd02a07d (gallium: Properly handle non-contiguous used sampler view indexes)
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Matthias Reichl <hias@horus.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36870>
(cherry picked from commit 25fe82630a)
Descriptor prefetches may be generated for instructions in control flow.
This means we cannot simply emit prefetches at the end of the preamble
because that may not be dominated by all their sources. This commit uses
the helpers introduced by e7ac1094f6 ("ir3: rematerialize preamble defs
in block dominated by sources") to find the correct block to insert
prefetches.
Fixes NIR validation errors in Dying Light 2.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 4e2a0a5ad0 ("ir3: Add descriptor prefetching optimization on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36885>
(cherry picked from commit 24cdb0b636)
This might actually fixes a couple of things because needed dynamic
states are computed before radv_emit_graphics_pipeline(), so dirtying
them too late doesn't make much sense.
This doesn't fix anything known.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36900>
(cherry picked from commit d40e841cc4)
We were not implementing vkGetImageOpaqueCaptureDescriptorDataEXT,
relying on the common implementation that does nothing. That works well
enough for regular images because the fixed address needed for
capture/replay is handled by the memory allocation path, but for sparse
images we initialize the sparse bindings at image creation time.
Here we implement the function to retrieve the addresses of all the
used bindings for the image, then use all of them at creation time.
Also, set the correct alloc_flags for this to work.
Fixes: 43b57ee8a5 ("anv: add capture/replay support for image with descriptor buffers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35872>
(cherry picked from commit 20f546d6c1)
In some setups the rust compiler emits errors like the following:
-----------------------------------------------------------------------
error: hiding a lifetime that's elided elsewhere is confusing
--> ../subprojects/proc-macro2-1.0.86/src/parse.rs:125:25
|
125 | fn block_comment(input: Cursor) -> PResult<&str> {
| ^^^^^^ -------------
| | | |
| | | the same lifetime is elided here
| | the same lifetime is hidden here
| the lifetime is hidden here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
help: use `'_` for type paths
|
125 | fn block_comment(input: Cursor<'_>) -> PResult<'_, &str> {
| ++++ +++
-----------------------------------------------------------------------
Follow the solution suggested by the compiler to silence the errors, for
all the observed occurrences.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
(cherry picked from commit 8f84ae7de7)
In case of emulated ASTC on supported platforms, currently returning
0 for linear tiled images causes vpGetPhysicalDeviceProfileSupport
failure during AndroidBaselineProfile test. The patch handles it
similar to linearly-tiled images that are used for transfers.
Fixes android.graphics.cts.VulkanFeaturesTest#testAndroidBaselineProfile2021Support.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36798>
(cherry picked from commit f67edacf8b)
this avoids a scenario where a non-subdata UNSYNCHRONIZED unmap triggers through
tc at the same time the frontend calls an UNSYNCHRONIZED subdata call
in the main thread, which desynchronizes the cmdbuf and hits an assert
Fixes: 8ee0d6dd71 ("zink: add a third cmdbuf for unsynchronized (not reordered) ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36846>
(cherry picked from commit cf5d41575b)
If vkCmdSetRenderingAttachmentLocations() isn't setting all color
attachment locations (ie. MAX_RTS), the remapping might be wrong
because MESA_VK_ATTACHMENT_UNUSED is used to trim the unused locations
Found by inspection while implementing a new extension.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36778>
(cherry picked from commit 45c91edd18)
This change fixes the gds implementation of
atomic_counter_comp_swap which requires three arguments.
This update is based on 4e3b43f180 "r600/atomic: fix
ATOMCAS instruction." which was the tgsi implementation.
Note: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36554
is required for this change to work properly on cayman.
This change was tested on palm, cypress and barts. Here is the test fixed:
khr-gl4[5-6]/shader_atomic_counter_ops_tests/shaderatomiccounteropsexchangetestcase: fail pass
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36254>
(cherry picked from commit 521b848ea8)
Otherwise the SPIR-V parser prints a warning the first time the driver
is loaded after a fresh compile.
Fixes: 91b62e9868 ("anv: Use spirv_capabilities for the float64 shader")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36783>
(cherry picked from commit 94931fd4f4)
The evauation of loading the AR register was off by one, so that
splitting an ALU group could actually happen after AR was loaded
resulting in a failure to lower to assembly.
Fixes: d617052db6 ("r600/sfn: take address loads into account when scheduling")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36742>
(cherry picked from commit 5d0f212d81)
Without this update a very long ALU block may not be splitted as
required and lowering to assembly may fail because the maximum
supported length of a ALU CF is overrun.
Fixes: 6aafa2bb49 ("r600/sfn: Split ALU blocks in scheduler to fit into 128 slots")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36742>
(cherry picked from commit 63c801e8c2)
Calling vkCmdBindDescriptorBuffersEXT() does not invalidate previously
set descriptor sets. Move the state dirtying to
vkCmdSetDescriptorBufferOffets.
Fixes: ab7641b8dc ("anv: implement descriptor buffer binding")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36768>
(cherry picked from commit 35190aac91)
If an application switches back and forth between descriptor sets and
descriptor buffers before executing a draw/dispatch, we could end up in
a wrong state due to pending_db_mode not getting updated.
Fixes: ab7641b8dc ("anv: implement descriptor buffer binding")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36768>
(cherry picked from commit 382b8e3aa2)
layout->push_constant_mask is only the DGC push constant mask (ie. the
tokens that are specified), but with IES all push constants are emitted
from the DGC shader. So it should be the total range of push constant.
This used to work by luck due to the preprocess buffer alignment.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36753>
(cherry picked from commit 3359386145)
We need to release user_ptr resources earlier, so we don't keep stale
references around, but for that to happen we also need to know which
resource is a user_ptr one in the first place.
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36701>
(cherry picked from commit e31d5bc5a9)
Rusticl running on zink might end up creating an 1D image from a host_ptr
and zink might bind it with VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT.
That ended up hitting an assert inside anv_device_map_bo.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36701>
(cherry picked from commit 8d8f5558eb)
error: hiding a lifetime that's elided elsewhere is confusing
--> ../src/gallium/frontends/rusticl/util/ptr.rs:166:18
|
166 | pub fn entry(&mut self, ptr: P) -> Entry<P, T> {
| ^^^^^^^^^ ----------- the same lifetime is hidden here
| |
| the lifetime is elided here
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36747>
(cherry picked from commit 09dd2bc388)
Unlike features, property members do need Vulkan header. Currently it
relies on the fact that vk_physical_device.h has included some other
headers that include vulkan.h before this.
Cc: mesa-stable
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36702>
(cherry picked from commit 567cff487c)
util_perfetto_init() was called in some places, util_cpu_trace_init()
was called in other places, and some places used tracing without ever
calling either of them
util_cpu_trace_init() is now guaranteed to be called:
* on gallium screen create
* on VK instance create
thus no driver/frontend/etc should ever need to call this manually
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36628>
(cherry picked from commit c7045e3e63)