Commit graph

56 commits

Author SHA1 Message Date
Erik Faye-Lund
fed682c506 pan/lib: do not duplicate enum mali_pixel_kill
The enum pan_earlyzs is just enum mali_pixel_kill under a different
name, which was needed because the enum was missing from common.xml.

However, because pan_earlyzs_lut is used in files that are both included
with PAN_ARCH unset and set to values including values lower than 6, we
get issues with the way genxml/common_pack.h gets included, resulting in
the enum not being defined.

We don't really depend on the values for this, only on the size. So
let's just use unsigned values in the struct instead, to side-step the
issue.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36606>
2025-08-20 00:05:36 +00:00
Lars-Ivar Hesselberg Simonsen
db4bcd48d7 panvk: Fix IUB decode
The buffer is only an IUB if it's within the size of the resource entry.
Otherwise, it might just be a buffer that landed just after the
descriptor allocation.

Fixes: fb38f10240 ("panvk: Handle IUBs in decoder")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Lars-Ivar Hesselberg Simonsen
e5b828e808 panvk: Fix instrumentation on v12+
Ensure we stay within the maximum tuple size when copying.

Fixes: 172dead3df ("panvk: Increase CSF scratch limits on v12+")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Antonio Ospite
ddf2aa3a4d build: avoid redefining unreachable() which is standard in C23
In the C23 standard unreachable() is now a predefined function-like
macro in <stddef.h>

See https://android.googlesource.com/platform/bionic/+/HEAD/docs/c23.md#is-now-a-predefined-function_like-macro-in

And this causes build errors when building for C23:

-----------------------------------------------------------------------
In file included from ../src/util/log.h:30,
                 from ../src/util/log.c:30:
../src/util/macros.h:123:9: warning: "unreachable" redefined
  123 | #define unreachable(str)    \
      |         ^~~~~~~~~~~
In file included from ../src/util/macros.h:31:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:456:9: note: this is the location of the previous definition
  456 | #define unreachable() (__builtin_unreachable ())
      |         ^~~~~~~~~~~
-----------------------------------------------------------------------

So don't redefine it with the same name, but use the name UNREACHABLE()
to also signify it's a macro.

Using a different name also makes sense because the behavior of the
macro was extending the one of __builtin_unreachable() anyway, and it
also had a different signature, accepting one argument, compared to the
standard unreachable() with no arguments.

This change improves the chances of building mesa with the C23 standard,
which for instance is the default in recent AOSP versions.

All the instances of the macro, including the definition, were updated
with the following command line:

  git grep -l '[^_]unreachable(' -- "src/**" | sort | uniq | \
  while read file; \
  do \
    sed -e 's/\([^_]\)unreachable(/\1UNREACHABLE(/g' -i "$file"; \
  done && \
  sed -e 's/#undef unreachable/#undef UNREACHABLE/g' -i src/intel/isl/isl_aux_info.c

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
2025-07-31 17:49:42 +00:00
Aksel Hjerpbakk
8a35a98936 panvk: implement cs_extract64 & cs_extract_tuple
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34733>
2025-07-28 16:08:20 +00:00
Aksel Hjerpbakk
5984ca8417 panvk: avoid cs jump block with no allocator
Also initialize allocator to NULL for tiler OOM handler and assert
if capacity is sufficient in the event that allocator is NULL

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34733>
2025-07-28 16:08:20 +00:00
Mary Guillemard
f1a469cce1 pan/genxml: Make resource table optional on RUN_COMPUTE{_INDIRECT}
We already do that for RUN_IDVS, we should do the same here.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36131>
2025-07-21 16:52:44 +00:00
Mary Guillemard
455b93601a pan/genxml: Add missing parenthesis on pan_cast_and_pack macros
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We were missing parenthesis on pan_cast_and_pack macros causing various
issues.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 410e5a36ec ("pan/genxml: Rework gen_pack.py to support OpenCL")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36261>
2025-07-21 16:32:51 +00:00
Eric Engestrom
0c641c8170 panfrost/meson: drop invalid C-only -Wno-override-init from C++ args
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
cc1plus: warning: command-line option '-Wno-override-init' is valid for C/ObjC but not for C++

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35892>
2025-07-04 13:03:46 +00:00
Mary Guillemard
a3272cd0ce pan/genxml: Fix wrong size for compute size workgroup
Fix annoying warnings when decoding CSF.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35909>
2025-07-03 16:41:51 +00:00
Christoph Pillmayer
fb38f10240 panvk: Handle IUBs in decoder
When we encode inline uniform data into the descriptor table, we should
skip the descriptors that are actually data instead of real descriptors.
Let's do that and also print the inlined data for convenience.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35831>
2025-07-01 12:34:41 +00:00
Boris Brezillon
7a763bb0a3 pan/genxml: Rework the RT/ZS emission logic
For the ZS emission logic, we split the descriptor in 3 parts: ZS, S and
CRC, so we can easily mix and match each variant with pan_merge(). For
RTs, we just define a layout per variant instead of overlays, which makes
dumps less verbose, and avoid the situation where overlapping fields
get accidentally overwritten in the desc emission logic.

While at it, add the `Surface stride hi` fiels to the ZS/Color target
descriptors so we're all set to bump the image size limit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
61d6e92f25 pan/genxml: Add missing upper-32 bits of the buffer size on v12+
We currently don't use this, but it's good to have it defined anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Boris Brezillon
d2d27f8d9e pan/genxml: Fix the texture dimension field on v9+
The enum has more than 3 values now, and the field is 3-bit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
2025-06-27 07:06:07 +00:00
Lars-Ivar Hesselberg Simonsen
bbe3c7e1a3 pan/genxml/v9+: Add support for NullDescriptor decode
It's now valuable to know whether a decoded descriptor is completely
zeroed (NullDescriptor) or invalid.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35609>
2025-06-25 11:23:49 +00:00
Boris Brezillon
d4f89986ff pan/genxml: Get rid of the Plane descriptor
We use specialized plane descriptors now almost everywhere except when
we want to get the plane descriptor size, and we can use a null plane in
that case, so let's get rid of the old definitions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
442be34441 pan/genxml: Introduce per-type plane descriptors
It makes it easier to decipher when reading a dump, and it will also
make overlapping fields impossible to set twice once we've converted the
texture logic to use those.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
883ce63db5 pan/genxml: Reconcile AFBC RT properties naming on v5+
Pick the same names we use on v9+ for the "Render Target AFBC Overlay"
properties that exist on v5+ too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Tested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Boris Brezillon
737fc5d3c1 pan/genxml: Make sure we catch overflows on 32-bit integer fields
If we store the temporary value in a [u]int32_t, the result might be
silently truncated, making the overflow check in the u_pack helpers
useless.

Make sure we use 64-bit fields as soon as the size is greater than 31
bits to prevent that.

It forces us to fix some types in the xml and helper arguments (sint
wrongly defined as uint) and add explicit casts on u32 subtraction
whose result is stored in an s32.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
2025-06-25 12:10:37 +02:00
Christoph Pillmayer
d1448e3243 panvk: Add cs_single_link_list
The linked list will be used to store occlusion queries to signal after a
renderpass.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35687>
2025-06-25 08:15:54 +00:00
Christopher Gautier
48e8d6d207 panfrost, panvk: The size of resource tables needs to be a multiple of 4.
The HW specifications require the size of shader resource tables to be a
multiple of 4, otherwise correct behaviour is not guaranteed.

Fixes: 713f5c3600 ("panvk: Prepare the cmd_desc_state logic for Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35553>
2025-06-18 16:09:03 +00:00
Christopher Gautier
db4c878e4f panfrost, panvk: Use arch version 9 to distinguish between Bifrost & Valhall
The change was performed automatically with a regular expression over
the code base.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35553>
2025-06-18 16:09:03 +00:00
Olivia Lee
d0b353018f panvk: Add tests for ls tracking in cs_maybe
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35460>
2025-06-13 08:28:30 +00:00
Ludvig Lindau
3778b22268 panvk: Fix ls_tracker usage in cs_maybe
Currently a cs_maybe block affects the ls_tracker of a command stream
even if the cs_maybe block is later replaced by NOP instructions. This
can lead to missing WAIT instructions in the command stream.

* Add a WAIT at the end of the cs_maybe block if the block has changed
 the ls_tracker state
* At the end of a cs_maybe block, restore the ls_tracker state to what
 it was before the block

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13259
Fixes: 885805560f ("panvk/csf: fix case where vk_meta is used before PROVOKING_VERTEX_MODE_LAST")
Tested-By: Alexandre ARNOUD <aarnoud@me.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35460>
2025-06-13 08:28:30 +00:00
Christoph Pillmayer
f9ed719c6a panvk: Add tests for ls tracker behavior in cs_loop
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35436>
2025-06-11 15:19:50 +00:00
Christoph Pillmayer
cdedd04640 panvk: Fix ls_tracker usage in cs_loop
LOAD_MULTIPLE can be emitted inside of a loop body. We need to WAIT if
that loads targets a register for which a load was not already in-flight
at the start of the loop body.

Technically we only have to emit the wait if the dst reg of a new load
is actually used inside the loop, but that would require separate
tracking of source regs used in the loop and is probably not worth
the effort for now.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35436>
2025-06-11 15:19:50 +00:00
Christoph Pillmayer
a24abc3fbd panvk: Move cs_wait_slot(s) and cs_flush_loads/stores
The following commit needs to flush loads from cs_loop_ functions.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35436>
2025-06-11 15:19:50 +00:00
Christoph Pillmayer
c106fcf284 panvk: Use ls_tracker in cs_if_else
For cs_if_else the ls_tracker needs to be setup such that the loads and
stores of both branches are accounted for separately.

Fixes: f75569734e (panvk: Remove explicit LS waits)
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35425>
2025-06-10 12:34:31 +00:00
Mary Guillemard
1abe5d1da9 pan/genxml: Switch pan_merge to a macro
This switch pan_perge to a macro to keep address space
information when working with OpenCL C.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32839>
2025-06-06 12:58:21 +00:00
Christoph Pillmayer
6d4d42e328 panvk: Add support for 64bit conditionals in CSF
This will be used to implement timestamp queries for CSF GPUs.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35368>
2025-06-05 14:20:54 +00:00
Christoph Pillmayer
8ed900c406 panvk: Fix start label position in cs_while_start
We want the start label to be after the initial check for the condition
not being true.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35368>
2025-06-05 14:20:54 +00:00
Mary Guillemard
f6f5bee080 pan/genxml: Fix typo for NEXT_SB_ENTRY
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
"NEXT_SB_ENTR" -> "NEXT_SB_ENTRY"

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 811525b543 ("pan/genxml: Build libpanfrost_decode for v12")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
bacd87ba3c panfrost: Fix codestyle issue with cs_nop
We never use this kind of form in that header and that was bumping on
clang-format a lot.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
3a5d1d74ec panfrost: Add indirect mode for async operations on v11+
v11 and later allows to indirectly wait on a scoreboard mask and signal
a scoreboard (as set via SET_STATE)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
a0826ad205 panfrost: Add cs_* helpers for v11 CSF instructions
This adds all bit operations and an helper to indirectly wait on
scorebards.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
80b06fb82f panfrost: Allow up to 16 for scoreboards on CSF instructions on v11+
The max value on v11+ is 16.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
19531a0162 pan/csf: Fix typo in cs_trace_run_idvs2
This should have been a multiply not an add.
Fix an assertion when running in tracing mode on panvk.

Fixes: 79a1d98e1e ("pan/csf: make cs_builder.h usable from c++")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35176>
2025-05-28 10:12:19 +02:00
Erik Faye-Lund
7de12da5a2 panfrost: v4 does not support 16x msaa
This value isn't valid on V4, so let's make sure we don't try to use it.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35184>
2025-05-27 17:41:47 +00:00
Olivia Lee
61e7d47270 pan/csf: rename cs_exception_handler to cs_function
The register save/restore machinery is useful for more general callable
functions, not just exception handlers.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
83bb97796b pan/csf: add cs_maybe mechanism to retroactively patch cs contents
We have an edge case with VK_EXT_provoking_vertex where we may need to
emit FBDs and TDs before we know what provoking vertex mode the
application is using for the renderpass. To handle this, we want to
retroactively patch the provoking vertex bit. This commit introduces an
abstraction to do that.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
952703eefe pan/csf: add cs_builder unit test infrastructure
For now, just comparing the raw contents of the output buffer. Possibly
in the future we could hook this up to the disassembly from decode_csf.c
to make it a easier to edit.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Olivia Lee
79a1d98e1e pan/csf: make cs_builder.h usable from c++
We need to do this in order to test it with gtest. Most of the changes
are just fixing integer truncation warnings.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
2025-05-26 04:15:21 +00:00
Boris Brezillon
086bcbe186 pan: Use a consistent pan_ prefix across src/panfrost/*
We've been inconsistenly using panfrost_ and pan_ as a prefix for
the common helpers/structs. Let's finally make a clear cut by
prefixing everything that lives in src/panfrost/* with pan_.

No functional changes here, this is just renaming and reformatting
changes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34767>
2025-05-21 14:58:20 +02:00
Mary Guillemard
8e05222e1d pan/lib: Add support for rotated 2x grid sample pattern
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34997>
2025-05-19 10:13:49 +00:00
Mary Guillemard
b3f8c955a7 pan/genxml: Add Register File Format to common.xml
This was added in v6+ and never changed.
This will allow us to remove GENX code logic that is identical.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34895>
2025-05-15 10:40:23 +02:00
Christoph Pillmayer
b115850ece panfrost: Remove unused ls_sb_slot from contexts
ls_sb_slot is unused now in cs_tracing_ctx and cs_exception_handler_ctx.
Let's remove it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
f75569734e panvk: Remove explicit LS waits
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
c28497c355 panvk: Add automatic load/store cs WAITs
This commit adds automatic insertion of WAIT instructions based
on the already existing cs_load_store_tracker.

Dependencies through memory need to be handled manually by the
user using the cs_flush_[loads/stores] functions.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
cc790d12c6 panvk: Change pending_stores from bitset to bool
Also remove pending_stores check from cs_dst_tuple.
This is not required as the staging regs are read synchronously.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
2025-05-14 14:03:29 +00:00
Christoph Pillmayer
82f36cd8e3 panfrost: Make ls tracker mandatory in cs_builder
This commit moves cs_load_store_tracker from the cs_builder_conf
to cs_builder and makes it no longer optional to supply.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34808>
2025-05-14 14:03:29 +00:00