Commit graph

194693 commits

Author SHA1 Message Date
Sil Vilerino
0c8fa50dfa d3d12: Support create_dpb_buffer for non-opaque allocations when decoder/encoder supports it
Note that D3D12_VIDEO_ENCODER_SUPPORT_FLAG_READABLE_RECONSTRUCTED_PICTURE_LAYOUT_AVAILABLE
was added in DirectX-Headers v1.614.1

Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31092>
2024-09-12 15:01:18 +00:00
Sil Vilerino
702bd657cc ci: Bump DirectX-Headers and Agility SDK dependencies to 1.614.1
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31092>
2024-09-12 15:01:18 +00:00
Juan A. Suarez Romero
8338e2082e v3d: do not rebind a sampler view already rebound
As sampler view can be used multiple times, do not attempt to rebind if
it was already bound.

This fixes a crash when replaying half-life-2-v2.trace.

Backport-to: 24.2
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/31049>
2024-09-12 14:36:56 +00:00
Juan A. Suarez Romero
c84be162a1 Revert "v3d: never replace a mapped bo"
This reverts commit 0b85476d86.

When mapping a BO in v3d, the map keeps forever until freeing the BO. If
later the map is required again, we reuse the map instead of doing the
map from scratch.

This saves calling map/unmap continuously, as well as a mechanism to
keep control of the map usage, like a reference count.

Thus, when reallocating a BO, if it is mapped it just means the map was
used in the past, but not necessarily it is in use right now.

The reverted commit was causing performance regressions in multiple
applications, reducing from 60fps to 5fps.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11783
Backport-to: 24.2
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/31049>
2024-09-12 14:36:56 +00:00
Juan A. Suarez Romero
fed73edf16 v3d/ci: add new flake for rpi5
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31146>
2024-09-12 13:03:06 +02:00
Samuel Pitoiset
e1df6cf499 radv: use radv_get_user_sgpr_loc() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31115>
2024-09-12 07:01:36 +00:00
Samuel Pitoiset
190d46b65d radv: precompute more PGM registers for all stages
Less error prone and easier to update for new hardware.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31115>
2024-09-12 07:01:36 +00:00
Samuel Pitoiset
c7a509f55c radv: update PGM register for TES+GS compiled separately with ESO
Not sure why 0xB210 works on GFX10+ because it's supposed to be
0xB320 with/without NGG...

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31115>
2024-09-12 07:01:36 +00:00
Martin Roukala (né Peres)
97624f99a1 radv/ci: run vkcts-navi31-valve pre-merge
We currently have 3 runners with 7950X3D CPUs and 7900XT GPUs which
can rip through VKCTS in ~16 minutes.

Since this is over the 15 minutes threshold, we parallelize the job to
get under 15 minutes, which nets up ~10 minutes total runtime.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31085>
2024-09-12 03:37:18 +00:00
Martin Roukala (né Peres)
09892aec09 zink/ci: document more flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31085>
2024-09-12 03:37:18 +00:00
Martin Roukala (né Peres)
7bb80e184c radv/ci: document more vkcts flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31085>
2024-09-12 03:37:18 +00:00
Dave Airlie
7c6e3c70b6 radv/video/enc: report pps overrides in feedback for h265
radv does change h265 usually so report in feedback info.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
2024-09-12 10:58:02 +10:00
Dave Airlie
8d08e92199 radv/video: fix encode reference slot counting
This needs the max of slot indices.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
2024-09-12 10:57:58 +10:00
Dave Airlie
e89f4a48fd radv: Fix radeon_enc_code_ue with values over 2^16
This ports this fixes from radeonsi:

138ba42a87 ("radeonsi/vcn: Fix radeon_enc_code_ue with values over 2^16")

Cc: mesa-stable
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
2024-09-12 10:57:18 +10:00
Nanley Chery
e0157abec6 anv,iris: Pack depth pixels into initialized arrays
Coverity alerts that the uint32_t pointer I was passing into
isl_color_value_pack() could possibly be used as an array. The value is
being used as such, but only the first element of that array should be
accessed. That's because the depth buffer formats I'm also passing into
the function only have a single channel, R. Nonetheless, let's update
the code to avoid the warning.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31123>
2024-09-11 22:04:30 +00:00
Mike Blumenkrantz
bb16203a8d zink: fix sparse bo deallocation
this loop was not correctly iterating the dynarray

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
2024-09-11 21:07:45 +00:00
Mike Blumenkrantz
d72f7cbc5a zink: stop leaking inferred resolve surfaces
this is tricky since the ownership model here works the other
way around from normal: the resolve surface's lifetime is
determined by the resource's lifetime, meaning that
the surface should be destroyed by the resource instead
of the resource being destroyed by the surface

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
2024-09-11 21:07:45 +00:00
Mike Blumenkrantz
a3c2be8f85 zink: set resolve layout when inferring scanout resolves
this is otherwise broken

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
2024-09-11 21:07:45 +00:00
Eric R. Smith
db371633e6 panfrost: improve swizzle inversion
panfrost_invert_swizzle produces a (one-sided) inverse, that is a
function g such that g(f(x)) = x. However, it is actually used in
some cases where we want a two-sided inverse, where we also have
f(g(x)) = x. An example is its use to pre-swizzle border color
values so that a later pass will un-swizzle them. If the swizzle
is not one-to-one this two sided inverse does not exist. However,
we can do better than the original code, e.g. for an RRR1 swizzle
inverse produced was originally B000, which when applied on the wrong
side results in BBB1 as output, whereas R000 would produce the
desired RRR1 output. Using the first valid component we see, rather
than the last one, is thus usually better.

The "correct" solution is to re-write all the code that uses
an inverse to handle non-unique inverses. But frankly these uses only
crop up in fairly niche cases like tests, and it's probably not worth
spending a lot of effort to deal with these edge cases when this
patch fixes most of them.

Fixes some failing piglit ext_framebuffer_multisample tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31060>
2024-09-11 19:29:16 +00:00
David Heidelberg
78a121b8cf freedreno/ir3: Use nir_lower_mem_access_bit_sizes instead custom lowering
- More robust.
 - Handles properly UBO cases, needed for proper OpenCL support (rusticl).
 - Resolved KHR-GL46.gpu_shader_fp64.fp64.max_uniform_components failure.

Fixes: f5ce806ed7 ("freedreno/ir3: Add wide load/store lowering")
Reviewed-by: Rob Clark <robdclark@freedesktop.org>
Co-authored-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30961>
2024-09-12 01:04:58 +09:00
Boris Brezillon
5db135f66a panvk: Advertize v10 support
Patch panvk_macros.h to add a case for v10 and accept v10 devices.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Rebecca Mckeever
f8598e599e panvk: Add VkEvent support to the CSF backend
With its sync object primitive, CSF allows native event support.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
5544d39f44 panvk: Add a CSF backend for panvk_queue/cmd_buffer
With those two components implemented, we can now compile all common
per-arch source files.

Co-developed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
7049d31676 panvk: Add a read-write non-cached memory pool for CSF events
Events cross the device boundary and can be read/written by the host.
We could add the necessary cache flush and made those GPU-cached, but
it's way simpler to allocate non-cached memory.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
53fb1d99ca panvk: Transition to explicit VA assignment on v10+
Panthor allows us to control the GPU virtual address space,
which, among other things, will allow us to support sparse
bindings.

Let's tweak the device initialization and BO mapping to
takes this explicit VA management mode into account.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
ca79fc99cd panvk: Don't pretend we can compile for v9
The JM backend is not ready for v9 yet, so let's just drop it from the
list of architecture to build for.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
db1073357a panvk: Be robust against allocation failures in a command buffer context
When an allocation failure happens, the command buffer should be
flagged as invalid, and anything using this memory from the CPU side should
be skipped to avoid segfaults.

For allocations going through memory pools owned by a command buffer
we automate that with panvk_cmd_alloc_xx() macros.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
eb0b1c36f2 panvk: Move CmdPushConstants2KHR to panvk_vX_cmd_push_constant.c
Turns out the panvk_cmd_buffer structures for CSF/JM are similar enough
to make CmdPushConstants2KHR() generic. Let's move this function out
of the JM specific code.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
173939ed9b panvk: Move cmd_bind_shaders() to panvk_vX_shader.c
We had planned for a CSF specialization, but it turns out the CSF/JM
are almost the same and we can have something generic implemented in
panvk_vX_shader.c

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
0426c14c7a panvk: Move Cmd{Bind,Push}DescriptorSets implementation to cmd_desc_state.c
Turns out the panvk_cmd_buffer for CSF/JM have enough similarities to
make it possible to have a generic implementation in
panvk_vX_cmd_desc_state.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
aedb00ca08 panvk: Set the submit mode to THREADED_ON_DEMAND
It's needed for wait-before-submit, which drm_syncobjs don't
support.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
0429cc10d8 panvk: Prepare the panvk_device logic for CSF
The tiler heap is handled differently on CSF hardware, and we don't need
to allocate the tiler_heap buffer there.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
be96213634 panvk: Make sure push sets are reset when picked from the CommandPool
If we don't do that, we might end up with data from the previous user
of this set.

Fixes: 598a8d9d11 ("panvk: Collect allocated push sets at the command level")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
7f7e772bdf panvk: Don't make panvk_device size gen dependent
The panvk_device is used in gen-agnostic path, and which means we can't
make its size dependent on PAN_ARCH.

Fixes: 5067921349 ("panvk: Switch to vk_meta")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
6527cb742e panvk: Don't open-code vk_index_type_to_bytes()
While at it, store the index_size in bytes instead of bits.

Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
9f094cdeaf panvk: Fix valhall_pack_buf_idx()
The descriptor lowering pass can add UBO loads to read descriptors, and
these loads already assume a nir_address_format_32bit_index_offset
format.

Bail out if we detect that case in valhall_pack_buf_idx().

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 27beadcbdb ("panvk: Extend the shader logic to support Valhall")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
343bff7903 panvk: Drop the NO_MMAP flag when PANVK_DEBUG=trace
We have buffers that are not supposed to be CPU-mapped but are useful to
check when tracing is enabled.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
bae5235405 panvk: Kill the set_dirty() macro
It's unused and we're not supposed to manually set the dirty bits
anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
a651826b80 panvk: Fix the varying pool label
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
2805804dce pan/desc: Make vertex_count a Midgard field
We don't need to pass the vertex count around on Bifrost/Valhall, since
the tiler descriptor is generated outside of emit_fbd() on those gens.

Let's move vertex_count under the midgard struct to make that clear.
This implies maintaining a vertex_count at the panfrost_batch level
in the gallium driver, but that's fine.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
11fcb23f74 pan/desc: Add a struct for valhall/bifrost to the union in pan_tiler_context
Valhall has extra tiler parameters for multilayer rendering that we will
need for the framebuffer descriptor emission. Let's add proper struct
for Valhall and Bifrost instead of assuming a mali_ptr is all we'll ever
need.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
2149a04de3 pan/kmod: Don't cap VM bind operations to one
Looks like some leftovers from a debugging session.

Fixes: 97f6a62f7e ("pan/kmod: Add a backend for panthor")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
07b31b2204 pan/cs: Add a facility to restrict register access
If the CS register file is used in a stateful mode, some of the registers
will survive the RUN_xxx boundary, and even serve as a context for
subsequent RUN_xxx calls.

Having a way to restrict register access outside specific sections of
code is a handy debug feature, so let's expose the necessary bits to
allow that.

It takes the form of a reg permission callback that gets called every
time a register serves are a source or destination, to make sure this
is allowed in this context.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
07c463d06b pan/cs: Add inline specifiers to a bunch of cs_ helpers
Just to make things consistent with the rest of the file, the compiler
was probably already inlining those anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
a87c43def7 pan/cs: Add an optional load/store tracker to make sure we don't omit waits
With load/store operations being asynchronous, it's pretty easy to omit
a WAIT(LS) and end up with inconsistent register values or corrupted
stores.

Add an optional load/store tracker to detect such cases early on.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
b1934057cb pan/cs: Allow sparse register set passed to loads/stores
When it comes to copying stuff around, it becomes handy to be able
to have a discontiguous range of register to load to/store from so
we don't have to move stuff around to make things contiguous in the
register file.

Allow that by making register count the last bit in the mask rather
than counting bits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
1a5ce4a96e pan/cs: Add helpers to emit match (AKA switch-case) blocks
We need for the dynamic scoreboard assignment we will do in panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
8f825a51a8 pan/cs: Accept val=undef when cs_branch_label() condition is ALWAYS
The register is not used in that case anyway, so we can pick r0 and
call it a day.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
f6c3fb11ea pan/cs: Make sure we're not passed cs_now() to asynchronous instructions
FLUSH_CACHE2 is both deferrable and asynchronous. That means we should
always pass an explicit slot to signal instead of picking zero as we do
in cs_now().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Daniel Schürmann
07b1fd64b7 aco/live_var_analysis: don't set lateKill for p_interp_gfx11 m0 operand
There is no danger of overwriting m0 anymore.

Fixes: dfc13fcf9f ('aco: introduce Operand flag 'CopyKill'')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31127>
2024-09-11 10:36:34 +00:00