Commit graph

194675 commits

Author SHA1 Message Date
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
Sviatoslav Peleshko
1aa7218a1f mesa: Reset vbo attributes after flushing them to Current in glPopAttrib
Fixes: 2fe771f4 ("vbo: use FlushVertices flags properly and clear NeedFlush correctly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11498
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31107>
2024-09-11 09:58:52 +00:00
Daniel Schürmann
a9d64fa1bd radv: promote VK_NV_compute_shader_derivatives -> VK_KHR_compute_shader_derivatives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30972>
2024-09-11 08:37:46 +00:00
David Rosca
b6faf586e6 targets/vdpau: Build vdpau driver into libgallium when building with dri
Currently vdpau driver and dri driver are two separate libraries, when
radeonsi is enabled both libraries contain amdgpu winsys. radeonsi
needs shared winsys to ensure sync between OpenGL and VDPAU works.
Build vdpau driver into libgallium to avoid having two instances of amdgpu
winsys.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:21 +00:00
David Rosca
212d57f7e6 targets/va: Build va driver into libgallium when building with dri
Currently va driver and dri driver are two separate libraries, when
radeonsi is enabled both libraries contain amdgpu winsys. radeonsi
needs shared winsys to ensure sync between OpenGL and VAAPI works.
Build va driver into libgallium to avoid having two instances of amdgpu
winsys.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11598
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:20 +00:00
David Rosca
39f7ed5412 meson/megadriver: Add megadriver_libdir argument
To be able to install symlinks to megadriver in different directory.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:20 +00:00
Faith Ekstrand
7ebb2d1dc8 nvk: Only advertise compute_shader_derivatives when NAK is used
Fixes: e0e7d8d910 ("nvk: Advertise VK_NV/KHR_compute_shader_derivatives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31125>
2024-09-10 19:27:10 -05:00
Sil Vilerino
6f82b1ea18 d3d12: Add support for HEVC range extension header parameters
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117>
2024-09-10 23:06:34 +00:00
Sil Vilerino
92d6989fdc d3d12: Add support for HEVC 4:4:4 video encode using AYUV format
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117>
2024-09-10 23:06:34 +00:00
Sil Vilerino
0161b98955 pipe: Add HEVC encode range extension caps, SPS and PPS params
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117>
2024-09-10 23:06:34 +00:00
Christian Gmeiner
ec59a1d1b2 etnaviv: Drop assignment of get_timestamp
This hook is only called when PIPE_CAP_QUERY_TIMESTAMP is supported. Let's
drop it as it could confuse other mesa hackers.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Christopher Michael <cmichael@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31094>
2024-09-10 22:37:13 +00:00
Iván Briano
e4ee0a2ce1 anv: be consistent about aux usage with modifiers
In c1a7d520f3, we disabled AUX usage for imported images when they are
using an explicit modifier that doesn't support it.
We need to do the same when the modifier is picked by the driver,
otherwise the memory requirements reported for an exported image don't
match those we report for import.

Fixes: c1a7d520f3 ("anv: Disable aux if the explicit modifier lacks it")

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31051>
2024-09-10 22:09:41 +00:00
Mike Blumenkrantz
3db1a91bfe zink: delete erroneous kopper assert
certain present modes aren't supported by zink,
but that doesn't mean the driver needs to crash if
the driver supports them

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31121>
2024-09-10 21:38:41 +00:00
Faith Ekstrand
e0e7d8d910 nvk: Advertise VK_NV/KHR_compute_shader_derivatives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Faith Ekstrand
b5ac20f13f nak: Shuffle gl_LocalInvocationID for quad derivatives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Faith Ekstrand
9c4fa79e00 nak: Move subgroup_id and num_subgroups to lower_system_values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Faith Ekstrand
4602b52a1c nak: Add a NAK_SUBGROUP_SIZE #define
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Sil Vilerino
26a02b7df7 d3d12: Add HEVC support for on demand AUD NALUS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +00:00
Sil Vilerino
1c490a79f2 pipe: Remove renew_headers_on_idr, insert_aud_nalu unused params
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +00:00