For VK_VALVE_fragment_density_map_layered, we need to split out whether
to enable per-view viewports and whether viewport 0 should be splatted
to all viewports. We also have to split this out for
VK_QCOM_multiview_per_view_viewport, where the splatting needs to be
disabled. To avoid conflicts between them, plumb through
"fake_single_viewport" which will be needed for the former extension and
needs to be modified for the latter extension.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35594>
When doing perspective correct interpolation with centroid/sample, we should
do the perspective correction wrt to the centroid/sample position - the
precalculated 1/w value however is always wrt pixel center (when we calculate
this we don't know yet what kind of interpolation we're going to use).
Refactor things a bit as well to avoid code duplication.
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36079>
this addresses an ancient race condition where unmapping memory
in one thread at the same time memory is mapped in a different thread
could proceed without synchronization and result in the second thread
writing to unmapped memory
this was the actual cause of #12533
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36076>
The key used to look-up a shader in the modifier conversion shader
hash table is incorrect. It currently uses the address of the key
argument variable while it should use the address already passed into
the key argument. The stack address being different at each call, the
search for a previously created shader always fails and a new one is
created at each call. This commit fixes that leak.
Fixes: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36072>
When we need to perform format conversion, we use temporary surface
allocated with vlVaHandleSurfaceAllocate. If the driver requires
clearing the surface on allocation, it will create a fence that
must be destroyed later.
Fixes: 0f20a3a4f1 ("frontends/va: Add surface pipe_fence for vl_compositor rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13198
Reported-by: Mariusz Białończyk <manio@skyboo.net>
Tested-by: Mariusz Białończyk <manio@skyboo.net>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36040>
un-wrapping requires adding INT8_MAX (not INT8_MAX-1) because e.g.,
the cases of batch_generation=126 and batch_generation=0 are not the same
also fix a stale comment
Fixes: b89e0fa226 ("tc: rework resource usage tracking to be lighter")
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36069>
Bifrost will require more work
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35789>
Adds support for 64-bit atomic operations for KHR_shader_atomic_int64
using 64-bit atomic instructions. Valhall is working but Bifrost will
require some more work to implement as it requires two instructions to
execute a 64-bit atomic.
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35789>
Add 64-bit atomic instructions for bifrost/valhall
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35789>
Before, this wasn't actually the maximum value plus one.
fossil-db (navi10):
Totals from 4 (0.01% of 63207) affected shaders:
(no stat changes)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
We can put these parameters in the LoadEmitInfo instead.
No fossil-db changes (navi10, pitcairn).
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
In case the addition with the offset overflows.
No fossil-db changes (navi10, pitcairn).
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
This isn't correct if the addition overflows.
No fossil-db changes (gfx1201, navi10, pitcairn).
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35465>
for a resource usage sequence like:
* TRANSFER_WRITE
* SHADER_READ
* TRANSFER_READ
the previous code would only synchronize SHADER_READ, which meant the
following TRANSFER_READ was subject to RaW hazards
instead, accumulate read accesses and emit new read sync when necessary
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36057>